diff options
Diffstat (limited to 'com/android/server/autofill/AutofillManagerServiceImpl.java')
-rw-r--r-- | com/android/server/autofill/AutofillManagerServiceImpl.java | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/com/android/server/autofill/AutofillManagerServiceImpl.java b/com/android/server/autofill/AutofillManagerServiceImpl.java index 880f236c..862070ad 100644 --- a/com/android/server/autofill/AutofillManagerServiceImpl.java +++ b/com/android/server/autofill/AutofillManagerServiceImpl.java @@ -216,12 +216,9 @@ final class AutofillManagerServiceImpl { serviceComponent = ComponentName.unflattenFromString(componentName); serviceInfo = AppGlobals.getPackageManager().getServiceInfo(serviceComponent, 0, mUserId); - if (serviceInfo == null) { - Slog.e(TAG, "Bad AutofillService name: " + componentName); - } } catch (RuntimeException | RemoteException e) { - Slog.e(TAG, "Error getting service info for '" + componentName + "': " + e); - serviceInfo = null; + Slog.e(TAG, "Bad autofill service name " + componentName + ": " + e); + return; } } try { @@ -231,24 +228,21 @@ final class AutofillManagerServiceImpl { if (sDebug) Slog.d(TAG, "Set component for user " + mUserId + " as " + mInfo); } else { mInfo = null; - if (sDebug) { - Slog.d(TAG, "Reset component for user " + mUserId + " (" + componentName + ")"); - } + if (sDebug) Slog.d(TAG, "Reset component for user " + mUserId); } - } catch (Exception e) { - Slog.e(TAG, "Bad AutofillServiceInfo for '" + componentName + "': " + e); - mInfo = null; - } - final boolean isEnabled = isEnabled(); - if (wasEnabled != isEnabled) { - if (!isEnabled) { - final int sessionCount = mSessions.size(); - for (int i = sessionCount - 1; i >= 0; i--) { - final Session session = mSessions.valueAt(i); - session.removeSelfLocked(); + final boolean isEnabled = isEnabled(); + if (wasEnabled != isEnabled) { + if (!isEnabled) { + final int sessionCount = mSessions.size(); + for (int i = sessionCount - 1; i >= 0; i--) { + final Session session = mSessions.valueAt(i); + session.removeSelfLocked(); + } } + sendStateToClients(false); } - sendStateToClients(false); + } catch (Exception e) { + Slog.e(TAG, "Bad AutofillService '" + componentName + "': " + e); } } |