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

Commit 1d92fa6b authored by Michael Groover's avatar Michael Groover
Browse files

Return non-null value for Build#getSerial if caller does not have permission

Bug: 117582489
Test: Manually verified Play functions as expected.
Change-Id: I3e3d190e5dcefc5d832866dc9b891a4d5aa2cdbb
parent dcd0b0ab
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ public final class DeviceIdentifiersPolicyService extends SystemService {
            // should use the getSerialForPackage method with the calling package specified.
            if (!TelephonyPermissions.checkCallingOrSelfReadDeviceIdentifiers(mContext,
                    /* callingPackage */ null, "getSerial")) {
                return null;
                return Build.UNKNOWN;
            }
            return SystemProperties.get("ro.serialno", Build.UNKNOWN);
        }
@@ -66,7 +66,7 @@ public final class DeviceIdentifiersPolicyService extends SystemService {
        public @Nullable String getSerialForPackage(String callingPackage) throws RemoteException {
            if (!TelephonyPermissions.checkCallingOrSelfReadDeviceIdentifiers(mContext,
                    callingPackage, "getSerial")) {
                return null;
                return Build.UNKNOWN;
            }
            return SystemProperties.get("ro.serialno", Build.UNKNOWN);
        }