[Catalyst] Introduce SettingsContract file

The new file contains all contract constants for external usages (e.g.
slice, external Get/Set API). Also reuse existing constants in
SettingsSlicesContract.

NO_IFTTT=Catalyst only

Bug: 388061003
Flag: EXEMPT refactor
Test: atest
Change-Id: I449b7b6cf82e1e102f2c96a21835191605f09943
This commit is contained in:
Jacky Wang
2025-02-04 15:39:57 +08:00
parent 1ecacd8a5a
commit 2e265d4a7a
8 changed files with 49 additions and 14 deletions

View File

@@ -16,9 +16,6 @@
package com.android.settings.slices;
import static android.provider.SettingsSlicesContract.KEY_LOCATION;
import static android.provider.SettingsSlicesContract.KEY_WIFI;
import android.content.ContentResolver;
import android.net.Uri;
import android.provider.SettingsSlicesContract;
@@ -26,6 +23,7 @@ import android.util.ArrayMap;
import androidx.annotation.VisibleForTesting;
import com.android.settings.contract.SettingsContractKt;
import com.android.settings.display.AlwaysOnDisplaySlice;
import com.android.settings.display.ScreenTimeoutPreferenceController;
import com.android.settings.flashlight.FlashlightSlice;
@@ -68,7 +66,7 @@ public class CustomSliceRegistry {
.scheme(ContentResolver.SCHEME_CONTENT)
.authority(SettingsSlicesContract.AUTHORITY)
.appendPath(SettingsSlicesContract.PATH_SETTING_ACTION)
.appendPath(SettingsSlicesContract.KEY_BLUETOOTH)
.appendPath(SettingsContractKt.KEY_BLUETOOTH)
.build();
/**
@@ -115,7 +113,7 @@ public class CustomSliceRegistry {
.scheme(ContentResolver.SCHEME_CONTENT)
.authority(SettingsSlicesContract.AUTHORITY)
.appendPath(SettingsSlicesContract.PATH_SETTING_ACTION)
.appendPath(KEY_LOCATION)
.appendPath(SettingsContractKt.KEY_LOCATION)
.build();
/**
* Backing Uri for Low storage Slice.
@@ -240,7 +238,7 @@ public class CustomSliceRegistry {
.scheme(ContentResolver.SCHEME_CONTENT)
.authority(SettingsSlicesContract.AUTHORITY)
.appendPath(SettingsSlicesContract.PATH_SETTING_ACTION)
.appendPath(KEY_WIFI)
.appendPath(SettingsContractKt.KEY_WIFI)
.build();
/**