summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Michael Groover <mpgroover@google.com> 2019-01-31 07:29:15 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2019-01-31 07:29:15 +0000
commit3684f14c480fba5e5098bc1bead27e88e0e4c3ec (patch)
treef9ce1462528045fed9d2b093f73280703ed84b47
parent5de539172f029c88775db288b711d657c9880966 (diff)
parentc2daefeba5e70404be794bcf6def00ffe7bce844 (diff)
Merge "Set Build.SERIAL to UNKNOWN for all target SDK"
-rw-r--r--core/java/android/app/ActivityThread.java13
1 files changed, 0 insertions, 13 deletions
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 4a8566c0072c..22dcce51cebb 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;
@@ -5936,18 +5935,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);