Kenny Root | 15a4d2f | 2010-03-11 18:20:12 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2007 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 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 17 | package android.content.pm; |
| 18 | |
Jeff Sharkey | 8a372a0 | 2016-03-16 16:25:45 -0600 | [diff] [blame] | 19 | import android.annotation.SystemApi; |
Jeff Sharkey | a73b8fd | 2016-01-06 17:02:08 -0700 | [diff] [blame] | 20 | import android.annotation.TestApi; |
Jeff Sharkey | 8a372a0 | 2016-03-16 16:25:45 -0600 | [diff] [blame] | 21 | import android.content.Context; |
Jeff Brown | 0733079 | 2010-03-30 19:57:08 -0700 | [diff] [blame] | 22 | import android.content.pm.PackageManager.NameNotFoundException; |
| 23 | import android.content.res.Resources; |
| 24 | import android.graphics.drawable.Drawable; |
Jeff Sharkey | 1544779 | 2015-11-05 16:18:51 -0800 | [diff] [blame] | 25 | import android.os.Environment; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 26 | import android.os.Parcel; |
| 27 | import android.os.Parcelable; |
Jeff Sharkey | 1544779 | 2015-11-05 16:18:51 -0800 | [diff] [blame] | 28 | import android.os.UserHandle; |
Jeff Sharkey | e2d45be | 2015-04-15 17:14:12 -0700 | [diff] [blame] | 29 | import android.text.TextUtils; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 30 | import android.util.Printer; |
| 31 | |
Jeff Sharkey | 8a4c972 | 2014-06-16 13:48:42 -0700 | [diff] [blame] | 32 | import com.android.internal.util.ArrayUtils; |
| 33 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 34 | import java.text.Collator; |
Jeff Sharkey | 8a4c972 | 2014-06-16 13:48:42 -0700 | [diff] [blame] | 35 | import java.util.Arrays; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 36 | import java.util.Comparator; |
Jeff Sharkey | 8a4c972 | 2014-06-16 13:48:42 -0700 | [diff] [blame] | 37 | import java.util.Objects; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 38 | |
| 39 | /** |
| 40 | * Information you can retrieve about a particular application. This |
| 41 | * corresponds to information collected from the AndroidManifest.xml's |
| 42 | * <application> tag. |
| 43 | */ |
| 44 | public class ApplicationInfo extends PackageItemInfo implements Parcelable { |
| 45 | |
| 46 | /** |
| 47 | * Default task affinity of all activities in this application. See |
| 48 | * {@link ActivityInfo#taskAffinity} for more information. This comes |
| 49 | * from the "taskAffinity" attribute. |
| 50 | */ |
| 51 | public String taskAffinity; |
| 52 | |
| 53 | /** |
| 54 | * Optional name of a permission required to be able to access this |
| 55 | * application's components. From the "permission" attribute. |
| 56 | */ |
| 57 | public String permission; |
| 58 | |
| 59 | /** |
| 60 | * The name of the process this application should run in. From the |
| 61 | * "process" attribute or, if not set, the same as |
| 62 | * <var>packageName</var>. |
| 63 | */ |
| 64 | public String processName; |
| 65 | |
| 66 | /** |
| 67 | * Class implementing the Application object. From the "class" |
| 68 | * attribute. |
| 69 | */ |
| 70 | public String className; |
| 71 | |
| 72 | /** |
| 73 | * A style resource identifier (in the package's resources) of the |
| 74 | * description of an application. From the "description" attribute |
| 75 | * or, if not set, 0. |
| 76 | */ |
| 77 | public int descriptionRes; |
| 78 | |
| 79 | /** |
| 80 | * A style resource identifier (in the package's resources) of the |
| 81 | * default visual theme of the application. From the "theme" attribute |
| 82 | * or, if not set, 0. |
| 83 | */ |
| 84 | public int theme; |
| 85 | |
| 86 | /** |
| 87 | * Class implementing the Application's manage space |
| 88 | * functionality. From the "manageSpaceActivity" |
| 89 | * attribute. This is an optional attribute and will be null if |
Christopher Tate | 181fafa | 2009-05-14 11:12:14 -0700 | [diff] [blame] | 90 | * applications don't specify it in their manifest |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 91 | */ |
| 92 | public String manageSpaceActivityName; |
| 93 | |
| 94 | /** |
Christopher Tate | 181fafa | 2009-05-14 11:12:14 -0700 | [diff] [blame] | 95 | * Class implementing the Application's backup functionality. From |
| 96 | * the "backupAgent" attribute. This is an optional attribute and |
| 97 | * will be null if the application does not specify it in its manifest. |
| 98 | * |
| 99 | * <p>If android:allowBackup is set to false, this attribute is ignored. |
Christopher Tate | 181fafa | 2009-05-14 11:12:14 -0700 | [diff] [blame] | 100 | */ |
| 101 | public String backupAgentName; |
Christopher Tate | 4a627c7 | 2011-04-01 14:43:32 -0700 | [diff] [blame] | 102 | |
| 103 | /** |
Matthew Williams | 303650c | 2015-04-17 18:22:51 -0700 | [diff] [blame] | 104 | * An optional attribute that indicates the app supports automatic backup of app data. |
| 105 | * <p>0 is the default and means the app's entire data folder + managed external storage will |
| 106 | * be backed up; |
| 107 | * Any negative value indicates the app does not support full-data backup, though it may still |
| 108 | * want to participate via the traditional key/value backup API; |
| 109 | * A positive number specifies an xml resource in which the application has defined its backup |
| 110 | * include/exclude criteria. |
| 111 | * <p>If android:allowBackup is set to false, this attribute is ignored. |
| 112 | * |
Jeff Sharkey | 8a372a0 | 2016-03-16 16:25:45 -0600 | [diff] [blame] | 113 | * @see android.content.Context#getNoBackupFilesDir() |
| 114 | * @see #FLAG_ALLOW_BACKUP |
Christopher Tate | 98fa656 | 2015-05-14 13:20:10 -0700 | [diff] [blame] | 115 | * |
| 116 | * @hide |
Matthew Williams | 303650c | 2015-04-17 18:22:51 -0700 | [diff] [blame] | 117 | */ |
| 118 | public int fullBackupContent = 0; |
| 119 | |
| 120 | /** |
Adam Powell | 269248d | 2011-08-02 10:26:54 -0700 | [diff] [blame] | 121 | * The default extra UI options for activities in this application. |
| 122 | * Set from the {@link android.R.attr#uiOptions} attribute in the |
| 123 | * activity's manifest. |
| 124 | */ |
| 125 | public int uiOptions = 0; |
| 126 | |
| 127 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 128 | * Value for {@link #flags}: if set, this application is installed in the |
| 129 | * device's system image. |
| 130 | */ |
| 131 | public static final int FLAG_SYSTEM = 1<<0; |
| 132 | |
| 133 | /** |
| 134 | * Value for {@link #flags}: set to true if this application would like to |
| 135 | * allow debugging of its |
| 136 | * code, even when installed on a non-development system. Comes |
| 137 | * from {@link android.R.styleable#AndroidManifestApplication_debuggable |
| 138 | * android:debuggable} of the <application> tag. |
| 139 | */ |
| 140 | public static final int FLAG_DEBUGGABLE = 1<<1; |
| 141 | |
| 142 | /** |
| 143 | * Value for {@link #flags}: set to true if this application has code |
| 144 | * associated with it. Comes |
| 145 | * from {@link android.R.styleable#AndroidManifestApplication_hasCode |
| 146 | * android:hasCode} of the <application> tag. |
| 147 | */ |
| 148 | public static final int FLAG_HAS_CODE = 1<<2; |
| 149 | |
| 150 | /** |
| 151 | * Value for {@link #flags}: set to true if this application is persistent. |
| 152 | * Comes from {@link android.R.styleable#AndroidManifestApplication_persistent |
| 153 | * android:persistent} of the <application> tag. |
| 154 | */ |
| 155 | public static final int FLAG_PERSISTENT = 1<<3; |
| 156 | |
| 157 | /** |
Christopher Tate | 181fafa | 2009-05-14 11:12:14 -0700 | [diff] [blame] | 158 | * Value for {@link #flags}: set to true if this application holds the |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 159 | * {@link android.Manifest.permission#FACTORY_TEST} permission and the |
| 160 | * device is running in factory test mode. |
| 161 | */ |
| 162 | public static final int FLAG_FACTORY_TEST = 1<<4; |
| 163 | |
| 164 | /** |
| 165 | * Value for {@link #flags}: default value for the corresponding ActivityInfo flag. |
| 166 | * Comes from {@link android.R.styleable#AndroidManifestApplication_allowTaskReparenting |
| 167 | * android:allowTaskReparenting} of the <application> tag. |
| 168 | */ |
| 169 | public static final int FLAG_ALLOW_TASK_REPARENTING = 1<<5; |
| 170 | |
| 171 | /** |
| 172 | * Value for {@link #flags}: default value for the corresponding ActivityInfo flag. |
| 173 | * Comes from {@link android.R.styleable#AndroidManifestApplication_allowClearUserData |
| 174 | * android:allowClearUserData} of the <application> tag. |
| 175 | */ |
| 176 | public static final int FLAG_ALLOW_CLEAR_USER_DATA = 1<<6; |
| 177 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 178 | /** |
Dianne Hackborn | 851a541 | 2009-05-08 12:06:44 -0700 | [diff] [blame] | 179 | * Value for {@link #flags}: this is set if this application has been |
Kweku Adams | 8de29ca | 2016-01-22 12:30:26 -0800 | [diff] [blame] | 180 | * installed as an update to a built-in system application. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 181 | */ |
| 182 | public static final int FLAG_UPDATED_SYSTEM_APP = 1<<7; |
Dianne Hackborn | 851a541 | 2009-05-08 12:06:44 -0700 | [diff] [blame] | 183 | |
| 184 | /** |
Svet Ganov | 354cd3c | 2015-12-17 11:35:04 -0800 | [diff] [blame] | 185 | * Value for {@link #flags}: this is set if the application has specified |
Dianne Hackborn | 7f20543 | 2009-07-28 00:13:47 -0700 | [diff] [blame] | 186 | * {@link android.R.styleable#AndroidManifestApplication_testOnly |
| 187 | * android:testOnly} to be true. |
Dianne Hackborn | 851a541 | 2009-05-08 12:06:44 -0700 | [diff] [blame] | 188 | */ |
Dianne Hackborn | a96cbb4 | 2009-05-13 15:06:13 -0700 | [diff] [blame] | 189 | public static final int FLAG_TEST_ONLY = 1<<8; |
Dianne Hackborn | ade3eca | 2009-05-11 18:54:45 -0700 | [diff] [blame] | 190 | |
| 191 | /** |
Dianne Hackborn | 5c1e00b | 2009-06-18 17:10:57 -0700 | [diff] [blame] | 192 | * Value for {@link #flags}: true when the application's window can be |
Dianne Hackborn | 723738c | 2009-06-25 19:48:04 -0700 | [diff] [blame] | 193 | * reduced in size for smaller screens. Corresponds to |
| 194 | * {@link android.R.styleable#AndroidManifestSupportsScreens_smallScreens |
| 195 | * android:smallScreens}. |
Dianne Hackborn | 5c1e00b | 2009-06-18 17:10:57 -0700 | [diff] [blame] | 196 | */ |
Dianne Hackborn | 723738c | 2009-06-25 19:48:04 -0700 | [diff] [blame] | 197 | public static final int FLAG_SUPPORTS_SMALL_SCREENS = 1<<9; |
| 198 | |
| 199 | /** |
| 200 | * Value for {@link #flags}: true when the application's window can be |
| 201 | * displayed on normal screens. Corresponds to |
| 202 | * {@link android.R.styleable#AndroidManifestSupportsScreens_normalScreens |
| 203 | * android:normalScreens}. |
| 204 | */ |
| 205 | public static final int FLAG_SUPPORTS_NORMAL_SCREENS = 1<<10; |
| 206 | |
| 207 | /** |
| 208 | * Value for {@link #flags}: true when the application's window can be |
| 209 | * increased in size for larger screens. Corresponds to |
| 210 | * {@link android.R.styleable#AndroidManifestSupportsScreens_largeScreens |
Dianne Hackborn | 22ec9ab | 2010-04-29 17:56:03 -0700 | [diff] [blame] | 211 | * android:largeScreens}. |
Dianne Hackborn | 723738c | 2009-06-25 19:48:04 -0700 | [diff] [blame] | 212 | */ |
| 213 | public static final int FLAG_SUPPORTS_LARGE_SCREENS = 1<<11; |
Dianne Hackborn | 5c1e00b | 2009-06-18 17:10:57 -0700 | [diff] [blame] | 214 | |
| 215 | /** |
Dianne Hackborn | c4db95c | 2009-07-21 17:46:02 -0700 | [diff] [blame] | 216 | * Value for {@link #flags}: true when the application knows how to adjust |
| 217 | * its UI for different screen sizes. Corresponds to |
| 218 | * {@link android.R.styleable#AndroidManifestSupportsScreens_resizeable |
| 219 | * android:resizeable}. |
| 220 | */ |
| 221 | public static final int FLAG_RESIZEABLE_FOR_SCREENS = 1<<12; |
| 222 | |
| 223 | /** |
Dianne Hackborn | 11b822d | 2009-07-21 20:03:02 -0700 | [diff] [blame] | 224 | * Value for {@link #flags}: true when the application knows how to |
| 225 | * accomodate different screen densities. Corresponds to |
| 226 | * {@link android.R.styleable#AndroidManifestSupportsScreens_anyDensity |
| 227 | * android:anyDensity}. |
| 228 | */ |
| 229 | public static final int FLAG_SUPPORTS_SCREEN_DENSITIES = 1<<13; |
| 230 | |
| 231 | /** |
Ben Cheng | 23085b7 | 2010-02-08 16:06:32 -0800 | [diff] [blame] | 232 | * Value for {@link #flags}: set to true if this application would like to |
| 233 | * request the VM to operate under the safe mode. Comes from |
Ben Cheng | ef3f5dd | 2010-03-29 15:47:26 -0700 | [diff] [blame] | 234 | * {@link android.R.styleable#AndroidManifestApplication_vmSafeMode |
| 235 | * android:vmSafeMode} of the <application> tag. |
Ben Cheng | 23085b7 | 2010-02-08 16:06:32 -0800 | [diff] [blame] | 236 | */ |
| 237 | public static final int FLAG_VM_SAFE_MODE = 1<<14; |
| 238 | |
| 239 | /** |
Christopher Tate | 3de55bc | 2010-03-12 17:28:08 -0800 | [diff] [blame] | 240 | * Value for {@link #flags}: set to <code>false</code> if the application does not wish |
| 241 | * to permit any OS-driven backups of its data; <code>true</code> otherwise. |
Christopher Tate | 181fafa | 2009-05-14 11:12:14 -0700 | [diff] [blame] | 242 | * |
Christopher Tate | 3de55bc | 2010-03-12 17:28:08 -0800 | [diff] [blame] | 243 | * <p>Comes from the |
| 244 | * {@link android.R.styleable#AndroidManifestApplication_allowBackup android:allowBackup} |
| 245 | * attribute of the <application> tag. |
Christopher Tate | 181fafa | 2009-05-14 11:12:14 -0700 | [diff] [blame] | 246 | */ |
Ben Cheng | 23085b7 | 2010-02-08 16:06:32 -0800 | [diff] [blame] | 247 | public static final int FLAG_ALLOW_BACKUP = 1<<15; |
Christopher Tate | 5e1ab33 | 2009-09-01 20:32:49 -0700 | [diff] [blame] | 248 | |
| 249 | /** |
Christopher Tate | 3de55bc | 2010-03-12 17:28:08 -0800 | [diff] [blame] | 250 | * Value for {@link #flags}: set to <code>false</code> if the application must be kept |
| 251 | * in memory following a full-system restore operation; <code>true</code> otherwise. |
| 252 | * Ordinarily, during a full system restore operation each application is shut down |
| 253 | * following execution of its agent's onRestore() method. Setting this attribute to |
| 254 | * <code>false</code> prevents this. Most applications will not need to set this attribute. |
Christopher Tate | 5e1ab33 | 2009-09-01 20:32:49 -0700 | [diff] [blame] | 255 | * |
Christopher Tate | 3de55bc | 2010-03-12 17:28:08 -0800 | [diff] [blame] | 256 | * <p>If |
| 257 | * {@link android.R.styleable#AndroidManifestApplication_allowBackup android:allowBackup} |
| 258 | * is set to <code>false</code> or no |
| 259 | * {@link android.R.styleable#AndroidManifestApplication_backupAgent android:backupAgent} |
Christopher Tate | 5e1ab33 | 2009-09-01 20:32:49 -0700 | [diff] [blame] | 260 | * is specified, this flag will be ignored. |
| 261 | * |
Christopher Tate | 3de55bc | 2010-03-12 17:28:08 -0800 | [diff] [blame] | 262 | * <p>Comes from the |
| 263 | * {@link android.R.styleable#AndroidManifestApplication_killAfterRestore android:killAfterRestore} |
| 264 | * attribute of the <application> tag. |
Christopher Tate | 5e1ab33 | 2009-09-01 20:32:49 -0700 | [diff] [blame] | 265 | */ |
Ben Cheng | 23085b7 | 2010-02-08 16:06:32 -0800 | [diff] [blame] | 266 | public static final int FLAG_KILL_AFTER_RESTORE = 1<<16; |
Christopher Tate | 5e1ab33 | 2009-09-01 20:32:49 -0700 | [diff] [blame] | 267 | |
| 268 | /** |
Christopher Tate | 3de55bc | 2010-03-12 17:28:08 -0800 | [diff] [blame] | 269 | * Value for {@link #flags}: Set to <code>true</code> if the application's backup |
| 270 | * agent claims to be able to handle restore data even "from the future," |
| 271 | * i.e. from versions of the application with a versionCode greater than |
| 272 | * the one currently installed on the device. <i>Use with caution!</i> By default |
| 273 | * this attribute is <code>false</code> and the Backup Manager will ensure that data |
| 274 | * from "future" versions of the application are never supplied during a restore operation. |
Christopher Tate | 5e1ab33 | 2009-09-01 20:32:49 -0700 | [diff] [blame] | 275 | * |
Christopher Tate | 3de55bc | 2010-03-12 17:28:08 -0800 | [diff] [blame] | 276 | * <p>If |
| 277 | * {@link android.R.styleable#AndroidManifestApplication_allowBackup android:allowBackup} |
| 278 | * is set to <code>false</code> or no |
| 279 | * {@link android.R.styleable#AndroidManifestApplication_backupAgent android:backupAgent} |
Christopher Tate | 5e1ab33 | 2009-09-01 20:32:49 -0700 | [diff] [blame] | 280 | * is specified, this flag will be ignored. |
| 281 | * |
Christopher Tate | 3de55bc | 2010-03-12 17:28:08 -0800 | [diff] [blame] | 282 | * <p>Comes from the |
| 283 | * {@link android.R.styleable#AndroidManifestApplication_restoreAnyVersion android:restoreAnyVersion} |
| 284 | * attribute of the <application> tag. |
Christopher Tate | 5e1ab33 | 2009-09-01 20:32:49 -0700 | [diff] [blame] | 285 | */ |
Christopher Tate | 3de55bc | 2010-03-12 17:28:08 -0800 | [diff] [blame] | 286 | public static final int FLAG_RESTORE_ANY_VERSION = 1<<17; |
Christopher Tate | 5e1ab33 | 2009-09-01 20:32:49 -0700 | [diff] [blame] | 287 | |
Christopher Tate | 181fafa | 2009-05-14 11:12:14 -0700 | [diff] [blame] | 288 | /** |
Dianne Hackborn | 3202d38 | 2010-04-26 17:51:34 -0700 | [diff] [blame] | 289 | * Value for {@link #flags}: Set to true if the application is |
| 290 | * currently installed on external/removable/unprotected storage. Such |
| 291 | * applications may not be available if their storage is not currently |
| 292 | * mounted. When the storage it is on is not available, it will look like |
| 293 | * the application has been uninstalled (its .apk is no longer available) |
| 294 | * but its persistent data is not removed. |
Suchi Amalapurapu | af8e9f4 | 2010-01-12 10:17:28 -0800 | [diff] [blame] | 295 | */ |
Dianne Hackborn | 94c567e | 2010-04-26 18:13:10 -0700 | [diff] [blame] | 296 | public static final int FLAG_EXTERNAL_STORAGE = 1<<18; |
Suchi Amalapurapu | af8e9f4 | 2010-01-12 10:17:28 -0800 | [diff] [blame] | 297 | |
| 298 | /** |
Dianne Hackborn | 14cee9f | 2010-04-23 17:51:26 -0700 | [diff] [blame] | 299 | * Value for {@link #flags}: true when the application's window can be |
| 300 | * increased in size for extra large screens. Corresponds to |
| 301 | * {@link android.R.styleable#AndroidManifestSupportsScreens_xlargeScreens |
Dianne Hackborn | 22ec9ab | 2010-04-29 17:56:03 -0700 | [diff] [blame] | 302 | * android:xlargeScreens}. |
Dianne Hackborn | 14cee9f | 2010-04-23 17:51:26 -0700 | [diff] [blame] | 303 | */ |
| 304 | public static final int FLAG_SUPPORTS_XLARGE_SCREENS = 1<<19; |
| 305 | |
| 306 | /** |
Dianne Hackborn | 3b81bc1 | 2011-01-15 11:50:52 -0800 | [diff] [blame] | 307 | * Value for {@link #flags}: true when the application has requested a |
| 308 | * large heap for its processes. Corresponds to |
| 309 | * {@link android.R.styleable#AndroidManifestApplication_largeHeap |
| 310 | * android:largeHeap}. |
Jason parks | a3cdaa5 | 2011-01-13 14:15:43 -0600 | [diff] [blame] | 311 | */ |
Dianne Hackborn | 3b81bc1 | 2011-01-15 11:50:52 -0800 | [diff] [blame] | 312 | public static final int FLAG_LARGE_HEAP = 1<<20; |
Jason parks | a3cdaa5 | 2011-01-13 14:15:43 -0600 | [diff] [blame] | 313 | |
| 314 | /** |
Dianne Hackborn | e7f9721 | 2011-02-24 14:40:20 -0800 | [diff] [blame] | 315 | * Value for {@link #flags}: true if this application's package is in |
| 316 | * the stopped state. |
| 317 | */ |
| 318 | public static final int FLAG_STOPPED = 1<<21; |
| 319 | |
| 320 | /** |
Fabrice Di Meglio | 59dfce8 | 2012-04-02 16:17:20 -0700 | [diff] [blame] | 321 | * Value for {@link #flags}: true when the application is willing to support |
| 322 | * RTL (right to left). All activities will inherit this value. |
| 323 | * |
| 324 | * Set from the {@link android.R.attr#supportsRtl} attribute in the |
| 325 | * activity's manifest. |
| 326 | * |
| 327 | * Default value is false (no support for RTL). |
| 328 | */ |
| 329 | public static final int FLAG_SUPPORTS_RTL = 1<<22; |
| 330 | |
| 331 | /** |
Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 332 | * Value for {@link #flags}: true if the application is currently |
| 333 | * installed for the calling user. |
| 334 | */ |
| 335 | public static final int FLAG_INSTALLED = 1<<23; |
| 336 | |
| 337 | /** |
Dianne Hackborn | 5e03e2c | 2012-09-06 14:21:19 -0700 | [diff] [blame] | 338 | * Value for {@link #flags}: true if the application only has its |
| 339 | * data installed; the application package itself does not currently |
| 340 | * exist on the device. |
| 341 | */ |
| 342 | public static final int FLAG_IS_DATA_ONLY = 1<<24; |
| 343 | |
| 344 | /** |
Jose Lima | 12d0b4c | 2014-03-14 16:55:12 -0700 | [diff] [blame] | 345 | * Value for {@link #flags}: true if the application was declared to be a game, or |
| 346 | * false if it is a non-game application. |
| 347 | */ |
| 348 | public static final int FLAG_IS_GAME = 1<<25; |
| 349 | |
| 350 | /** |
Christopher Tate | d1de256 | 2014-06-17 17:12:35 -0700 | [diff] [blame] | 351 | * Value for {@link #flags}: {@code true} if the application asks that only |
| 352 | * full-data streaming backups of its data be performed even though it defines |
| 353 | * a {@link android.app.backup.BackupAgent BackupAgent}, which normally |
| 354 | * indicates that the app will manage its backed-up data via incremental |
| 355 | * key/value updates. |
| 356 | */ |
| 357 | public static final int FLAG_FULL_BACKUP_ONLY = 1<<26; |
| 358 | |
| 359 | /** |
Alex Klyubin | 01a959d | 2015-03-18 10:05:45 -0700 | [diff] [blame] | 360 | * Value for {@link #flags}: {@code true} if the application may use cleartext network traffic |
| 361 | * (e.g., HTTP rather than HTTPS; WebSockets rather than WebSockets Secure; XMPP, IMAP, STMP |
| 362 | * without STARTTLS or TLS). If {@code false}, the app declares that it does not intend to use |
| 363 | * cleartext network traffic, in which case platform components (e.g., HTTP stacks, |
Alex Klyubin | fbf4599 | 2015-04-21 13:44:29 -0700 | [diff] [blame] | 364 | * {@code DownloadManager}, {@code MediaPlayer}) will refuse app's requests to use cleartext |
| 365 | * traffic. Third-party libraries are encouraged to honor this flag as well. |
| 366 | * |
| 367 | * <p>NOTE: {@code WebView} does not honor this flag. |
| 368 | * |
Chad Brubaker | 2df5ba7 | 2016-04-11 13:31:24 -0700 | [diff] [blame] | 369 | * <p>This flag is ignored on Android N and above if an Android Network Security Config is |
| 370 | * present. |
| 371 | * |
Alex Klyubin | fbf4599 | 2015-04-21 13:44:29 -0700 | [diff] [blame] | 372 | * <p>This flag comes from |
| 373 | * {@link android.R.styleable#AndroidManifestApplication_usesCleartextTraffic |
| 374 | * android:usesCleartextTraffic} of the <application> tag. |
Alex Klyubin | 01a959d | 2015-03-18 10:05:45 -0700 | [diff] [blame] | 375 | */ |
| 376 | public static final int FLAG_USES_CLEARTEXT_TRAFFIC = 1<<27; |
| 377 | |
| 378 | /** |
Dmitriy Ivanov | ff193d6 | 2014-09-30 15:10:48 -0700 | [diff] [blame] | 379 | * When set installer extracts native libs from .apk files. |
| 380 | */ |
| 381 | public static final int FLAG_EXTRACT_NATIVE_LIBS = 1<<28; |
| 382 | |
| 383 | /** |
Alan Viverette | d70b9e7 | 2015-05-27 14:29:20 -0700 | [diff] [blame] | 384 | * Value for {@link #flags}: {@code true} when the application's rendering |
| 385 | * should be hardware accelerated. |
| 386 | */ |
| 387 | public static final int FLAG_HARDWARE_ACCELERATED = 1<<29; |
| 388 | |
| 389 | /** |
Andrei Stingaceanu | 1e28391 | 2015-11-26 15:26:28 +0000 | [diff] [blame] | 390 | * Value for {@link #flags}: true if this application's package is in |
| 391 | * the suspended state. |
| 392 | */ |
| 393 | public static final int FLAG_SUSPENDED = 1<<30; |
| 394 | |
| 395 | /** |
Narayan Kamath | 589a1bc | 2014-07-03 14:43:26 +0100 | [diff] [blame] | 396 | * Value for {@link #flags}: true if code from this application will need to be |
| 397 | * loaded into other applications' processes. On devices that support multiple |
| 398 | * instruction sets, this implies the code might be loaded into a process that's |
| 399 | * using any of the devices supported instruction sets. |
| 400 | * |
| 401 | * <p> The system might treat such applications specially, for eg., by |
| 402 | * extracting the application's native libraries for all supported instruction |
| 403 | * sets or by compiling the application's dex code for all supported instruction |
| 404 | * sets. |
| 405 | */ |
| 406 | public static final int FLAG_MULTIARCH = 1 << 31; |
Amith Yamasani | 655d0e2 | 2013-06-12 14:19:10 -0700 | [diff] [blame] | 407 | |
| 408 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 409 | * Flags associated with the application. Any combination of |
| 410 | * {@link #FLAG_SYSTEM}, {@link #FLAG_DEBUGGABLE}, {@link #FLAG_HAS_CODE}, |
| 411 | * {@link #FLAG_PERSISTENT}, {@link #FLAG_FACTORY_TEST}, and |
| 412 | * {@link #FLAG_ALLOW_TASK_REPARENTING} |
Dianne Hackborn | 851a541 | 2009-05-08 12:06:44 -0700 | [diff] [blame] | 413 | * {@link #FLAG_ALLOW_CLEAR_USER_DATA}, {@link #FLAG_UPDATED_SYSTEM_APP}, |
Dianne Hackborn | 723738c | 2009-06-25 19:48:04 -0700 | [diff] [blame] | 414 | * {@link #FLAG_TEST_ONLY}, {@link #FLAG_SUPPORTS_SMALL_SCREENS}, |
| 415 | * {@link #FLAG_SUPPORTS_NORMAL_SCREENS}, |
Dianne Hackborn | 14cee9f | 2010-04-23 17:51:26 -0700 | [diff] [blame] | 416 | * {@link #FLAG_SUPPORTS_LARGE_SCREENS}, {@link #FLAG_SUPPORTS_XLARGE_SCREENS}, |
| 417 | * {@link #FLAG_RESIZEABLE_FOR_SCREENS}, |
Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 418 | * {@link #FLAG_SUPPORTS_SCREEN_DENSITIES}, {@link #FLAG_VM_SAFE_MODE}, |
Alex Klyubin | b9f8a52 | 2015-02-03 11:12:59 -0800 | [diff] [blame] | 419 | * {@link #FLAG_ALLOW_BACKUP}, {@link #FLAG_KILL_AFTER_RESTORE}, |
| 420 | * {@link #FLAG_RESTORE_ANY_VERSION}, {@link #FLAG_EXTERNAL_STORAGE}, |
| 421 | * {@link #FLAG_LARGE_HEAP}, {@link #FLAG_STOPPED}, |
| 422 | * {@link #FLAG_SUPPORTS_RTL}, {@link #FLAG_INSTALLED}, |
| 423 | * {@link #FLAG_IS_DATA_ONLY}, {@link #FLAG_IS_GAME}, |
Alex Klyubin | 7cb000f | 2015-03-26 11:00:04 -0700 | [diff] [blame] | 424 | * {@link #FLAG_FULL_BACKUP_ONLY}, {@link #FLAG_USES_CLEARTEXT_TRAFFIC}, |
| 425 | * {@link #FLAG_MULTIARCH}. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 426 | */ |
| 427 | public int flags = 0; |
Amith Yamasani | 655d0e2 | 2013-06-12 14:19:10 -0700 | [diff] [blame] | 428 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 429 | /** |
Alex Klyubin | b9f8a52 | 2015-02-03 11:12:59 -0800 | [diff] [blame] | 430 | * Value for {@link #privateFlags}: true if the application is hidden via restrictions and for |
| 431 | * most purposes is considered as not installed. |
| 432 | * {@hide} |
| 433 | */ |
| 434 | public static final int PRIVATE_FLAG_HIDDEN = 1<<0; |
| 435 | |
| 436 | /** |
| 437 | * Value for {@link #privateFlags}: set to <code>true</code> if the application |
| 438 | * has reported that it is heavy-weight, and thus can not participate in |
| 439 | * the normal application lifecycle. |
| 440 | * |
| 441 | * <p>Comes from the |
| 442 | * android.R.styleable#AndroidManifestApplication_cantSaveState |
| 443 | * attribute of the <application> tag. |
| 444 | * |
| 445 | * {@hide} |
| 446 | */ |
| 447 | public static final int PRIVATE_FLAG_CANT_SAVE_STATE = 1<<1; |
| 448 | |
| 449 | /** |
| 450 | * Value for {@link #privateFlags}: Set to true if the application has been |
| 451 | * installed using the forward lock option. |
| 452 | * |
| 453 | * NOTE: DO NOT CHANGE THIS VALUE! It is saved in packages.xml. |
| 454 | * |
| 455 | * {@hide} |
| 456 | */ |
| 457 | public static final int PRIVATE_FLAG_FORWARD_LOCK = 1<<2; |
| 458 | |
| 459 | /** |
| 460 | * Value for {@link #privateFlags}: set to {@code true} if the application |
| 461 | * is permitted to hold privileged permissions. |
| 462 | * |
| 463 | * {@hide} |
| 464 | */ |
| 465 | public static final int PRIVATE_FLAG_PRIVILEGED = 1<<3; |
| 466 | |
| 467 | /** |
Svet Ganov | 2acf063 | 2015-11-24 19:10:59 -0800 | [diff] [blame] | 468 | * Value for {@link #privateFlags}: {@code true} if the application has any IntentFiler |
| 469 | * with some data URI using HTTP or HTTPS with an associated VIEW action. |
Fabrice Di Meglio | d3d8a32 | 2015-04-01 15:58:47 -0700 | [diff] [blame] | 470 | * |
| 471 | * {@hide} |
| 472 | */ |
| 473 | public static final int PRIVATE_FLAG_HAS_DOMAIN_URLS = 1<<4; |
| 474 | |
| 475 | /** |
Jeff Sharkey | 8a372a0 | 2016-03-16 16:25:45 -0600 | [diff] [blame] | 476 | * When set, the default data storage directory for this app is pointed at |
| 477 | * the device-protected location. |
Jeff Sharkey | 1544779 | 2015-11-05 16:18:51 -0800 | [diff] [blame] | 478 | * |
| 479 | * @hide |
| 480 | */ |
Jeff Sharkey | 8a372a0 | 2016-03-16 16:25:45 -0600 | [diff] [blame] | 481 | public static final int PRIVATE_FLAG_DEFAULT_TO_DEVICE_PROTECTED_STORAGE = 1 << 5; |
Jeff Sharkey | 1544779 | 2015-11-05 16:18:51 -0800 | [diff] [blame] | 482 | |
| 483 | /** |
Jeff Sharkey | 8a372a0 | 2016-03-16 16:25:45 -0600 | [diff] [blame] | 484 | * When set, assume that all components under the given app are direct boot |
Jeff Sharkey | f9fc6d6 | 2015-11-08 16:46:05 -0800 | [diff] [blame] | 485 | * aware, unless otherwise specified. |
| 486 | * |
| 487 | * @hide |
| 488 | */ |
Jeff Sharkey | 8a372a0 | 2016-03-16 16:25:45 -0600 | [diff] [blame] | 489 | public static final int PRIVATE_FLAG_DIRECT_BOOT_AWARE = 1 << 6; |
Jeff Sharkey | f9fc6d6 | 2015-11-08 16:46:05 -0800 | [diff] [blame] | 490 | |
| 491 | /** |
Chad Brubaker | 4389c23 | 2016-11-04 14:50:50 -0700 | [diff] [blame^] | 492 | * Value for {@link #flags}: {@code true} if the application is blocked via restrictions |
| 493 | * and for most purposes is considered as not installed. |
| 494 | * {@hide} |
| 495 | */ |
| 496 | public static final int PRIVATE_FLAG_EPHEMERAL = 1 << 7; |
| 497 | |
| 498 | /** |
Jeff Sharkey | 8a372a0 | 2016-03-16 16:25:45 -0600 | [diff] [blame] | 499 | * When set, at least one component inside this application is direct boot |
| 500 | * aware. |
Jeff Sharkey | 8924e87 | 2015-11-30 12:52:10 -0700 | [diff] [blame] | 501 | * |
| 502 | * @hide |
| 503 | */ |
Jeff Sharkey | 8a372a0 | 2016-03-16 16:25:45 -0600 | [diff] [blame] | 504 | public static final int PRIVATE_FLAG_PARTIALLY_DIRECT_BOOT_AWARE = 1 << 8; |
Jeff Sharkey | 8924e87 | 2015-11-30 12:52:10 -0700 | [diff] [blame] | 505 | |
Fyodor Kupolov | f99104d | 2015-12-14 11:31:29 -0800 | [diff] [blame] | 506 | |
| 507 | /** |
Fyodor Kupolov | bdbc969 | 2015-12-14 13:11:13 -0800 | [diff] [blame] | 508 | * When set, signals that the application is required for the system user and should not be |
| 509 | * uninstalled. |
| 510 | * |
| 511 | * @hide |
| 512 | */ |
Chad Brubaker | 4389c23 | 2016-11-04 14:50:50 -0700 | [diff] [blame^] | 513 | public static final int PRIVATE_FLAG_REQUIRED_FOR_SYSTEM_USER = 1 << 9; |
Fyodor Kupolov | bdbc969 | 2015-12-14 13:11:13 -0800 | [diff] [blame] | 514 | |
| 515 | /** |
Wale Ogunwale | 72a73e3 | 2016-10-13 12:16:39 -0700 | [diff] [blame] | 516 | * When set, the application explicitly requested that its activities by resizeable by default. |
Wale Ogunwale | 6afdf91 | 2016-01-30 13:01:33 -0800 | [diff] [blame] | 517 | * @see android.R.styleable#AndroidManifestActivity_resizeableActivity |
| 518 | * |
| 519 | * @hide |
| 520 | */ |
Chad Brubaker | 4389c23 | 2016-11-04 14:50:50 -0700 | [diff] [blame^] | 521 | public static final int PRIVATE_FLAG_RESIZEABLE_ACTIVITIES_EXPLICITLY_SET = 1 << 10; |
Wale Ogunwale | 72a73e3 | 2016-10-13 12:16:39 -0700 | [diff] [blame] | 522 | |
| 523 | /** |
| 524 | * The application isn't requesting explicitly requesting for its activities to be resizeable or |
| 525 | * non-resizeable by default. So, we are making it activities resizeable by default based on the |
| 526 | * target SDK version of the app. |
| 527 | * @see android.R.styleable#AndroidManifestActivity_resizeableActivity |
| 528 | * |
| 529 | * NOTE: This only affects apps with target SDK >= N where the resizeableActivity attribute was |
| 530 | * introduced. It shouldn't be confused with {@link ActivityInfo#RESIZE_MODE_FORCE_RESIZEABLE} |
| 531 | * where certain pre-N apps are forced to the resizeable. |
| 532 | * |
| 533 | * @hide |
| 534 | */ |
Chad Brubaker | 4389c23 | 2016-11-04 14:50:50 -0700 | [diff] [blame^] | 535 | public static final int PRIVATE_FLAG_RESIZEABLE_ACTIVITIES_VIA_SDK_VERSION = 1 << 11; |
Wale Ogunwale | 6afdf91 | 2016-01-30 13:01:33 -0800 | [diff] [blame] | 536 | |
| 537 | /** |
Christopher Tate | 43fbc5f | 2016-02-17 18:00:48 -0800 | [diff] [blame] | 538 | * Value for {@link #privateFlags}: {@code true} means the OS should go ahead and |
| 539 | * run full-data backup operations for the app even when it is in a |
| 540 | * foreground-equivalent run state. Defaults to {@code false} if unspecified. |
| 541 | * @hide |
| 542 | */ |
Chad Brubaker | 4389c23 | 2016-11-04 14:50:50 -0700 | [diff] [blame^] | 543 | public static final int PRIVATE_FLAG_BACKUP_IN_FOREGROUND = 1 << 12; |
Christopher Tate | 43fbc5f | 2016-02-17 18:00:48 -0800 | [diff] [blame] | 544 | |
| 545 | /** |
Alex Klyubin | b9f8a52 | 2015-02-03 11:12:59 -0800 | [diff] [blame] | 546 | * Private/hidden flags. See {@code PRIVATE_FLAG_...} constants. |
| 547 | * {@hide} |
| 548 | */ |
| 549 | public int privateFlags; |
| 550 | |
| 551 | /** |
Dianne Hackborn | df6e980 | 2011-05-26 14:20:23 -0700 | [diff] [blame] | 552 | * The required smallest screen width the application can run on. If 0, |
| 553 | * nothing has been specified. Comes from |
| 554 | * {@link android.R.styleable#AndroidManifestSupportsScreens_requiresSmallestWidthDp |
| 555 | * android:requiresSmallestWidthDp} attribute of the <supports-screens> tag. |
| 556 | */ |
| 557 | public int requiresSmallestWidthDp = 0; |
| 558 | |
| 559 | /** |
| 560 | * The maximum smallest screen width the application is designed for. If 0, |
| 561 | * nothing has been specified. Comes from |
| 562 | * {@link android.R.styleable#AndroidManifestSupportsScreens_compatibleWidthLimitDp |
| 563 | * android:compatibleWidthLimitDp} attribute of the <supports-screens> tag. |
| 564 | */ |
| 565 | public int compatibleWidthLimitDp = 0; |
| 566 | |
| 567 | /** |
Dianne Hackborn | 2762ff3 | 2011-06-01 21:27:05 -0700 | [diff] [blame] | 568 | * The maximum smallest screen width the application will work on. If 0, |
| 569 | * nothing has been specified. Comes from |
| 570 | * {@link android.R.styleable#AndroidManifestSupportsScreens_largestWidthLimitDp |
| 571 | * android:largestWidthLimitDp} attribute of the <supports-screens> tag. |
| 572 | */ |
| 573 | public int largestWidthLimitDp = 0; |
| 574 | |
Jeff Sharkey | d746057 | 2014-07-06 20:44:55 -0700 | [diff] [blame] | 575 | /** {@hide} */ |
Jeff Sharkey | b2b9ab8 | 2015-04-05 21:10:42 -0700 | [diff] [blame] | 576 | public String volumeUuid; |
| 577 | /** {@hide} */ |
Jeff Sharkey | d746057 | 2014-07-06 20:44:55 -0700 | [diff] [blame] | 578 | public String scanSourceDir; |
| 579 | /** {@hide} */ |
| 580 | public String scanPublicSourceDir; |
| 581 | |
Dianne Hackborn | 2762ff3 | 2011-06-01 21:27:05 -0700 | [diff] [blame] | 582 | /** |
Jeff Sharkey | 8a4c972 | 2014-06-16 13:48:42 -0700 | [diff] [blame] | 583 | * Full path to the base APK for this application. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 584 | */ |
| 585 | public String sourceDir; |
| 586 | |
| 587 | /** |
Jeff Sharkey | 8a4c972 | 2014-06-16 13:48:42 -0700 | [diff] [blame] | 588 | * Full path to the publicly available parts of {@link #sourceDir}, |
| 589 | * including resources and manifest. This may be different from |
| 590 | * {@link #sourceDir} if an application is forward locked. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 591 | */ |
| 592 | public String publicSourceDir; |
Jeff Sharkey | 8a4c972 | 2014-06-16 13:48:42 -0700 | [diff] [blame] | 593 | |
| 594 | /** |
| 595 | * Full paths to zero or more split APKs that, when combined with the base |
| 596 | * APK defined in {@link #sourceDir}, form a complete application. |
| 597 | */ |
| 598 | public String[] splitSourceDirs; |
| 599 | |
| 600 | /** |
| 601 | * Full path to the publicly available parts of {@link #splitSourceDirs}, |
| 602 | * including resources and manifest. This may be different from |
| 603 | * {@link #splitSourceDirs} if an application is forward locked. |
| 604 | */ |
| 605 | public String[] splitPublicSourceDirs; |
| 606 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 607 | /** |
Kenny Root | d1ab016 | 2010-01-21 17:27:14 -0800 | [diff] [blame] | 608 | * Full paths to the locations of extra resource packages this application |
| 609 | * uses. This field is only used if there are extra resource packages, |
| 610 | * otherwise it is null. |
Kenny Root | ace5a3f | 2010-02-05 12:59:28 -0800 | [diff] [blame] | 611 | * |
| 612 | * {@hide} |
Kenny Root | d1ab016 | 2010-01-21 17:27:14 -0800 | [diff] [blame] | 613 | */ |
| 614 | public String[] resourceDirs; |
| 615 | |
| 616 | /** |
Robert Craig | 0f40dc9 | 2013-03-25 06:33:03 -0400 | [diff] [blame] | 617 | * String retrieved from the seinfo tag found in selinux policy. This value |
Robert Craig | 5e16bc5 | 2015-08-28 12:11:41 -0400 | [diff] [blame] | 618 | * can be overridden with a value set through the mac_permissions.xml policy |
| 619 | * construct. This value is useful in setting an SELinux security context on |
| 620 | * the process as well as its data directory. The String default is being used |
| 621 | * here to represent a catchall label when no policy matches. |
Robert Craig | 0f40dc9 | 2013-03-25 06:33:03 -0400 | [diff] [blame] | 622 | * |
| 623 | * {@hide} |
| 624 | */ |
Robert Craig | 5e16bc5 | 2015-08-28 12:11:41 -0400 | [diff] [blame] | 625 | public String seinfo = "default"; |
Robert Craig | 0f40dc9 | 2013-03-25 06:33:03 -0400 | [diff] [blame] | 626 | |
| 627 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 628 | * Paths to all shared libraries this application is linked against. This |
| 629 | * field is only set if the {@link PackageManager#GET_SHARED_LIBRARY_FILES |
| 630 | * PackageManager.GET_SHARED_LIBRARY_FILES} flag was used when retrieving |
| 631 | * the structure. |
| 632 | */ |
| 633 | public String[] sharedLibraryFiles; |
| 634 | |
| 635 | /** |
Jeff Sharkey | 7a30a30 | 2015-12-08 14:20:06 -0700 | [diff] [blame] | 636 | * Full path to the default directory assigned to the package for its |
| 637 | * persistent data. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 638 | */ |
| 639 | public String dataDir; |
Kenny Root | 85387d7 | 2010-08-26 10:13:11 -0700 | [diff] [blame] | 640 | |
Jeff Sharkey | 7a30a30 | 2015-12-08 14:20:06 -0700 | [diff] [blame] | 641 | /** |
Jeff Sharkey | 8a372a0 | 2016-03-16 16:25:45 -0600 | [diff] [blame] | 642 | * Full path to the device-protected directory assigned to the package for |
Jeff Sharkey | 7a30a30 | 2015-12-08 14:20:06 -0700 | [diff] [blame] | 643 | * its persistent data. |
Jeff Sharkey | 8a372a0 | 2016-03-16 16:25:45 -0600 | [diff] [blame] | 644 | * |
| 645 | * @see Context#createDeviceProtectedStorageContext() |
Jeff Sharkey | 7a30a30 | 2015-12-08 14:20:06 -0700 | [diff] [blame] | 646 | */ |
Jeff Sharkey | 8a372a0 | 2016-03-16 16:25:45 -0600 | [diff] [blame] | 647 | public String deviceProtectedDataDir; |
| 648 | |
| 649 | /** @removed */ |
| 650 | @Deprecated |
Jeff Sharkey | 1544779 | 2015-11-05 16:18:51 -0800 | [diff] [blame] | 651 | public String deviceEncryptedDataDir; |
Jeff Sharkey | 7a30a30 | 2015-12-08 14:20:06 -0700 | [diff] [blame] | 652 | |
| 653 | /** |
Jeff Sharkey | 8a372a0 | 2016-03-16 16:25:45 -0600 | [diff] [blame] | 654 | * Full path to the credential-protected directory assigned to the package |
Jeff Sharkey | 7a30a30 | 2015-12-08 14:20:06 -0700 | [diff] [blame] | 655 | * for its persistent data. |
Jeff Sharkey | 8a372a0 | 2016-03-16 16:25:45 -0600 | [diff] [blame] | 656 | * |
| 657 | * @hide |
Jeff Sharkey | 7a30a30 | 2015-12-08 14:20:06 -0700 | [diff] [blame] | 658 | */ |
Jeff Sharkey | 8a372a0 | 2016-03-16 16:25:45 -0600 | [diff] [blame] | 659 | @SystemApi |
| 660 | public String credentialProtectedDataDir; |
| 661 | |
| 662 | /** @removed */ |
| 663 | @Deprecated |
Jeff Sharkey | 1544779 | 2015-11-05 16:18:51 -0800 | [diff] [blame] | 664 | public String credentialEncryptedDataDir; |
| 665 | |
Kenny Root | 85387d7 | 2010-08-26 10:13:11 -0700 | [diff] [blame] | 666 | /** |
| 667 | * Full path to the directory where native JNI libraries are stored. |
Kenny Root | 85387d7 | 2010-08-26 10:13:11 -0700 | [diff] [blame] | 668 | */ |
| 669 | public String nativeLibraryDir; |
| 670 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 671 | /** |
Narayan Kamath | 7dba6eb | 2014-07-16 08:53:30 +0100 | [diff] [blame] | 672 | * Full path where unpacked native libraries for {@link #secondaryCpuAbi} |
| 673 | * are stored, if present. |
| 674 | * |
| 675 | * The main reason this exists is for bundled multi-arch apps, where |
| 676 | * it's not trivial to calculate the location of libs for the secondary abi |
| 677 | * given the location of the primary. |
| 678 | * |
| 679 | * TODO: Change the layout of bundled installs so that we can use |
| 680 | * nativeLibraryRootDir & nativeLibraryRootRequiresIsa there as well. |
| 681 | * (e.g {@code [ "/system/app-lib/Foo/arm", "/system/app-lib/Foo/arm64" ]} |
| 682 | * instead of {@code [ "/system/lib/Foo", "/system/lib64/Foo" ]}. |
| 683 | * |
| 684 | * @hide |
| 685 | */ |
| 686 | public String secondaryNativeLibraryDir; |
| 687 | |
| 688 | /** |
Jeff Sharkey | 84f1294 | 2014-07-10 17:48:11 -0700 | [diff] [blame] | 689 | * The root path where unpacked native libraries are stored. |
| 690 | * <p> |
| 691 | * When {@link #nativeLibraryRootRequiresIsa} is set, the libraries are |
| 692 | * placed in ISA-specific subdirectories under this path, otherwise the |
| 693 | * libraries are placed directly at this path. |
Narayan Kamath | ff110bd | 2014-07-04 18:30:45 +0100 | [diff] [blame] | 694 | * |
Jeff Sharkey | 84f1294 | 2014-07-10 17:48:11 -0700 | [diff] [blame] | 695 | * @hide |
Narayan Kamath | ff110bd | 2014-07-04 18:30:45 +0100 | [diff] [blame] | 696 | */ |
Jeff Sharkey | 84f1294 | 2014-07-10 17:48:11 -0700 | [diff] [blame] | 697 | public String nativeLibraryRootDir; |
| 698 | |
| 699 | /** |
| 700 | * Flag indicating that ISA must be appended to |
| 701 | * {@link #nativeLibraryRootDir} to be useful. |
| 702 | * |
| 703 | * @hide |
| 704 | */ |
| 705 | public boolean nativeLibraryRootRequiresIsa; |
Narayan Kamath | ff110bd | 2014-07-04 18:30:45 +0100 | [diff] [blame] | 706 | |
| 707 | /** |
| 708 | * The primary ABI that this application requires, This is inferred from the ABIs |
Ramin Zaghi | ff0c470 | 2014-04-01 15:02:29 +0100 | [diff] [blame] | 709 | * of the native JNI libraries the application bundles. Will be {@code null} |
| 710 | * if this application does not require any particular ABI. |
| 711 | * |
Narayan Kamath | ff110bd | 2014-07-04 18:30:45 +0100 | [diff] [blame] | 712 | * If non-null, the application will always be launched with this ABI. |
| 713 | * |
Ramin Zaghi | ff0c470 | 2014-04-01 15:02:29 +0100 | [diff] [blame] | 714 | * {@hide} |
| 715 | */ |
Narayan Kamath | ff110bd | 2014-07-04 18:30:45 +0100 | [diff] [blame] | 716 | public String primaryCpuAbi; |
| 717 | |
| 718 | /** |
| 719 | * The secondary ABI for this application. Might be non-null for multi-arch |
| 720 | * installs. The application itself never uses this ABI, but other applications that |
| 721 | * use its code might. |
| 722 | * |
| 723 | * {@hide} |
| 724 | */ |
| 725 | public String secondaryCpuAbi; |
| 726 | |
| 727 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 728 | * The kernel user-ID that has been assigned to this application; |
| 729 | * currently this is not a unique ID (multiple applications can have |
| 730 | * the same uid). |
| 731 | */ |
| 732 | public int uid; |
| 733 | |
Mitsuru Oshima | 8d11267 | 2009-04-27 12:01:23 -0700 | [diff] [blame] | 734 | /** |
Todd Kennedy | 89d6018 | 2016-03-11 11:18:32 -0800 | [diff] [blame] | 735 | * The minimum SDK version this application can run on. It will not run |
| 736 | * on earlier versions. |
| 737 | */ |
Todd Kennedy | 6e2e7f5 | 2016-05-02 14:56:45 -0700 | [diff] [blame] | 738 | public int minSdkVersion; |
Todd Kennedy | 89d6018 | 2016-03-11 11:18:32 -0800 | [diff] [blame] | 739 | |
| 740 | /** |
Dianne Hackborn | 3b3e145 | 2009-09-24 19:22:12 -0700 | [diff] [blame] | 741 | * The minimum SDK version this application targets. It may run on earlier |
Dianne Hackborn | a96cbb4 | 2009-05-13 15:06:13 -0700 | [diff] [blame] | 742 | * versions, but it knows how to work with any new behavior added at this |
| 743 | * version. Will be {@link android.os.Build.VERSION_CODES#CUR_DEVELOPMENT} |
| 744 | * if this is a development build and the app is targeting that. You should |
| 745 | * compare that this number is >= the SDK version number at which your |
| 746 | * behavior was introduced. |
| 747 | */ |
| 748 | public int targetSdkVersion; |
Dianne Hackborn | 8472e61 | 2014-01-23 17:57:20 -0800 | [diff] [blame] | 749 | |
| 750 | /** |
| 751 | * The app's declared version code. |
| 752 | * @hide |
| 753 | */ |
| 754 | public int versionCode; |
| 755 | |
Dianne Hackborn | a96cbb4 | 2009-05-13 15:06:13 -0700 | [diff] [blame] | 756 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 757 | * When false, indicates that all components within this application are |
| 758 | * considered disabled, regardless of their individually set enabled status. |
| 759 | */ |
| 760 | public boolean enabled = true; |
| 761 | |
Dianne Hackborn | 54e570f | 2010-10-04 18:32:32 -0700 | [diff] [blame] | 762 | /** |
Dianne Hackborn | 0ac3031 | 2011-06-17 14:49:23 -0700 | [diff] [blame] | 763 | * For convenient access to the current enabled setting of this app. |
| 764 | * @hide |
| 765 | */ |
| 766 | public int enabledSetting = PackageManager.COMPONENT_ENABLED_STATE_DEFAULT; |
| 767 | |
| 768 | /** |
Dianne Hackborn | 54e570f | 2010-10-04 18:32:32 -0700 | [diff] [blame] | 769 | * For convenient access to package's install location. |
| 770 | * @hide |
| 771 | */ |
| 772 | public int installLocation = PackageInfo.INSTALL_LOCATION_UNSPECIFIED; |
Jose Lima | 12d0b4c | 2014-03-14 16:55:12 -0700 | [diff] [blame] | 773 | |
Chad Brubaker | c845b2a | 2016-05-13 14:09:27 -0700 | [diff] [blame] | 774 | /** |
| 775 | * Resource file providing the application's Network Security Config. |
| 776 | * @hide |
| 777 | */ |
| 778 | public int networkSecurityConfigRes; |
| 779 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 780 | public void dump(Printer pw, String prefix) { |
Dianne Hackborn | 6ac42ae | 2015-12-08 17:22:10 -0800 | [diff] [blame] | 781 | dump(pw, prefix, DUMP_FLAG_ALL); |
| 782 | } |
| 783 | |
| 784 | /** @hide */ |
| 785 | public void dump(Printer pw, String prefix, int flags) { |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 786 | super.dumpFront(pw, prefix); |
Dianne Hackborn | 6ac42ae | 2015-12-08 17:22:10 -0800 | [diff] [blame] | 787 | if ((flags&DUMP_FLAG_DETAILS) != 0 && className != null) { |
Dianne Hackborn | 12527f9 | 2009-11-11 17:39:50 -0800 | [diff] [blame] | 788 | pw.println(prefix + "className=" + className); |
| 789 | } |
| 790 | if (permission != null) { |
| 791 | pw.println(prefix + "permission=" + permission); |
| 792 | } |
Dianne Hackborn | 39792d2 | 2010-08-19 18:01:52 -0700 | [diff] [blame] | 793 | pw.println(prefix + "processName=" + processName); |
Dianne Hackborn | 6ac42ae | 2015-12-08 17:22:10 -0800 | [diff] [blame] | 794 | if ((flags&DUMP_FLAG_DETAILS) != 0) { |
| 795 | pw.println(prefix + "taskAffinity=" + taskAffinity); |
| 796 | } |
Dianne Hackborn | 39792d2 | 2010-08-19 18:01:52 -0700 | [diff] [blame] | 797 | pw.println(prefix + "uid=" + uid + " flags=0x" + Integer.toHexString(flags) |
Alex Klyubin | b9f8a52 | 2015-02-03 11:12:59 -0800 | [diff] [blame] | 798 | + " privateFlags=0x" + Integer.toHexString(privateFlags) |
Dianne Hackborn | 39792d2 | 2010-08-19 18:01:52 -0700 | [diff] [blame] | 799 | + " theme=0x" + Integer.toHexString(theme)); |
Dianne Hackborn | 6ac42ae | 2015-12-08 17:22:10 -0800 | [diff] [blame] | 800 | if ((flags&DUMP_FLAG_DETAILS) != 0) { |
| 801 | pw.println(prefix + "requiresSmallestWidthDp=" + requiresSmallestWidthDp |
| 802 | + " compatibleWidthLimitDp=" + compatibleWidthLimitDp |
| 803 | + " largestWidthLimitDp=" + largestWidthLimitDp); |
| 804 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 805 | pw.println(prefix + "sourceDir=" + sourceDir); |
Jeff Sharkey | 8a4c972 | 2014-06-16 13:48:42 -0700 | [diff] [blame] | 806 | if (!Objects.equals(sourceDir, publicSourceDir)) { |
Dianne Hackborn | 39792d2 | 2010-08-19 18:01:52 -0700 | [diff] [blame] | 807 | pw.println(prefix + "publicSourceDir=" + publicSourceDir); |
| 808 | } |
Jeff Sharkey | 8a4c972 | 2014-06-16 13:48:42 -0700 | [diff] [blame] | 809 | if (!ArrayUtils.isEmpty(splitSourceDirs)) { |
| 810 | pw.println(prefix + "splitSourceDirs=" + Arrays.toString(splitSourceDirs)); |
| 811 | } |
| 812 | if (!ArrayUtils.isEmpty(splitPublicSourceDirs) |
| 813 | && !Arrays.equals(splitSourceDirs, splitPublicSourceDirs)) { |
| 814 | pw.println(prefix + "splitPublicSourceDirs=" + Arrays.toString(splitPublicSourceDirs)); |
| 815 | } |
Dianne Hackborn | 39792d2 | 2010-08-19 18:01:52 -0700 | [diff] [blame] | 816 | if (resourceDirs != null) { |
Andreas Gampe | e6748ce | 2015-12-11 18:00:38 -0800 | [diff] [blame] | 817 | pw.println(prefix + "resourceDirs=" + Arrays.toString(resourceDirs)); |
Dianne Hackborn | 39792d2 | 2010-08-19 18:01:52 -0700 | [diff] [blame] | 818 | } |
Dianne Hackborn | 6ac42ae | 2015-12-08 17:22:10 -0800 | [diff] [blame] | 819 | if ((flags&DUMP_FLAG_DETAILS) != 0 && seinfo != null) { |
Robert Craig | 0f40dc9 | 2013-03-25 06:33:03 -0400 | [diff] [blame] | 820 | pw.println(prefix + "seinfo=" + seinfo); |
| 821 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 822 | pw.println(prefix + "dataDir=" + dataDir); |
Dianne Hackborn | 6ac42ae | 2015-12-08 17:22:10 -0800 | [diff] [blame] | 823 | if ((flags&DUMP_FLAG_DETAILS) != 0) { |
Jeff Sharkey | 8a372a0 | 2016-03-16 16:25:45 -0600 | [diff] [blame] | 824 | pw.println(prefix + "deviceProtectedDataDir=" + deviceProtectedDataDir); |
| 825 | pw.println(prefix + "credentialProtectedDataDir=" + credentialProtectedDataDir); |
Dianne Hackborn | 6ac42ae | 2015-12-08 17:22:10 -0800 | [diff] [blame] | 826 | if (sharedLibraryFiles != null) { |
| 827 | pw.println(prefix + "sharedLibraryFiles=" + Arrays.toString(sharedLibraryFiles)); |
| 828 | } |
Dianne Hackborn | 12527f9 | 2009-11-11 17:39:50 -0800 | [diff] [blame] | 829 | } |
Todd Kennedy | 89d6018 | 2016-03-11 11:18:32 -0800 | [diff] [blame] | 830 | pw.println(prefix + "enabled=" + enabled |
| 831 | + " minSdkVersion=" + minSdkVersion |
| 832 | + " targetSdkVersion=" + targetSdkVersion |
Dianne Hackborn | 8472e61 | 2014-01-23 17:57:20 -0800 | [diff] [blame] | 833 | + " versionCode=" + versionCode); |
Dianne Hackborn | 6ac42ae | 2015-12-08 17:22:10 -0800 | [diff] [blame] | 834 | if ((flags&DUMP_FLAG_DETAILS) != 0) { |
| 835 | if (manageSpaceActivityName != null) { |
| 836 | pw.println(prefix + "manageSpaceActivityName=" + manageSpaceActivityName); |
| 837 | } |
| 838 | if (descriptionRes != 0) { |
| 839 | pw.println(prefix + "description=0x" + Integer.toHexString(descriptionRes)); |
| 840 | } |
| 841 | if (uiOptions != 0) { |
| 842 | pw.println(prefix + "uiOptions=0x" + Integer.toHexString(uiOptions)); |
| 843 | } |
| 844 | pw.println(prefix + "supportsRtl=" + (hasRtlSupport() ? "true" : "false")); |
| 845 | if (fullBackupContent > 0) { |
| 846 | pw.println(prefix + "fullBackupContent=@xml/" + fullBackupContent); |
| 847 | } else { |
| 848 | pw.println(prefix + "fullBackupContent=" |
| 849 | + (fullBackupContent < 0 ? "false" : "true")); |
| 850 | } |
Chad Brubaker | c845b2a | 2016-05-13 14:09:27 -0700 | [diff] [blame] | 851 | if (networkSecurityConfigRes != 0) { |
| 852 | pw.println(prefix + "networkSecurityConfigRes=0x" |
| 853 | + Integer.toHexString(networkSecurityConfigRes)); |
| 854 | } |
Matthew Williams | 303650c | 2015-04-17 18:22:51 -0700 | [diff] [blame] | 855 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 856 | super.dumpBack(pw, prefix); |
| 857 | } |
Fabrice Di Meglio | 59dfce8 | 2012-04-02 16:17:20 -0700 | [diff] [blame] | 858 | |
| 859 | /** |
| 860 | * @return true if "supportsRtl" has been set to true in the AndroidManifest |
| 861 | * @hide |
| 862 | */ |
| 863 | public boolean hasRtlSupport() { |
| 864 | return (flags & FLAG_SUPPORTS_RTL) == FLAG_SUPPORTS_RTL; |
| 865 | } |
Jeff Sharkey | ba75a9b | 2016-01-07 11:51:33 -0700 | [diff] [blame] | 866 | |
| 867 | /** {@hide} */ |
| 868 | public boolean hasCode() { |
| 869 | return (flags & FLAG_HAS_CODE) != 0; |
| 870 | } |
| 871 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 872 | public static class DisplayNameComparator |
| 873 | implements Comparator<ApplicationInfo> { |
| 874 | public DisplayNameComparator(PackageManager pm) { |
| 875 | mPM = pm; |
| 876 | } |
| 877 | |
| 878 | public final int compare(ApplicationInfo aa, ApplicationInfo ab) { |
| 879 | CharSequence sa = mPM.getApplicationLabel(aa); |
| 880 | if (sa == null) { |
| 881 | sa = aa.packageName; |
| 882 | } |
| 883 | CharSequence sb = mPM.getApplicationLabel(ab); |
| 884 | if (sb == null) { |
| 885 | sb = ab.packageName; |
| 886 | } |
| 887 | |
| 888 | return sCollator.compare(sa.toString(), sb.toString()); |
| 889 | } |
| 890 | |
| 891 | private final Collator sCollator = Collator.getInstance(); |
| 892 | private PackageManager mPM; |
| 893 | } |
| 894 | |
| 895 | public ApplicationInfo() { |
| 896 | } |
| 897 | |
| 898 | public ApplicationInfo(ApplicationInfo orig) { |
| 899 | super(orig); |
| 900 | taskAffinity = orig.taskAffinity; |
| 901 | permission = orig.permission; |
| 902 | processName = orig.processName; |
| 903 | className = orig.className; |
| 904 | theme = orig.theme; |
| 905 | flags = orig.flags; |
Alex Klyubin | b9f8a52 | 2015-02-03 11:12:59 -0800 | [diff] [blame] | 906 | privateFlags = orig.privateFlags; |
Dianne Hackborn | df6e980 | 2011-05-26 14:20:23 -0700 | [diff] [blame] | 907 | requiresSmallestWidthDp = orig.requiresSmallestWidthDp; |
| 908 | compatibleWidthLimitDp = orig.compatibleWidthLimitDp; |
Dianne Hackborn | 2762ff3 | 2011-06-01 21:27:05 -0700 | [diff] [blame] | 909 | largestWidthLimitDp = orig.largestWidthLimitDp; |
Jeff Sharkey | b2b9ab8 | 2015-04-05 21:10:42 -0700 | [diff] [blame] | 910 | volumeUuid = orig.volumeUuid; |
Jeff Sharkey | 7f1a57a | 2014-10-08 10:14:53 -0700 | [diff] [blame] | 911 | scanSourceDir = orig.scanSourceDir; |
| 912 | scanPublicSourceDir = orig.scanPublicSourceDir; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 913 | sourceDir = orig.sourceDir; |
| 914 | publicSourceDir = orig.publicSourceDir; |
Jeff Sharkey | 8a4c972 | 2014-06-16 13:48:42 -0700 | [diff] [blame] | 915 | splitSourceDirs = orig.splitSourceDirs; |
| 916 | splitPublicSourceDirs = orig.splitPublicSourceDirs; |
Kenny Root | 85387d7 | 2010-08-26 10:13:11 -0700 | [diff] [blame] | 917 | nativeLibraryDir = orig.nativeLibraryDir; |
Narayan Kamath | 7dba6eb | 2014-07-16 08:53:30 +0100 | [diff] [blame] | 918 | secondaryNativeLibraryDir = orig.secondaryNativeLibraryDir; |
Jeff Sharkey | 84f1294 | 2014-07-10 17:48:11 -0700 | [diff] [blame] | 919 | nativeLibraryRootDir = orig.nativeLibraryRootDir; |
| 920 | nativeLibraryRootRequiresIsa = orig.nativeLibraryRootRequiresIsa; |
Narayan Kamath | ff110bd | 2014-07-04 18:30:45 +0100 | [diff] [blame] | 921 | primaryCpuAbi = orig.primaryCpuAbi; |
| 922 | secondaryCpuAbi = orig.secondaryCpuAbi; |
Kenny Root | d1ab016 | 2010-01-21 17:27:14 -0800 | [diff] [blame] | 923 | resourceDirs = orig.resourceDirs; |
Robert Craig | 0f40dc9 | 2013-03-25 06:33:03 -0400 | [diff] [blame] | 924 | seinfo = orig.seinfo; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 925 | sharedLibraryFiles = orig.sharedLibraryFiles; |
| 926 | dataDir = orig.dataDir; |
Jeff Sharkey | 8a372a0 | 2016-03-16 16:25:45 -0600 | [diff] [blame] | 927 | deviceEncryptedDataDir = deviceProtectedDataDir = orig.deviceProtectedDataDir; |
| 928 | credentialEncryptedDataDir = credentialProtectedDataDir = orig.credentialProtectedDataDir; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 929 | uid = orig.uid; |
Todd Kennedy | 89d6018 | 2016-03-11 11:18:32 -0800 | [diff] [blame] | 930 | minSdkVersion = orig.minSdkVersion; |
Dianne Hackborn | a96cbb4 | 2009-05-13 15:06:13 -0700 | [diff] [blame] | 931 | targetSdkVersion = orig.targetSdkVersion; |
Dianne Hackborn | 8472e61 | 2014-01-23 17:57:20 -0800 | [diff] [blame] | 932 | versionCode = orig.versionCode; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 933 | enabled = orig.enabled; |
Dianne Hackborn | 0ac3031 | 2011-06-17 14:49:23 -0700 | [diff] [blame] | 934 | enabledSetting = orig.enabledSetting; |
Dianne Hackborn | 54e570f | 2010-10-04 18:32:32 -0700 | [diff] [blame] | 935 | installLocation = orig.installLocation; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 936 | manageSpaceActivityName = orig.manageSpaceActivityName; |
| 937 | descriptionRes = orig.descriptionRes; |
Adam Powell | 269248d | 2011-08-02 10:26:54 -0700 | [diff] [blame] | 938 | uiOptions = orig.uiOptions; |
Christopher Tate | bcb0255 | 2012-10-16 17:14:34 -0700 | [diff] [blame] | 939 | backupAgentName = orig.backupAgentName; |
Matthew Williams | 303650c | 2015-04-17 18:22:51 -0700 | [diff] [blame] | 940 | fullBackupContent = orig.fullBackupContent; |
Chad Brubaker | c845b2a | 2016-05-13 14:09:27 -0700 | [diff] [blame] | 941 | networkSecurityConfigRes = orig.networkSecurityConfigRes; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 942 | } |
| 943 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 944 | public String toString() { |
| 945 | return "ApplicationInfo{" |
| 946 | + Integer.toHexString(System.identityHashCode(this)) |
| 947 | + " " + packageName + "}"; |
| 948 | } |
| 949 | |
| 950 | public int describeContents() { |
| 951 | return 0; |
| 952 | } |
| 953 | |
| 954 | public void writeToParcel(Parcel dest, int parcelableFlags) { |
| 955 | super.writeToParcel(dest, parcelableFlags); |
| 956 | dest.writeString(taskAffinity); |
| 957 | dest.writeString(permission); |
| 958 | dest.writeString(processName); |
| 959 | dest.writeString(className); |
| 960 | dest.writeInt(theme); |
| 961 | dest.writeInt(flags); |
Alex Klyubin | b9f8a52 | 2015-02-03 11:12:59 -0800 | [diff] [blame] | 962 | dest.writeInt(privateFlags); |
Dianne Hackborn | df6e980 | 2011-05-26 14:20:23 -0700 | [diff] [blame] | 963 | dest.writeInt(requiresSmallestWidthDp); |
| 964 | dest.writeInt(compatibleWidthLimitDp); |
Dianne Hackborn | 2762ff3 | 2011-06-01 21:27:05 -0700 | [diff] [blame] | 965 | dest.writeInt(largestWidthLimitDp); |
Jeff Sharkey | b2b9ab8 | 2015-04-05 21:10:42 -0700 | [diff] [blame] | 966 | dest.writeString(volumeUuid); |
Jeff Sharkey | 7f1a57a | 2014-10-08 10:14:53 -0700 | [diff] [blame] | 967 | dest.writeString(scanSourceDir); |
| 968 | dest.writeString(scanPublicSourceDir); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 969 | dest.writeString(sourceDir); |
| 970 | dest.writeString(publicSourceDir); |
Jeff Sharkey | 8a4c972 | 2014-06-16 13:48:42 -0700 | [diff] [blame] | 971 | dest.writeStringArray(splitSourceDirs); |
| 972 | dest.writeStringArray(splitPublicSourceDirs); |
Kenny Root | 85387d7 | 2010-08-26 10:13:11 -0700 | [diff] [blame] | 973 | dest.writeString(nativeLibraryDir); |
Narayan Kamath | 7dba6eb | 2014-07-16 08:53:30 +0100 | [diff] [blame] | 974 | dest.writeString(secondaryNativeLibraryDir); |
Jeff Sharkey | 84f1294 | 2014-07-10 17:48:11 -0700 | [diff] [blame] | 975 | dest.writeString(nativeLibraryRootDir); |
| 976 | dest.writeInt(nativeLibraryRootRequiresIsa ? 1 : 0); |
Narayan Kamath | ff110bd | 2014-07-04 18:30:45 +0100 | [diff] [blame] | 977 | dest.writeString(primaryCpuAbi); |
| 978 | dest.writeString(secondaryCpuAbi); |
Kenny Root | d1ab016 | 2010-01-21 17:27:14 -0800 | [diff] [blame] | 979 | dest.writeStringArray(resourceDirs); |
Robert Craig | 0f40dc9 | 2013-03-25 06:33:03 -0400 | [diff] [blame] | 980 | dest.writeString(seinfo); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 981 | dest.writeStringArray(sharedLibraryFiles); |
| 982 | dest.writeString(dataDir); |
Jeff Sharkey | 8a372a0 | 2016-03-16 16:25:45 -0600 | [diff] [blame] | 983 | dest.writeString(deviceProtectedDataDir); |
| 984 | dest.writeString(credentialProtectedDataDir); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 985 | dest.writeInt(uid); |
Todd Kennedy | 6e2e7f5 | 2016-05-02 14:56:45 -0700 | [diff] [blame] | 986 | dest.writeInt(minSdkVersion); |
Dianne Hackborn | a96cbb4 | 2009-05-13 15:06:13 -0700 | [diff] [blame] | 987 | dest.writeInt(targetSdkVersion); |
Dianne Hackborn | 8472e61 | 2014-01-23 17:57:20 -0800 | [diff] [blame] | 988 | dest.writeInt(versionCode); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 989 | dest.writeInt(enabled ? 1 : 0); |
Dianne Hackborn | 0ac3031 | 2011-06-17 14:49:23 -0700 | [diff] [blame] | 990 | dest.writeInt(enabledSetting); |
Dianne Hackborn | 54e570f | 2010-10-04 18:32:32 -0700 | [diff] [blame] | 991 | dest.writeInt(installLocation); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 992 | dest.writeString(manageSpaceActivityName); |
Christopher Tate | 181fafa | 2009-05-14 11:12:14 -0700 | [diff] [blame] | 993 | dest.writeString(backupAgentName); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 994 | dest.writeInt(descriptionRes); |
Adam Powell | 269248d | 2011-08-02 10:26:54 -0700 | [diff] [blame] | 995 | dest.writeInt(uiOptions); |
Matthew Williams | 303650c | 2015-04-17 18:22:51 -0700 | [diff] [blame] | 996 | dest.writeInt(fullBackupContent); |
Chad Brubaker | c845b2a | 2016-05-13 14:09:27 -0700 | [diff] [blame] | 997 | dest.writeInt(networkSecurityConfigRes); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 998 | } |
| 999 | |
| 1000 | public static final Parcelable.Creator<ApplicationInfo> CREATOR |
| 1001 | = new Parcelable.Creator<ApplicationInfo>() { |
| 1002 | public ApplicationInfo createFromParcel(Parcel source) { |
| 1003 | return new ApplicationInfo(source); |
| 1004 | } |
| 1005 | public ApplicationInfo[] newArray(int size) { |
| 1006 | return new ApplicationInfo[size]; |
| 1007 | } |
| 1008 | }; |
| 1009 | |
| 1010 | private ApplicationInfo(Parcel source) { |
| 1011 | super(source); |
| 1012 | taskAffinity = source.readString(); |
| 1013 | permission = source.readString(); |
| 1014 | processName = source.readString(); |
| 1015 | className = source.readString(); |
| 1016 | theme = source.readInt(); |
| 1017 | flags = source.readInt(); |
Alex Klyubin | b9f8a52 | 2015-02-03 11:12:59 -0800 | [diff] [blame] | 1018 | privateFlags = source.readInt(); |
Dianne Hackborn | df6e980 | 2011-05-26 14:20:23 -0700 | [diff] [blame] | 1019 | requiresSmallestWidthDp = source.readInt(); |
| 1020 | compatibleWidthLimitDp = source.readInt(); |
Dianne Hackborn | 2762ff3 | 2011-06-01 21:27:05 -0700 | [diff] [blame] | 1021 | largestWidthLimitDp = source.readInt(); |
Jeff Sharkey | b2b9ab8 | 2015-04-05 21:10:42 -0700 | [diff] [blame] | 1022 | volumeUuid = source.readString(); |
Jeff Sharkey | 7f1a57a | 2014-10-08 10:14:53 -0700 | [diff] [blame] | 1023 | scanSourceDir = source.readString(); |
| 1024 | scanPublicSourceDir = source.readString(); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1025 | sourceDir = source.readString(); |
| 1026 | publicSourceDir = source.readString(); |
Jeff Sharkey | 8a4c972 | 2014-06-16 13:48:42 -0700 | [diff] [blame] | 1027 | splitSourceDirs = source.readStringArray(); |
| 1028 | splitPublicSourceDirs = source.readStringArray(); |
Kenny Root | 85387d7 | 2010-08-26 10:13:11 -0700 | [diff] [blame] | 1029 | nativeLibraryDir = source.readString(); |
Narayan Kamath | 7dba6eb | 2014-07-16 08:53:30 +0100 | [diff] [blame] | 1030 | secondaryNativeLibraryDir = source.readString(); |
Jeff Sharkey | 84f1294 | 2014-07-10 17:48:11 -0700 | [diff] [blame] | 1031 | nativeLibraryRootDir = source.readString(); |
| 1032 | nativeLibraryRootRequiresIsa = source.readInt() != 0; |
Narayan Kamath | ff110bd | 2014-07-04 18:30:45 +0100 | [diff] [blame] | 1033 | primaryCpuAbi = source.readString(); |
| 1034 | secondaryCpuAbi = source.readString(); |
Kenny Root | d1ab016 | 2010-01-21 17:27:14 -0800 | [diff] [blame] | 1035 | resourceDirs = source.readStringArray(); |
Robert Craig | 0f40dc9 | 2013-03-25 06:33:03 -0400 | [diff] [blame] | 1036 | seinfo = source.readString(); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1037 | sharedLibraryFiles = source.readStringArray(); |
| 1038 | dataDir = source.readString(); |
Jeff Sharkey | 8a372a0 | 2016-03-16 16:25:45 -0600 | [diff] [blame] | 1039 | deviceEncryptedDataDir = deviceProtectedDataDir = source.readString(); |
| 1040 | credentialEncryptedDataDir = credentialProtectedDataDir = source.readString(); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1041 | uid = source.readInt(); |
Todd Kennedy | 6e2e7f5 | 2016-05-02 14:56:45 -0700 | [diff] [blame] | 1042 | minSdkVersion = source.readInt(); |
Dianne Hackborn | a96cbb4 | 2009-05-13 15:06:13 -0700 | [diff] [blame] | 1043 | targetSdkVersion = source.readInt(); |
Dianne Hackborn | 8472e61 | 2014-01-23 17:57:20 -0800 | [diff] [blame] | 1044 | versionCode = source.readInt(); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1045 | enabled = source.readInt() != 0; |
Dianne Hackborn | 0ac3031 | 2011-06-17 14:49:23 -0700 | [diff] [blame] | 1046 | enabledSetting = source.readInt(); |
Dianne Hackborn | 54e570f | 2010-10-04 18:32:32 -0700 | [diff] [blame] | 1047 | installLocation = source.readInt(); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1048 | manageSpaceActivityName = source.readString(); |
Christopher Tate | 181fafa | 2009-05-14 11:12:14 -0700 | [diff] [blame] | 1049 | backupAgentName = source.readString(); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1050 | descriptionRes = source.readInt(); |
Adam Powell | 269248d | 2011-08-02 10:26:54 -0700 | [diff] [blame] | 1051 | uiOptions = source.readInt(); |
Matthew Williams | 303650c | 2015-04-17 18:22:51 -0700 | [diff] [blame] | 1052 | fullBackupContent = source.readInt(); |
Chad Brubaker | c845b2a | 2016-05-13 14:09:27 -0700 | [diff] [blame] | 1053 | networkSecurityConfigRes = source.readInt(); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1054 | } |
Mitsuru Oshima | 8d11267 | 2009-04-27 12:01:23 -0700 | [diff] [blame] | 1055 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1056 | /** |
| 1057 | * Retrieve the textual description of the application. This |
| 1058 | * will call back on the given PackageManager to load the description from |
| 1059 | * the application. |
| 1060 | * |
| 1061 | * @param pm A PackageManager from which the label can be loaded; usually |
| 1062 | * the PackageManager from which you originally retrieved this item. |
| 1063 | * |
| 1064 | * @return Returns a CharSequence containing the application's description. |
| 1065 | * If there is no description, null is returned. |
| 1066 | */ |
| 1067 | public CharSequence loadDescription(PackageManager pm) { |
| 1068 | if (descriptionRes != 0) { |
Jeff Brown | 0733079 | 2010-03-30 19:57:08 -0700 | [diff] [blame] | 1069 | CharSequence label = pm.getText(packageName, descriptionRes, this); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1070 | if (label != null) { |
| 1071 | return label; |
| 1072 | } |
| 1073 | } |
| 1074 | return null; |
| 1075 | } |
Mitsuru Oshima | e5fb328 | 2009-06-09 21:16:08 -0700 | [diff] [blame] | 1076 | |
| 1077 | /** |
| 1078 | * Disable compatibility mode |
| 1079 | * |
| 1080 | * @hide |
| 1081 | */ |
| 1082 | public void disableCompatibilityMode() { |
Mitsuru Oshima | 69fff4a | 2009-07-21 09:51:05 -0700 | [diff] [blame] | 1083 | flags |= (FLAG_SUPPORTS_LARGE_SCREENS | FLAG_SUPPORTS_NORMAL_SCREENS | |
Dianne Hackborn | 11b822d | 2009-07-21 20:03:02 -0700 | [diff] [blame] | 1084 | FLAG_SUPPORTS_SMALL_SCREENS | FLAG_RESIZEABLE_FOR_SCREENS | |
Dianne Hackborn | 14cee9f | 2010-04-23 17:51:26 -0700 | [diff] [blame] | 1085 | FLAG_SUPPORTS_SCREEN_DENSITIES | FLAG_SUPPORTS_XLARGE_SCREENS); |
Mitsuru Oshima | e5fb328 | 2009-06-09 21:16:08 -0700 | [diff] [blame] | 1086 | } |
Jeff Sharkey | 1544779 | 2015-11-05 16:18:51 -0800 | [diff] [blame] | 1087 | |
| 1088 | /** {@hide} */ |
| 1089 | public void initForUser(int userId) { |
| 1090 | uid = UserHandle.getUid(userId, UserHandle.getAppId(uid)); |
| 1091 | |
| 1092 | if ("android".equals(packageName)) { |
| 1093 | dataDir = Environment.getDataSystemDirectory().getAbsolutePath(); |
| 1094 | return; |
| 1095 | } |
| 1096 | |
Jeff Sharkey | 8a372a0 | 2016-03-16 16:25:45 -0600 | [diff] [blame] | 1097 | deviceEncryptedDataDir = deviceProtectedDataDir = Environment |
Jeff Sharkey | 8212ae0 | 2016-02-10 14:46:43 -0700 | [diff] [blame] | 1098 | .getDataUserDePackageDirectory(volumeUuid, userId, packageName) |
Jeff Sharkey | 1544779 | 2015-11-05 16:18:51 -0800 | [diff] [blame] | 1099 | .getAbsolutePath(); |
Jeff Sharkey | 8a372a0 | 2016-03-16 16:25:45 -0600 | [diff] [blame] | 1100 | credentialEncryptedDataDir = credentialProtectedDataDir = Environment |
Jeff Sharkey | 8212ae0 | 2016-02-10 14:46:43 -0700 | [diff] [blame] | 1101 | .getDataUserCePackageDirectory(volumeUuid, userId, packageName) |
Jeff Sharkey | 1544779 | 2015-11-05 16:18:51 -0800 | [diff] [blame] | 1102 | .getAbsolutePath(); |
| 1103 | |
Jeff Sharkey | 8a372a0 | 2016-03-16 16:25:45 -0600 | [diff] [blame] | 1104 | if ((privateFlags & PRIVATE_FLAG_DEFAULT_TO_DEVICE_PROTECTED_STORAGE) != 0 |
| 1105 | && PackageManager.APPLY_DEFAULT_TO_DEVICE_PROTECTED_STORAGE) { |
| 1106 | dataDir = deviceProtectedDataDir; |
Jeff Sharkey | 1544779 | 2015-11-05 16:18:51 -0800 | [diff] [blame] | 1107 | } else { |
Jeff Sharkey | 8a372a0 | 2016-03-16 16:25:45 -0600 | [diff] [blame] | 1108 | dataDir = credentialProtectedDataDir; |
Jeff Sharkey | 1544779 | 2015-11-05 16:18:51 -0800 | [diff] [blame] | 1109 | } |
| 1110 | } |
| 1111 | |
Jeff Brown | 0733079 | 2010-03-30 19:57:08 -0700 | [diff] [blame] | 1112 | /** |
| 1113 | * @hide |
| 1114 | */ |
Alexandra Gherghina | a709314 | 2014-07-30 13:43:39 +0100 | [diff] [blame] | 1115 | @Override |
| 1116 | public Drawable loadDefaultIcon(PackageManager pm) { |
Jeff Brown | 0733079 | 2010-03-30 19:57:08 -0700 | [diff] [blame] | 1117 | if ((flags & FLAG_EXTERNAL_STORAGE) != 0 |
| 1118 | && isPackageUnavailable(pm)) { |
| 1119 | return Resources.getSystem().getDrawable( |
| 1120 | com.android.internal.R.drawable.sym_app_on_sd_unavailable_icon); |
| 1121 | } |
| 1122 | return pm.getDefaultActivityIcon(); |
| 1123 | } |
| 1124 | |
| 1125 | private boolean isPackageUnavailable(PackageManager pm) { |
| 1126 | try { |
| 1127 | return pm.getPackageInfo(packageName, 0) == null; |
| 1128 | } catch (NameNotFoundException ex) { |
| 1129 | return true; |
| 1130 | } |
| 1131 | } |
Jeff Sharkey | d746057 | 2014-07-06 20:44:55 -0700 | [diff] [blame] | 1132 | |
Jeff Brown | 0733079 | 2010-03-30 19:57:08 -0700 | [diff] [blame] | 1133 | /** |
| 1134 | * @hide |
| 1135 | */ |
Fyodor Kupolov | eeea67b | 2015-02-23 17:14:45 -0800 | [diff] [blame] | 1136 | public boolean isForwardLocked() { |
| 1137 | return (privateFlags & ApplicationInfo.PRIVATE_FLAG_FORWARD_LOCK) != 0; |
| 1138 | } |
| 1139 | |
| 1140 | /** |
| 1141 | * @hide |
| 1142 | */ |
Jeff Sharkey | a73b8fd | 2016-01-06 17:02:08 -0700 | [diff] [blame] | 1143 | @TestApi |
Fyodor Kupolov | b94c165 | 2015-03-03 12:25:30 -0800 | [diff] [blame] | 1144 | public boolean isSystemApp() { |
| 1145 | return (flags & ApplicationInfo.FLAG_SYSTEM) != 0; |
| 1146 | } |
| 1147 | |
| 1148 | /** |
| 1149 | * @hide |
| 1150 | */ |
Jeff Sharkey | a73b8fd | 2016-01-06 17:02:08 -0700 | [diff] [blame] | 1151 | @TestApi |
Svet Ganov | adc1cf4 | 2015-06-15 16:36:24 -0700 | [diff] [blame] | 1152 | public boolean isPrivilegedApp() { |
| 1153 | return (privateFlags & ApplicationInfo.PRIVATE_FLAG_PRIVILEGED) != 0; |
| 1154 | } |
| 1155 | |
| 1156 | /** |
| 1157 | * @hide |
| 1158 | */ |
Fyodor Kupolov | b94c165 | 2015-03-03 12:25:30 -0800 | [diff] [blame] | 1159 | public boolean isUpdatedSystemApp() { |
| 1160 | return (flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0; |
| 1161 | } |
| 1162 | |
Jeff Sharkey | e2d45be | 2015-04-15 17:14:12 -0700 | [diff] [blame] | 1163 | /** @hide */ |
| 1164 | public boolean isInternal() { |
| 1165 | return (flags & ApplicationInfo.FLAG_EXTERNAL_STORAGE) == 0; |
| 1166 | } |
| 1167 | |
| 1168 | /** @hide */ |
| 1169 | public boolean isExternalAsec() { |
| 1170 | return TextUtils.isEmpty(volumeUuid) |
| 1171 | && (flags & ApplicationInfo.FLAG_EXTERNAL_STORAGE) != 0; |
| 1172 | } |
| 1173 | |
Jeff Sharkey | f9fc6d6 | 2015-11-08 16:46:05 -0800 | [diff] [blame] | 1174 | /** @hide */ |
Jeff Sharkey | 8a372a0 | 2016-03-16 16:25:45 -0600 | [diff] [blame] | 1175 | public boolean isDefaultToDeviceProtectedStorage() { |
| 1176 | return (privateFlags |
| 1177 | & ApplicationInfo.PRIVATE_FLAG_DEFAULT_TO_DEVICE_PROTECTED_STORAGE) != 0; |
Jeff Sharkey | e469713 | 2016-02-06 19:46:15 -0700 | [diff] [blame] | 1178 | } |
| 1179 | |
| 1180 | /** @hide */ |
Jeff Sharkey | 8a372a0 | 2016-03-16 16:25:45 -0600 | [diff] [blame] | 1181 | public boolean isDirectBootAware() { |
| 1182 | return (privateFlags & ApplicationInfo.PRIVATE_FLAG_DIRECT_BOOT_AWARE) != 0; |
Jeff Sharkey | f9fc6d6 | 2015-11-08 16:46:05 -0800 | [diff] [blame] | 1183 | } |
| 1184 | |
Jeff Sharkey | 8924e87 | 2015-11-30 12:52:10 -0700 | [diff] [blame] | 1185 | /** @hide */ |
Jeff Sharkey | 8a372a0 | 2016-03-16 16:25:45 -0600 | [diff] [blame] | 1186 | public boolean isPartiallyDirectBootAware() { |
| 1187 | return (privateFlags & ApplicationInfo.PRIVATE_FLAG_PARTIALLY_DIRECT_BOOT_AWARE) != 0; |
Jeff Sharkey | 8924e87 | 2015-11-30 12:52:10 -0700 | [diff] [blame] | 1188 | } |
| 1189 | |
Fyodor Kupolov | b94c165 | 2015-03-03 12:25:30 -0800 | [diff] [blame] | 1190 | /** |
| 1191 | * @hide |
| 1192 | */ |
Svet Ganov | 2acf063 | 2015-11-24 19:10:59 -0800 | [diff] [blame] | 1193 | public boolean isEphemeralApp() { |
| 1194 | return (privateFlags & ApplicationInfo.PRIVATE_FLAG_EPHEMERAL) != 0; |
| 1195 | } |
| 1196 | |
| 1197 | /** |
| 1198 | * @hide |
| 1199 | */ |
Fyodor Kupolov | bdbc969 | 2015-12-14 13:11:13 -0800 | [diff] [blame] | 1200 | public boolean isRequiredForSystemUser() { |
| 1201 | return (privateFlags & ApplicationInfo.PRIVATE_FLAG_REQUIRED_FOR_SYSTEM_USER) != 0; |
| 1202 | } |
| 1203 | |
| 1204 | /** |
| 1205 | * @hide |
| 1206 | */ |
Jeff Brown | 0733079 | 2010-03-30 19:57:08 -0700 | [diff] [blame] | 1207 | @Override protected ApplicationInfo getApplicationInfo() { |
| 1208 | return this; |
| 1209 | } |
Jeff Sharkey | d746057 | 2014-07-06 20:44:55 -0700 | [diff] [blame] | 1210 | |
| 1211 | /** {@hide} */ public void setCodePath(String codePath) { scanSourceDir = codePath; } |
| 1212 | /** {@hide} */ public void setBaseCodePath(String baseCodePath) { sourceDir = baseCodePath; } |
| 1213 | /** {@hide} */ public void setSplitCodePaths(String[] splitCodePaths) { splitSourceDirs = splitCodePaths; } |
| 1214 | /** {@hide} */ public void setResourcePath(String resourcePath) { scanPublicSourceDir = resourcePath; } |
| 1215 | /** {@hide} */ public void setBaseResourcePath(String baseResourcePath) { publicSourceDir = baseResourcePath; } |
| 1216 | /** {@hide} */ public void setSplitResourcePaths(String[] splitResourcePaths) { splitPublicSourceDirs = splitResourcePaths; } |
| 1217 | |
| 1218 | /** {@hide} */ public String getCodePath() { return scanSourceDir; } |
| 1219 | /** {@hide} */ public String getBaseCodePath() { return sourceDir; } |
| 1220 | /** {@hide} */ public String[] getSplitCodePaths() { return splitSourceDirs; } |
| 1221 | /** {@hide} */ public String getResourcePath() { return scanPublicSourceDir; } |
| 1222 | /** {@hide} */ public String getBaseResourcePath() { return publicSourceDir; } |
| 1223 | /** {@hide} */ public String[] getSplitResourcePaths() { return splitSourceDirs; } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1224 | } |