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.

(cherry picked from commit ecb6124d54)

Bug: 119748341
Test: make checkbuild, flash
Merged-In: I9dbd1b6dea92f7441efb6d0a579efd13bc0e5139
Change-Id: I65425e49ab9ad9752b65772d27f788d1a674eeff
This commit is contained in:
Paul Duffin
2018-12-13 12:19:52 +00:00
parent a4d036e98b
commit bf76cf7c82
3 changed files with 0 additions and 49 deletions

View File

@@ -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

View File

@@ -6124,12 +6124,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

View File

@@ -81,7 +81,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.GraphicsEnvironment;
import android.os.Handler;
@@ -157,8 +156,6 @@ import dalvik.system.CloseGuard;
import dalvik.system.VMDebug;
import dalvik.system.VMRuntime;
import libcore.io.DropBox;
import libcore.io.EventLogger;
import libcore.io.IoUtils;
import libcore.net.event.NetworkEventDispatcher;
@@ -6680,9 +6677,6 @@ public final class ActivityThread extends ClientTransactionHandler {
}
}
// add dropbox logging to libcore
DropBox.setReporter(new DropBoxReporter());
ViewRootImpl.ConfigChangedCallback configChangedCallback
= (Configuration globalConfig) -> {
synchronized (mResourcesManager) {
@@ -6736,38 +6730,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 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 = (DropBoxManager) getSystemContext().getSystemService(Context.DROPBOX_SERVICE);
}
}
}
public static void main(String[] args) {
Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "ActivityThreadMain");
@@ -6778,9 +6740,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);