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

Commit 7e5fd51c authored by Eugene Susla's avatar Eugene Susla Committed by android-build-merger
Browse files

Merge "Fix companion uses-permission enforcement" into oc-dev

am: 7a4cf16c

Change-Id: Iad09afd86c9e6b3692654083743d5014b978cac8
parents 730a1168 7a4cf16c
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -47,6 +47,7 @@ import android.os.IBinder;
import android.os.IDeviceIdleController;
import android.os.IDeviceIdleController;
import android.os.IInterface;
import android.os.IInterface;
import android.os.Parcel;
import android.os.Parcel;
import android.os.Process;
import android.os.RemoteException;
import android.os.RemoteException;
import android.os.ResultReceiver;
import android.os.ResultReceiver;
import android.os.ServiceManager;
import android.os.ServiceManager;
@@ -345,7 +346,7 @@ public class CompanionDeviceManagerService extends SystemService implements Bind
    }
    }


    private static boolean isCallerSystem() {
    private static boolean isCallerSystem() {
        return getCallingUserId() == UserHandle.USER_SYSTEM;
        return Binder.getCallingUid() == Process.SYSTEM_UID;
    }
    }


    private ServiceConnection createServiceConnection(
    private ServiceConnection createServiceConnection(