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

Commit 4da54f0c authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 7989966 from f49cf8a4 to sc-v2-release

Change-Id: Ic40ce681d3e567ffe4b92049bb6df3c6b4e5a2a7
parents 1a1a9c3f f49cf8a4
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -518,7 +518,9 @@ public abstract class AccessibilityService extends Service {
    public static final int GLOBAL_ACTION_POWER_DIALOG = 6;

    /**
     * Action to toggle docking the current app's window
     * Action to toggle docking the current app's window.
     * <p>
     * <strong>Note:</strong>  It is effective only if it appears in {@link #getSystemActions()}.
     */
    public static final int GLOBAL_ACTION_TOGGLE_SPLIT_SCREEN = 7;

+14 −2
Original line number Diff line number Diff line
@@ -321,7 +321,8 @@ public final class ActivityThread extends ClientTransactionHandler

    @UnsupportedAppUsage
    private ContextImpl mSystemContext;
    private final SparseArray<ContextImpl> mDisplaySystemUiContexts = new SparseArray<>();
    @GuardedBy("this")
    private SparseArray<ContextImpl> mDisplaySystemUiContexts;

    @UnsupportedAppUsage
    static volatile IPackageManager sPackageManager;
@@ -2650,7 +2651,6 @@ public final class ActivityThread extends ClientTransactionHandler
        }
    }

    @Override
    @NonNull
    public ContextImpl getSystemUiContext() {
        return getSystemUiContext(DEFAULT_DISPLAY);
@@ -2664,6 +2664,9 @@ public final class ActivityThread extends ClientTransactionHandler
    @NonNull
    public ContextImpl getSystemUiContext(int displayId) {
        synchronized (this) {
            if (mDisplaySystemUiContexts == null) {
                mDisplaySystemUiContexts = new SparseArray<>();
            }
            ContextImpl systemUiContext = mDisplaySystemUiContexts.get(displayId);
            if (systemUiContext == null) {
                systemUiContext = ContextImpl.createSystemUiContext(getSystemContext(), displayId);
@@ -2673,6 +2676,15 @@ public final class ActivityThread extends ClientTransactionHandler
        }
    }

    @Nullable
    @Override
    public ContextImpl getSystemUiContextNoCreate() {
        synchronized (this) {
            if (mDisplaySystemUiContexts == null) return null;
            return mDisplaySystemUiContexts.get(DEFAULT_DISPLAY);
        }
    }

    public void installSystemApplicationInfo(ApplicationInfo info, ClassLoader classLoader) {
        synchronized (this) {
            getSystemContext().installSystemApplicationInfo(info, classLoader);
+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ import java.util.ArrayList;
interface ActivityThreadInternal {
    ContextImpl getSystemContext();

    ContextImpl getSystemUiContext();
    ContextImpl getSystemUiContextNoCreate();

    boolean isInDensityCompatMode();

+7 −3
Original line number Diff line number Diff line
@@ -154,9 +154,12 @@ class ConfigurationController {
        int configDiff;
        boolean equivalent;

        synchronized (mResourcesManager) {
        // Get theme outside of synchronization to avoid nested lock.
        final Resources.Theme systemTheme = mActivityThread.getSystemContext().getTheme();
            final Resources.Theme systemUiTheme = mActivityThread.getSystemUiContext().getTheme();
        final ContextImpl systemUiContext = mActivityThread.getSystemUiContextNoCreate();
        final Resources.Theme systemUiTheme =
                systemUiContext != null ? systemUiContext.getTheme() : null;
        synchronized (mResourcesManager) {
            if (mPendingConfiguration != null) {
                if (!mPendingConfiguration.isOtherSeqNewer(config)) {
                    config = mPendingConfiguration;
@@ -207,7 +210,8 @@ class ConfigurationController {
                systemTheme.rebase();
            }

            if ((systemUiTheme.getChangingConfigurations() & configDiff) != 0) {
            if (systemUiTheme != null
                    && (systemUiTheme.getChangingConfigurations() & configDiff) != 0) {
                systemUiTheme.rebase();
            }
        }
+7 −4
Original line number Diff line number Diff line
@@ -1750,8 +1750,9 @@ public class VoiceInteractionSession implements KeyEvent.Callback, ComponentCall
    /**
     * Called when there has been a failure transferring the {@link AssistStructure} to
     * the assistant.  This may happen, for example, if the data is too large and results
     * in an out of memory exception, or the client has provided corrupt data.  This will
     * be called immediately before {@link #onHandleAssist} and the AssistStructure supplied
     * in an out of memory exception, the data has been cleared during transferring due to
     * the new incoming assist data, or the client has provided corrupt data. This will be
     * called immediately before {@link #onHandleAssist} and the AssistStructure supplied
     * there afterwards will be null.
     *
     * @param failure The failure exception that was thrown when building the
@@ -1789,7 +1790,8 @@ public class VoiceInteractionSession implements KeyEvent.Callback, ComponentCall
     * Called to receive data from the application that the user was currently viewing when
     * an assist session is started. If the original show request did not specify
     * {@link #SHOW_WITH_ASSIST}, {@link AssistState} parameter will only provide
     * {@link ActivityId}.
     * {@link ActivityId}. If there was a failure to write the assist data to
     * {@link AssistStructure}, the {@link AssistState#getAssistStructure()} will return null.
     *
     * <p>This method is called for all activities along with an index and count that indicates
     * which activity the data is for. {@code index} will be between 0 and {@code count}-1 and
@@ -2214,7 +2216,8 @@ public class VoiceInteractionSession implements KeyEvent.Callback, ComponentCall
         * @return If available, the structure definition of all windows currently
         * displayed by the app. May be null if assist data has been disabled by the user
         * or device policy; will be null if the original show request did not specify
         * {@link #SHOW_WITH_ASSIST}; will be an empty stub if the application has disabled assist
         * {@link #SHOW_WITH_ASSIST} or the assist data has been corrupt when writing the data to
         * {@link AssistStructure}; will be an empty stub if the application has disabled assist
         * by marking its window as secure.
         */
        public @Nullable AssistStructure getAssistStructure() {
Loading