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

Commit 2eaa4816 authored by Shunta Sato's avatar Shunta Sato
Browse files

Make tetherChangePermission to be secured for AppOps permission

Symptom:
AppOps verified the incorrect package of calling tether state
changing API.
It threw SecurityException by mistake.

Solution:
Pass the correct package name to enforceTetherChangePermission.

Bug: 32931147
Change-Id: Ib10db45768e62d9b7ffe0318ca97edaaf2513802
parent f2f15eb1
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -522,11 +522,11 @@ public class ConnectivityServiceMock extends IConnectivityManager.Stub
        throw new RuntimeException("not implemented");
    }

    public int tether(String iface) {
    public int tether(String iface, String callerPkg) {
        throw new RuntimeException("not implemented");
    }

    public int untether(String iface) {
    public int untether(String iface, String callerPkg) {
        throw new RuntimeException("not implemented");
    }

@@ -546,7 +546,7 @@ public class ConnectivityServiceMock extends IConnectivityManager.Stub
        throw new RuntimeException("not implemented");
    }

    public int setUsbTethering(boolean enable) {
    public int setUsbTethering(boolean enable, String callerPkg) {
        throw new RuntimeException("not implemented");
    }

@@ -572,12 +572,13 @@ public class ConnectivityServiceMock extends IConnectivityManager.Stub
    }

    @Override
    public void startTethering(int type, ResultReceiver receiver, boolean showProvisioningUi) {
    public void startTethering(int type, ResultReceiver receiver, boolean showProvisioningUi,
            String callerPkg) {
        throw new RuntimeException("not implemented");
    }

    @Override
    public void stopTethering(int type) {
    public void stopTethering(int type, String callerPkg) {
        throw new RuntimeException("not implemented");
    }