Search in sources :

Example 1 with CHANGE_FLAG_ICON_PARAMS

use of com.android.launcher3.InvariantDeviceProfile.CHANGE_FLAG_ICON_PARAMS in project android_packages_apps_Trebuchet by LineageOS.

the class InvariantDeviceProfile method onConfigChanged.

private void onConfigChanged(Context context) {
    // Config changes, what shall we do?
    InvariantDeviceProfile oldProfile = new InvariantDeviceProfile(this);
    // Re-init grid
    String gridName = getCurrentGridName(context);
    initGrid(context, Utilities.getPrefs(context).getString(KEY_IDP_GRID_NAME, gridName));
    int changeFlags = 0;
    if (numRows != oldProfile.numRows || numColumns != oldProfile.numColumns || numFolderColumns != oldProfile.numFolderColumns || numFolderRows != oldProfile.numFolderRows || numHotseatIcons != oldProfile.numHotseatIcons) {
        changeFlags |= CHANGE_FLAG_GRID;
    }
    if (iconSize != oldProfile.iconSize || iconBitmapSize != oldProfile.iconBitmapSize || !iconShapePath.equals(oldProfile.iconShapePath) || !iconPack.equals(oldProfile.iconPack)) {
        changeFlags |= CHANGE_FLAG_ICON_PARAMS;
    }
    if (!iconShapePath.equals(oldProfile.iconShapePath)) {
        IconShape.init(context);
    }
    apply(context, changeFlags);
}
Also used : Utilities.getPointString(com.android.launcher3.Utilities.getPointString) Point(android.graphics.Point)

Aggregations

Point (android.graphics.Point)1 Utilities.getPointString (com.android.launcher3.Utilities.getPointString)1