Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 98f3d8bc authored by rambowang's avatar rambowang Committed by Rambo Wang
Browse files

Expose SYSTEM_UPGRADE_SETTINGS as a public API

This change exposes android.settings.SYSTEM_UPDATE_SETTINGS as a public
API, enabling applications to directly navigate users to system upgrade
page in a secure and standardized manner.

Many OEMs have implemented the API in advance for years. There is no
additional implementation effort in AOSP.

CTS test cases will be introduced to enforce all OEMs to support the
contract of the API.

Bug: 417458670
Test: atest android.provider.cts.settings.SettingsTest
Flag: android.provider.expose_system_update_settings
Change-Id: I193895a5a8571c02a836c8c219bc26909f079ec3
parent 08f982a7
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -38581,6 +38581,7 @@ package android.provider {
    field public static final String ACTION_SOUND_SETTINGS = "android.settings.SOUND_SETTINGS";
    field public static final String ACTION_SOUND_SETTINGS = "android.settings.SOUND_SETTINGS";
    field @Deprecated public static final String ACTION_STORAGE_VOLUME_ACCESS_SETTINGS = "android.settings.STORAGE_VOLUME_ACCESS_SETTINGS";
    field @Deprecated public static final String ACTION_STORAGE_VOLUME_ACCESS_SETTINGS = "android.settings.STORAGE_VOLUME_ACCESS_SETTINGS";
    field public static final String ACTION_SYNC_SETTINGS = "android.settings.SYNC_SETTINGS";
    field public static final String ACTION_SYNC_SETTINGS = "android.settings.SYNC_SETTINGS";
    field @FlaggedApi("android.provider.expose_system_update_settings") public static final String ACTION_SYSTEM_UPDATE_SETTINGS = "android.settings.SYSTEM_UPDATE_SETTINGS";
    field @FlaggedApi("android.provider.system_regional_preferences_api_enabled") public static final String ACTION_TEMPERATURE_UNIT_SETTINGS = "android.settings.TEMPERATURE_UNIT_SETTINGS";
    field @FlaggedApi("android.provider.system_regional_preferences_api_enabled") public static final String ACTION_TEMPERATURE_UNIT_SETTINGS = "android.settings.TEMPERATURE_UNIT_SETTINGS";
    field public static final String ACTION_USAGE_ACCESS_SETTINGS = "android.settings.USAGE_ACCESS_SETTINGS";
    field public static final String ACTION_USAGE_ACCESS_SETTINGS = "android.settings.USAGE_ACCESS_SETTINGS";
    field public static final String ACTION_USER_DICTIONARY_SETTINGS = "android.settings.USER_DICTIONARY_SETTINGS";
    field public static final String ACTION_USER_DICTIONARY_SETTINGS = "android.settings.USER_DICTIONARY_SETTINGS";
+12 −1
Original line number Original line Diff line number Diff line
@@ -1733,8 +1733,19 @@ public final class Settings {
     * <p>
     * <p>
     * Output: Nothing.
     * Output: Nothing.
     *
     *
     * @hide
     * <p>To prevent interception by third-party applications, system settings apps should implement
     * the system update functionality that must set a priority higher than default value (0).
     * Example:
     *
     * <pre>{@code
     * <Activity android:name=".MySystemUpdate">
     *     <intent-filter android:priority="1">
     *         <action android:name="android.settings.SYSTEM_UPDATE_SETTINGS" />
     *     </intent-filter>
     * </Activity>
     * }</pre>
     */
     */
    @FlaggedApi(Flags.FLAG_EXPOSE_SYSTEM_UPDATE_SETTINGS)
    @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
    @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
    public static final String ACTION_SYSTEM_UPDATE_SETTINGS =
    public static final String ACTION_SYSTEM_UPDATE_SETTINGS =
            "android.settings.SYSTEM_UPDATE_SETTINGS";
            "android.settings.SYSTEM_UPDATE_SETTINGS";
+9 −0
Original line number Original line Diff line number Diff line
@@ -78,3 +78,12 @@ flag {
    description: "This flag will enable documents trash APIs"
    description: "This flag will enable documents trash APIs"
    bug: "409260986"
    bug: "409260986"
}
}

# OWNER=rambowang TARGET=25Q4
flag {
    name: "expose_system_update_settings"
    is_exported: true
    namespace: "android_settings"
    description: "Feature flag to expose SYSTEM_UPDATE_SETTINGS as a public API"
    bug: "417458670"
}