ApplicationInfo.java revision a4407bfceef1bdb7eb4d83990722a61082d926c9
115a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root/* 215a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root * Copyright (C) 2007 The Android Open Source Project 315a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root * 415a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root * Licensed under the Apache License, Version 2.0 (the "License"); 515a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root * you may not use this file except in compliance with the License. 615a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root * You may obtain a copy of the License at 715a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root * 815a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root * http://www.apache.org/licenses/LICENSE-2.0 915a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root * 1015a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root * Unless required by applicable law or agreed to in writing, software 1115a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root * distributed under the License is distributed on an "AS IS" BASIS, 1215a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1315a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root * See the License for the specific language governing permissions and 1415a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root * limitations under the License. 1515a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root */ 1615a4d2ffd04dc6c70f2cd17dae12ac6bc14c69abKenny Root 179066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectpackage android.content.pm; 189066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 1907330791116513710d879c45b2f095cd314cbfd0Jeff Brownimport android.content.pm.PackageManager.NameNotFoundException; 2007330791116513710d879c45b2f095cd314cbfd0Jeff Brownimport android.content.res.Resources; 2107330791116513710d879c45b2f095cd314cbfd0Jeff Brownimport android.graphics.drawable.Drawable; 2215447798a38d2b5acb1998731340255f4203f294Jeff Sharkeyimport android.os.Environment; 239066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectimport android.os.Parcel; 249066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectimport android.os.Parcelable; 2515447798a38d2b5acb1998731340255f4203f294Jeff Sharkeyimport android.os.UserHandle; 26e2d45be4dae116307f8edd85eaa61134221cb8f9Jeff Sharkeyimport android.text.TextUtils; 279066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectimport android.util.Printer; 289066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 298a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkeyimport com.android.internal.util.ArrayUtils; 308a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey 319066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectimport java.text.Collator; 328a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkeyimport java.util.Arrays; 339066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectimport java.util.Comparator; 348a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkeyimport java.util.Objects; 359066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 369066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project/** 379066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Information you can retrieve about a particular application. This 389066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * corresponds to information collected from the AndroidManifest.xml's 399066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * <application> tag. 409066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 419066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectpublic class ApplicationInfo extends PackageItemInfo implements Parcelable { 429066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 439066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 449066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Default task affinity of all activities in this application. See 459066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * {@link ActivityInfo#taskAffinity} for more information. This comes 469066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * from the "taskAffinity" attribute. 479066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 489066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public String taskAffinity; 499066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 509066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 519066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Optional name of a permission required to be able to access this 529066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * application's components. From the "permission" attribute. 539066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 549066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public String permission; 559066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 569066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 579066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * The name of the process this application should run in. From the 589066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * "process" attribute or, if not set, the same as 599066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * <var>packageName</var>. 609066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 619066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public String processName; 629066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 639066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 649066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Class implementing the Application object. From the "class" 659066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * attribute. 669066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 679066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public String className; 689066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 699066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 709066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * A style resource identifier (in the package's resources) of the 719066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * description of an application. From the "description" attribute 729066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * or, if not set, 0. 739066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 749066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public int descriptionRes; 759066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 769066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 779066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * A style resource identifier (in the package's resources) of the 789066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * default visual theme of the application. From the "theme" attribute 799066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * or, if not set, 0. 809066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 819066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public int theme; 829066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 839066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 849066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Class implementing the Application's manage space 859066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * functionality. From the "manageSpaceActivity" 869066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * attribute. This is an optional attribute and will be null if 87181fafaf48208978b8ba2022683ffa78aaeddde1Christopher Tate * applications don't specify it in their manifest 889066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 899066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public String manageSpaceActivityName; 909066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 919066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 92181fafaf48208978b8ba2022683ffa78aaeddde1Christopher Tate * Class implementing the Application's backup functionality. From 93181fafaf48208978b8ba2022683ffa78aaeddde1Christopher Tate * the "backupAgent" attribute. This is an optional attribute and 94181fafaf48208978b8ba2022683ffa78aaeddde1Christopher Tate * will be null if the application does not specify it in its manifest. 95181fafaf48208978b8ba2022683ffa78aaeddde1Christopher Tate * 96181fafaf48208978b8ba2022683ffa78aaeddde1Christopher Tate * <p>If android:allowBackup is set to false, this attribute is ignored. 97181fafaf48208978b8ba2022683ffa78aaeddde1Christopher Tate */ 98181fafaf48208978b8ba2022683ffa78aaeddde1Christopher Tate public String backupAgentName; 994a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate 1004a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate /** 101303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams * An optional attribute that indicates the app supports automatic backup of app data. 102303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams * <p>0 is the default and means the app's entire data folder + managed external storage will 103303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams * be backed up; 104303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams * Any negative value indicates the app does not support full-data backup, though it may still 105303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams * want to participate via the traditional key/value backup API; 106303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams * A positive number specifies an xml resource in which the application has defined its backup 107303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams * include/exclude criteria. 108303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams * <p>If android:allowBackup is set to false, this attribute is ignored. 109303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams * 110303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams * @see {@link android.content.Context#getNoBackupFilesDir} 111303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams * @see {@link #FLAG_ALLOW_BACKUP} 11298fa656f1636525c27a6d91ad4d7a3385292b99aChristopher Tate * 11398fa656f1636525c27a6d91ad4d7a3385292b99aChristopher Tate * @hide 114303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams */ 115303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams public int fullBackupContent = 0; 116303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams 117303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams /** 118269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell * The default extra UI options for activities in this application. 119269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell * Set from the {@link android.R.attr#uiOptions} attribute in the 120269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell * activity's manifest. 121269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell */ 122269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell public int uiOptions = 0; 123269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell 124269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell /** 1259066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Value for {@link #flags}: if set, this application is installed in the 1269066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * device's system image. 1279066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 1289066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final int FLAG_SYSTEM = 1<<0; 1299066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 1309066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 1319066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Value for {@link #flags}: set to true if this application would like to 1329066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * allow debugging of its 1339066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * code, even when installed on a non-development system. Comes 1349066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * from {@link android.R.styleable#AndroidManifestApplication_debuggable 1359066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * android:debuggable} of the <application> tag. 1369066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 1379066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final int FLAG_DEBUGGABLE = 1<<1; 1389066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 1399066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 1409066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Value for {@link #flags}: set to true if this application has code 1419066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * associated with it. Comes 1429066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * from {@link android.R.styleable#AndroidManifestApplication_hasCode 1439066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * android:hasCode} of the <application> tag. 1449066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 1459066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final int FLAG_HAS_CODE = 1<<2; 1469066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 1479066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 1489066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Value for {@link #flags}: set to true if this application is persistent. 1499066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Comes from {@link android.R.styleable#AndroidManifestApplication_persistent 1509066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * android:persistent} of the <application> tag. 1519066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 1529066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final int FLAG_PERSISTENT = 1<<3; 1539066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 1549066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 155181fafaf48208978b8ba2022683ffa78aaeddde1Christopher Tate * Value for {@link #flags}: set to true if this application holds the 1569066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * {@link android.Manifest.permission#FACTORY_TEST} permission and the 1579066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * device is running in factory test mode. 1589066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 1599066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final int FLAG_FACTORY_TEST = 1<<4; 1609066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 1619066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 1629066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Value for {@link #flags}: default value for the corresponding ActivityInfo flag. 1639066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Comes from {@link android.R.styleable#AndroidManifestApplication_allowTaskReparenting 1649066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * android:allowTaskReparenting} of the <application> tag. 1659066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 1669066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final int FLAG_ALLOW_TASK_REPARENTING = 1<<5; 1679066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 1689066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 1699066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Value for {@link #flags}: default value for the corresponding ActivityInfo flag. 1709066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Comes from {@link android.R.styleable#AndroidManifestApplication_allowClearUserData 1719066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * android:allowClearUserData} of the <application> tag. 1729066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 1739066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final int FLAG_ALLOW_CLEAR_USER_DATA = 1<<6; 1749066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 1759066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 176851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn * Value for {@link #flags}: this is set if this application has been 177851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn * install as an update to a built-in system application. 1789066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 1799066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final int FLAG_UPDATED_SYSTEM_APP = 1<<7; 180851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn 181851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn /** 1827f2054392e9957d3ba8579ef08c29cfb27df564eDianne Hackborn * Value for {@link #flags}: this is set of the application has specified 1837f2054392e9957d3ba8579ef08c29cfb27df564eDianne Hackborn * {@link android.R.styleable#AndroidManifestApplication_testOnly 1847f2054392e9957d3ba8579ef08c29cfb27df564eDianne Hackborn * android:testOnly} to be true. 185851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn */ 186a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn public static final int FLAG_TEST_ONLY = 1<<8; 187ade3ecad94d1f4431576f53bae26c35efbf7a2c9Dianne Hackborn 188ade3ecad94d1f4431576f53bae26c35efbf7a2c9Dianne Hackborn /** 1895c1e00b14d2ef10ec76abf3e951fa8003a67f558Dianne Hackborn * Value for {@link #flags}: true when the application's window can be 190723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn * reduced in size for smaller screens. Corresponds to 191723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn * {@link android.R.styleable#AndroidManifestSupportsScreens_smallScreens 192723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn * android:smallScreens}. 1935c1e00b14d2ef10ec76abf3e951fa8003a67f558Dianne Hackborn */ 194723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn public static final int FLAG_SUPPORTS_SMALL_SCREENS = 1<<9; 195723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn 196723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn /** 197723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn * Value for {@link #flags}: true when the application's window can be 198723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn * displayed on normal screens. Corresponds to 199723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn * {@link android.R.styleable#AndroidManifestSupportsScreens_normalScreens 200723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn * android:normalScreens}. 201723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn */ 202723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn public static final int FLAG_SUPPORTS_NORMAL_SCREENS = 1<<10; 203723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn 204723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn /** 205723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn * Value for {@link #flags}: true when the application's window can be 206723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn * increased in size for larger screens. Corresponds to 207723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn * {@link android.R.styleable#AndroidManifestSupportsScreens_largeScreens 20822ec9ab3b881d71866279ba9363c644a9e4e7164Dianne Hackborn * android:largeScreens}. 209723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn */ 210723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn public static final int FLAG_SUPPORTS_LARGE_SCREENS = 1<<11; 2115c1e00b14d2ef10ec76abf3e951fa8003a67f558Dianne Hackborn 2125c1e00b14d2ef10ec76abf3e951fa8003a67f558Dianne Hackborn /** 213c4db95c077f826585d20be2f3db4043c53d30cf5Dianne Hackborn * Value for {@link #flags}: true when the application knows how to adjust 214c4db95c077f826585d20be2f3db4043c53d30cf5Dianne Hackborn * its UI for different screen sizes. Corresponds to 215c4db95c077f826585d20be2f3db4043c53d30cf5Dianne Hackborn * {@link android.R.styleable#AndroidManifestSupportsScreens_resizeable 216c4db95c077f826585d20be2f3db4043c53d30cf5Dianne Hackborn * android:resizeable}. 217c4db95c077f826585d20be2f3db4043c53d30cf5Dianne Hackborn */ 218c4db95c077f826585d20be2f3db4043c53d30cf5Dianne Hackborn public static final int FLAG_RESIZEABLE_FOR_SCREENS = 1<<12; 219c4db95c077f826585d20be2f3db4043c53d30cf5Dianne Hackborn 220c4db95c077f826585d20be2f3db4043c53d30cf5Dianne Hackborn /** 22111b822d2a91ea17c34c0cb1c11e80a9a30d72864Dianne Hackborn * Value for {@link #flags}: true when the application knows how to 22211b822d2a91ea17c34c0cb1c11e80a9a30d72864Dianne Hackborn * accomodate different screen densities. Corresponds to 22311b822d2a91ea17c34c0cb1c11e80a9a30d72864Dianne Hackborn * {@link android.R.styleable#AndroidManifestSupportsScreens_anyDensity 22411b822d2a91ea17c34c0cb1c11e80a9a30d72864Dianne Hackborn * android:anyDensity}. 22511b822d2a91ea17c34c0cb1c11e80a9a30d72864Dianne Hackborn */ 22611b822d2a91ea17c34c0cb1c11e80a9a30d72864Dianne Hackborn public static final int FLAG_SUPPORTS_SCREEN_DENSITIES = 1<<13; 22711b822d2a91ea17c34c0cb1c11e80a9a30d72864Dianne Hackborn 22811b822d2a91ea17c34c0cb1c11e80a9a30d72864Dianne Hackborn /** 22923085b781e145ed684e7270af1d5ced6800b8effBen Cheng * Value for {@link #flags}: set to true if this application would like to 23023085b781e145ed684e7270af1d5ced6800b8effBen Cheng * request the VM to operate under the safe mode. Comes from 231ef3f5ddc2137ed99e41f00441b688fb56b855179Ben Cheng * {@link android.R.styleable#AndroidManifestApplication_vmSafeMode 232ef3f5ddc2137ed99e41f00441b688fb56b855179Ben Cheng * android:vmSafeMode} of the <application> tag. 23323085b781e145ed684e7270af1d5ced6800b8effBen Cheng */ 23423085b781e145ed684e7270af1d5ced6800b8effBen Cheng public static final int FLAG_VM_SAFE_MODE = 1<<14; 23523085b781e145ed684e7270af1d5ced6800b8effBen Cheng 23623085b781e145ed684e7270af1d5ced6800b8effBen Cheng /** 2373de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * Value for {@link #flags}: set to <code>false</code> if the application does not wish 2383de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * to permit any OS-driven backups of its data; <code>true</code> otherwise. 239181fafaf48208978b8ba2022683ffa78aaeddde1Christopher Tate * 2403de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * <p>Comes from the 2413de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * {@link android.R.styleable#AndroidManifestApplication_allowBackup android:allowBackup} 2423de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * attribute of the <application> tag. 243181fafaf48208978b8ba2022683ffa78aaeddde1Christopher Tate */ 24423085b781e145ed684e7270af1d5ced6800b8effBen Cheng public static final int FLAG_ALLOW_BACKUP = 1<<15; 2455e1ab335e6e8fbfa19c64d53880a22f472010953Christopher Tate 2465e1ab335e6e8fbfa19c64d53880a22f472010953Christopher Tate /** 2473de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * Value for {@link #flags}: set to <code>false</code> if the application must be kept 2483de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * in memory following a full-system restore operation; <code>true</code> otherwise. 2493de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * Ordinarily, during a full system restore operation each application is shut down 2503de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * following execution of its agent's onRestore() method. Setting this attribute to 2513de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * <code>false</code> prevents this. Most applications will not need to set this attribute. 2525e1ab335e6e8fbfa19c64d53880a22f472010953Christopher Tate * 2533de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * <p>If 2543de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * {@link android.R.styleable#AndroidManifestApplication_allowBackup android:allowBackup} 2553de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * is set to <code>false</code> or no 2563de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * {@link android.R.styleable#AndroidManifestApplication_backupAgent android:backupAgent} 2575e1ab335e6e8fbfa19c64d53880a22f472010953Christopher Tate * is specified, this flag will be ignored. 2585e1ab335e6e8fbfa19c64d53880a22f472010953Christopher Tate * 2593de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * <p>Comes from the 2603de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * {@link android.R.styleable#AndroidManifestApplication_killAfterRestore android:killAfterRestore} 2613de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * attribute of the <application> tag. 2625e1ab335e6e8fbfa19c64d53880a22f472010953Christopher Tate */ 26323085b781e145ed684e7270af1d5ced6800b8effBen Cheng public static final int FLAG_KILL_AFTER_RESTORE = 1<<16; 2645e1ab335e6e8fbfa19c64d53880a22f472010953Christopher Tate 2655e1ab335e6e8fbfa19c64d53880a22f472010953Christopher Tate /** 2663de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * Value for {@link #flags}: Set to <code>true</code> if the application's backup 2673de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * agent claims to be able to handle restore data even "from the future," 2683de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * i.e. from versions of the application with a versionCode greater than 2693de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * the one currently installed on the device. <i>Use with caution!</i> By default 2703de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * this attribute is <code>false</code> and the Backup Manager will ensure that data 2713de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * from "future" versions of the application are never supplied during a restore operation. 2725e1ab335e6e8fbfa19c64d53880a22f472010953Christopher Tate * 2733de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * <p>If 2743de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * {@link android.R.styleable#AndroidManifestApplication_allowBackup android:allowBackup} 2753de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * is set to <code>false</code> or no 2763de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * {@link android.R.styleable#AndroidManifestApplication_backupAgent android:backupAgent} 2775e1ab335e6e8fbfa19c64d53880a22f472010953Christopher Tate * is specified, this flag will be ignored. 2785e1ab335e6e8fbfa19c64d53880a22f472010953Christopher Tate * 2793de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * <p>Comes from the 2803de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * {@link android.R.styleable#AndroidManifestApplication_restoreAnyVersion android:restoreAnyVersion} 2813de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * attribute of the <application> tag. 2825e1ab335e6e8fbfa19c64d53880a22f472010953Christopher Tate */ 2833de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate public static final int FLAG_RESTORE_ANY_VERSION = 1<<17; 2845e1ab335e6e8fbfa19c64d53880a22f472010953Christopher Tate 285181fafaf48208978b8ba2022683ffa78aaeddde1Christopher Tate /** 2863202d380226043fa665df3c92252f791f8c52d55Dianne Hackborn * Value for {@link #flags}: Set to true if the application is 2873202d380226043fa665df3c92252f791f8c52d55Dianne Hackborn * currently installed on external/removable/unprotected storage. Such 2883202d380226043fa665df3c92252f791f8c52d55Dianne Hackborn * applications may not be available if their storage is not currently 2893202d380226043fa665df3c92252f791f8c52d55Dianne Hackborn * mounted. When the storage it is on is not available, it will look like 2903202d380226043fa665df3c92252f791f8c52d55Dianne Hackborn * the application has been uninstalled (its .apk is no longer available) 2913202d380226043fa665df3c92252f791f8c52d55Dianne Hackborn * but its persistent data is not removed. 292af8e9f4805643f90a9dc0ecfa119e0a860c12f8aSuchi Amalapurapu */ 29394c567e1e344d49168603f5a0560215a4ce735e6Dianne Hackborn public static final int FLAG_EXTERNAL_STORAGE = 1<<18; 294af8e9f4805643f90a9dc0ecfa119e0a860c12f8aSuchi Amalapurapu 295af8e9f4805643f90a9dc0ecfa119e0a860c12f8aSuchi Amalapurapu /** 29614cee9f688c32d63d8521188e7422811629bb7c2Dianne Hackborn * Value for {@link #flags}: true when the application's window can be 29714cee9f688c32d63d8521188e7422811629bb7c2Dianne Hackborn * increased in size for extra large screens. Corresponds to 29814cee9f688c32d63d8521188e7422811629bb7c2Dianne Hackborn * {@link android.R.styleable#AndroidManifestSupportsScreens_xlargeScreens 29922ec9ab3b881d71866279ba9363c644a9e4e7164Dianne Hackborn * android:xlargeScreens}. 30014cee9f688c32d63d8521188e7422811629bb7c2Dianne Hackborn */ 30114cee9f688c32d63d8521188e7422811629bb7c2Dianne Hackborn public static final int FLAG_SUPPORTS_XLARGE_SCREENS = 1<<19; 30214cee9f688c32d63d8521188e7422811629bb7c2Dianne Hackborn 30314cee9f688c32d63d8521188e7422811629bb7c2Dianne Hackborn /** 3043b81bc18bb661c02ad8074c39dab16644c1e65d0Dianne Hackborn * Value for {@link #flags}: true when the application has requested a 3053b81bc18bb661c02ad8074c39dab16644c1e65d0Dianne Hackborn * large heap for its processes. Corresponds to 3063b81bc18bb661c02ad8074c39dab16644c1e65d0Dianne Hackborn * {@link android.R.styleable#AndroidManifestApplication_largeHeap 3073b81bc18bb661c02ad8074c39dab16644c1e65d0Dianne Hackborn * android:largeHeap}. 308a3cdaa5337fa573c4c61770195d6232c2e587090Jason parks */ 3093b81bc18bb661c02ad8074c39dab16644c1e65d0Dianne Hackborn public static final int FLAG_LARGE_HEAP = 1<<20; 310a3cdaa5337fa573c4c61770195d6232c2e587090Jason parks 311a3cdaa5337fa573c4c61770195d6232c2e587090Jason parks /** 312e7f972122db87dc54e41ed1a6e417534d43bca3aDianne Hackborn * Value for {@link #flags}: true if this application's package is in 313e7f972122db87dc54e41ed1a6e417534d43bca3aDianne Hackborn * the stopped state. 314e7f972122db87dc54e41ed1a6e417534d43bca3aDianne Hackborn */ 315e7f972122db87dc54e41ed1a6e417534d43bca3aDianne Hackborn public static final int FLAG_STOPPED = 1<<21; 316e7f972122db87dc54e41ed1a6e417534d43bca3aDianne Hackborn 317e7f972122db87dc54e41ed1a6e417534d43bca3aDianne Hackborn /** 31859dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio * Value for {@link #flags}: true when the application is willing to support 31959dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio * RTL (right to left). All activities will inherit this value. 32059dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio * 32159dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio * Set from the {@link android.R.attr#supportsRtl} attribute in the 32259dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio * activity's manifest. 32359dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio * 32459dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio * Default value is false (no support for RTL). 32559dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio */ 32659dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio public static final int FLAG_SUPPORTS_RTL = 1<<22; 32759dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio 32859dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio /** 3297767eac3232ba2fb9828766813cdb481d6a97584Dianne Hackborn * Value for {@link #flags}: true if the application is currently 3307767eac3232ba2fb9828766813cdb481d6a97584Dianne Hackborn * installed for the calling user. 3317767eac3232ba2fb9828766813cdb481d6a97584Dianne Hackborn */ 3327767eac3232ba2fb9828766813cdb481d6a97584Dianne Hackborn public static final int FLAG_INSTALLED = 1<<23; 3337767eac3232ba2fb9828766813cdb481d6a97584Dianne Hackborn 3347767eac3232ba2fb9828766813cdb481d6a97584Dianne Hackborn /** 3355e03e2ca7d25b899b129baad2dd5eca6bf99d88aDianne Hackborn * Value for {@link #flags}: true if the application only has its 3365e03e2ca7d25b899b129baad2dd5eca6bf99d88aDianne Hackborn * data installed; the application package itself does not currently 3375e03e2ca7d25b899b129baad2dd5eca6bf99d88aDianne Hackborn * exist on the device. 3385e03e2ca7d25b899b129baad2dd5eca6bf99d88aDianne Hackborn */ 3395e03e2ca7d25b899b129baad2dd5eca6bf99d88aDianne Hackborn public static final int FLAG_IS_DATA_ONLY = 1<<24; 3405e03e2ca7d25b899b129baad2dd5eca6bf99d88aDianne Hackborn 3415e03e2ca7d25b899b129baad2dd5eca6bf99d88aDianne Hackborn /** 34212d0b4cd960e18493b1dc237adbfabed432c9df5Jose Lima * Value for {@link #flags}: true if the application was declared to be a game, or 34312d0b4cd960e18493b1dc237adbfabed432c9df5Jose Lima * false if it is a non-game application. 34412d0b4cd960e18493b1dc237adbfabed432c9df5Jose Lima */ 34512d0b4cd960e18493b1dc237adbfabed432c9df5Jose Lima public static final int FLAG_IS_GAME = 1<<25; 34612d0b4cd960e18493b1dc237adbfabed432c9df5Jose Lima 34712d0b4cd960e18493b1dc237adbfabed432c9df5Jose Lima /** 348d1de2567c6758e81a87c0f5eff9ff53ffebab134Christopher Tate * Value for {@link #flags}: {@code true} if the application asks that only 349d1de2567c6758e81a87c0f5eff9ff53ffebab134Christopher Tate * full-data streaming backups of its data be performed even though it defines 350d1de2567c6758e81a87c0f5eff9ff53ffebab134Christopher Tate * a {@link android.app.backup.BackupAgent BackupAgent}, which normally 351d1de2567c6758e81a87c0f5eff9ff53ffebab134Christopher Tate * indicates that the app will manage its backed-up data via incremental 352d1de2567c6758e81a87c0f5eff9ff53ffebab134Christopher Tate * key/value updates. 353d1de2567c6758e81a87c0f5eff9ff53ffebab134Christopher Tate */ 354d1de2567c6758e81a87c0f5eff9ff53ffebab134Christopher Tate public static final int FLAG_FULL_BACKUP_ONLY = 1<<26; 355d1de2567c6758e81a87c0f5eff9ff53ffebab134Christopher Tate 356d1de2567c6758e81a87c0f5eff9ff53ffebab134Christopher Tate /** 35701a959d60a2c5f04ab240513a853d7845b3a309eAlex Klyubin * Value for {@link #flags}: {@code true} if the application may use cleartext network traffic 35801a959d60a2c5f04ab240513a853d7845b3a309eAlex Klyubin * (e.g., HTTP rather than HTTPS; WebSockets rather than WebSockets Secure; XMPP, IMAP, STMP 35901a959d60a2c5f04ab240513a853d7845b3a309eAlex Klyubin * without STARTTLS or TLS). If {@code false}, the app declares that it does not intend to use 36001a959d60a2c5f04ab240513a853d7845b3a309eAlex Klyubin * cleartext network traffic, in which case platform components (e.g., HTTP stacks, 361fbf4599a8edfc31585f207c434d35200a03657b4Alex Klyubin * {@code DownloadManager}, {@code MediaPlayer}) will refuse app's requests to use cleartext 362fbf4599a8edfc31585f207c434d35200a03657b4Alex Klyubin * traffic. Third-party libraries are encouraged to honor this flag as well. 363fbf4599a8edfc31585f207c434d35200a03657b4Alex Klyubin * 364fbf4599a8edfc31585f207c434d35200a03657b4Alex Klyubin * <p>NOTE: {@code WebView} does not honor this flag. 365fbf4599a8edfc31585f207c434d35200a03657b4Alex Klyubin * 366fbf4599a8edfc31585f207c434d35200a03657b4Alex Klyubin * <p>This flag comes from 367fbf4599a8edfc31585f207c434d35200a03657b4Alex Klyubin * {@link android.R.styleable#AndroidManifestApplication_usesCleartextTraffic 368fbf4599a8edfc31585f207c434d35200a03657b4Alex Klyubin * android:usesCleartextTraffic} of the <application> tag. 36901a959d60a2c5f04ab240513a853d7845b3a309eAlex Klyubin */ 37001a959d60a2c5f04ab240513a853d7845b3a309eAlex Klyubin public static final int FLAG_USES_CLEARTEXT_TRAFFIC = 1<<27; 37101a959d60a2c5f04ab240513a853d7845b3a309eAlex Klyubin 37201a959d60a2c5f04ab240513a853d7845b3a309eAlex Klyubin /** 373ff193d642eea7128faad837d19e347cd25212c27Dmitriy Ivanov * When set installer extracts native libs from .apk files. 374ff193d642eea7128faad837d19e347cd25212c27Dmitriy Ivanov */ 375ff193d642eea7128faad837d19e347cd25212c27Dmitriy Ivanov public static final int FLAG_EXTRACT_NATIVE_LIBS = 1<<28; 376ff193d642eea7128faad837d19e347cd25212c27Dmitriy Ivanov 377ff193d642eea7128faad837d19e347cd25212c27Dmitriy Ivanov /** 378d70b9e7aea9c7b0691f3ac1326752f91d5049458Alan Viverette * Value for {@link #flags}: {@code true} when the application's rendering 379d70b9e7aea9c7b0691f3ac1326752f91d5049458Alan Viverette * should be hardware accelerated. 380d70b9e7aea9c7b0691f3ac1326752f91d5049458Alan Viverette */ 381d70b9e7aea9c7b0691f3ac1326752f91d5049458Alan Viverette public static final int FLAG_HARDWARE_ACCELERATED = 1<<29; 382d70b9e7aea9c7b0691f3ac1326752f91d5049458Alan Viverette 383d70b9e7aea9c7b0691f3ac1326752f91d5049458Alan Viverette /** 384b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * Value for {@link #flags}: true if code from this application will need to be 385b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * loaded into other applications' processes. On devices that support multiple 386b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * instruction sets, this implies the code might be loaded into a process that's 387b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * using any of the devices supported instruction sets. 388b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * 389b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * <p> The system might treat such applications specially, for eg., by 390b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * extracting the application's native libraries for all supported instruction 391b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * sets or by compiling the application's dex code for all supported instruction 392b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * sets. 393b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin */ 394b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin public static final int FLAG_MULTIARCH = 1 << 31; 395b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin 396b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin /** 397b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * Flags associated with the application. Any combination of 398b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@link #FLAG_SYSTEM}, {@link #FLAG_DEBUGGABLE}, {@link #FLAG_HAS_CODE}, 399b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@link #FLAG_PERSISTENT}, {@link #FLAG_FACTORY_TEST}, and 400b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@link #FLAG_ALLOW_TASK_REPARENTING} 401b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@link #FLAG_ALLOW_CLEAR_USER_DATA}, {@link #FLAG_UPDATED_SYSTEM_APP}, 402b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@link #FLAG_TEST_ONLY}, {@link #FLAG_SUPPORTS_SMALL_SCREENS}, 403b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@link #FLAG_SUPPORTS_NORMAL_SCREENS}, 404b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@link #FLAG_SUPPORTS_LARGE_SCREENS}, {@link #FLAG_SUPPORTS_XLARGE_SCREENS}, 405b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@link #FLAG_RESIZEABLE_FOR_SCREENS}, 406b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@link #FLAG_SUPPORTS_SCREEN_DENSITIES}, {@link #FLAG_VM_SAFE_MODE}, 407b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@link #FLAG_ALLOW_BACKUP}, {@link #FLAG_KILL_AFTER_RESTORE}, 408b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@link #FLAG_RESTORE_ANY_VERSION}, {@link #FLAG_EXTERNAL_STORAGE}, 409b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@link #FLAG_LARGE_HEAP}, {@link #FLAG_STOPPED}, 410b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@link #FLAG_SUPPORTS_RTL}, {@link #FLAG_INSTALLED}, 411b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@link #FLAG_IS_DATA_ONLY}, {@link #FLAG_IS_GAME}, 4127cb000ff56babf18d39ab0aa31dfc5dcac0bf11eAlex Klyubin * {@link #FLAG_FULL_BACKUP_ONLY}, {@link #FLAG_USES_CLEARTEXT_TRAFFIC}, 4137cb000ff56babf18d39ab0aa31dfc5dcac0bf11eAlex Klyubin * {@link #FLAG_MULTIARCH}. 414b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin */ 415b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin public int flags = 0; 416b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin 417b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin /** 418b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * Value for {@link #privateFlags}: true if the application is hidden via restrictions and for 419589a1bc0b00e570db079b4b157f60229ad8ef8f9Narayan Kamath * most purposes is considered as not installed. 420589a1bc0b00e570db079b4b157f60229ad8ef8f9Narayan Kamath * {@hide} 421589a1bc0b00e570db079b4b157f60229ad8ef8f9Narayan Kamath */ 422b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin public static final int PRIVATE_FLAG_HIDDEN = 1<<0; 423589a1bc0b00e570db079b4b157f60229ad8ef8f9Narayan Kamath 424589a1bc0b00e570db079b4b157f60229ad8ef8f9Narayan Kamath /** 425b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * Value for {@link #privateFlags}: set to <code>true</code> if the application 426589a1bc0b00e570db079b4b157f60229ad8ef8f9Narayan Kamath * has reported that it is heavy-weight, and thus can not participate in 427589a1bc0b00e570db079b4b157f60229ad8ef8f9Narayan Kamath * the normal application lifecycle. 428589a1bc0b00e570db079b4b157f60229ad8ef8f9Narayan Kamath * 429589a1bc0b00e570db079b4b157f60229ad8ef8f9Narayan Kamath * <p>Comes from the 430589a1bc0b00e570db079b4b157f60229ad8ef8f9Narayan Kamath * android.R.styleable#AndroidManifestApplication_cantSaveState 431589a1bc0b00e570db079b4b157f60229ad8ef8f9Narayan Kamath * attribute of the <application> tag. 4324ce55a3987c14b939cd416e24116c6ab3c760b82Christopher Tate * 4334ce55a3987c14b939cd416e24116c6ab3c760b82Christopher Tate * {@hide} 4344ce55a3987c14b939cd416e24116c6ab3c760b82Christopher Tate */ 435b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin public static final int PRIVATE_FLAG_CANT_SAVE_STATE = 1<<1; 4364ce55a3987c14b939cd416e24116c6ab3c760b82Christopher Tate 4374ce55a3987c14b939cd416e24116c6ab3c760b82Christopher Tate /** 438b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * Value for {@link #privateFlags}: Set to true if the application has been 4393202d380226043fa665df3c92252f791f8c52d55Dianne Hackborn * installed using the forward lock option. 440af8e9f4805643f90a9dc0ecfa119e0a860c12f8aSuchi Amalapurapu * 44175e616e8203a540c860888ccff73ffaa87498c5eDianne Hackborn * NOTE: DO NOT CHANGE THIS VALUE! It is saved in packages.xml. 442b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * 443af8e9f4805643f90a9dc0ecfa119e0a860c12f8aSuchi Amalapurapu * {@hide} 444af8e9f4805643f90a9dc0ecfa119e0a860c12f8aSuchi Amalapurapu */ 445b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin public static final int PRIVATE_FLAG_FORWARD_LOCK = 1<<2; 446af8e9f4805643f90a9dc0ecfa119e0a860c12f8aSuchi Amalapurapu 447af8e9f4805643f90a9dc0ecfa119e0a860c12f8aSuchi Amalapurapu /** 448b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * Value for {@link #privateFlags}: set to {@code true} if the application 449589a1bc0b00e570db079b4b157f60229ad8ef8f9Narayan Kamath * is permitted to hold privileged permissions. 45002486b1327e3007c62d253dd89ba9db1852b87f8Dianne Hackborn * 45102486b1327e3007c62d253dd89ba9db1852b87f8Dianne Hackborn * {@hide} 45202486b1327e3007c62d253dd89ba9db1852b87f8Dianne Hackborn */ 453b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin public static final int PRIVATE_FLAG_PRIVILEGED = 1<<3; 45402486b1327e3007c62d253dd89ba9db1852b87f8Dianne Hackborn 45502486b1327e3007c62d253dd89ba9db1852b87f8Dianne Hackborn /** 456d3d8a32217d5a2d895917cfe7e1645935d228494Fabrice Di Meglio * Value for {@link #flags}: {@code true} if the application has any IntentFiler with some 457d3d8a32217d5a2d895917cfe7e1645935d228494Fabrice Di Meglio * data URI using HTTP or HTTPS with an associated VIEW action. 458d3d8a32217d5a2d895917cfe7e1645935d228494Fabrice Di Meglio * 459d3d8a32217d5a2d895917cfe7e1645935d228494Fabrice Di Meglio * {@hide} 460d3d8a32217d5a2d895917cfe7e1645935d228494Fabrice Di Meglio */ 461d3d8a32217d5a2d895917cfe7e1645935d228494Fabrice Di Meglio public static final int PRIVATE_FLAG_HAS_DOMAIN_URLS = 1<<4; 462d3d8a32217d5a2d895917cfe7e1645935d228494Fabrice Di Meglio 463d3d8a32217d5a2d895917cfe7e1645935d228494Fabrice Di Meglio /** 46415447798a38d2b5acb1998731340255f4203f294Jeff Sharkey * When set, default data storage directory for given app is pointed at 46515447798a38d2b5acb1998731340255f4203f294Jeff Sharkey * device-encrypted location. 46615447798a38d2b5acb1998731340255f4203f294Jeff Sharkey * 46715447798a38d2b5acb1998731340255f4203f294Jeff Sharkey * @hide 46815447798a38d2b5acb1998731340255f4203f294Jeff Sharkey */ 469e17ac1569793c333bb4dce86607a342e7c982ae7Jeff Sharkey public static final int PRIVATE_FLAG_FORCE_DEVICE_ENCRYPTED = 1 << 5; 47015447798a38d2b5acb1998731340255f4203f294Jeff Sharkey 47115447798a38d2b5acb1998731340255f4203f294Jeff Sharkey /** 472a4407bfceef1bdb7eb4d83990722a61082d926c9Jeff Vander Stoep * Value for {@link #privateFlags}: set to {@code true} if the application 473a4407bfceef1bdb7eb4d83990722a61082d926c9Jeff Vander Stoep * is AutoPlay. 474a4407bfceef1bdb7eb4d83990722a61082d926c9Jeff Vander Stoep * 475a4407bfceef1bdb7eb4d83990722a61082d926c9Jeff Vander Stoep * {@hide} 476a4407bfceef1bdb7eb4d83990722a61082d926c9Jeff Vander Stoep */ 477a4407bfceef1bdb7eb4d83990722a61082d926c9Jeff Vander Stoep public static final int PRIVATE_FLAG_AUTOPLAY = 1<<6; 478a4407bfceef1bdb7eb4d83990722a61082d926c9Jeff Vander Stoep 479a4407bfceef1bdb7eb4d83990722a61082d926c9Jeff Vander Stoep /** 480b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * Private/hidden flags. See {@code PRIVATE_FLAG_...} constants. 481b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@hide} 4829066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 483b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin public int privateFlags; 484655d0e2029e6ae77a47e922dce4c4989818b8dd1Amith Yamasani 4859066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 486df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn * The required smallest screen width the application can run on. If 0, 487df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn * nothing has been specified. Comes from 488df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn * {@link android.R.styleable#AndroidManifestSupportsScreens_requiresSmallestWidthDp 489df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn * android:requiresSmallestWidthDp} attribute of the <supports-screens> tag. 490df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn */ 491df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn public int requiresSmallestWidthDp = 0; 492df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn 493df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn /** 494df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn * The maximum smallest screen width the application is designed for. If 0, 495df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn * nothing has been specified. Comes from 496df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn * {@link android.R.styleable#AndroidManifestSupportsScreens_compatibleWidthLimitDp 497df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn * android:compatibleWidthLimitDp} attribute of the <supports-screens> tag. 498df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn */ 499df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn public int compatibleWidthLimitDp = 0; 500df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn 501df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn /** 5022762ff3dc864018352362f6d103de471f9529ba6Dianne Hackborn * The maximum smallest screen width the application will work on. If 0, 5032762ff3dc864018352362f6d103de471f9529ba6Dianne Hackborn * nothing has been specified. Comes from 5042762ff3dc864018352362f6d103de471f9529ba6Dianne Hackborn * {@link android.R.styleable#AndroidManifestSupportsScreens_largestWidthLimitDp 5052762ff3dc864018352362f6d103de471f9529ba6Dianne Hackborn * android:largestWidthLimitDp} attribute of the <supports-screens> tag. 5062762ff3dc864018352362f6d103de471f9529ba6Dianne Hackborn */ 5072762ff3dc864018352362f6d103de471f9529ba6Dianne Hackborn public int largestWidthLimitDp = 0; 5082762ff3dc864018352362f6d103de471f9529ba6Dianne Hackborn 509d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey /** {@hide} */ 510b2b9ab8354da1485178cd8d8e9d89ac915b3f269Jeff Sharkey public String volumeUuid; 511b2b9ab8354da1485178cd8d8e9d89ac915b3f269Jeff Sharkey /** {@hide} */ 512d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey public String scanSourceDir; 513d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey /** {@hide} */ 514d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey public String scanPublicSourceDir; 515d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey 5162762ff3dc864018352362f6d103de471f9529ba6Dianne Hackborn /** 5178a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey * Full path to the base APK for this application. 5189066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 5199066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public String sourceDir; 5209066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 5219066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 5228a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey * Full path to the publicly available parts of {@link #sourceDir}, 5238a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey * including resources and manifest. This may be different from 5248a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey * {@link #sourceDir} if an application is forward locked. 5259066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 5269066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public String publicSourceDir; 5278a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey 5288a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey /** 5298a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey * Full paths to zero or more split APKs that, when combined with the base 5308a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey * APK defined in {@link #sourceDir}, form a complete application. 5318a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey */ 5328a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey public String[] splitSourceDirs; 5338a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey 5348a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey /** 5358a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey * Full path to the publicly available parts of {@link #splitSourceDirs}, 5368a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey * including resources and manifest. This may be different from 5378a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey * {@link #splitSourceDirs} if an application is forward locked. 5388a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey */ 5398a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey public String[] splitPublicSourceDirs; 5408a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey 5419066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 542d1ab01682b136b586aac94334f976f03c762b3c7Kenny Root * Full paths to the locations of extra resource packages this application 543d1ab01682b136b586aac94334f976f03c762b3c7Kenny Root * uses. This field is only used if there are extra resource packages, 544d1ab01682b136b586aac94334f976f03c762b3c7Kenny Root * otherwise it is null. 545ace5a3fbfbf1b41905410925f1ea007040a7a675Kenny Root * 546ace5a3fbfbf1b41905410925f1ea007040a7a675Kenny Root * {@hide} 547d1ab01682b136b586aac94334f976f03c762b3c7Kenny Root */ 548d1ab01682b136b586aac94334f976f03c762b3c7Kenny Root public String[] resourceDirs; 549d1ab01682b136b586aac94334f976f03c762b3c7Kenny Root 550d1ab01682b136b586aac94334f976f03c762b3c7Kenny Root /** 5510f40dc923c67e8822f9157aec4f786f73848af07Robert Craig * String retrieved from the seinfo tag found in selinux policy. This value 5525e16bc5a143b46bbe9a4873adceed85a6241d1d0Robert Craig * can be overridden with a value set through the mac_permissions.xml policy 5535e16bc5a143b46bbe9a4873adceed85a6241d1d0Robert Craig * construct. This value is useful in setting an SELinux security context on 5545e16bc5a143b46bbe9a4873adceed85a6241d1d0Robert Craig * the process as well as its data directory. The String default is being used 5555e16bc5a143b46bbe9a4873adceed85a6241d1d0Robert Craig * here to represent a catchall label when no policy matches. 5560f40dc923c67e8822f9157aec4f786f73848af07Robert Craig * 5570f40dc923c67e8822f9157aec4f786f73848af07Robert Craig * {@hide} 5580f40dc923c67e8822f9157aec4f786f73848af07Robert Craig */ 5595e16bc5a143b46bbe9a4873adceed85a6241d1d0Robert Craig public String seinfo = "default"; 5600f40dc923c67e8822f9157aec4f786f73848af07Robert Craig 5610f40dc923c67e8822f9157aec4f786f73848af07Robert Craig /** 5629066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Paths to all shared libraries this application is linked against. This 5639066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * field is only set if the {@link PackageManager#GET_SHARED_LIBRARY_FILES 5649066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * PackageManager.GET_SHARED_LIBRARY_FILES} flag was used when retrieving 5659066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * the structure. 5669066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 5679066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public String[] sharedLibraryFiles; 5689066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 5699066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 57015447798a38d2b5acb1998731340255f4203f294Jeff Sharkey * Full path to a directory assigned to the package for its persistent data. 5719066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 5729066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public String dataDir; 57385387d7ba36e56b291cbde87acb5a5b2200fe01cKenny Root 57415447798a38d2b5acb1998731340255f4203f294Jeff Sharkey /** {@hide} */ 57515447798a38d2b5acb1998731340255f4203f294Jeff Sharkey public String deviceEncryptedDataDir; 57615447798a38d2b5acb1998731340255f4203f294Jeff Sharkey /** {@hide} */ 57715447798a38d2b5acb1998731340255f4203f294Jeff Sharkey public String credentialEncryptedDataDir; 57815447798a38d2b5acb1998731340255f4203f294Jeff Sharkey 57985387d7ba36e56b291cbde87acb5a5b2200fe01cKenny Root /** 58085387d7ba36e56b291cbde87acb5a5b2200fe01cKenny Root * Full path to the directory where native JNI libraries are stored. 58185387d7ba36e56b291cbde87acb5a5b2200fe01cKenny Root */ 58285387d7ba36e56b291cbde87acb5a5b2200fe01cKenny Root public String nativeLibraryDir; 58385387d7ba36e56b291cbde87acb5a5b2200fe01cKenny Root 5849066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 5857dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath * Full path where unpacked native libraries for {@link #secondaryCpuAbi} 5867dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath * are stored, if present. 5877dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath * 5887dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath * The main reason this exists is for bundled multi-arch apps, where 5897dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath * it's not trivial to calculate the location of libs for the secondary abi 5907dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath * given the location of the primary. 5917dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath * 5927dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath * TODO: Change the layout of bundled installs so that we can use 5937dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath * nativeLibraryRootDir & nativeLibraryRootRequiresIsa there as well. 5947dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath * (e.g {@code [ "/system/app-lib/Foo/arm", "/system/app-lib/Foo/arm64" ]} 5957dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath * instead of {@code [ "/system/lib/Foo", "/system/lib64/Foo" ]}. 5967dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath * 5977dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath * @hide 5987dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath */ 5997dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath public String secondaryNativeLibraryDir; 6007dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath 6017dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath /** 60284f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey * The root path where unpacked native libraries are stored. 60384f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey * <p> 60484f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey * When {@link #nativeLibraryRootRequiresIsa} is set, the libraries are 60584f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey * placed in ISA-specific subdirectories under this path, otherwise the 60684f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey * libraries are placed directly at this path. 607ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath * 60884f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey * @hide 60984f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey */ 61084f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey public String nativeLibraryRootDir; 61184f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey 61284f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey /** 61384f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey * Flag indicating that ISA must be appended to 61484f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey * {@link #nativeLibraryRootDir} to be useful. 615ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath * 61684f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey * @hide 617ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath */ 61884f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey public boolean nativeLibraryRootRequiresIsa; 619ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath 620ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath /** 621ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath * The primary ABI that this application requires, This is inferred from the ABIs 622ff0c470833b2cb4130a30895093630242d5f238dRamin Zaghi * of the native JNI libraries the application bundles. Will be {@code null} 623ff0c470833b2cb4130a30895093630242d5f238dRamin Zaghi * if this application does not require any particular ABI. 624ff0c470833b2cb4130a30895093630242d5f238dRamin Zaghi * 625ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath * If non-null, the application will always be launched with this ABI. 626ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath * 627ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath * {@hide} 628ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath */ 629ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath public String primaryCpuAbi; 630ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath 631ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath /** 632ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath * The secondary ABI for this application. Might be non-null for multi-arch 633ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath * installs. The application itself never uses this ABI, but other applications that 634ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath * use its code might. 635ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath * 636ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath * {@hide} 637ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath */ 638ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath public String secondaryCpuAbi; 639ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath 640ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath /** 6419066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * The kernel user-ID that has been assigned to this application; 6429066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * currently this is not a unique ID (multiple applications can have 6439066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * the same uid). 6449066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 6459066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public int uid; 6469066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 6478d112675879a2b83197d3b4ae4fb623abd1a1ec3Mitsuru Oshima /** 6483b3e145d3c41fd68974e08f799b1fd1f8f060cf0Dianne Hackborn * The minimum SDK version this application targets. It may run on earlier 649a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn * versions, but it knows how to work with any new behavior added at this 650a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn * version. Will be {@link android.os.Build.VERSION_CODES#CUR_DEVELOPMENT} 651a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn * if this is a development build and the app is targeting that. You should 652a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn * compare that this number is >= the SDK version number at which your 653a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn * behavior was introduced. 654a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn */ 655a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn public int targetSdkVersion; 6568472e6189cd4e0520c047bdb28457abc728b373fDianne Hackborn 6578472e6189cd4e0520c047bdb28457abc728b373fDianne Hackborn /** 6588472e6189cd4e0520c047bdb28457abc728b373fDianne Hackborn * The app's declared version code. 6598472e6189cd4e0520c047bdb28457abc728b373fDianne Hackborn * @hide 6608472e6189cd4e0520c047bdb28457abc728b373fDianne Hackborn */ 6618472e6189cd4e0520c047bdb28457abc728b373fDianne Hackborn public int versionCode; 6628472e6189cd4e0520c047bdb28457abc728b373fDianne Hackborn 663a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn /** 6649066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * When false, indicates that all components within this application are 6659066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * considered disabled, regardless of their individually set enabled status. 6669066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 6679066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public boolean enabled = true; 6689066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 66954e570f78b45d6c47578a4a2513097b590b6d43fDianne Hackborn /** 6700ac3031c159a0904e73eb4439cdc724d8df4a6e6Dianne Hackborn * For convenient access to the current enabled setting of this app. 6710ac3031c159a0904e73eb4439cdc724d8df4a6e6Dianne Hackborn * @hide 6720ac3031c159a0904e73eb4439cdc724d8df4a6e6Dianne Hackborn */ 6730ac3031c159a0904e73eb4439cdc724d8df4a6e6Dianne Hackborn public int enabledSetting = PackageManager.COMPONENT_ENABLED_STATE_DEFAULT; 6740ac3031c159a0904e73eb4439cdc724d8df4a6e6Dianne Hackborn 6750ac3031c159a0904e73eb4439cdc724d8df4a6e6Dianne Hackborn /** 67654e570f78b45d6c47578a4a2513097b590b6d43fDianne Hackborn * For convenient access to package's install location. 67754e570f78b45d6c47578a4a2513097b590b6d43fDianne Hackborn * @hide 67854e570f78b45d6c47578a4a2513097b590b6d43fDianne Hackborn */ 67954e570f78b45d6c47578a4a2513097b590b6d43fDianne Hackborn public int installLocation = PackageInfo.INSTALL_LOCATION_UNSPECIFIED; 68012d0b4cd960e18493b1dc237adbfabed432c9df5Jose Lima 6819066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public void dump(Printer pw, String prefix) { 6829066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project super.dumpFront(pw, prefix); 68312527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn if (className != null) { 68412527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn pw.println(prefix + "className=" + className); 68512527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn } 68612527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn if (permission != null) { 68712527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn pw.println(prefix + "permission=" + permission); 68812527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn } 68939792d2262352ae775091876d5488d2412a2ff92Dianne Hackborn pw.println(prefix + "processName=" + processName); 69039792d2262352ae775091876d5488d2412a2ff92Dianne Hackborn pw.println(prefix + "taskAffinity=" + taskAffinity); 69139792d2262352ae775091876d5488d2412a2ff92Dianne Hackborn pw.println(prefix + "uid=" + uid + " flags=0x" + Integer.toHexString(flags) 692b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin + " privateFlags=0x" + Integer.toHexString(privateFlags) 69339792d2262352ae775091876d5488d2412a2ff92Dianne Hackborn + " theme=0x" + Integer.toHexString(theme)); 694df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn pw.println(prefix + "requiresSmallestWidthDp=" + requiresSmallestWidthDp 6952762ff3dc864018352362f6d103de471f9529ba6Dianne Hackborn + " compatibleWidthLimitDp=" + compatibleWidthLimitDp 6962762ff3dc864018352362f6d103de471f9529ba6Dianne Hackborn + " largestWidthLimitDp=" + largestWidthLimitDp); 6979066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project pw.println(prefix + "sourceDir=" + sourceDir); 6988a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey if (!Objects.equals(sourceDir, publicSourceDir)) { 69939792d2262352ae775091876d5488d2412a2ff92Dianne Hackborn pw.println(prefix + "publicSourceDir=" + publicSourceDir); 70039792d2262352ae775091876d5488d2412a2ff92Dianne Hackborn } 7018a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey if (!ArrayUtils.isEmpty(splitSourceDirs)) { 7028a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey pw.println(prefix + "splitSourceDirs=" + Arrays.toString(splitSourceDirs)); 7038a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey } 7048a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey if (!ArrayUtils.isEmpty(splitPublicSourceDirs) 7058a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey && !Arrays.equals(splitSourceDirs, splitPublicSourceDirs)) { 7068a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey pw.println(prefix + "splitPublicSourceDirs=" + Arrays.toString(splitPublicSourceDirs)); 7078a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey } 70839792d2262352ae775091876d5488d2412a2ff92Dianne Hackborn if (resourceDirs != null) { 70939792d2262352ae775091876d5488d2412a2ff92Dianne Hackborn pw.println(prefix + "resourceDirs=" + resourceDirs); 71039792d2262352ae775091876d5488d2412a2ff92Dianne Hackborn } 7110f40dc923c67e8822f9157aec4f786f73848af07Robert Craig if (seinfo != null) { 7120f40dc923c67e8822f9157aec4f786f73848af07Robert Craig pw.println(prefix + "seinfo=" + seinfo); 7130f40dc923c67e8822f9157aec4f786f73848af07Robert Craig } 7149066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project pw.println(prefix + "dataDir=" + dataDir); 71515447798a38d2b5acb1998731340255f4203f294Jeff Sharkey pw.println(prefix + "deviceEncryptedDataDir=" + deviceEncryptedDataDir); 71615447798a38d2b5acb1998731340255f4203f294Jeff Sharkey pw.println(prefix + "credentialEncryptedDataDir=" + credentialEncryptedDataDir); 71712527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn if (sharedLibraryFiles != null) { 718dcc36bf2a4c0ce863676affcb3cbdd0586a4f888Flavio Lerda pw.println(prefix + "sharedLibraryFiles=" + Arrays.toString(sharedLibraryFiles)); 71912527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn } 7208472e6189cd4e0520c047bdb28457abc728b373fDianne Hackborn pw.println(prefix + "enabled=" + enabled + " targetSdkVersion=" + targetSdkVersion 7218472e6189cd4e0520c047bdb28457abc728b373fDianne Hackborn + " versionCode=" + versionCode); 72212527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn if (manageSpaceActivityName != null) { 72312527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn pw.println(prefix + "manageSpaceActivityName="+manageSpaceActivityName); 72412527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn } 72512527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn if (descriptionRes != 0) { 72612527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn pw.println(prefix + "description=0x"+Integer.toHexString(descriptionRes)); 72712527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn } 728269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell if (uiOptions != 0) { 729269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell pw.println(prefix + "uiOptions=0x" + Integer.toHexString(uiOptions)); 730269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell } 73159dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio pw.println(prefix + "supportsRtl=" + (hasRtlSupport() ? "true" : "false")); 732303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams if (fullBackupContent > 0) { 733303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams pw.println(prefix + "fullBackupContent=@xml/" + fullBackupContent); 734303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams } else { 735303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams pw.println(prefix + "fullBackupContent=" + (fullBackupContent < 0 ? "false" : "true")); 736303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams } 7379066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project super.dumpBack(pw, prefix); 7389066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 73959dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio 74059dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio /** 74159dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio * @return true if "supportsRtl" has been set to true in the AndroidManifest 74259dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio * @hide 74359dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio */ 74459dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio public boolean hasRtlSupport() { 74559dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio return (flags & FLAG_SUPPORTS_RTL) == FLAG_SUPPORTS_RTL; 74659dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio } 7479066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 7489066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static class DisplayNameComparator 7499066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project implements Comparator<ApplicationInfo> { 7509066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public DisplayNameComparator(PackageManager pm) { 7519066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project mPM = pm; 7529066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 7539066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 7549066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public final int compare(ApplicationInfo aa, ApplicationInfo ab) { 7559066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project CharSequence sa = mPM.getApplicationLabel(aa); 7569066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project if (sa == null) { 7579066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project sa = aa.packageName; 7589066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 7599066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project CharSequence sb = mPM.getApplicationLabel(ab); 7609066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project if (sb == null) { 7619066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project sb = ab.packageName; 7629066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 7639066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 7649066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project return sCollator.compare(sa.toString(), sb.toString()); 7659066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 7669066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 7679066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project private final Collator sCollator = Collator.getInstance(); 7689066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project private PackageManager mPM; 7699066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 7709066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 7719066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public ApplicationInfo() { 7729066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 7739066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 7749066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public ApplicationInfo(ApplicationInfo orig) { 7759066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project super(orig); 7769066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project taskAffinity = orig.taskAffinity; 7779066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project permission = orig.permission; 7789066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project processName = orig.processName; 7799066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project className = orig.className; 7809066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project theme = orig.theme; 7819066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project flags = orig.flags; 782b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin privateFlags = orig.privateFlags; 783df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn requiresSmallestWidthDp = orig.requiresSmallestWidthDp; 784df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn compatibleWidthLimitDp = orig.compatibleWidthLimitDp; 7852762ff3dc864018352362f6d103de471f9529ba6Dianne Hackborn largestWidthLimitDp = orig.largestWidthLimitDp; 786b2b9ab8354da1485178cd8d8e9d89ac915b3f269Jeff Sharkey volumeUuid = orig.volumeUuid; 7877f1a57a3e709b9e1fdb03a7a8af5f13859f7f1adJeff Sharkey scanSourceDir = orig.scanSourceDir; 7887f1a57a3e709b9e1fdb03a7a8af5f13859f7f1adJeff Sharkey scanPublicSourceDir = orig.scanPublicSourceDir; 7899066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project sourceDir = orig.sourceDir; 7909066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project publicSourceDir = orig.publicSourceDir; 7918a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey splitSourceDirs = orig.splitSourceDirs; 7928a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey splitPublicSourceDirs = orig.splitPublicSourceDirs; 79385387d7ba36e56b291cbde87acb5a5b2200fe01cKenny Root nativeLibraryDir = orig.nativeLibraryDir; 7947dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath secondaryNativeLibraryDir = orig.secondaryNativeLibraryDir; 79584f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey nativeLibraryRootDir = orig.nativeLibraryRootDir; 79684f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey nativeLibraryRootRequiresIsa = orig.nativeLibraryRootRequiresIsa; 797ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath primaryCpuAbi = orig.primaryCpuAbi; 798ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath secondaryCpuAbi = orig.secondaryCpuAbi; 799d1ab01682b136b586aac94334f976f03c762b3c7Kenny Root resourceDirs = orig.resourceDirs; 8000f40dc923c67e8822f9157aec4f786f73848af07Robert Craig seinfo = orig.seinfo; 8019066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project sharedLibraryFiles = orig.sharedLibraryFiles; 8029066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dataDir = orig.dataDir; 80315447798a38d2b5acb1998731340255f4203f294Jeff Sharkey deviceEncryptedDataDir = orig.deviceEncryptedDataDir; 80415447798a38d2b5acb1998731340255f4203f294Jeff Sharkey credentialEncryptedDataDir = orig.credentialEncryptedDataDir; 8059066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project uid = orig.uid; 806a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn targetSdkVersion = orig.targetSdkVersion; 8078472e6189cd4e0520c047bdb28457abc728b373fDianne Hackborn versionCode = orig.versionCode; 8089066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project enabled = orig.enabled; 8090ac3031c159a0904e73eb4439cdc724d8df4a6e6Dianne Hackborn enabledSetting = orig.enabledSetting; 81054e570f78b45d6c47578a4a2513097b590b6d43fDianne Hackborn installLocation = orig.installLocation; 8119066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project manageSpaceActivityName = orig.manageSpaceActivityName; 8129066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project descriptionRes = orig.descriptionRes; 813269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell uiOptions = orig.uiOptions; 814bcb0255770caa6b053da100de13beb840da71b21Christopher Tate backupAgentName = orig.backupAgentName; 815303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams fullBackupContent = orig.fullBackupContent; 8169066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 8179066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 8189066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public String toString() { 8199066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project return "ApplicationInfo{" 8209066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project + Integer.toHexString(System.identityHashCode(this)) 8219066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project + " " + packageName + "}"; 8229066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 8239066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 8249066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public int describeContents() { 8259066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project return 0; 8269066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 8279066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 8289066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public void writeToParcel(Parcel dest, int parcelableFlags) { 8299066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project super.writeToParcel(dest, parcelableFlags); 8309066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeString(taskAffinity); 8319066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeString(permission); 8329066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeString(processName); 8339066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeString(className); 8349066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeInt(theme); 8359066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeInt(flags); 836b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin dest.writeInt(privateFlags); 837df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn dest.writeInt(requiresSmallestWidthDp); 838df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn dest.writeInt(compatibleWidthLimitDp); 8392762ff3dc864018352362f6d103de471f9529ba6Dianne Hackborn dest.writeInt(largestWidthLimitDp); 840b2b9ab8354da1485178cd8d8e9d89ac915b3f269Jeff Sharkey dest.writeString(volumeUuid); 8417f1a57a3e709b9e1fdb03a7a8af5f13859f7f1adJeff Sharkey dest.writeString(scanSourceDir); 8427f1a57a3e709b9e1fdb03a7a8af5f13859f7f1adJeff Sharkey dest.writeString(scanPublicSourceDir); 8439066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeString(sourceDir); 8449066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeString(publicSourceDir); 8458a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey dest.writeStringArray(splitSourceDirs); 8468a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey dest.writeStringArray(splitPublicSourceDirs); 84785387d7ba36e56b291cbde87acb5a5b2200fe01cKenny Root dest.writeString(nativeLibraryDir); 8487dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath dest.writeString(secondaryNativeLibraryDir); 84984f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey dest.writeString(nativeLibraryRootDir); 85084f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey dest.writeInt(nativeLibraryRootRequiresIsa ? 1 : 0); 851ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath dest.writeString(primaryCpuAbi); 852ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath dest.writeString(secondaryCpuAbi); 853d1ab01682b136b586aac94334f976f03c762b3c7Kenny Root dest.writeStringArray(resourceDirs); 8540f40dc923c67e8822f9157aec4f786f73848af07Robert Craig dest.writeString(seinfo); 8559066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeStringArray(sharedLibraryFiles); 8569066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeString(dataDir); 85715447798a38d2b5acb1998731340255f4203f294Jeff Sharkey dest.writeString(deviceEncryptedDataDir); 85815447798a38d2b5acb1998731340255f4203f294Jeff Sharkey dest.writeString(credentialEncryptedDataDir); 8599066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeInt(uid); 860a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn dest.writeInt(targetSdkVersion); 8618472e6189cd4e0520c047bdb28457abc728b373fDianne Hackborn dest.writeInt(versionCode); 8629066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeInt(enabled ? 1 : 0); 8630ac3031c159a0904e73eb4439cdc724d8df4a6e6Dianne Hackborn dest.writeInt(enabledSetting); 86454e570f78b45d6c47578a4a2513097b590b6d43fDianne Hackborn dest.writeInt(installLocation); 8659066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeString(manageSpaceActivityName); 866181fafaf48208978b8ba2022683ffa78aaeddde1Christopher Tate dest.writeString(backupAgentName); 8679066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeInt(descriptionRes); 868269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell dest.writeInt(uiOptions); 869303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams dest.writeInt(fullBackupContent); 8709066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 8719066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 8729066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final Parcelable.Creator<ApplicationInfo> CREATOR 8739066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project = new Parcelable.Creator<ApplicationInfo>() { 8749066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public ApplicationInfo createFromParcel(Parcel source) { 8759066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project return new ApplicationInfo(source); 8769066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 8779066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public ApplicationInfo[] newArray(int size) { 8789066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project return new ApplicationInfo[size]; 8799066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 8809066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project }; 8819066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 8829066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project private ApplicationInfo(Parcel source) { 8839066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project super(source); 8849066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project taskAffinity = source.readString(); 8859066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project permission = source.readString(); 8869066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project processName = source.readString(); 8879066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project className = source.readString(); 8889066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project theme = source.readInt(); 8899066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project flags = source.readInt(); 890b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin privateFlags = source.readInt(); 891df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn requiresSmallestWidthDp = source.readInt(); 892df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn compatibleWidthLimitDp = source.readInt(); 8932762ff3dc864018352362f6d103de471f9529ba6Dianne Hackborn largestWidthLimitDp = source.readInt(); 894b2b9ab8354da1485178cd8d8e9d89ac915b3f269Jeff Sharkey volumeUuid = source.readString(); 8957f1a57a3e709b9e1fdb03a7a8af5f13859f7f1adJeff Sharkey scanSourceDir = source.readString(); 8967f1a57a3e709b9e1fdb03a7a8af5f13859f7f1adJeff Sharkey scanPublicSourceDir = source.readString(); 8979066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project sourceDir = source.readString(); 8989066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project publicSourceDir = source.readString(); 8998a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey splitSourceDirs = source.readStringArray(); 9008a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey splitPublicSourceDirs = source.readStringArray(); 90185387d7ba36e56b291cbde87acb5a5b2200fe01cKenny Root nativeLibraryDir = source.readString(); 9027dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath secondaryNativeLibraryDir = source.readString(); 90384f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey nativeLibraryRootDir = source.readString(); 90484f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey nativeLibraryRootRequiresIsa = source.readInt() != 0; 905ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath primaryCpuAbi = source.readString(); 906ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath secondaryCpuAbi = source.readString(); 907d1ab01682b136b586aac94334f976f03c762b3c7Kenny Root resourceDirs = source.readStringArray(); 9080f40dc923c67e8822f9157aec4f786f73848af07Robert Craig seinfo = source.readString(); 9099066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project sharedLibraryFiles = source.readStringArray(); 9109066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dataDir = source.readString(); 91115447798a38d2b5acb1998731340255f4203f294Jeff Sharkey deviceEncryptedDataDir = source.readString(); 91215447798a38d2b5acb1998731340255f4203f294Jeff Sharkey credentialEncryptedDataDir = source.readString(); 9139066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project uid = source.readInt(); 914a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn targetSdkVersion = source.readInt(); 9158472e6189cd4e0520c047bdb28457abc728b373fDianne Hackborn versionCode = source.readInt(); 9169066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project enabled = source.readInt() != 0; 9170ac3031c159a0904e73eb4439cdc724d8df4a6e6Dianne Hackborn enabledSetting = source.readInt(); 91854e570f78b45d6c47578a4a2513097b590b6d43fDianne Hackborn installLocation = source.readInt(); 9199066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project manageSpaceActivityName = source.readString(); 920181fafaf48208978b8ba2022683ffa78aaeddde1Christopher Tate backupAgentName = source.readString(); 9219066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project descriptionRes = source.readInt(); 922269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell uiOptions = source.readInt(); 923303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams fullBackupContent = source.readInt(); 9249066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 9258d112675879a2b83197d3b4ae4fb623abd1a1ec3Mitsuru Oshima 9269066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 9279066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Retrieve the textual description of the application. This 9289066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * will call back on the given PackageManager to load the description from 9299066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * the application. 9309066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * 9319066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * @param pm A PackageManager from which the label can be loaded; usually 9329066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * the PackageManager from which you originally retrieved this item. 9339066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * 9349066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * @return Returns a CharSequence containing the application's description. 9359066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * If there is no description, null is returned. 9369066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 9379066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public CharSequence loadDescription(PackageManager pm) { 9389066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project if (descriptionRes != 0) { 93907330791116513710d879c45b2f095cd314cbfd0Jeff Brown CharSequence label = pm.getText(packageName, descriptionRes, this); 9409066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project if (label != null) { 9419066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project return label; 9429066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 9439066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 9449066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project return null; 9459066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 946e5fb328825995aa33b5b7ecf8b5bee2b17f81715Mitsuru Oshima 947e5fb328825995aa33b5b7ecf8b5bee2b17f81715Mitsuru Oshima /** 948e5fb328825995aa33b5b7ecf8b5bee2b17f81715Mitsuru Oshima * Disable compatibility mode 949e5fb328825995aa33b5b7ecf8b5bee2b17f81715Mitsuru Oshima * 950e5fb328825995aa33b5b7ecf8b5bee2b17f81715Mitsuru Oshima * @hide 951e5fb328825995aa33b5b7ecf8b5bee2b17f81715Mitsuru Oshima */ 952e5fb328825995aa33b5b7ecf8b5bee2b17f81715Mitsuru Oshima public void disableCompatibilityMode() { 95369fff4a72d4dfc9208db79d773ef3ca23350287eMitsuru Oshima flags |= (FLAG_SUPPORTS_LARGE_SCREENS | FLAG_SUPPORTS_NORMAL_SCREENS | 95411b822d2a91ea17c34c0cb1c11e80a9a30d72864Dianne Hackborn FLAG_SUPPORTS_SMALL_SCREENS | FLAG_RESIZEABLE_FOR_SCREENS | 95514cee9f688c32d63d8521188e7422811629bb7c2Dianne Hackborn FLAG_SUPPORTS_SCREEN_DENSITIES | FLAG_SUPPORTS_XLARGE_SCREENS); 956e5fb328825995aa33b5b7ecf8b5bee2b17f81715Mitsuru Oshima } 95715447798a38d2b5acb1998731340255f4203f294Jeff Sharkey 95815447798a38d2b5acb1998731340255f4203f294Jeff Sharkey /** {@hide} */ 95915447798a38d2b5acb1998731340255f4203f294Jeff Sharkey public void initForUser(int userId) { 96015447798a38d2b5acb1998731340255f4203f294Jeff Sharkey uid = UserHandle.getUid(userId, UserHandle.getAppId(uid)); 96115447798a38d2b5acb1998731340255f4203f294Jeff Sharkey 96215447798a38d2b5acb1998731340255f4203f294Jeff Sharkey if ("android".equals(packageName)) { 96315447798a38d2b5acb1998731340255f4203f294Jeff Sharkey dataDir = Environment.getDataSystemDirectory().getAbsolutePath(); 96415447798a38d2b5acb1998731340255f4203f294Jeff Sharkey return; 96515447798a38d2b5acb1998731340255f4203f294Jeff Sharkey } 96615447798a38d2b5acb1998731340255f4203f294Jeff Sharkey 96715447798a38d2b5acb1998731340255f4203f294Jeff Sharkey deviceEncryptedDataDir = Environment 96815447798a38d2b5acb1998731340255f4203f294Jeff Sharkey .getDataUserDeviceEncryptedPackageDirectory(volumeUuid, userId, packageName) 96915447798a38d2b5acb1998731340255f4203f294Jeff Sharkey .getAbsolutePath(); 97015447798a38d2b5acb1998731340255f4203f294Jeff Sharkey credentialEncryptedDataDir = Environment 97115447798a38d2b5acb1998731340255f4203f294Jeff Sharkey .getDataUserCredentialEncryptedPackageDirectory(volumeUuid, userId, packageName) 97215447798a38d2b5acb1998731340255f4203f294Jeff Sharkey .getAbsolutePath(); 97315447798a38d2b5acb1998731340255f4203f294Jeff Sharkey 974e17ac1569793c333bb4dce86607a342e7c982ae7Jeff Sharkey if ((privateFlags & PRIVATE_FLAG_FORCE_DEVICE_ENCRYPTED) != 0) { 97515447798a38d2b5acb1998731340255f4203f294Jeff Sharkey dataDir = deviceEncryptedDataDir; 97615447798a38d2b5acb1998731340255f4203f294Jeff Sharkey } else { 97715447798a38d2b5acb1998731340255f4203f294Jeff Sharkey dataDir = credentialEncryptedDataDir; 97815447798a38d2b5acb1998731340255f4203f294Jeff Sharkey } 97915447798a38d2b5acb1998731340255f4203f294Jeff Sharkey } 98015447798a38d2b5acb1998731340255f4203f294Jeff Sharkey 98107330791116513710d879c45b2f095cd314cbfd0Jeff Brown /** 98207330791116513710d879c45b2f095cd314cbfd0Jeff Brown * @hide 98307330791116513710d879c45b2f095cd314cbfd0Jeff Brown */ 984a709314537164d959a18ee78768c69c4a9cb33c7Alexandra Gherghina @Override 985a709314537164d959a18ee78768c69c4a9cb33c7Alexandra Gherghina public Drawable loadDefaultIcon(PackageManager pm) { 98607330791116513710d879c45b2f095cd314cbfd0Jeff Brown if ((flags & FLAG_EXTERNAL_STORAGE) != 0 98707330791116513710d879c45b2f095cd314cbfd0Jeff Brown && isPackageUnavailable(pm)) { 98807330791116513710d879c45b2f095cd314cbfd0Jeff Brown return Resources.getSystem().getDrawable( 98907330791116513710d879c45b2f095cd314cbfd0Jeff Brown com.android.internal.R.drawable.sym_app_on_sd_unavailable_icon); 99007330791116513710d879c45b2f095cd314cbfd0Jeff Brown } 99107330791116513710d879c45b2f095cd314cbfd0Jeff Brown return pm.getDefaultActivityIcon(); 99207330791116513710d879c45b2f095cd314cbfd0Jeff Brown } 99307330791116513710d879c45b2f095cd314cbfd0Jeff Brown 99407330791116513710d879c45b2f095cd314cbfd0Jeff Brown private boolean isPackageUnavailable(PackageManager pm) { 99507330791116513710d879c45b2f095cd314cbfd0Jeff Brown try { 99607330791116513710d879c45b2f095cd314cbfd0Jeff Brown return pm.getPackageInfo(packageName, 0) == null; 99707330791116513710d879c45b2f095cd314cbfd0Jeff Brown } catch (NameNotFoundException ex) { 99807330791116513710d879c45b2f095cd314cbfd0Jeff Brown return true; 99907330791116513710d879c45b2f095cd314cbfd0Jeff Brown } 100007330791116513710d879c45b2f095cd314cbfd0Jeff Brown } 1001d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey 100207330791116513710d879c45b2f095cd314cbfd0Jeff Brown /** 100307330791116513710d879c45b2f095cd314cbfd0Jeff Brown * @hide 100407330791116513710d879c45b2f095cd314cbfd0Jeff Brown */ 1005eeea67b8c3678d882d3774edc41242c63daa60faFyodor Kupolov public boolean isForwardLocked() { 1006eeea67b8c3678d882d3774edc41242c63daa60faFyodor Kupolov return (privateFlags & ApplicationInfo.PRIVATE_FLAG_FORWARD_LOCK) != 0; 1007eeea67b8c3678d882d3774edc41242c63daa60faFyodor Kupolov } 1008eeea67b8c3678d882d3774edc41242c63daa60faFyodor Kupolov 1009eeea67b8c3678d882d3774edc41242c63daa60faFyodor Kupolov /** 1010eeea67b8c3678d882d3774edc41242c63daa60faFyodor Kupolov * @hide 1011eeea67b8c3678d882d3774edc41242c63daa60faFyodor Kupolov */ 1012b94c1657eb0140f7b91f5372a9f76de5a3d87e36Fyodor Kupolov public boolean isSystemApp() { 1013b94c1657eb0140f7b91f5372a9f76de5a3d87e36Fyodor Kupolov return (flags & ApplicationInfo.FLAG_SYSTEM) != 0; 1014b94c1657eb0140f7b91f5372a9f76de5a3d87e36Fyodor Kupolov } 1015b94c1657eb0140f7b91f5372a9f76de5a3d87e36Fyodor Kupolov 1016b94c1657eb0140f7b91f5372a9f76de5a3d87e36Fyodor Kupolov /** 1017b94c1657eb0140f7b91f5372a9f76de5a3d87e36Fyodor Kupolov * @hide 1018b94c1657eb0140f7b91f5372a9f76de5a3d87e36Fyodor Kupolov */ 1019adc1cf46045ae756d3a9ccbccf6b0f894e4c1eddSvet Ganov public boolean isPrivilegedApp() { 1020adc1cf46045ae756d3a9ccbccf6b0f894e4c1eddSvet Ganov return (privateFlags & ApplicationInfo.PRIVATE_FLAG_PRIVILEGED) != 0; 1021adc1cf46045ae756d3a9ccbccf6b0f894e4c1eddSvet Ganov } 1022adc1cf46045ae756d3a9ccbccf6b0f894e4c1eddSvet Ganov 1023adc1cf46045ae756d3a9ccbccf6b0f894e4c1eddSvet Ganov /** 1024adc1cf46045ae756d3a9ccbccf6b0f894e4c1eddSvet Ganov * @hide 1025adc1cf46045ae756d3a9ccbccf6b0f894e4c1eddSvet Ganov */ 1026b94c1657eb0140f7b91f5372a9f76de5a3d87e36Fyodor Kupolov public boolean isUpdatedSystemApp() { 1027b94c1657eb0140f7b91f5372a9f76de5a3d87e36Fyodor Kupolov return (flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0; 1028b94c1657eb0140f7b91f5372a9f76de5a3d87e36Fyodor Kupolov } 1029b94c1657eb0140f7b91f5372a9f76de5a3d87e36Fyodor Kupolov 1030e2d45be4dae116307f8edd85eaa61134221cb8f9Jeff Sharkey /** @hide */ 1031e2d45be4dae116307f8edd85eaa61134221cb8f9Jeff Sharkey public boolean isInternal() { 1032e2d45be4dae116307f8edd85eaa61134221cb8f9Jeff Sharkey return (flags & ApplicationInfo.FLAG_EXTERNAL_STORAGE) == 0; 1033e2d45be4dae116307f8edd85eaa61134221cb8f9Jeff Sharkey } 1034e2d45be4dae116307f8edd85eaa61134221cb8f9Jeff Sharkey 1035e2d45be4dae116307f8edd85eaa61134221cb8f9Jeff Sharkey /** @hide */ 1036e2d45be4dae116307f8edd85eaa61134221cb8f9Jeff Sharkey public boolean isExternalAsec() { 1037e2d45be4dae116307f8edd85eaa61134221cb8f9Jeff Sharkey return TextUtils.isEmpty(volumeUuid) 1038e2d45be4dae116307f8edd85eaa61134221cb8f9Jeff Sharkey && (flags & ApplicationInfo.FLAG_EXTERNAL_STORAGE) != 0; 1039e2d45be4dae116307f8edd85eaa61134221cb8f9Jeff Sharkey } 1040e2d45be4dae116307f8edd85eaa61134221cb8f9Jeff Sharkey 1041b94c1657eb0140f7b91f5372a9f76de5a3d87e36Fyodor Kupolov /** 1042b94c1657eb0140f7b91f5372a9f76de5a3d87e36Fyodor Kupolov * @hide 1043b94c1657eb0140f7b91f5372a9f76de5a3d87e36Fyodor Kupolov */ 1044a4407bfceef1bdb7eb4d83990722a61082d926c9Jeff Vander Stoep public boolean isAutoPlayApp() { 1045a4407bfceef1bdb7eb4d83990722a61082d926c9Jeff Vander Stoep return (privateFlags & ApplicationInfo.PRIVATE_FLAG_AUTOPLAY) != 0; 1046a4407bfceef1bdb7eb4d83990722a61082d926c9Jeff Vander Stoep } 1047a4407bfceef1bdb7eb4d83990722a61082d926c9Jeff Vander Stoep 1048a4407bfceef1bdb7eb4d83990722a61082d926c9Jeff Vander Stoep /** 1049a4407bfceef1bdb7eb4d83990722a61082d926c9Jeff Vander Stoep * @hide 1050a4407bfceef1bdb7eb4d83990722a61082d926c9Jeff Vander Stoep */ 105107330791116513710d879c45b2f095cd314cbfd0Jeff Brown @Override protected ApplicationInfo getApplicationInfo() { 105207330791116513710d879c45b2f095cd314cbfd0Jeff Brown return this; 105307330791116513710d879c45b2f095cd314cbfd0Jeff Brown } 1054d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey 1055d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey /** {@hide} */ public void setCodePath(String codePath) { scanSourceDir = codePath; } 1056d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey /** {@hide} */ public void setBaseCodePath(String baseCodePath) { sourceDir = baseCodePath; } 1057d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey /** {@hide} */ public void setSplitCodePaths(String[] splitCodePaths) { splitSourceDirs = splitCodePaths; } 1058d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey /** {@hide} */ public void setResourcePath(String resourcePath) { scanPublicSourceDir = resourcePath; } 1059d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey /** {@hide} */ public void setBaseResourcePath(String baseResourcePath) { publicSourceDir = baseResourcePath; } 1060d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey /** {@hide} */ public void setSplitResourcePaths(String[] splitResourcePaths) { splitPublicSourceDirs = splitResourcePaths; } 1061d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey 1062d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey /** {@hide} */ public String getCodePath() { return scanSourceDir; } 1063d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey /** {@hide} */ public String getBaseCodePath() { return sourceDir; } 1064d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey /** {@hide} */ public String[] getSplitCodePaths() { return splitSourceDirs; } 1065d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey /** {@hide} */ public String getResourcePath() { return scanPublicSourceDir; } 1066d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey /** {@hide} */ public String getBaseResourcePath() { return publicSourceDir; } 1067d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey /** {@hide} */ public String[] getSplitResourcePaths() { return splitSourceDirs; } 10689066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project} 1069