Loading core/java/android/content/pm/PackageInstaller.java +2 −0 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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; Loading location/java/com/android/internal/location/GpsNetInitiatedHandler.java +1 −6 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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); Loading packages/SystemUI/src/com/android/systemui/keyguard/KeyguardSliceProvider.java +2 −1 Original line number Diff line number Diff line Loading @@ -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); Loading packages/SystemUI/src/com/android/systemui/util/leak/LeakReporter.java +6 −2 Original line number Diff line number Diff line Loading @@ -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); Loading services/core/java/com/android/server/am/ActivityManagerService.java +9 −0 Original line number Diff line number Diff line Loading @@ -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
core/java/android/content/pm/PackageInstaller.java +2 −0 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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; Loading
location/java/com/android/internal/location/GpsNetInitiatedHandler.java +1 −6 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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); Loading
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardSliceProvider.java +2 −1 Original line number Diff line number Diff line Loading @@ -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); Loading
packages/SystemUI/src/com/android/systemui/util/leak/LeakReporter.java +6 −2 Original line number Diff line number Diff line Loading @@ -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); Loading
services/core/java/com/android/server/am/ActivityManagerService.java +9 −0 Original line number Diff line number Diff line Loading @@ -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) {