diff options
author | 2022-07-21 20:07:06 +0000 | |
---|---|---|
committer | 2022-07-21 20:07:06 +0000 | |
commit | 6feef8385dd0c6eb12ea1a291724da8f89054d35 (patch) | |
tree | 05f69b24d879e055d3e64bef5bf5bea1fa6ec370 | |
parent | 9fa9fc8bc5c1107937b94edd18f8cbb5929d380a (diff) |
Revert "Add event log for content capture"
This reverts commit 9fa9fc8bc5c1107937b94edd18f8cbb5929d380a.
Reason for revert: Break Android tests.
Change-Id: I40bfba94ef1a8a5991feedfd24122ff45ba37912
4 files changed, 2 insertions, 39 deletions
diff --git a/services/contentcapture/Android.bp b/services/contentcapture/Android.bp index 5392c2cde3b8..434f239dbddc 100644 --- a/services/contentcapture/Android.bp +++ b/services/contentcapture/Android.bp @@ -17,9 +17,6 @@ filegroup { java_library_static { name: "services.contentcapture", defaults: ["platform_service_defaults"], - srcs: [ - ":services.contentcapture-sources", - "java/**/*.logtags", - ], + srcs: [":services.contentcapture-sources"], libs: ["services.core"], } diff --git a/services/contentcapture/java/com/android/server/contentcapture/ContentCapturePerUserService.java b/services/contentcapture/java/com/android/server/contentcapture/ContentCapturePerUserService.java index 0428b2322f27..41a759254909 100644 --- a/services/contentcapture/java/com/android/server/contentcapture/ContentCapturePerUserService.java +++ b/services/contentcapture/java/com/android/server/contentcapture/ContentCapturePerUserService.java @@ -60,7 +60,6 @@ import android.service.contentcapture.SnapshotData; import android.service.voice.VoiceInteractionManagerInternal; import android.util.ArrayMap; import android.util.ArraySet; -import android.util.EventLog; import android.util.Slog; import android.util.SparseArray; import android.util.SparseBooleanArray; @@ -89,11 +88,6 @@ final class ContentCapturePerUserService private static final String TAG = ContentCapturePerUserService.class.getSimpleName(); - private static final int EVENT_LOG_CONNECT_STATE_DIED = 0; - static final int EVENT_LOG_CONNECT_STATE_CONNECTED = 1; - static final int EVENT_LOG_CONNECT_STATE_DISCONNECTED = 2; - - @GuardedBy("mLock") private final SparseArray<ContentCaptureServerSession> mSessions = new SparseArray<>(); @@ -196,13 +190,9 @@ final class ContentCapturePerUserService Slog.w(TAG, "remote service died: " + service); synchronized (mLock) { mZombie = true; - ComponentName serviceComponent = getServiceComponentName(); writeServiceEvent( FrameworkStatsLog.CONTENT_CAPTURE_SERVICE_EVENTS__EVENT__ON_REMOTE_SERVICE_DIED, - serviceComponent); - EventLog.writeEvent(EventLogTags.CC_CONNECT_STATE_CHANGED, mUserId, - serviceComponent != null ? serviceComponent.flattenToShortString() : "", - EVENT_LOG_CONNECT_STATE_DIED); + getServiceComponentName()); } } @@ -624,16 +614,11 @@ final class ContentCapturePerUserService ? "null_activities" : activities.size() + " activities") + ")" + " for user " + mUserId); } - int packageCount = packages != null ? packages.size() : 0; - int activityCount = activities != null ? activities.size() : 0; ArraySet<String> oldList = mMaster.mGlobalContentCaptureOptions.getWhitelistedPackages(mUserId); - EventLog.writeEvent(EventLogTags.CC_CURRENT_ALLOWLIST, mUserId, oldList.size()); mMaster.mGlobalContentCaptureOptions.setWhitelist(mUserId, packages, activities); - EventLog.writeEvent(EventLogTags.CC_SET_ALLOWLIST, mUserId, - packageCount, activityCount); writeSetWhitelistEvent(getServiceComponentName(), packages, activities); updateContentCaptureOptions(oldList); @@ -714,14 +699,12 @@ final class ContentCapturePerUserService private void updateContentCaptureOptions(@Nullable ArraySet<String> oldList) { ArraySet<String> adding = mMaster.mGlobalContentCaptureOptions .getWhitelistedPackages(mUserId); - EventLog.writeEvent(EventLogTags.CC_CURRENT_ALLOWLIST, mUserId, adding.size()); if (oldList != null && adding != null) { adding.removeAll(oldList); } int N = adding != null ? adding.size() : 0; - EventLog.writeEvent(EventLogTags.CC_UPDATE_OPTIONS, mUserId, N); for (int i = 0; i < N; i++) { String packageName = adding.valueAt(i); ContentCaptureOptions options = mMaster.mGlobalContentCaptureOptions diff --git a/services/contentcapture/java/com/android/server/contentcapture/EventLogTags.logtags b/services/contentcapture/java/com/android/server/contentcapture/EventLogTags.logtags deleted file mode 100644 index 6722b9ed3c5f..000000000000 --- a/services/contentcapture/java/com/android/server/contentcapture/EventLogTags.logtags +++ /dev/null @@ -1,8 +0,0 @@ -# See system/logging/logcat/event.logtags for a description of the format of this file. - -option java_package com.android.server.contentcapture - -53200 cc_connect_state_changed (User|1|5),(component|3),(type|1) -53201 cc_set_allowlist (User|1|5),(package_count|1),(activity_count|1) -53202 cc_current_allowlist (User|1|5),(count|1) -53203 cc_update_options (User|1|5),(count|1) diff --git a/services/contentcapture/java/com/android/server/contentcapture/RemoteContentCaptureService.java b/services/contentcapture/java/com/android/server/contentcapture/RemoteContentCaptureService.java index e22a9d07b4ae..1efe55aa0767 100644 --- a/services/contentcapture/java/com/android/server/contentcapture/RemoteContentCaptureService.java +++ b/services/contentcapture/java/com/android/server/contentcapture/RemoteContentCaptureService.java @@ -31,7 +31,6 @@ import android.service.contentcapture.IContentCaptureService; import android.service.contentcapture.IContentCaptureServiceCallback; import android.service.contentcapture.IDataShareCallback; import android.service.contentcapture.SnapshotData; -import android.util.EventLog; import android.util.Slog; import android.view.contentcapture.ContentCaptureContext; import android.view.contentcapture.DataRemovalRequest; @@ -48,7 +47,6 @@ final class RemoteContentCaptureService private final IBinder mServerCallback; private final int mIdleUnbindTimeoutMs; private final ContentCapturePerUserService mPerUserService; - private final int mUserId; RemoteContentCaptureService(Context context, String serviceInterface, ComponentName serviceComponentName, IContentCaptureServiceCallback callback, int userId, @@ -63,7 +61,6 @@ final class RemoteContentCaptureService mPerUserService = perUserService; mServerCallback = callback.asBinder(); mIdleUnbindTimeoutMs = idleUnbindTimeoutMs; - mUserId = userId; // Bind right away, which will trigger a onConnected() on service's ensureBoundLocked(); @@ -91,9 +88,6 @@ final class RemoteContentCaptureService writeServiceEvent( FrameworkStatsLog.CONTENT_CAPTURE_SERVICE_EVENTS__EVENT__ON_CONNECTED, mComponentName); - EventLog.writeEvent(EventLogTags.CC_CONNECT_STATE_CHANGED, mUserId, - mComponentName != null ? mComponentName.flattenToShortString() : "", - ContentCapturePerUserService.EVENT_LOG_CONNECT_STATE_CONNECTED); } finally { // Update the system-service state, in case the service reconnected after // dying @@ -104,9 +98,6 @@ final class RemoteContentCaptureService writeServiceEvent( FrameworkStatsLog.CONTENT_CAPTURE_SERVICE_EVENTS__EVENT__ON_DISCONNECTED, mComponentName); - EventLog.writeEvent(EventLogTags.CC_CONNECT_STATE_CHANGED, mUserId, - mComponentName != null ? mComponentName.flattenToShortString() : "", - ContentCapturePerUserService.EVENT_LOG_CONNECT_STATE_DISCONNECTED); } } catch (Exception e) { Slog.w(mTag, "Exception calling onConnectedStateChanged(" + connected + "): " + e); |