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

Commit 7bcc40e3 authored by Unpublished's avatar Unpublished Committed by Michael W
Browse files

We don't want to feel deprecated...

use official api instead of deprecated internal method that prints an
error everytime we call it

Change-Id: Ie00efe5f514ff8db2b82eeade3a588a17af8cfb4
parent 13e529d5
Loading
Loading
Loading
Loading
+9 −12
Original line number Diff line number Diff line
@@ -2349,19 +2349,16 @@ public final class ActivityManagerService extends ActivityManagerNative
                    Intent infoIntent = new Intent(Settings.ACTION_APP_OPS_DETAILS_SETTINGS,
                            Uri.fromParts("package", root.packageName, null));
                    Notification notification = new Notification();
                    notification.icon = com.android.internal.R.drawable.stat_notify_privacy_guard;
                    notification.when = 0;
                    notification.flags = Notification.FLAG_ONGOING_EVENT;
                    notification.priority = Notification.PRIORITY_LOW;
                    notification.defaults = 0;
                    notification.sound = null;
                    notification.vibrate = null;
                    notification.setLatestEventInfo(mContext,
                            title, text,
                            PendingIntent.getActivityAsUser(mContext, 0, infoIntent,
                                    PendingIntent.FLAG_CANCEL_CURRENT, null,
                    Notification.Builder builder = new Notification.Builder(mContext);
                    builder.setSmallIcon(com.android.internal.R.drawable.stat_notify_privacy_guard)
                            .setOngoing(true)
                            .setPriority(Notification.PRIORITY_LOW)
                            .setContentTitle(title)
                            .setContentText(text)
                            .setContentIntent(PendingIntent.getActivityAsUser(mContext, 0,
                                    infoIntent, PendingIntent.FLAG_CANCEL_CURRENT, null,
                                    new UserHandle(root.userId)));
                    Notification notification = builder.build();
                    try {
                        int[] outId = new int[1];