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

Unverified Commit 5df86086 authored by Kevin F. Haggerty's avatar Kevin F. Haggerty
Browse files

Merge tag 'android-9.0.0_r56' of...

Merge tag 'android-9.0.0_r56' of https://android.googlesource.com/platform/frameworks/base into staging/lineage-16.0_merge-android-9.0.0_r56

Android 9.0.0 release 56

* tag 'android-9.0.0_r56' of https://android.googlesource.com/platform/frameworks/base:
  Verify all possible hosts that match web nav
  RESTRICT AUTOMERGE Prevent accessing companion records from arbitrary uids
  Revert "DO NOT MERGE - Kill apps outright for API contract violations"
  RESTRICT AUTOMERGE Use consistent calling uid and package in navigateUpTo
  RESTRICT AUTOMERGE Create separated tasks for different apps from startActivities
  DO NOT MERGE - Kill apps outright for API contract violations
  DO NOT MERGE Ensure package names read from config are system packages.
  RESTRICT AUTOMERGE Update keyguard locked state from TrustManagerService
  Only suspend package from system or shell

Change-Id: I678145bad18e8b34e462cde9f79f2952085f5e55
parents e740651c 39c9bf27
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -3141,6 +3141,11 @@
    <permission android:name="android.permission.OBSERVE_GRANT_REVOKE_PERMISSIONS"
        android:protectionLevel="signature|privileged" />

    <!-- Allows an application to manage the companion devices.
         @hide -->
    <permission android:name="android.permission.MANAGE_COMPANION_DEVICES"
                android:protectionLevel="signature" />

    <!-- @SystemApi Allows an application to use SurfaceFlinger's low level features.
         <p>Not for use by third-party applications.
         @hide
+11 −0
Original line number Diff line number Diff line
@@ -691,6 +691,17 @@ public class KeyStore {
        return onUserPasswordChanged(UserHandle.getUserId(Process.myUid()), newPassword);
    }

    /**
     * Notify keystore about the latest user locked state. This is to support keyguard-bound key.
     */
    public void onUserLockedStateChanged(int userHandle, boolean locked) {
        try {
            mBinder.onKeyguardVisibilityChanged(locked, userHandle);
        } catch (RemoteException e) {
            Log.w(TAG, "Failed to update user locked state " + userHandle, e);
        }
    }

    public int attestKey(
            String alias, KeymasterArguments params, KeymasterCertificateChain outChain) {
        try {
+5 −0
Original line number Diff line number Diff line
@@ -629,6 +629,11 @@ public class CompanionDeviceManagerService extends SystemService implements Bind
                + "associate USER_ID PACKAGE MAC_ADDRESS\n"
                + "disassociate USER_ID PACKAGE MAC_ADDRESS";

        ShellCmd() {
            getContext().enforceCallingOrSelfPermission(
                    android.Manifest.permission.MANAGE_COMPANION_DEVICES, "ShellCmd");
        }

        @Override
        public int onCommand(String cmd) {
            switch (cmd) {
+4 −1
Original line number Diff line number Diff line
@@ -7673,7 +7673,7 @@ public class ActivityManagerService extends IActivityManager.Stub
    }
    @GuardedBy("this")
    private final boolean attachApplicationLocked(IApplicationThread thread,
    private boolean attachApplicationLocked(@NonNull IApplicationThread thread,
            int pid, int callingUid, long startSeq) {
        // Find the application record that is being attached...  either via
@@ -8054,6 +8054,9 @@ public class ActivityManagerService extends IActivityManager.Stub
    @Override
    public final void attachApplication(IApplicationThread thread, long startSeq) {
        if (thread == null) {
            throw new SecurityException("Invalid application interface");
        }
        synchronized (this) {
            int callingPid = Binder.getCallingPid();
            final int callingUid = Binder.getCallingUid();
+10 −5
Original line number Diff line number Diff line
@@ -3945,6 +3945,11 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai

    final boolean navigateUpToLocked(ActivityRecord srec, Intent destIntent, int resultCode,
            Intent resultData) {
        if (srec.app == null || srec.app.thread == null) {
            // Nothing to do if the caller is not attached, because this method should be called
            // from an alive activity.
            return false;
        }
        final TaskRecord task = srec.getTask();
        final ArrayList<ActivityRecord> activities = task.mActivities;
        final int start = activities.indexOf(srec);
@@ -3996,14 +4001,14 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai
        }

        if (parent != null && foundParentInTask) {
            final int callingUid = srec.info.applicationInfo.uid;
            final int parentLaunchMode = parent.info.launchMode;
            final int destIntentFlags = destIntent.getFlags();
            if (parentLaunchMode == ActivityInfo.LAUNCH_SINGLE_INSTANCE ||
                    parentLaunchMode == ActivityInfo.LAUNCH_SINGLE_TASK ||
                    parentLaunchMode == ActivityInfo.LAUNCH_SINGLE_TOP ||
                    (destIntentFlags & Intent.FLAG_ACTIVITY_CLEAR_TOP) != 0) {
                parent.deliverNewIntentLocked(srec.info.applicationInfo.uid, destIntent,
                        srec.packageName);
                parent.deliverNewIntentLocked(callingUid, destIntent, srec.packageName);
            } else {
                try {
                    ActivityInfo aInfo = AppGlobals.getPackageManager().getActivityInfo(
@@ -4016,10 +4021,10 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai
                            .setActivityInfo(aInfo)
                            .setResultTo(parent.appToken)
                            .setCallingPid(-1)
                            .setCallingUid(parent.launchedFromUid)
                            .setCallingPackage(parent.launchedFromPackage)
                            .setCallingUid(callingUid)
                            .setCallingPackage(srec.packageName)
                            .setRealCallingPid(-1)
                            .setRealCallingUid(parent.launchedFromUid)
                            .setRealCallingUid(callingUid)
                            .setComponentSpecified(true)
                            .execute();
                    foundParentInTask = res == ActivityManager.START_SUCCESS;
Loading