mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-09-08 10:32:42 +00:00
![Tad](/assets/img/avatar_default.png)
+ 16.0: some other misc hardening patches from GrapheneOS - always restrict access to Build.SERIAL - don't grant location permission to system browsers - fbe: pad filenames more + 16.0: Contacts: remove Privacy Policy and Terms of Service links
31 lines
1.6 KiB
Diff
31 lines
1.6 KiB
Diff
From 138790c0a2eba54f7ebb4c3b8fd5efac32559fea 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.
|
|
---
|
|
.../com/android/server/am/ActivityManagerService.java | 8 +-------
|
|
1 file changed, 1 insertion(+), 7 deletions(-)
|
|
|
|
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
|
|
index a1d42c09133..b5b3c68d563 100644
|
|
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
|
|
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
|
|
@@ -7762,13 +7762,7 @@ private final boolean attachApplicationLocked(IApplicationThread thread,
|
|
}
|
|
}
|
|
|
|
- // We deprecated Build.SERIAL and it is not accessible to
|
|
- // 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.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
|