diff options
author | 2020-09-02 14:10:07 +0800 | |
---|---|---|
committer | 2021-02-06 15:47:08 +0800 | |
commit | b80fdde45fdee435aa3e55c185b5b0b509bd6741 (patch) | |
tree | 9e4767f1aa8da4a79d99ae3ab148a820fe02d9d3 /tests/permission/src | |
parent | c8c9f8741ebe475e6a6ef8ae9451b7a90f38103f (diff) |
Remove addWindowTokenWithOptions
Since WindowContext won't add WindowToken from the client side,
addWindowTokenWithOption is no more needed. Also remove the logic
to invoke removeWindowToken from the client side.
Bug: 159767464
Bug: 153369119
Test: atest WindowManagerServiceTests WindowManagerPermissionTests
Change-Id: Ib0c948dca223cf8d056865ce3a0d4adaef07d247
Diffstat (limited to 'tests/permission/src')
-rw-r--r-- | tests/permission/src/com/android/framework/permission/tests/WindowManagerPermissionTests.java | 29 |
1 files changed, 1 insertions, 28 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 aeb142b901d2..1fe13fe97fbe 100644 --- a/tests/permission/src/com/android/framework/permission/tests/WindowManagerPermissionTests.java +++ b/tests/permission/src/com/android/framework/permission/tests/WindowManagerPermissionTests.java @@ -28,8 +28,6 @@ import android.view.IWindowManager; import junit.framework.TestCase; -import org.junit.Test; - /** * TODO: Remove this. This is only a placeholder, need to implement this. */ @@ -56,7 +54,7 @@ public class WindowManagerPermissionTests extends TestCase { } try { - mWm.addWindowToken(null, TYPE_APPLICATION, DEFAULT_DISPLAY); + mWm.addWindowToken(null, TYPE_APPLICATION, DEFAULT_DISPLAY, null /* options */); fail("IWindowManager.addWindowToken did not throw SecurityException as" + " expected"); } catch (SecurityException e) { @@ -155,29 +153,4 @@ public class WindowManagerPermissionTests extends TestCase { fail("Unexpected remote exception"); } } - - @Test - public void testADD_WINDOW_TOKEN_WITH_OPTIONS() { - // Verify if addWindowTokenWithOptions throw SecurityException for privileged window type. - try { - mWm.addWindowTokenWithOptions(null, TYPE_APPLICATION, DEFAULT_DISPLAY, null, ""); - fail("IWindowManager.addWindowTokenWithOptions did not throw SecurityException as" - + " expected"); - } catch (SecurityException e) { - // expected - } catch (RemoteException e) { - fail("Unexpected remote exception"); - } - - // Verify if addWindowTokenWithOptions throw SecurityException for null packageName. - try { - mWm.addWindowTokenWithOptions(null, TYPE_APPLICATION, DEFAULT_DISPLAY, null, null); - fail("IWindowManager.addWindowTokenWithOptions did not throw SecurityException as" - + " expected"); - } catch (SecurityException e) { - // expected - } catch (RemoteException e) { - fail("Unexpected remote exception"); - } - } } |