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

Commit 70258e8f authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 8731319 from 37b3f064 to tm-qpr1-release

Change-Id: I10fc2a213ff326c47f00684836a90cf1512d18ee
parents 50d7be2f 37b3f064
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -9262,6 +9262,21 @@ public class DevicePolicyManager {
        return null;
    }
    /**
     * Checks if the specified component is the supervision component.
     * @hide
     */
    public boolean isSupervisionComponent(@NonNull ComponentName who) {
        if (mService != null) {
            try {
                return getService().isSupervisionComponent(who);
            } catch (RemoteException re) {
                throw re.rethrowFromSystemServer();
            }
        }
        return false;
    }
    /**
     * @hide
     * @return the human readable name of the organisation associated with this DPM or {@code null}
+1 −0
Original line number Diff line number Diff line
@@ -178,6 +178,7 @@ interface IDevicePolicyManager {
    boolean setProfileOwner(in ComponentName who, String ownerName, int userHandle);
    ComponentName getProfileOwnerAsUser(int userHandle);
    ComponentName getProfileOwnerOrDeviceOwnerSupervisionComponent(in UserHandle userHandle);
    boolean isSupervisionComponent(in ComponentName who);
    String getProfileOwnerName(int userHandle);
    void setProfileEnabled(in ComponentName who);
    void setProfileName(in ComponentName who, String profileName);
+5 −8
Original line number Diff line number Diff line
@@ -559,21 +559,18 @@ public final class DisplayManager {
     * @see #DISPLAY_CATEGORY_PRESENTATION
     */
    public Display[] getDisplays(String category) {
        boolean includeDisabledDisplays = (category != null
                && category.equals(DISPLAY_CATEGORY_ALL_INCLUDING_DISABLED));
        final int[] displayIds = mGlobal.getDisplayIds(includeDisabledDisplays);
        final int[] displayIds = mGlobal.getDisplayIds();
        synchronized (mLock) {
            try {
                if (category != null && category.equals(DISPLAY_CATEGORY_PRESENTATION)) {
                if (category == null
                        || DISPLAY_CATEGORY_ALL_INCLUDING_DISABLED.equals(category)) {
                    addAllDisplaysLocked(mTempDisplays, displayIds);
                } else if (category.equals(DISPLAY_CATEGORY_PRESENTATION)) {
                    addPresentationDisplaysLocked(mTempDisplays, displayIds, Display.TYPE_WIFI);
                    addPresentationDisplaysLocked(mTempDisplays, displayIds, Display.TYPE_EXTERNAL);
                    addPresentationDisplaysLocked(mTempDisplays, displayIds, Display.TYPE_OVERLAY);
                    addPresentationDisplaysLocked(mTempDisplays, displayIds, Display.TYPE_VIRTUAL);
                    addPresentationDisplaysLocked(mTempDisplays, displayIds, Display.TYPE_INTERNAL);
                } else if ((category == null
                        || DISPLAY_CATEGORY_ALL_INCLUDING_DISABLED.equals(category))) {
                    // All displays requested.
                    addAllDisplaysLocked(mTempDisplays, displayIds);
                }
                return mTempDisplays.toArray(new Display[mTempDisplays.size()]);
            } finally {
+1 −12
Original line number Diff line number Diff line
@@ -206,16 +206,6 @@ public final class DisplayManagerGlobal {
     */
    @UnsupportedAppUsage
    public int[] getDisplayIds() {
        return getDisplayIds(/* includeDisabledDisplays= */ false);
    }

    /**
     * Gets all valid logical display ids and invalid ones if specified.
     *
     * @return An array containing all display ids.
     */
    @UnsupportedAppUsage
    public int[] getDisplayIds(boolean includeDisabledDisplays) {
        try {
            synchronized (mLock) {
                if (USE_CACHE) {
@@ -224,8 +214,7 @@ public final class DisplayManagerGlobal {
                    }
                }

                int[] displayIds =
                        mDm.getDisplayIds(includeDisabledDisplays);
                int[] displayIds = mDm.getDisplayIds();
                if (USE_CACHE) {
                    mDisplayIdCache = displayIds;
                }
+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ import android.view.Surface;
interface IDisplayManager {
    @UnsupportedAppUsage
    DisplayInfo getDisplayInfo(int displayId);
    int[] getDisplayIds(boolean includeDisabled);
    int[] getDisplayIds();

    boolean isUidPresentOnDisplay(int uid, int displayId);

Loading