blob: ecfc00fc99c8a9dabf6a681dd5efb146632ee308 [file] [log] [blame]
Kenny Root15a4d2f2010-03-11 18:20:12 -08001/*
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 Project9066cfe2009-03-03 19:31:44 -080017package android.content.pm;
18
Jeff Sharkey8a372a02016-03-16 16:25:45 -060019import android.annotation.SystemApi;
Jeff Sharkeya73b8fd2016-01-06 17:02:08 -070020import android.annotation.TestApi;
Jeff Sharkey8a372a02016-03-16 16:25:45 -060021import android.content.Context;
Jeff Brown07330792010-03-30 19:57:08 -070022import android.content.pm.PackageManager.NameNotFoundException;
23import android.content.res.Resources;
24import android.graphics.drawable.Drawable;
Jeff Sharkey15447792015-11-05 16:18:51 -080025import android.os.Environment;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080026import android.os.Parcel;
27import android.os.Parcelable;
Jeff Sharkey15447792015-11-05 16:18:51 -080028import android.os.UserHandle;
Jeff Sharkeye2d45be2015-04-15 17:14:12 -070029import android.text.TextUtils;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080030import android.util.Printer;
31
Jeff Sharkey8a4c9722014-06-16 13:48:42 -070032import com.android.internal.util.ArrayUtils;
33
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080034import java.text.Collator;
Jeff Sharkey8a4c9722014-06-16 13:48:42 -070035import java.util.Arrays;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080036import java.util.Comparator;
Jeff Sharkey8a4c9722014-06-16 13:48:42 -070037import java.util.Objects;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080038
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 */
44public 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 Tate181fafa2009-05-14 11:12:14 -070090 * applications don't specify it in their manifest
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080091 */
92 public String manageSpaceActivityName;
93
94 /**
Christopher Tate181fafa2009-05-14 11:12:14 -070095 * 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 Tate181fafa2009-05-14 11:12:14 -0700100 */
101 public String backupAgentName;
Christopher Tate4a627c72011-04-01 14:43:32 -0700102
103 /**
Matthew Williams303650c2015-04-17 18:22:51 -0700104 * 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 Sharkey8a372a02016-03-16 16:25:45 -0600113 * @see android.content.Context#getNoBackupFilesDir()
114 * @see #FLAG_ALLOW_BACKUP
Christopher Tate98fa6562015-05-14 13:20:10 -0700115 *
116 * @hide
Matthew Williams303650c2015-04-17 18:22:51 -0700117 */
118 public int fullBackupContent = 0;
119
120 /**
Adam Powell269248d2011-08-02 10:26:54 -0700121 * 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 Project9066cfe2009-03-03 19:31:44 -0800128 * 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 &lt;application&gt; 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 &lt;application&gt; 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 &lt;application&gt; tag.
154 */
155 public static final int FLAG_PERSISTENT = 1<<3;
156
157 /**
Christopher Tate181fafa2009-05-14 11:12:14 -0700158 * Value for {@link #flags}: set to true if this application holds the
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800159 * {@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 &lt;application&gt; 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 &lt;application&gt; tag.
175 */
176 public static final int FLAG_ALLOW_CLEAR_USER_DATA = 1<<6;
177
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800178 /**
Dianne Hackborn851a5412009-05-08 12:06:44 -0700179 * Value for {@link #flags}: this is set if this application has been
Kweku Adams8de29ca2016-01-22 12:30:26 -0800180 * installed as an update to a built-in system application.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800181 */
182 public static final int FLAG_UPDATED_SYSTEM_APP = 1<<7;
Dianne Hackborn851a5412009-05-08 12:06:44 -0700183
184 /**
Svet Ganov354cd3c2015-12-17 11:35:04 -0800185 * Value for {@link #flags}: this is set if the application has specified
Dianne Hackborn7f205432009-07-28 00:13:47 -0700186 * {@link android.R.styleable#AndroidManifestApplication_testOnly
187 * android:testOnly} to be true.
Dianne Hackborn851a5412009-05-08 12:06:44 -0700188 */
Dianne Hackborna96cbb42009-05-13 15:06:13 -0700189 public static final int FLAG_TEST_ONLY = 1<<8;
Dianne Hackbornade3eca2009-05-11 18:54:45 -0700190
191 /**
Dianne Hackborn5c1e00b2009-06-18 17:10:57 -0700192 * Value for {@link #flags}: true when the application's window can be
Dianne Hackborn723738c2009-06-25 19:48:04 -0700193 * reduced in size for smaller screens. Corresponds to
194 * {@link android.R.styleable#AndroidManifestSupportsScreens_smallScreens
195 * android:smallScreens}.
Dianne Hackborn5c1e00b2009-06-18 17:10:57 -0700196 */
Dianne Hackborn723738c2009-06-25 19:48:04 -0700197 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 Hackborn22ec9ab2010-04-29 17:56:03 -0700211 * android:largeScreens}.
Dianne Hackborn723738c2009-06-25 19:48:04 -0700212 */
213 public static final int FLAG_SUPPORTS_LARGE_SCREENS = 1<<11;
Dianne Hackborn5c1e00b2009-06-18 17:10:57 -0700214
215 /**
Dianne Hackbornc4db95c2009-07-21 17:46:02 -0700216 * 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 Hackborn11b822d2009-07-21 20:03:02 -0700224 * 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 Cheng23085b72010-02-08 16:06:32 -0800232 * 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 Chengef3f5dd2010-03-29 15:47:26 -0700234 * {@link android.R.styleable#AndroidManifestApplication_vmSafeMode
235 * android:vmSafeMode} of the &lt;application&gt; tag.
Ben Cheng23085b72010-02-08 16:06:32 -0800236 */
237 public static final int FLAG_VM_SAFE_MODE = 1<<14;
238
239 /**
Christopher Tate3de55bc2010-03-12 17:28:08 -0800240 * 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 Tate181fafa2009-05-14 11:12:14 -0700242 *
Christopher Tate3de55bc2010-03-12 17:28:08 -0800243 * <p>Comes from the
244 * {@link android.R.styleable#AndroidManifestApplication_allowBackup android:allowBackup}
245 * attribute of the &lt;application&gt; tag.
Christopher Tate181fafa2009-05-14 11:12:14 -0700246 */
Ben Cheng23085b72010-02-08 16:06:32 -0800247 public static final int FLAG_ALLOW_BACKUP = 1<<15;
Christopher Tate5e1ab332009-09-01 20:32:49 -0700248
249 /**
Christopher Tate3de55bc2010-03-12 17:28:08 -0800250 * 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 Tate5e1ab332009-09-01 20:32:49 -0700255 *
Christopher Tate3de55bc2010-03-12 17:28:08 -0800256 * <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 Tate5e1ab332009-09-01 20:32:49 -0700260 * is specified, this flag will be ignored.
261 *
Christopher Tate3de55bc2010-03-12 17:28:08 -0800262 * <p>Comes from the
263 * {@link android.R.styleable#AndroidManifestApplication_killAfterRestore android:killAfterRestore}
264 * attribute of the &lt;application&gt; tag.
Christopher Tate5e1ab332009-09-01 20:32:49 -0700265 */
Ben Cheng23085b72010-02-08 16:06:32 -0800266 public static final int FLAG_KILL_AFTER_RESTORE = 1<<16;
Christopher Tate5e1ab332009-09-01 20:32:49 -0700267
268 /**
Christopher Tate3de55bc2010-03-12 17:28:08 -0800269 * 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 Tate5e1ab332009-09-01 20:32:49 -0700275 *
Christopher Tate3de55bc2010-03-12 17:28:08 -0800276 * <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 Tate5e1ab332009-09-01 20:32:49 -0700280 * is specified, this flag will be ignored.
281 *
Christopher Tate3de55bc2010-03-12 17:28:08 -0800282 * <p>Comes from the
283 * {@link android.R.styleable#AndroidManifestApplication_restoreAnyVersion android:restoreAnyVersion}
284 * attribute of the &lt;application&gt; tag.
Christopher Tate5e1ab332009-09-01 20:32:49 -0700285 */
Christopher Tate3de55bc2010-03-12 17:28:08 -0800286 public static final int FLAG_RESTORE_ANY_VERSION = 1<<17;
Christopher Tate5e1ab332009-09-01 20:32:49 -0700287
Christopher Tate181fafa2009-05-14 11:12:14 -0700288 /**
Dianne Hackborn3202d382010-04-26 17:51:34 -0700289 * 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 Amalapurapuaf8e9f42010-01-12 10:17:28 -0800295 */
Dianne Hackborn94c567e2010-04-26 18:13:10 -0700296 public static final int FLAG_EXTERNAL_STORAGE = 1<<18;
Suchi Amalapurapuaf8e9f42010-01-12 10:17:28 -0800297
298 /**
Dianne Hackborn14cee9f2010-04-23 17:51:26 -0700299 * 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 Hackborn22ec9ab2010-04-29 17:56:03 -0700302 * android:xlargeScreens}.
Dianne Hackborn14cee9f2010-04-23 17:51:26 -0700303 */
304 public static final int FLAG_SUPPORTS_XLARGE_SCREENS = 1<<19;
305
306 /**
Dianne Hackborn3b81bc12011-01-15 11:50:52 -0800307 * 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 parksa3cdaa52011-01-13 14:15:43 -0600311 */
Dianne Hackborn3b81bc12011-01-15 11:50:52 -0800312 public static final int FLAG_LARGE_HEAP = 1<<20;
Jason parksa3cdaa52011-01-13 14:15:43 -0600313
314 /**
Dianne Hackborne7f97212011-02-24 14:40:20 -0800315 * 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 Meglio59dfce82012-04-02 16:17:20 -0700321 * 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 Hackborn7767eac2012-08-23 18:25:40 -0700332 * 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 Hackborn5e03e2c2012-09-06 14:21:19 -0700338 * 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 Lima12d0b4c2014-03-14 16:55:12 -0700345 * 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 Tated1de2562014-06-17 17:12:35 -0700351 * 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 Klyubin01a959d2015-03-18 10:05:45 -0700360 * 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 Klyubinfbf45992015-04-21 13:44:29 -0700364 * {@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 Brubaker2df5ba72016-04-11 13:31:24 -0700369 * <p>This flag is ignored on Android N and above if an Android Network Security Config is
370 * present.
371 *
Alex Klyubinfbf45992015-04-21 13:44:29 -0700372 * <p>This flag comes from
373 * {@link android.R.styleable#AndroidManifestApplication_usesCleartextTraffic
374 * android:usesCleartextTraffic} of the &lt;application&gt; tag.
Alex Klyubin01a959d2015-03-18 10:05:45 -0700375 */
376 public static final int FLAG_USES_CLEARTEXT_TRAFFIC = 1<<27;
377
378 /**
Dmitriy Ivanovff193d62014-09-30 15:10:48 -0700379 * When set installer extracts native libs from .apk files.
380 */
381 public static final int FLAG_EXTRACT_NATIVE_LIBS = 1<<28;
382
383 /**
Alan Viveretted70b9e72015-05-27 14:29:20 -0700384 * 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 Stingaceanu1e283912015-11-26 15:26:28 +0000390 * 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 Kamath589a1bc2014-07-03 14:43:26 +0100396 * 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 Yamasani655d0e22013-06-12 14:19:10 -0700407
408 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800409 * 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 Hackborn851a5412009-05-08 12:06:44 -0700413 * {@link #FLAG_ALLOW_CLEAR_USER_DATA}, {@link #FLAG_UPDATED_SYSTEM_APP},
Dianne Hackborn723738c2009-06-25 19:48:04 -0700414 * {@link #FLAG_TEST_ONLY}, {@link #FLAG_SUPPORTS_SMALL_SCREENS},
415 * {@link #FLAG_SUPPORTS_NORMAL_SCREENS},
Dianne Hackborn14cee9f2010-04-23 17:51:26 -0700416 * {@link #FLAG_SUPPORTS_LARGE_SCREENS}, {@link #FLAG_SUPPORTS_XLARGE_SCREENS},
417 * {@link #FLAG_RESIZEABLE_FOR_SCREENS},
Dianne Hackborn7767eac2012-08-23 18:25:40 -0700418 * {@link #FLAG_SUPPORTS_SCREEN_DENSITIES}, {@link #FLAG_VM_SAFE_MODE},
Alex Klyubinb9f8a522015-02-03 11:12:59 -0800419 * {@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 Klyubin7cb000f2015-03-26 11:00:04 -0700424 * {@link #FLAG_FULL_BACKUP_ONLY}, {@link #FLAG_USES_CLEARTEXT_TRAFFIC},
425 * {@link #FLAG_MULTIARCH}.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800426 */
427 public int flags = 0;
Amith Yamasani655d0e22013-06-12 14:19:10 -0700428
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800429 /**
Alex Klyubinb9f8a522015-02-03 11:12:59 -0800430 * 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 &lt;application&gt; 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 Ganov2acf0632015-11-24 19:10:59 -0800468 * 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 Megliod3d8a322015-04-01 15:58:47 -0700470 *
471 * {@hide}
472 */
473 public static final int PRIVATE_FLAG_HAS_DOMAIN_URLS = 1<<4;
474
475 /**
Jeff Sharkey8a372a02016-03-16 16:25:45 -0600476 * When set, the default data storage directory for this app is pointed at
477 * the device-protected location.
Jeff Sharkey15447792015-11-05 16:18:51 -0800478 *
479 * @hide
480 */
Jeff Sharkey8a372a02016-03-16 16:25:45 -0600481 public static final int PRIVATE_FLAG_DEFAULT_TO_DEVICE_PROTECTED_STORAGE = 1 << 5;
Jeff Sharkey15447792015-11-05 16:18:51 -0800482
483 /**
Jeff Sharkey8a372a02016-03-16 16:25:45 -0600484 * When set, assume that all components under the given app are direct boot
Jeff Sharkeyf9fc6d62015-11-08 16:46:05 -0800485 * aware, unless otherwise specified.
486 *
487 * @hide
488 */
Jeff Sharkey8a372a02016-03-16 16:25:45 -0600489 public static final int PRIVATE_FLAG_DIRECT_BOOT_AWARE = 1 << 6;
Jeff Sharkeyf9fc6d62015-11-08 16:46:05 -0800490
491 /**
Jeff Vander Stoepa4407bf2015-10-30 13:15:58 -0700492 * Value for {@link #privateFlags}: set to {@code true} if the application
493 * is AutoPlay.
494 *
495 * {@hide}
496 */
Jeff Vander Stoep9edb7bf2015-11-16 15:23:38 -0800497 public static final int PRIVATE_FLAG_AUTOPLAY = 1 << 7;
Jeff Vander Stoepa4407bf2015-10-30 13:15:58 -0700498
499 /**
Jeff Sharkey8a372a02016-03-16 16:25:45 -0600500 * When set, at least one component inside this application is direct boot
501 * aware.
Jeff Sharkey8924e872015-11-30 12:52:10 -0700502 *
503 * @hide
504 */
Jeff Sharkey8a372a02016-03-16 16:25:45 -0600505 public static final int PRIVATE_FLAG_PARTIALLY_DIRECT_BOOT_AWARE = 1 << 8;
Jeff Sharkey8924e872015-11-30 12:52:10 -0700506
507 /**
Fyodor Kupolovf99104d2015-12-14 11:31:29 -0800508 * Value for {@link #flags}: {@code true} if the application is blocked via restrictions
509 * and for most purposes is considered as not installed.
510 * {@hide}
511 */
512 public static final int PRIVATE_FLAG_EPHEMERAL = 1 << 9;
513
514 /**
Fyodor Kupolovbdbc9692015-12-14 13:11:13 -0800515 * When set, signals that the application is required for the system user and should not be
516 * uninstalled.
517 *
518 * @hide
519 */
520 public static final int PRIVATE_FLAG_REQUIRED_FOR_SYSTEM_USER = 1 << 10;
521
522 /**
Wale Ogunwale72a73e32016-10-13 12:16:39 -0700523 * When set, the application explicitly requested that its activities by resizeable by default.
Wale Ogunwale6afdf912016-01-30 13:01:33 -0800524 * @see android.R.styleable#AndroidManifestActivity_resizeableActivity
525 *
526 * @hide
527 */
Wale Ogunwale72a73e32016-10-13 12:16:39 -0700528 public static final int PRIVATE_FLAG_RESIZEABLE_ACTIVITIES_EXPLICITLY_SET = 1 << 11;
529
530 /**
531 * The application isn't requesting explicitly requesting for its activities to be resizeable or
532 * non-resizeable by default. So, we are making it activities resizeable by default based on the
533 * target SDK version of the app.
534 * @see android.R.styleable#AndroidManifestActivity_resizeableActivity
535 *
536 * NOTE: This only affects apps with target SDK >= N where the resizeableActivity attribute was
537 * introduced. It shouldn't be confused with {@link ActivityInfo#RESIZE_MODE_FORCE_RESIZEABLE}
538 * where certain pre-N apps are forced to the resizeable.
539 *
540 * @hide
541 */
542 public static final int PRIVATE_FLAG_RESIZEABLE_ACTIVITIES_VIA_SDK_VERSION = 1 << 12;
Wale Ogunwale6afdf912016-01-30 13:01:33 -0800543
544 /**
Christopher Tate43fbc5f2016-02-17 18:00:48 -0800545 * Value for {@link #privateFlags}: {@code true} means the OS should go ahead and
546 * run full-data backup operations for the app even when it is in a
547 * foreground-equivalent run state. Defaults to {@code false} if unspecified.
548 * @hide
549 */
Wale Ogunwale72a73e32016-10-13 12:16:39 -0700550 public static final int PRIVATE_FLAG_BACKUP_IN_FOREGROUND = 1 << 13;
Christopher Tate43fbc5f2016-02-17 18:00:48 -0800551
552 /**
Alex Klyubinb9f8a522015-02-03 11:12:59 -0800553 * Private/hidden flags. See {@code PRIVATE_FLAG_...} constants.
554 * {@hide}
555 */
556 public int privateFlags;
557
558 /**
Dianne Hackborndf6e9802011-05-26 14:20:23 -0700559 * The required smallest screen width the application can run on. If 0,
560 * nothing has been specified. Comes from
561 * {@link android.R.styleable#AndroidManifestSupportsScreens_requiresSmallestWidthDp
562 * android:requiresSmallestWidthDp} attribute of the &lt;supports-screens&gt; tag.
563 */
564 public int requiresSmallestWidthDp = 0;
565
566 /**
567 * The maximum smallest screen width the application is designed for. If 0,
568 * nothing has been specified. Comes from
569 * {@link android.R.styleable#AndroidManifestSupportsScreens_compatibleWidthLimitDp
570 * android:compatibleWidthLimitDp} attribute of the &lt;supports-screens&gt; tag.
571 */
572 public int compatibleWidthLimitDp = 0;
573
574 /**
Dianne Hackborn2762ff32011-06-01 21:27:05 -0700575 * The maximum smallest screen width the application will work on. If 0,
576 * nothing has been specified. Comes from
577 * {@link android.R.styleable#AndroidManifestSupportsScreens_largestWidthLimitDp
578 * android:largestWidthLimitDp} attribute of the &lt;supports-screens&gt; tag.
579 */
580 public int largestWidthLimitDp = 0;
581
Jeff Sharkeyd7460572014-07-06 20:44:55 -0700582 /** {@hide} */
Jeff Sharkeyb2b9ab82015-04-05 21:10:42 -0700583 public String volumeUuid;
584 /** {@hide} */
Jeff Sharkeyd7460572014-07-06 20:44:55 -0700585 public String scanSourceDir;
586 /** {@hide} */
587 public String scanPublicSourceDir;
588
Dianne Hackborn2762ff32011-06-01 21:27:05 -0700589 /**
Jeff Sharkey8a4c9722014-06-16 13:48:42 -0700590 * Full path to the base APK for this application.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800591 */
592 public String sourceDir;
593
594 /**
Jeff Sharkey8a4c9722014-06-16 13:48:42 -0700595 * Full path to the publicly available parts of {@link #sourceDir},
596 * including resources and manifest. This may be different from
597 * {@link #sourceDir} if an application is forward locked.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800598 */
599 public String publicSourceDir;
Jeff Sharkey8a4c9722014-06-16 13:48:42 -0700600
601 /**
602 * Full paths to zero or more split APKs that, when combined with the base
603 * APK defined in {@link #sourceDir}, form a complete application.
604 */
605 public String[] splitSourceDirs;
606
607 /**
608 * Full path to the publicly available parts of {@link #splitSourceDirs},
609 * including resources and manifest. This may be different from
610 * {@link #splitSourceDirs} if an application is forward locked.
611 */
612 public String[] splitPublicSourceDirs;
613
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800614 /**
Kenny Rootd1ab0162010-01-21 17:27:14 -0800615 * Full paths to the locations of extra resource packages this application
616 * uses. This field is only used if there are extra resource packages,
617 * otherwise it is null.
Kenny Rootace5a3f2010-02-05 12:59:28 -0800618 *
619 * {@hide}
Kenny Rootd1ab0162010-01-21 17:27:14 -0800620 */
621 public String[] resourceDirs;
622
623 /**
Robert Craig0f40dc92013-03-25 06:33:03 -0400624 * String retrieved from the seinfo tag found in selinux policy. This value
Robert Craig5e16bc52015-08-28 12:11:41 -0400625 * can be overridden with a value set through the mac_permissions.xml policy
626 * construct. This value is useful in setting an SELinux security context on
627 * the process as well as its data directory. The String default is being used
628 * here to represent a catchall label when no policy matches.
Robert Craig0f40dc92013-03-25 06:33:03 -0400629 *
630 * {@hide}
631 */
Robert Craig5e16bc52015-08-28 12:11:41 -0400632 public String seinfo = "default";
Robert Craig0f40dc92013-03-25 06:33:03 -0400633
634 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800635 * Paths to all shared libraries this application is linked against. This
636 * field is only set if the {@link PackageManager#GET_SHARED_LIBRARY_FILES
637 * PackageManager.GET_SHARED_LIBRARY_FILES} flag was used when retrieving
638 * the structure.
639 */
640 public String[] sharedLibraryFiles;
641
642 /**
Jeff Sharkey7a30a302015-12-08 14:20:06 -0700643 * Full path to the default directory assigned to the package for its
644 * persistent data.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800645 */
646 public String dataDir;
Kenny Root85387d72010-08-26 10:13:11 -0700647
Jeff Sharkey7a30a302015-12-08 14:20:06 -0700648 /**
Jeff Sharkey8a372a02016-03-16 16:25:45 -0600649 * Full path to the device-protected directory assigned to the package for
Jeff Sharkey7a30a302015-12-08 14:20:06 -0700650 * its persistent data.
Jeff Sharkey8a372a02016-03-16 16:25:45 -0600651 *
652 * @see Context#createDeviceProtectedStorageContext()
Jeff Sharkey7a30a302015-12-08 14:20:06 -0700653 */
Jeff Sharkey8a372a02016-03-16 16:25:45 -0600654 public String deviceProtectedDataDir;
655
656 /** @removed */
657 @Deprecated
Jeff Sharkey15447792015-11-05 16:18:51 -0800658 public String deviceEncryptedDataDir;
Jeff Sharkey7a30a302015-12-08 14:20:06 -0700659
660 /**
Jeff Sharkey8a372a02016-03-16 16:25:45 -0600661 * Full path to the credential-protected directory assigned to the package
Jeff Sharkey7a30a302015-12-08 14:20:06 -0700662 * for its persistent data.
Jeff Sharkey8a372a02016-03-16 16:25:45 -0600663 *
664 * @hide
Jeff Sharkey7a30a302015-12-08 14:20:06 -0700665 */
Jeff Sharkey8a372a02016-03-16 16:25:45 -0600666 @SystemApi
667 public String credentialProtectedDataDir;
668
669 /** @removed */
670 @Deprecated
Jeff Sharkey15447792015-11-05 16:18:51 -0800671 public String credentialEncryptedDataDir;
672
Kenny Root85387d72010-08-26 10:13:11 -0700673 /**
674 * Full path to the directory where native JNI libraries are stored.
Kenny Root85387d72010-08-26 10:13:11 -0700675 */
676 public String nativeLibraryDir;
677
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800678 /**
Narayan Kamath7dba6eb2014-07-16 08:53:30 +0100679 * Full path where unpacked native libraries for {@link #secondaryCpuAbi}
680 * are stored, if present.
681 *
682 * The main reason this exists is for bundled multi-arch apps, where
683 * it's not trivial to calculate the location of libs for the secondary abi
684 * given the location of the primary.
685 *
686 * TODO: Change the layout of bundled installs so that we can use
687 * nativeLibraryRootDir & nativeLibraryRootRequiresIsa there as well.
688 * (e.g {@code [ "/system/app-lib/Foo/arm", "/system/app-lib/Foo/arm64" ]}
689 * instead of {@code [ "/system/lib/Foo", "/system/lib64/Foo" ]}.
690 *
691 * @hide
692 */
693 public String secondaryNativeLibraryDir;
694
695 /**
Jeff Sharkey84f12942014-07-10 17:48:11 -0700696 * The root path where unpacked native libraries are stored.
697 * <p>
698 * When {@link #nativeLibraryRootRequiresIsa} is set, the libraries are
699 * placed in ISA-specific subdirectories under this path, otherwise the
700 * libraries are placed directly at this path.
Narayan Kamathff110bd2014-07-04 18:30:45 +0100701 *
Jeff Sharkey84f12942014-07-10 17:48:11 -0700702 * @hide
Narayan Kamathff110bd2014-07-04 18:30:45 +0100703 */
Jeff Sharkey84f12942014-07-10 17:48:11 -0700704 public String nativeLibraryRootDir;
705
706 /**
707 * Flag indicating that ISA must be appended to
708 * {@link #nativeLibraryRootDir} to be useful.
709 *
710 * @hide
711 */
712 public boolean nativeLibraryRootRequiresIsa;
Narayan Kamathff110bd2014-07-04 18:30:45 +0100713
714 /**
715 * The primary ABI that this application requires, This is inferred from the ABIs
Ramin Zaghiff0c4702014-04-01 15:02:29 +0100716 * of the native JNI libraries the application bundles. Will be {@code null}
717 * if this application does not require any particular ABI.
718 *
Narayan Kamathff110bd2014-07-04 18:30:45 +0100719 * If non-null, the application will always be launched with this ABI.
720 *
Ramin Zaghiff0c4702014-04-01 15:02:29 +0100721 * {@hide}
722 */
Narayan Kamathff110bd2014-07-04 18:30:45 +0100723 public String primaryCpuAbi;
724
725 /**
726 * The secondary ABI for this application. Might be non-null for multi-arch
727 * installs. The application itself never uses this ABI, but other applications that
728 * use its code might.
729 *
730 * {@hide}
731 */
732 public String secondaryCpuAbi;
733
734 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800735 * The kernel user-ID that has been assigned to this application;
736 * currently this is not a unique ID (multiple applications can have
737 * the same uid).
738 */
739 public int uid;
740
Mitsuru Oshima8d112672009-04-27 12:01:23 -0700741 /**
Todd Kennedy89d60182016-03-11 11:18:32 -0800742 * The minimum SDK version this application can run on. It will not run
743 * on earlier versions.
744 */
Todd Kennedy6e2e7f52016-05-02 14:56:45 -0700745 public int minSdkVersion;
Todd Kennedy89d60182016-03-11 11:18:32 -0800746
747 /**
Dianne Hackborn3b3e1452009-09-24 19:22:12 -0700748 * The minimum SDK version this application targets. It may run on earlier
Dianne Hackborna96cbb42009-05-13 15:06:13 -0700749 * versions, but it knows how to work with any new behavior added at this
750 * version. Will be {@link android.os.Build.VERSION_CODES#CUR_DEVELOPMENT}
751 * if this is a development build and the app is targeting that. You should
752 * compare that this number is >= the SDK version number at which your
753 * behavior was introduced.
754 */
755 public int targetSdkVersion;
Dianne Hackborn8472e612014-01-23 17:57:20 -0800756
757 /**
758 * The app's declared version code.
759 * @hide
760 */
761 public int versionCode;
762
Dianne Hackborna96cbb42009-05-13 15:06:13 -0700763 /**
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800764 * When false, indicates that all components within this application are
765 * considered disabled, regardless of their individually set enabled status.
766 */
767 public boolean enabled = true;
768
Dianne Hackborn54e570f2010-10-04 18:32:32 -0700769 /**
Dianne Hackborn0ac30312011-06-17 14:49:23 -0700770 * For convenient access to the current enabled setting of this app.
771 * @hide
772 */
773 public int enabledSetting = PackageManager.COMPONENT_ENABLED_STATE_DEFAULT;
774
775 /**
Dianne Hackborn54e570f2010-10-04 18:32:32 -0700776 * For convenient access to package's install location.
777 * @hide
778 */
779 public int installLocation = PackageInfo.INSTALL_LOCATION_UNSPECIFIED;
Jose Lima12d0b4c2014-03-14 16:55:12 -0700780
Chad Brubakerc845b2a2016-05-13 14:09:27 -0700781 /**
782 * Resource file providing the application's Network Security Config.
783 * @hide
784 */
785 public int networkSecurityConfigRes;
786
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800787 public void dump(Printer pw, String prefix) {
Dianne Hackborn6ac42ae2015-12-08 17:22:10 -0800788 dump(pw, prefix, DUMP_FLAG_ALL);
789 }
790
791 /** @hide */
792 public void dump(Printer pw, String prefix, int flags) {
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800793 super.dumpFront(pw, prefix);
Dianne Hackborn6ac42ae2015-12-08 17:22:10 -0800794 if ((flags&DUMP_FLAG_DETAILS) != 0 && className != null) {
Dianne Hackborn12527f92009-11-11 17:39:50 -0800795 pw.println(prefix + "className=" + className);
796 }
797 if (permission != null) {
798 pw.println(prefix + "permission=" + permission);
799 }
Dianne Hackborn39792d22010-08-19 18:01:52 -0700800 pw.println(prefix + "processName=" + processName);
Dianne Hackborn6ac42ae2015-12-08 17:22:10 -0800801 if ((flags&DUMP_FLAG_DETAILS) != 0) {
802 pw.println(prefix + "taskAffinity=" + taskAffinity);
803 }
Dianne Hackborn39792d22010-08-19 18:01:52 -0700804 pw.println(prefix + "uid=" + uid + " flags=0x" + Integer.toHexString(flags)
Alex Klyubinb9f8a522015-02-03 11:12:59 -0800805 + " privateFlags=0x" + Integer.toHexString(privateFlags)
Dianne Hackborn39792d22010-08-19 18:01:52 -0700806 + " theme=0x" + Integer.toHexString(theme));
Dianne Hackborn6ac42ae2015-12-08 17:22:10 -0800807 if ((flags&DUMP_FLAG_DETAILS) != 0) {
808 pw.println(prefix + "requiresSmallestWidthDp=" + requiresSmallestWidthDp
809 + " compatibleWidthLimitDp=" + compatibleWidthLimitDp
810 + " largestWidthLimitDp=" + largestWidthLimitDp);
811 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800812 pw.println(prefix + "sourceDir=" + sourceDir);
Jeff Sharkey8a4c9722014-06-16 13:48:42 -0700813 if (!Objects.equals(sourceDir, publicSourceDir)) {
Dianne Hackborn39792d22010-08-19 18:01:52 -0700814 pw.println(prefix + "publicSourceDir=" + publicSourceDir);
815 }
Jeff Sharkey8a4c9722014-06-16 13:48:42 -0700816 if (!ArrayUtils.isEmpty(splitSourceDirs)) {
817 pw.println(prefix + "splitSourceDirs=" + Arrays.toString(splitSourceDirs));
818 }
819 if (!ArrayUtils.isEmpty(splitPublicSourceDirs)
820 && !Arrays.equals(splitSourceDirs, splitPublicSourceDirs)) {
821 pw.println(prefix + "splitPublicSourceDirs=" + Arrays.toString(splitPublicSourceDirs));
822 }
Dianne Hackborn39792d22010-08-19 18:01:52 -0700823 if (resourceDirs != null) {
Andreas Gampee6748ce2015-12-11 18:00:38 -0800824 pw.println(prefix + "resourceDirs=" + Arrays.toString(resourceDirs));
Dianne Hackborn39792d22010-08-19 18:01:52 -0700825 }
Dianne Hackborn6ac42ae2015-12-08 17:22:10 -0800826 if ((flags&DUMP_FLAG_DETAILS) != 0 && seinfo != null) {
Robert Craig0f40dc92013-03-25 06:33:03 -0400827 pw.println(prefix + "seinfo=" + seinfo);
828 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800829 pw.println(prefix + "dataDir=" + dataDir);
Dianne Hackborn6ac42ae2015-12-08 17:22:10 -0800830 if ((flags&DUMP_FLAG_DETAILS) != 0) {
Jeff Sharkey8a372a02016-03-16 16:25:45 -0600831 pw.println(prefix + "deviceProtectedDataDir=" + deviceProtectedDataDir);
832 pw.println(prefix + "credentialProtectedDataDir=" + credentialProtectedDataDir);
Dianne Hackborn6ac42ae2015-12-08 17:22:10 -0800833 if (sharedLibraryFiles != null) {
834 pw.println(prefix + "sharedLibraryFiles=" + Arrays.toString(sharedLibraryFiles));
835 }
Dianne Hackborn12527f92009-11-11 17:39:50 -0800836 }
Todd Kennedy89d60182016-03-11 11:18:32 -0800837 pw.println(prefix + "enabled=" + enabled
838 + " minSdkVersion=" + minSdkVersion
839 + " targetSdkVersion=" + targetSdkVersion
Dianne Hackborn8472e612014-01-23 17:57:20 -0800840 + " versionCode=" + versionCode);
Dianne Hackborn6ac42ae2015-12-08 17:22:10 -0800841 if ((flags&DUMP_FLAG_DETAILS) != 0) {
842 if (manageSpaceActivityName != null) {
843 pw.println(prefix + "manageSpaceActivityName=" + manageSpaceActivityName);
844 }
845 if (descriptionRes != 0) {
846 pw.println(prefix + "description=0x" + Integer.toHexString(descriptionRes));
847 }
848 if (uiOptions != 0) {
849 pw.println(prefix + "uiOptions=0x" + Integer.toHexString(uiOptions));
850 }
851 pw.println(prefix + "supportsRtl=" + (hasRtlSupport() ? "true" : "false"));
852 if (fullBackupContent > 0) {
853 pw.println(prefix + "fullBackupContent=@xml/" + fullBackupContent);
854 } else {
855 pw.println(prefix + "fullBackupContent="
856 + (fullBackupContent < 0 ? "false" : "true"));
857 }
Chad Brubakerc845b2a2016-05-13 14:09:27 -0700858 if (networkSecurityConfigRes != 0) {
859 pw.println(prefix + "networkSecurityConfigRes=0x"
860 + Integer.toHexString(networkSecurityConfigRes));
861 }
Matthew Williams303650c2015-04-17 18:22:51 -0700862 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800863 super.dumpBack(pw, prefix);
864 }
Fabrice Di Meglio59dfce82012-04-02 16:17:20 -0700865
866 /**
867 * @return true if "supportsRtl" has been set to true in the AndroidManifest
868 * @hide
869 */
870 public boolean hasRtlSupport() {
871 return (flags & FLAG_SUPPORTS_RTL) == FLAG_SUPPORTS_RTL;
872 }
Jeff Sharkeyba75a9b2016-01-07 11:51:33 -0700873
874 /** {@hide} */
875 public boolean hasCode() {
876 return (flags & FLAG_HAS_CODE) != 0;
877 }
878
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800879 public static class DisplayNameComparator
880 implements Comparator<ApplicationInfo> {
881 public DisplayNameComparator(PackageManager pm) {
882 mPM = pm;
883 }
884
885 public final int compare(ApplicationInfo aa, ApplicationInfo ab) {
886 CharSequence sa = mPM.getApplicationLabel(aa);
887 if (sa == null) {
888 sa = aa.packageName;
889 }
890 CharSequence sb = mPM.getApplicationLabel(ab);
891 if (sb == null) {
892 sb = ab.packageName;
893 }
894
895 return sCollator.compare(sa.toString(), sb.toString());
896 }
897
898 private final Collator sCollator = Collator.getInstance();
899 private PackageManager mPM;
900 }
901
902 public ApplicationInfo() {
903 }
904
905 public ApplicationInfo(ApplicationInfo orig) {
906 super(orig);
907 taskAffinity = orig.taskAffinity;
908 permission = orig.permission;
909 processName = orig.processName;
910 className = orig.className;
911 theme = orig.theme;
912 flags = orig.flags;
Alex Klyubinb9f8a522015-02-03 11:12:59 -0800913 privateFlags = orig.privateFlags;
Dianne Hackborndf6e9802011-05-26 14:20:23 -0700914 requiresSmallestWidthDp = orig.requiresSmallestWidthDp;
915 compatibleWidthLimitDp = orig.compatibleWidthLimitDp;
Dianne Hackborn2762ff32011-06-01 21:27:05 -0700916 largestWidthLimitDp = orig.largestWidthLimitDp;
Jeff Sharkeyb2b9ab82015-04-05 21:10:42 -0700917 volumeUuid = orig.volumeUuid;
Jeff Sharkey7f1a57a2014-10-08 10:14:53 -0700918 scanSourceDir = orig.scanSourceDir;
919 scanPublicSourceDir = orig.scanPublicSourceDir;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800920 sourceDir = orig.sourceDir;
921 publicSourceDir = orig.publicSourceDir;
Jeff Sharkey8a4c9722014-06-16 13:48:42 -0700922 splitSourceDirs = orig.splitSourceDirs;
923 splitPublicSourceDirs = orig.splitPublicSourceDirs;
Kenny Root85387d72010-08-26 10:13:11 -0700924 nativeLibraryDir = orig.nativeLibraryDir;
Narayan Kamath7dba6eb2014-07-16 08:53:30 +0100925 secondaryNativeLibraryDir = orig.secondaryNativeLibraryDir;
Jeff Sharkey84f12942014-07-10 17:48:11 -0700926 nativeLibraryRootDir = orig.nativeLibraryRootDir;
927 nativeLibraryRootRequiresIsa = orig.nativeLibraryRootRequiresIsa;
Narayan Kamathff110bd2014-07-04 18:30:45 +0100928 primaryCpuAbi = orig.primaryCpuAbi;
929 secondaryCpuAbi = orig.secondaryCpuAbi;
Kenny Rootd1ab0162010-01-21 17:27:14 -0800930 resourceDirs = orig.resourceDirs;
Robert Craig0f40dc92013-03-25 06:33:03 -0400931 seinfo = orig.seinfo;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800932 sharedLibraryFiles = orig.sharedLibraryFiles;
933 dataDir = orig.dataDir;
Jeff Sharkey8a372a02016-03-16 16:25:45 -0600934 deviceEncryptedDataDir = deviceProtectedDataDir = orig.deviceProtectedDataDir;
935 credentialEncryptedDataDir = credentialProtectedDataDir = orig.credentialProtectedDataDir;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800936 uid = orig.uid;
Todd Kennedy89d60182016-03-11 11:18:32 -0800937 minSdkVersion = orig.minSdkVersion;
Dianne Hackborna96cbb42009-05-13 15:06:13 -0700938 targetSdkVersion = orig.targetSdkVersion;
Dianne Hackborn8472e612014-01-23 17:57:20 -0800939 versionCode = orig.versionCode;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800940 enabled = orig.enabled;
Dianne Hackborn0ac30312011-06-17 14:49:23 -0700941 enabledSetting = orig.enabledSetting;
Dianne Hackborn54e570f2010-10-04 18:32:32 -0700942 installLocation = orig.installLocation;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800943 manageSpaceActivityName = orig.manageSpaceActivityName;
944 descriptionRes = orig.descriptionRes;
Adam Powell269248d2011-08-02 10:26:54 -0700945 uiOptions = orig.uiOptions;
Christopher Tatebcb02552012-10-16 17:14:34 -0700946 backupAgentName = orig.backupAgentName;
Matthew Williams303650c2015-04-17 18:22:51 -0700947 fullBackupContent = orig.fullBackupContent;
Chad Brubakerc845b2a2016-05-13 14:09:27 -0700948 networkSecurityConfigRes = orig.networkSecurityConfigRes;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800949 }
950
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800951 public String toString() {
952 return "ApplicationInfo{"
953 + Integer.toHexString(System.identityHashCode(this))
954 + " " + packageName + "}";
955 }
956
957 public int describeContents() {
958 return 0;
959 }
960
961 public void writeToParcel(Parcel dest, int parcelableFlags) {
962 super.writeToParcel(dest, parcelableFlags);
963 dest.writeString(taskAffinity);
964 dest.writeString(permission);
965 dest.writeString(processName);
966 dest.writeString(className);
967 dest.writeInt(theme);
968 dest.writeInt(flags);
Alex Klyubinb9f8a522015-02-03 11:12:59 -0800969 dest.writeInt(privateFlags);
Dianne Hackborndf6e9802011-05-26 14:20:23 -0700970 dest.writeInt(requiresSmallestWidthDp);
971 dest.writeInt(compatibleWidthLimitDp);
Dianne Hackborn2762ff32011-06-01 21:27:05 -0700972 dest.writeInt(largestWidthLimitDp);
Jeff Sharkeyb2b9ab82015-04-05 21:10:42 -0700973 dest.writeString(volumeUuid);
Jeff Sharkey7f1a57a2014-10-08 10:14:53 -0700974 dest.writeString(scanSourceDir);
975 dest.writeString(scanPublicSourceDir);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800976 dest.writeString(sourceDir);
977 dest.writeString(publicSourceDir);
Jeff Sharkey8a4c9722014-06-16 13:48:42 -0700978 dest.writeStringArray(splitSourceDirs);
979 dest.writeStringArray(splitPublicSourceDirs);
Kenny Root85387d72010-08-26 10:13:11 -0700980 dest.writeString(nativeLibraryDir);
Narayan Kamath7dba6eb2014-07-16 08:53:30 +0100981 dest.writeString(secondaryNativeLibraryDir);
Jeff Sharkey84f12942014-07-10 17:48:11 -0700982 dest.writeString(nativeLibraryRootDir);
983 dest.writeInt(nativeLibraryRootRequiresIsa ? 1 : 0);
Narayan Kamathff110bd2014-07-04 18:30:45 +0100984 dest.writeString(primaryCpuAbi);
985 dest.writeString(secondaryCpuAbi);
Kenny Rootd1ab0162010-01-21 17:27:14 -0800986 dest.writeStringArray(resourceDirs);
Robert Craig0f40dc92013-03-25 06:33:03 -0400987 dest.writeString(seinfo);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800988 dest.writeStringArray(sharedLibraryFiles);
989 dest.writeString(dataDir);
Jeff Sharkey8a372a02016-03-16 16:25:45 -0600990 dest.writeString(deviceProtectedDataDir);
991 dest.writeString(credentialProtectedDataDir);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800992 dest.writeInt(uid);
Todd Kennedy6e2e7f52016-05-02 14:56:45 -0700993 dest.writeInt(minSdkVersion);
Dianne Hackborna96cbb42009-05-13 15:06:13 -0700994 dest.writeInt(targetSdkVersion);
Dianne Hackborn8472e612014-01-23 17:57:20 -0800995 dest.writeInt(versionCode);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800996 dest.writeInt(enabled ? 1 : 0);
Dianne Hackborn0ac30312011-06-17 14:49:23 -0700997 dest.writeInt(enabledSetting);
Dianne Hackborn54e570f2010-10-04 18:32:32 -0700998 dest.writeInt(installLocation);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800999 dest.writeString(manageSpaceActivityName);
Christopher Tate181fafa2009-05-14 11:12:14 -07001000 dest.writeString(backupAgentName);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001001 dest.writeInt(descriptionRes);
Adam Powell269248d2011-08-02 10:26:54 -07001002 dest.writeInt(uiOptions);
Matthew Williams303650c2015-04-17 18:22:51 -07001003 dest.writeInt(fullBackupContent);
Chad Brubakerc845b2a2016-05-13 14:09:27 -07001004 dest.writeInt(networkSecurityConfigRes);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001005 }
1006
1007 public static final Parcelable.Creator<ApplicationInfo> CREATOR
1008 = new Parcelable.Creator<ApplicationInfo>() {
1009 public ApplicationInfo createFromParcel(Parcel source) {
1010 return new ApplicationInfo(source);
1011 }
1012 public ApplicationInfo[] newArray(int size) {
1013 return new ApplicationInfo[size];
1014 }
1015 };
1016
1017 private ApplicationInfo(Parcel source) {
1018 super(source);
1019 taskAffinity = source.readString();
1020 permission = source.readString();
1021 processName = source.readString();
1022 className = source.readString();
1023 theme = source.readInt();
1024 flags = source.readInt();
Alex Klyubinb9f8a522015-02-03 11:12:59 -08001025 privateFlags = source.readInt();
Dianne Hackborndf6e9802011-05-26 14:20:23 -07001026 requiresSmallestWidthDp = source.readInt();
1027 compatibleWidthLimitDp = source.readInt();
Dianne Hackborn2762ff32011-06-01 21:27:05 -07001028 largestWidthLimitDp = source.readInt();
Jeff Sharkeyb2b9ab82015-04-05 21:10:42 -07001029 volumeUuid = source.readString();
Jeff Sharkey7f1a57a2014-10-08 10:14:53 -07001030 scanSourceDir = source.readString();
1031 scanPublicSourceDir = source.readString();
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001032 sourceDir = source.readString();
1033 publicSourceDir = source.readString();
Jeff Sharkey8a4c9722014-06-16 13:48:42 -07001034 splitSourceDirs = source.readStringArray();
1035 splitPublicSourceDirs = source.readStringArray();
Kenny Root85387d72010-08-26 10:13:11 -07001036 nativeLibraryDir = source.readString();
Narayan Kamath7dba6eb2014-07-16 08:53:30 +01001037 secondaryNativeLibraryDir = source.readString();
Jeff Sharkey84f12942014-07-10 17:48:11 -07001038 nativeLibraryRootDir = source.readString();
1039 nativeLibraryRootRequiresIsa = source.readInt() != 0;
Narayan Kamathff110bd2014-07-04 18:30:45 +01001040 primaryCpuAbi = source.readString();
1041 secondaryCpuAbi = source.readString();
Kenny Rootd1ab0162010-01-21 17:27:14 -08001042 resourceDirs = source.readStringArray();
Robert Craig0f40dc92013-03-25 06:33:03 -04001043 seinfo = source.readString();
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001044 sharedLibraryFiles = source.readStringArray();
1045 dataDir = source.readString();
Jeff Sharkey8a372a02016-03-16 16:25:45 -06001046 deviceEncryptedDataDir = deviceProtectedDataDir = source.readString();
1047 credentialEncryptedDataDir = credentialProtectedDataDir = source.readString();
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001048 uid = source.readInt();
Todd Kennedy6e2e7f52016-05-02 14:56:45 -07001049 minSdkVersion = source.readInt();
Dianne Hackborna96cbb42009-05-13 15:06:13 -07001050 targetSdkVersion = source.readInt();
Dianne Hackborn8472e612014-01-23 17:57:20 -08001051 versionCode = source.readInt();
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001052 enabled = source.readInt() != 0;
Dianne Hackborn0ac30312011-06-17 14:49:23 -07001053 enabledSetting = source.readInt();
Dianne Hackborn54e570f2010-10-04 18:32:32 -07001054 installLocation = source.readInt();
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001055 manageSpaceActivityName = source.readString();
Christopher Tate181fafa2009-05-14 11:12:14 -07001056 backupAgentName = source.readString();
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001057 descriptionRes = source.readInt();
Adam Powell269248d2011-08-02 10:26:54 -07001058 uiOptions = source.readInt();
Matthew Williams303650c2015-04-17 18:22:51 -07001059 fullBackupContent = source.readInt();
Chad Brubakerc845b2a2016-05-13 14:09:27 -07001060 networkSecurityConfigRes = source.readInt();
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001061 }
Mitsuru Oshima8d112672009-04-27 12:01:23 -07001062
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001063 /**
1064 * Retrieve the textual description of the application. This
1065 * will call back on the given PackageManager to load the description from
1066 * the application.
1067 *
1068 * @param pm A PackageManager from which the label can be loaded; usually
1069 * the PackageManager from which you originally retrieved this item.
1070 *
1071 * @return Returns a CharSequence containing the application's description.
1072 * If there is no description, null is returned.
1073 */
1074 public CharSequence loadDescription(PackageManager pm) {
1075 if (descriptionRes != 0) {
Jeff Brown07330792010-03-30 19:57:08 -07001076 CharSequence label = pm.getText(packageName, descriptionRes, this);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001077 if (label != null) {
1078 return label;
1079 }
1080 }
1081 return null;
1082 }
Mitsuru Oshimae5fb3282009-06-09 21:16:08 -07001083
1084 /**
1085 * Disable compatibility mode
1086 *
1087 * @hide
1088 */
1089 public void disableCompatibilityMode() {
Mitsuru Oshima69fff4a2009-07-21 09:51:05 -07001090 flags |= (FLAG_SUPPORTS_LARGE_SCREENS | FLAG_SUPPORTS_NORMAL_SCREENS |
Dianne Hackborn11b822d2009-07-21 20:03:02 -07001091 FLAG_SUPPORTS_SMALL_SCREENS | FLAG_RESIZEABLE_FOR_SCREENS |
Dianne Hackborn14cee9f2010-04-23 17:51:26 -07001092 FLAG_SUPPORTS_SCREEN_DENSITIES | FLAG_SUPPORTS_XLARGE_SCREENS);
Mitsuru Oshimae5fb3282009-06-09 21:16:08 -07001093 }
Jeff Sharkey15447792015-11-05 16:18:51 -08001094
1095 /** {@hide} */
1096 public void initForUser(int userId) {
1097 uid = UserHandle.getUid(userId, UserHandle.getAppId(uid));
1098
1099 if ("android".equals(packageName)) {
1100 dataDir = Environment.getDataSystemDirectory().getAbsolutePath();
1101 return;
1102 }
1103
Jeff Sharkey8a372a02016-03-16 16:25:45 -06001104 deviceEncryptedDataDir = deviceProtectedDataDir = Environment
Jeff Sharkey8212ae02016-02-10 14:46:43 -07001105 .getDataUserDePackageDirectory(volumeUuid, userId, packageName)
Jeff Sharkey15447792015-11-05 16:18:51 -08001106 .getAbsolutePath();
Jeff Sharkey8a372a02016-03-16 16:25:45 -06001107 credentialEncryptedDataDir = credentialProtectedDataDir = Environment
Jeff Sharkey8212ae02016-02-10 14:46:43 -07001108 .getDataUserCePackageDirectory(volumeUuid, userId, packageName)
Jeff Sharkey15447792015-11-05 16:18:51 -08001109 .getAbsolutePath();
1110
Jeff Sharkey8a372a02016-03-16 16:25:45 -06001111 if ((privateFlags & PRIVATE_FLAG_DEFAULT_TO_DEVICE_PROTECTED_STORAGE) != 0
1112 && PackageManager.APPLY_DEFAULT_TO_DEVICE_PROTECTED_STORAGE) {
1113 dataDir = deviceProtectedDataDir;
Jeff Sharkey15447792015-11-05 16:18:51 -08001114 } else {
Jeff Sharkey8a372a02016-03-16 16:25:45 -06001115 dataDir = credentialProtectedDataDir;
Jeff Sharkey15447792015-11-05 16:18:51 -08001116 }
1117 }
1118
Jeff Brown07330792010-03-30 19:57:08 -07001119 /**
1120 * @hide
1121 */
Alexandra Gherghinaa7093142014-07-30 13:43:39 +01001122 @Override
1123 public Drawable loadDefaultIcon(PackageManager pm) {
Jeff Brown07330792010-03-30 19:57:08 -07001124 if ((flags & FLAG_EXTERNAL_STORAGE) != 0
1125 && isPackageUnavailable(pm)) {
1126 return Resources.getSystem().getDrawable(
1127 com.android.internal.R.drawable.sym_app_on_sd_unavailable_icon);
1128 }
1129 return pm.getDefaultActivityIcon();
1130 }
1131
1132 private boolean isPackageUnavailable(PackageManager pm) {
1133 try {
1134 return pm.getPackageInfo(packageName, 0) == null;
1135 } catch (NameNotFoundException ex) {
1136 return true;
1137 }
1138 }
Jeff Sharkeyd7460572014-07-06 20:44:55 -07001139
Jeff Brown07330792010-03-30 19:57:08 -07001140 /**
1141 * @hide
1142 */
Fyodor Kupoloveeea67b2015-02-23 17:14:45 -08001143 public boolean isForwardLocked() {
1144 return (privateFlags & ApplicationInfo.PRIVATE_FLAG_FORWARD_LOCK) != 0;
1145 }
1146
1147 /**
1148 * @hide
1149 */
Jeff Sharkeya73b8fd2016-01-06 17:02:08 -07001150 @TestApi
Fyodor Kupolovb94c1652015-03-03 12:25:30 -08001151 public boolean isSystemApp() {
1152 return (flags & ApplicationInfo.FLAG_SYSTEM) != 0;
1153 }
1154
1155 /**
1156 * @hide
1157 */
Jeff Sharkeya73b8fd2016-01-06 17:02:08 -07001158 @TestApi
Svet Ganovadc1cf42015-06-15 16:36:24 -07001159 public boolean isPrivilegedApp() {
1160 return (privateFlags & ApplicationInfo.PRIVATE_FLAG_PRIVILEGED) != 0;
1161 }
1162
1163 /**
1164 * @hide
1165 */
Fyodor Kupolovb94c1652015-03-03 12:25:30 -08001166 public boolean isUpdatedSystemApp() {
1167 return (flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0;
1168 }
1169
Jeff Sharkeye2d45be2015-04-15 17:14:12 -07001170 /** @hide */
1171 public boolean isInternal() {
1172 return (flags & ApplicationInfo.FLAG_EXTERNAL_STORAGE) == 0;
1173 }
1174
1175 /** @hide */
1176 public boolean isExternalAsec() {
1177 return TextUtils.isEmpty(volumeUuid)
1178 && (flags & ApplicationInfo.FLAG_EXTERNAL_STORAGE) != 0;
1179 }
1180
Jeff Sharkeyf9fc6d62015-11-08 16:46:05 -08001181 /** @hide */
Jeff Sharkey8a372a02016-03-16 16:25:45 -06001182 public boolean isDefaultToDeviceProtectedStorage() {
1183 return (privateFlags
1184 & ApplicationInfo.PRIVATE_FLAG_DEFAULT_TO_DEVICE_PROTECTED_STORAGE) != 0;
Jeff Sharkeye4697132016-02-06 19:46:15 -07001185 }
1186
1187 /** @hide */
Jeff Sharkey8a372a02016-03-16 16:25:45 -06001188 public boolean isDirectBootAware() {
1189 return (privateFlags & ApplicationInfo.PRIVATE_FLAG_DIRECT_BOOT_AWARE) != 0;
Jeff Sharkeyf9fc6d62015-11-08 16:46:05 -08001190 }
1191
Jeff Sharkey8924e872015-11-30 12:52:10 -07001192 /** @hide */
Jeff Sharkey8a372a02016-03-16 16:25:45 -06001193 public boolean isPartiallyDirectBootAware() {
1194 return (privateFlags & ApplicationInfo.PRIVATE_FLAG_PARTIALLY_DIRECT_BOOT_AWARE) != 0;
Jeff Sharkey8924e872015-11-30 12:52:10 -07001195 }
1196
Fyodor Kupolovb94c1652015-03-03 12:25:30 -08001197 /**
1198 * @hide
1199 */
Jeff Vander Stoepa4407bf2015-10-30 13:15:58 -07001200 public boolean isAutoPlayApp() {
1201 return (privateFlags & ApplicationInfo.PRIVATE_FLAG_AUTOPLAY) != 0;
1202 }
1203
1204 /**
1205 * @hide
1206 */
Svet Ganov2acf0632015-11-24 19:10:59 -08001207 public boolean isEphemeralApp() {
1208 return (privateFlags & ApplicationInfo.PRIVATE_FLAG_EPHEMERAL) != 0;
1209 }
1210
1211 /**
1212 * @hide
1213 */
Fyodor Kupolovbdbc9692015-12-14 13:11:13 -08001214 public boolean isRequiredForSystemUser() {
1215 return (privateFlags & ApplicationInfo.PRIVATE_FLAG_REQUIRED_FOR_SYSTEM_USER) != 0;
1216 }
1217
1218 /**
1219 * @hide
1220 */
Jeff Brown07330792010-03-30 19:57:08 -07001221 @Override protected ApplicationInfo getApplicationInfo() {
1222 return this;
1223 }
Jeff Sharkeyd7460572014-07-06 20:44:55 -07001224
1225 /** {@hide} */ public void setCodePath(String codePath) { scanSourceDir = codePath; }
1226 /** {@hide} */ public void setBaseCodePath(String baseCodePath) { sourceDir = baseCodePath; }
1227 /** {@hide} */ public void setSplitCodePaths(String[] splitCodePaths) { splitSourceDirs = splitCodePaths; }
1228 /** {@hide} */ public void setResourcePath(String resourcePath) { scanPublicSourceDir = resourcePath; }
1229 /** {@hide} */ public void setBaseResourcePath(String baseResourcePath) { publicSourceDir = baseResourcePath; }
1230 /** {@hide} */ public void setSplitResourcePaths(String[] splitResourcePaths) { splitPublicSourceDirs = splitResourcePaths; }
1231
1232 /** {@hide} */ public String getCodePath() { return scanSourceDir; }
1233 /** {@hide} */ public String getBaseCodePath() { return sourceDir; }
1234 /** {@hide} */ public String[] getSplitCodePaths() { return splitSourceDirs; }
1235 /** {@hide} */ public String getResourcePath() { return scanPublicSourceDir; }
1236 /** {@hide} */ public String getBaseResourcePath() { return publicSourceDir; }
1237 /** {@hide} */ public String[] getSplitResourcePaths() { return splitSourceDirs; }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001238}