summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2010-08-24 12:32:10 -0700
committerDianne Hackborn <hackbod@google.com>2010-08-24 12:32:10 -0700
commite794e9f9b7599c1ad6b8760e601c81b19ecc80c6 (patch)
treef61f6165c8da159047c18f3764b9ebb9fbca8c34
parent6d7346933580c107f461885dc273d7298a46b0df (diff)
downloadframeworks_base-e794e9f9b7599c1ad6b8760e601c81b19ecc80c6.zip
frameworks_base-e794e9f9b7599c1ad6b8760e601c81b19ecc80c6.tar.gz
frameworks_base-e794e9f9b7599c1ad6b8760e601c81b19ecc80c6.tar.bz2
Verify that onPause() calls its superclass.
Change-Id: Ibf48992b4445bfc726ade307aad26f3e9577c5fb
-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 f7ccc12..ed5af91 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() {