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

Commit 577c9c86 authored by Jeongik Cha's avatar Jeongik Cha
Browse files

isDeclared handles SecurityException as well

It is verbose to handle SecurityException in caller, and the exception
means the service isn't reachable from the caller anyway.

Bug: 298545413
Test: remove some services and then call isDeclared.
Change-Id: I84d4e09d1331538181ec8056e42cb30a29d8fa0f
parent 9a792ca2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -245,7 +245,7 @@ public final class ServiceManager {
    public static boolean isDeclared(@NonNull String name) {
        try {
            return getIServiceManager().isDeclared(name);
        } catch (RemoteException e) {
        } catch (RemoteException | SecurityException e) {
            Log.e(TAG, "error in isDeclared", e);
            return false;
        }