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

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

Merge "Don't provide Build.Serial to apps targeting v2 sandbox"

parents 8c0c2893 7e7465aa
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -6691,16 +6691,15 @@ public class ActivityManagerService extends IActivityManager.Stub
                    : new ProfilerInfo(profileFile, profileFd, samplingInterval, profileAutoStop,
                                       profileStreamingOutput);
            // We deprecated Build.SERIAL and only apps that target pre NMR1
            // SDK can see it. Since access to the serial is now behind a
            // permission we push down the value.
            // We deprecated Build.SERIAL and it is not accessible to
            // apps that target the v2 security sandbox. Since access to
            // the serial is now behind a permission we push down the value.
            String buildSerial = Build.UNKNOWN;
            // TODO: SHTOPSHIP Uncomment the check when clients migrate
//            if (appInfo.targetSdkVersion <= Build.VERSION_CODES.N_MR1) {
            if (appInfo.targetSandboxVersion != 2) {
                buildSerial = IDeviceIdentifiersPolicyService.Stub.asInterface(
                        ServiceManager.getService(Context.DEVICE_IDENTIFIERS_SERVICE))
                        .getSerial();
//            }
            }
            // Check if this is a secondary process that should be incorporated into some
            // currently active instrumentation.  (Note we do this AFTER all of the profiling