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

Commit 216e314d authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 4386596 from 9bc71c49 to oc-mr1-release

Change-Id: If8819e391730769c0780018c4a2a45ca0b3d7401
parents b6835339 9bc71c49
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1017,6 +1017,7 @@ framework_docs_LOCAL_DROIDDOC_OPTIONS := \
    -since $(SRC_API_DIR)/24.txt 24 \
    -since $(SRC_API_DIR)/25.txt 25 \
    -since $(SRC_API_DIR)/26.txt 26 \
    -since $(SRC_API_DIR)/27.txt 27 \
    -werror -lerror -hide 111 -hide 113 -hide 121 -hide 125 -hide 126 -hide 127 -hide 128 \
    -overview $(LOCAL_PATH)/core/java/overview.html \

+1 −1
Original line number Diff line number Diff line
@@ -956,7 +956,7 @@
        android:permissionGroup="android.permission-group.MICROPHONE"
        android:label="@string/permlab_recordAudio"
        android:description="@string/permdesc_recordAudio"
        android:protectionLevel="dangerous"/>
        android:protectionLevel="dangerous|instant"/>

    <!-- ====================================================================== -->
    <!-- Permissions for accessing the UCE Service                              -->
+1 −1
Original line number Diff line number Diff line
@@ -384,7 +384,7 @@ public class DozeScrimController {
            if (mDozeParameters.getAlwaysOn()) {
                // Setting power states can happen after we push out the frame. Make sure we
                // stay fully opaque until the power state request reaches the lower levels.
                setDozeInFrontAlphaDelayed(mAodFrontScrimOpacity, 30);
                setDozeInFrontAlphaDelayed(mAodFrontScrimOpacity, 100);
            }
        }
    };
+3 −4
Original line number Diff line number Diff line
@@ -205,9 +205,8 @@ public class MediaSessionService extends SystemService implements Monitor {
    }

    private List<MediaSessionRecord> getActiveSessionsLocked(int userId) {
        List<MediaSessionRecord> records;
        List<MediaSessionRecord> records = new ArrayList<>();
        if (userId == UserHandle.USER_ALL) {
            records = new ArrayList<>();
            int size = mUserRecords.size();
            for (int i = 0; i < size; i++) {
                records.addAll(mUserRecords.valueAt(i).mPriorityStack.getActiveSessions(userId));
@@ -216,9 +215,9 @@ public class MediaSessionService extends SystemService implements Monitor {
            FullUserRecord user = getFullUserRecordLocked(userId);
            if (user == null) {
                Log.w(TAG, "getSessions failed. Unknown user " + userId);
                return new ArrayList<>();
                return records;
            }
            records = user.mPriorityStack.getActiveSessions(userId);
            records.addAll(user.mPriorityStack.getActiveSessions(userId));
        }

        // Return global priority session at the first whenever it's asked.
+17 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ import android.os.UserManager;
import android.os.UserManagerInternal;
import android.os.UserManagerInternal.UserRestrictionsListener;
import android.service.oemlock.IOemLockService;
import android.service.persistentdata.PersistentDataBlockManager;
import android.util.Slog;

import com.android.server.LocalServices;
@@ -98,6 +99,7 @@ public class OemLockService extends SystemService {
                        !newRestrictions.getBoolean(UserManager.DISALLOW_FACTORY_RESET);
                if (!unlockAllowedByAdmin) {
                    mOemLock.setOemUnlockAllowedByDevice(false);
                    setPersistentDataBlockOemUnlockAllowedBit(false);
                }
            }
        }
@@ -158,6 +160,7 @@ public class OemLockService extends SystemService {
                }

                mOemLock.setOemUnlockAllowedByDevice(allowedByUser);
                setPersistentDataBlockOemUnlockAllowedBit(allowedByUser);
            } finally {
                Binder.restoreCallingIdentity(token);
            }
@@ -202,6 +205,20 @@ public class OemLockService extends SystemService {
        }
    };

    /**
     * Always synchronize the OemUnlockAllowed bit to the FRP partition, which
     * is used to erase FRP information on a unlockable device.
     */
    private void setPersistentDataBlockOemUnlockAllowedBit(boolean allowed) {
        final PersistentDataBlockManager pdbm = (PersistentDataBlockManager)
                mContext.getSystemService(Context.PERSISTENT_DATA_BLOCK_SERVICE);
        // if mOemLock is PersistentDataBlockLock, then the bit should have already been set
        if (pdbm != null && !(mOemLock instanceof PersistentDataBlockLock)) {
            Slog.i(TAG, "Update OEM Unlock bit in pst partition to " + allowed);
            pdbm.setOemUnlockEnabled(allowed);
        }
    }

    private boolean isOemUnlockAllowedByAdmin() {
        return !UserManager.get(mContext)
                .hasUserRestriction(UserManager.DISALLOW_FACTORY_RESET, UserHandle.SYSTEM);
Loading