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; |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 20 | import android.net.Uri; |
Sunny Goyal | d249748 | 2015-09-22 18:24:19 -0700 | [diff] [blame^] | 21 | import android.os.Bundle; |
Adam Cohen | df2cc41 | 2011-04-27 16:56:57 -0700 | [diff] [blame] | 22 | import android.provider.BaseColumns; |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 23 | |
Sunny Goyal | 18b640c | 2015-04-17 09:24:01 -0700 | [diff] [blame] | 24 | import com.android.launcher3.config.ProviderConfig; |
| 25 | |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 26 | /** |
| 27 | * Settings related utilities. |
| 28 | */ |
Hyunyoung Song | 3f47144 | 2015-04-08 19:01:34 -0700 | [diff] [blame] | 29 | public class LauncherSettings { |
Chris Wren | 1ada10d | 2013-09-13 18:01:38 -0400 | [diff] [blame] | 30 | /** Columns required on table staht will be subject to backup and restore. */ |
| 31 | static interface ChangeLogColumns extends BaseColumns { |
| 32 | /** |
| 33 | * The time of the last update to this row. |
| 34 | * <P>Type: INTEGER</P> |
| 35 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 36 | public static final String MODIFIED = "modified"; |
Chris Wren | 1ada10d | 2013-09-13 18:01:38 -0400 | [diff] [blame] | 37 | } |
| 38 | |
| 39 | static interface BaseLauncherColumns extends ChangeLogColumns { |
Romain Guy | 73b979d | 2009-06-09 12:57:21 -0700 | [diff] [blame] | 40 | /** |
| 41 | * Descriptive name of the gesture that can be displayed to the user. |
| 42 | * <P>Type: TEXT</P> |
| 43 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 44 | public static final String TITLE = "title"; |
Romain Guy | 73b979d | 2009-06-09 12:57:21 -0700 | [diff] [blame] | 45 | |
| 46 | /** |
| 47 | * The Intent URL of the gesture, describing what it points to. This |
Romain Guy | 1ce1a24 | 2009-06-23 17:34:54 -0700 | [diff] [blame] | 48 | * 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] | 49 | * an Intent that can be launched. |
| 50 | * <P>Type: TEXT</P> |
| 51 | */ |
Sunny Goyal | 18b640c | 2015-04-17 09:24:01 -0700 | [diff] [blame] | 52 | public static final String INTENT = "intent"; |
Romain Guy | 73b979d | 2009-06-09 12:57:21 -0700 | [diff] [blame] | 53 | |
| 54 | /** |
| 55 | * The type of the gesture |
| 56 | * |
| 57 | * <P>Type: INTEGER</P> |
| 58 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 59 | public static final String ITEM_TYPE = "itemType"; |
Romain Guy | 73b979d | 2009-06-09 12:57:21 -0700 | [diff] [blame] | 60 | |
| 61 | /** |
| 62 | * The gesture is an application |
| 63 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 64 | public static final int ITEM_TYPE_APPLICATION = 0; |
Romain Guy | 73b979d | 2009-06-09 12:57:21 -0700 | [diff] [blame] | 65 | |
| 66 | /** |
| 67 | * The gesture is an application created shortcut |
| 68 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 69 | public static final int ITEM_TYPE_SHORTCUT = 1; |
Romain Guy | 73b979d | 2009-06-09 12:57:21 -0700 | [diff] [blame] | 70 | |
| 71 | /** |
| 72 | * The icon type. |
| 73 | * <P>Type: INTEGER</P> |
| 74 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 75 | public static final String ICON_TYPE = "iconType"; |
Romain Guy | 73b979d | 2009-06-09 12:57:21 -0700 | [diff] [blame] | 76 | |
| 77 | /** |
| 78 | * The icon is a resource identified by a package name and an integer id. |
| 79 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 80 | public static final int ICON_TYPE_RESOURCE = 0; |
Romain Guy | 73b979d | 2009-06-09 12:57:21 -0700 | [diff] [blame] | 81 | |
| 82 | /** |
| 83 | * The icon is a bitmap. |
| 84 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 85 | public static final int ICON_TYPE_BITMAP = 1; |
Romain Guy | 73b979d | 2009-06-09 12:57:21 -0700 | [diff] [blame] | 86 | |
| 87 | /** |
| 88 | * The icon package name, if icon type is ICON_TYPE_RESOURCE. |
| 89 | * <P>Type: TEXT</P> |
| 90 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 91 | public static final String ICON_PACKAGE = "iconPackage"; |
Romain Guy | 73b979d | 2009-06-09 12:57:21 -0700 | [diff] [blame] | 92 | |
| 93 | /** |
| 94 | * The icon resource id, if icon type is ICON_TYPE_RESOURCE. |
| 95 | * <P>Type: TEXT</P> |
| 96 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 97 | public static final String ICON_RESOURCE = "iconResource"; |
Romain Guy | 73b979d | 2009-06-09 12:57:21 -0700 | [diff] [blame] | 98 | |
| 99 | /** |
| 100 | * The custom icon bitmap, if icon type is ICON_TYPE_BITMAP. |
| 101 | * <P>Type: BLOB</P> |
| 102 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 103 | public static final String ICON = "icon"; |
Romain Guy | 73b979d | 2009-06-09 12:57:21 -0700 | [diff] [blame] | 104 | } |
| 105 | |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 106 | /** |
Adam Cohen | dcd297f | 2013-06-18 13:13:40 -0700 | [diff] [blame] | 107 | * Workspace Screens. |
| 108 | * |
| 109 | * Tracks the order of workspace screens. |
| 110 | */ |
Sunny Goyal | 18b640c | 2015-04-17 09:24:01 -0700 | [diff] [blame] | 111 | public static final class WorkspaceScreens implements ChangeLogColumns { |
| 112 | |
| 113 | public static final String TABLE_NAME = "workspaceScreens"; |
| 114 | |
Adam Cohen | dcd297f | 2013-06-18 13:13:40 -0700 | [diff] [blame] | 115 | /** |
| 116 | * The content:// style URL for this table |
| 117 | */ |
| 118 | static final Uri CONTENT_URI = Uri.parse("content://" + |
Sunny Goyal | 18b640c | 2015-04-17 09:24:01 -0700 | [diff] [blame] | 119 | ProviderConfig.AUTHORITY + "/" + TABLE_NAME); |
Adam Cohen | dcd297f | 2013-06-18 13:13:40 -0700 | [diff] [blame] | 120 | |
| 121 | /** |
| 122 | * The rank of this screen -- ie. how it is ordered relative to the other screens. |
| 123 | * <P>Type: INTEGER</P> |
| 124 | */ |
Sunny Goyal | 18b640c | 2015-04-17 09:24:01 -0700 | [diff] [blame] | 125 | public static final String SCREEN_RANK = "screenRank"; |
Adam Cohen | dcd297f | 2013-06-18 13:13:40 -0700 | [diff] [blame] | 126 | } |
| 127 | |
| 128 | /** |
Bjorn Bringert | 93c4576 | 2009-12-16 13:19:47 +0000 | [diff] [blame] | 129 | * Favorites. |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 130 | */ |
Hyunyoung Song | 3f47144 | 2015-04-08 19:01:34 -0700 | [diff] [blame] | 131 | public static final class Favorites implements BaseLauncherColumns { |
Sunny Goyal | 18b640c | 2015-04-17 09:24:01 -0700 | [diff] [blame] | 132 | |
| 133 | public static final String TABLE_NAME = "favorites"; |
| 134 | |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 135 | /** |
| 136 | * The content:// style URL for this table |
| 137 | */ |
Sunny Goyal | 18b640c | 2015-04-17 09:24:01 -0700 | [diff] [blame] | 138 | public static final Uri CONTENT_URI = Uri.parse("content://" + |
| 139 | ProviderConfig.AUTHORITY + "/" + TABLE_NAME); |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 140 | |
| 141 | /** |
| 142 | * The content:// style URL for a given row, identified by its id. |
| 143 | * |
| 144 | * @param id The row id. |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 145 | * |
| 146 | * @return The unique content URL for the specified row. |
| 147 | */ |
Sunny Goyal | e5bb705 | 2015-07-27 14:36:07 -0700 | [diff] [blame] | 148 | public static Uri getContentUri(long id) { |
Sunny Goyal | 18b640c | 2015-04-17 09:24:01 -0700 | [diff] [blame] | 149 | return Uri.parse("content://" + ProviderConfig.AUTHORITY + |
| 150 | "/" + TABLE_NAME + "/" + id); |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 151 | } |
| 152 | |
| 153 | /** |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 154 | * The container holding the favorite |
| 155 | * <P>Type: INTEGER</P> |
| 156 | */ |
Sunny Goyal | 18b640c | 2015-04-17 09:24:01 -0700 | [diff] [blame] | 157 | public static final String CONTAINER = "container"; |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 158 | |
| 159 | /** |
| 160 | * The icon is a resource identified by a package name and an integer id. |
| 161 | */ |
Sunny Goyal | 18b640c | 2015-04-17 09:24:01 -0700 | [diff] [blame] | 162 | public static final int CONTAINER_DESKTOP = -100; |
| 163 | public static final int CONTAINER_HOTSEAT = -101; |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 164 | |
Dan Sandler | ab5fa3a | 2014-03-06 23:48:04 -0500 | [diff] [blame] | 165 | static final String containerToString(int container) { |
| 166 | switch (container) { |
| 167 | case CONTAINER_DESKTOP: return "desktop"; |
| 168 | case CONTAINER_HOTSEAT: return "hotseat"; |
| 169 | default: return String.valueOf(container); |
| 170 | } |
| 171 | } |
| 172 | |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 173 | /** |
| 174 | * The screen holding the favorite (if container is CONTAINER_DESKTOP) |
| 175 | * <P>Type: INTEGER</P> |
| 176 | */ |
Sunny Goyal | 18b640c | 2015-04-17 09:24:01 -0700 | [diff] [blame] | 177 | public static final String SCREEN = "screen"; |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 178 | |
| 179 | /** |
| 180 | * The X coordinate of the cell holding the favorite |
Adam Cohen | c51934b | 2011-07-26 21:07:43 -0700 | [diff] [blame] | 181 | * (if container is CONTAINER_HOTSEAT or CONTAINER_HOTSEAT) |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 182 | * <P>Type: INTEGER</P> |
| 183 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 184 | public static final String CELLX = "cellX"; |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 185 | |
| 186 | /** |
| 187 | * The Y coordinate of the cell holding the favorite |
| 188 | * (if container is CONTAINER_DESKTOP) |
| 189 | * <P>Type: INTEGER</P> |
| 190 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 191 | public static final String CELLY = "cellY"; |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 192 | |
| 193 | /** |
| 194 | * The X span of the cell holding the favorite |
| 195 | * <P>Type: INTEGER</P> |
| 196 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 197 | public static final String SPANX = "spanX"; |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 198 | |
| 199 | /** |
| 200 | * The Y span of the cell holding the favorite |
| 201 | * <P>Type: INTEGER</P> |
| 202 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 203 | public static final String SPANY = "spanY"; |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 204 | |
| 205 | /** |
Kenny Guy | ed13187 | 2014-04-30 03:02:21 +0100 | [diff] [blame] | 206 | * The profile id of the item in the cell. |
| 207 | * <P> |
| 208 | * Type: INTEGER |
| 209 | * </P> |
| 210 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 211 | public static final String PROFILE_ID = "profileId"; |
Kenny Guy | ed13187 | 2014-04-30 03:02:21 +0100 | [diff] [blame] | 212 | |
| 213 | /** |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 214 | * The favorite is a user created folder |
| 215 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 216 | public static final int ITEM_TYPE_FOLDER = 2; |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 217 | |
| 218 | /** |
Adam Cohen | df2cc41 | 2011-04-27 16:56:57 -0700 | [diff] [blame] | 219 | * The favorite is a live folder |
| 220 | * |
| 221 | * Note: live folders can no longer be added to Launcher, and any live folders which |
| 222 | * exist within the launcher database will be ignored when loading. That said, these |
| 223 | * entries in the database may still exist, and are not automatically stripped. |
| 224 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 225 | @Deprecated |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 226 | static final int ITEM_TYPE_LIVE_FOLDER = 3; |
| 227 | |
| 228 | /** |
The Android Open Source Project | 7376fae | 2009-03-11 12:11:58 -0700 | [diff] [blame] | 229 | * The favorite is a widget |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 230 | */ |
Hyunyoung Song | 3f47144 | 2015-04-08 19:01:34 -0700 | [diff] [blame] | 231 | public static final int ITEM_TYPE_APPWIDGET = 4; |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 232 | |
| 233 | /** |
Adam Cohen | 5940042 | 2014-03-05 18:07:04 -0800 | [diff] [blame] | 234 | * The favorite is a custom widget provided by the launcher |
| 235 | */ |
Hyunyoung Song | 3f47144 | 2015-04-08 19:01:34 -0700 | [diff] [blame] | 236 | public static final int ITEM_TYPE_CUSTOM_APPWIDGET = 5; |
Adam Cohen | 5940042 | 2014-03-05 18:07:04 -0800 | [diff] [blame] | 237 | |
| 238 | /** |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 239 | * The favorite is a clock |
| 240 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 241 | @Deprecated |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 242 | static final int ITEM_TYPE_WIDGET_CLOCK = 1000; |
| 243 | |
| 244 | /** |
| 245 | * The favorite is a search widget |
| 246 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 247 | @Deprecated |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 248 | static final int ITEM_TYPE_WIDGET_SEARCH = 1001; |
| 249 | |
| 250 | /** |
| 251 | * The favorite is a photo frame |
| 252 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 253 | @Deprecated |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 254 | static final int ITEM_TYPE_WIDGET_PHOTO_FRAME = 1002; |
| 255 | |
| 256 | /** |
The Android Open Source Project | 7376fae | 2009-03-11 12:11:58 -0700 | [diff] [blame] | 257 | * The appWidgetId of the widget |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 258 | * |
| 259 | * <P>Type: INTEGER</P> |
| 260 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 261 | public static final String APPWIDGET_ID = "appWidgetId"; |
Chris Wren | d5e66bf | 2013-09-16 14:02:29 -0400 | [diff] [blame] | 262 | |
| 263 | /** |
| 264 | * The ComponentName of the widget provider |
| 265 | * |
| 266 | * <P>Type: STRING</P> |
| 267 | */ |
| 268 | public static final String APPWIDGET_PROVIDER = "appWidgetProvider"; |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 269 | |
| 270 | /** |
| 271 | * Indicates whether this favorite is an application-created shortcut or not. |
| 272 | * If the value is 0, the favorite is not an application-created shortcut, if the |
| 273 | * value is 1, it is an application-created shortcut. |
| 274 | * <P>Type: INTEGER</P> |
| 275 | */ |
Romain Guy | 73b979d | 2009-06-09 12:57:21 -0700 | [diff] [blame] | 276 | @Deprecated |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 277 | static final String IS_SHORTCUT = "isShortcut"; |
| 278 | |
| 279 | /** |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 280 | * The URI associated with the favorite. It is used, for instance, by |
| 281 | * live folders to find the content provider. |
| 282 | * <P>Type: TEXT</P> |
| 283 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 284 | @Deprecated |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 285 | static final String URI = "uri"; |
| 286 | |
| 287 | /** |
| 288 | * The display mode if the item is a live folder. |
| 289 | * <P>Type: INTEGER</P> |
| 290 | * |
| 291 | * @see android.provider.LiveFolders#DISPLAY_MODE_GRID |
| 292 | * @see android.provider.LiveFolders#DISPLAY_MODE_LIST |
| 293 | */ |
Sunny Goyal | 08f7261 | 2015-01-05 13:41:43 -0800 | [diff] [blame] | 294 | @Deprecated |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 295 | static final String DISPLAY_MODE = "displayMode"; |
Chris Wren | f4d0811 | 2014-01-16 18:13:56 -0500 | [diff] [blame] | 296 | |
| 297 | /** |
| 298 | * Boolean indicating that his item was restored and not yet successfully bound. |
| 299 | * <P>Type: INTEGER</P> |
| 300 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 301 | public static final String RESTORED = "restored"; |
Sunny Goyal | 08f7261 | 2015-01-05 13:41:43 -0800 | [diff] [blame] | 302 | |
| 303 | /** |
| 304 | * Indicates the position of the item inside an auto-arranged view like folder or hotseat. |
| 305 | * <p>Type: INTEGER</p> |
| 306 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 307 | public static final String RANK = "rank"; |
Sunny Goyal | 5d85c44 | 2015-03-10 13:14:47 -0700 | [diff] [blame] | 308 | |
| 309 | /** |
| 310 | * Stores general flag based options for {@link ItemInfo}s. |
| 311 | * <p>Type: INTEGER</p> |
| 312 | */ |
Sunny Goyal | 2fb2f0b | 2015-06-22 13:57:26 -0700 | [diff] [blame] | 313 | public static final String OPTIONS = "options"; |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 314 | } |
Sunny Goyal | 7779d62 | 2015-06-11 16:18:39 -0700 | [diff] [blame] | 315 | |
| 316 | /** |
| 317 | * Launcher settings |
| 318 | */ |
| 319 | public static final class Settings { |
| 320 | |
| 321 | public static final Uri CONTENT_URI = Uri.parse("content://" + |
| 322 | ProviderConfig.AUTHORITY + "/settings"); |
| 323 | |
| 324 | public static final String METHOD_GET_BOOLEAN = "get_boolean_setting"; |
| 325 | public static final String METHOD_SET_BOOLEAN = "set_boolean_setting"; |
Sunny Goyal | d249748 | 2015-09-22 18:24:19 -0700 | [diff] [blame^] | 326 | public static final String METHOD_CLEAR_EMPTY_DB_FLAG = "clear_empty_db_flag"; |
| 327 | |
| 328 | public static final String METHOD_DELETE_EMPTY_FOLDERS = "delete_empty_folders"; |
| 329 | public static final String METHOD_UPDATE_FOLDER_ITEMS_RANK = "update_folder_items_rank"; |
| 330 | public static final String METHOD_CONVERT_SHORTCUTS_TO_ACTIVITIES = |
| 331 | "convert_shortcuts_to_launcher_activities"; |
| 332 | |
| 333 | public static final String METHOD_NEW_ITEM_ID = "generate_new_item_id"; |
| 334 | public static final String METHOD_NEW_SCREEN_ID = "generate_new_screen_id"; |
| 335 | |
| 336 | public static final String METHOD_CREATE_EMPTY_DB = "create_empty_db"; |
| 337 | public static final String METHOD_DELETE_DB = "delete_db"; |
| 338 | |
| 339 | public static final String METHOD_LOAD_DEFAULT_FAVORITES = "load_default_favorites"; |
| 340 | public static final String METHOD_MIGRATE_LAUNCHER2_SHORTCUTS = "migrate_l2_shortcuts"; |
Sunny Goyal | 7779d62 | 2015-06-11 16:18:39 -0700 | [diff] [blame] | 341 | |
| 342 | public static final String EXTRA_VALUE = "value"; |
| 343 | public static final String EXTRA_DEFAULT_VALUE = "default_value"; |
Sunny Goyal | d249748 | 2015-09-22 18:24:19 -0700 | [diff] [blame^] | 344 | |
| 345 | public static Bundle call(ContentResolver cr, String method) { |
| 346 | return cr.call(CONTENT_URI, method, null, null); |
| 347 | } |
Sunny Goyal | 7779d62 | 2015-06-11 16:18:39 -0700 | [diff] [blame] | 348 | } |
The Android Open Source Project | 31dd503 | 2009-03-03 19:32:27 -0800 | [diff] [blame] | 349 | } |