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

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

Merge "Apps targeting P need phone pemrisison to get device serial - framework"

parents 4ca908e6 b7b95015
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -7075,9 +7075,11 @@ public class ActivityManagerService extends IActivityManager.Stub
            }
            // 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 = appInfo.targetSandboxVersion < 2
            // apps that target the v2 security sandbox and to apps that
            // target APIs higher than O MR1. Since access to the serial
            // is now behind a permission we push down the value.
            final String buildSerial = (appInfo.targetSandboxVersion < 2
                    && appInfo.targetSdkVersion <= Build.VERSION_CODES.O_MR1)
                            ? sTheRealBuildSerial : Build.UNKNOWN;
            // Check if this is a secondary process that should be incorporated into some