DivestOS/Patches/LineageOS-18.1/android_frameworks_base/0007-Always_Restict_Serial.patch
Tad 529b47039c 18.1: Initial bringup
- Functionality tested on mako and klte
- In-place upgrade from 17.1 tested working on klte
- Compile tested on bacon and klte
- Recovery OTA key patch missing, unsure if still needed.
- Deblobber needs support for removing vintf manifest paths from vendor Android.bp
- Launcher needs more default_workspace grid variants (eg. 4x5)
2021-03-23 12:36:31 -04:00

30 lines
1.6 KiB
Diff

From d6224b1fca2bb1a32e1bf6df2de6227eddb13595 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Wed, 6 Sep 2017 21:40:48 -0400
Subject: [PATCH] always set deprecated Build.SERIAL to UNKNOWN
Only support fetching the serial number via the new Build.getSerial()
requiring the READ_PHONE_STATE permission.
---
.../java/com/android/server/am/ActivityManagerService.java | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index e8505fcb37a..7b14f5fdb1e 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -4971,12 +4971,7 @@ private final boolean attachApplicationLocked(IApplicationThread thread,
}
}
- // We deprecated Build.SERIAL and it is not accessible to
- // Instant Apps and 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.isInstantApp()
- && appInfo.targetSdkVersion < Build.VERSION_CODES.P)
- ? sTheRealBuildSerial : Build.UNKNOWN;
+ final String buildSerial = Build.UNKNOWN;
// 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