Loading core/java/com/android/internal/infra/AbstractRemoteService.java +8 −0 Original line number Diff line number Diff line Loading @@ -139,6 +139,14 @@ public abstract class AbstractRemoteService<S extends AbstractRemoteService<S, I return mDestroyed; } /** * Gets the name of the service. */ @NonNull public final ComponentName getComponentName() { return mComponentName; } private void handleOnConnectedStateChangedInternal(boolean connected) { if (connected) { handlePendingRequests(); Loading services/autofill/java/com/android/server/autofill/AutofillManagerService.java +9 −3 Original line number Diff line number Diff line Loading @@ -252,9 +252,8 @@ public final class AutofillManagerService @Override // from AbstractMasterSystemService protected AutofillManagerServiceImpl newServiceLocked(@UserIdInt int resolvedUserId, boolean disabled) { return new AutofillManagerServiceImpl(this, mLock, mRequestsHistory, mUiLatencyHistory, mWtfHistory, resolvedUserId, mUi, mAutofillCompatState, disabled); return new AutofillManagerServiceImpl(this, mLock, mUiLatencyHistory, mWtfHistory, resolvedUserId, mUi, mAutofillCompatState, disabled); } @Override // AbstractMasterSystemService Loading Loading @@ -291,6 +290,13 @@ public final class AutofillManagerService return mSupportedSmartSuggestionModes; } /** * Logs a request so it's dumped later... */ void logRequestLocked(@NonNull String historyItem) { mRequestsHistory.log(historyItem); } // Called by AutofillManagerServiceImpl, doesn't need to check permission boolean isInstantServiceAllowed() { return mAllowInstantService; Loading services/autofill/java/com/android/server/autofill/AutofillManagerServiceImpl.java +4 −5 Original line number Diff line number Diff line Loading @@ -108,7 +108,6 @@ final class AutofillManagerServiceImpl private static final Random sRandom = new Random(); private final LocalLog mRequestsHistory; private final LocalLog mUiLatencyHistory; private final LocalLog mWtfHistory; private final FieldClassificationStrategy mFieldClassificationStrategy; Loading Loading @@ -166,12 +165,12 @@ final class AutofillManagerServiceImpl @Nullable private RemoteAugmentedAutofillService mRemoteAugmentedAutofillService; AutofillManagerServiceImpl(AutofillManagerService master, Object lock, LocalLog requestsHistory, AutofillManagerServiceImpl(AutofillManagerService master, Object lock, LocalLog uiLatencyHistory, LocalLog wtfHistory, int userId, AutoFillUI ui, AutofillCompatState autofillCompatState, boolean disabled) { AutofillCompatState autofillCompatState, boolean disabled) { super(master, lock, userId); mRequestsHistory = requestsHistory; mUiLatencyHistory = uiLatencyHistory; mWtfHistory = wtfHistory; mUi = ui; Loading Loading @@ -310,7 +309,7 @@ final class AutofillManagerServiceImpl + " s=" + mInfo.getServiceInfo().packageName + " u=" + mUserId + " i=" + autofillId + " b=" + virtualBounds + " hc=" + hasCallback + " f=" + flags; mRequestsHistory.log(historyItem); mMaster.logRequestLocked(historyItem); newSession.updateLocked(autofillId, virtualBounds, value, ACTION_START_SESSION, flags); Loading services/autofill/java/com/android/server/autofill/Session.java +7 −0 Original line number Diff line number Diff line Loading @@ -2610,6 +2610,13 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState + " when server returned null for session " + this.id); } final String historyItem = "aug:id=" + id + " u=" + uid + " m=" + mode + " a=" + ComponentName.flattenToShortString(mComponentName) + " f=" + mCurrentViewId + " s=" + remoteService.getComponentName(); mService.getMaster().logRequestLocked(historyItem); final AutofillValue currentValue = mViewStates.get(mCurrentViewId).getCurrentValue(); // TODO(b/111330312): we might need to add a new state in the AutofillManager to optimize Loading services/contentcapture/java/com/android/server/contentcapture/ContentCaptureManagerService.java +30 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import android.os.ResultReceiver; import android.os.ShellCallback; import android.os.UserHandle; import android.os.UserManager; import android.util.LocalLog; import android.util.Slog; import android.view.contentcapture.IContentCaptureManager; Loading Loading @@ -69,6 +70,8 @@ public final class ContentCaptureManagerService extends private final LocalService mLocalService = new LocalService(); private final LocalLog mRequestsHistory = new LocalLog(20); public ContentCaptureManagerService(@NonNull Context context) { super(context, new FrameworkResourcesServiceNameResolver(context, com.android.internal.R.string.config_defaultContentCaptureService), Loading Loading @@ -154,6 +157,13 @@ public final class ContentCaptureManagerService extends } } /** * Logs a request so it's dumped later... */ void logRequestLocked(@NonNull String historyItem) { mRequestsHistory.log(historyItem); } private ActivityManagerInternal getAmInternal() { synchronized (mLock) { if (mAm == null) { Loading Loading @@ -217,9 +227,29 @@ public final class ContentCaptureManagerService extends public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { if (!DumpUtils.checkDumpPermission(getContext(), TAG, pw)) return; boolean showHistory = true; if (args != null) { for (String arg : args) { switch(arg) { case "--no-history": showHistory = false; break; case "--help": pw.println("Usage: dumpsys content_capture [--no-history]"); return; default: Slog.w(TAG, "Ignoring invalid dump arg: " + arg); } } } synchronized (mLock) { dumpLocked("", pw); } if (showHistory) { pw.println(); pw.println("Requests history:"); pw.println(); mRequestsHistory.reverseDump(fd, pw, args); } } @Override Loading Loading
core/java/com/android/internal/infra/AbstractRemoteService.java +8 −0 Original line number Diff line number Diff line Loading @@ -139,6 +139,14 @@ public abstract class AbstractRemoteService<S extends AbstractRemoteService<S, I return mDestroyed; } /** * Gets the name of the service. */ @NonNull public final ComponentName getComponentName() { return mComponentName; } private void handleOnConnectedStateChangedInternal(boolean connected) { if (connected) { handlePendingRequests(); Loading
services/autofill/java/com/android/server/autofill/AutofillManagerService.java +9 −3 Original line number Diff line number Diff line Loading @@ -252,9 +252,8 @@ public final class AutofillManagerService @Override // from AbstractMasterSystemService protected AutofillManagerServiceImpl newServiceLocked(@UserIdInt int resolvedUserId, boolean disabled) { return new AutofillManagerServiceImpl(this, mLock, mRequestsHistory, mUiLatencyHistory, mWtfHistory, resolvedUserId, mUi, mAutofillCompatState, disabled); return new AutofillManagerServiceImpl(this, mLock, mUiLatencyHistory, mWtfHistory, resolvedUserId, mUi, mAutofillCompatState, disabled); } @Override // AbstractMasterSystemService Loading Loading @@ -291,6 +290,13 @@ public final class AutofillManagerService return mSupportedSmartSuggestionModes; } /** * Logs a request so it's dumped later... */ void logRequestLocked(@NonNull String historyItem) { mRequestsHistory.log(historyItem); } // Called by AutofillManagerServiceImpl, doesn't need to check permission boolean isInstantServiceAllowed() { return mAllowInstantService; Loading
services/autofill/java/com/android/server/autofill/AutofillManagerServiceImpl.java +4 −5 Original line number Diff line number Diff line Loading @@ -108,7 +108,6 @@ final class AutofillManagerServiceImpl private static final Random sRandom = new Random(); private final LocalLog mRequestsHistory; private final LocalLog mUiLatencyHistory; private final LocalLog mWtfHistory; private final FieldClassificationStrategy mFieldClassificationStrategy; Loading Loading @@ -166,12 +165,12 @@ final class AutofillManagerServiceImpl @Nullable private RemoteAugmentedAutofillService mRemoteAugmentedAutofillService; AutofillManagerServiceImpl(AutofillManagerService master, Object lock, LocalLog requestsHistory, AutofillManagerServiceImpl(AutofillManagerService master, Object lock, LocalLog uiLatencyHistory, LocalLog wtfHistory, int userId, AutoFillUI ui, AutofillCompatState autofillCompatState, boolean disabled) { AutofillCompatState autofillCompatState, boolean disabled) { super(master, lock, userId); mRequestsHistory = requestsHistory; mUiLatencyHistory = uiLatencyHistory; mWtfHistory = wtfHistory; mUi = ui; Loading Loading @@ -310,7 +309,7 @@ final class AutofillManagerServiceImpl + " s=" + mInfo.getServiceInfo().packageName + " u=" + mUserId + " i=" + autofillId + " b=" + virtualBounds + " hc=" + hasCallback + " f=" + flags; mRequestsHistory.log(historyItem); mMaster.logRequestLocked(historyItem); newSession.updateLocked(autofillId, virtualBounds, value, ACTION_START_SESSION, flags); Loading
services/autofill/java/com/android/server/autofill/Session.java +7 −0 Original line number Diff line number Diff line Loading @@ -2610,6 +2610,13 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState + " when server returned null for session " + this.id); } final String historyItem = "aug:id=" + id + " u=" + uid + " m=" + mode + " a=" + ComponentName.flattenToShortString(mComponentName) + " f=" + mCurrentViewId + " s=" + remoteService.getComponentName(); mService.getMaster().logRequestLocked(historyItem); final AutofillValue currentValue = mViewStates.get(mCurrentViewId).getCurrentValue(); // TODO(b/111330312): we might need to add a new state in the AutofillManager to optimize Loading
services/contentcapture/java/com/android/server/contentcapture/ContentCaptureManagerService.java +30 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import android.os.ResultReceiver; import android.os.ShellCallback; import android.os.UserHandle; import android.os.UserManager; import android.util.LocalLog; import android.util.Slog; import android.view.contentcapture.IContentCaptureManager; Loading Loading @@ -69,6 +70,8 @@ public final class ContentCaptureManagerService extends private final LocalService mLocalService = new LocalService(); private final LocalLog mRequestsHistory = new LocalLog(20); public ContentCaptureManagerService(@NonNull Context context) { super(context, new FrameworkResourcesServiceNameResolver(context, com.android.internal.R.string.config_defaultContentCaptureService), Loading Loading @@ -154,6 +157,13 @@ public final class ContentCaptureManagerService extends } } /** * Logs a request so it's dumped later... */ void logRequestLocked(@NonNull String historyItem) { mRequestsHistory.log(historyItem); } private ActivityManagerInternal getAmInternal() { synchronized (mLock) { if (mAm == null) { Loading Loading @@ -217,9 +227,29 @@ public final class ContentCaptureManagerService extends public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { if (!DumpUtils.checkDumpPermission(getContext(), TAG, pw)) return; boolean showHistory = true; if (args != null) { for (String arg : args) { switch(arg) { case "--no-history": showHistory = false; break; case "--help": pw.println("Usage: dumpsys content_capture [--no-history]"); return; default: Slog.w(TAG, "Ignoring invalid dump arg: " + arg); } } } synchronized (mLock) { dumpLocked("", pw); } if (showHistory) { pw.println(); pw.println("Requests history:"); pw.println(); mRequestsHistory.reverseDump(fd, pw, args); } } @Override Loading