Search in sources :

Example 41 with OverlayInfo

use of android.content.om.OverlayInfo in project android_frameworks_base by crdroidandroid.

the class OverlayManagerServiceImpl method updateAllOverlaysForTarget.

private void updateAllOverlaysForTarget(@NonNull final String packageName, final int userId, @Nullable final PackageInfo targetPackage) {
    final List<OverlayInfo> ois = mSettings.getOverlaysForTarget(packageName, userId);
    for (final OverlayInfo oi : ois) {
        final PackageInfo overlayPackage = mPackageManager.getPackageInfo(oi.packageName, userId);
        if (overlayPackage == null) {
            mSettings.remove(oi.packageName, oi.userId);
            removeIdmapIfPossible(oi);
        } else {
            try {
                updateState(targetPackage, overlayPackage, userId);
            } catch (OverlayManagerSettings.BadKeyException e) {
                Slog.e(TAG, "failed to update settings", e);
                mSettings.remove(oi.packageName, userId);
            }
        }
    }
}
Also used : PackageInfo(android.content.pm.PackageInfo) OverlayInfo(android.content.om.OverlayInfo)

Aggregations

OverlayInfo (android.content.om.OverlayInfo)41 PackageInfo (android.content.pm.PackageInfo)12 ArrayList (java.util.ArrayList)9 List (java.util.List)5 ArrayMap (android.util.ArrayMap)4 ArraySet (android.util.ArraySet)4 IOverlayManager (android.content.om.IOverlayManager)1 LocaleList (android.os.LocaleList)1 RemoteCallbackList (android.os.RemoteCallbackList)1 RemoteException (android.os.RemoteException)1