summaryrefslogtreecommitdiff
path: root/tests/permission/src
diff options
context:
space:
mode:
authorWale Ogunwale <ogunwale@google.com>2016-12-14 14:42:30 -0800
committerWale Ogunwale <ogunwale@google.com>2017-01-06 09:11:02 -0800
commit26c0dfed7a0cd54abafdd0ccbb5b757506d51c76 (patch)
tree4850c302aac142f72b57b4ea946ca463744bb074 /tests/permission/src
parentaedb707aa3dbc1e8ca9073247f2b6e60205a1893 (diff)
Support for WindowContainer controllers and listeners
- WindowContainerController class allows a component outside window manager to create a window container and communicate directly with it to make changes. For example, the ActivityRecord class in activity manager uses the AppWindowContainerController class to create and communicate with AppWindowToken window container class which is its counterpart on the window manager side. - WindowContainerListener interface allows a component outside WM to get notified of changes to a window container. For example, the ActivityRecord class in AM implements the AppWindowContainerListener interface to get notified of changes to the AppWindowToken container. Bug: 30060889 Test: Existing tests pass and manual testing. Test: bit FrameworksServicesTests:com.android.server.wm.WindowContainerControllerTests Test: bit FrameworksServicesTests:com.android.server.wm.WindowContainerTests Change-Id: I2896bfa46a80b227052528c7da8cf4e56beab4bc
Diffstat (limited to 'tests/permission/src')
-rw-r--r--tests/permission/src/com/android/framework/permission/tests/WindowManagerPermissionTests.java101
1 files changed, 0 insertions, 101 deletions
diff --git a/tests/permission/src/com/android/framework/permission/tests/WindowManagerPermissionTests.java b/tests/permission/src/com/android/framework/permission/tests/WindowManagerPermissionTests.java
index 28a2cb399cd0..4aeae70ec979 100644
--- a/tests/permission/src/com/android/framework/permission/tests/WindowManagerPermissionTests.java
+++ b/tests/permission/src/com/android/framework/permission/tests/WindowManagerPermissionTests.java
@@ -43,26 +43,6 @@ public class WindowManagerPermissionTests extends TestCase {
@SmallTest
public void testMANAGE_APP_TOKENS() {
try {
- mWm.pauseKeyDispatching(null);
- fail("IWindowManager.pauseKeyDispatching did not throw SecurityException as"
- + " expected");
- } catch (SecurityException e) {
- // expected
- } catch (RemoteException e) {
- fail("Unexpected remote exception");
- }
-
- try {
- mWm.resumeKeyDispatching(null);
- fail("IWindowManager.resumeKeyDispatching did not throw SecurityException as"
- + " expected");
- } catch (SecurityException e) {
- // expected
- } catch (RemoteException e) {
- fail("Unexpected remote exception");
- }
-
- try {
mWm.setEventDispatching(true);
fail("IWindowManager.setEventDispatching did not throw SecurityException as"
+ " expected");
@@ -93,26 +73,6 @@ public class WindowManagerPermissionTests extends TestCase {
}
try {
- mWm.addAppToken(0, null, 0, 0, false, false, 0, false, false, false, 0, -1);
- fail("IWindowManager.addAppToken did not throw SecurityException as"
- + " expected");
- } catch (SecurityException e) {
- // expected
- } catch (RemoteException e) {
- fail("Unexpected remote exception");
- }
-
- try {
- mWm.addAppToTask(null, 0);
- fail("IWindowManager.setAppGroupId did not throw SecurityException as"
- + " expected");
- } catch (SecurityException e) {
- // expected
- } catch (RemoteException e) {
- fail("Unexpected remote exception");
- }
-
- try {
mWm.updateOrientationFromAppTokens(new Configuration(),
null /* freezeThisOneIfNeeded */, DEFAULT_DISPLAY);
fail("IWindowManager.updateOrientationFromAppTokens did not throw SecurityException as"
@@ -124,17 +84,6 @@ public class WindowManagerPermissionTests extends TestCase {
}
try {
- mWm.setAppOrientation(null, 0);
- mWm.addWindowToken(null, 0, DEFAULT_DISPLAY);
- fail("IWindowManager.setAppOrientation did not throw SecurityException as"
- + " expected");
- } catch (SecurityException e) {
- // expected
- } catch (RemoteException e) {
- fail("Unexpected remote exception");
- }
-
- try {
mWm.setFocusedApp(null, false);
fail("IWindowManager.setFocusedApp did not throw SecurityException as"
+ " expected");
@@ -163,56 +112,6 @@ public class WindowManagerPermissionTests extends TestCase {
} catch (RemoteException e) {
fail("Unexpected remote exception");
}
-
- try {
- mWm.setAppStartingWindow(null, "foo", 0, null, null, 0, 0, 0, 0, null, false);
- fail("IWindowManager.setAppStartingWindow did not throw SecurityException as"
- + " expected");
- } catch (SecurityException e) {
- // expected
- } catch (RemoteException e) {
- fail("Unexpected remote exception");
- }
-
- try {
- mWm.setAppVisibility(null, false);
- fail("IWindowManager.setAppVisibility did not throw SecurityException as"
- + " expected");
- } catch (SecurityException e) {
- // expected
- } catch (RemoteException e) {
- fail("Unexpected remote exception");
- }
-
- try {
- mWm.startAppFreezingScreen(null, 0);
- fail("IWindowManager.startAppFreezingScreen did not throw SecurityException as"
- + " expected");
- } catch (SecurityException e) {
- // expected
- } catch (RemoteException e) {
- fail("Unexpected remote exception");
- }
-
- try {
- mWm.stopAppFreezingScreen(null, false);
- fail("IWindowManager.stopAppFreezingScreen did not throw SecurityException as"
- + " expected");
- } catch (SecurityException e) {
- // expected
- } catch (RemoteException e) {
- fail("Unexpected remote exception");
- }
-
- try {
- mWm.removeAppToken(null, DEFAULT_DISPLAY);
- fail("IWindowManager.removeAppToken did not throw SecurityException as"
- + " expected");
- } catch (SecurityException e) {
- // expected
- } catch (RemoteException e) {
- fail("Unexpected remote exception");
- }
}
@SmallTest