diff --git a/app/build.gradle b/app/build.gradle index 1fa10ce8d..f4b8444da 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -15,8 +15,8 @@ android { targetSdkVersion 27 testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" - versionCode 41 - versionName "2.0.1beta2" + versionCode 44 + versionName "2.1.0beta1" flavorDimensions "default" diff --git a/app/src/main/java/com/nextcloud/talk/controllers/ChatController.java b/app/src/main/java/com/nextcloud/talk/controllers/ChatController.java index 8231eb1b2..aca6016f3 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/ChatController.java +++ b/app/src/main/java/com/nextcloud/talk/controllers/ChatController.java @@ -831,10 +831,14 @@ public class ChatController extends BaseController implements MessagesListAdapte bundle.putBoolean(BundleKeys.KEY_CALL_VOICE_ONLY, true); } - Intent callIntent = new Intent(getActivity(), MagicCallActivity.class); - callIntent.putExtras(bundle); + if (getActivity() != null) { + Intent callIntent = new Intent(getActivity(), MagicCallActivity.class); + callIntent.putExtras(bundle); - return callIntent; + return callIntent; + } else { + return null; + } } else { return null; } diff --git a/app/src/main/java/com/nextcloud/talk/controllers/ContactsController.java b/app/src/main/java/com/nextcloud/talk/controllers/ContactsController.java index 8227bb909..06c7478b8 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/ContactsController.java +++ b/app/src/main/java/com/nextcloud/talk/controllers/ContactsController.java @@ -571,8 +571,9 @@ public class ContactsController extends BaseController implements SearchView.OnQ } searchItem.setVisible(newUserItemList.size() > 0); - swipeRefreshLayout.setRefreshing(false); - + if (swipeRefreshLayout != null) { + swipeRefreshLayout.setRefreshing(false); + } if (isNewConversationView) { checkAndHandleBottomButtons(); @@ -604,10 +605,10 @@ public class ContactsController extends BaseController implements SearchView.OnQ break; } - swipeRefreshLayout.setRefreshing(false); - + if (swipeRefreshLayout != null) { + swipeRefreshLayout.setRefreshing(false); + } } - ; dispose(contactsQueryDisposable); @@ -615,7 +616,9 @@ public class ContactsController extends BaseController implements SearchView.OnQ @Override public void onComplete() { - swipeRefreshLayout.setRefreshing(false); + if (swipeRefreshLayout != null) { + swipeRefreshLayout.setRefreshing(false); + } dispose(contactsQueryDisposable); alreadyFetching = false; diff --git a/app/src/main/java/com/nextcloud/talk/receivers/PackageReplacedReceiver.java b/app/src/main/java/com/nextcloud/talk/receivers/PackageReplacedReceiver.java index 159b5ea7c..db87ff827 100644 --- a/app/src/main/java/com/nextcloud/talk/receivers/PackageReplacedReceiver.java +++ b/app/src/main/java/com/nextcloud/talk/receivers/PackageReplacedReceiver.java @@ -60,7 +60,7 @@ public class PackageReplacedReceiver extends BroadcastReceiver { intent.getAction().equals("android.intent.action.MY_PACKAGE_REPLACED")) { try { PackageInfo packageInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0); - if (packageInfo.versionCode > 42 && Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + if (packageInfo.versionCode > 43 && Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context .NOTIFICATION_SERVICE);