diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 07885c2fb..b1091ca8e 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -42,13 +42,6 @@ android:largeHeap="true" tools:ignore="GoogleAppIndexingWarning"> - - - - diff --git a/build.gradle b/build.gradle index 180fefda9..52bf9cb1a 100644 --- a/build.gradle +++ b/build.gradle @@ -25,28 +25,12 @@ repositories { url "https://repo1.maven.org/maven2/" } maven { - url "https://raw.github.com/signalapp/maven/master/preferencefragment/releases/" - } - maven { - url "https://raw.github.com/signalapp/maven/master/smil/releases/" - } - maven { - url "https://raw.github.com/signalapp/maven/master/photoview/releases/" - } - maven { - url "https://raw.github.com/signalapp/maven/master/shortcutbadger/releases/" - } - maven { - url "https://raw.github.com/signalapp/maven/master/circular-progress-button/releases/" + url "https://jitpack.io" } maven { url "https://maven.google.com" } - maven { // textdrawable - url 'https://dl.bintray.com/amulyakhare/maven' - } jcenter() - mavenLocal() maven { url 'https://maven.google.com/' name 'Google' @@ -67,10 +51,6 @@ dependencies { compile 'android.arch.lifecycle:extensions:1.1.1' compile 'android.arch.lifecycle:common-java8:1.1.1' - compile 'com.google.android.gms:play-services-gcm:9.6.1' - compile 'com.google.android.gms:play-services-maps:9.6.1' - compile 'com.google.android.gms:play-services-places:9.6.1' - compile 'com.google.android.exoplayer:exoplayer:r2.3.1' compile 'com.fasterxml.jackson.core:jackson-databind:2.9.5' @@ -102,7 +82,6 @@ dependencies { exclude group: 'com.android.support', module: 'recyclerview-v7' } compile 'com.codewaves.stickyheadergrid:stickyheadergrid:0.9.4' - compile 'com.github.dmytrodanylyk.circular-progress-button:library:1.1.3-S2' testCompile 'junit:junit:4.12' testCompile 'org.assertj:assertj-core:1.7.1' @@ -134,14 +113,9 @@ dependencyVerification { 'com.android.support:exifinterface:0e7cd526c4468895cd8549def46b3d33c8bcfb1ae4830569898d8c7326b15bb2', 'android.arch.lifecycle:extensions:429426b2feec2245ffc5e75b3b5309bedb36159cf06dc71843ae43526ac289b6', 'android.arch.lifecycle:common-java8:7078b5c8ccb94203df9cc2a463c69cf0021596e6cf966d78fbfd697aaafe0630', - 'com.google.android.gms:play-services-gcm:312e61253a236f2d9b750b9c04fc92fd190d23b0b2755c99de6ce4a28b259dae', - 'com.google.android.gms:play-services-places:abf3a4a3b146ec7e6e753be62775e512868cf37d6f88ffe2d81167b33b57132b', - 'com.google.android.gms:play-services-maps:45e8021e7ddac4a44a82a0e9698991389ded3023d35c58f38dbd86d54211ec0e', 'com.google.android.exoplayer:exoplayer:955085aa611a8f7cf6c61b88ae03d1a392f4ad94c9bfbc153f3dedb9ffb14718', - 'me.leolin:ShortcutBadger:e3cb3e7625892129b0c92dd5e4bc649faffdd526d5af26d9c45ee31ff8851774', 'se.emilsjolander:stickylistheaders:a08ca948aa6b220f09d82f16bbbac395f6b78897e9eeac6a9f0b0ba755928eeb', 'com.jpardogo.materialtabstrip:library:c6ef812fba4f74be7dc4a905faa4c2908cba261a94c13d4f96d5e67e4aad4aaa', - 'com.github.chrisbanes:PhotoView:ed06775308da260e1fd86d1d3288988fcd3d80db24ce0d7c9fcfedc39e622292', 'com.github.bumptech.glide:glide:997de7ac95be6c944d3b8cbe13de11307736ea45451c1b09a6cec7c328ead59f', 'com.makeramen:roundedimageview:1f5a1865796b308c6cdd114acc6e78408b110f0a62fc63553278fbeacd489cd1', 'com.soundcloud.android:android-crop:ffd4b973cf6e97f7d64118a0dc088df50e9066fd5634fe6911dd0c0c5d346177', @@ -151,11 +125,6 @@ dependencyVerification { 'cn.carbswang.android:NumberPickerView:18b3c316d62c7c277978a8d4ed57a5b8f4e943762264960f579a8a549c756729', 'com.annimon:stream:5da6e2e3e0551d61a3ea7014f04312276549e3dd739cf637996e4cf43c5535b9', 'com.takisoft.fix:colorpicker:f5d0dbabe406a1800498ca9c1faf34db36e021d8488bf10360f29961fe3ab0d1', - 'com.github.dmytrodanylyk.circular-progress-button:library:8dc6a29a5a8db7b2ad5a9a7fda1dc9ae0893f4c8f0545732b2c63854ea693e8e', - 'com.google.android.gms:play-services-iid:54e919f9957b8b7820da7ee9b83471d00d0cac1cf08ddea8b5b41aea80bb1a70', - 'com.google.android.gms:play-services-base:0ca636a8fc9a5af45e607cdcd61783bf5d561cbbb0f862021ce69606eee5ad49', - 'com.google.android.gms:play-services-tasks:69ec265168e601d0203d04cd42e34bb019b2f029aa1e16fabd38a5153eea2086', - 'com.google.android.gms:play-services-basement:95dd882c5ffba15b9a99de3fefb05d3a01946623af67454ca00055d222f85a8d', 'com.android.support:support-v4:1b2b37169fcccfef5e563d273749e3792decdce9818bc17932403a2363f537b4', 'com.android.support:support-fragment:e4358388022a2205777575a7251fe357334658e4123d5d6e3b082f5899d9b011', 'com.android.support:animated-vector-drawable:5b117a2c13a898c2a3c84c480d64edcfac2ef720aa9b742c29249fac774ffc48', @@ -190,7 +159,7 @@ android { defaultConfig { versionCode 537 versionName "0.100.0" - applicationId "com.b44t.messenger.beta" + applicationId "com.b44t.messenger" minSdkVersion 14 targetSdkVersion 25 @@ -225,17 +194,19 @@ android { signingConfigs { signingConfigs { debug { - def debugKeystore = file("tools/debug.keystore") + // add `DC_DEBUG_STORE_FILE=/path/to/debug.keystore` to `~/.gradle/gradle.properties` + def debugKeystore = file(DC_DEBUG_STORE_FILE) if (debugKeystore.exists()) { storeFile debugKeystore } } release { - def debugKeystore = file("tools/debug.keystore") - if (debugKeystore.exists()) { - storeFile debugKeystore - } - } + // TODO: add a key for release versions, needed esp. for Google Play + // see https://github.com/deltachat/deltachat-android/issues/651 + storeFile file(DC_RELEASE_STORE_FILE) + storePassword DC_RELEASE_STORE_PASSWORD + keyAlias DC_RELEASE_KEY_ALIAS + keyPassword DC_RELEASE_KEY_PASSWORD } } release } @@ -244,7 +215,6 @@ android { debug { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), - 'proguard-google-play-services.pro', 'proguard-jackson.pro', 'proguard-appcompat-v7.pro', 'proguard-rounded-image-view.pro', @@ -255,23 +225,19 @@ android { 'proguard.cfg' testProguardFiles 'proguard-automation.pro', 'proguard.cfg' + applicationIdSuffix ".beta" } release { minifyEnabled true proguardFiles = buildTypes.debug.proguardFiles signingConfig signingConfigs.release + applicationIdSuffix ".beta" } } productFlavors { - play { + fat { dimension "none" - buildConfigField "boolean", "PLAY_STORE_DISABLED", "false" - } - - website { - dimension "none" - buildConfigField "boolean", "PLAY_STORE_DISABLED", "true" } } @@ -362,29 +328,3 @@ def getLastCommitTimestamp() { return os.toString() + "000" } } - -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 -} - diff --git a/proguard-google-play-services.pro b/proguard-google-play-services.pro deleted file mode 100644 index ae70fc4e4..000000000 --- a/proguard-google-play-services.pro +++ /dev/null @@ -1,19 +0,0 @@ -## Google Play Services 4.3.23 specific rules ## -## https://developer.android.com/google/play-services/setup.html#Proguard ## - --keep class * extends java.util.ListResourceBundle { - protected Object[][] getContents(); -} - --keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable { - public static final *** NULL; -} - --keepnames @com.google.android.gms.common.annotation.KeepName class * --keepclassmembernames class * { - @com.google.android.gms.common.annotation.KeepName *; -} - --keepnames class * implements android.os.Parcelable { - public static final ** CREATOR; -} \ No newline at end of file diff --git a/res/layout/group_create_activity.xml b/res/layout/group_create_activity.xml index 9e8d77295..a4a92d12b 100644 --- a/res/layout/group_create_activity.xml +++ b/res/layout/group_create_activity.xml @@ -73,7 +73,7 @@ android:layout_height="wrap_content" android:orientation="horizontal"> - + android:text="@string/group_add_members"/> - + android:text="@string/qrshow_title"/> diff --git a/res/layout/registration_activity.xml b/res/layout/registration_activity.xml index 0cc2d337e..6c11f29ee 100644 --- a/res/layout/registration_activity.xml +++ b/res/layout/registration_activity.xml @@ -324,34 +324,6 @@ app:layout_constraintStart_toStartOf="@id/guideline_root_start" app:layout_constraintTop_toBottomOf="@id/smtp_security_label" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/res/layout/welcome_activity.xml b/res/layout/welcome_activity.xml index 83d76c083..d90ad3bcf 100644 --- a/res/layout/welcome_activity.xml +++ b/res/layout/welcome_activity.xml @@ -29,7 +29,7 @@ android:layout_height="32dp" app:layout_constraintBottom_toTopOf="@id/skip_button"/> - diff --git a/src/org/thoughtcrime/securesms/ApplicationContext.java b/src/org/thoughtcrime/securesms/ApplicationContext.java index 2ea49c6e0..490b79296 100644 --- a/src/org/thoughtcrime/securesms/ApplicationContext.java +++ b/src/org/thoughtcrime/securesms/ApplicationContext.java @@ -69,7 +69,6 @@ public class ApplicationContext extends Application implements DefaultLifecycleO initializeRandomNumberFix(); initializeLogging(); initializeJobManager(); - initializePeriodicTasks(); initializeIncomingMessageNotifier(); ProcessLifecycleOwner.get().getLifecycle().addObserver(this); } @@ -131,14 +130,4 @@ public class ApplicationContext extends Application implements DefaultLifecycleO .withConsumerThreads(5) .build(); } - - private void initializePeriodicTasks() { - //DirectoryRefreshListener.schedule(this); -- directory in this sense seems to be the address book - //LocalBackupListener.schedule(this); -- disabled for now, there is no automatic backup; maybe the implicit IMAP backup is sufficient - - // disabled for now, Delta Chat has no update url; maybe f-droid is sufficient - //if (BuildConfig.PLAY_STORE_DISABLED) { - // UpdateApkRefreshListener.schedule(this); - //} - } } diff --git a/src/org/thoughtcrime/securesms/ConversationActivity.java b/src/org/thoughtcrime/securesms/ConversationActivity.java index 623e4116f..73b3abb9b 100644 --- a/src/org/thoughtcrime/securesms/ConversationActivity.java +++ b/src/org/thoughtcrime/securesms/ConversationActivity.java @@ -63,7 +63,6 @@ import com.b44t.messenger.DcContact; import com.b44t.messenger.DcContext; import com.b44t.messenger.DcEventCenter; import com.b44t.messenger.DcMsg; -import com.google.android.gms.location.places.ui.PlacePicker; import org.thoughtcrime.securesms.attachments.Attachment; import org.thoughtcrime.securesms.audio.AudioRecorder; @@ -369,8 +368,10 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity } break; case PICK_LOCATION: + /* SignalPlace place = new SignalPlace(PlacePicker.getPlace(data, this)); attachmentManager.setLocation(place, getCurrentMediaConstraints()); + */ break; case ScribbleActivity.SCRIBBLE_REQUEST_CODE: setMedia(data.getData(), MediaType.IMAGE); diff --git a/src/org/thoughtcrime/securesms/LogViewFragment.java b/src/org/thoughtcrime/securesms/LogViewFragment.java index ded3a60f3..3d51a3460 100644 --- a/src/org/thoughtcrime/securesms/LogViewFragment.java +++ b/src/org/thoughtcrime/securesms/LogViewFragment.java @@ -179,6 +179,9 @@ public class LogViewFragment extends Fragment { builder.append(pm.getApplicationLabel(pm.getApplicationInfo(context.getPackageName(), 0))) .append(" ") .append(pm.getPackageInfo(context.getPackageName(), 0).versionName) + .append("-") + .append(BuildConfig.FLAVOR) + .append(BuildConfig.DEBUG? "-debug" : "") .append("\n"); } catch (PackageManager.NameNotFoundException nnfe) { builder.append("Unknown\n"); diff --git a/src/org/thoughtcrime/securesms/RegistrationActivity.java b/src/org/thoughtcrime/securesms/RegistrationActivity.java index 8c2d5e60c..6cbbedfda 100644 --- a/src/org/thoughtcrime/securesms/RegistrationActivity.java +++ b/src/org/thoughtcrime/securesms/RegistrationActivity.java @@ -22,7 +22,6 @@ import android.widget.Toast; import com.b44t.messenger.DcContext; import com.b44t.messenger.DcEventCenter; -import com.dd.CircularProgressButton; import org.thoughtcrime.securesms.connect.ApplicationDcContext; import org.thoughtcrime.securesms.connect.DcHelper; @@ -114,7 +113,6 @@ public class RegistrationActivity extends BaseActionBarActivity implements DcEve passwordInput = findViewById(R.id.password_text); advancedGroup = findViewById(R.id.advanced_group); advancedIcon = findViewById(R.id.advanced_icon); -// CircularProgressButton loginButton = findViewById(R.id.register_button); TextView advancedTextView = findViewById(R.id.advanced_text); TextInputEditText imapServerInput = findViewById(R.id.imap_server_text); TextInputEditText imapPortInput = findViewById(R.id.imap_port_text); diff --git a/src/org/thoughtcrime/securesms/components/location/SignalMapView.java b/src/org/thoughtcrime/securesms/components/location/SignalMapView.java index 067af7bb8..b3ac9fcd3 100644 --- a/src/org/thoughtcrime/securesms/components/location/SignalMapView.java +++ b/src/org/thoughtcrime/securesms/components/location/SignalMapView.java @@ -12,12 +12,14 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; +/* import com.google.android.gms.location.places.Place; import com.google.android.gms.maps.CameraUpdateFactory; import com.google.android.gms.maps.GoogleMap; import com.google.android.gms.maps.MapView; import com.google.android.gms.maps.OnMapReadyCallback; import com.google.android.gms.maps.model.MarkerOptions; +*/ import org.thoughtcrime.securesms.R; import org.thoughtcrime.securesms.util.ViewUtil; @@ -26,7 +28,7 @@ import org.thoughtcrime.securesms.util.concurrent.SettableFuture; public class SignalMapView extends LinearLayout { - private MapView mapView; + //private MapView mapView; private ImageView imageView; private TextView textView; @@ -49,13 +51,14 @@ public class SignalMapView extends LinearLayout { setOrientation(LinearLayout.VERTICAL); LayoutInflater.from(context).inflate(R.layout.signal_map_view, this, true); - this.mapView = ViewUtil.findById(this, R.id.map_view); + //this.mapView = ViewUtil.findById(this, R.id.map_view); this.imageView = ViewUtil.findById(this, R.id.image_view); this.textView = ViewUtil.findById(this, R.id.address_view); } public ListenableFuture display(final SignalPlace place) { final SettableFuture future = new SettableFuture<>(); + /* this.mapView.onCreate(null); this.mapView.onResume(); @@ -91,6 +94,7 @@ public class SignalMapView extends LinearLayout { }); this.textView.setText(place.getDescription()); + */ return future; } diff --git a/src/org/thoughtcrime/securesms/components/location/SignalPlace.java b/src/org/thoughtcrime/securesms/components/location/SignalPlace.java index 3b8566cdf..cf0d691b5 100644 --- a/src/org/thoughtcrime/securesms/components/location/SignalPlace.java +++ b/src/org/thoughtcrime/securesms/components/location/SignalPlace.java @@ -8,8 +8,8 @@ import android.util.Log; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; -import com.google.android.gms.location.places.Place; -import com.google.android.gms.maps.model.LatLng; +//import com.google.android.gms.location.places.Place; +//import com.google.android.gms.maps.model.LatLng; import org.thoughtcrime.securesms.util.JsonUtils; @@ -32,19 +32,23 @@ public class SignalPlace { @JsonProperty private double longitude; - public SignalPlace(Place place) { + public SignalPlace(Object place) { + /* this.name = place.getName(); this.address = place.getAddress(); this.latitude = place.getLatLng().latitude; this.longitude = place.getLatLng().longitude; + */ } public SignalPlace() {} + /* @JsonIgnore public LatLng getLatLong() { return new LatLng(latitude, longitude); } + */ @JsonIgnore public String getDescription() { diff --git a/src/org/thoughtcrime/securesms/mms/AttachmentManager.java b/src/org/thoughtcrime/securesms/mms/AttachmentManager.java index b4b33e297..d8f4a3f5e 100644 --- a/src/org/thoughtcrime/securesms/mms/AttachmentManager.java +++ b/src/org/thoughtcrime/securesms/mms/AttachmentManager.java @@ -38,10 +38,6 @@ import android.util.Pair; import android.view.View; import android.widget.Toast; -import com.google.android.gms.common.GooglePlayServicesNotAvailableException; -import com.google.android.gms.common.GooglePlayServicesRepairableException; -import com.google.android.gms.location.places.ui.PlacePicker; - import org.thoughtcrime.securesms.MediaPreviewActivity; import org.thoughtcrime.securesms.R; import org.thoughtcrime.securesms.attachments.Attachment; @@ -374,6 +370,7 @@ public class AttachmentManager { } public static void selectLocation(Activity activity, int requestCode) { + /* Permissions.with(activity) .request(Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION) .ifNecessary() @@ -386,6 +383,7 @@ public class AttachmentManager { } }) .execute(); + */ } private @Nullable Uri getSlideUri() {