Add extra to jump to DialtactsActivity tab.
+ For the voicemail notification, jump to voicemail tab.
+ Jump through some hoops to handle this properly when waiting for the voicemail
status to be retrieved.
Bug: 21120186
Change-Id: I5a82f3ecafadb45246e6637e8275a09f78cc188a
diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java
index fc0f1fb..b77e910 100644
--- a/src/com/android/dialer/DialtactsActivity.java
+++ b/src/com/android/dialer/DialtactsActivity.java
@@ -133,6 +133,7 @@
* Just for backward compatibility. Should behave as same as {@link Intent#ACTION_DIAL}.
*/
private static final String ACTION_TOUCH_DIALER = "com.android.phone.action.TOUCH_DIALER";
+ public static final String EXTRA_SHOW_TAB = "EXTRA_SHOW_TAB";
private static final int ACTIVITY_REQUEST_CODE_VOICE_SEARCH = 1;
@@ -539,6 +540,7 @@
}
mIsRestarting = false;
}
+
prepareVoiceSearchButton();
mDialerDatabaseHelper.startSmartDialUpdateThread();
mFloatingActionButtonController.align(getFabAlignment(), false /* animate */);
@@ -903,6 +905,11 @@
mStateSaved = false;
displayFragment(newIntent);
+ if (newIntent.hasExtra(EXTRA_SHOW_TAB)) {
+ mListsFragment.showTab(
+ getIntent().getIntExtra(EXTRA_SHOW_TAB, mListsFragment.TAB_INDEX_SPEED_DIAL));
+ }
+
invalidateOptionsMenu();
}