Loading core/java/android/service/autofill/augmented/AugmentedAutofillService.java +12 −2 Original line number Diff line number Diff line Loading @@ -228,7 +228,7 @@ public abstract class AugmentedAutofillService extends Service { } else { // TODO(b/123099468): figure out if it's ok to reuse the proxy; add logging if (sDebug) Log.d(TAG, "Reusing proxy for session " + sessionId); proxy.update(focusedId, focusedValue, callback); proxy.update(focusedId, focusedValue, callback, cancellationSignal); } try { Loading @@ -252,6 +252,15 @@ public abstract class AugmentedAutofillService extends Service { Log.w(TAG, "No proxy for session " + sessionId); return; } if (proxy.mCallback != null) { try { if (!proxy.mCallback.isCompleted()) { proxy.mCallback.cancel(); } } catch (Exception e) { Log.e(TAG, "failed to check current pending request status", e); } } proxy.destroy(); } mAutofillProxies.clear(); Loading Loading @@ -442,7 +451,7 @@ public abstract class AugmentedAutofillService extends Service { } private void update(@NonNull AutofillId focusedId, @NonNull AutofillValue focusedValue, @NonNull IFillCallback callback) { @NonNull IFillCallback callback, @NonNull CancellationSignal cancellationSignal) { synchronized (mLock) { mFocusedId = focusedId; mFocusedValue = focusedValue; Loading @@ -457,6 +466,7 @@ public abstract class AugmentedAutofillService extends Service { Log.d(TAG, "mCallback is updated."); } mCallback = callback; mCancellationSignal = cancellationSignal; } } Loading services/autofill/java/com/android/server/autofill/RemoteAugmentedAutofillService.java +2 −12 Original line number Diff line number Diff line Loading @@ -225,17 +225,7 @@ final class RemoteAugmentedAutofillService @Override public void cancel() { synchronized (mLock) { final boolean cancelled = isCancelledLocked(); final ICancellationSignal cancellation = mCancellation; if (!cancelled) { try { cancellation.cancel(); } catch (RemoteException e) { Slog.e(mTag, "Error requesting a cancellation", e); } } } PendingAutofillRequest.this.cancel(); } }; } Loading Loading @@ -304,7 +294,7 @@ final class RemoteAugmentedAutofillService try { cancellation.cancel(); } catch (RemoteException e) { Slog.e(mTag, "Error cancelling a fill request", e); Slog.e(mTag, "Error cancelling an augmented fill request", e); } } return true; Loading Loading
core/java/android/service/autofill/augmented/AugmentedAutofillService.java +12 −2 Original line number Diff line number Diff line Loading @@ -228,7 +228,7 @@ public abstract class AugmentedAutofillService extends Service { } else { // TODO(b/123099468): figure out if it's ok to reuse the proxy; add logging if (sDebug) Log.d(TAG, "Reusing proxy for session " + sessionId); proxy.update(focusedId, focusedValue, callback); proxy.update(focusedId, focusedValue, callback, cancellationSignal); } try { Loading @@ -252,6 +252,15 @@ public abstract class AugmentedAutofillService extends Service { Log.w(TAG, "No proxy for session " + sessionId); return; } if (proxy.mCallback != null) { try { if (!proxy.mCallback.isCompleted()) { proxy.mCallback.cancel(); } } catch (Exception e) { Log.e(TAG, "failed to check current pending request status", e); } } proxy.destroy(); } mAutofillProxies.clear(); Loading Loading @@ -442,7 +451,7 @@ public abstract class AugmentedAutofillService extends Service { } private void update(@NonNull AutofillId focusedId, @NonNull AutofillValue focusedValue, @NonNull IFillCallback callback) { @NonNull IFillCallback callback, @NonNull CancellationSignal cancellationSignal) { synchronized (mLock) { mFocusedId = focusedId; mFocusedValue = focusedValue; Loading @@ -457,6 +466,7 @@ public abstract class AugmentedAutofillService extends Service { Log.d(TAG, "mCallback is updated."); } mCallback = callback; mCancellationSignal = cancellationSignal; } } Loading
services/autofill/java/com/android/server/autofill/RemoteAugmentedAutofillService.java +2 −12 Original line number Diff line number Diff line Loading @@ -225,17 +225,7 @@ final class RemoteAugmentedAutofillService @Override public void cancel() { synchronized (mLock) { final boolean cancelled = isCancelledLocked(); final ICancellationSignal cancellation = mCancellation; if (!cancelled) { try { cancellation.cancel(); } catch (RemoteException e) { Slog.e(mTag, "Error requesting a cancellation", e); } } } PendingAutofillRequest.this.cancel(); } }; } Loading Loading @@ -304,7 +294,7 @@ final class RemoteAugmentedAutofillService try { cancellation.cancel(); } catch (RemoteException e) { Slog.e(mTag, "Error cancelling a fill request", e); Slog.e(mTag, "Error cancelling an augmented fill request", e); } } return true; Loading