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

Commit 99d8d1fd authored by Bill Yi's avatar Bill Yi Committed by Android (Google) Code Review
Browse files

Merge "Merge SQ1A.220105.002 to stage-aosp-master - DO NOT MERGE" into stage-aosp-master

parents e88de1e6 e515a3e9
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package android.app.admin;

import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.UserIdInt;
import android.content.ComponentName;
@@ -76,6 +77,13 @@ public abstract class DevicePolicyManagerInternal {
    public abstract void addOnCrossProfileWidgetProvidersChangeListener(
            OnCrossProfileWidgetProvidersChangeListener listener);

    /**
     * @param userHandle the handle of the user whose profile owner is being fetched.
     * @return the configured supervision app if it exists and is the device owner or policy owner.
     */
    public abstract @Nullable ComponentName getProfileOwnerOrDeviceOwnerSupervisionComponent(
            @NonNull UserHandle userHandle);

    /**
     * Checks if an app with given uid is an active device owner of its user.
     *
+24 −12
Original line number Diff line number Diff line
@@ -800,11 +800,7 @@ public final class ViewRootImpl implements ViewParent,
                context);
        mCompatibleVisibilityInfo = new SystemUiVisibilityInfo();
        mAccessibilityManager = AccessibilityManager.getInstance(context);
        mAccessibilityManager.addAccessibilityStateChangeListener(
                mAccessibilityInteractionConnectionManager, mHandler);
        mHighContrastTextManager = new HighContrastTextManager();
        mAccessibilityManager.addHighTextContrastStateChangeListener(
                mHighContrastTextManager, mHandler);
        mViewConfiguration = ViewConfiguration.get(context);
        mDensity = context.getResources().getDisplayMetrics().densityDpi;
        mNoncompatDensity = context.getResources().getDisplayMetrics().noncompatDensityDpi;
@@ -1004,8 +1000,6 @@ public final class ViewRootImpl implements ViewParent,
                mView = view;

                mAttachInfo.mDisplayState = mDisplay.getState();
                mDisplayManager.registerDisplayListener(mDisplayListener, mHandler);

                mViewLayoutDirectionInitial = mView.getRawLayoutDirection();
                mFallbackEventHandler.setView(view);
                mWindowAttributes.copyFrom(attrs);
@@ -1198,6 +1192,7 @@ public final class ViewRootImpl implements ViewParent,
                            "Unable to add window -- unknown error code " + res);
                }

                registerListeners();
                if ((res & WindowManagerGlobal.ADD_FLAG_USE_BLAST) != 0) {
                    mUseBLASTAdapter = true;
                }
@@ -1254,6 +1249,28 @@ public final class ViewRootImpl implements ViewParent,
        }
    }

    /**
     * Register any kind of listeners if setView was success.
     */
    private void registerListeners() {
        mAccessibilityManager.addAccessibilityStateChangeListener(
                mAccessibilityInteractionConnectionManager, mHandler);
        mAccessibilityManager.addHighTextContrastStateChangeListener(
                mHighContrastTextManager, mHandler);
        mDisplayManager.registerDisplayListener(mDisplayListener, mHandler);
    }

    /**
     * Unregister all listeners while detachedFromWindow.
     */
    private void unregisterListeners() {
        mAccessibilityManager.removeAccessibilityStateChangeListener(
                mAccessibilityInteractionConnectionManager);
        mAccessibilityManager.removeHighTextContrastStateChangeListener(
                mHighContrastTextManager);
        mDisplayManager.unregisterDisplayListener(mDisplayListener);
    }

    private void setTag() {
        final String[] split = mWindowAttributes.getTitle().toString().split("\\.");
        if (split.length > 0) {
@@ -4979,10 +4996,6 @@ public final class ViewRootImpl implements ViewParent,
        }

        mAccessibilityInteractionConnectionManager.ensureNoConnection();
        mAccessibilityManager.removeAccessibilityStateChangeListener(
                mAccessibilityInteractionConnectionManager);
        mAccessibilityManager.removeHighTextContrastStateChangeListener(
                mHighContrastTextManager);
        removeSendWindowContentChangedCallback();

        destroyHardwareRenderer();
@@ -5015,8 +5028,7 @@ public final class ViewRootImpl implements ViewParent,
            mInputEventReceiver = null;
        }

        mDisplayManager.unregisterDisplayListener(mDisplayListener);

        unregisterListeners();
        unscheduleTraversals();
    }

+3 −2
Original line number Diff line number Diff line
@@ -1908,8 +1908,9 @@
         STREAM_MUSIC as if it's on TV platform. -->
    <bool name="config_single_volume">false</bool>

    <!-- Flag indicating whether the volume panel should show remote sessions. -->
    <bool name="config_volumeShowRemoteSessions">true</bool>
    <!-- Flag indicating whether platform level volume adjustments are enabled for remote sessions
         on grouped devices. -->
    <bool name="config_volumeAdjustmentForRemoteGroupSessions">true</bool>

    <!-- Flag indicating that an outbound call must have a call capable phone account
         that has declared it can process the call's handle. -->
+1 −1
Original line number Diff line number Diff line
@@ -4432,7 +4432,7 @@

  <java-symbol type="dimen" name="config_wallpaperDimAmount" />

  <java-symbol type="bool" name="config_volumeShowRemoteSessions" />
  <java-symbol type="bool" name="config_volumeAdjustmentForRemoteGroupSessions" />

  <!-- List of shared library packages that should be loaded by the classloader after the
       code and resources provided by applications. -->
+13 −0
Original line number Diff line number Diff line
@@ -83,6 +83,19 @@ public class DisplayLayout {
    private boolean mHasStatusBar = false;
    private int mNavBarFrameHeight = 0;

    /**
     * Different from {@link #equals(Object)}, this method compares the basic geometry properties
     * of two {@link DisplayLayout} objects including width, height, rotation, density and cutout.
     * @return {@code true} if the given {@link DisplayLayout} is identical geometry wise.
     */
    public boolean isSameGeometry(@NonNull DisplayLayout other) {
        return mWidth == other.mWidth
                && mHeight == other.mHeight
                && mRotation == other.mRotation
                && mDensityDpi == other.mDensityDpi
                && Objects.equals(mCutout, other.mCutout);
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
Loading