diff options
Diffstat (limited to 'src/main/java/de/pixart')
-rw-r--r-- | src/main/java/de/pixart/messenger/services/ExportBackupService.java | 5 | ||||
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ConversationFragment.java | 10 |
2 files changed, 6 insertions, 9 deletions
diff --git a/src/main/java/de/pixart/messenger/services/ExportBackupService.java b/src/main/java/de/pixart/messenger/services/ExportBackupService.java index ade2ca685..6bb10544f 100644 --- a/src/main/java/de/pixart/messenger/services/ExportBackupService.java +++ b/src/main/java/de/pixart/messenger/services/ExportBackupService.java @@ -233,7 +233,10 @@ public class ExportBackupService extends Service { public int onStartCommand(Intent intent, int flags, int startId) { if (running.compareAndSet(false, true)) { new Thread(() -> { - final Bundle extras = intent.getExtras(); + Bundle extras = null; + if (intent != null && intent.getExtras() != null) { + extras = intent.getExtras(); + } boolean notify = false; if (extras != null && extras.containsKey("NOTIFY_ON_BACKUP_COMPLETE")) { notify = extras.getBoolean("NOTIFY_ON_BACKUP_COMPLETE"); diff --git a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java index 98ad29684..67b7392a6 100644 --- a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java +++ b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java @@ -456,13 +456,7 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke } }; - private OnClickListener mRecordVoiceButtonListener = new OnClickListener() { - - @Override - public void onClick(View v) { - attachFile(ATTACHMENT_CHOICE_RECORD_VOICE); - } - }; + private OnClickListener mRecordVoiceButtonListener = v -> attachFile(ATTACHMENT_CHOICE_RECORD_VOICE); private OnClickListener mSendButtonListener = new OnClickListener() { @@ -1122,7 +1116,7 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke menuArchiveChat.setTitle(R.string.action_end_conversation); } Fragment secondaryFragment = getFragmentManager().findFragmentById(R.id.secondary_fragment); - if (secondaryFragment != null && secondaryFragment instanceof ConversationFragment) { + if (secondaryFragment instanceof ConversationFragment) { if (conversation.getMode() == Conversation.MODE_MULTI) { menuGroupDetails.setTitle(conversation.getMucOptions().isPrivateAndNonAnonymous() ? R.string.action_group_details : R.string.channel_details); menuGroupDetails.setVisible(true); |