summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Dianne Hackborn <hackbod@google.com> 2010-08-24 14:47:46 -0700
committer Android Git Automerger <android-git-automerger@android.com> 2010-08-24 14:47:46 -0700
commitd3cd25967543aa3a45c28e9858ccf2b47c37451a (patch)
treeae391ab331fe7dc20c16a0f446c9fecea3f0de7f
parentb32d0f23a82452d6f7fa8c513e179f1287621905 (diff)
parent4af0cfad5305c8827c6235ca86e7db63b534ad68 (diff)
am 4af0cfad: Merge "Verify that onPause() calls its superclass." into gingerbread
Merge commit '4af0cfad5305c8827c6235ca86e7db63b534ad68' into gingerbread-plus-aosp * commit '4af0cfad5305c8827c6235ca86e7db63b534ad68': Verify that onPause() calls its superclass.
-rw-r--r--core/java/android/app/Activity.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index f7ccc12bd5d1..ed5af91ca7d0 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -3898,7 +3898,14 @@ public class Activity extends ContextThemeWrapper
}
final void performPause() {
+ mCalled = false;
onPause();
+ if (!mCalled && getApplicationInfo().targetSdkVersion
+ >= android.os.Build.VERSION_CODES.GINGERBREAD) {
+ throw new SuperNotCalledException(
+ "Activity " + mComponent.toShortString() +
+ " did not call through to super.onPause()");
+ }
}
final void performUserLeaving() {