Loading services/core/java/com/android/server/notification/NotificationManagerService.java +13 −14 Original line number Diff line number Diff line Loading @@ -107,6 +107,7 @@ import android.annotation.CallbackExecutor; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.RequiresPermission; import android.annotation.UserIdInt; import android.annotation.WorkerThread; import android.app.ActivityManager; import android.app.ActivityManagerInternal; Loading Loading @@ -2842,9 +2843,8 @@ public class NotificationManagerService extends SystemService { record = mToastQueue.get(index); record.update(duration); } else { // Limit the number of toasts that any given package except the android // package can enqueue. Prevents DOS attacks and deals with leaks. if (!isSystemToast) { // Limit the number of toasts that any given package can enqueue. // Prevents DOS attacks and deals with leaks. int count = 0; final int N = mToastQueue.size(); for (int i = 0; i < N; i++) { Loading @@ -2858,7 +2858,6 @@ public class NotificationManagerService extends SystemService { } } } } Binder windowToken = new Binder(); mWindowManagerInternal.addWindowToken(windowToken, TYPE_TOAST, displayId); Loading Loading
services/core/java/com/android/server/notification/NotificationManagerService.java +13 −14 Original line number Diff line number Diff line Loading @@ -107,6 +107,7 @@ import android.annotation.CallbackExecutor; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.RequiresPermission; import android.annotation.UserIdInt; import android.annotation.WorkerThread; import android.app.ActivityManager; import android.app.ActivityManagerInternal; Loading Loading @@ -2842,9 +2843,8 @@ public class NotificationManagerService extends SystemService { record = mToastQueue.get(index); record.update(duration); } else { // Limit the number of toasts that any given package except the android // package can enqueue. Prevents DOS attacks and deals with leaks. if (!isSystemToast) { // Limit the number of toasts that any given package can enqueue. // Prevents DOS attacks and deals with leaks. int count = 0; final int N = mToastQueue.size(); for (int i = 0; i < N; i++) { Loading @@ -2858,7 +2858,6 @@ public class NotificationManagerService extends SystemService { } } } } Binder windowToken = new Binder(); mWindowManagerInternal.addWindowToken(windowToken, TYPE_TOAST, displayId); Loading