summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2019-06-19 03:09:06 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2019-06-19 03:09:06 +0000
commit2230ec243f75eb6c7ba4d63b6894206e5c2f02e2 (patch)
tree53735ffbc55d7ac0268c14b034b5d00fe0c48671
parenta84c334497d8f85d627667bea3e054b89e248c6f (diff)
parent7c4d2248172cbfa5dd8856fada40f981c7a8f93c (diff)
downloadThemePicker-2230ec243f75eb6c7ba4d63b6894206e5c2f02e2.tar.gz
Snap for 5671254 from 7c4d2248172cbfa5dd8856fada40f981c7a8f93c to qt-release
Change-Id: I9d903aad42988511cd401f76856a5d35c78e56fb
-rw-r--r--res/layout/fragment_custom_theme_component.xml1
-rw-r--r--res/values/dimens.xml1
-rw-r--r--res/values/styles.xml4
-rw-r--r--src/com/android/customization/module/StatsLogUserEventLogger.java107
-rw-r--r--src/com/android/customization/widget/OptionSelectorController.java2
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);
}
}