Search in sources :

Example 1 with AppReloader

use of com.android.launcher3.util.AppReloader in project android_packages_apps_404Launcher by P-404.

the class IconPackManager method onReceive.

@Override
public void onReceive(Context context, Intent intent) {
    if (intent.getData() != null) {
        String pkg = intent.getData().getEncodedSchemeSpecificPart();
        if (pkg != null) {
            Log.d(TAG, "Received intent action " + intent.getAction() + " for " + pkg);
            AppReloader appReloader = AppReloader.get(mContext);
            // Create a list of apps that are using the changed package icon pack,
            // either through the global setting or with an override.
            Set<ComponentKey> updateKeys = appReloader.withIconPack(pkg);
            // Remove the changed package from the providers to reload the application info.
            mProviders.remove(pkg);
            // This can reset the global preference, so do this after creating the list.
            reloadProviders();
            // Ensure all icons are up-to-date after this icon pack change.
            // Calendar and clock information will automatically be reloaded by this call.
            appReloader.reload(updateKeys);
        }
    }
}
Also used : ComponentKey(com.android.launcher3.util.ComponentKey) AppReloader(com.android.launcher3.util.AppReloader)

Aggregations

AppReloader (com.android.launcher3.util.AppReloader)1 ComponentKey (com.android.launcher3.util.ComponentKey)1