diff options
| -rw-r--r-- | services/autofill/java/com/android/server/autofill/AutofillManagerServiceImpl.java | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/services/autofill/java/com/android/server/autofill/AutofillManagerServiceImpl.java b/services/autofill/java/com/android/server/autofill/AutofillManagerServiceImpl.java index fe85db286fa8..5a35474207f7 100644 --- a/services/autofill/java/com/android/server/autofill/AutofillManagerServiceImpl.java +++ b/services/autofill/java/com/android/server/autofill/AutofillManagerServiceImpl.java @@ -231,7 +231,7 @@ final class AutofillManagerServiceImpl sendStateToClients(/* resetClient= */ false); } updateRemoteAugmentedAutofillService(); - updateRemoteInlineSuggestionRenderServiceLocked(); + getRemoteInlineSuggestionRenderServiceLocked(); return enabledChanged; } @@ -685,8 +685,12 @@ final class AutofillManagerServiceImpl @GuardedBy("mLock") void resetExtServiceLocked() { - if (sVerbose) Slog.v(TAG, "reset autofill service."); + if (sVerbose) Slog.v(TAG, "reset autofill service in ExtServices."); mFieldClassificationStrategy.reset(); + if (mRemoteInlineSuggestionRenderService != null) { + mRemoteInlineSuggestionRenderService.destroy(); + mRemoteInlineSuggestionRenderService = null; + } } @GuardedBy("mLock") @@ -1583,18 +1587,6 @@ final class AutofillManagerServiceImpl return mFieldClassificationStrategy.getDefaultAlgorithm(); } - private void updateRemoteInlineSuggestionRenderServiceLocked() { - if (mRemoteInlineSuggestionRenderService != null) { - if (sVerbose) { - Slog.v(TAG, "updateRemoteInlineSuggestionRenderService(): " - + "destroying old remote service"); - } - mRemoteInlineSuggestionRenderService = null; - } - - mRemoteInlineSuggestionRenderService = getRemoteInlineSuggestionRenderServiceLocked(); - } - @Nullable RemoteInlineSuggestionRenderService getRemoteInlineSuggestionRenderServiceLocked() { if (mRemoteInlineSuggestionRenderService == null) { final ComponentName componentName = RemoteInlineSuggestionRenderService |