Loading packages/SystemUI/AndroidManifest.xml +6 −4 Original line number Diff line number Diff line Loading @@ -913,8 +913,9 @@ android:excludeFromRecents="true" android:launchMode="singleInstance" android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation|keyboard|keyboardHidden" android:visibleToInstantApps="true"> </activity> android:visibleToInstantApps="true" android:exported="true" /> <activity android:name=".controls.management.ControlsEditingActivity" android:label="@string/controls_menu_edit" Loading Loading @@ -947,8 +948,9 @@ android:finishOnTaskLaunch="true" android:launchMode="singleInstance" android:configChanges="screenSize|smallestScreenSize|screenLayout|keyboard|keyboardHidden|orientation" android:visibleToInstantApps="true"> </activity> android:visibleToInstantApps="true" android:exported="true" /> <activity android:name=".wallet.ui.WalletActivity" android:label="@string/wallet_title" Loading packages/SystemUI/customization/src/com/android/systemui/shared/customization/data/content/CustomizationProviderClient.kt +18 −13 Original line number Diff line number Diff line Loading @@ -163,15 +163,14 @@ interface CustomizationProviderClient { */ val enablementActionText: String? = null, /** * If the affordance is disabled, this is a "component name" of the format * `packageName/action` to be used as an `Intent` for `startActivity` when the action button * (shown together with the set of instruction messages when the disabled affordance is * selected) is clicked by the user. The button should help send the user to a flow that * would help them achieve the instructions and re-enable this affordance. * If the affordance is disabled, this is an [Intent] to be used with `startActivity` when * the action button (shown together with the set of instruction messages when the disabled * affordance is selected) is clicked by the user. The button should help send the user to a * flow that would help them achieve the instructions and re-enable this affordance. * * If `null`, the button should not be shown. */ val enablementActionComponentName: String? = null, val enablementActionIntent: Intent? = null, /** Optional [Intent] to use to start an activity to configure this affordance. */ val configureIntent: Intent? = null, ) Loading Loading @@ -337,10 +336,10 @@ class CustomizationProviderClientImpl( Contract.LockScreenQuickAffordances.AffordanceTable.Columns .ENABLEMENT_ACTION_TEXT ) val enablementComponentNameColumnIndex = val enablementActionIntentColumnIndex = cursor.getColumnIndex( Contract.LockScreenQuickAffordances.AffordanceTable.Columns .ENABLEMENT_COMPONENT_NAME .ENABLEMENT_ACTION_INTENT ) val configureIntentColumnIndex = cursor.getColumnIndex( Loading @@ -354,7 +353,7 @@ class CustomizationProviderClientImpl( isEnabledColumnIndex == -1 || enablementInstructionsColumnIndex == -1 || enablementActionTextColumnIndex == -1 || enablementComponentNameColumnIndex == -1 || enablementActionIntentColumnIndex == -1 || configureIntentColumnIndex == -1 ) { return@buildList Loading @@ -377,12 +376,18 @@ class CustomizationProviderClientImpl( ), enablementActionText = cursor.getString(enablementActionTextColumnIndex), enablementActionComponentName = cursor.getString(enablementComponentNameColumnIndex), enablementActionIntent = cursor .getString(enablementActionIntentColumnIndex) ?.toIntent( affordanceId = affordanceId, ), configureIntent = cursor .getString(configureIntentColumnIndex) ?.toIntent(affordanceId = affordanceId), ?.toIntent( affordanceId = affordanceId, ), ) ) } Loading Loading @@ -524,7 +529,7 @@ class CustomizationProviderClientImpl( affordanceId: String, ): Intent? { return try { Intent.parseUri(this, 0) Intent.parseUri(this, Intent.URI_INTENT_SCHEME) } catch (e: URISyntaxException) { Log.w(TAG, "Cannot parse Uri into Intent for affordance with ID \"$affordanceId\"!") null Loading packages/SystemUI/customization/src/com/android/systemui/shared/customization/data/content/CustomizationProviderContract.kt +4 −5 Original line number Diff line number Diff line Loading @@ -82,7 +82,6 @@ object CustomizationProviderContract { val URI: Uri = LOCK_SCREEN_QUICK_AFFORDANCE_BASE_URI.buildUpon().appendPath(TABLE_NAME).build() const val ENABLEMENT_INSTRUCTIONS_DELIMITER = "][" const val COMPONENT_NAME_SEPARATOR = "/" object Columns { /** String. Unique ID for this affordance. */ Loading @@ -108,11 +107,11 @@ object CustomizationProviderContract { */ const val ENABLEMENT_ACTION_TEXT = "enablement_action_text" /** * String. Optional package name and activity action string, delimited by * [COMPONENT_NAME_SEPARATOR] to use with an `Intent` to start an activity that * opens a destination where the user can re-enable the disabled affordance. * String. Optional URI-formatted `Intent` (formatted using * `Intent#toUri(Intent.URI_INTENT_SCHEME)` used to start an activity that opens a * destination where the user can re-enable the disabled affordance. */ const val ENABLEMENT_COMPONENT_NAME = "enablement_action_intent" const val ENABLEMENT_ACTION_INTENT = "enablement_action_intent" /** * Byte array. Optional parcelled `Intent` to use to start an activity that can be * used to configure the affordance. Loading packages/SystemUI/res/values/config.xml +12 −0 Original line number Diff line number Diff line Loading @@ -902,4 +902,16 @@ <!-- Time (in ms) to delay the bouncer views from showing when passive auth may be used for device entry. --> <integer name="primary_bouncer_passive_auth_delay">500</integer> <!-- The package name of the app store app. If empty, features using this should be gracefully disabled. --> <string name="config_appStorePackageName" translatable="false"></string> <!-- Template for a link that leads to an app page in the relevant app store. If empty, features using this should be gracefully disabled. If not empty, it must include a "$packageName" part that will be replaced by the code with the package name of the target app. --> <string name="config_appStoreAppLinkTemplate" translatable="false"></string> </resources> packages/SystemUI/res/values/strings.xml +7 −0 Original line number Diff line number Diff line Loading @@ -3153,4 +3153,11 @@ <!--- Content of toast triggered when the notes app entry point is triggered without setting a default notes app. [CHAR LIMIT=NONE] --> <string name="set_default_notes_app_toast_content">Set default notes app in Settings</string> <!-- Label for a button that, when clicked, sends the user to the app store to install an app. [CHAR LIMIT=64]. --> <string name="install_app">Install app</string> </resources> Loading
packages/SystemUI/AndroidManifest.xml +6 −4 Original line number Diff line number Diff line Loading @@ -913,8 +913,9 @@ android:excludeFromRecents="true" android:launchMode="singleInstance" android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation|keyboard|keyboardHidden" android:visibleToInstantApps="true"> </activity> android:visibleToInstantApps="true" android:exported="true" /> <activity android:name=".controls.management.ControlsEditingActivity" android:label="@string/controls_menu_edit" Loading Loading @@ -947,8 +948,9 @@ android:finishOnTaskLaunch="true" android:launchMode="singleInstance" android:configChanges="screenSize|smallestScreenSize|screenLayout|keyboard|keyboardHidden|orientation" android:visibleToInstantApps="true"> </activity> android:visibleToInstantApps="true" android:exported="true" /> <activity android:name=".wallet.ui.WalletActivity" android:label="@string/wallet_title" Loading
packages/SystemUI/customization/src/com/android/systemui/shared/customization/data/content/CustomizationProviderClient.kt +18 −13 Original line number Diff line number Diff line Loading @@ -163,15 +163,14 @@ interface CustomizationProviderClient { */ val enablementActionText: String? = null, /** * If the affordance is disabled, this is a "component name" of the format * `packageName/action` to be used as an `Intent` for `startActivity` when the action button * (shown together with the set of instruction messages when the disabled affordance is * selected) is clicked by the user. The button should help send the user to a flow that * would help them achieve the instructions and re-enable this affordance. * If the affordance is disabled, this is an [Intent] to be used with `startActivity` when * the action button (shown together with the set of instruction messages when the disabled * affordance is selected) is clicked by the user. The button should help send the user to a * flow that would help them achieve the instructions and re-enable this affordance. * * If `null`, the button should not be shown. */ val enablementActionComponentName: String? = null, val enablementActionIntent: Intent? = null, /** Optional [Intent] to use to start an activity to configure this affordance. */ val configureIntent: Intent? = null, ) Loading Loading @@ -337,10 +336,10 @@ class CustomizationProviderClientImpl( Contract.LockScreenQuickAffordances.AffordanceTable.Columns .ENABLEMENT_ACTION_TEXT ) val enablementComponentNameColumnIndex = val enablementActionIntentColumnIndex = cursor.getColumnIndex( Contract.LockScreenQuickAffordances.AffordanceTable.Columns .ENABLEMENT_COMPONENT_NAME .ENABLEMENT_ACTION_INTENT ) val configureIntentColumnIndex = cursor.getColumnIndex( Loading @@ -354,7 +353,7 @@ class CustomizationProviderClientImpl( isEnabledColumnIndex == -1 || enablementInstructionsColumnIndex == -1 || enablementActionTextColumnIndex == -1 || enablementComponentNameColumnIndex == -1 || enablementActionIntentColumnIndex == -1 || configureIntentColumnIndex == -1 ) { return@buildList Loading @@ -377,12 +376,18 @@ class CustomizationProviderClientImpl( ), enablementActionText = cursor.getString(enablementActionTextColumnIndex), enablementActionComponentName = cursor.getString(enablementComponentNameColumnIndex), enablementActionIntent = cursor .getString(enablementActionIntentColumnIndex) ?.toIntent( affordanceId = affordanceId, ), configureIntent = cursor .getString(configureIntentColumnIndex) ?.toIntent(affordanceId = affordanceId), ?.toIntent( affordanceId = affordanceId, ), ) ) } Loading Loading @@ -524,7 +529,7 @@ class CustomizationProviderClientImpl( affordanceId: String, ): Intent? { return try { Intent.parseUri(this, 0) Intent.parseUri(this, Intent.URI_INTENT_SCHEME) } catch (e: URISyntaxException) { Log.w(TAG, "Cannot parse Uri into Intent for affordance with ID \"$affordanceId\"!") null Loading
packages/SystemUI/customization/src/com/android/systemui/shared/customization/data/content/CustomizationProviderContract.kt +4 −5 Original line number Diff line number Diff line Loading @@ -82,7 +82,6 @@ object CustomizationProviderContract { val URI: Uri = LOCK_SCREEN_QUICK_AFFORDANCE_BASE_URI.buildUpon().appendPath(TABLE_NAME).build() const val ENABLEMENT_INSTRUCTIONS_DELIMITER = "][" const val COMPONENT_NAME_SEPARATOR = "/" object Columns { /** String. Unique ID for this affordance. */ Loading @@ -108,11 +107,11 @@ object CustomizationProviderContract { */ const val ENABLEMENT_ACTION_TEXT = "enablement_action_text" /** * String. Optional package name and activity action string, delimited by * [COMPONENT_NAME_SEPARATOR] to use with an `Intent` to start an activity that * opens a destination where the user can re-enable the disabled affordance. * String. Optional URI-formatted `Intent` (formatted using * `Intent#toUri(Intent.URI_INTENT_SCHEME)` used to start an activity that opens a * destination where the user can re-enable the disabled affordance. */ const val ENABLEMENT_COMPONENT_NAME = "enablement_action_intent" const val ENABLEMENT_ACTION_INTENT = "enablement_action_intent" /** * Byte array. Optional parcelled `Intent` to use to start an activity that can be * used to configure the affordance. Loading
packages/SystemUI/res/values/config.xml +12 −0 Original line number Diff line number Diff line Loading @@ -902,4 +902,16 @@ <!-- Time (in ms) to delay the bouncer views from showing when passive auth may be used for device entry. --> <integer name="primary_bouncer_passive_auth_delay">500</integer> <!-- The package name of the app store app. If empty, features using this should be gracefully disabled. --> <string name="config_appStorePackageName" translatable="false"></string> <!-- Template for a link that leads to an app page in the relevant app store. If empty, features using this should be gracefully disabled. If not empty, it must include a "$packageName" part that will be replaced by the code with the package name of the target app. --> <string name="config_appStoreAppLinkTemplate" translatable="false"></string> </resources>
packages/SystemUI/res/values/strings.xml +7 −0 Original line number Diff line number Diff line Loading @@ -3153,4 +3153,11 @@ <!--- Content of toast triggered when the notes app entry point is triggered without setting a default notes app. [CHAR LIMIT=NONE] --> <string name="set_default_notes_app_toast_content">Set default notes app in Settings</string> <!-- Label for a button that, when clicked, sends the user to the app store to install an app. [CHAR LIMIT=64]. --> <string name="install_app">Install app</string> </resources>