Loading libs/hwui/service/GraphicsStatsService.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -559,6 +559,7 @@ void GraphicsStatsService::finishDumpInMemory(Dump* dump, AStatsEventList* data, AStatsEvent_writeBool(event, !lastFullDay); AStatsEvent_build(event); } delete dump; } Loading packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotNotificationsController.java +4 −2 Original line number Diff line number Diff line Loading @@ -205,7 +205,8 @@ public class ScreenshotNotificationsController { mPublicNotificationBuilder .setContentTitle(mResources.getString(R.string.screenshot_saved_title)) .setContentText(mResources.getString(R.string.screenshot_saved_text)) .setContentIntent(PendingIntent.getActivity(mContext, 0, launchIntent, 0)) .setContentIntent(PendingIntent .getActivity(mContext, 0, launchIntent, PendingIntent.FLAG_IMMUTABLE)) .setWhen(now) .setAutoCancel(true) .setColor(mContext.getColor( Loading @@ -213,7 +214,8 @@ public class ScreenshotNotificationsController { mNotificationBuilder .setContentTitle(mResources.getString(R.string.screenshot_saved_title)) .setContentText(mResources.getString(R.string.screenshot_saved_text)) .setContentIntent(PendingIntent.getActivity(mContext, 0, launchIntent, 0)) .setContentIntent(PendingIntent .getActivity(mContext, 0, launchIntent, PendingIntent.FLAG_IMMUTABLE)) .setWhen(now) .setAutoCancel(true) .setColor(mContext.getColor( Loading packages/SystemUI/src/com/android/systemui/util/leak/LeakReporter.java +6 −2 Original line number Diff line number Diff line Loading @@ -104,9 +104,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 +4 −0 Original line number Diff line number Diff line Loading @@ -3318,6 +3318,10 @@ public class ActivityManagerService extends IActivityManager.Stub @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 services/core/java/com/android/server/notification/PreferencesHelper.java +27 −0 Original line number Diff line number Diff line Loading @@ -75,6 +75,7 @@ import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Objects; Loading Loading @@ -173,6 +174,8 @@ public class PreferencesHelper implements RankingConfig { private boolean mAllowInvalidShortcuts = false; private Map<String, List<String>> mOemLockedApps = new HashMap(); public PreferencesHelper(Context context, PackageManager pm, RankingHandler rankingHandler, ZenModeHelper zenHelper, NotificationChannelLogger notificationChannelLogger, AppOpsManager appOpsManager, Loading Loading @@ -314,6 +317,12 @@ public class PreferencesHelper implements RankingConfig { } channel.setImportanceLockedByCriticalDeviceFunction( r.defaultAppLockedImportance); channel.setImportanceLockedByOEM(r.oemLockedImportance); if (!channel.isImportanceLockedByOEM()) { if (r.oemLockedChannels.contains(channel.getId())) { channel.setImportanceLockedByOEM(true); } } boolean isInvalidShortcutChannel = channel.getConversationId() != null && channel.getConversationId().contains( Loading Loading @@ -396,6 +405,14 @@ public class PreferencesHelper implements RankingConfig { r.visibility = visibility; r.showBadge = showBadge; r.bubblePreference = bubblePreference; if (mOemLockedApps.containsKey(r.pkg)) { List<String> channels = mOemLockedApps.get(r.pkg); if (channels == null || channels.isEmpty()) { r.oemLockedImportance = true; } else { r.oemLockedChannels = channels; } } try { createDefaultChannelIfNeededLocked(r); Loading Loading @@ -1149,8 +1166,10 @@ public class PreferencesHelper implements RankingConfig { String channelId = appSplit.length == 2 ? appSplit[1] : null; synchronized (mPackagePreferences) { boolean foundApp = false; for (PackagePreferences r : mPackagePreferences.values()) { if (r.pkg.equals(appName)) { foundApp = true; if (channelId == null) { // lock all channels for the app r.oemLockedImportance = true; Loading @@ -1168,6 +1187,14 @@ public class PreferencesHelper implements RankingConfig { } } } if (!foundApp) { List<String> channels = mOemLockedApps.getOrDefault(appName, new ArrayList<>()); if (channelId != null) { channels.add(channelId); } mOemLockedApps.put(appName, channels); } } } } Loading Loading
libs/hwui/service/GraphicsStatsService.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -559,6 +559,7 @@ void GraphicsStatsService::finishDumpInMemory(Dump* dump, AStatsEventList* data, AStatsEvent_writeBool(event, !lastFullDay); AStatsEvent_build(event); } delete dump; } Loading
packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotNotificationsController.java +4 −2 Original line number Diff line number Diff line Loading @@ -205,7 +205,8 @@ public class ScreenshotNotificationsController { mPublicNotificationBuilder .setContentTitle(mResources.getString(R.string.screenshot_saved_title)) .setContentText(mResources.getString(R.string.screenshot_saved_text)) .setContentIntent(PendingIntent.getActivity(mContext, 0, launchIntent, 0)) .setContentIntent(PendingIntent .getActivity(mContext, 0, launchIntent, PendingIntent.FLAG_IMMUTABLE)) .setWhen(now) .setAutoCancel(true) .setColor(mContext.getColor( Loading @@ -213,7 +214,8 @@ public class ScreenshotNotificationsController { mNotificationBuilder .setContentTitle(mResources.getString(R.string.screenshot_saved_title)) .setContentText(mResources.getString(R.string.screenshot_saved_text)) .setContentIntent(PendingIntent.getActivity(mContext, 0, launchIntent, 0)) .setContentIntent(PendingIntent .getActivity(mContext, 0, launchIntent, PendingIntent.FLAG_IMMUTABLE)) .setWhen(now) .setAutoCancel(true) .setColor(mContext.getColor( Loading
packages/SystemUI/src/com/android/systemui/util/leak/LeakReporter.java +6 −2 Original line number Diff line number Diff line Loading @@ -104,9 +104,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 +4 −0 Original line number Diff line number Diff line Loading @@ -3318,6 +3318,10 @@ public class ActivityManagerService extends IActivityManager.Stub @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
services/core/java/com/android/server/notification/PreferencesHelper.java +27 −0 Original line number Diff line number Diff line Loading @@ -75,6 +75,7 @@ import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Objects; Loading Loading @@ -173,6 +174,8 @@ public class PreferencesHelper implements RankingConfig { private boolean mAllowInvalidShortcuts = false; private Map<String, List<String>> mOemLockedApps = new HashMap(); public PreferencesHelper(Context context, PackageManager pm, RankingHandler rankingHandler, ZenModeHelper zenHelper, NotificationChannelLogger notificationChannelLogger, AppOpsManager appOpsManager, Loading Loading @@ -314,6 +317,12 @@ public class PreferencesHelper implements RankingConfig { } channel.setImportanceLockedByCriticalDeviceFunction( r.defaultAppLockedImportance); channel.setImportanceLockedByOEM(r.oemLockedImportance); if (!channel.isImportanceLockedByOEM()) { if (r.oemLockedChannels.contains(channel.getId())) { channel.setImportanceLockedByOEM(true); } } boolean isInvalidShortcutChannel = channel.getConversationId() != null && channel.getConversationId().contains( Loading Loading @@ -396,6 +405,14 @@ public class PreferencesHelper implements RankingConfig { r.visibility = visibility; r.showBadge = showBadge; r.bubblePreference = bubblePreference; if (mOemLockedApps.containsKey(r.pkg)) { List<String> channels = mOemLockedApps.get(r.pkg); if (channels == null || channels.isEmpty()) { r.oemLockedImportance = true; } else { r.oemLockedChannels = channels; } } try { createDefaultChannelIfNeededLocked(r); Loading Loading @@ -1149,8 +1166,10 @@ public class PreferencesHelper implements RankingConfig { String channelId = appSplit.length == 2 ? appSplit[1] : null; synchronized (mPackagePreferences) { boolean foundApp = false; for (PackagePreferences r : mPackagePreferences.values()) { if (r.pkg.equals(appName)) { foundApp = true; if (channelId == null) { // lock all channels for the app r.oemLockedImportance = true; Loading @@ -1168,6 +1187,14 @@ public class PreferencesHelper implements RankingConfig { } } } if (!foundApp) { List<String> channels = mOemLockedApps.getOrDefault(appName, new ArrayList<>()); if (channelId != null) { channels.add(channelId); } mOemLockedApps.put(appName, channels); } } } } Loading