diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2021-05-21 02:53:57 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2021-05-21 02:53:57 +0000 |
commit | 284320e14ff30949901787527b393104695aad1e (patch) | |
tree | 71836a6e4f595e7007830b3d9e063c37c7120279 /src/com/android | |
parent | 02e25a9b10f7912ed24182f71096b0324456e2c6 (diff) | |
parent | e57655c204f3661fe0e50b4710ab31e900fa2f72 (diff) | |
download | ThemePicker-284320e14ff30949901787527b393104695aad1e.tar.gz |
Merge "Update the themed icon feature's content Uri path" into sc-dev
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/customization/model/themedicon/ThemedIconSwitchProvider.java | 12 |
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); } } |