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

Commit 0116f7cb authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "No sensor access to idle UIDs - framework"

parents 5aff4813 8bd13958
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -22,4 +22,5 @@ interface IPermissionController {
    boolean checkPermission(String permission, int pid, int uid);
    String[] getPackagesForUid(int uid);
    boolean isRuntimePermission(String permission);
    int getPackageUid(String packageName, int flags);
}
+6 −0
Original line number Diff line number Diff line
@@ -1747,6 +1747,12 @@
    <permission android:name="android.permission.SEND_EMBMS_INTENTS"
        android:protectionLevel="signature|privileged" />


    <!-- Allows internal management of the sensor framework
         @hide -->
    <permission android:name="android.permission.MANAGE_SENSORS"
        android:protectionLevel="signature" />

    <!-- Must be required by an ImsService to ensure that only the
         system can bind to it.
         <p>Protection level: signature|privileged
+1 −0
Original line number Diff line number Diff line
@@ -135,6 +135,7 @@
    <uses-permission android:name="android.permission.RESTRICTED_VR_ACCESS" />
    <uses-permission android:name="android.permission.MANAGE_BIND_INSTANT_SERVICE" />
    <uses-permission android:name="android.permission.SET_HARMFUL_APP_WARNINGS" />
    <uses-permission android:name="android.permission.MANAGE_SENSORS" />

    <application android:label="@string/app_label"
                 android:defaultToDeviceProtectedStorage="true"
+10 −0
Original line number Diff line number Diff line
@@ -8601,6 +8601,16 @@ public class ActivityManagerService extends IActivityManager.Stub
            }
            return false;
        }
        @Override
        public int getPackageUid(String packageName, int flags) {
            try {
                return mActivityManagerService.mContext.getPackageManager()
                        .getPackageUid(packageName, flags);
            } catch (NameNotFoundException nnfe) {
                return -1;
            }
        }
    }
    class IntentFirewallInterface implements IntentFirewall.AMSInterface {
+5 −0
Original line number Diff line number Diff line
@@ -62,6 +62,11 @@ public class ServiceManagerPermissionTests extends TestCase {
                public boolean isRuntimePermission(String permission) {
                    return false;
                }

                @Override
                public int getPackageUid(String packageName, int flags) {
                    return -1;
                }
            };
            ServiceManagerNative.asInterface(BinderInternal.getContextObject())
                    .setPermissionController(pc);