Loading res/layout/keyguard_quick_affordance.xml +3 −1 Original line number Diff line number Diff line Loading @@ -62,8 +62,10 @@ android:id="@id/text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center_horizontal" android:textColor="@color/text_color_primary" android:singleLine="true" android:maxLines="2" android:hyphenationFrequency="normal" android:ellipsize="end" android:text="Placeholder for stable size calculation, please do not remove." tools:ignore="HardcodedText" /> Loading res/values/strings.xml +2 −9 Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ <string name="clock_picker_entry_content_description">Change a custom clock</string> <!-- Title of a section of the customization picker where the user can configure Clock face. [CHAR LIMIT=19] --> <string name="clock_settings_title">Clock Settings</string> <string name="clock_settings_title">Clock color & size</string> <!-- Title of a section of the customization picker where the user can configure clock color and size. [CHAR LIMIT=20] --> <string name="clock_color_and_size_title">Clock color & size</string> Loading Loading @@ -360,14 +360,7 @@ enabled. The dialog contains a list of instructions that the user needs to take in order to enable the option before it can be selected again. [CHAR LIMIT=NONE]. --> <string name="keyguard_affordance_enablement_dialog_headline">Shortcut unavailable</string> <!-- Supporting text for a popup dialog shown when the user attempts to select an option that is not currently enabled. The dialog contains a list of instructions that the user needs to take in order to enable the option before it can be selected again. [CHAR LIMIT=NONE]. --> <string name="keyguard_affordance_enablement_dialog_title">To select `<xliff:g id="appName" example="Wallet">%1$s</xliff:g>` check the following</string> <string name="keyguard_affordance_enablement_dialog_headline">Can\'t add shortcut</string> <!-- Template for an action that opens a specific app. [CHAR LIMIT=16] Loading src/com/android/customization/picker/quickaffordance/data/repository/KeyguardQuickAffordancePickerRepository.kt +1 −1 Original line number Diff line number Diff line Loading @@ -80,7 +80,7 @@ class KeyguardQuickAffordancePickerRepository( name = name, iconResourceId = iconResourceId, isEnabled = isEnabled, enablementInstructions = enablementInstructions ?: emptyList(), enablementExplanation = enablementExplanation ?: "", enablementActionText = enablementActionText, enablementActionIntent = enablementActionIntent, configureIntent = configureIntent, Loading src/com/android/customization/picker/quickaffordance/shared/model/KeyguardQuickAffordancePickerAffordanceModel.kt +2 −2 Original line number Diff line number Diff line Loading @@ -31,8 +31,8 @@ data class KeyguardQuickAffordancePickerAffordanceModel( @DrawableRes val iconResourceId: Int, /** Whether this quick affordance is enabled. */ val isEnabled: Boolean, /** If not enabled, the list of user-visible steps to re-enable it. */ val enablementInstructions: List<String>, /** If not enabled, the user-visible message explaining why. */ val enablementExplanation: String, /** * If not enabled, an optional label for a button that takes the user to a destination where * they can re-enable it. Loading src/com/android/customization/picker/quickaffordance/ui/viewmodel/KeyguardQuickAffordancePickerViewModel.kt +31 −32 Original line number Diff line number Diff line Loading @@ -261,7 +261,7 @@ private constructor( showEnablementDialog( icon = affordanceIcon, name = affordance.name, instructions = affordance.enablementInstructions, explanation = affordance.enablementExplanation, actionText = affordance.enablementActionText, actionIntent = affordance.enablementActionIntent, ) Loading Loading @@ -346,7 +346,7 @@ private constructor( private fun showEnablementDialog( icon: Drawable, name: String, instructions: List<String>, explanation: String, actionText: String?, actionIntent: Intent?, ) { Loading @@ -358,39 +358,38 @@ private constructor( contentDescription = null, ), headline = Text.Resource(R.string.keyguard_affordance_enablement_dialog_headline), supportingText = Text.Loaded( applicationContext.getString( R.string.keyguard_affordance_enablement_dialog_title, name ) ), message = Text.Loaded( buildString { instructions.forEachIndexed { index, instruction -> if (index > 0) { append('\n') } append(instruction) } } ), message = Text.Loaded(explanation), buttons = listOf( buildList { add( ButtonViewModel( text = actionText?.let { Text.Loaded(actionText) } ?: Text.Resource( text = Text.Resource( if (actionText != null) { // This is not the only button on the dialog. R.string.cancel } else { // This is the only button on the dialog. R.string .keyguard_affordance_enablement_dialog_dismiss_button, .keyguard_affordance_enablement_dialog_dismiss_button } ), style = ButtonStyle.Secondary, ), ) if (actionText != null) { add( ButtonViewModel( text = Text.Loaded(actionText), style = ButtonStyle.Primary, onClicked = { actionIntent?.let { intent -> requestActivityStart(intent) } } ), ), ) } }, ) } Loading Loading
res/layout/keyguard_quick_affordance.xml +3 −1 Original line number Diff line number Diff line Loading @@ -62,8 +62,10 @@ android:id="@id/text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center_horizontal" android:textColor="@color/text_color_primary" android:singleLine="true" android:maxLines="2" android:hyphenationFrequency="normal" android:ellipsize="end" android:text="Placeholder for stable size calculation, please do not remove." tools:ignore="HardcodedText" /> Loading
res/values/strings.xml +2 −9 Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ <string name="clock_picker_entry_content_description">Change a custom clock</string> <!-- Title of a section of the customization picker where the user can configure Clock face. [CHAR LIMIT=19] --> <string name="clock_settings_title">Clock Settings</string> <string name="clock_settings_title">Clock color & size</string> <!-- Title of a section of the customization picker where the user can configure clock color and size. [CHAR LIMIT=20] --> <string name="clock_color_and_size_title">Clock color & size</string> Loading Loading @@ -360,14 +360,7 @@ enabled. The dialog contains a list of instructions that the user needs to take in order to enable the option before it can be selected again. [CHAR LIMIT=NONE]. --> <string name="keyguard_affordance_enablement_dialog_headline">Shortcut unavailable</string> <!-- Supporting text for a popup dialog shown when the user attempts to select an option that is not currently enabled. The dialog contains a list of instructions that the user needs to take in order to enable the option before it can be selected again. [CHAR LIMIT=NONE]. --> <string name="keyguard_affordance_enablement_dialog_title">To select `<xliff:g id="appName" example="Wallet">%1$s</xliff:g>` check the following</string> <string name="keyguard_affordance_enablement_dialog_headline">Can\'t add shortcut</string> <!-- Template for an action that opens a specific app. [CHAR LIMIT=16] Loading
src/com/android/customization/picker/quickaffordance/data/repository/KeyguardQuickAffordancePickerRepository.kt +1 −1 Original line number Diff line number Diff line Loading @@ -80,7 +80,7 @@ class KeyguardQuickAffordancePickerRepository( name = name, iconResourceId = iconResourceId, isEnabled = isEnabled, enablementInstructions = enablementInstructions ?: emptyList(), enablementExplanation = enablementExplanation ?: "", enablementActionText = enablementActionText, enablementActionIntent = enablementActionIntent, configureIntent = configureIntent, Loading
src/com/android/customization/picker/quickaffordance/shared/model/KeyguardQuickAffordancePickerAffordanceModel.kt +2 −2 Original line number Diff line number Diff line Loading @@ -31,8 +31,8 @@ data class KeyguardQuickAffordancePickerAffordanceModel( @DrawableRes val iconResourceId: Int, /** Whether this quick affordance is enabled. */ val isEnabled: Boolean, /** If not enabled, the list of user-visible steps to re-enable it. */ val enablementInstructions: List<String>, /** If not enabled, the user-visible message explaining why. */ val enablementExplanation: String, /** * If not enabled, an optional label for a button that takes the user to a destination where * they can re-enable it. Loading
src/com/android/customization/picker/quickaffordance/ui/viewmodel/KeyguardQuickAffordancePickerViewModel.kt +31 −32 Original line number Diff line number Diff line Loading @@ -261,7 +261,7 @@ private constructor( showEnablementDialog( icon = affordanceIcon, name = affordance.name, instructions = affordance.enablementInstructions, explanation = affordance.enablementExplanation, actionText = affordance.enablementActionText, actionIntent = affordance.enablementActionIntent, ) Loading Loading @@ -346,7 +346,7 @@ private constructor( private fun showEnablementDialog( icon: Drawable, name: String, instructions: List<String>, explanation: String, actionText: String?, actionIntent: Intent?, ) { Loading @@ -358,39 +358,38 @@ private constructor( contentDescription = null, ), headline = Text.Resource(R.string.keyguard_affordance_enablement_dialog_headline), supportingText = Text.Loaded( applicationContext.getString( R.string.keyguard_affordance_enablement_dialog_title, name ) ), message = Text.Loaded( buildString { instructions.forEachIndexed { index, instruction -> if (index > 0) { append('\n') } append(instruction) } } ), message = Text.Loaded(explanation), buttons = listOf( buildList { add( ButtonViewModel( text = actionText?.let { Text.Loaded(actionText) } ?: Text.Resource( text = Text.Resource( if (actionText != null) { // This is not the only button on the dialog. R.string.cancel } else { // This is the only button on the dialog. R.string .keyguard_affordance_enablement_dialog_dismiss_button, .keyguard_affordance_enablement_dialog_dismiss_button } ), style = ButtonStyle.Secondary, ), ) if (actionText != null) { add( ButtonViewModel( text = Text.Loaded(actionText), style = ButtonStyle.Primary, onClicked = { actionIntent?.let { intent -> requestActivityStart(intent) } } ), ), ) } }, ) } Loading