Prevent crash

pull/147/head
M66B 7 years ago
parent 7a3fd24c23
commit 8eda63c4ea

@ -1190,26 +1190,28 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
BroadcastReceiver receiver = new BroadcastReceiver() { BroadcastReceiver receiver = new BroadcastReceiver() {
@Override @Override
public void onReceive(Context context, Intent intent) { public void onReceive(Context context, Intent intent) {
String action = intent.getAction(); if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.RESUMED)) {
String action = intent.getAction();
if (ACTION_VIEW_MESSAGES.equals(action)) if (ACTION_VIEW_MESSAGES.equals(action))
onViewMessages(intent); onViewMessages(intent);
else if (ACTION_VIEW_THREAD.equals(action)) else if (ACTION_VIEW_THREAD.equals(action))
onViewThread(intent); onViewThread(intent);
else if (ACTION_VIEW_FULL.equals(action)) else if (ACTION_VIEW_FULL.equals(action))
onViewFull(intent); onViewFull(intent);
else if (ACTION_EDIT_FOLDER.equals(action)) else if (ACTION_EDIT_FOLDER.equals(action))
onEditFolder(intent); onEditFolder(intent);
else if (ACTION_EDIT_ANSWER.equals(action)) else if (ACTION_EDIT_ANSWER.equals(action))
onEditAnswer(intent); onEditAnswer(intent);
else if (ACTION_STORE_ATTACHMENT.equals(action)) else if (ACTION_STORE_ATTACHMENT.equals(action))
onStoreAttachment(intent); onStoreAttachment(intent);
else if (ACTION_DECRYPT.equals(action)) else if (ACTION_DECRYPT.equals(action))
onDecrypt(intent); onDecrypt(intent);
else if (ACTION_SHOW_PRO.equals(action)) else if (ACTION_SHOW_PRO.equals(action))
onShowPro(intent); onShowPro(intent);
else if (ACTION_SHOW_LEGEND.equals(action)) else if (ACTION_SHOW_LEGEND.equals(action))
onMenuLegend(); onMenuLegend();
}
} }
}; };

Loading…
Cancel
Save