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

Commit 01378705 authored by Michael Groover's avatar Michael Groover Committed by Android (Google) Code Review
Browse files

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

parents 85c3f5e7 1d92fa6b
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);
        }