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

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

Merge tag 'android-9.0.0_r61' into staging/lineage-16.0_merge-android-9.0.0_r61

Android 9.0.0 Release 61 (6780336)

* tag 'android-9.0.0_r61':
  Add missing isShellUser check
  Mark implicit PendingIntents as immutable
  Require a more specific intent
  RESTRICT AUTOMERGE Do not set referrerUri on SessionInfo for non-owners
  Remove unused intent in NiNotification
parents a95ab958 ad31dbbd
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1635,6 +1635,7 @@ public class PackageInstaller {

        /**
         * Get the value set in {@link SessionParams#setOriginatingUri(Uri)}.
         * Note: This value will only be non-null for the owner of the session.
         */
        public @Nullable Uri getOriginatingUri() {
            return originatingUri;
@@ -1649,6 +1650,7 @@ public class PackageInstaller {

        /**
         * Get the value set in {@link SessionParams#setReferrerUri(Uri)}
         * Note: This value will only be non-null for the owner of the session.
         */
        public @Nullable Uri getReferrerUri() {
            return referrerUri;
+1 −6
Original line number Diff line number Diff line
@@ -21,7 +21,6 @@ import java.util.concurrent.TimeUnit;

import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
@@ -399,13 +398,9 @@ public class GpsNetInitiatedHandler {
            mNiNotificationBuilder.setDefaults(0);
        }

        // if not to popup dialog immediately, pending intent will open the dialog
        Intent intent = !mPopupImmediately ? getDlgIntent(notif) : new Intent();
        PendingIntent pi = PendingIntent.getBroadcast(mContext, 0, intent, 0);
        mNiNotificationBuilder.setTicker(getNotifTicker(notif, mContext))
                .setContentTitle(title)
                .setContentText(message)
                .setContentIntent(pi);
                .setContentText(message);

        notificationManager.notifyAsUser(null, notif.notificationId, mNiNotificationBuilder.build(),
                UserHandle.ALL);
+2 −1
Original line number Diff line number Diff line
@@ -138,7 +138,8 @@ public class KeyguardSliceProvider extends SliceProvider implements
    protected void addPrimaryAction(ListBuilder builder) {
        // Add simple action because API requires it; Keyguard handles presenting
        // its own slices so this action + icon are actually never used.
        PendingIntent pi = PendingIntent.getActivity(getContext(), 0, new Intent(), 0);
        PendingIntent pi = PendingIntent.getActivity(getContext(), 0,
            new Intent(getContext(), KeyguardSliceProvider.class), 0);
        Icon icon = Icon.createWithResource(getContext(), R.drawable.ic_access_alarms_big);
        SliceAction action = new SliceAction(pi, icon, mLastText);

+6 −2
Original line number Diff line number Diff line
@@ -93,9 +93,13 @@ public class LeakReporter {
                    .setContentText(String.format(
                            "SystemUI has detected %d leaked objects. Tap to send", garbageCount))
                    .setSmallIcon(com.android.internal.R.drawable.stat_sys_adb)
                    .setContentIntent(PendingIntent.getActivityAsUser(mContext, 0,
                    .setContentIntent(PendingIntent.getActivityAsUser(
                            mContext,
                            0,
                            getIntent(hprofFile, dumpFile),
                            PendingIntent.FLAG_UPDATE_CURRENT, null, UserHandle.CURRENT));
                            PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE,
                            null,
                            UserHandle.CURRENT));
            notiMan.notify(TAG, 0, builder.build());
        } catch (IOException e) {
            Log.e(TAG, "Couldn't dump heap for leak", e);
+9 −0
Original line number Diff line number Diff line
@@ -4907,9 +4907,18 @@ public class ActivityManagerService extends IActivityManager.Stub
        return procState;
    }
    private boolean isCallerShell() {
        final int callingUid = Binder.getCallingUid();
        return callingUid == SHELL_UID || callingUid == ROOT_UID;
    }
    @Override
    public boolean setProcessMemoryTrimLevel(String process, int userId, int level)
            throws RemoteException {
        if (!isCallerShell()) {
            EventLog.writeEvent(0x534e4554, 160390416, Binder.getCallingUid(), "");
            throw new SecurityException("Only shell can call it");
        }
        synchronized (this) {
            final ProcessRecord app = findProcessLocked(process, userId, "setProcessMemoryTrimLevel");
            if (app == null) {
Loading