Skip to content

Commit

Permalink
Merge pull request novacoin-project#273 from aliascash/develop_android
Browse files Browse the repository at this point in the history
Android release 4.3.1.15
  • Loading branch information
teknex authored Dec 24, 2020
2 parents a0baf99 + 2934d8d commit a332a45
Show file tree
Hide file tree
Showing 7 changed files with 285 additions and 52 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ project(Alias
)

# ANDROID_VERSION_CODE must be increased with every PlayStore release!
set(ANDROID_VERSION_CODE 14)
set(ANDROID_VERSION_CODE 15)
set(ANDROID_SDK_VERSION 29)

# Alias version definition
Expand Down
13 changes: 10 additions & 3 deletions Jenkinsfile_Android
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,14 @@ pipeline {
ACCESS_TOKEN = credentials('ci_read_access')
DEVELOP_TAG = "Build${BUILD_NUMBER}-Android"
RELEASE_TAG = sh(
script: "printf \$(grep CLIENT_VERSION_MAJOR CMakeLists.txt | head -n1 | cut -d ' ' -f2 | sed 's/)//g' | tr -d '\\n' | tr -d '\\r').\$(grep CLIENT_VERSION_MINOR CMakeLists.txt | head -n1 | cut -d ' ' -f2 | sed 's/)//g' | tr -d '\\n' | tr -d '\\r').\$(grep CLIENT_VERSION_REVISION CMakeLists.txt | head -n1 | cut -d ' ' -f2 | sed 's/)//g' | tr -d '\\n' | tr -d '\\r')-Android | sed 's/ //g'",
script: """
printf "\
\$(grep 'set(CLIENT_VERSION_MAJOR' CMakeLists.txt | head -n1 | cut -d ' ' -f2 | sed 's/)//g' | tr -d '\\n' | tr -d '\\r').\
\$(grep 'set(CLIENT_VERSION_MINOR' CMakeLists.txt | head -n1 | cut -d ' ' -f2 | sed 's/)//g' | tr -d '\\n' | tr -d '\\r').\
\$(grep 'set(CLIENT_VERSION_REVISION' CMakeLists.txt | head -n1 | cut -d ' ' -f2 | sed 's/)//g' | tr -d '\\n' | tr -d '\\r').\
\$(grep 'set(ANDROID_VERSION_CODE' CMakeLists.txt | head -n1 | cut -d ' ' -f2 | sed 's/)//g' | tr -d '\\n' | tr -d '\\r')-Android" |
sed 's/ //g'
""",
returnStdout: true
)
GIT_TAG_TO_USE = "${DEVELOP_TAG}"
Expand All @@ -35,8 +42,8 @@ pipeline {
script: "printf \"\$(date '+%F %T')\"",
returnStdout: true
)
RELEASE_NAME = "Continuous build #${BUILD_NUMBER} (Branch ${GIT_BRANCH})"
RELEASE_DESCRIPTION = "Build ${BUILD_NUMBER} from ${CURRENT_DATE}"
RELEASE_NAME = "CI build #${BUILD_NUMBER}, v${RELEASE_TAG}"
RELEASE_DESCRIPTION = "Build ${BUILD_NUMBER} from ${CURRENT_DATE}, branch ${GIT_BRANCH}"
PRERELEASE = "true"
}
stages {
Expand Down
3 changes: 3 additions & 0 deletions ReleaseNotes_Android.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ SPDX-License-Identifier: MIT
This releasenotes document covers only the Android relevant changes. For full
releasenotes please head over to [the latest release on Github](https://github.com/aliascash/alias-wallet/releases/latest).

#### 4.3.1.15 Android (released 2020-12-24)
- Mnemonic seed word autocompletion

#### 4.3.1.14 Android (released 2020-12-22)
- Support biometric (fingerprint) unlock
- Power saving mode with hourly sync when app is not staking
Expand Down
29 changes: 29 additions & 0 deletions src/extkey.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -978,6 +978,35 @@ int MnemonicDetectLanguage(const std::string &sWordList)
return 0;
};

int GetAllMnemonicWords(int nLanguage, std::string &sWordList, std::string &sError)
{
if (fDebug)
LogPrintf("%s: language %d.\n", __func__, nLanguage);

if (nLanguage < 1 || nLanguage > WLL_MAX)
{
sError = "Unknown language.";
return errorN(1, "%s: %s", __func__, sError.c_str());
};

char *pwl = (char*) mnLanguages[nLanguage];
char *pt = (char*)pwl;

while (pt < (pwl+mnLanguageLens[nLanguage]))
{
if (*pt == '\n')
sWordList += " ";
else
sWordList += *pt;
pt++;
};

if (nLanguage == WLL_JAPANESE)
ReplaceStrInPlace(sWordList, " ", "\u3000");

return 0;
}

int MnemonicEncode(int nLanguage, const std::vector<uint8_t> &vEntropy, std::string &sWordList, std::string &sError)
{
if (fDebug)
Expand Down
1 change: 1 addition & 0 deletions src/extkey.h
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,7 @@ int LoopExtAccountsInDB(bool fInactive, LoopExtKeyCallback &callback);

int GetWordOffset(const char *p, const char *pwl, int max, int &o);
int MnemonicDetectLanguage(const std::string &sWordList);
int GetAllMnemonicWords(int nLanguage, std::string &sWordList, std::string &sError);
int MnemonicEncode(int nLanguage, const std::vector<uint8_t> &vEntropy, std::string &sWordList, std::string &sError);
int MnemonicDecode(int nLanguage, const std::string &sWordListIn, std::vector<uint8_t> &vEntropy, std::string &sError, bool fIgnoreChecksum=false);
int MnemonicToSeed(const std::string &sMnemonic, const std::string &sPasswordIn, std::vector<uint8_t> &vSeed);
Expand Down
Loading

0 comments on commit a332a45

Please sign in to comment.