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
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user