From ac1a0daee234713b9661ac86aca7a9073d93fcb7 Mon Sep 17 00:00:00 2001 From: Hyunyoung Song Date: Fri, 7 Jun 2019 12:24:23 -0700 Subject: Re-enable WW logging Bug: 123356136 Change-Id: I8014886edbeea3a56b1731f8722a3a895be2166b --- .../module/StatsLogUserEventLogger.java | 107 +++++---------------- 1 file changed, 23 insertions(+), 84 deletions(-) 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); } } -- cgit v1.2.3 From c84412d6605b3fb7dec250c55f4f26a5b5d00cbf Mon Sep 17 00:00:00 2001 From: Beth Thibodeau Date: Wed, 12 Jun 2019 14:44:18 -0400 Subject: Set pane title for accessibility issues The icon and color tileView didn't update content description readout until re-selected. Setting the pane title updates it immediately instead. Fixes: 131293339 Test: manual Change-Id: I00f152adf5eb599154258cc820dc780197d0f477 --- src/com/android/customization/widget/OptionSelectorController.java | 2 ++ 1 file changed, 2 insertions(+) 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> { 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> { if (labelView != null && !TextUtils.isEmpty(labelView.getText())) { labelView.setContentDescription(title); } else if (tileView != null) { + tileView.setAccessibilityPaneTitle(title); tileView.setContentDescription(title); } } -- cgit v1.2.3 From 9ad06b48045cc1110ec04eabdbf4f9380ef25781 Mon Sep 17 00:00:00 2001 From: Santiago Etchebehere Date: Fri, 14 Jun 2019 11:53:21 -0700 Subject: Update font weights and sizes Update picker fonts to match spec Fixes: 135219143 Change-Id: I338cd19eacbbcde1a375756c55f28e061e26e85d --- res/layout/fragment_custom_theme_component.xml | 1 + res/values/dimens.xml | 1 + res/values/styles.xml | 4 +--- 3 files changed, 3 insertions(+), 3 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 @@ 72dp 2dp 3dp + 18sp 16dp 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 @@ - +