Merge changes I69e9cbb6,I187b5a56 into sc-v2-dev
* changes: Prevent the occlusion state mismatch between WM and SystemUI. Remove keyguard candidate.
This commit is contained in:
@@ -404,7 +404,6 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
|||||||
private AccessibilityShortcutController mAccessibilityShortcutController;
|
private AccessibilityShortcutController mAccessibilityShortcutController;
|
||||||
|
|
||||||
boolean mSafeMode;
|
boolean mSafeMode;
|
||||||
private WindowState mKeyguardCandidate = null;
|
|
||||||
|
|
||||||
// Whether to allow dock apps with METADATA_DOCK_HOME to temporarily take over the Home key.
|
// Whether to allow dock apps with METADATA_DOCK_HOME to temporarily take over the Home key.
|
||||||
// This is for car dock and this is updated from resource.
|
// This is for car dock and this is updated from resource.
|
||||||
@@ -3061,7 +3060,6 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
|||||||
if (mKeyguardOccludedChanged) {
|
if (mKeyguardOccludedChanged) {
|
||||||
if (DEBUG_KEYGUARD) Slog.d(TAG, "transition/occluded changed occluded="
|
if (DEBUG_KEYGUARD) Slog.d(TAG, "transition/occluded changed occluded="
|
||||||
+ mPendingKeyguardOccluded);
|
+ mPendingKeyguardOccluded);
|
||||||
mKeyguardOccludedChanged = false;
|
|
||||||
if (setKeyguardOccludedLw(mPendingKeyguardOccluded, false /* force */,
|
if (setKeyguardOccludedLw(mPendingKeyguardOccluded, false /* force */,
|
||||||
transitionStarted)) {
|
transitionStarted)) {
|
||||||
return FINISH_LAYOUT_REDO_LAYOUT | FINISH_LAYOUT_REDO_WALLPAPER;
|
return FINISH_LAYOUT_REDO_LAYOUT | FINISH_LAYOUT_REDO_WALLPAPER;
|
||||||
@@ -3271,14 +3269,6 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
|||||||
mNavBarVirtualKeyHapticFeedbackEnabled = enabled;
|
mNavBarVirtualKeyHapticFeedbackEnabled = enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
|
||||||
@Override
|
|
||||||
public void setKeyguardCandidateLw(WindowState win) {
|
|
||||||
mKeyguardCandidate = win;
|
|
||||||
setKeyguardOccludedLw(isKeyguardOccluded(), true /* force */,
|
|
||||||
false /* keyguardOccludingStarted */);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates the occluded state of the Keyguard.
|
* Updates the occluded state of the Keyguard.
|
||||||
*
|
*
|
||||||
@@ -3291,6 +3281,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
|||||||
private boolean setKeyguardOccludedLw(boolean isOccluded, boolean force,
|
private boolean setKeyguardOccludedLw(boolean isOccluded, boolean force,
|
||||||
boolean transitionStarted) {
|
boolean transitionStarted) {
|
||||||
if (DEBUG_KEYGUARD) Slog.d(TAG, "setKeyguardOccluded occluded=" + isOccluded);
|
if (DEBUG_KEYGUARD) Slog.d(TAG, "setKeyguardOccluded occluded=" + isOccluded);
|
||||||
|
mKeyguardOccludedChanged = false;
|
||||||
if (isKeyguardOccluded() == isOccluded && !force) {
|
if (isKeyguardOccluded() == isOccluded && !force) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -721,13 +721,6 @@ public interface WindowManagerPolicy extends WindowManagerPolicyConstants {
|
|||||||
int theme, CompatibilityInfo compatInfo, CharSequence nonLocalizedLabel, int labelRes,
|
int theme, CompatibilityInfo compatInfo, CharSequence nonLocalizedLabel, int labelRes,
|
||||||
int icon, int logo, int windowFlags, Configuration overrideConfig, int displayId);
|
int icon, int logo, int windowFlags, Configuration overrideConfig, int displayId);
|
||||||
|
|
||||||
/**
|
|
||||||
* Set or clear a window which can behave as the keyguard.
|
|
||||||
*
|
|
||||||
* @param win The window which can behave as the keyguard.
|
|
||||||
*/
|
|
||||||
void setKeyguardCandidateLw(@Nullable WindowState win);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create and return an animation to re-display a window that was force hidden by Keyguard.
|
* Create and return an animation to re-display a window that was force hidden by Keyguard.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1094,9 +1094,6 @@ public class DisplayPolicy {
|
|||||||
switch (attrs.type) {
|
switch (attrs.type) {
|
||||||
case TYPE_NOTIFICATION_SHADE:
|
case TYPE_NOTIFICATION_SHADE:
|
||||||
mNotificationShade = win;
|
mNotificationShade = win;
|
||||||
if (mDisplayContent.isDefaultDisplay) {
|
|
||||||
mService.mPolicy.setKeyguardCandidateLw(win);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case TYPE_STATUS_BAR:
|
case TYPE_STATUS_BAR:
|
||||||
mStatusBar = win;
|
mStatusBar = win;
|
||||||
@@ -1292,9 +1289,6 @@ public class DisplayPolicy {
|
|||||||
mDisplayContent.setInsetProvider(ITYPE_NAVIGATION_BAR, null, null);
|
mDisplayContent.setInsetProvider(ITYPE_NAVIGATION_BAR, null, null);
|
||||||
} else if (mNotificationShade == win) {
|
} else if (mNotificationShade == win) {
|
||||||
mNotificationShade = null;
|
mNotificationShade = null;
|
||||||
if (mDisplayContent.isDefaultDisplay) {
|
|
||||||
mService.mPolicy.setKeyguardCandidateLw(null);
|
|
||||||
}
|
|
||||||
} else if (mClimateBarAlt == win) {
|
} else if (mClimateBarAlt == win) {
|
||||||
mClimateBarAlt = null;
|
mClimateBarAlt = null;
|
||||||
mDisplayContent.setInsetProvider(ITYPE_CLIMATE_BAR, null, null);
|
mDisplayContent.setInsetProvider(ITYPE_CLIMATE_BAR, null, null);
|
||||||
|
|||||||
@@ -127,10 +127,6 @@ class TestWindowManagerPolicy implements WindowManagerPolicy {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setKeyguardCandidateLw(WindowState win) {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Animation createHiddenByKeyguardExit(boolean onWallpaper,
|
public Animation createHiddenByKeyguardExit(boolean onWallpaper,
|
||||||
boolean goingToNotificationShade, boolean subtleAnimation) {
|
boolean goingToNotificationShade, boolean subtleAnimation) {
|
||||||
|
|||||||
Reference in New Issue
Block a user