Loading src/com/android/customization/model/theme/ThemeBundle.java +3 −1 Original line number Diff line number Diff line Loading @@ -70,6 +70,7 @@ import java.util.Set; */ public class ThemeBundle implements CustomizationOption<ThemeBundle> { private final static String EMPTY_JSON = "{}"; private final String mTitle; private final PreviewInfo mPreviewInfo; private final boolean mIsDefault; Loading Loading @@ -144,7 +145,8 @@ public class ThemeBundle implements CustomizationOption<ThemeBundle> { return false; } if (mIsDefault) { return other.isDefault() || TextUtils.isEmpty(other.getSerializedPackages()); return other.isDefault() || TextUtils.isEmpty(other.getSerializedPackages()) || EMPTY_JSON.equals(other.getSerializedPackages()); } // Map#equals ensures keys and values are compared. return mPackagesByCategory.equals(other.mPackagesByCategory); Loading src/com/android/customization/model/theme/custom/IconOptionsProvider.java +6 −1 Original line number Diff line number Diff line Loading @@ -142,6 +142,11 @@ public class IconOptionsProvider extends ThemeComponentOptionProvider<IconOption } catch (NameNotFoundException | NotFoundException e) { Log.w(TAG, "Didn't find SystemUi package icons, will skip option", e); } option.addOverlayPackage(OVERLAY_CATEGORY_ICON_ANDROID, null); option.addOverlayPackage(OVERLAY_CATEGORY_ICON_SYSUI, null); option.addOverlayPackage(OVERLAY_CATEGORY_ICON_SETTINGS, null); option.addOverlayPackage(OVERLAY_CATEGORY_ICON_LAUNCHER, null); option.addOverlayPackage(OVERLAY_CATEGORY_ICON_THEMEPICKER, null); mOptions.add(option); } Loading src/com/android/customization/model/theme/custom/ThemeComponentOption.java +1 −7 Original line number Diff line number Diff line Loading @@ -34,7 +34,6 @@ import android.graphics.Typeface; import android.graphics.drawable.Drawable; import android.graphics.drawable.LayerDrawable; import android.graphics.drawable.ShapeDrawable; import android.text.TextUtils; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; Loading @@ -61,7 +60,6 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Objects; /** Loading Loading @@ -92,11 +90,7 @@ public abstract class ThemeComponentOption implements CustomizationOption<ThemeC public abstract void bindPreview(ViewGroup container); public Builder buildStep(Builder builder) { getOverlayPackages().forEach((category, packageName) -> { if (!TextUtils.isEmpty(packageName)) { builder.addOverlayPackage(category, packageName); } }); getOverlayPackages().forEach(builder::addOverlayPackage); return builder; } Loading Loading
src/com/android/customization/model/theme/ThemeBundle.java +3 −1 Original line number Diff line number Diff line Loading @@ -70,6 +70,7 @@ import java.util.Set; */ public class ThemeBundle implements CustomizationOption<ThemeBundle> { private final static String EMPTY_JSON = "{}"; private final String mTitle; private final PreviewInfo mPreviewInfo; private final boolean mIsDefault; Loading Loading @@ -144,7 +145,8 @@ public class ThemeBundle implements CustomizationOption<ThemeBundle> { return false; } if (mIsDefault) { return other.isDefault() || TextUtils.isEmpty(other.getSerializedPackages()); return other.isDefault() || TextUtils.isEmpty(other.getSerializedPackages()) || EMPTY_JSON.equals(other.getSerializedPackages()); } // Map#equals ensures keys and values are compared. return mPackagesByCategory.equals(other.mPackagesByCategory); Loading
src/com/android/customization/model/theme/custom/IconOptionsProvider.java +6 −1 Original line number Diff line number Diff line Loading @@ -142,6 +142,11 @@ public class IconOptionsProvider extends ThemeComponentOptionProvider<IconOption } catch (NameNotFoundException | NotFoundException e) { Log.w(TAG, "Didn't find SystemUi package icons, will skip option", e); } option.addOverlayPackage(OVERLAY_CATEGORY_ICON_ANDROID, null); option.addOverlayPackage(OVERLAY_CATEGORY_ICON_SYSUI, null); option.addOverlayPackage(OVERLAY_CATEGORY_ICON_SETTINGS, null); option.addOverlayPackage(OVERLAY_CATEGORY_ICON_LAUNCHER, null); option.addOverlayPackage(OVERLAY_CATEGORY_ICON_THEMEPICKER, null); mOptions.add(option); } Loading
src/com/android/customization/model/theme/custom/ThemeComponentOption.java +1 −7 Original line number Diff line number Diff line Loading @@ -34,7 +34,6 @@ import android.graphics.Typeface; import android.graphics.drawable.Drawable; import android.graphics.drawable.LayerDrawable; import android.graphics.drawable.ShapeDrawable; import android.text.TextUtils; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; Loading @@ -61,7 +60,6 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Objects; /** Loading Loading @@ -92,11 +90,7 @@ public abstract class ThemeComponentOption implements CustomizationOption<ThemeC public abstract void bindPreview(ViewGroup container); public Builder buildStep(Builder builder) { getOverlayPackages().forEach((category, packageName) -> { if (!TextUtils.isEmpty(packageName)) { builder.addOverlayPackage(category, packageName); } }); getOverlayPackages().forEach(builder::addOverlayPackage); return builder; } Loading