summaryrefslogtreecommitdiff
path: root/src/com/android/customization/model/themedicon
diff options
context:
space:
mode:
authorChing-Sung Li <chriscsli@google.com>2021-05-18 11:29:08 +0800
committerChing-Sung Li <chriscsli@google.com>2021-05-19 20:32:49 +0800
commite57655c204f3661fe0e50b4710ab31e900fa2f72 (patch)
tree584a2749b48b3d07d6639af7eb42024f468e5cb9 /src/com/android/customization/model/themedicon
parentcf80160fa3cc33c96d22895d04ffdb13bdbb1d3f (diff)
downloadThemePicker-e57655c204f3661fe0e50b4710ab31e900fa2f72.tar.gz
Update the themed icon feature's content Uri path
Update the themed icon feature's content Uri path for methods to handle themed icon query / update in Launcher. Bug: 186590551 Test: Manual Change-Id: I2137adaf5fa0df802e4af2e9aba12fd9b7f374a8
Diffstat (limited to 'src/com/android/customization/model/themedicon')
-rw-r--r--src/com/android/customization/model/themedicon/ThemedIconSwitchProvider.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/com/android/customization/model/themedicon/ThemedIconSwitchProvider.java b/src/com/android/customization/model/themedicon/ThemedIconSwitchProvider.java
index 1a57223a..761e2fad 100644
--- a/src/com/android/customization/model/themedicon/ThemedIconSwitchProvider.java
+++ b/src/com/android/customization/model/themedicon/ThemedIconSwitchProvider.java
@@ -23,12 +23,11 @@ import android.database.Cursor;
import androidx.annotation.WorkerThread;
/**
- * Retrieves the themed icon switch by {@link ContentResolver}
+ * Retrieves the themed icon switch by {@link ContentResolver} from the current launcher
*/
public class ThemedIconSwitchProvider {
- private static final String GET_ICON_THEMED = "get_icon_themed";
- private static final String SET_ICON_THEMED = "set_icon_themed";
+ private static final String ICON_THEMED = "icon_themed";
private static final int ENABLED = 1;
private static final String COL_ICON_THEMED_VALUE = "boolean_value";
@@ -48,7 +47,7 @@ public class ThemedIconSwitchProvider {
protected boolean fetchThemedIconEnabled() {
ContentResolver contentResolver = mContext.getContentResolver();
try (Cursor cursor = contentResolver.query(
- mThemedIconUtils.getUriForPath(GET_ICON_THEMED), /* projection= */
+ mThemedIconUtils.getUriForPath(ICON_THEMED), /* projection= */
null, /* selection= */ null, /* selectionArgs= */ null, /* sortOrder= */ null)) {
if (cursor != null && cursor.moveToNext()) {
int themedIconEnabled = cursor.getInt(cursor.getColumnIndex(COL_ICON_THEMED_VALUE));
@@ -61,7 +60,8 @@ public class ThemedIconSwitchProvider {
protected int setThemedIconEnabled(boolean enabled) {
ContentValues values = new ContentValues();
values.put(COL_ICON_THEMED_VALUE, enabled);
- return mContext.getContentResolver().update(mThemedIconUtils.getUriForPath(SET_ICON_THEMED),
- values, /* where= */ null, /* selectionArgs= */ null);
+ return mContext.getContentResolver().update(
+ mThemedIconUtils.getUriForPath(ICON_THEMED), values,
+ /* where= */ null, /* selectionArgs= */ null);
}
}