Loading core/java/android/view/IWindowManager.aidl +0 −1 Original line number Original line Diff line number Diff line Loading @@ -144,7 +144,6 @@ interface IWindowManager void setAppStartingWindow(IBinder token, String pkg, int theme, void setAppStartingWindow(IBinder token, String pkg, int theme, in CompatibilityInfo compatInfo, CharSequence nonLocalizedLabel, int labelRes, in CompatibilityInfo compatInfo, CharSequence nonLocalizedLabel, int labelRes, int icon, int logo, int windowFlags, IBinder transferFrom, boolean createIfNeeded); int icon, int logo, int windowFlags, IBinder transferFrom, boolean createIfNeeded); void setAppWillBeHidden(IBinder token); void setAppVisibility(IBinder token, boolean visible); void setAppVisibility(IBinder token, boolean visible); void startAppFreezingScreen(IBinder token, int configChanges); void startAppFreezingScreen(IBinder token, int configChanges); void stopAppFreezingScreen(IBinder token, boolean force); void stopAppFreezingScreen(IBinder token, boolean force); Loading services/core/java/com/android/server/am/ActivityStack.java +0 −5 Original line number Original line Diff line number Diff line Loading @@ -1957,7 +1957,6 @@ final class ActivityStack { ? AppTransition.TRANSIT_ACTIVITY_CLOSE ? AppTransition.TRANSIT_ACTIVITY_CLOSE : AppTransition.TRANSIT_TASK_CLOSE, false); : AppTransition.TRANSIT_TASK_CLOSE, false); } } mWindowManager.setAppWillBeHidden(prev.appToken); mWindowManager.setAppVisibility(prev.appToken, false); mWindowManager.setAppVisibility(prev.appToken, false); } else { } else { if (DEBUG_TRANSITION) Slog.v(TAG_TRANSITION, if (DEBUG_TRANSITION) Slog.v(TAG_TRANSITION, Loading @@ -1973,10 +1972,6 @@ final class ActivityStack { : AppTransition.TRANSIT_TASK_OPEN, false); : AppTransition.TRANSIT_TASK_OPEN, false); } } } } if (false) { mWindowManager.setAppWillBeHidden(prev.appToken); mWindowManager.setAppVisibility(prev.appToken, false); } } else { } else { if (DEBUG_TRANSITION) Slog.v(TAG_TRANSITION, "Prepare open transition: no previous"); if (DEBUG_TRANSITION) Slog.v(TAG_TRANSITION, "Prepare open transition: no previous"); if (mNoAnimActivities.contains(next)) { if (mNoAnimActivities.contains(next)) { Loading services/core/java/com/android/server/wm/AppWindowToken.java +0 −5 Original line number Original line Diff line number Diff line Loading @@ -74,10 +74,6 @@ class AppWindowToken extends WindowToken { // case do not clear allDrawn until the animation completes. // case do not clear allDrawn until the animation completes. boolean deferClearAllDrawn; boolean deferClearAllDrawn; // Is this token going to be hidden in a little while? If so, it // won't be taken into account for setting the screen orientation. boolean willBeHidden; // Is this window's surface needed? This is almost like hidden, except // Is this window's surface needed? This is almost like hidden, except // it will sometimes be true a little earlier: when the token has // it will sometimes be true a little earlier: when the token has // been shown, but is still waiting for its app transition to execute // been shown, but is still waiting for its app transition to execute Loading Loading @@ -321,7 +317,6 @@ class AppWindowToken extends WindowToken { pw.print(" requestedOrientation="); pw.println(requestedOrientation); pw.print(" requestedOrientation="); pw.println(requestedOrientation); pw.print(prefix); pw.print("hiddenRequested="); pw.print(hiddenRequested); pw.print(prefix); pw.print("hiddenRequested="); pw.print(hiddenRequested); pw.print(" clientHidden="); pw.print(clientHidden); pw.print(" clientHidden="); pw.print(clientHidden); pw.print(" willBeHidden="); pw.print(willBeHidden); pw.print(" reportedDrawn="); pw.print(reportedDrawn); pw.print(" reportedDrawn="); pw.print(reportedDrawn); pw.print(" reportedVisible="); pw.println(reportedVisible); pw.print(" reportedVisible="); pw.println(reportedVisible); if (paused) { if (paused) { Loading services/core/java/com/android/server/wm/WindowManagerService.java +2 −24 Original line number Original line Diff line number Diff line Loading @@ -3268,8 +3268,7 @@ public class WindowManagerService extends IWindowManager.Stub // if we're about to tear down this window and not seek for // if we're about to tear down this window and not seek for // the behind activity, don't use it for orientation // the behind activity, don't use it for orientation if (!findingBehind if (!findingBehind && !atoken.hidden && atoken.hiddenRequested) { && (!atoken.hidden && atoken.hiddenRequested)) { if (DEBUG_ORIENTATION) Slog.v(TAG, "Skipping " + atoken if (DEBUG_ORIENTATION) Slog.v(TAG, "Skipping " + atoken + " -- going to hide"); + " -- going to hide"); continue; continue; Loading @@ -3290,7 +3289,7 @@ public class WindowManagerService extends IWindowManager.Stub } } // We ignore any hidden applications on the top. // We ignore any hidden applications on the top. if (atoken.hiddenRequested || atoken.willBeHidden) { if (atoken.hiddenRequested) { if (DEBUG_ORIENTATION) Slog.v(TAG, "Skipping " + atoken if (DEBUG_ORIENTATION) Slog.v(TAG, "Skipping " + atoken + " -- hidden on top"); + " -- hidden on top"); continue; continue; Loading Loading @@ -3786,7 +3785,6 @@ public class WindowManagerService extends IWindowManager.Stub if (!ttoken.hidden) { if (!ttoken.hidden) { wtoken.hidden = false; wtoken.hidden = false; wtoken.hiddenRequested = false; wtoken.hiddenRequested = false; wtoken.willBeHidden = false; } } if (wtoken.clientHidden != ttoken.clientHidden) { if (wtoken.clientHidden != ttoken.clientHidden) { wtoken.clientHidden = ttoken.clientHidden; wtoken.clientHidden = ttoken.clientHidden; Loading Loading @@ -3842,25 +3840,6 @@ public class WindowManagerService extends IWindowManager.Stub } } } } @Override public void setAppWillBeHidden(IBinder token) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "setAppWillBeHidden()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } AppWindowToken wtoken; synchronized(mWindowMap) { wtoken = findAppWindowToken(token); if (wtoken == null) { Slog.w(TAG, "Attempted to set will be hidden of non-existing app token: " + token); return; } wtoken.willBeHidden = true; } } public void setAppFullscreen(IBinder token, boolean toOpaque) { public void setAppFullscreen(IBinder token, boolean toOpaque) { synchronized (mWindowMap) { synchronized (mWindowMap) { AppWindowToken atoken = findAppWindowToken(token); AppWindowToken atoken = findAppWindowToken(token); Loading Loading @@ -3897,7 +3876,6 @@ public class WindowManagerService extends IWindowManager.Stub wtoken.sendAppVisibilityToClients(); wtoken.sendAppVisibilityToClients(); } } wtoken.willBeHidden = false; // Allow for state changes and animation to be applied if: // Allow for state changes and animation to be applied if: // * token is transitioning visibility state // * token is transitioning visibility state // * or the token was marked as hidden and is exiting before we had a chance to play the // * or the token was marked as hidden and is exiting before we had a chance to play the Loading tests/permission/src/com/android/framework/permission/tests/WindowManagerPermissionTests.java +0 −10 Original line number Original line Diff line number Diff line Loading @@ -174,16 +174,6 @@ public class WindowManagerPermissionTests extends TestCase { fail("Unexpected remote exception"); fail("Unexpected remote exception"); } } try { mWm.setAppWillBeHidden(null); fail("IWindowManager.setAppWillBeHidden did not throw SecurityException as" + " expected"); } catch (SecurityException e) { // expected } catch (RemoteException e) { fail("Unexpected remote exception"); } try { try { mWm.setAppVisibility(null, false); mWm.setAppVisibility(null, false); fail("IWindowManager.setAppVisibility did not throw SecurityException as" fail("IWindowManager.setAppVisibility did not throw SecurityException as" Loading Loading
core/java/android/view/IWindowManager.aidl +0 −1 Original line number Original line Diff line number Diff line Loading @@ -144,7 +144,6 @@ interface IWindowManager void setAppStartingWindow(IBinder token, String pkg, int theme, void setAppStartingWindow(IBinder token, String pkg, int theme, in CompatibilityInfo compatInfo, CharSequence nonLocalizedLabel, int labelRes, in CompatibilityInfo compatInfo, CharSequence nonLocalizedLabel, int labelRes, int icon, int logo, int windowFlags, IBinder transferFrom, boolean createIfNeeded); int icon, int logo, int windowFlags, IBinder transferFrom, boolean createIfNeeded); void setAppWillBeHidden(IBinder token); void setAppVisibility(IBinder token, boolean visible); void setAppVisibility(IBinder token, boolean visible); void startAppFreezingScreen(IBinder token, int configChanges); void startAppFreezingScreen(IBinder token, int configChanges); void stopAppFreezingScreen(IBinder token, boolean force); void stopAppFreezingScreen(IBinder token, boolean force); Loading
services/core/java/com/android/server/am/ActivityStack.java +0 −5 Original line number Original line Diff line number Diff line Loading @@ -1957,7 +1957,6 @@ final class ActivityStack { ? AppTransition.TRANSIT_ACTIVITY_CLOSE ? AppTransition.TRANSIT_ACTIVITY_CLOSE : AppTransition.TRANSIT_TASK_CLOSE, false); : AppTransition.TRANSIT_TASK_CLOSE, false); } } mWindowManager.setAppWillBeHidden(prev.appToken); mWindowManager.setAppVisibility(prev.appToken, false); mWindowManager.setAppVisibility(prev.appToken, false); } else { } else { if (DEBUG_TRANSITION) Slog.v(TAG_TRANSITION, if (DEBUG_TRANSITION) Slog.v(TAG_TRANSITION, Loading @@ -1973,10 +1972,6 @@ final class ActivityStack { : AppTransition.TRANSIT_TASK_OPEN, false); : AppTransition.TRANSIT_TASK_OPEN, false); } } } } if (false) { mWindowManager.setAppWillBeHidden(prev.appToken); mWindowManager.setAppVisibility(prev.appToken, false); } } else { } else { if (DEBUG_TRANSITION) Slog.v(TAG_TRANSITION, "Prepare open transition: no previous"); if (DEBUG_TRANSITION) Slog.v(TAG_TRANSITION, "Prepare open transition: no previous"); if (mNoAnimActivities.contains(next)) { if (mNoAnimActivities.contains(next)) { Loading
services/core/java/com/android/server/wm/AppWindowToken.java +0 −5 Original line number Original line Diff line number Diff line Loading @@ -74,10 +74,6 @@ class AppWindowToken extends WindowToken { // case do not clear allDrawn until the animation completes. // case do not clear allDrawn until the animation completes. boolean deferClearAllDrawn; boolean deferClearAllDrawn; // Is this token going to be hidden in a little while? If so, it // won't be taken into account for setting the screen orientation. boolean willBeHidden; // Is this window's surface needed? This is almost like hidden, except // Is this window's surface needed? This is almost like hidden, except // it will sometimes be true a little earlier: when the token has // it will sometimes be true a little earlier: when the token has // been shown, but is still waiting for its app transition to execute // been shown, but is still waiting for its app transition to execute Loading Loading @@ -321,7 +317,6 @@ class AppWindowToken extends WindowToken { pw.print(" requestedOrientation="); pw.println(requestedOrientation); pw.print(" requestedOrientation="); pw.println(requestedOrientation); pw.print(prefix); pw.print("hiddenRequested="); pw.print(hiddenRequested); pw.print(prefix); pw.print("hiddenRequested="); pw.print(hiddenRequested); pw.print(" clientHidden="); pw.print(clientHidden); pw.print(" clientHidden="); pw.print(clientHidden); pw.print(" willBeHidden="); pw.print(willBeHidden); pw.print(" reportedDrawn="); pw.print(reportedDrawn); pw.print(" reportedDrawn="); pw.print(reportedDrawn); pw.print(" reportedVisible="); pw.println(reportedVisible); pw.print(" reportedVisible="); pw.println(reportedVisible); if (paused) { if (paused) { Loading
services/core/java/com/android/server/wm/WindowManagerService.java +2 −24 Original line number Original line Diff line number Diff line Loading @@ -3268,8 +3268,7 @@ public class WindowManagerService extends IWindowManager.Stub // if we're about to tear down this window and not seek for // if we're about to tear down this window and not seek for // the behind activity, don't use it for orientation // the behind activity, don't use it for orientation if (!findingBehind if (!findingBehind && !atoken.hidden && atoken.hiddenRequested) { && (!atoken.hidden && atoken.hiddenRequested)) { if (DEBUG_ORIENTATION) Slog.v(TAG, "Skipping " + atoken if (DEBUG_ORIENTATION) Slog.v(TAG, "Skipping " + atoken + " -- going to hide"); + " -- going to hide"); continue; continue; Loading @@ -3290,7 +3289,7 @@ public class WindowManagerService extends IWindowManager.Stub } } // We ignore any hidden applications on the top. // We ignore any hidden applications on the top. if (atoken.hiddenRequested || atoken.willBeHidden) { if (atoken.hiddenRequested) { if (DEBUG_ORIENTATION) Slog.v(TAG, "Skipping " + atoken if (DEBUG_ORIENTATION) Slog.v(TAG, "Skipping " + atoken + " -- hidden on top"); + " -- hidden on top"); continue; continue; Loading Loading @@ -3786,7 +3785,6 @@ public class WindowManagerService extends IWindowManager.Stub if (!ttoken.hidden) { if (!ttoken.hidden) { wtoken.hidden = false; wtoken.hidden = false; wtoken.hiddenRequested = false; wtoken.hiddenRequested = false; wtoken.willBeHidden = false; } } if (wtoken.clientHidden != ttoken.clientHidden) { if (wtoken.clientHidden != ttoken.clientHidden) { wtoken.clientHidden = ttoken.clientHidden; wtoken.clientHidden = ttoken.clientHidden; Loading Loading @@ -3842,25 +3840,6 @@ public class WindowManagerService extends IWindowManager.Stub } } } } @Override public void setAppWillBeHidden(IBinder token) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "setAppWillBeHidden()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } AppWindowToken wtoken; synchronized(mWindowMap) { wtoken = findAppWindowToken(token); if (wtoken == null) { Slog.w(TAG, "Attempted to set will be hidden of non-existing app token: " + token); return; } wtoken.willBeHidden = true; } } public void setAppFullscreen(IBinder token, boolean toOpaque) { public void setAppFullscreen(IBinder token, boolean toOpaque) { synchronized (mWindowMap) { synchronized (mWindowMap) { AppWindowToken atoken = findAppWindowToken(token); AppWindowToken atoken = findAppWindowToken(token); Loading Loading @@ -3897,7 +3876,6 @@ public class WindowManagerService extends IWindowManager.Stub wtoken.sendAppVisibilityToClients(); wtoken.sendAppVisibilityToClients(); } } wtoken.willBeHidden = false; // Allow for state changes and animation to be applied if: // Allow for state changes and animation to be applied if: // * token is transitioning visibility state // * token is transitioning visibility state // * or the token was marked as hidden and is exiting before we had a chance to play the // * or the token was marked as hidden and is exiting before we had a chance to play the Loading
tests/permission/src/com/android/framework/permission/tests/WindowManagerPermissionTests.java +0 −10 Original line number Original line Diff line number Diff line Loading @@ -174,16 +174,6 @@ public class WindowManagerPermissionTests extends TestCase { fail("Unexpected remote exception"); fail("Unexpected remote exception"); } } try { mWm.setAppWillBeHidden(null); fail("IWindowManager.setAppWillBeHidden did not throw SecurityException as" + " expected"); } catch (SecurityException e) { // expected } catch (RemoteException e) { fail("Unexpected remote exception"); } try { try { mWm.setAppVisibility(null, false); mWm.setAppVisibility(null, false); fail("IWindowManager.setAppVisibility did not throw SecurityException as" fail("IWindowManager.setAppVisibility did not throw SecurityException as" Loading