diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2019-06-19 03:11:00 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2019-06-19 03:11:00 +0000 |
commit | 40ebe52e3048b0d15c322f2a485b3aceb455f297 (patch) | |
tree | 53735ffbc55d7ac0268c14b034b5d00fe0c48671 | |
parent | 524cad4be17e75b6ae2ca555c4ec366e7b40cd5c (diff) | |
parent | be888010b599d70504ae7350615f586d474061ab (diff) | |
download | ThemePicker-40ebe52e3048b0d15c322f2a485b3aceb455f297.tar.gz |
Snap for 5671249 from be888010b599d70504ae7350615f586d474061ab to qt-qpr1-release
Change-Id: I2ef916a254c6d9ae3cd496fd2a2528529f29c195
-rw-r--r-- | res/layout/fragment_custom_theme_component.xml | 1 | ||||
-rw-r--r-- | res/values/dimens.xml | 1 | ||||
-rw-r--r-- | res/values/styles.xml | 4 | ||||
-rw-r--r-- | src/com/android/customization/module/StatsLogUserEventLogger.java | 107 | ||||
-rw-r--r-- | src/com/android/customization/widget/OptionSelectorController.java | 2 |
5 files changed, 28 insertions, 87 deletions
diff --git a/res/layout/fragment_custom_theme_component.xml b/res/layout/fragment_custom_theme_component.xml index 13b0b337..314480f1 100644 --- a/res/layout/fragment_custom_theme_component.xml +++ b/res/layout/fragment_custom_theme_component.xml @@ -78,6 +78,7 @@ android:layout_marginBottom="10dp" android:textAlignment="center" android:textAppearance="@style/HeaderTextAppearance" + android:textSize="@dimen/component_options_title_size" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/guideline"/> diff --git a/res/values/dimens.xml b/res/values/dimens.xml index 51e4a83b..00b2bed7 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -99,6 +99,7 @@ <dimen name="component_shape_thumb_size">72dp</dimen> <dimen name="option_border_width">2dp</dimen> <dimen name="option_selected_border_width">3dp</dimen> + <dimen name="component_options_title_size">18sp</dimen> <!-- For a corner radius of this size or larger, we'll preview a rounded qsb widget. --> <dimen name="roundCornerThreshold">16dp</dimen> diff --git a/res/values/styles.xml b/res/values/styles.xml index fd24414a..dd8e18dc 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -55,9 +55,7 @@ </style> <!-- Common components and widgets --> - <style name="HeaderTextAppearance" parent="@android:style/TextAppearance.DeviceDefault.Widget.ActionBar.Title"> - <item name="android:textFontWeight">400</item> - </style> + <style name="HeaderTextAppearance" parent="@android:style/TextAppearance.DeviceDefault.Widget.ActionBar.Title"/> <style name="ActionPrimaryButton" parent="android:Widget.DeviceDefault.Button.Colored"/> diff --git a/src/com/android/customization/module/StatsLogUserEventLogger.java b/src/com/android/customization/module/StatsLogUserEventLogger.java index 8762b203..07d8c1df 100644 --- a/src/com/android/customization/module/StatsLogUserEventLogger.java +++ b/src/com/android/customization/module/StatsLogUserEventLogger.java @@ -20,6 +20,7 @@ import android.util.Log; import androidx.annotation.Nullable; +import com.android.systemui.shared.system.StatsLogCompat; import com.android.customization.model.clock.Clockface; import com.android.customization.model.grid.GridOption; import com.android.customization.model.theme.ThemeBundle; @@ -41,70 +42,40 @@ public class StatsLogUserEventLogger extends NoOpUserEventLogger implements Them @Override public void logResumed() { - Log.d(TAG, String.format("logResumed: %d, %d, %d, %d, %d, %d, %d, %d", - StyleEnums.ONRESUME, - 0, 0, 0, 0, 0, 0, 0)); -// StatsLogCompat.write(StyleEnums.ONRESUME, -// 0, 0, 0, 0, 0, 0, 0); + StatsLogCompat.write(StyleEnums.ONRESUME, 0, 0, 0, 0, 0, 0, 0, 0, 0); } @Override public void logStopped() { - Log.d(TAG, String.format("logStopped: %d, %d, %d, %d, %d, %d, %d, %d", - StyleEnums.ONSTOP, - 0, 0, 0, 0, 0, 0, 0)); -// StatsLogCompat.write(StyleEnums.ONSTOP, -// 0, 0, 0, 0, 0, 0, 0); + StatsLogCompat.write(StyleEnums.ONSTOP, 0, 0, 0, 0, 0, 0, 0, 0, 0); } @Override public void logActionClicked(String collectionId, int actionLabelResId) { - Log.d(TAG, String.format("logActionClicked: %d, %d, %d, %d, %d, %d, %d, %d", - StyleEnums.WALLPAPER_EXPLORE, - 0, 0, 0, 0, 0, - collectionId.hashCode(), - 0)); -// StatsLogCompat.write(StyleEnums.WALLPAPER_EXPLORE, -// 0, 0, 0, 0, 0, -// collectionId.hashCode(), -// 0)); + StatsLogCompat.write(StyleEnums.WALLPAPER_EXPLORE, 0, 0, 0, 0, 0, collectionId.hashCode(), + 0, 0, 0); } @Override public void logIndividualWallpaperSelected(String collectionId) { - Log.d(TAG, String.format("logIndividualWallpaperSelected: %d, %d, %d, %d, %d, %d, %d, %d", - StyleEnums.WALLPAPER_SELECT, - 0, 0, 0, 0, 0, 0, - collectionId.hashCode())); -// StatsLogCompat.write(StyleEnums.WALLPAPER_SELECT, -// 0, 0, 0, 0, 0, 0, -// collectionId.hashCode()); + StatsLogCompat.write(StyleEnums.WALLPAPER_SELECT, 0, 0, 0, 0, 0, 0, + collectionId.hashCode(), 0, 0); } @Override public void logCategorySelected(String collectionId) { - Log.d(TAG, String.format("logCategorySelected: %d, %d, %d, %d, %d, %d, %d, %d", - StyleEnums.WALLPAPER_SELECT, + StatsLogCompat.write(StyleEnums.WALLPAPER_SELECT, 0, 0, 0, 0, 0, collectionId.hashCode(), - 0)); -// StatsLogCompat.write(StyleEnums.WALLPAPER_SELECT, -// 0, 0, 0, 0, 0, -// collectionId.hashCode(), -// 0); + 0, 0, 0); } @Override public void logWallpaperSet(String collectionId, @Nullable String wallpaperId) { - Log.d(TAG, String.format("logWallpaperSet: %d, %d, %d, %d, %d, %d, %d, %d", - StyleEnums.WALLPAPER_APPLIED, + StatsLogCompat.write(StyleEnums.WALLPAPER_SELECT, 0, 0, 0, 0, 0, collectionId.hashCode(), - Objects.hashCode(wallpaperId))); -// StatsLogCompat.write(StyleEnums.WALLPAPER_SELECT, -// 0, 0, 0, 0, 0, -// collectionId.hashCode(), -// 0); + 0, 0, 0); } @Nullable @@ -115,83 +86,51 @@ public class StatsLogUserEventLogger extends NoOpUserEventLogger implements Them @Override public void logThemeSelected(ThemeBundle theme, boolean isCustomTheme) { - Log.d(TAG, String.format("logThemeSelected: %d, %d, %d, %d, %d, %d, %d, %d", - StyleEnums.PICKER_SELECT, + StatsLogCompat.write(StyleEnums.PICKER_SELECT, Objects.hashCode(getThemePackage(theme, OVERLAY_CATEGORY_COLOR)), Objects.hashCode(getThemePackage(theme,OVERLAY_CATEGORY_FONT)), Objects.hashCode(getThemePackage(theme, OVERLAY_CATEGORY_SHAPE)), - 0, 0, 0, 0)); -// StatsLogCompat.write(StyleEnums.PICKER_SELECT, -// Objects.hashCode(getThemePackage(theme, OVERLAY_CATEGORY_COLOR)), -// Objects.hashCode(getThemePackage(theme,OVERLAY_CATEGORY_FONT)), -// Objects.hashCode(getThemePackage(theme, OVERLAY_CATEGORY_SHAPE)), -// 0, 0, 0, 0); + 0, 0, 0, 0, 0, 0); } @Override public void logThemeApplied(ThemeBundle theme, boolean isCustomTheme) { - Log.d(TAG, String.format("logThemeApplied: %d, %d, %d, %d, %d, %d, %d, %d", - StyleEnums.PICKER_APPLIED, + StatsLogCompat.write(StyleEnums.PICKER_APPLIED, Objects.hashCode(getThemePackage(theme, OVERLAY_CATEGORY_COLOR)), Objects.hashCode(getThemePackage(theme,OVERLAY_CATEGORY_FONT)), Objects.hashCode(getThemePackage(theme, OVERLAY_CATEGORY_SHAPE)), - 0, 0, 0, 0)); -// StatsLogCompat.write(StyleEnums.PICKER_APPLIED, -// Objects.hashCode(getThemePackage(theme, OVERLAY_CATEGORY_COLOR)), -// Objects.hashCode(getThemePackage(theme,OVERLAY_CATEGORY_FONT)), -// Objects.hashCode(getThemePackage(theme, OVERLAY_CATEGORY_SHAPE)), -// 0, 0, 0, 0); + 0, 0, 0, 0, 0, 0); } @Override public void logClockSelected(Clockface clock) { - Log.d(TAG, String.format("logClockSelected: %d, %d, %d, %d, %d, %d, %d, %d", - StyleEnums.PICKER_SELECT, + StatsLogCompat.write(StyleEnums.PICKER_SELECT, 0, 0, 0, Objects.hashCode(clock.getId()), - 0, 0, 0)); -// StatsLogCompat.write(StyleEnums.PICKER_SELECT, -// 0, 0, 0, -// Objects.hashCode(clock.getId()), -// 0, 0, 0)); + 0, 0, 0, 0, 0); } @Override public void logClockApplied(Clockface clock) { - Log.d(TAG, String.format("logClockApplied: %d, %d, %d, %d, %d, %d, %d, %d", - StyleEnums.PICKER_APPLIED, + StatsLogCompat.write(StyleEnums.PICKER_APPLIED, 0, 0, 0, Objects.hashCode(clock.getId()), - 0, 0, 0)); -// StatsLogCompat.write(StyleEnums.PICKER_APPLIED, -// 0, 0, 0, -// Objects.hashCode(clock.getId()), -// 0, 0, 0)); + 0, 0, 0, 0, 0); } @Override public void logGridSelected(GridOption grid) { - Log.d(TAG, String.format("logGridSelected: %d, %d, %d, %d, %d, %d, %d, %d", - StyleEnums.PICKER_SELECT, + StatsLogCompat.write(StyleEnums.PICKER_SELECT, 0, 0, 0, 0, grid.cols, - 0, 0)); -// StatsLogCompat.write(StyleEnums.PICKER_SELECT, -// 0, 0, 0, 0, -// Objects.hashCode(clock.getId()), -// 0, 0)); + 0, 0, 0, 0); } @Override public void logGridApplied(GridOption grid) { - Log.d(TAG, String.format("logGridApplied: %d, %d, %d, %d, %d, %d, %d, %d", - StyleEnums.PICKER_APPLIED, + StatsLogCompat.write(StyleEnums.PICKER_APPLIED, 0, 0, 0, 0, grid.cols, - 0, 0)); -// StatsLogCompat.write(StyleEnums.PICKER_APPLIED, -// 0, 0, 0, 0, -// Objects.hashCode(clock.getId()), -// 0, 0)); + 0, 0, 0, 0); } } diff --git a/src/com/android/customization/widget/OptionSelectorController.java b/src/com/android/customization/widget/OptionSelectorController.java index 5e3a4231..9c92079d 100644 --- a/src/com/android/customization/widget/OptionSelectorController.java +++ b/src/com/android/customization/widget/OptionSelectorController.java @@ -311,6 +311,7 @@ public class OptionSelectorController<T extends CustomizationOption<T>> { if (labelView != null && !TextUtils.isEmpty(labelView.getText())) { labelView.setContentDescription(cd); } else if (tileView != null) { + tileView.setAccessibilityPaneTitle(cd); tileView.setContentDescription(cd); } } @@ -319,6 +320,7 @@ public class OptionSelectorController<T extends CustomizationOption<T>> { if (labelView != null && !TextUtils.isEmpty(labelView.getText())) { labelView.setContentDescription(title); } else if (tileView != null) { + tileView.setAccessibilityPaneTitle(title); tileView.setContentDescription(title); } } |