ApplicationInfo.java revision 303650c9cdb7cec88e7ec20747b161d9fff10719
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; 229066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectimport android.os.Parcel; 239066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectimport android.os.Parcelable; 24e2d45be4dae116307f8edd85eaa61134221cb8f9Jeff Sharkeyimport android.text.TextUtils; 259066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectimport android.util.Printer; 269066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 278a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkeyimport com.android.internal.util.ArrayUtils; 288a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey 299066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectimport java.text.Collator; 308a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkeyimport java.util.Arrays; 319066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectimport java.util.Comparator; 328a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkeyimport java.util.Objects; 339066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 349066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project/** 359066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Information you can retrieve about a particular application. This 369066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * corresponds to information collected from the AndroidManifest.xml's 379066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * <application> tag. 389066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 399066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectpublic class ApplicationInfo extends PackageItemInfo implements Parcelable { 409066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 419066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 429066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Default task affinity of all activities in this application. See 439066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * {@link ActivityInfo#taskAffinity} for more information. This comes 449066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * from the "taskAffinity" attribute. 459066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 469066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public String taskAffinity; 479066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 489066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 499066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Optional name of a permission required to be able to access this 509066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * application's components. From the "permission" attribute. 519066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 529066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public String permission; 539066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 549066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 559066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * The name of the process this application should run in. From the 569066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * "process" attribute or, if not set, the same as 579066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * <var>packageName</var>. 589066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 599066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public String processName; 609066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 619066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 629066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Class implementing the Application object. From the "class" 639066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * attribute. 649066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 659066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public String className; 669066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 679066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 689066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * A style resource identifier (in the package's resources) of the 699066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * description of an application. From the "description" attribute 709066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * or, if not set, 0. 719066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 729066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public int descriptionRes; 739066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 749066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 759066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * A style resource identifier (in the package's resources) of the 769066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * default visual theme of the application. From the "theme" attribute 779066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * or, if not set, 0. 789066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 799066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public int theme; 809066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 819066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 829066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Class implementing the Application's manage space 839066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * functionality. From the "manageSpaceActivity" 849066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * attribute. This is an optional attribute and will be null if 85181fafaf48208978b8ba2022683ffa78aaeddde1Christopher Tate * applications don't specify it in their manifest 869066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 879066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public String manageSpaceActivityName; 889066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 899066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 90181fafaf48208978b8ba2022683ffa78aaeddde1Christopher Tate * Class implementing the Application's backup functionality. From 91181fafaf48208978b8ba2022683ffa78aaeddde1Christopher Tate * the "backupAgent" attribute. This is an optional attribute and 92181fafaf48208978b8ba2022683ffa78aaeddde1Christopher Tate * will be null if the application does not specify it in its manifest. 93181fafaf48208978b8ba2022683ffa78aaeddde1Christopher Tate * 94181fafaf48208978b8ba2022683ffa78aaeddde1Christopher Tate * <p>If android:allowBackup is set to false, this attribute is ignored. 95181fafaf48208978b8ba2022683ffa78aaeddde1Christopher Tate */ 96181fafaf48208978b8ba2022683ffa78aaeddde1Christopher Tate public String backupAgentName; 974a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate 984a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate /** 99303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams * An optional attribute that indicates the app supports automatic backup of app data. 100303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams * <p>0 is the default and means the app's entire data folder + managed external storage will 101303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams * be backed up; 102303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams * Any negative value indicates the app does not support full-data backup, though it may still 103303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams * want to participate via the traditional key/value backup API; 104303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams * A positive number specifies an xml resource in which the application has defined its backup 105303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams * include/exclude criteria. 106303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams * <p>If android:allowBackup is set to false, this attribute is ignored. 107303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams * 108303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams * @see {@link android.content.Context#getNoBackupFilesDir} 109303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams * @see {@link #FLAG_ALLOW_BACKUP} 110303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams */ 111303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams public int fullBackupContent = 0; 112303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams 113303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams /** 114269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell * The default extra UI options for activities in this application. 115269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell * Set from the {@link android.R.attr#uiOptions} attribute in the 116269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell * activity's manifest. 117269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell */ 118269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell public int uiOptions = 0; 119269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell 120269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell /** 1219066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Value for {@link #flags}: if set, this application is installed in the 1229066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * device's system image. 1239066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 1249066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final int FLAG_SYSTEM = 1<<0; 1259066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 1269066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 1279066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Value for {@link #flags}: set to true if this application would like to 1289066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * allow debugging of its 1299066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * code, even when installed on a non-development system. Comes 1309066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * from {@link android.R.styleable#AndroidManifestApplication_debuggable 1319066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * android:debuggable} of the <application> tag. 1329066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 1339066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final int FLAG_DEBUGGABLE = 1<<1; 1349066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 1359066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 1369066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Value for {@link #flags}: set to true if this application has code 1379066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * associated with it. Comes 1389066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * from {@link android.R.styleable#AndroidManifestApplication_hasCode 1399066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * android:hasCode} of the <application> tag. 1409066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 1419066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final int FLAG_HAS_CODE = 1<<2; 1429066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 1439066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 1449066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Value for {@link #flags}: set to true if this application is persistent. 1459066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Comes from {@link android.R.styleable#AndroidManifestApplication_persistent 1469066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * android:persistent} of the <application> tag. 1479066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 1489066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final int FLAG_PERSISTENT = 1<<3; 1499066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 1509066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 151181fafaf48208978b8ba2022683ffa78aaeddde1Christopher Tate * Value for {@link #flags}: set to true if this application holds the 1529066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * {@link android.Manifest.permission#FACTORY_TEST} permission and the 1539066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * device is running in factory test mode. 1549066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 1559066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final int FLAG_FACTORY_TEST = 1<<4; 1569066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 1579066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 1589066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Value for {@link #flags}: default value for the corresponding ActivityInfo flag. 1599066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Comes from {@link android.R.styleable#AndroidManifestApplication_allowTaskReparenting 1609066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * android:allowTaskReparenting} of the <application> tag. 1619066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 1629066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final int FLAG_ALLOW_TASK_REPARENTING = 1<<5; 1639066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 1649066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 1659066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Value for {@link #flags}: default value for the corresponding ActivityInfo flag. 1669066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Comes from {@link android.R.styleable#AndroidManifestApplication_allowClearUserData 1679066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * android:allowClearUserData} of the <application> tag. 1689066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 1699066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final int FLAG_ALLOW_CLEAR_USER_DATA = 1<<6; 1709066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 1719066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 172851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn * Value for {@link #flags}: this is set if this application has been 173851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn * install as an update to a built-in system application. 1749066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 1759066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final int FLAG_UPDATED_SYSTEM_APP = 1<<7; 176851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn 177851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn /** 1787f2054392e9957d3ba8579ef08c29cfb27df564eDianne Hackborn * Value for {@link #flags}: this is set of the application has specified 1797f2054392e9957d3ba8579ef08c29cfb27df564eDianne Hackborn * {@link android.R.styleable#AndroidManifestApplication_testOnly 1807f2054392e9957d3ba8579ef08c29cfb27df564eDianne Hackborn * android:testOnly} to be true. 181851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn */ 182a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn public static final int FLAG_TEST_ONLY = 1<<8; 183ade3ecad94d1f4431576f53bae26c35efbf7a2c9Dianne Hackborn 184ade3ecad94d1f4431576f53bae26c35efbf7a2c9Dianne Hackborn /** 1855c1e00b14d2ef10ec76abf3e951fa8003a67f558Dianne Hackborn * Value for {@link #flags}: true when the application's window can be 186723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn * reduced in size for smaller screens. Corresponds to 187723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn * {@link android.R.styleable#AndroidManifestSupportsScreens_smallScreens 188723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn * android:smallScreens}. 1895c1e00b14d2ef10ec76abf3e951fa8003a67f558Dianne Hackborn */ 190723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn public static final int FLAG_SUPPORTS_SMALL_SCREENS = 1<<9; 191723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn 192723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn /** 193723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn * Value for {@link #flags}: true when the application's window can be 194723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn * displayed on normal screens. Corresponds to 195723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn * {@link android.R.styleable#AndroidManifestSupportsScreens_normalScreens 196723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn * android:normalScreens}. 197723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn */ 198723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn public static final int FLAG_SUPPORTS_NORMAL_SCREENS = 1<<10; 199723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn 200723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn /** 201723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn * Value for {@link #flags}: true when the application's window can be 202723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn * increased in size for larger screens. Corresponds to 203723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn * {@link android.R.styleable#AndroidManifestSupportsScreens_largeScreens 20422ec9ab3b881d71866279ba9363c644a9e4e7164Dianne Hackborn * android:largeScreens}. 205723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn */ 206723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn public static final int FLAG_SUPPORTS_LARGE_SCREENS = 1<<11; 2075c1e00b14d2ef10ec76abf3e951fa8003a67f558Dianne Hackborn 2085c1e00b14d2ef10ec76abf3e951fa8003a67f558Dianne Hackborn /** 209c4db95c077f826585d20be2f3db4043c53d30cf5Dianne Hackborn * Value for {@link #flags}: true when the application knows how to adjust 210c4db95c077f826585d20be2f3db4043c53d30cf5Dianne Hackborn * its UI for different screen sizes. Corresponds to 211c4db95c077f826585d20be2f3db4043c53d30cf5Dianne Hackborn * {@link android.R.styleable#AndroidManifestSupportsScreens_resizeable 212c4db95c077f826585d20be2f3db4043c53d30cf5Dianne Hackborn * android:resizeable}. 213c4db95c077f826585d20be2f3db4043c53d30cf5Dianne Hackborn */ 214c4db95c077f826585d20be2f3db4043c53d30cf5Dianne Hackborn public static final int FLAG_RESIZEABLE_FOR_SCREENS = 1<<12; 215c4db95c077f826585d20be2f3db4043c53d30cf5Dianne Hackborn 216c4db95c077f826585d20be2f3db4043c53d30cf5Dianne Hackborn /** 21711b822d2a91ea17c34c0cb1c11e80a9a30d72864Dianne Hackborn * Value for {@link #flags}: true when the application knows how to 21811b822d2a91ea17c34c0cb1c11e80a9a30d72864Dianne Hackborn * accomodate different screen densities. Corresponds to 21911b822d2a91ea17c34c0cb1c11e80a9a30d72864Dianne Hackborn * {@link android.R.styleable#AndroidManifestSupportsScreens_anyDensity 22011b822d2a91ea17c34c0cb1c11e80a9a30d72864Dianne Hackborn * android:anyDensity}. 22111b822d2a91ea17c34c0cb1c11e80a9a30d72864Dianne Hackborn */ 22211b822d2a91ea17c34c0cb1c11e80a9a30d72864Dianne Hackborn public static final int FLAG_SUPPORTS_SCREEN_DENSITIES = 1<<13; 22311b822d2a91ea17c34c0cb1c11e80a9a30d72864Dianne Hackborn 22411b822d2a91ea17c34c0cb1c11e80a9a30d72864Dianne Hackborn /** 22523085b781e145ed684e7270af1d5ced6800b8effBen Cheng * Value for {@link #flags}: set to true if this application would like to 22623085b781e145ed684e7270af1d5ced6800b8effBen Cheng * request the VM to operate under the safe mode. Comes from 227ef3f5ddc2137ed99e41f00441b688fb56b855179Ben Cheng * {@link android.R.styleable#AndroidManifestApplication_vmSafeMode 228ef3f5ddc2137ed99e41f00441b688fb56b855179Ben Cheng * android:vmSafeMode} of the <application> tag. 22923085b781e145ed684e7270af1d5ced6800b8effBen Cheng */ 23023085b781e145ed684e7270af1d5ced6800b8effBen Cheng public static final int FLAG_VM_SAFE_MODE = 1<<14; 23123085b781e145ed684e7270af1d5ced6800b8effBen Cheng 23223085b781e145ed684e7270af1d5ced6800b8effBen Cheng /** 2333de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * Value for {@link #flags}: set to <code>false</code> if the application does not wish 2343de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * to permit any OS-driven backups of its data; <code>true</code> otherwise. 235181fafaf48208978b8ba2022683ffa78aaeddde1Christopher Tate * 2363de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * <p>Comes from the 2373de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * {@link android.R.styleable#AndroidManifestApplication_allowBackup android:allowBackup} 2383de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * attribute of the <application> tag. 239181fafaf48208978b8ba2022683ffa78aaeddde1Christopher Tate */ 24023085b781e145ed684e7270af1d5ced6800b8effBen Cheng public static final int FLAG_ALLOW_BACKUP = 1<<15; 2415e1ab335e6e8fbfa19c64d53880a22f472010953Christopher Tate 2425e1ab335e6e8fbfa19c64d53880a22f472010953Christopher Tate /** 2433de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * Value for {@link #flags}: set to <code>false</code> if the application must be kept 2443de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * in memory following a full-system restore operation; <code>true</code> otherwise. 2453de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * Ordinarily, during a full system restore operation each application is shut down 2463de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * following execution of its agent's onRestore() method. Setting this attribute to 2473de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * <code>false</code> prevents this. Most applications will not need to set this attribute. 2485e1ab335e6e8fbfa19c64d53880a22f472010953Christopher Tate * 2493de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * <p>If 2503de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * {@link android.R.styleable#AndroidManifestApplication_allowBackup android:allowBackup} 2513de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * is set to <code>false</code> or no 2523de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * {@link android.R.styleable#AndroidManifestApplication_backupAgent android:backupAgent} 2535e1ab335e6e8fbfa19c64d53880a22f472010953Christopher Tate * is specified, this flag will be ignored. 2545e1ab335e6e8fbfa19c64d53880a22f472010953Christopher Tate * 2553de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * <p>Comes from the 2563de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * {@link android.R.styleable#AndroidManifestApplication_killAfterRestore android:killAfterRestore} 2573de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * attribute of the <application> tag. 2585e1ab335e6e8fbfa19c64d53880a22f472010953Christopher Tate */ 25923085b781e145ed684e7270af1d5ced6800b8effBen Cheng public static final int FLAG_KILL_AFTER_RESTORE = 1<<16; 2605e1ab335e6e8fbfa19c64d53880a22f472010953Christopher Tate 2615e1ab335e6e8fbfa19c64d53880a22f472010953Christopher Tate /** 2623de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * Value for {@link #flags}: Set to <code>true</code> if the application's backup 2633de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * agent claims to be able to handle restore data even "from the future," 2643de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * i.e. from versions of the application with a versionCode greater than 2653de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * the one currently installed on the device. <i>Use with caution!</i> By default 2663de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * this attribute is <code>false</code> and the Backup Manager will ensure that data 2673de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * from "future" versions of the application are never supplied during a restore operation. 2685e1ab335e6e8fbfa19c64d53880a22f472010953Christopher Tate * 2693de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * <p>If 2703de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * {@link android.R.styleable#AndroidManifestApplication_allowBackup android:allowBackup} 2713de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * is set to <code>false</code> or no 2723de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * {@link android.R.styleable#AndroidManifestApplication_backupAgent android:backupAgent} 2735e1ab335e6e8fbfa19c64d53880a22f472010953Christopher Tate * is specified, this flag will be ignored. 2745e1ab335e6e8fbfa19c64d53880a22f472010953Christopher Tate * 2753de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * <p>Comes from the 2763de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * {@link android.R.styleable#AndroidManifestApplication_restoreAnyVersion android:restoreAnyVersion} 2773de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * attribute of the <application> tag. 2785e1ab335e6e8fbfa19c64d53880a22f472010953Christopher Tate */ 2793de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate public static final int FLAG_RESTORE_ANY_VERSION = 1<<17; 2805e1ab335e6e8fbfa19c64d53880a22f472010953Christopher Tate 281181fafaf48208978b8ba2022683ffa78aaeddde1Christopher Tate /** 2823202d380226043fa665df3c92252f791f8c52d55Dianne Hackborn * Value for {@link #flags}: Set to true if the application is 2833202d380226043fa665df3c92252f791f8c52d55Dianne Hackborn * currently installed on external/removable/unprotected storage. Such 2843202d380226043fa665df3c92252f791f8c52d55Dianne Hackborn * applications may not be available if their storage is not currently 2853202d380226043fa665df3c92252f791f8c52d55Dianne Hackborn * mounted. When the storage it is on is not available, it will look like 2863202d380226043fa665df3c92252f791f8c52d55Dianne Hackborn * the application has been uninstalled (its .apk is no longer available) 2873202d380226043fa665df3c92252f791f8c52d55Dianne Hackborn * but its persistent data is not removed. 288af8e9f4805643f90a9dc0ecfa119e0a860c12f8aSuchi Amalapurapu */ 28994c567e1e344d49168603f5a0560215a4ce735e6Dianne Hackborn public static final int FLAG_EXTERNAL_STORAGE = 1<<18; 290af8e9f4805643f90a9dc0ecfa119e0a860c12f8aSuchi Amalapurapu 291af8e9f4805643f90a9dc0ecfa119e0a860c12f8aSuchi Amalapurapu /** 29214cee9f688c32d63d8521188e7422811629bb7c2Dianne Hackborn * Value for {@link #flags}: true when the application's window can be 29314cee9f688c32d63d8521188e7422811629bb7c2Dianne Hackborn * increased in size for extra large screens. Corresponds to 29414cee9f688c32d63d8521188e7422811629bb7c2Dianne Hackborn * {@link android.R.styleable#AndroidManifestSupportsScreens_xlargeScreens 29522ec9ab3b881d71866279ba9363c644a9e4e7164Dianne Hackborn * android:xlargeScreens}. 29614cee9f688c32d63d8521188e7422811629bb7c2Dianne Hackborn */ 29714cee9f688c32d63d8521188e7422811629bb7c2Dianne Hackborn public static final int FLAG_SUPPORTS_XLARGE_SCREENS = 1<<19; 29814cee9f688c32d63d8521188e7422811629bb7c2Dianne Hackborn 29914cee9f688c32d63d8521188e7422811629bb7c2Dianne Hackborn /** 3003b81bc18bb661c02ad8074c39dab16644c1e65d0Dianne Hackborn * Value for {@link #flags}: true when the application has requested a 3013b81bc18bb661c02ad8074c39dab16644c1e65d0Dianne Hackborn * large heap for its processes. Corresponds to 3023b81bc18bb661c02ad8074c39dab16644c1e65d0Dianne Hackborn * {@link android.R.styleable#AndroidManifestApplication_largeHeap 3033b81bc18bb661c02ad8074c39dab16644c1e65d0Dianne Hackborn * android:largeHeap}. 304a3cdaa5337fa573c4c61770195d6232c2e587090Jason parks */ 3053b81bc18bb661c02ad8074c39dab16644c1e65d0Dianne Hackborn public static final int FLAG_LARGE_HEAP = 1<<20; 306a3cdaa5337fa573c4c61770195d6232c2e587090Jason parks 307a3cdaa5337fa573c4c61770195d6232c2e587090Jason parks /** 308e7f972122db87dc54e41ed1a6e417534d43bca3aDianne Hackborn * Value for {@link #flags}: true if this application's package is in 309e7f972122db87dc54e41ed1a6e417534d43bca3aDianne Hackborn * the stopped state. 310e7f972122db87dc54e41ed1a6e417534d43bca3aDianne Hackborn */ 311e7f972122db87dc54e41ed1a6e417534d43bca3aDianne Hackborn public static final int FLAG_STOPPED = 1<<21; 312e7f972122db87dc54e41ed1a6e417534d43bca3aDianne Hackborn 313e7f972122db87dc54e41ed1a6e417534d43bca3aDianne Hackborn /** 31459dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio * Value for {@link #flags}: true when the application is willing to support 31559dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio * RTL (right to left). All activities will inherit this value. 31659dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio * 31759dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio * Set from the {@link android.R.attr#supportsRtl} attribute in the 31859dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio * activity's manifest. 31959dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio * 32059dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio * Default value is false (no support for RTL). 32159dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio */ 32259dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio public static final int FLAG_SUPPORTS_RTL = 1<<22; 32359dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio 32459dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio /** 3257767eac3232ba2fb9828766813cdb481d6a97584Dianne Hackborn * Value for {@link #flags}: true if the application is currently 3267767eac3232ba2fb9828766813cdb481d6a97584Dianne Hackborn * installed for the calling user. 3277767eac3232ba2fb9828766813cdb481d6a97584Dianne Hackborn */ 3287767eac3232ba2fb9828766813cdb481d6a97584Dianne Hackborn public static final int FLAG_INSTALLED = 1<<23; 3297767eac3232ba2fb9828766813cdb481d6a97584Dianne Hackborn 3307767eac3232ba2fb9828766813cdb481d6a97584Dianne Hackborn /** 3315e03e2ca7d25b899b129baad2dd5eca6bf99d88aDianne Hackborn * Value for {@link #flags}: true if the application only has its 3325e03e2ca7d25b899b129baad2dd5eca6bf99d88aDianne Hackborn * data installed; the application package itself does not currently 3335e03e2ca7d25b899b129baad2dd5eca6bf99d88aDianne Hackborn * exist on the device. 3345e03e2ca7d25b899b129baad2dd5eca6bf99d88aDianne Hackborn */ 3355e03e2ca7d25b899b129baad2dd5eca6bf99d88aDianne Hackborn public static final int FLAG_IS_DATA_ONLY = 1<<24; 3365e03e2ca7d25b899b129baad2dd5eca6bf99d88aDianne Hackborn 3375e03e2ca7d25b899b129baad2dd5eca6bf99d88aDianne Hackborn /** 33812d0b4cd960e18493b1dc237adbfabed432c9df5Jose Lima * Value for {@link #flags}: true if the application was declared to be a game, or 33912d0b4cd960e18493b1dc237adbfabed432c9df5Jose Lima * false if it is a non-game application. 34012d0b4cd960e18493b1dc237adbfabed432c9df5Jose Lima */ 34112d0b4cd960e18493b1dc237adbfabed432c9df5Jose Lima public static final int FLAG_IS_GAME = 1<<25; 34212d0b4cd960e18493b1dc237adbfabed432c9df5Jose Lima 34312d0b4cd960e18493b1dc237adbfabed432c9df5Jose Lima /** 344d1de2567c6758e81a87c0f5eff9ff53ffebab134Christopher Tate * Value for {@link #flags}: {@code true} if the application asks that only 345d1de2567c6758e81a87c0f5eff9ff53ffebab134Christopher Tate * full-data streaming backups of its data be performed even though it defines 346d1de2567c6758e81a87c0f5eff9ff53ffebab134Christopher Tate * a {@link android.app.backup.BackupAgent BackupAgent}, which normally 347d1de2567c6758e81a87c0f5eff9ff53ffebab134Christopher Tate * indicates that the app will manage its backed-up data via incremental 348d1de2567c6758e81a87c0f5eff9ff53ffebab134Christopher Tate * key/value updates. 349d1de2567c6758e81a87c0f5eff9ff53ffebab134Christopher Tate */ 350d1de2567c6758e81a87c0f5eff9ff53ffebab134Christopher Tate public static final int FLAG_FULL_BACKUP_ONLY = 1<<26; 351d1de2567c6758e81a87c0f5eff9ff53ffebab134Christopher Tate 352d1de2567c6758e81a87c0f5eff9ff53ffebab134Christopher Tate /** 35301a959d60a2c5f04ab240513a853d7845b3a309eAlex Klyubin * Value for {@link #flags}: {@code true} if the application may use cleartext network traffic 35401a959d60a2c5f04ab240513a853d7845b3a309eAlex Klyubin * (e.g., HTTP rather than HTTPS; WebSockets rather than WebSockets Secure; XMPP, IMAP, STMP 35501a959d60a2c5f04ab240513a853d7845b3a309eAlex Klyubin * without STARTTLS or TLS). If {@code false}, the app declares that it does not intend to use 35601a959d60a2c5f04ab240513a853d7845b3a309eAlex Klyubin * cleartext network traffic, in which case platform components (e.g., HTTP stacks, 357fbf4599a8edfc31585f207c434d35200a03657b4Alex Klyubin * {@code DownloadManager}, {@code MediaPlayer}) will refuse app's requests to use cleartext 358fbf4599a8edfc31585f207c434d35200a03657b4Alex Klyubin * traffic. Third-party libraries are encouraged to honor this flag as well. 359fbf4599a8edfc31585f207c434d35200a03657b4Alex Klyubin * 360fbf4599a8edfc31585f207c434d35200a03657b4Alex Klyubin * <p>NOTE: {@code WebView} does not honor this flag. 361fbf4599a8edfc31585f207c434d35200a03657b4Alex Klyubin * 362fbf4599a8edfc31585f207c434d35200a03657b4Alex Klyubin * <p>This flag comes from 363fbf4599a8edfc31585f207c434d35200a03657b4Alex Klyubin * {@link android.R.styleable#AndroidManifestApplication_usesCleartextTraffic 364fbf4599a8edfc31585f207c434d35200a03657b4Alex Klyubin * android:usesCleartextTraffic} of the <application> tag. 36501a959d60a2c5f04ab240513a853d7845b3a309eAlex Klyubin */ 36601a959d60a2c5f04ab240513a853d7845b3a309eAlex Klyubin public static final int FLAG_USES_CLEARTEXT_TRAFFIC = 1<<27; 36701a959d60a2c5f04ab240513a853d7845b3a309eAlex Klyubin 36801a959d60a2c5f04ab240513a853d7845b3a309eAlex Klyubin /** 369ff193d642eea7128faad837d19e347cd25212c27Dmitriy Ivanov * When set installer extracts native libs from .apk files. 370ff193d642eea7128faad837d19e347cd25212c27Dmitriy Ivanov */ 371ff193d642eea7128faad837d19e347cd25212c27Dmitriy Ivanov public static final int FLAG_EXTRACT_NATIVE_LIBS = 1<<28; 372ff193d642eea7128faad837d19e347cd25212c27Dmitriy Ivanov 373ff193d642eea7128faad837d19e347cd25212c27Dmitriy Ivanov /** 374b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * Value for {@link #flags}: true if code from this application will need to be 375b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * loaded into other applications' processes. On devices that support multiple 376b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * instruction sets, this implies the code might be loaded into a process that's 377b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * using any of the devices supported instruction sets. 378b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * 379b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * <p> The system might treat such applications specially, for eg., by 380b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * extracting the application's native libraries for all supported instruction 381b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * sets or by compiling the application's dex code for all supported instruction 382b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * sets. 383b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin */ 384b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin public static final int FLAG_MULTIARCH = 1 << 31; 385b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin 386b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin /** 387b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * Flags associated with the application. Any combination of 388b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@link #FLAG_SYSTEM}, {@link #FLAG_DEBUGGABLE}, {@link #FLAG_HAS_CODE}, 389b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@link #FLAG_PERSISTENT}, {@link #FLAG_FACTORY_TEST}, and 390b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@link #FLAG_ALLOW_TASK_REPARENTING} 391b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@link #FLAG_ALLOW_CLEAR_USER_DATA}, {@link #FLAG_UPDATED_SYSTEM_APP}, 392b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@link #FLAG_TEST_ONLY}, {@link #FLAG_SUPPORTS_SMALL_SCREENS}, 393b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@link #FLAG_SUPPORTS_NORMAL_SCREENS}, 394b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@link #FLAG_SUPPORTS_LARGE_SCREENS}, {@link #FLAG_SUPPORTS_XLARGE_SCREENS}, 395b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@link #FLAG_RESIZEABLE_FOR_SCREENS}, 396b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@link #FLAG_SUPPORTS_SCREEN_DENSITIES}, {@link #FLAG_VM_SAFE_MODE}, 397b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@link #FLAG_ALLOW_BACKUP}, {@link #FLAG_KILL_AFTER_RESTORE}, 398b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@link #FLAG_RESTORE_ANY_VERSION}, {@link #FLAG_EXTERNAL_STORAGE}, 399b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@link #FLAG_LARGE_HEAP}, {@link #FLAG_STOPPED}, 400b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@link #FLAG_SUPPORTS_RTL}, {@link #FLAG_INSTALLED}, 401b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@link #FLAG_IS_DATA_ONLY}, {@link #FLAG_IS_GAME}, 4027cb000ff56babf18d39ab0aa31dfc5dcac0bf11eAlex Klyubin * {@link #FLAG_FULL_BACKUP_ONLY}, {@link #FLAG_USES_CLEARTEXT_TRAFFIC}, 4037cb000ff56babf18d39ab0aa31dfc5dcac0bf11eAlex Klyubin * {@link #FLAG_MULTIARCH}. 404b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin */ 405b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin public int flags = 0; 406b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin 407b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin /** 408b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * Value for {@link #privateFlags}: true if the application is hidden via restrictions and for 409589a1bc0b00e570db079b4b157f60229ad8ef8f9Narayan Kamath * most purposes is considered as not installed. 410589a1bc0b00e570db079b4b157f60229ad8ef8f9Narayan Kamath * {@hide} 411589a1bc0b00e570db079b4b157f60229ad8ef8f9Narayan Kamath */ 412b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin public static final int PRIVATE_FLAG_HIDDEN = 1<<0; 413589a1bc0b00e570db079b4b157f60229ad8ef8f9Narayan Kamath 414589a1bc0b00e570db079b4b157f60229ad8ef8f9Narayan Kamath /** 415b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * Value for {@link #privateFlags}: set to <code>true</code> if the application 416589a1bc0b00e570db079b4b157f60229ad8ef8f9Narayan Kamath * has reported that it is heavy-weight, and thus can not participate in 417589a1bc0b00e570db079b4b157f60229ad8ef8f9Narayan Kamath * the normal application lifecycle. 418589a1bc0b00e570db079b4b157f60229ad8ef8f9Narayan Kamath * 419589a1bc0b00e570db079b4b157f60229ad8ef8f9Narayan Kamath * <p>Comes from the 420589a1bc0b00e570db079b4b157f60229ad8ef8f9Narayan Kamath * android.R.styleable#AndroidManifestApplication_cantSaveState 421589a1bc0b00e570db079b4b157f60229ad8ef8f9Narayan Kamath * attribute of the <application> tag. 4224ce55a3987c14b939cd416e24116c6ab3c760b82Christopher Tate * 4234ce55a3987c14b939cd416e24116c6ab3c760b82Christopher Tate * {@hide} 4244ce55a3987c14b939cd416e24116c6ab3c760b82Christopher Tate */ 425b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin public static final int PRIVATE_FLAG_CANT_SAVE_STATE = 1<<1; 4264ce55a3987c14b939cd416e24116c6ab3c760b82Christopher Tate 4274ce55a3987c14b939cd416e24116c6ab3c760b82Christopher Tate /** 428b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * Value for {@link #privateFlags}: Set to true if the application has been 4293202d380226043fa665df3c92252f791f8c52d55Dianne Hackborn * installed using the forward lock option. 430af8e9f4805643f90a9dc0ecfa119e0a860c12f8aSuchi Amalapurapu * 43175e616e8203a540c860888ccff73ffaa87498c5eDianne Hackborn * NOTE: DO NOT CHANGE THIS VALUE! It is saved in packages.xml. 432b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * 433af8e9f4805643f90a9dc0ecfa119e0a860c12f8aSuchi Amalapurapu * {@hide} 434af8e9f4805643f90a9dc0ecfa119e0a860c12f8aSuchi Amalapurapu */ 435b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin public static final int PRIVATE_FLAG_FORWARD_LOCK = 1<<2; 436af8e9f4805643f90a9dc0ecfa119e0a860c12f8aSuchi Amalapurapu 437af8e9f4805643f90a9dc0ecfa119e0a860c12f8aSuchi Amalapurapu /** 438b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * Value for {@link #privateFlags}: set to {@code true} if the application 439589a1bc0b00e570db079b4b157f60229ad8ef8f9Narayan Kamath * is permitted to hold privileged permissions. 44002486b1327e3007c62d253dd89ba9db1852b87f8Dianne Hackborn * 44102486b1327e3007c62d253dd89ba9db1852b87f8Dianne Hackborn * {@hide} 44202486b1327e3007c62d253dd89ba9db1852b87f8Dianne Hackborn */ 443b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin public static final int PRIVATE_FLAG_PRIVILEGED = 1<<3; 44402486b1327e3007c62d253dd89ba9db1852b87f8Dianne Hackborn 44502486b1327e3007c62d253dd89ba9db1852b87f8Dianne Hackborn /** 446d3d8a32217d5a2d895917cfe7e1645935d228494Fabrice Di Meglio * Value for {@link #flags}: {@code true} if the application has any IntentFiler with some 447d3d8a32217d5a2d895917cfe7e1645935d228494Fabrice Di Meglio * data URI using HTTP or HTTPS with an associated VIEW action. 448d3d8a32217d5a2d895917cfe7e1645935d228494Fabrice Di Meglio * 449d3d8a32217d5a2d895917cfe7e1645935d228494Fabrice Di Meglio * {@hide} 450d3d8a32217d5a2d895917cfe7e1645935d228494Fabrice Di Meglio */ 451d3d8a32217d5a2d895917cfe7e1645935d228494Fabrice Di Meglio public static final int PRIVATE_FLAG_HAS_DOMAIN_URLS = 1<<4; 452d3d8a32217d5a2d895917cfe7e1645935d228494Fabrice Di Meglio 453d3d8a32217d5a2d895917cfe7e1645935d228494Fabrice Di Meglio /** 454b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * Private/hidden flags. See {@code PRIVATE_FLAG_...} constants. 455b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@hide} 4569066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 457b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin public int privateFlags; 458655d0e2029e6ae77a47e922dce4c4989818b8dd1Amith Yamasani 4599066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 460df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn * The required smallest screen width the application can run on. If 0, 461df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn * nothing has been specified. Comes from 462df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn * {@link android.R.styleable#AndroidManifestSupportsScreens_requiresSmallestWidthDp 463df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn * android:requiresSmallestWidthDp} attribute of the <supports-screens> tag. 464df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn */ 465df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn public int requiresSmallestWidthDp = 0; 466df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn 467df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn /** 468df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn * The maximum smallest screen width the application is designed for. If 0, 469df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn * nothing has been specified. Comes from 470df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn * {@link android.R.styleable#AndroidManifestSupportsScreens_compatibleWidthLimitDp 471df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn * android:compatibleWidthLimitDp} attribute of the <supports-screens> tag. 472df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn */ 473df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn public int compatibleWidthLimitDp = 0; 474df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn 475df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn /** 4762762ff3dc864018352362f6d103de471f9529ba6Dianne Hackborn * The maximum smallest screen width the application will work on. If 0, 4772762ff3dc864018352362f6d103de471f9529ba6Dianne Hackborn * nothing has been specified. Comes from 4782762ff3dc864018352362f6d103de471f9529ba6Dianne Hackborn * {@link android.R.styleable#AndroidManifestSupportsScreens_largestWidthLimitDp 4792762ff3dc864018352362f6d103de471f9529ba6Dianne Hackborn * android:largestWidthLimitDp} attribute of the <supports-screens> tag. 4802762ff3dc864018352362f6d103de471f9529ba6Dianne Hackborn */ 4812762ff3dc864018352362f6d103de471f9529ba6Dianne Hackborn public int largestWidthLimitDp = 0; 4822762ff3dc864018352362f6d103de471f9529ba6Dianne Hackborn 483d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey /** {@hide} */ 484b2b9ab8354da1485178cd8d8e9d89ac915b3f269Jeff Sharkey public String volumeUuid; 485b2b9ab8354da1485178cd8d8e9d89ac915b3f269Jeff Sharkey /** {@hide} */ 486d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey public String scanSourceDir; 487d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey /** {@hide} */ 488d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey public String scanPublicSourceDir; 489d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey 4902762ff3dc864018352362f6d103de471f9529ba6Dianne Hackborn /** 4918a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey * Full path to the base APK for this application. 4929066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 4939066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public String sourceDir; 4949066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 4959066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 4968a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey * Full path to the publicly available parts of {@link #sourceDir}, 4978a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey * including resources and manifest. This may be different from 4988a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey * {@link #sourceDir} if an application is forward locked. 4999066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 5009066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public String publicSourceDir; 5018a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey 5028a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey /** 5038a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey * Full paths to zero or more split APKs that, when combined with the base 5048a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey * APK defined in {@link #sourceDir}, form a complete application. 5058a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey */ 5068a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey public String[] splitSourceDirs; 5078a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey 5088a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey /** 5098a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey * Full path to the publicly available parts of {@link #splitSourceDirs}, 5108a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey * including resources and manifest. This may be different from 5118a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey * {@link #splitSourceDirs} if an application is forward locked. 5128a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey */ 5138a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey public String[] splitPublicSourceDirs; 5148a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey 5159066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 516d1ab01682b136b586aac94334f976f03c762b3c7Kenny Root * Full paths to the locations of extra resource packages this application 517d1ab01682b136b586aac94334f976f03c762b3c7Kenny Root * uses. This field is only used if there are extra resource packages, 518d1ab01682b136b586aac94334f976f03c762b3c7Kenny Root * otherwise it is null. 519ace5a3fbfbf1b41905410925f1ea007040a7a675Kenny Root * 520ace5a3fbfbf1b41905410925f1ea007040a7a675Kenny Root * {@hide} 521d1ab01682b136b586aac94334f976f03c762b3c7Kenny Root */ 522d1ab01682b136b586aac94334f976f03c762b3c7Kenny Root public String[] resourceDirs; 523d1ab01682b136b586aac94334f976f03c762b3c7Kenny Root 524d1ab01682b136b586aac94334f976f03c762b3c7Kenny Root /** 5250f40dc923c67e8822f9157aec4f786f73848af07Robert Craig * String retrieved from the seinfo tag found in selinux policy. This value 5260f40dc923c67e8822f9157aec4f786f73848af07Robert Craig * is useful in setting an SELinux security context on the process as well 5270f40dc923c67e8822f9157aec4f786f73848af07Robert Craig * as its data directory. 5280f40dc923c67e8822f9157aec4f786f73848af07Robert Craig * 5290f40dc923c67e8822f9157aec4f786f73848af07Robert Craig * {@hide} 5300f40dc923c67e8822f9157aec4f786f73848af07Robert Craig */ 5310f40dc923c67e8822f9157aec4f786f73848af07Robert Craig public String seinfo; 5320f40dc923c67e8822f9157aec4f786f73848af07Robert Craig 5330f40dc923c67e8822f9157aec4f786f73848af07Robert Craig /** 5349066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Paths to all shared libraries this application is linked against. This 5359066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * field is only set if the {@link PackageManager#GET_SHARED_LIBRARY_FILES 5369066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * PackageManager.GET_SHARED_LIBRARY_FILES} flag was used when retrieving 5379066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * the structure. 5389066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 5399066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public String[] sharedLibraryFiles; 5409066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 5419066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 5429066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Full path to a directory assigned to the package for its persistent 5439066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * data. 5449066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 5459066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public String dataDir; 54685387d7ba36e56b291cbde87acb5a5b2200fe01cKenny Root 54785387d7ba36e56b291cbde87acb5a5b2200fe01cKenny Root /** 54885387d7ba36e56b291cbde87acb5a5b2200fe01cKenny Root * Full path to the directory where native JNI libraries are stored. 54985387d7ba36e56b291cbde87acb5a5b2200fe01cKenny Root */ 55085387d7ba36e56b291cbde87acb5a5b2200fe01cKenny Root public String nativeLibraryDir; 55185387d7ba36e56b291cbde87acb5a5b2200fe01cKenny Root 5529066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 5537dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath * Full path where unpacked native libraries for {@link #secondaryCpuAbi} 5547dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath * are stored, if present. 5557dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath * 5567dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath * The main reason this exists is for bundled multi-arch apps, where 5577dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath * it's not trivial to calculate the location of libs for the secondary abi 5587dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath * given the location of the primary. 5597dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath * 5607dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath * TODO: Change the layout of bundled installs so that we can use 5617dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath * nativeLibraryRootDir & nativeLibraryRootRequiresIsa there as well. 5627dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath * (e.g {@code [ "/system/app-lib/Foo/arm", "/system/app-lib/Foo/arm64" ]} 5637dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath * instead of {@code [ "/system/lib/Foo", "/system/lib64/Foo" ]}. 5647dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath * 5657dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath * @hide 5667dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath */ 5677dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath public String secondaryNativeLibraryDir; 5687dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath 5697dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath /** 57084f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey * The root path where unpacked native libraries are stored. 57184f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey * <p> 57284f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey * When {@link #nativeLibraryRootRequiresIsa} is set, the libraries are 57384f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey * placed in ISA-specific subdirectories under this path, otherwise the 57484f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey * libraries are placed directly at this path. 575ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath * 57684f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey * @hide 57784f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey */ 57884f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey public String nativeLibraryRootDir; 57984f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey 58084f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey /** 58184f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey * Flag indicating that ISA must be appended to 58284f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey * {@link #nativeLibraryRootDir} to be useful. 583ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath * 58484f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey * @hide 585ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath */ 58684f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey public boolean nativeLibraryRootRequiresIsa; 587ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath 588ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath /** 589ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath * The primary ABI that this application requires, This is inferred from the ABIs 590ff0c470833b2cb4130a30895093630242d5f238dRamin Zaghi * of the native JNI libraries the application bundles. Will be {@code null} 591ff0c470833b2cb4130a30895093630242d5f238dRamin Zaghi * if this application does not require any particular ABI. 592ff0c470833b2cb4130a30895093630242d5f238dRamin Zaghi * 593ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath * If non-null, the application will always be launched with this ABI. 594ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath * 595ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath * {@hide} 596ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath */ 597ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath public String primaryCpuAbi; 598ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath 599ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath /** 600ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath * The secondary ABI for this application. Might be non-null for multi-arch 601ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath * installs. The application itself never uses this ABI, but other applications that 602ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath * use its code might. 603ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath * 604ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath * {@hide} 605ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath */ 606ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath public String secondaryCpuAbi; 607ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath 608ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath /** 6099066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * The kernel user-ID that has been assigned to this application; 6109066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * currently this is not a unique ID (multiple applications can have 6119066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * the same uid). 6129066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 6139066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public int uid; 6149066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 6158d112675879a2b83197d3b4ae4fb623abd1a1ec3Mitsuru Oshima /** 6163b3e145d3c41fd68974e08f799b1fd1f8f060cf0Dianne Hackborn * The minimum SDK version this application targets. It may run on earlier 617a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn * versions, but it knows how to work with any new behavior added at this 618a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn * version. Will be {@link android.os.Build.VERSION_CODES#CUR_DEVELOPMENT} 619a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn * if this is a development build and the app is targeting that. You should 620a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn * compare that this number is >= the SDK version number at which your 621a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn * behavior was introduced. 622a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn */ 623a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn public int targetSdkVersion; 6248472e6189cd4e0520c047bdb28457abc728b373fDianne Hackborn 6258472e6189cd4e0520c047bdb28457abc728b373fDianne Hackborn /** 6268472e6189cd4e0520c047bdb28457abc728b373fDianne Hackborn * The app's declared version code. 6278472e6189cd4e0520c047bdb28457abc728b373fDianne Hackborn * @hide 6288472e6189cd4e0520c047bdb28457abc728b373fDianne Hackborn */ 6298472e6189cd4e0520c047bdb28457abc728b373fDianne Hackborn public int versionCode; 6308472e6189cd4e0520c047bdb28457abc728b373fDianne Hackborn 631a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn /** 6329066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * When false, indicates that all components within this application are 6339066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * considered disabled, regardless of their individually set enabled status. 6349066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 6359066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public boolean enabled = true; 6369066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 63754e570f78b45d6c47578a4a2513097b590b6d43fDianne Hackborn /** 6380ac3031c159a0904e73eb4439cdc724d8df4a6e6Dianne Hackborn * For convenient access to the current enabled setting of this app. 6390ac3031c159a0904e73eb4439cdc724d8df4a6e6Dianne Hackborn * @hide 6400ac3031c159a0904e73eb4439cdc724d8df4a6e6Dianne Hackborn */ 6410ac3031c159a0904e73eb4439cdc724d8df4a6e6Dianne Hackborn public int enabledSetting = PackageManager.COMPONENT_ENABLED_STATE_DEFAULT; 6420ac3031c159a0904e73eb4439cdc724d8df4a6e6Dianne Hackborn 6430ac3031c159a0904e73eb4439cdc724d8df4a6e6Dianne Hackborn /** 64454e570f78b45d6c47578a4a2513097b590b6d43fDianne Hackborn * For convenient access to package's install location. 64554e570f78b45d6c47578a4a2513097b590b6d43fDianne Hackborn * @hide 64654e570f78b45d6c47578a4a2513097b590b6d43fDianne Hackborn */ 64754e570f78b45d6c47578a4a2513097b590b6d43fDianne Hackborn public int installLocation = PackageInfo.INSTALL_LOCATION_UNSPECIFIED; 64812d0b4cd960e18493b1dc237adbfabed432c9df5Jose Lima 6499b0ab65ed46be992dd71b5f811bb972168e51c36Alan Viverette /** 6509b0ab65ed46be992dd71b5f811bb972168e51c36Alan Viverette * True when the application's rendering should be hardware accelerated. 6519b0ab65ed46be992dd71b5f811bb972168e51c36Alan Viverette */ 6529b0ab65ed46be992dd71b5f811bb972168e51c36Alan Viverette public boolean hardwareAccelerated; 6539b0ab65ed46be992dd71b5f811bb972168e51c36Alan Viverette 6549066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public void dump(Printer pw, String prefix) { 6559066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project super.dumpFront(pw, prefix); 65612527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn if (className != null) { 65712527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn pw.println(prefix + "className=" + className); 65812527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn } 65912527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn if (permission != null) { 66012527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn pw.println(prefix + "permission=" + permission); 66112527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn } 66239792d2262352ae775091876d5488d2412a2ff92Dianne Hackborn pw.println(prefix + "processName=" + processName); 66339792d2262352ae775091876d5488d2412a2ff92Dianne Hackborn pw.println(prefix + "taskAffinity=" + taskAffinity); 66439792d2262352ae775091876d5488d2412a2ff92Dianne Hackborn pw.println(prefix + "uid=" + uid + " flags=0x" + Integer.toHexString(flags) 665b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin + " privateFlags=0x" + Integer.toHexString(privateFlags) 66639792d2262352ae775091876d5488d2412a2ff92Dianne Hackborn + " theme=0x" + Integer.toHexString(theme)); 667df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn pw.println(prefix + "requiresSmallestWidthDp=" + requiresSmallestWidthDp 6682762ff3dc864018352362f6d103de471f9529ba6Dianne Hackborn + " compatibleWidthLimitDp=" + compatibleWidthLimitDp 6692762ff3dc864018352362f6d103de471f9529ba6Dianne Hackborn + " largestWidthLimitDp=" + largestWidthLimitDp); 6709066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project pw.println(prefix + "sourceDir=" + sourceDir); 6718a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey if (!Objects.equals(sourceDir, publicSourceDir)) { 67239792d2262352ae775091876d5488d2412a2ff92Dianne Hackborn pw.println(prefix + "publicSourceDir=" + publicSourceDir); 67339792d2262352ae775091876d5488d2412a2ff92Dianne Hackborn } 6748a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey if (!ArrayUtils.isEmpty(splitSourceDirs)) { 6758a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey pw.println(prefix + "splitSourceDirs=" + Arrays.toString(splitSourceDirs)); 6768a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey } 6778a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey if (!ArrayUtils.isEmpty(splitPublicSourceDirs) 6788a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey && !Arrays.equals(splitSourceDirs, splitPublicSourceDirs)) { 6798a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey pw.println(prefix + "splitPublicSourceDirs=" + Arrays.toString(splitPublicSourceDirs)); 6808a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey } 68139792d2262352ae775091876d5488d2412a2ff92Dianne Hackborn if (resourceDirs != null) { 68239792d2262352ae775091876d5488d2412a2ff92Dianne Hackborn pw.println(prefix + "resourceDirs=" + resourceDirs); 68339792d2262352ae775091876d5488d2412a2ff92Dianne Hackborn } 6840f40dc923c67e8822f9157aec4f786f73848af07Robert Craig if (seinfo != null) { 6850f40dc923c67e8822f9157aec4f786f73848af07Robert Craig pw.println(prefix + "seinfo=" + seinfo); 6860f40dc923c67e8822f9157aec4f786f73848af07Robert Craig } 6879066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project pw.println(prefix + "dataDir=" + dataDir); 68812527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn if (sharedLibraryFiles != null) { 689dcc36bf2a4c0ce863676affcb3cbdd0586a4f888Flavio Lerda pw.println(prefix + "sharedLibraryFiles=" + Arrays.toString(sharedLibraryFiles)); 69012527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn } 6918472e6189cd4e0520c047bdb28457abc728b373fDianne Hackborn pw.println(prefix + "enabled=" + enabled + " targetSdkVersion=" + targetSdkVersion 6928472e6189cd4e0520c047bdb28457abc728b373fDianne Hackborn + " versionCode=" + versionCode); 6939b0ab65ed46be992dd71b5f811bb972168e51c36Alan Viverette pw.println(prefix + "hardwareAccelerated=" + hardwareAccelerated); 69412527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn if (manageSpaceActivityName != null) { 69512527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn pw.println(prefix + "manageSpaceActivityName="+manageSpaceActivityName); 69612527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn } 69712527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn if (descriptionRes != 0) { 69812527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn pw.println(prefix + "description=0x"+Integer.toHexString(descriptionRes)); 69912527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn } 700269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell if (uiOptions != 0) { 701269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell pw.println(prefix + "uiOptions=0x" + Integer.toHexString(uiOptions)); 702269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell } 70359dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio pw.println(prefix + "supportsRtl=" + (hasRtlSupport() ? "true" : "false")); 704303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams if (fullBackupContent > 0) { 705303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams pw.println(prefix + "fullBackupContent=@xml/" + fullBackupContent); 706303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams } else { 707303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams pw.println(prefix + "fullBackupContent=" + (fullBackupContent < 0 ? "false" : "true")); 708303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams } 7099066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project super.dumpBack(pw, prefix); 7109066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 71159dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio 71259dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio /** 71359dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio * @return true if "supportsRtl" has been set to true in the AndroidManifest 71459dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio * @hide 71559dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio */ 71659dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio public boolean hasRtlSupport() { 71759dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio return (flags & FLAG_SUPPORTS_RTL) == FLAG_SUPPORTS_RTL; 71859dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio } 7199066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 7209066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static class DisplayNameComparator 7219066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project implements Comparator<ApplicationInfo> { 7229066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public DisplayNameComparator(PackageManager pm) { 7239066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project mPM = pm; 7249066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 7259066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 7269066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public final int compare(ApplicationInfo aa, ApplicationInfo ab) { 7279066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project CharSequence sa = mPM.getApplicationLabel(aa); 7289066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project if (sa == null) { 7299066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project sa = aa.packageName; 7309066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 7319066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project CharSequence sb = mPM.getApplicationLabel(ab); 7329066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project if (sb == null) { 7339066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project sb = ab.packageName; 7349066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 7359066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 7369066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project return sCollator.compare(sa.toString(), sb.toString()); 7379066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 7389066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 7399066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project private final Collator sCollator = Collator.getInstance(); 7409066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project private PackageManager mPM; 7419066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 7429066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 7439066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public ApplicationInfo() { 7449066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 7459066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 7469066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public ApplicationInfo(ApplicationInfo orig) { 7479066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project super(orig); 7489066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project taskAffinity = orig.taskAffinity; 7499066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project permission = orig.permission; 7509066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project processName = orig.processName; 7519066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project className = orig.className; 7529066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project theme = orig.theme; 7539066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project flags = orig.flags; 754b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin privateFlags = orig.privateFlags; 755df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn requiresSmallestWidthDp = orig.requiresSmallestWidthDp; 756df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn compatibleWidthLimitDp = orig.compatibleWidthLimitDp; 7572762ff3dc864018352362f6d103de471f9529ba6Dianne Hackborn largestWidthLimitDp = orig.largestWidthLimitDp; 758b2b9ab8354da1485178cd8d8e9d89ac915b3f269Jeff Sharkey volumeUuid = orig.volumeUuid; 7597f1a57a3e709b9e1fdb03a7a8af5f13859f7f1adJeff Sharkey scanSourceDir = orig.scanSourceDir; 7607f1a57a3e709b9e1fdb03a7a8af5f13859f7f1adJeff Sharkey scanPublicSourceDir = orig.scanPublicSourceDir; 7619066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project sourceDir = orig.sourceDir; 7629066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project publicSourceDir = orig.publicSourceDir; 7638a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey splitSourceDirs = orig.splitSourceDirs; 7648a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey splitPublicSourceDirs = orig.splitPublicSourceDirs; 76585387d7ba36e56b291cbde87acb5a5b2200fe01cKenny Root nativeLibraryDir = orig.nativeLibraryDir; 7667dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath secondaryNativeLibraryDir = orig.secondaryNativeLibraryDir; 76784f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey nativeLibraryRootDir = orig.nativeLibraryRootDir; 76884f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey nativeLibraryRootRequiresIsa = orig.nativeLibraryRootRequiresIsa; 769ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath primaryCpuAbi = orig.primaryCpuAbi; 770ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath secondaryCpuAbi = orig.secondaryCpuAbi; 771d1ab01682b136b586aac94334f976f03c762b3c7Kenny Root resourceDirs = orig.resourceDirs; 7720f40dc923c67e8822f9157aec4f786f73848af07Robert Craig seinfo = orig.seinfo; 7739066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project sharedLibraryFiles = orig.sharedLibraryFiles; 7749066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dataDir = orig.dataDir; 7759066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project uid = orig.uid; 776a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn targetSdkVersion = orig.targetSdkVersion; 7778472e6189cd4e0520c047bdb28457abc728b373fDianne Hackborn versionCode = orig.versionCode; 7789066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project enabled = orig.enabled; 7790ac3031c159a0904e73eb4439cdc724d8df4a6e6Dianne Hackborn enabledSetting = orig.enabledSetting; 78054e570f78b45d6c47578a4a2513097b590b6d43fDianne Hackborn installLocation = orig.installLocation; 7819066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project manageSpaceActivityName = orig.manageSpaceActivityName; 7829066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project descriptionRes = orig.descriptionRes; 783269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell uiOptions = orig.uiOptions; 784bcb0255770caa6b053da100de13beb840da71b21Christopher Tate backupAgentName = orig.backupAgentName; 7859b0ab65ed46be992dd71b5f811bb972168e51c36Alan Viverette hardwareAccelerated = orig.hardwareAccelerated; 786303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams fullBackupContent = orig.fullBackupContent; 7879066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 7889066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 7899066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 7909066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public String toString() { 7919066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project return "ApplicationInfo{" 7929066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project + Integer.toHexString(System.identityHashCode(this)) 7939066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project + " " + packageName + "}"; 7949066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 7959066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 7969066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public int describeContents() { 7979066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project return 0; 7989066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 7999066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 8009066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public void writeToParcel(Parcel dest, int parcelableFlags) { 8019066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project super.writeToParcel(dest, parcelableFlags); 8029066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeString(taskAffinity); 8039066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeString(permission); 8049066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeString(processName); 8059066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeString(className); 8069066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeInt(theme); 8079066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeInt(flags); 808b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin dest.writeInt(privateFlags); 809df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn dest.writeInt(requiresSmallestWidthDp); 810df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn dest.writeInt(compatibleWidthLimitDp); 8112762ff3dc864018352362f6d103de471f9529ba6Dianne Hackborn dest.writeInt(largestWidthLimitDp); 812b2b9ab8354da1485178cd8d8e9d89ac915b3f269Jeff Sharkey dest.writeString(volumeUuid); 8137f1a57a3e709b9e1fdb03a7a8af5f13859f7f1adJeff Sharkey dest.writeString(scanSourceDir); 8147f1a57a3e709b9e1fdb03a7a8af5f13859f7f1adJeff Sharkey dest.writeString(scanPublicSourceDir); 8159066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeString(sourceDir); 8169066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeString(publicSourceDir); 8178a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey dest.writeStringArray(splitSourceDirs); 8188a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey dest.writeStringArray(splitPublicSourceDirs); 81985387d7ba36e56b291cbde87acb5a5b2200fe01cKenny Root dest.writeString(nativeLibraryDir); 8207dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath dest.writeString(secondaryNativeLibraryDir); 82184f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey dest.writeString(nativeLibraryRootDir); 82284f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey dest.writeInt(nativeLibraryRootRequiresIsa ? 1 : 0); 823ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath dest.writeString(primaryCpuAbi); 824ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath dest.writeString(secondaryCpuAbi); 825d1ab01682b136b586aac94334f976f03c762b3c7Kenny Root dest.writeStringArray(resourceDirs); 8260f40dc923c67e8822f9157aec4f786f73848af07Robert Craig dest.writeString(seinfo); 8279066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeStringArray(sharedLibraryFiles); 8289066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeString(dataDir); 8299066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeInt(uid); 830a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn dest.writeInt(targetSdkVersion); 8318472e6189cd4e0520c047bdb28457abc728b373fDianne Hackborn dest.writeInt(versionCode); 8329066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeInt(enabled ? 1 : 0); 8330ac3031c159a0904e73eb4439cdc724d8df4a6e6Dianne Hackborn dest.writeInt(enabledSetting); 83454e570f78b45d6c47578a4a2513097b590b6d43fDianne Hackborn dest.writeInt(installLocation); 8359066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeString(manageSpaceActivityName); 836181fafaf48208978b8ba2022683ffa78aaeddde1Christopher Tate dest.writeString(backupAgentName); 8379066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeInt(descriptionRes); 838269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell dest.writeInt(uiOptions); 8399b0ab65ed46be992dd71b5f811bb972168e51c36Alan Viverette dest.writeInt(hardwareAccelerated ? 1 : 0); 840303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams dest.writeInt(fullBackupContent); 8419066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 8429066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 8439066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final Parcelable.Creator<ApplicationInfo> CREATOR 8449066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project = new Parcelable.Creator<ApplicationInfo>() { 8459066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public ApplicationInfo createFromParcel(Parcel source) { 8469066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project return new ApplicationInfo(source); 8479066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 8489066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public ApplicationInfo[] newArray(int size) { 8499066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project return new ApplicationInfo[size]; 8509066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 8519066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project }; 8529066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 8539066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project private ApplicationInfo(Parcel source) { 8549066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project super(source); 8559066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project taskAffinity = source.readString(); 8569066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project permission = source.readString(); 8579066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project processName = source.readString(); 8589066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project className = source.readString(); 8599066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project theme = source.readInt(); 8609066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project flags = source.readInt(); 861b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin privateFlags = source.readInt(); 862df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn requiresSmallestWidthDp = source.readInt(); 863df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn compatibleWidthLimitDp = source.readInt(); 8642762ff3dc864018352362f6d103de471f9529ba6Dianne Hackborn largestWidthLimitDp = source.readInt(); 865b2b9ab8354da1485178cd8d8e9d89ac915b3f269Jeff Sharkey volumeUuid = source.readString(); 8667f1a57a3e709b9e1fdb03a7a8af5f13859f7f1adJeff Sharkey scanSourceDir = source.readString(); 8677f1a57a3e709b9e1fdb03a7a8af5f13859f7f1adJeff Sharkey scanPublicSourceDir = source.readString(); 8689066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project sourceDir = source.readString(); 8699066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project publicSourceDir = source.readString(); 8708a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey splitSourceDirs = source.readStringArray(); 8718a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey splitPublicSourceDirs = source.readStringArray(); 87285387d7ba36e56b291cbde87acb5a5b2200fe01cKenny Root nativeLibraryDir = source.readString(); 8737dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath secondaryNativeLibraryDir = source.readString(); 87484f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey nativeLibraryRootDir = source.readString(); 87584f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey nativeLibraryRootRequiresIsa = source.readInt() != 0; 876ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath primaryCpuAbi = source.readString(); 877ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath secondaryCpuAbi = source.readString(); 878d1ab01682b136b586aac94334f976f03c762b3c7Kenny Root resourceDirs = source.readStringArray(); 8790f40dc923c67e8822f9157aec4f786f73848af07Robert Craig seinfo = source.readString(); 8809066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project sharedLibraryFiles = source.readStringArray(); 8819066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dataDir = source.readString(); 8829066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project uid = source.readInt(); 883a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn targetSdkVersion = source.readInt(); 8848472e6189cd4e0520c047bdb28457abc728b373fDianne Hackborn versionCode = source.readInt(); 8859066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project enabled = source.readInt() != 0; 8860ac3031c159a0904e73eb4439cdc724d8df4a6e6Dianne Hackborn enabledSetting = source.readInt(); 88754e570f78b45d6c47578a4a2513097b590b6d43fDianne Hackborn installLocation = source.readInt(); 8889066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project manageSpaceActivityName = source.readString(); 889181fafaf48208978b8ba2022683ffa78aaeddde1Christopher Tate backupAgentName = source.readString(); 8909066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project descriptionRes = source.readInt(); 891269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell uiOptions = source.readInt(); 8929b0ab65ed46be992dd71b5f811bb972168e51c36Alan Viverette hardwareAccelerated = source.readInt() != 0; 893303650c9cdb7cec88e7ec20747b161d9fff10719Matthew Williams fullBackupContent = source.readInt(); 8949066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 8958d112675879a2b83197d3b4ae4fb623abd1a1ec3Mitsuru Oshima 8969066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 8979066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Retrieve the textual description of the application. This 8989066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * will call back on the given PackageManager to load the description from 8999066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * the application. 9009066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * 9019066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * @param pm A PackageManager from which the label can be loaded; usually 9029066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * the PackageManager from which you originally retrieved this item. 9039066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * 9049066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * @return Returns a CharSequence containing the application's description. 9059066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * If there is no description, null is returned. 9069066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 9079066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public CharSequence loadDescription(PackageManager pm) { 9089066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project if (descriptionRes != 0) { 90907330791116513710d879c45b2f095cd314cbfd0Jeff Brown CharSequence label = pm.getText(packageName, descriptionRes, this); 9109066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project if (label != null) { 9119066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project return label; 9129066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 9139066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 9149066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project return null; 9159066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 916e5fb328825995aa33b5b7ecf8b5bee2b17f81715Mitsuru Oshima 917e5fb328825995aa33b5b7ecf8b5bee2b17f81715Mitsuru Oshima /** 918e5fb328825995aa33b5b7ecf8b5bee2b17f81715Mitsuru Oshima * Disable compatibility mode 919e5fb328825995aa33b5b7ecf8b5bee2b17f81715Mitsuru Oshima * 920e5fb328825995aa33b5b7ecf8b5bee2b17f81715Mitsuru Oshima * @hide 921e5fb328825995aa33b5b7ecf8b5bee2b17f81715Mitsuru Oshima */ 922e5fb328825995aa33b5b7ecf8b5bee2b17f81715Mitsuru Oshima public void disableCompatibilityMode() { 92369fff4a72d4dfc9208db79d773ef3ca23350287eMitsuru Oshima flags |= (FLAG_SUPPORTS_LARGE_SCREENS | FLAG_SUPPORTS_NORMAL_SCREENS | 92411b822d2a91ea17c34c0cb1c11e80a9a30d72864Dianne Hackborn FLAG_SUPPORTS_SMALL_SCREENS | FLAG_RESIZEABLE_FOR_SCREENS | 92514cee9f688c32d63d8521188e7422811629bb7c2Dianne Hackborn FLAG_SUPPORTS_SCREEN_DENSITIES | FLAG_SUPPORTS_XLARGE_SCREENS); 926e5fb328825995aa33b5b7ecf8b5bee2b17f81715Mitsuru Oshima } 92707330791116513710d879c45b2f095cd314cbfd0Jeff Brown 92807330791116513710d879c45b2f095cd314cbfd0Jeff Brown /** 92907330791116513710d879c45b2f095cd314cbfd0Jeff Brown * @hide 93007330791116513710d879c45b2f095cd314cbfd0Jeff Brown */ 931a709314537164d959a18ee78768c69c4a9cb33c7Alexandra Gherghina @Override 932a709314537164d959a18ee78768c69c4a9cb33c7Alexandra Gherghina public Drawable loadDefaultIcon(PackageManager pm) { 93307330791116513710d879c45b2f095cd314cbfd0Jeff Brown if ((flags & FLAG_EXTERNAL_STORAGE) != 0 93407330791116513710d879c45b2f095cd314cbfd0Jeff Brown && isPackageUnavailable(pm)) { 93507330791116513710d879c45b2f095cd314cbfd0Jeff Brown return Resources.getSystem().getDrawable( 93607330791116513710d879c45b2f095cd314cbfd0Jeff Brown com.android.internal.R.drawable.sym_app_on_sd_unavailable_icon); 93707330791116513710d879c45b2f095cd314cbfd0Jeff Brown } 93807330791116513710d879c45b2f095cd314cbfd0Jeff Brown return pm.getDefaultActivityIcon(); 93907330791116513710d879c45b2f095cd314cbfd0Jeff Brown } 94007330791116513710d879c45b2f095cd314cbfd0Jeff Brown 94107330791116513710d879c45b2f095cd314cbfd0Jeff Brown private boolean isPackageUnavailable(PackageManager pm) { 94207330791116513710d879c45b2f095cd314cbfd0Jeff Brown try { 94307330791116513710d879c45b2f095cd314cbfd0Jeff Brown return pm.getPackageInfo(packageName, 0) == null; 94407330791116513710d879c45b2f095cd314cbfd0Jeff Brown } catch (NameNotFoundException ex) { 94507330791116513710d879c45b2f095cd314cbfd0Jeff Brown return true; 94607330791116513710d879c45b2f095cd314cbfd0Jeff Brown } 94707330791116513710d879c45b2f095cd314cbfd0Jeff Brown } 948d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey 94907330791116513710d879c45b2f095cd314cbfd0Jeff Brown /** 95007330791116513710d879c45b2f095cd314cbfd0Jeff Brown * @hide 95107330791116513710d879c45b2f095cd314cbfd0Jeff Brown */ 952eeea67b8c3678d882d3774edc41242c63daa60faFyodor Kupolov public boolean isForwardLocked() { 953eeea67b8c3678d882d3774edc41242c63daa60faFyodor Kupolov return (privateFlags & ApplicationInfo.PRIVATE_FLAG_FORWARD_LOCK) != 0; 954eeea67b8c3678d882d3774edc41242c63daa60faFyodor Kupolov } 955eeea67b8c3678d882d3774edc41242c63daa60faFyodor Kupolov 956eeea67b8c3678d882d3774edc41242c63daa60faFyodor Kupolov /** 957eeea67b8c3678d882d3774edc41242c63daa60faFyodor Kupolov * @hide 958eeea67b8c3678d882d3774edc41242c63daa60faFyodor Kupolov */ 959b94c1657eb0140f7b91f5372a9f76de5a3d87e36Fyodor Kupolov public boolean isSystemApp() { 960b94c1657eb0140f7b91f5372a9f76de5a3d87e36Fyodor Kupolov return (flags & ApplicationInfo.FLAG_SYSTEM) != 0; 961b94c1657eb0140f7b91f5372a9f76de5a3d87e36Fyodor Kupolov } 962b94c1657eb0140f7b91f5372a9f76de5a3d87e36Fyodor Kupolov 963b94c1657eb0140f7b91f5372a9f76de5a3d87e36Fyodor Kupolov /** 964b94c1657eb0140f7b91f5372a9f76de5a3d87e36Fyodor Kupolov * @hide 965b94c1657eb0140f7b91f5372a9f76de5a3d87e36Fyodor Kupolov */ 966b94c1657eb0140f7b91f5372a9f76de5a3d87e36Fyodor Kupolov public boolean isUpdatedSystemApp() { 967b94c1657eb0140f7b91f5372a9f76de5a3d87e36Fyodor Kupolov return (flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0; 968b94c1657eb0140f7b91f5372a9f76de5a3d87e36Fyodor Kupolov } 969b94c1657eb0140f7b91f5372a9f76de5a3d87e36Fyodor Kupolov 970e2d45be4dae116307f8edd85eaa61134221cb8f9Jeff Sharkey /** @hide */ 971e2d45be4dae116307f8edd85eaa61134221cb8f9Jeff Sharkey public boolean isInternal() { 972e2d45be4dae116307f8edd85eaa61134221cb8f9Jeff Sharkey return (flags & ApplicationInfo.FLAG_EXTERNAL_STORAGE) == 0; 973e2d45be4dae116307f8edd85eaa61134221cb8f9Jeff Sharkey } 974e2d45be4dae116307f8edd85eaa61134221cb8f9Jeff Sharkey 975e2d45be4dae116307f8edd85eaa61134221cb8f9Jeff Sharkey /** @hide */ 976e2d45be4dae116307f8edd85eaa61134221cb8f9Jeff Sharkey public boolean isExternalAsec() { 977e2d45be4dae116307f8edd85eaa61134221cb8f9Jeff Sharkey return TextUtils.isEmpty(volumeUuid) 978e2d45be4dae116307f8edd85eaa61134221cb8f9Jeff Sharkey && (flags & ApplicationInfo.FLAG_EXTERNAL_STORAGE) != 0; 979e2d45be4dae116307f8edd85eaa61134221cb8f9Jeff Sharkey } 980e2d45be4dae116307f8edd85eaa61134221cb8f9Jeff Sharkey 981b94c1657eb0140f7b91f5372a9f76de5a3d87e36Fyodor Kupolov /** 982b94c1657eb0140f7b91f5372a9f76de5a3d87e36Fyodor Kupolov * @hide 983b94c1657eb0140f7b91f5372a9f76de5a3d87e36Fyodor Kupolov */ 98407330791116513710d879c45b2f095cd314cbfd0Jeff Brown @Override protected ApplicationInfo getApplicationInfo() { 98507330791116513710d879c45b2f095cd314cbfd0Jeff Brown return this; 98607330791116513710d879c45b2f095cd314cbfd0Jeff Brown } 987d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey 988d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey /** {@hide} */ public void setCodePath(String codePath) { scanSourceDir = codePath; } 989d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey /** {@hide} */ public void setBaseCodePath(String baseCodePath) { sourceDir = baseCodePath; } 990d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey /** {@hide} */ public void setSplitCodePaths(String[] splitCodePaths) { splitSourceDirs = splitCodePaths; } 991d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey /** {@hide} */ public void setResourcePath(String resourcePath) { scanPublicSourceDir = resourcePath; } 992d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey /** {@hide} */ public void setBaseResourcePath(String baseResourcePath) { publicSourceDir = baseResourcePath; } 993d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey /** {@hide} */ public void setSplitResourcePaths(String[] splitResourcePaths) { splitPublicSourceDirs = splitResourcePaths; } 994d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey 995d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey /** {@hide} */ public String getCodePath() { return scanSourceDir; } 996d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey /** {@hide} */ public String getBaseCodePath() { return sourceDir; } 997d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey /** {@hide} */ public String[] getSplitCodePaths() { return splitSourceDirs; } 998d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey /** {@hide} */ public String getResourcePath() { return scanPublicSourceDir; } 999d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey /** {@hide} */ public String getBaseResourcePath() { return publicSourceDir; } 1000d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey /** {@hide} */ public String[] getSplitResourcePaths() { return splitSourceDirs; } 10019066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project} 1002