Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 180ab777 authored by Chris Li's avatar Chris Li Committed by Android (Google) Code Review
Browse files

Merge "Update doc for registerComponentCallbacks" into main

parents 4bec55f2 5e5b82a6
Loading
Loading
Loading
Loading
+12 −1
Original line number Original line Diff line number Diff line
@@ -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.
+0 −1
Original line number Original line Diff line number Diff line
@@ -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