Search in sources :

Example 6 with OverlayInfo

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

the class OverlayManagerSettings method remove.

void remove(@NonNull final String packageName, final int userId) {
    final SettingsItem item = select(packageName, userId);
    if (item == null) {
        return;
    }
    final OverlayInfo oi = item.getOverlayInfo();
    mItems.remove(item);
    if (oi != null) {
        notifyOverlayRemoved(oi, false);
    }
}
Also used : OverlayInfo(android.content.om.OverlayInfo)

Example 7 with OverlayInfo

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

the class OverlayManagerSettings method remove.

void remove(@NonNull final String packageName, final int userId) {
    final SettingsItem item = select(packageName, userId);
    if (item == null) {
        return;
    }
    final OverlayInfo oi = item.getOverlayInfo();
    mItems.remove(item);
    if (oi != null) {
        notifyOverlayRemoved(oi, false);
    }
}
Also used : OverlayInfo(android.content.om.OverlayInfo)

Example 8 with OverlayInfo

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

the class OverlayManagerServiceImpl method onOverlayPackageUpgrading.

void onOverlayPackageUpgrading(@NonNull final String packageName, final int userId) {
    if (DEBUG) {
        Slog.d(TAG, "onOverlayPackageUpgrading packageName=" + packageName + " userId=" + userId);
    }
    try {
        final OverlayInfo oi = mSettings.getOverlayInfo(packageName, userId);
        mSettings.setUpgrading(packageName, userId, true);
        removeIdmapIfPossible(oi);
    } catch (OverlayManagerSettings.BadKeyException e) {
        Slog.e(TAG, "failed to update settings", e);
        mSettings.remove(packageName, userId);
    }
}
Also used : OverlayInfo(android.content.om.OverlayInfo)

Example 9 with OverlayInfo

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

the class OverlayManagerSettings method setState.

void setState(@NonNull final String packageName, final int userId, final int state, final boolean shouldWait) throws BadKeyException {
    final SettingsItem item = select(packageName, userId);
    if (item == null) {
        throw new BadKeyException(packageName, userId);
    }
    final OverlayInfo previous = item.getOverlayInfo();
    item.setState(state);
    final OverlayInfo current = item.getOverlayInfo();
    if (previous.state == STATE_NOT_APPROVED_UNKNOWN) {
        notifyOverlayAdded(current, shouldWait);
        notifySettingsChanged();
    } else if (current.state != previous.state) {
        notifyOverlayChanged(current, previous, shouldWait);
        notifySettingsChanged();
    }
}
Also used : OverlayInfo(android.content.om.OverlayInfo)

Example 10 with OverlayInfo

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

the class OverlayManagerSettings method remove.

void remove(@NonNull final String packageName, final int userId) {
    final SettingsItem item = select(packageName, userId);
    if (item == null) {
        return;
    }
    final OverlayInfo oi = item.getOverlayInfo();
    mItems.remove(item);
    if (oi != null) {
        notifyOverlayRemoved(oi, false);
    }
}
Also used : 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