summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Paul Duffin <paulduffin@google.com> 2018-12-13 12:19:52 +0000
committer Paul Duffin <paulduffin@google.com> 2018-12-14 15:27:05 +0000
commitecb6124d540975d8f2466bc9d9bf4b79bc6ff972 (patch)
treec48ff542406aebeb536e3a7fa63d3c99159a4ec7
parentbb28a036c3cd0ef6433efb16ed99ae703bcfe4a7 (diff)
Remove uses of libcore.io DropBox and EventLogger
DropBox and EventLogger provide hooks for use by framework to intercept messages sent by libcore. However, neither of these mechanisms are actually used by libcore so there is no point in framework code using it. Bug: 119748341 Test: make checkbuild, flash Change-Id: I9dbd1b6dea92f7441efb6d0a579efd13bc0e5139
-rw-r--r--config/dirty-image-objects2
-rw-r--r--config/preloaded-classes6
-rw-r--r--core/java/android/app/ActivityThread.java42
3 files changed, 0 insertions, 50 deletions
diff --git a/config/dirty-image-objects b/config/dirty-image-objects
index 9b4d199dc723..9e2230b288c8 100644
--- a/config/dirty-image-objects
+++ b/config/dirty-image-objects
@@ -44,7 +44,6 @@ java.util.function.ToIntFunction
sun.misc.FormattedFloatingDecimal
java.util.stream.IntStream
android.icu.util.TimeZone
-libcore.io.DropBox
org.apache.harmony.luni.internal.util.TimezoneGetter
dalvik.system.SocketTagger
dalvik.system.CloseGuard
@@ -137,7 +136,6 @@ java.lang.CharSequence
android.icu.util.ULocale
dalvik.system.BaseDexClassLoader
android.icu.text.BreakIterator
-libcore.io.EventLogger
libcore.net.NetworkSecurityPolicy
android.icu.text.UnicodeSet
com.android.org.conscrypt.TrustedCertificateStore$PreloadHolder
diff --git a/config/preloaded-classes b/config/preloaded-classes
index 30959256c922..c8a2a9c19b28 100644
--- a/config/preloaded-classes
+++ b/config/preloaded-classes
@@ -6137,12 +6137,6 @@ libcore.io.BufferIterator
libcore.io.ClassPathURLStreamHandler
libcore.io.ClassPathURLStreamHandler$ClassPathURLConnection
libcore.io.ClassPathURLStreamHandler$ClassPathURLConnection$1
-libcore.io.DropBox
-libcore.io.DropBox$DefaultReporter
-libcore.io.DropBox$Reporter
-libcore.io.EventLogger
-libcore.io.EventLogger$DefaultReporter
-libcore.io.EventLogger$Reporter
libcore.io.ForwardingOs
libcore.io.IoBridge
libcore.io.IoTracker
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index fe9b1ffb378f..1b45d172cb89 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -86,7 +86,6 @@ import android.os.Binder;
import android.os.Build;
import android.os.Bundle;
import android.os.Debug;
-import android.os.DropBoxManager;
import android.os.Environment;
import android.os.FileUtils;
import android.os.GraphicsEnvironment;
@@ -166,8 +165,6 @@ import dalvik.system.CloseGuard;
import dalvik.system.VMDebug;
import dalvik.system.VMRuntime;
-import libcore.io.DropBox;
-import libcore.io.EventLogger;
import libcore.io.ForwardingOs;
import libcore.io.IoUtils;
import libcore.io.Os;
@@ -6726,9 +6723,6 @@ public final class ActivityThread extends ClientTransactionHandler {
}
}
- // add dropbox logging to libcore
- DropBox.setReporter(new DropBoxReporter());
-
ViewRootImpl.ConfigChangedCallback configChangedCallback
= (Configuration globalConfig) -> {
synchronized (mResourcesManager) {
@@ -6782,39 +6776,6 @@ public final class ActivityThread extends ClientTransactionHandler {
}
}
- private static class EventLoggingReporter implements EventLogger.Reporter {
- @Override
- public void report (int code, Object... list) {
- EventLog.writeEvent(code, list);
- }
- }
-
- private static class DropBoxReporter implements DropBox.Reporter {
-
- private DropBoxManager dropBox;
-
- public DropBoxReporter() {}
-
- @Override
- public void addData(String tag, byte[] data, int flags) {
- ensureInitialized();
- dropBox.addData(tag, data, flags);
- }
-
- @Override
- public void addText(String tag, String data) {
- ensureInitialized();
- dropBox.addText(tag, data);
- }
-
- private synchronized void ensureInitialized() {
- if (dropBox == null) {
- dropBox = currentActivityThread().getApplication()
- .getSystemService(DropBoxManager.class);
- }
- }
- }
-
private static class AndroidOs extends ForwardingOs {
/**
* Install selective syscall interception. For example, this is used to
@@ -6904,9 +6865,6 @@ public final class ActivityThread extends ClientTransactionHandler {
Environment.initForCurrentUser();
- // Set the reporter for event logging in libcore
- EventLogger.setReporter(new EventLoggingReporter());
-
// Make sure TrustedCertificateStore looks in the right place for CA certificates
final File configDir = Environment.getUserConfigDirectory(UserHandle.myUserId());
TrustedCertificateStore.setDefaultUserDirectory(configDir);