Loading core/java/android/content/Context.java +12 −1 Original line number Original line Diff line number Diff line Loading @@ -861,12 +861,23 @@ public abstract class Context { * <em>must</em> be sure to use {@link #unregisterComponentCallbacks} when * <em>must</em> be sure to use {@link #unregisterComponentCallbacks} when * appropriate in the future; this will not be removed for you. * appropriate in the future; this will not be removed for you. * <p> * <p> * After {@link Build.VERSION_CODES#S}, Registering the ComponentCallbacks to Context created * After {@link Build.VERSION_CODES#S}, registering the ComponentCallbacks to Context created * via {@link #createWindowContext(int, Bundle)} or * via {@link #createWindowContext(int, Bundle)} or * {@link #createWindowContext(Display, int, Bundle)} will receive * {@link #createWindowContext(Display, int, Bundle)} will receive * {@link ComponentCallbacks#onConfigurationChanged(Configuration)} from Window Context rather * {@link ComponentCallbacks#onConfigurationChanged(Configuration)} from Window Context rather * than its base application. It is helpful if you want to handle UI components that * than its base application. It is helpful if you want to handle UI components that * associated with the Window Context when the Window Context has configuration changes.</p> * associated with the Window Context when the Window Context has configuration changes.</p> * <p> * After {@link Build.VERSION_CODES#TIRAMISU}, registering the ComponentCallbacks to * {@link Activity} context will receive * {@link ComponentCallbacks#onConfigurationChanged(Configuration)} from * {@link Activity#onConfigurationChanged(Configuration)} rather than its base application.</p> * <p> * After {@link Build.VERSION_CODES#UPSIDE_DOWN_CAKE}, registering the ComponentCallbacks to * {@link android.inputmethodservice.InputMethodService} will receive * {@link ComponentCallbacks#onConfigurationChanged(Configuration)} from InputmethodService * rather than its base application. It is helpful if you want to handle UI components when the * IME has configuration changes.</p> * * * @param callback The interface to call. This can be either a * @param callback The interface to call. This can be either a * {@link ComponentCallbacks} or {@link ComponentCallbacks2} interface. * {@link ComponentCallbacks} or {@link ComponentCallbacks2} interface. Loading core/java/android/window/WindowProviderService.java +0 −1 Original line number Original line Diff line number Diff line Loading @@ -129,7 +129,6 @@ public abstract class WindowProviderService extends Service implements WindowPro @SuppressLint({"OnNameExpected", "ExecutorRegistration"}) @SuppressLint({"OnNameExpected", "ExecutorRegistration"}) // Suppress lint because this is a legacy named function and doesn't have an optional param // Suppress lint because this is a legacy named function and doesn't have an optional param // for executor. // for executor. // TODO(b/259347943): Update documentation for U. /** /** * Here we override to prevent WindowProviderService from invoking * Here we override to prevent WindowProviderService from invoking * {@link Application.registerComponentCallback}, which will result in callback registered * {@link Application.registerComponentCallback}, which will result in callback registered Loading Loading
core/java/android/content/Context.java +12 −1 Original line number Original line Diff line number Diff line Loading @@ -861,12 +861,23 @@ public abstract class Context { * <em>must</em> be sure to use {@link #unregisterComponentCallbacks} when * <em>must</em> be sure to use {@link #unregisterComponentCallbacks} when * appropriate in the future; this will not be removed for you. * appropriate in the future; this will not be removed for you. * <p> * <p> * After {@link Build.VERSION_CODES#S}, Registering the ComponentCallbacks to Context created * After {@link Build.VERSION_CODES#S}, registering the ComponentCallbacks to Context created * via {@link #createWindowContext(int, Bundle)} or * via {@link #createWindowContext(int, Bundle)} or * {@link #createWindowContext(Display, int, Bundle)} will receive * {@link #createWindowContext(Display, int, Bundle)} will receive * {@link ComponentCallbacks#onConfigurationChanged(Configuration)} from Window Context rather * {@link ComponentCallbacks#onConfigurationChanged(Configuration)} from Window Context rather * than its base application. It is helpful if you want to handle UI components that * than its base application. It is helpful if you want to handle UI components that * associated with the Window Context when the Window Context has configuration changes.</p> * associated with the Window Context when the Window Context has configuration changes.</p> * <p> * After {@link Build.VERSION_CODES#TIRAMISU}, registering the ComponentCallbacks to * {@link Activity} context will receive * {@link ComponentCallbacks#onConfigurationChanged(Configuration)} from * {@link Activity#onConfigurationChanged(Configuration)} rather than its base application.</p> * <p> * After {@link Build.VERSION_CODES#UPSIDE_DOWN_CAKE}, registering the ComponentCallbacks to * {@link android.inputmethodservice.InputMethodService} will receive * {@link ComponentCallbacks#onConfigurationChanged(Configuration)} from InputmethodService * rather than its base application. It is helpful if you want to handle UI components when the * IME has configuration changes.</p> * * * @param callback The interface to call. This can be either a * @param callback The interface to call. This can be either a * {@link ComponentCallbacks} or {@link ComponentCallbacks2} interface. * {@link ComponentCallbacks} or {@link ComponentCallbacks2} interface. Loading
core/java/android/window/WindowProviderService.java +0 −1 Original line number Original line Diff line number Diff line Loading @@ -129,7 +129,6 @@ public abstract class WindowProviderService extends Service implements WindowPro @SuppressLint({"OnNameExpected", "ExecutorRegistration"}) @SuppressLint({"OnNameExpected", "ExecutorRegistration"}) // Suppress lint because this is a legacy named function and doesn't have an optional param // Suppress lint because this is a legacy named function and doesn't have an optional param // for executor. // for executor. // TODO(b/259347943): Update documentation for U. /** /** * Here we override to prevent WindowProviderService from invoking * Here we override to prevent WindowProviderService from invoking * {@link Application.registerComponentCallback}, which will result in callback registered * {@link Application.registerComponentCallback}, which will result in callback registered Loading