diff options
author | Chiao Cheng <chiaocheng@google.com> | 2013-10-07 17:46:25 -0700 |
---|---|---|
committer | Chiao Cheng <chiaocheng@google.com> | 2013-10-08 14:49:34 -0700 |
commit | adb742ca30da01a3f09be5551f0844f170eaa5d8 (patch) | |
tree | f4882f3a4947cb5a24a48e65e8fe88bd761f1dda /src/com/android/dialer/CallDetailActivity.java | |
parent | 524bc0b58afabd947cfaa4c13c28fa9660f398da (diff) |
Do not use implicit intent to up nav to call log.
Implemented according to developer docs:
http://developer.android.com/training/implementing-navigation/ancestral.html
Bug: 11116403
Change-Id: I02dd4900fbda921ddeaaa2a1ac8fa780152dc6ec
Diffstat (limited to 'src/com/android/dialer/CallDetailActivity.java')
-rw-r--r-- | src/com/android/dialer/CallDetailActivity.java | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/src/com/android/dialer/CallDetailActivity.java b/src/com/android/dialer/CallDetailActivity.java index 79a995647..b0c8e6821 100644 --- a/src/com/android/dialer/CallDetailActivity.java +++ b/src/com/android/dialer/CallDetailActivity.java @@ -16,7 +16,6 @@ package com.android.dialer; -import android.app.ActionBar; import android.app.Activity; import android.content.ContentResolver; import android.content.ContentUris; @@ -281,7 +280,7 @@ public class CallDetailActivity extends Activity implements ProximitySensorAware mContactPhotoManager = ContactPhotoManager.getInstance(this); mProximitySensorManager = new ProximitySensorManager(this, mProximitySensorListener); mContactInfoHelper = new ContactInfoHelper(this, GeoUtil.getCurrentCountryIso(this)); - configureActionBar(); + getActionBar().setDisplayHomeAsUpEnabled(true); optionallyHandleVoicemail(); if (getIntent().getBooleanExtra(EXTRA_FROM_NOTIFICATION, false)) { closeSystemDialogs(); @@ -796,20 +795,6 @@ public class CallDetailActivity extends Activity implements ProximitySensorAware return super.onPrepareOptionsMenu(menu); } - @Override - public boolean onMenuItemSelected(int featureId, MenuItem item) { - switch (item.getItemId()) { - case android.R.id.home: { - onHomeSelected(); - return true; - } - - // All the options menu items are handled by onMenu... methods. - default: - throw new IllegalArgumentException(); - } - } - public void onMenuRemoveFromCallLog(MenuItem menuItem) { final StringBuilder callIds = new StringBuilder(); for (Uri callUri : getCallLogEntryUris()) { @@ -854,13 +839,6 @@ public class CallDetailActivity extends Activity implements ProximitySensorAware }); } - private void configureActionBar() { - ActionBar actionBar = getActionBar(); - if (actionBar != null) { - actionBar.setDisplayOptions(ActionBar.DISPLAY_HOME_AS_UP | ActionBar.DISPLAY_SHOW_HOME); - } - } - /** Invoked when the user presses the home button in the action bar. */ private void onHomeSelected() { Intent intent = new Intent(Intent.ACTION_VIEW, Calls.CONTENT_URI); |