The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2008 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
Daniel Sandler | 325dc23 | 2013-06-05 22:57:57 -0400 | [diff] [blame] | 17 | package com.android.launcher3; |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 18 | |
Sunny Goyal | d249748 | 2015-09-22 18:24:19 -0700 | [diff] [blame] | 19 | import android.content.ContentResolver; |
Sunny Goyal | c190dbf | 2016-05-05 14:37:05 -0700 | [diff] [blame] | 20 | import android.database.sqlite.SQLiteDatabase; |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 21 | import android.net.Uri; |
Sunny Goyal | d249748 | 2015-09-22 18:24:19 -0700 | [diff] [blame] | 22 | import android.os.Bundle; |
Adam Cohen | df2cc41 | 2011-04-27 16:56:57 -0700 | [diff] [blame] | 23 | import android.provider.BaseColumns; |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 24 | |
Sunny Goyal | 18b640c | 2015-04-17 09:24:01 -0700 | [diff] [blame] | 25 | import com.android.launcher3.config.ProviderConfig; |
| 26 | |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 27 | /** |
| 28 | * Settings related utilities. |
| 29 | */ |
Hyunyoung Song | 3f47144 | 2015-04-08 19:01:34 -0700 | [diff] [blame] | 30 | public class LauncherSettings { |
Chris Wren | 1ada10d | 2013-09-13 18:01:38 -0400 | [diff] [blame] | 31 | /** Columns required on table staht will be subject to backup and restore. */ |
| 32 | static interface ChangeLogColumns extends BaseColumns { |
| 33 | /** |
| 34 | * The time of the last update to this row. |
| 35 | * <P>Type: INTEGER</P> |
| 36 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 37 | public static final String MODIFIED = "modified"; |
Chris Wren | 1ada10d | 2013-09-13 18:01:38 -0400 | [diff] [blame] | 38 | } |
| 39 | |
| 40 | static interface BaseLauncherColumns extends ChangeLogColumns { |
Romain Guy | 73b979d | 2009-06-09 12:57:21 -0700 | [diff] [blame] | 41 | /** |
| 42 | * Descriptive name of the gesture that can be displayed to the user. |
| 43 | * <P>Type: TEXT</P> |
| 44 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 45 | public static final String TITLE = "title"; |
Romain Guy | 73b979d | 2009-06-09 12:57:21 -0700 | [diff] [blame] | 46 | |
| 47 | /** |
| 48 | * The Intent URL of the gesture, describing what it points to. This |
Romain Guy | 1ce1a24 | 2009-06-23 17:34:54 -0700 | [diff] [blame] | 49 | * value is given to {@link android.content.Intent#parseUri(String, int)} to create |
Romain Guy | 73b979d | 2009-06-09 12:57:21 -0700 | [diff] [blame] | 50 | * an Intent that can be launched. |
| 51 | * <P>Type: TEXT</P> |
| 52 | */ |
Sunny Goyal | 18b640c | 2015-04-17 09:24:01 -0700 | [diff] [blame] | 53 | public static final String INTENT = "intent"; |
Romain Guy | 73b979d | 2009-06-09 12:57:21 -0700 | [diff] [blame] | 54 | |
| 55 | /** |
| 56 | * The type of the gesture |
| 57 | * |
| 58 | * <P>Type: INTEGER</P> |
| 59 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 60 | public static final String ITEM_TYPE = "itemType"; |
Romain Guy | 73b979d | 2009-06-09 12:57:21 -0700 | [diff] [blame] | 61 | |
| 62 | /** |
| 63 | * The gesture is an application |
| 64 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 65 | public static final int ITEM_TYPE_APPLICATION = 0; |
Romain Guy | 73b979d | 2009-06-09 12:57:21 -0700 | [diff] [blame] | 66 | |
| 67 | /** |
| 68 | * The gesture is an application created shortcut |
| 69 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 70 | public static final int ITEM_TYPE_SHORTCUT = 1; |
Romain Guy | 73b979d | 2009-06-09 12:57:21 -0700 | [diff] [blame] | 71 | |
| 72 | /** |
| 73 | * The icon type. |
| 74 | * <P>Type: INTEGER</P> |
| 75 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 76 | public static final String ICON_TYPE = "iconType"; |
Romain Guy | 73b979d | 2009-06-09 12:57:21 -0700 | [diff] [blame] | 77 | |
| 78 | /** |
| 79 | * The icon is a resource identified by a package name and an integer id. |
| 80 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 81 | public static final int ICON_TYPE_RESOURCE = 0; |
Romain Guy | 73b979d | 2009-06-09 12:57:21 -0700 | [diff] [blame] | 82 | |
| 83 | /** |
| 84 | * The icon is a bitmap. |
| 85 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 86 | public static final int ICON_TYPE_BITMAP = 1; |
Romain Guy | 73b979d | 2009-06-09 12:57:21 -0700 | [diff] [blame] | 87 | |
| 88 | /** |
| 89 | * The icon package name, if icon type is ICON_TYPE_RESOURCE. |
| 90 | * <P>Type: TEXT</P> |
| 91 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 92 | public static final String ICON_PACKAGE = "iconPackage"; |
Romain Guy | 73b979d | 2009-06-09 12:57:21 -0700 | [diff] [blame] | 93 | |
| 94 | /** |
| 95 | * The icon resource id, if icon type is ICON_TYPE_RESOURCE. |
| 96 | * <P>Type: TEXT</P> |
| 97 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 98 | public static final String ICON_RESOURCE = "iconResource"; |
Romain Guy | 73b979d | 2009-06-09 12:57:21 -0700 | [diff] [blame] | 99 | |
| 100 | /** |
| 101 | * The custom icon bitmap, if icon type is ICON_TYPE_BITMAP. |
| 102 | * <P>Type: BLOB</P> |
| 103 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 104 | public static final String ICON = "icon"; |
Romain Guy | 73b979d | 2009-06-09 12:57:21 -0700 | [diff] [blame] | 105 | } |
| 106 | |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 107 | /** |
Adam Cohen | dcd297f | 2013-06-18 13:13:40 -0700 | [diff] [blame] | 108 | * Workspace Screens. |
| 109 | * |
| 110 | * Tracks the order of workspace screens. |
| 111 | */ |
Sunny Goyal | 18b640c | 2015-04-17 09:24:01 -0700 | [diff] [blame] | 112 | public static final class WorkspaceScreens implements ChangeLogColumns { |
| 113 | |
| 114 | public static final String TABLE_NAME = "workspaceScreens"; |
| 115 | |
Adam Cohen | dcd297f | 2013-06-18 13:13:40 -0700 | [diff] [blame] | 116 | /** |
| 117 | * The content:// style URL for this table |
| 118 | */ |
Sunny Goyal | f076eae | 2016-01-11 12:25:10 -0800 | [diff] [blame] | 119 | public static final Uri CONTENT_URI = Uri.parse("content://" + |
Sunny Goyal | 18b640c | 2015-04-17 09:24:01 -0700 | [diff] [blame] | 120 | ProviderConfig.AUTHORITY + "/" + TABLE_NAME); |
Adam Cohen | dcd297f | 2013-06-18 13:13:40 -0700 | [diff] [blame] | 121 | |
| 122 | /** |
| 123 | * The rank of this screen -- ie. how it is ordered relative to the other screens. |
| 124 | * <P>Type: INTEGER</P> |
| 125 | */ |
Sunny Goyal | 18b640c | 2015-04-17 09:24:01 -0700 | [diff] [blame] | 126 | public static final String SCREEN_RANK = "screenRank"; |
Adam Cohen | dcd297f | 2013-06-18 13:13:40 -0700 | [diff] [blame] | 127 | } |
| 128 | |
| 129 | /** |
Bjorn Bringert | 93c4576 | 2009-12-16 13:19:47 +0000 | [diff] [blame] | 130 | * Favorites. |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 131 | */ |
Hyunyoung Song | 3f47144 | 2015-04-08 19:01:34 -0700 | [diff] [blame] | 132 | public static final class Favorites implements BaseLauncherColumns { |
Sunny Goyal | 18b640c | 2015-04-17 09:24:01 -0700 | [diff] [blame] | 133 | |
| 134 | public static final String TABLE_NAME = "favorites"; |
| 135 | |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 136 | /** |
| 137 | * The content:// style URL for this table |
| 138 | */ |
Sunny Goyal | 18b640c | 2015-04-17 09:24:01 -0700 | [diff] [blame] | 139 | public static final Uri CONTENT_URI = Uri.parse("content://" + |
| 140 | ProviderConfig.AUTHORITY + "/" + TABLE_NAME); |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 141 | |
| 142 | /** |
| 143 | * The content:// style URL for a given row, identified by its id. |
| 144 | * |
| 145 | * @param id The row id. |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 146 | * |
| 147 | * @return The unique content URL for the specified row. |
| 148 | */ |
Sunny Goyal | e5bb705 | 2015-07-27 14:36:07 -0700 | [diff] [blame] | 149 | public static Uri getContentUri(long id) { |
Sunny Goyal | 18b640c | 2015-04-17 09:24:01 -0700 | [diff] [blame] | 150 | return Uri.parse("content://" + ProviderConfig.AUTHORITY + |
| 151 | "/" + TABLE_NAME + "/" + id); |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 152 | } |
| 153 | |
| 154 | /** |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 155 | * The container holding the favorite |
| 156 | * <P>Type: INTEGER</P> |
| 157 | */ |
Sunny Goyal | 18b640c | 2015-04-17 09:24:01 -0700 | [diff] [blame] | 158 | public static final String CONTAINER = "container"; |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 159 | |
| 160 | /** |
| 161 | * The icon is a resource identified by a package name and an integer id. |
| 162 | */ |
Sunny Goyal | 18b640c | 2015-04-17 09:24:01 -0700 | [diff] [blame] | 163 | public static final int CONTAINER_DESKTOP = -100; |
| 164 | public static final int CONTAINER_HOTSEAT = -101; |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 165 | |
Dan Sandler | ab5fa3a | 2014-03-06 23:48:04 -0500 | [diff] [blame] | 166 | static final String containerToString(int container) { |
| 167 | switch (container) { |
| 168 | case CONTAINER_DESKTOP: return "desktop"; |
| 169 | case CONTAINER_HOTSEAT: return "hotseat"; |
| 170 | default: return String.valueOf(container); |
| 171 | } |
| 172 | } |
| 173 | |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 174 | /** |
| 175 | * The screen holding the favorite (if container is CONTAINER_DESKTOP) |
| 176 | * <P>Type: INTEGER</P> |
| 177 | */ |
Sunny Goyal | 18b640c | 2015-04-17 09:24:01 -0700 | [diff] [blame] | 178 | public static final String SCREEN = "screen"; |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 179 | |
| 180 | /** |
| 181 | * The X coordinate of the cell holding the favorite |
Adam Cohen | c51934b | 2011-07-26 21:07:43 -0700 | [diff] [blame] | 182 | * (if container is CONTAINER_HOTSEAT or CONTAINER_HOTSEAT) |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 183 | * <P>Type: INTEGER</P> |
| 184 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 185 | public static final String CELLX = "cellX"; |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 186 | |
| 187 | /** |
| 188 | * The Y coordinate of the cell holding the favorite |
| 189 | * (if container is CONTAINER_DESKTOP) |
| 190 | * <P>Type: INTEGER</P> |
| 191 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 192 | public static final String CELLY = "cellY"; |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 193 | |
| 194 | /** |
| 195 | * The X span of the cell holding the favorite |
| 196 | * <P>Type: INTEGER</P> |
| 197 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 198 | public static final String SPANX = "spanX"; |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 199 | |
| 200 | /** |
| 201 | * The Y span of the cell holding the favorite |
| 202 | * <P>Type: INTEGER</P> |
| 203 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 204 | public static final String SPANY = "spanY"; |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 205 | |
| 206 | /** |
Kenny Guy | ed13187 | 2014-04-30 03:02:21 +0100 | [diff] [blame] | 207 | * The profile id of the item in the cell. |
| 208 | * <P> |
| 209 | * Type: INTEGER |
| 210 | * </P> |
| 211 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 212 | public static final String PROFILE_ID = "profileId"; |
Kenny Guy | ed13187 | 2014-04-30 03:02:21 +0100 | [diff] [blame] | 213 | |
| 214 | /** |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 215 | * The favorite is a user created folder |
| 216 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 217 | public static final int ITEM_TYPE_FOLDER = 2; |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 218 | |
| 219 | /** |
The Android Open Source Project | 7376fae | 2009-03-11 12:11:58 -0700 | [diff] [blame] | 220 | * The favorite is a widget |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 221 | */ |
Hyunyoung Song | 3f47144 | 2015-04-08 19:01:34 -0700 | [diff] [blame] | 222 | public static final int ITEM_TYPE_APPWIDGET = 4; |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 223 | |
| 224 | /** |
Adam Cohen | 5940042 | 2014-03-05 18:07:04 -0800 | [diff] [blame] | 225 | * The favorite is a custom widget provided by the launcher |
| 226 | */ |
Hyunyoung Song | 3f47144 | 2015-04-08 19:01:34 -0700 | [diff] [blame] | 227 | public static final int ITEM_TYPE_CUSTOM_APPWIDGET = 5; |
Adam Cohen | 5940042 | 2014-03-05 18:07:04 -0800 | [diff] [blame] | 228 | |
| 229 | /** |
The Android Open Source Project | 7376fae | 2009-03-11 12:11:58 -0700 | [diff] [blame] | 230 | * The appWidgetId of the widget |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 231 | * |
| 232 | * <P>Type: INTEGER</P> |
| 233 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 234 | public static final String APPWIDGET_ID = "appWidgetId"; |
Chris Wren | d5e66bf | 2013-09-16 14:02:29 -0400 | [diff] [blame] | 235 | |
| 236 | /** |
| 237 | * The ComponentName of the widget provider |
| 238 | * |
| 239 | * <P>Type: STRING</P> |
| 240 | */ |
| 241 | public static final String APPWIDGET_PROVIDER = "appWidgetProvider"; |
Chris Wren | f4d0811 | 2014-01-16 18:13:56 -0500 | [diff] [blame] | 242 | |
| 243 | /** |
| 244 | * Boolean indicating that his item was restored and not yet successfully bound. |
| 245 | * <P>Type: INTEGER</P> |
| 246 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 247 | public static final String RESTORED = "restored"; |
Sunny Goyal | 08f7261 | 2015-01-05 13:41:43 -0800 | [diff] [blame] | 248 | |
| 249 | /** |
| 250 | * Indicates the position of the item inside an auto-arranged view like folder or hotseat. |
| 251 | * <p>Type: INTEGER</p> |
| 252 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 253 | public static final String RANK = "rank"; |
Sunny Goyal | 5d85c44 | 2015-03-10 13:14:47 -0700 | [diff] [blame] | 254 | |
| 255 | /** |
| 256 | * Stores general flag based options for {@link ItemInfo}s. |
| 257 | * <p>Type: INTEGER</p> |
| 258 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 259 | public static final String OPTIONS = "options"; |
Sunny Goyal | c190dbf | 2016-05-05 14:37:05 -0700 | [diff] [blame] | 260 | |
| 261 | public static void addTableToDb(SQLiteDatabase db, long myProfileId, boolean optional) { |
| 262 | String ifNotExists = optional ? " IF NOT EXISTS " : ""; |
| 263 | db.execSQL("CREATE TABLE " + ifNotExists + TABLE_NAME + " (" + |
| 264 | "_id INTEGER PRIMARY KEY," + |
| 265 | "title TEXT," + |
| 266 | "intent TEXT," + |
| 267 | "container INTEGER," + |
| 268 | "screen INTEGER," + |
| 269 | "cellX INTEGER," + |
| 270 | "cellY INTEGER," + |
| 271 | "spanX INTEGER," + |
| 272 | "spanY INTEGER," + |
| 273 | "itemType INTEGER," + |
| 274 | "appWidgetId INTEGER NOT NULL DEFAULT -1," + |
| 275 | "iconType INTEGER," + |
| 276 | "iconPackage TEXT," + |
| 277 | "iconResource TEXT," + |
| 278 | "icon BLOB," + |
| 279 | "appWidgetProvider TEXT," + |
| 280 | "modified INTEGER NOT NULL DEFAULT 0," + |
| 281 | "restored INTEGER NOT NULL DEFAULT 0," + |
| 282 | "profileId INTEGER DEFAULT " + myProfileId + "," + |
| 283 | "rank INTEGER NOT NULL DEFAULT 0," + |
| 284 | "options INTEGER NOT NULL DEFAULT 0" + |
| 285 | ");"); |
| 286 | } |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 287 | } |
Sunny Goyal | 7779d62 | 2015-06-11 16:18:39 -0700 | [diff] [blame] | 288 | |
| 289 | /** |
| 290 | * Launcher settings |
| 291 | */ |
| 292 | public static final class Settings { |
| 293 | |
| 294 | public static final Uri CONTENT_URI = Uri.parse("content://" + |
| 295 | ProviderConfig.AUTHORITY + "/settings"); |
| 296 | |
| 297 | public static final String METHOD_GET_BOOLEAN = "get_boolean_setting"; |
| 298 | public static final String METHOD_SET_BOOLEAN = "set_boolean_setting"; |
Sunny Goyal | d249748 | 2015-09-22 18:24:19 -0700 | [diff] [blame] | 299 | public static final String METHOD_CLEAR_EMPTY_DB_FLAG = "clear_empty_db_flag"; |
| 300 | |
| 301 | public static final String METHOD_DELETE_EMPTY_FOLDERS = "delete_empty_folders"; |
| 302 | public static final String METHOD_UPDATE_FOLDER_ITEMS_RANK = "update_folder_items_rank"; |
| 303 | public static final String METHOD_CONVERT_SHORTCUTS_TO_ACTIVITIES = |
| 304 | "convert_shortcuts_to_launcher_activities"; |
| 305 | |
| 306 | public static final String METHOD_NEW_ITEM_ID = "generate_new_item_id"; |
| 307 | public static final String METHOD_NEW_SCREEN_ID = "generate_new_screen_id"; |
| 308 | |
| 309 | public static final String METHOD_CREATE_EMPTY_DB = "create_empty_db"; |
| 310 | public static final String METHOD_DELETE_DB = "delete_db"; |
| 311 | |
| 312 | public static final String METHOD_LOAD_DEFAULT_FAVORITES = "load_default_favorites"; |
| 313 | public static final String METHOD_MIGRATE_LAUNCHER2_SHORTCUTS = "migrate_l2_shortcuts"; |
Sunny Goyal | 7779d62 | 2015-06-11 16:18:39 -0700 | [diff] [blame] | 314 | |
Tony Wickham | 827cef2 | 2016-03-17 15:39:39 -0700 | [diff] [blame] | 315 | public static final String METHOD_SET_EXTRACTED_COLORS_AND_WALLPAPER_ID = |
| 316 | "set_extracted_colors_and_wallpaper_id_setting"; |
| 317 | public static final String EXTRA_EXTRACTED_COLORS = "extra_extractedColors"; |
| 318 | public static final String EXTRA_WALLPAPER_ID = "extra_wallpaperId"; |
| 319 | |
Sunny Goyal | 7779d62 | 2015-06-11 16:18:39 -0700 | [diff] [blame] | 320 | public static final String EXTRA_VALUE = "value"; |
| 321 | public static final String EXTRA_DEFAULT_VALUE = "default_value"; |
Sunny Goyal | b171e56 | 2016-01-21 16:41:54 -0800 | [diff] [blame] | 322 | // Extra for set_boolean method to also notify the backup manager of the change. |
| 323 | public static final String NOTIFY_BACKUP = "notify_backup"; |
Sunny Goyal | d249748 | 2015-09-22 18:24:19 -0700 | [diff] [blame] | 324 | |
| 325 | public static Bundle call(ContentResolver cr, String method) { |
| 326 | return cr.call(CONTENT_URI, method, null, null); |
| 327 | } |
Sunny Goyal | 7779d62 | 2015-06-11 16:18:39 -0700 | [diff] [blame] | 328 | } |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 329 | } |