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

Commit 5e5b82a6 authored by Chris Li's avatar Chris Li
Browse files

Update doc for registerComponentCallbacks

Fix: 259347943
Test: JavaDoc change only
Change-Id: I8b583e80fd661f970e48ea8977fbd4e40f4950f4
parent 4635cff9
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -860,12 +860,23 @@ public abstract class Context {
     * <em>must</em> be sure to use {@link #unregisterComponentCallbacks} when
     * appropriate in the future; this will not be removed for you.
     * <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
     * {@link #createWindowContext(Display, int, Bundle)} will receive
     * {@link ComponentCallbacks#onConfigurationChanged(Configuration)} from Window Context rather
     * 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>
     * <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
     * {@link ComponentCallbacks} or {@link ComponentCallbacks2} interface.
+0 −1
Original line number Diff line number Diff line
@@ -129,7 +129,6 @@ public abstract class WindowProviderService extends Service implements WindowPro
    @SuppressLint({"OnNameExpected", "ExecutorRegistration"})
    // Suppress lint because this is a legacy named function and doesn't have an optional param
    // for executor.
    // TODO(b/259347943): Update documentation for U.
    /**
     * Here we override to prevent WindowProviderService from invoking
     * {@link Application.registerComponentCallback}, which will result in callback registered