summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorAdam Powell <adamp@google.com>2012-05-07 17:32:44 -0700
committerAdam Powell <adamp@google.com>2012-05-07 17:32:44 -0700
commit07304f5299c6bccf84bd993239fbb3b87a0d46e6 (patch)
treee59a004972585c0cc29c0fdcbc20ce8148bfc04b /core
parent9d7bbcb89a3f14331c55ed2bbdcf768a4aa91cc1 (diff)
downloadframeworks_base-07304f5299c6bccf84bd993239fbb3b87a0d46e6.zip
frameworks_base-07304f5299c6bccf84bd993239fbb3b87a0d46e6.tar.gz
frameworks_base-07304f5299c6bccf84bd993239fbb3b87a0d46e6.tar.bz2
Fix a bug in Activity Up navigation dispatching
Propagate the return value from onNavigateUp as the result of onMenuItemSelected. This fixes a bug where the action bar Up nav button clicks would not be propagated to support lib FragmentActivity or other activity subclasses that rely on processing otherwise unhandled onMenuItemSelected events. Change-Id: Id879dd1756ed06b8a7b720ebf0eae2a8ddc66ca8
Diffstat (limited to 'core')
-rw-r--r--core/java/android/app/Activity.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index 29d96fe..781eea5 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -2540,11 +2540,10 @@ public class Activity extends ContextThemeWrapper
if (item.getItemId() == android.R.id.home && mActionBar != null &&
(mActionBar.getDisplayOptions() & ActionBar.DISPLAY_HOME_AS_UP) != 0) {
if (mParent == null) {
- onNavigateUp();
+ return onNavigateUp();
} else {
- mParent.onNavigateUpFromChild(this);
+ return mParent.onNavigateUpFromChild(this);
}
- return true;
}
return false;