diff options
| author | Dianne Hackborn <hackbod@google.com> | 2009-09-30 14:20:09 -0700 |
|---|---|---|
| committer | Dianne Hackborn <hackbod@google.com> | 2009-09-30 14:28:16 -0700 |
| commit | dc6b635cfa440454985461444c3cf1da8078cee1 (patch) | |
| tree | 6ffc7cb2db6cc93c58e761ef908ac153f52ea0a5 /core/java/android/app/ActivityThread.java | |
| parent | 17d262f2322258ab88ba2b012c10df37d207ba99 (diff) | |
Debugging for #2027266: app drawer showing up on the side
Nothing fixed, but this tells us what is going on.
Change-Id: I174d16a3864af2fa235e8cc7b1e74d32a375fb42
Diffstat (limited to 'core/java/android/app/ActivityThread.java')
| -rw-r--r-- | core/java/android/app/ActivityThread.java | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java index 76a133b65a03..d6f024b65139 100644 --- a/core/java/android/app/ActivityThread.java +++ b/core/java/android/app/ActivityThread.java @@ -123,6 +123,7 @@ public final class ActivityThread { private static final boolean DEBUG_BROADCAST = false; private static final boolean DEBUG_RESULTS = false; private static final boolean DEBUG_BACKUP = true; + private static final boolean DEBUG_CONFIGURATION = false; private static final long MIN_TIME_BETWEEN_GCS = 5*1000; private static final Pattern PATTERN_SEMICOLON = Pattern.compile(";"); private static final int SQLITE_MEM_RELEASED_EVENT_LOG_TAG = 75003; @@ -2388,6 +2389,8 @@ public final class ActivityThread { appContext.setOuterContext(activity); CharSequence title = r.activityInfo.loadLabel(appContext.getPackageManager()); Configuration config = new Configuration(mConfiguration); + if (DEBUG_CONFIGURATION) Log.v(TAG, "Launching activity " + + r.activityInfo.name + " with config " + config); activity.attach(appContext, this, getInstrumentation(), r.token, r.ident, app, r.intent, r.activityInfo, title, r.parent, r.embeddedID, r.lastNonConfigurationInstance, @@ -2954,6 +2957,8 @@ public final class ActivityThread { if (!r.activity.mFinished && !a.mStartedActivity && r.activity.mDecor != null && !r.hideForNow) { if (r.newConfig != null) { + if (DEBUG_CONFIGURATION) Log.v(TAG, "Resuming activity " + + r.activityInfo.name + " with newConfig " + r.newConfig); performConfigurationChanged(r.activity, r.newConfig); r.newConfig = null; } @@ -3195,6 +3200,8 @@ public final class ActivityThread { } } if (r.newConfig != null) { + if (DEBUG_CONFIGURATION) Log.v(TAG, "Updating activity vis " + + r.activityInfo.name + " with new config " + r.newConfig); performConfigurationChanged(r.activity, r.newConfig); r.newConfig = null; } @@ -3476,6 +3483,10 @@ public final class ActivityThread { Configuration changedConfig = null; + if (DEBUG_CONFIGURATION) Log.v(TAG, "Relaunching activity " + + tmp.token + " with configChanges=0x" + + Integer.toHexString(configChanges)); + // First: make sure we have the most recent configuration and most // recent version of the activity, or skip it if some previous call // had taken a more recent version. @@ -3494,6 +3505,7 @@ public final class ActivityThread { } if (tmp == null) { + if (DEBUG_CONFIGURATION) Log.v(TAG, "Abort, activity not relaunching!"); return; } @@ -3503,13 +3515,16 @@ public final class ActivityThread { } } + if (DEBUG_CONFIGURATION) Log.v(TAG, "Relaunching activity " + + tmp.token + ": changedConfig=" + changedConfig); + // If there was a pending configuration change, execute it first. if (changedConfig != null) { handleConfigurationChanged(changedConfig); } ActivityRecord r = mActivities.get(tmp.token); - if (localLOGV) Log.v(TAG, "Handling relaunch of " + r); + if (DEBUG_CONFIGURATION) Log.v(TAG, "Handling relaunch of " + r); if (r == null) { return; } @@ -3595,6 +3610,8 @@ public final class ActivityThread { // the activity manager may, before then, decide the // activity needs to be destroyed to handle its new // configuration. + if (DEBUG_CONFIGURATION) Log.v(TAG, "Setting activity " + + ar.activityInfo.name + " newConfig=" + newConfig); ar.newConfig = newConfig; } } @@ -3652,6 +3669,8 @@ public final class ActivityThread { } } + if (DEBUG_CONFIGURATION) Log.v(TAG, "Config callback " + cb + + ": shouldChangeConfig=" + shouldChangeConfig); if (shouldChangeConfig) { cb.onConfigurationChanged(config); @@ -3679,6 +3698,9 @@ public final class ActivityThread { ArrayList<ComponentCallbacks> callbacks = new ArrayList<ComponentCallbacks>(); + if (DEBUG_CONFIGURATION) Log.v(TAG, "Handle configuration changed: " + + config); + synchronized(mPackages) { if (mConfiguration == null) { mConfiguration = new Configuration(); @@ -3729,6 +3751,9 @@ public final class ActivityThread { return; } + if (DEBUG_CONFIGURATION) Log.v(TAG, "Handle activity config changed: " + + r.activityInfo.name); + performConfigurationChanged(r.activity, mConfiguration); } |
