Loading services/core/java/com/android/server/infra/AbstractMasterSystemService.java +6 −8 Original line number Diff line number Diff line Loading @@ -25,7 +25,6 @@ import android.content.ContentResolver; import android.content.Context; import android.content.Intent; import android.content.pm.UserInfo; import android.credentials.flags.Flags; import android.database.ContentObserver; import android.net.Uri; import android.os.Binder; Loading Loading @@ -1180,13 +1179,12 @@ public abstract class AbstractMasterSystemService<M extends AbstractMasterSystem final String[] serviceNames = mServiceNameResolver.getDefaultServiceNameList( userId); if (serviceNames != null) { if (Flags.packageUpdateFixEnabled()) { if (mServiceNameResolver.isConfiguredInMultipleMode()) { // Remove any service that is in the cache but is no longer valid // after this modification for this particular package removeInvalidCachedServicesLocked(serviceNames, packageName, userId); } // Remove any service that is in the cache but is no // longer valid after this modification for this //particular package removeInvalidCachedServicesLocked(serviceNames, packageName, userId); } // Update services that are still valid Loading services/credentials/java/com/android/server/credentials/CredentialManagerServiceImpl.java +8 −16 Original line number Diff line number Diff line Loading @@ -28,7 +28,6 @@ import android.content.pm.ResolveInfo; import android.content.pm.ServiceInfo; import android.credentials.CredentialManager; import android.credentials.CredentialProviderInfo; import android.credentials.flags.Flags; import android.service.credentials.CredentialProviderInfoFactory; import android.service.credentials.CredentialProviderService; import android.util.Slog; Loading Loading @@ -161,21 +160,14 @@ public final class CredentialManagerServiceImpl extends if (mInfo != null && mInfo.getServiceInfo() != null && mInfo.getServiceInfo().getComponentName() .getPackageName().equals(packageName)) { if (Flags.packageUpdateFixEnabled()) { try { updateCredentialProviderInfo(mInfo.getServiceInfo().getComponentName(), mInfo.isSystemProvider()); updateCredentialProviderInfo(mInfo.getServiceInfo() .getComponentName(), mInfo.isSystemProvider()); } catch (SecurityException | PackageManager.NameNotFoundException | NullPointerException e) { Slog.w(TAG, "Unable to update provider, must be removed: " + e.getMessage()); mMaster.handleServiceRemovedMultiModeLocked(mInfo.getComponentName(), mUserId); } } else { try { newServiceInfoLocked(mInfo.getServiceInfo().getComponentName()); } catch (PackageManager.NameNotFoundException e) { Slog.e(TAG, "Issue while updating serviceInfo: " + e.getMessage()); } mMaster.handleServiceRemovedMultiModeLocked( mInfo.getComponentName(), mUserId); } } } Loading Loading
services/core/java/com/android/server/infra/AbstractMasterSystemService.java +6 −8 Original line number Diff line number Diff line Loading @@ -25,7 +25,6 @@ import android.content.ContentResolver; import android.content.Context; import android.content.Intent; import android.content.pm.UserInfo; import android.credentials.flags.Flags; import android.database.ContentObserver; import android.net.Uri; import android.os.Binder; Loading Loading @@ -1180,13 +1179,12 @@ public abstract class AbstractMasterSystemService<M extends AbstractMasterSystem final String[] serviceNames = mServiceNameResolver.getDefaultServiceNameList( userId); if (serviceNames != null) { if (Flags.packageUpdateFixEnabled()) { if (mServiceNameResolver.isConfiguredInMultipleMode()) { // Remove any service that is in the cache but is no longer valid // after this modification for this particular package removeInvalidCachedServicesLocked(serviceNames, packageName, userId); } // Remove any service that is in the cache but is no // longer valid after this modification for this //particular package removeInvalidCachedServicesLocked(serviceNames, packageName, userId); } // Update services that are still valid Loading
services/credentials/java/com/android/server/credentials/CredentialManagerServiceImpl.java +8 −16 Original line number Diff line number Diff line Loading @@ -28,7 +28,6 @@ import android.content.pm.ResolveInfo; import android.content.pm.ServiceInfo; import android.credentials.CredentialManager; import android.credentials.CredentialProviderInfo; import android.credentials.flags.Flags; import android.service.credentials.CredentialProviderInfoFactory; import android.service.credentials.CredentialProviderService; import android.util.Slog; Loading Loading @@ -161,21 +160,14 @@ public final class CredentialManagerServiceImpl extends if (mInfo != null && mInfo.getServiceInfo() != null && mInfo.getServiceInfo().getComponentName() .getPackageName().equals(packageName)) { if (Flags.packageUpdateFixEnabled()) { try { updateCredentialProviderInfo(mInfo.getServiceInfo().getComponentName(), mInfo.isSystemProvider()); updateCredentialProviderInfo(mInfo.getServiceInfo() .getComponentName(), mInfo.isSystemProvider()); } catch (SecurityException | PackageManager.NameNotFoundException | NullPointerException e) { Slog.w(TAG, "Unable to update provider, must be removed: " + e.getMessage()); mMaster.handleServiceRemovedMultiModeLocked(mInfo.getComponentName(), mUserId); } } else { try { newServiceInfoLocked(mInfo.getServiceInfo().getComponentName()); } catch (PackageManager.NameNotFoundException e) { Slog.e(TAG, "Issue while updating serviceInfo: " + e.getMessage()); } mMaster.handleServiceRemovedMultiModeLocked( mInfo.getComponentName(), mUserId); } } } Loading