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
(cherry picked from commit 1d92fa6b6f7b2afb58551810ffbf1cf174fc06a7)
diff --git a/services/core/java/com/android/server/os/DeviceIdentifiersPolicyService.java b/services/core/java/com/android/server/os/DeviceIdentifiersPolicyService.java
index 3ffc5c5..9c1ac34 100644
--- a/services/core/java/com/android/server/os/DeviceIdentifiersPolicyService.java
+++ b/services/core/java/com/android/server/os/DeviceIdentifiersPolicyService.java
@@ -57,7 +57,7 @@
             // 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 @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);
         }