diff --git a/build.gradle b/build.gradle index 0defc7f70..67d9409bc 100644 --- a/build.gradle +++ b/build.gradle @@ -1,223 +1,245 @@ -buildscript { - repositories { - maven { - url "https://repo1.maven.org/maven2" - } - // Required for the Gradle plugin - google() - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:3.3.2' - classpath files('libs/gradle-witness.jar') - } -} - -apply plugin: 'com.android.application' -apply plugin: 'witness' - -repositories { - maven { - url "https://repo1.maven.org/maven2/" - } - google() - jcenter() - mavenLocal() -} - -subprojects { - ext.version_number = "2.4.0" - ext.group_info = "org.whispersystems" - ext.curve25519_version = "0.3.0" -} - -dependencies { - def supportVersion = '27.0.0' - - compile "com.android.support:appcompat-v7:$supportVersion" - compile "com.android.support:recyclerview-v7:$supportVersion" - compile "com.android.support:design:$supportVersion" - compile "com.android.support:support-v13:$supportVersion" - compile "com.android.support:cardview-v7:$supportVersion" - compile "com.android.support:preference-v7:$supportVersion" - compile "com.android.support:preference-v14:$supportVersion" - compile "com.android.support:gridlayout-v7:$supportVersion" - compile ("com.android.support:gridlayout-v7:$supportVersion") { - exclude module: 'support-v4' - } - compile 'com.android.support.constraint:constraint-layout:1.1.3' - - compile 'se.emilsjolander:stickylistheaders:2.7.0' - compile 'com.jpardogo.materialtabstrip:library:1.0.9' - compile 'info.guardianproject.trustedintents:trustedintents:0.2' - compile 'org.apache.httpcomponents:httpclient-android:4.3.5' - compile 'com.github.chrisbanes.photoview:library:1.2.3' - compile 'com.github.bumptech.glide:glide:3.7.0' - compile 'com.makeramen:roundedimageview:2.1.0' - compile 'com.pnikosis:materialish-progress:1.5' - compile project (':org.greenrobot.eventbus') - compile 'pl.tajchert:waitingdots:0.1.0' - compile 'com.melnykov:floatingactionbutton:1.3.0' - compile 'com.google.zxing:android-integration:3.1.0' - compile ('com.davemorrissey.labs:subsampling-scale-image-view:3.6.0') { - exclude group: 'com.android.support', module: 'support-annotations' - } - - compile 'com.squareup.dagger:dagger:1.2.2' - annotationProcessor 'com.squareup.dagger:dagger-compiler:1.2.2' - compileOnly 'com.squareup.dagger:dagger-compiler:1.2.2' - - compile ("com.doomonafireball.betterpickers:library:1.5.3") { - exclude group: 'com.android.support', module: 'support-v4' - } - - compile project (path: ':org.whispersystems.jobmanager') - compile project (path: ':org.whispersystems.libpastelog') - compile project (path: ':org.whispersystems.libsignal') - - compile 'com.annimon:stream:1.2.1' - compile ('com.takisoft.fix:colorpicker:0.9.1') { - exclude group: 'com.android.support', module: 'appcompat-v7' - exclude group: 'com.android.support', module: 'recyclerview-v7' - } - - compile 'com.fasterxml.jackson.core:jackson-annotations:2.8.7' - compile 'com.fasterxml.jackson.core:jackson-core:2.8.7' - compile 'com.fasterxml.jackson.core:jackson-databind:2.8.7' - compile 'com.googlecode.libphonenumber:libphonenumber:8.3.3' - - compile project (':com.amulyakhare.textdrawable') - - compile ('com.klinkerapps:android-smsmms:5.1.4') - - testCompile 'junit:junit:4.12' - testCompile 'org.assertj:assertj-core:1.7.1' - testCompile 'org.mockito:mockito-core:1.9.5' - testCompile 'org.powermock:powermock-api-mockito:1.6.1' - testCompile 'org.powermock:powermock-module-junit4:1.6.1' - testCompile 'org.powermock:powermock-module-junit4-rule:1.6.1' - testCompile 'org.powermock:powermock-classloading-xstream:1.6.1' - - androidTestCompile 'com.android.support:multidex:1.0.2' - androidTestCompile 'com.android.support:multidex-instrumentation:1.0.2' - androidTestCompile 'com.google.dexmaker:dexmaker:1.2' - androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.2' - androidTestCompile ('org.assertj:assertj-core:1.7.1') { - exclude group: 'org.hamcrest', module: 'hamcrest-core' - } - androidTestCompile ('com.squareup.assertj:assertj-android:1.0.0') { - exclude group: 'org.hamcrest', module: 'hamcrest-core' - exclude group: 'com.android.support', module: 'support-annotations' - } -} - -dependencyVerification { - verify = [ - - ] -} - -android { - compileSdkVersion 27 - buildToolsVersion '27.0.0' - useLibrary 'org.apache.http.legacy' - - defaultConfig { - versionCode 145 - versionName "0.15.16" - - minSdkVersion 14 - targetSdkVersion 26 - - vectorDrawables.useSupportLibrary = true - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - packagingOptions { - exclude 'LICENSE.txt' - exclude 'LICENSE' - exclude 'NOTICE' - exclude 'asm-license.txt' - exclude 'META-INF/LICENSE' - exclude 'META-INF/NOTICE' - } - - signingConfigs { - release - } - - buildTypes { - debug { - minifyEnabled true - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.cfg' - testProguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.cfg' - } - release { - minifyEnabled true - proguardFiles = buildTypes.debug.proguardFiles - testProguardFiles = buildTypes.debug.testProguardFiles - signingConfig signingConfigs.release - } - } - - sourceSets { - main { - manifest.srcFile 'AndroidManifest.xml' - java.srcDirs = ['src'] - resources.srcDirs = ['src'] - aidl.srcDirs = ['src'] - renderscript.srcDirs = ['src'] - res.srcDirs = ['res'] - assets.srcDirs = ['assets'] - } - androidTest { - java.srcDirs = ['test/androidTest/java'] - } - test { - java.srcDirs = ['test/unitTest/java'] - } - } - - lintOptions { - abortOnError false - } -} - -tasks.whenTaskAdded { task -> - if (task.name.equals("lint")) { - task.enabled = false - } -} - -def Properties props = new Properties() -def propFile = new File('signing.properties') - -if (propFile.canRead()){ - props.load(new FileInputStream(propFile)) - - if (props !=null && - props.containsKey('STORE_FILE') && - props.containsKey('STORE_PASSWORD') && - props.containsKey('KEY_ALIAS') && - props.containsKey('KEY_PASSWORD')) - { - android.signingConfigs.release.storeFile = file(props['STORE_FILE']) - android.signingConfigs.release.storePassword = props['STORE_PASSWORD'] - android.signingConfigs.release.keyAlias = props['KEY_ALIAS'] - android.signingConfigs.release.keyPassword = props['KEY_PASSWORD'] - } else { - println 'signing.properties found but some entries are missing' - android.buildTypes.release.signingConfig = null - } -}else { - println 'signing.properties not found' - android.buildTypes.release.signingConfig = null -} - -tasks.withType(JavaCompile){ - options.warnings = false -} +buildscript { + repositories { + maven { + url "https://repo1.maven.org/maven2" + } + // Required for the Gradle plugin + google() + jcenter() + } + dependencies { + classpath 'com.android.tools.build:gradle:3.3.2' + classpath files('libs/gradle-witness.jar') + } +} + +apply plugin: 'com.android.application' +apply plugin: 'witness' + +repositories { + maven { + url "https://repo1.maven.org/maven2/" + } + // JW: added + maven { + url "https://raw.github.com/signalapp/maven/master/shortcutbadger/releases/" + content { + includeGroupByRegex "me\\.leolin.*" + } + } + google() + jcenter() + mavenLocal() +} + +subprojects { + ext.version_number = "2.4.0" + ext.group_info = "org.whispersystems" + ext.curve25519_version = "0.3.0" +} + +dependencies { + def supportVersion = '27.0.0' + + implementation "me.leolin:ShortcutBadger:1.1.16" // JW: added + compile "com.android.support:appcompat-v7:$supportVersion" + compile "com.android.support:recyclerview-v7:$supportVersion" + compile "com.android.support:design:$supportVersion" + compile "com.android.support:support-v13:$supportVersion" + compile "com.android.support:cardview-v7:$supportVersion" + compile "com.android.support:preference-v7:$supportVersion" + compile "com.android.support:preference-v14:$supportVersion" + compile "com.android.support:gridlayout-v7:$supportVersion" + compile ("com.android.support:gridlayout-v7:$supportVersion") { + exclude module: 'support-v4' + } + compile 'com.android.support.constraint:constraint-layout:1.1.3' + + compile 'se.emilsjolander:stickylistheaders:2.7.0' + compile 'com.jpardogo.materialtabstrip:library:1.0.9' + compile 'info.guardianproject.trustedintents:trustedintents:0.2' + compile 'org.apache.httpcomponents:httpclient-android:4.3.5' + compile 'com.github.chrisbanes.photoview:library:1.2.3' + compile 'com.github.bumptech.glide:glide:3.7.0' + compile 'com.makeramen:roundedimageview:2.1.0' + compile 'com.pnikosis:materialish-progress:1.5' + compile project (':org.greenrobot.eventbus') + compile 'pl.tajchert:waitingdots:0.1.0' + compile 'com.melnykov:floatingactionbutton:1.3.0' + compile 'com.google.zxing:android-integration:3.1.0' + compile ('com.davemorrissey.labs:subsampling-scale-image-view:3.6.0') { + exclude group: 'com.android.support', module: 'support-annotations' + } + + compile 'com.squareup.dagger:dagger:1.2.2' + annotationProcessor 'com.squareup.dagger:dagger-compiler:1.2.2' + compileOnly 'com.squareup.dagger:dagger-compiler:1.2.2' + + compile ("com.doomonafireball.betterpickers:library:1.5.3") { + exclude group: 'com.android.support', module: 'support-v4' + } + + compile project (path: ':org.whispersystems.jobmanager') + compile project (path: ':org.whispersystems.libpastelog') + compile project (path: ':org.whispersystems.libsignal') + + compile 'com.annimon:stream:1.2.1' + compile ('com.takisoft.fix:colorpicker:0.9.1') { + exclude group: 'com.android.support', module: 'appcompat-v7' + exclude group: 'com.android.support', module: 'recyclerview-v7' + } + + compile 'com.fasterxml.jackson.core:jackson-annotations:2.8.7' + compile 'com.fasterxml.jackson.core:jackson-core:2.8.7' + compile 'com.fasterxml.jackson.core:jackson-databind:2.8.7' + compile 'com.googlecode.libphonenumber:libphonenumber:8.3.3' + + compile project (':com.amulyakhare.textdrawable') + + compile ('com.klinkerapps:android-smsmms:5.1.4') + + testCompile 'junit:junit:4.12' + testCompile 'org.assertj:assertj-core:1.7.1' + testCompile 'org.mockito:mockito-core:1.9.5' + testCompile 'org.powermock:powermock-api-mockito:1.6.1' + testCompile 'org.powermock:powermock-module-junit4:1.6.1' + testCompile 'org.powermock:powermock-module-junit4-rule:1.6.1' + testCompile 'org.powermock:powermock-classloading-xstream:1.6.1' + + androidTestCompile 'com.android.support:multidex:1.0.2' + androidTestCompile 'com.android.support:multidex-instrumentation:1.0.2' + androidTestCompile 'com.google.dexmaker:dexmaker:1.2' + androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.2' + androidTestCompile ('org.assertj:assertj-core:1.7.1') { + exclude group: 'org.hamcrest', module: 'hamcrest-core' + } + androidTestCompile ('com.squareup.assertj:assertj-android:1.0.0') { + exclude group: 'org.hamcrest', module: 'hamcrest-core' + exclude group: 'com.android.support', module: 'support-annotations' + } +} + +dependencyVerification { + verify = [ + + ] +} + +android { + compileSdkVersion 27 + buildToolsVersion '27.0.0' + useLibrary 'org.apache.http.legacy' + + defaultConfig { + versionCode 145 + versionName "0.15.16.0-JW" + + minSdkVersion 14 + targetSdkVersion 26 + + vectorDrawables.useSupportLibrary = true + + /* JW: Add ABI splits */ + ndk { + abiFilters 'armeabi-v7a', 'x86' + } + + splits { + abi { + enable true + reset() + include 'armeabi-v7a', 'x86' + universalApk true + } + } + } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + packagingOptions { + exclude 'LICENSE.txt' + exclude 'LICENSE' + exclude 'NOTICE' + exclude 'asm-license.txt' + exclude 'META-INF/LICENSE' + exclude 'META-INF/NOTICE' + } + + signingConfigs { + release + } + + buildTypes { + debug { + minifyEnabled true + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.cfg' + testProguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.cfg' + } + release { + minifyEnabled true + proguardFiles = buildTypes.debug.proguardFiles + testProguardFiles = buildTypes.debug.testProguardFiles + signingConfig signingConfigs.release + } + } + + sourceSets { + main { + manifest.srcFile 'AndroidManifest.xml' + java.srcDirs = ['src'] + resources.srcDirs = ['src'] + aidl.srcDirs = ['src'] + renderscript.srcDirs = ['src'] + res.srcDirs = ['res'] + assets.srcDirs = ['assets'] + } + androidTest { + java.srcDirs = ['test/androidTest/java'] + } + test { + java.srcDirs = ['test/unitTest/java'] + } + } + + lintOptions { + abortOnError false + } +} + +tasks.whenTaskAdded { task -> + if (task.name.equals("lint")) { + task.enabled = false + } +} + +def Properties props = new Properties() +def propFile = new File('signing.properties') + +if (propFile.canRead()){ + props.load(new FileInputStream(propFile)) + + if (props !=null && + props.containsKey('STORE_FILE') && + props.containsKey('STORE_PASSWORD') && + props.containsKey('KEY_ALIAS') && + props.containsKey('KEY_PASSWORD')) + { + android.signingConfigs.release.storeFile = file(props['STORE_FILE']) + android.signingConfigs.release.storePassword = props['STORE_PASSWORD'] + android.signingConfigs.release.keyAlias = props['KEY_ALIAS'] + android.signingConfigs.release.keyPassword = props['KEY_PASSWORD'] + } else { + println 'signing.properties found but some entries are missing' + android.buildTypes.release.signingConfig = null + } +}else { + println 'signing.properties not found' + android.buildTypes.release.signingConfig = null +} + +tasks.withType(JavaCompile){ + options.warnings = false +} diff --git a/res/drawable-hdpi/ic_visibility_grey600_24dp.png b/res/drawable-hdpi/ic_visibility_grey600_24dp.png new file mode 100644 index 000000000..619b076ea Binary files /dev/null and b/res/drawable-hdpi/ic_visibility_grey600_24dp.png differ diff --git a/res/drawable-hdpi/ic_visibility_off_grey600_24dp.png b/res/drawable-hdpi/ic_visibility_off_grey600_24dp.png new file mode 100644 index 000000000..e6bddf2ef Binary files /dev/null and b/res/drawable-hdpi/ic_visibility_off_grey600_24dp.png differ diff --git a/res/drawable-hdpi/ic_visibility_off_white_24dp.png b/res/drawable-hdpi/ic_visibility_off_white_24dp.png new file mode 100644 index 000000000..e03a5d234 Binary files /dev/null and b/res/drawable-hdpi/ic_visibility_off_white_24dp.png differ diff --git a/res/drawable-hdpi/ic_visibility_white_24dp.png b/res/drawable-hdpi/ic_visibility_white_24dp.png new file mode 100644 index 000000000..d531d666f Binary files /dev/null and b/res/drawable-hdpi/ic_visibility_white_24dp.png differ diff --git a/res/drawable-mdpi/ic_visibility_grey600_24dp.png b/res/drawable-mdpi/ic_visibility_grey600_24dp.png new file mode 100644 index 000000000..9d554fe3d Binary files /dev/null and b/res/drawable-mdpi/ic_visibility_grey600_24dp.png differ diff --git a/res/drawable-mdpi/ic_visibility_off_grey600_24dp.png b/res/drawable-mdpi/ic_visibility_off_grey600_24dp.png new file mode 100644 index 000000000..08dcac59f Binary files /dev/null and b/res/drawable-mdpi/ic_visibility_off_grey600_24dp.png differ diff --git a/res/drawable-mdpi/ic_visibility_off_white_24dp.png b/res/drawable-mdpi/ic_visibility_off_white_24dp.png new file mode 100644 index 000000000..fb21efe6d Binary files /dev/null and b/res/drawable-mdpi/ic_visibility_off_white_24dp.png differ diff --git a/res/drawable-mdpi/ic_visibility_white_24dp.png b/res/drawable-mdpi/ic_visibility_white_24dp.png new file mode 100644 index 000000000..0e8e507f2 Binary files /dev/null and b/res/drawable-mdpi/ic_visibility_white_24dp.png differ diff --git a/res/drawable-xhdpi/ic_visibility_grey600_24dp.png b/res/drawable-xhdpi/ic_visibility_grey600_24dp.png new file mode 100644 index 000000000..b121c9ae2 Binary files /dev/null and b/res/drawable-xhdpi/ic_visibility_grey600_24dp.png differ diff --git a/res/drawable-xhdpi/ic_visibility_off_grey600_24dp.png b/res/drawable-xhdpi/ic_visibility_off_grey600_24dp.png new file mode 100644 index 000000000..a666da5cd Binary files /dev/null and b/res/drawable-xhdpi/ic_visibility_off_grey600_24dp.png differ diff --git a/res/drawable-xhdpi/ic_visibility_off_white_24dp.png b/res/drawable-xhdpi/ic_visibility_off_white_24dp.png new file mode 100644 index 000000000..03d0e65b1 Binary files /dev/null and b/res/drawable-xhdpi/ic_visibility_off_white_24dp.png differ diff --git a/res/drawable-xhdpi/ic_visibility_white_24dp.png b/res/drawable-xhdpi/ic_visibility_white_24dp.png new file mode 100644 index 000000000..a42cab710 Binary files /dev/null and b/res/drawable-xhdpi/ic_visibility_white_24dp.png differ diff --git a/res/drawable-xxhdpi/ic_visibility_grey600_24dp.png b/res/drawable-xxhdpi/ic_visibility_grey600_24dp.png new file mode 100644 index 000000000..503497dda Binary files /dev/null and b/res/drawable-xxhdpi/ic_visibility_grey600_24dp.png differ diff --git a/res/drawable-xxhdpi/ic_visibility_off_grey600_24dp.png b/res/drawable-xxhdpi/ic_visibility_off_grey600_24dp.png new file mode 100644 index 000000000..63914559f Binary files /dev/null and b/res/drawable-xxhdpi/ic_visibility_off_grey600_24dp.png differ diff --git a/res/drawable-xxhdpi/ic_visibility_off_white_24dp.png b/res/drawable-xxhdpi/ic_visibility_off_white_24dp.png new file mode 100644 index 000000000..f88d24ff5 Binary files /dev/null and b/res/drawable-xxhdpi/ic_visibility_off_white_24dp.png differ diff --git a/res/drawable-xxhdpi/ic_visibility_white_24dp.png b/res/drawable-xxhdpi/ic_visibility_white_24dp.png new file mode 100644 index 000000000..987af79f8 Binary files /dev/null and b/res/drawable-xxhdpi/ic_visibility_white_24dp.png differ diff --git a/res/drawable/info_round.xml b/res/drawable/info_round.xml index 668eaf3be..044c563d5 100644 --- a/res/drawable/info_round.xml +++ b/res/drawable/info_round.xml @@ -1,16 +1,16 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/res/layout/prompt_passphrase_activity.xml b/res/layout/prompt_passphrase_activity.xml index 0828f44f2..52215ae80 100644 --- a/res/layout/prompt_passphrase_activity.xml +++ b/res/layout/prompt_passphrase_activity.xml @@ -32,7 +32,40 @@ android:layout_marginRight="50dp" android:singleLine="true" android:paddingLeft="10dp" - android:paddingRight="10dp"/> + android:paddingRight="40dp"/> + + + + + + + + + + + diff --git a/res/values/colors.xml b/res/values/colors.xml index ce85dc422..69aa55c50 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -1,48 +1,51 @@ - - - #ff2090ea - #ff1c7ac5 - #552090ea - #882090ea - - #ffffffff - #ff000000 - #ffeeeeee - #ffdddddd - #ffe0e0e0 - #ffababab - #ffcccccc - #ffbbbbbb - #ff808080 - #ff595959 - #ff4d4d4d - #ff383838 - #ff111111 - - #7F111111 - - #32000000 - - @color/gray5 - #ffffffff - #ff000000 - #ff333333 - - #15000000 - #22ffffff - - #ff33b5e5 - - #ff111111 - #ff1f1f1f - #400099cc - #33ffffff - #66ffffff - - #ffeeeeee - #ff333333 - #ffd5d5d5 - #ff222222 - #400099cc - #40ffffff - + + + + #ff7365ad + #ff7365ad + #b9b2da + #9575cd + + #ffffffff + #ff000000 + #ffeeeeee + #ffdddddd + #ffe0e0e0 + #ffababab + #ffcccccc + #ffbbbbbb + #ff808080 + #ff595959 + #ff4d4d4d + #ff383838 + #ff111111 + + #7F111111 + + #32000000 + + @color/gray5 + #ffffffff + #ff000000 + #ff333333 + + #15000000 + #22ffffff + + + #7c4dff + + #ff111111 + #ff1f1f1f + #400099cc + #33ffffff + #66ffffff + + #ffeeeeee + #ff333333 + #ffd5d5d5 + #ff222222 + + #b39ddb + #40ffffff + diff --git a/res/values/themes.xml b/res/values/themes.xml index 8f71da661..cfc793160 100644 --- a/res/values/themes.xml +++ b/res/values/themes.xml @@ -48,6 +48,10 @@ #55000000 @drawable/ic_arrow_forward_light @drawable/lockscreen_watermark_light + + @color/gray5 + @drawable/ic_visibility_grey600_24dp + @drawable/ic_visibility_off_grey600_24dp