From 7f22a4d59c5d6c8dca8c86fb92513bfa7e26f2a2 Mon Sep 17 00:00:00 2001 From: Bishoy Gendy Date: Tue, 17 Jan 2023 17:03:11 +0000 Subject: [PATCH] Replace security exception with silent log in system ui. Bug: 258532462 Test: Using androidx sample app as it's a partial cl of ag/20859924. Change-Id: If31515508d4e88b66e5a096c474eae86b1262ce5 --- .../src/com/android/systemui/statusbar/CommandQueue.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java index cd423dc13c9b2..a66247412517a 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java @@ -55,6 +55,7 @@ import android.os.ParcelFileDescriptor; import android.os.Process; import android.os.RemoteException; import android.util.Pair; +import android.util.Slog; import android.util.SparseArray; import android.view.InsetsState.InternalInsetsType; import android.view.InsetsVisibilities; @@ -1273,7 +1274,8 @@ public class CommandQueue extends IStatusBar.Stub implements public void showMediaOutputSwitcher(String packageName) { int callingUid = Binder.getCallingUid(); if (callingUid != 0 && callingUid != Process.SYSTEM_UID) { - throw new SecurityException("Call only allowed from system server."); + Slog.e(TAG, "Call only allowed from system server."); + return; } synchronized (mLock) { SomeArgs args = SomeArgs.obtain();