diff options
| author | Michael Groover <mpgroover@google.com> | 2019-01-25 17:50:12 -0800 |
|---|---|---|
| committer | Michael Groover <mpgroover@google.com> | 2019-01-28 13:36:16 -0800 |
| commit | c2daefeba5e70404be794bcf6def00ffe7bce844 (patch) | |
| tree | da4b990704b5d6adc7c8fa854e57c5cbd743aabd /core/java/android | |
| parent | 77f4bee9d682e27ec3dd67ed489df2de1aa66a95 (diff) | |
Set Build.SERIAL to UNKNOWN for all target SDK
Bug: 117781266
Test: Manually verify 3P app targeting 22 cannot access device serial
Change-Id: I4374f8d29f1e29c4ffce2c7bc9a94d9e33cc5125
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/app/ActivityThread.java | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java index ee3d27c7dac8..17384495082c 100644 --- a/core/java/android/app/ActivityThread.java +++ b/core/java/android/app/ActivityThread.java @@ -177,7 +177,6 @@ import java.io.FileOutputStream; import java.io.IOException; import java.io.PrintWriter; import java.lang.ref.WeakReference; -import java.lang.reflect.Field; import java.lang.reflect.Method; import java.net.InetAddress; import java.text.DateFormat; @@ -5885,18 +5884,6 @@ public final class ActivityThread extends ClientTransactionHandler { StrictMode.initThreadDefaults(data.appInfo); StrictMode.initVmDefaults(data.appInfo); - // We deprecated Build.SERIAL and only apps that target pre NMR1 - // SDK can see it. Since access to the serial is now behind a - // permission we push down the value and here we fix it up - // before any app code has been loaded. - try { - Field field = Build.class.getDeclaredField("SERIAL"); - field.setAccessible(true); - field.set(Build.class, data.buildSerial); - } catch (NoSuchFieldException | IllegalAccessException e) { - /* ignore */ - } - if (data.debugMode != ApplicationThreadConstants.DEBUG_OFF) { // XXX should have option to change the port. Debug.changeDebugPort(8100); |
