diff options
| author | Charles Chen <charlesccchen@google.com> | 2021-04-13 14:29:44 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2021-04-13 14:29:44 +0000 |
| commit | 030a75463ee64eaee002dcd84f6c27ebd9eacd48 (patch) | |
| tree | 80d61f22754b753bfdd135fe2cefb29dcd117516 /core/java/android/window/WindowContext.java | |
| parent | 6e62271c43d457975b9d4c69dcb87e44d107cfcc (diff) | |
| parent | a5b660e386c38f61b6cd06ee54619c170da4265b (diff) | |
Merge "Enable WindowContext to associate with WindowToken" into sc-dev
Diffstat (limited to 'core/java/android/window/WindowContext.java')
| -rw-r--r-- | core/java/android/window/WindowContext.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/core/java/android/window/WindowContext.java b/core/java/android/window/WindowContext.java index 375f4cf63c3b..901625b0732c 100644 --- a/core/java/android/window/WindowContext.java +++ b/core/java/android/window/WindowContext.java @@ -57,6 +57,8 @@ public class WindowContext extends ContextWrapper { * * @param base Base {@link Context} for this new instance. * @param type Window type to be used with this context. + * @param options A bundle used to pass window-related options. + * * @hide */ public WindowContext(@NonNull Context base, int type, @Nullable Bundle options) { @@ -72,11 +74,12 @@ public class WindowContext extends ContextWrapper { } /** - * Registers this {@link WindowContext} with {@link com.android.server.wm.WindowManagerService} - * to receive configuration changes of the associated {@link WindowManager} node. + * Attaches this {@link WindowContext} to the {@link com.android.server.wm.DisplayArea} + * specified by {@code mType}, {@link #getDisplayId() display ID} and {@code mOptions} + * to receive configuration changes. */ - public void registerWithServer() { - mController.registerListener(mType, getDisplayId(), mOptions); + public void attachToDisplayArea() { + mController.attachToDisplayArea(mType, getDisplayId(), mOptions); } @Override @@ -96,7 +99,7 @@ public class WindowContext extends ContextWrapper { /** Used for test to invoke because we can't invoke finalize directly. */ @VisibleForTesting public void release() { - mController.unregisterListenerIfNeeded(); + mController.detachIfNeeded(); destroy(); } |
