summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2014-03-27 00:15:06 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-03-27 00:15:06 +0000
commit6503dc1a70659eaefcfbe6a432e1d4b86254d1ab (patch)
tree4b966f61154fba7a7e99185af0011de56408163e
parent46f2a32ee196c3e9a0b3328e12f274bfdc8e340d (diff)
parent6a15ad7de372e6c21a00dd40a6ae089260cfaedf (diff)
am 6a15ad7d: DO NOT MERGE Fix crash when recreating activity and receiving dial intent
* commit '6a15ad7de372e6c21a00dd40a6ae089260cfaedf': DO NOT MERGE Fix crash when recreating activity and receiving dial intent
-rw-r--r--src/com/android/dialer/DialtactsActivity.java14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java
index b78a7bc62..2e087634d 100644
--- a/src/com/android/dialer/DialtactsActivity.java
+++ b/src/com/android/dialer/DialtactsActivity.java
@@ -336,7 +336,7 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
}
});
-
+ setupFakeActionBarItems();
prepareSearchView();
if (UI.FILTER_CONTACTS_ACTION.equals(intent.getAction())
@@ -353,7 +353,6 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
@Override
protected void onResume() {
super.onResume();
- setupFakeActionBarItems();
if (mFirstLaunch) {
displayFragment(getIntent());
} else if (!phoneIsInUse() && mInCallDialpadUp) {
@@ -552,6 +551,11 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
ft.commit();
mDialButton.setVisibility(shouldShowOnscreenDialButton() ? View.VISIBLE : View.GONE);
mDialpadButton.setVisibility(View.GONE);
+
+ if (mDialpadOverflowMenu == null) {
+ mDialpadOverflowMenu = mDialpadFragment.buildOptionsMenu(mMenuButton);
+ }
+
mMenuButton.setOnTouchListener(mDialpadOverflowMenu.getDragToOpenListener());
}
@@ -680,17 +684,12 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
if (mOverflowMenu == null) {
mOverflowMenu = buildOptionsMenu(mMenuButton);
}
- if (mDialpadOverflowMenu == null) {
- mDialpadOverflowMenu = mDialpadFragment.buildOptionsMenu(mMenuButton);
- }
- // Initial state is with dialpad fragment not shown
mMenuButton.setOnTouchListener(mOverflowMenu.getDragToOpenListener());
}
mFakeActionBar = findViewById(R.id.fake_action_bar);
mCallHistoryButton = findViewById(R.id.call_history_button);
- // mCallHistoryButton.setMinimumWidth(fakeMenuItemWidth);
mCallHistoryButton.setOnClickListener(this);
mDialButton = findViewById(R.id.dial_button);
@@ -698,7 +697,6 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
mDialButton.setOnLongClickListener(this);
mDialpadButton = findViewById(R.id.dialpad_button);
- // DialpadButton.setMinimumWidth(fakeMenuItemWidth);
mDialpadButton.setOnClickListener(this);
}