Skip to content

Commit 0fa4d30

Browse files
Dianne HackbornAndroid (Google) Code Review
authored andcommitted
Merge "Fix issue #6686339: 2 taps required to launch notification..." into jb-dev
2 parents b6ce1f3 + 6e2281d commit 0fa4d30

File tree

4 files changed

+46
-20
lines changed

4 files changed

+46
-20
lines changed

policy/src/com/android/internal/policy/impl/PhoneWindowManager.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4395,20 +4395,21 @@ public void dump(String prefix, PrintWriter pw, String[] args) {
43954395
pw.print(prefix); pw.print("mUserRotationMode="); pw.print(mUserRotationMode);
43964396
pw.print(" mUserRotation="); pw.print(mUserRotation);
43974397
pw.print(" mAllowAllRotations="); pw.println(mAllowAllRotations);
4398-
pw.print(prefix); pw.print(" mCurrentAppOrientation="); pw.println(mCurrentAppOrientation);
4398+
pw.print(prefix); pw.print("mCurrentAppOrientation="); pw.println(mCurrentAppOrientation);
43994399
pw.print(prefix); pw.print("mCarDockEnablesAccelerometer=");
44004400
pw.print(mCarDockEnablesAccelerometer);
44014401
pw.print(" mDeskDockEnablesAccelerometer=");
44024402
pw.println(mDeskDockEnablesAccelerometer);
44034403
pw.print(prefix); pw.print("mLidKeyboardAccessibility=");
44044404
pw.print(mLidKeyboardAccessibility);
44054405
pw.print(" mLidNavigationAccessibility="); pw.print(mLidNavigationAccessibility);
4406-
pw.print(" mLidControlsSleep="); pw.print(mLidControlsSleep);
4407-
pw.print(" mLongPressOnPowerBehavior="); pw.println(mLongPressOnPowerBehavior);
4406+
pw.print(" mLidControlsSleep="); pw.println(mLidControlsSleep);
4407+
pw.print(prefix); pw.print("mLongPressOnPowerBehavior=");
4408+
pw.print(mLongPressOnPowerBehavior);
4409+
pw.print(" mHasSoftInput="); pw.println(mHasSoftInput);
44084410
pw.print(prefix); pw.print("mScreenOnEarly="); pw.print(mScreenOnEarly);
44094411
pw.print(" mScreenOnFully="); pw.print(mScreenOnFully);
4410-
pw.print(" mOrientationSensorEnabled="); pw.print(mOrientationSensorEnabled);
4411-
pw.print(" mHasSoftInput="); pw.println(mHasSoftInput);
4412+
pw.print(" mOrientationSensorEnabled="); pw.println(mOrientationSensorEnabled);
44124413
pw.print(prefix); pw.print("mUnrestrictedScreen=("); pw.print(mUnrestrictedScreenLeft);
44134414
pw.print(","); pw.print(mUnrestrictedScreenTop);
44144415
pw.print(") "); pw.print(mUnrestrictedScreenWidth);

services/java/com/android/server/wm/WindowManagerService.java

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9542,12 +9542,14 @@ void dumpTokensLocked(PrintWriter pw, boolean dumpAll) {
95429542
}
95439543
}
95449544
}
9545-
pw.println();
9546-
if (mOpeningApps.size() > 0) {
9547-
pw.print(" mOpeningApps="); pw.println(mOpeningApps);
9548-
}
9549-
if (mClosingApps.size() > 0) {
9550-
pw.print(" mClosingApps="); pw.println(mClosingApps);
9545+
if (mOpeningApps.size() > 0 || mClosingApps.size() > 0) {
9546+
pw.println();
9547+
if (mOpeningApps.size() > 0) {
9548+
pw.print(" mOpeningApps="); pw.println(mOpeningApps);
9549+
}
9550+
if (mClosingApps.size() > 0) {
9551+
pw.print(" mClosingApps="); pw.println(mClosingApps);
9552+
}
95519553
}
95529554
}
95539555

@@ -9761,7 +9763,7 @@ void dumpWindowsNoHeaderLocked(PrintWriter pw, boolean dumpAll,
97619763
pw.print(" mTransitionWindowAnimationScale="); pw.print(mTransitionAnimationScale);
97629764
pw.print(" mAnimatorDurationScale="); pw.println(mAnimatorDurationScale);
97639765
pw.print(" mTraversalScheduled="); pw.print(mTraversalScheduled);
9764-
pw.print(" mNextAppTransition=0x");
9766+
pw.print(" mNextAppTransition=0x");
97659767
pw.print(Integer.toHexString(mNextAppTransition));
97669768
pw.print(" mAppTransitionReady="); pw.println(mAppTransitionReady);
97679769
pw.print(" mAppTransitionRunning="); pw.print(mAppTransitionRunning);
@@ -9803,7 +9805,7 @@ void dumpWindowsNoHeaderLocked(PrintWriter pw, boolean dumpAll,
98039805
pw.println(mNextAppTransitionCallback);
98049806
}
98059807
pw.print(" mStartingIconInTransition="); pw.print(mStartingIconInTransition);
9806-
pw.print(", mSkipAppTransitionAnimation="); pw.println(mSkipAppTransitionAnimation);
9808+
pw.print(" mSkipAppTransitionAnimation="); pw.println(mSkipAppTransitionAnimation);
98079809
}
98089810
}
98099811

@@ -9971,30 +9973,31 @@ public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
99719973
}
99729974

99739975
synchronized(mWindowMap) {
9976+
pw.println();
99749977
if (dumpAll) {
99759978
pw.println("-------------------------------------------------------------------------------");
99769979
}
9977-
dumpPolicyLocked(pw, args, dumpAll);
9980+
dumpLastANRLocked(pw);
99789981
pw.println();
99799982
if (dumpAll) {
99809983
pw.println("-------------------------------------------------------------------------------");
99819984
}
9982-
dumpSessionsLocked(pw, dumpAll);
9985+
dumpPolicyLocked(pw, args, dumpAll);
99839986
pw.println();
99849987
if (dumpAll) {
99859988
pw.println("-------------------------------------------------------------------------------");
99869989
}
9987-
dumpTokensLocked(pw, dumpAll);
9990+
dumpSessionsLocked(pw, dumpAll);
99889991
pw.println();
99899992
if (dumpAll) {
99909993
pw.println("-------------------------------------------------------------------------------");
99919994
}
9992-
dumpWindowsLocked(pw, dumpAll, null);
9995+
dumpTokensLocked(pw, dumpAll);
99939996
pw.println();
99949997
if (dumpAll) {
99959998
pw.println("-------------------------------------------------------------------------------");
99969999
}
9997-
dumpLastANRLocked(pw);
10000+
dumpWindowsLocked(pw, dumpAll, null);
999810001
}
999910002
}
1000010003

services/java/com/android/server/wm/WindowState.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,28 @@ boolean isReadyForDisplay() {
718718
|| ((mAppToken != null) && (mAppToken.mAppAnimator.animation != null)));
719719
}
720720

721+
/**
722+
* Like isReadyForDisplay(), but ignores any force hiding of the window due
723+
* to the keyguard.
724+
*/
725+
boolean isReadyForDisplayIgnoringKeyguard() {
726+
if (mRootToken.waitingToShow &&
727+
mService.mNextAppTransition != WindowManagerPolicy.TRANSIT_UNSET) {
728+
return false;
729+
}
730+
final AppWindowToken atoken = mAppToken;
731+
if (atoken == null && !mPolicyVisibility) {
732+
// If this is not an app window, and the policy has asked to force
733+
// hide, then we really do want to hide.
734+
return false;
735+
}
736+
return mHasSurface && !mDestroying
737+
&& ((!mAttachedHidden && mViewVisibility == View.VISIBLE
738+
&& !mRootToken.hidden)
739+
|| mWinAnimator.mAnimation != null
740+
|| ((atoken != null) && (atoken.mAppAnimator.animation != null)));
741+
}
742+
721743
/**
722744
* Like isOnScreen, but returns false if the surface hasn't yet
723745
* been drawn.

services/java/com/android/server/wm/WindowStateAnimator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1218,10 +1218,10 @@ boolean performShowLocked() {
12181218
}
12191219
Slog.v(TAG, "performShow on " + this
12201220
+ ": mDrawState=" + mDrawState + " readyForDisplay="
1221-
+ mWin.isReadyForDisplay()
1221+
+ mWin.isReadyForDisplayIgnoringKeyguard()
12221222
+ " starting=" + (mWin.mAttrs.type == TYPE_APPLICATION_STARTING), e);
12231223
}
1224-
if (mDrawState == READY_TO_SHOW && mWin.isReadyForDisplay()) {
1224+
if (mDrawState == READY_TO_SHOW && mWin.isReadyForDisplayIgnoringKeyguard()) {
12251225
if (SHOW_TRANSACTIONS || DEBUG_ORIENTATION)
12261226
WindowManagerService.logSurface(mWin, "SHOW (performShowLocked)", null);
12271227
if (DEBUG_VISIBILITY) Slog.v(TAG, "Showing " + this

0 commit comments

Comments
 (0)