ApplicationInfo.java revision 01a959d60a2c5f04ab240513a853d7845b3a309e
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; 249066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectimport android.util.Printer; 259066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 268a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkeyimport com.android.internal.util.ArrayUtils; 278a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey 289066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectimport java.text.Collator; 298a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkeyimport java.util.Arrays; 309066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectimport java.util.Comparator; 318a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkeyimport java.util.Objects; 329066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 339066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project/** 349066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Information you can retrieve about a particular application. This 359066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * corresponds to information collected from the AndroidManifest.xml's 369066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * <application> tag. 379066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 389066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectpublic class ApplicationInfo extends PackageItemInfo implements Parcelable { 399066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 409066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 419066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Default task affinity of all activities in this application. See 429066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * {@link ActivityInfo#taskAffinity} for more information. This comes 439066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * from the "taskAffinity" attribute. 449066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 459066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public String taskAffinity; 469066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 479066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 489066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Optional name of a permission required to be able to access this 499066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * application's components. From the "permission" attribute. 509066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 519066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public String permission; 529066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 539066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 549066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * The name of the process this application should run in. From the 559066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * "process" attribute or, if not set, the same as 569066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * <var>packageName</var>. 579066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 589066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public String processName; 599066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 609066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 619066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Class implementing the Application object. From the "class" 629066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * attribute. 639066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 649066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public String className; 659066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 669066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 679066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * A style resource identifier (in the package's resources) of the 689066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * description of an application. From the "description" attribute 699066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * or, if not set, 0. 709066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 719066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public int descriptionRes; 729066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 739066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 749066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * A style resource identifier (in the package's resources) of the 759066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * default visual theme of the application. From the "theme" attribute 769066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * or, if not set, 0. 779066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 789066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public int theme; 799066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 809066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 819066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Class implementing the Application's manage space 829066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * functionality. From the "manageSpaceActivity" 839066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * attribute. This is an optional attribute and will be null if 84181fafaf48208978b8ba2022683ffa78aaeddde1Christopher Tate * applications don't specify it in their manifest 859066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 869066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public String manageSpaceActivityName; 879066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 889066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 89181fafaf48208978b8ba2022683ffa78aaeddde1Christopher Tate * Class implementing the Application's backup functionality. From 90181fafaf48208978b8ba2022683ffa78aaeddde1Christopher Tate * the "backupAgent" attribute. This is an optional attribute and 91181fafaf48208978b8ba2022683ffa78aaeddde1Christopher Tate * will be null if the application does not specify it in its manifest. 92181fafaf48208978b8ba2022683ffa78aaeddde1Christopher Tate * 93181fafaf48208978b8ba2022683ffa78aaeddde1Christopher Tate * <p>If android:allowBackup is set to false, this attribute is ignored. 94181fafaf48208978b8ba2022683ffa78aaeddde1Christopher Tate */ 95181fafaf48208978b8ba2022683ffa78aaeddde1Christopher Tate public String backupAgentName; 964a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate 974a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate /** 98269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell * The default extra UI options for activities in this application. 99269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell * Set from the {@link android.R.attr#uiOptions} attribute in the 100269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell * activity's manifest. 101269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell */ 102269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell public int uiOptions = 0; 103269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell 104269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell /** 1059066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Value for {@link #flags}: if set, this application is installed in the 1069066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * device's system image. 1079066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 1089066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final int FLAG_SYSTEM = 1<<0; 1099066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 1109066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 1119066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Value for {@link #flags}: set to true if this application would like to 1129066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * allow debugging of its 1139066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * code, even when installed on a non-development system. Comes 1149066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * from {@link android.R.styleable#AndroidManifestApplication_debuggable 1159066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * android:debuggable} of the <application> tag. 1169066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 1179066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final int FLAG_DEBUGGABLE = 1<<1; 1189066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 1199066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 1209066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Value for {@link #flags}: set to true if this application has code 1219066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * associated with it. Comes 1229066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * from {@link android.R.styleable#AndroidManifestApplication_hasCode 1239066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * android:hasCode} of the <application> tag. 1249066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 1259066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final int FLAG_HAS_CODE = 1<<2; 1269066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 1279066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 1289066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Value for {@link #flags}: set to true if this application is persistent. 1299066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Comes from {@link android.R.styleable#AndroidManifestApplication_persistent 1309066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * android:persistent} of the <application> tag. 1319066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 1329066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final int FLAG_PERSISTENT = 1<<3; 1339066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 1349066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 135181fafaf48208978b8ba2022683ffa78aaeddde1Christopher Tate * Value for {@link #flags}: set to true if this application holds the 1369066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * {@link android.Manifest.permission#FACTORY_TEST} permission and the 1379066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * device is running in factory test mode. 1389066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 1399066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final int FLAG_FACTORY_TEST = 1<<4; 1409066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 1419066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 1429066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Value for {@link #flags}: default value for the corresponding ActivityInfo flag. 1439066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Comes from {@link android.R.styleable#AndroidManifestApplication_allowTaskReparenting 1449066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * android:allowTaskReparenting} of the <application> tag. 1459066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 1469066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final int FLAG_ALLOW_TASK_REPARENTING = 1<<5; 1479066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 1489066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 1499066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Value for {@link #flags}: default value for the corresponding ActivityInfo flag. 1509066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Comes from {@link android.R.styleable#AndroidManifestApplication_allowClearUserData 1519066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * android:allowClearUserData} of the <application> tag. 1529066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 1539066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final int FLAG_ALLOW_CLEAR_USER_DATA = 1<<6; 1549066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 1559066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 156851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn * Value for {@link #flags}: this is set if this application has been 157851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn * install as an update to a built-in system application. 1589066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 1599066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final int FLAG_UPDATED_SYSTEM_APP = 1<<7; 160851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn 161851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn /** 1627f2054392e9957d3ba8579ef08c29cfb27df564eDianne Hackborn * Value for {@link #flags}: this is set of the application has specified 1637f2054392e9957d3ba8579ef08c29cfb27df564eDianne Hackborn * {@link android.R.styleable#AndroidManifestApplication_testOnly 1647f2054392e9957d3ba8579ef08c29cfb27df564eDianne Hackborn * android:testOnly} to be true. 165851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn */ 166a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn public static final int FLAG_TEST_ONLY = 1<<8; 167ade3ecad94d1f4431576f53bae26c35efbf7a2c9Dianne Hackborn 168ade3ecad94d1f4431576f53bae26c35efbf7a2c9Dianne Hackborn /** 1695c1e00b14d2ef10ec76abf3e951fa8003a67f558Dianne Hackborn * Value for {@link #flags}: true when the application's window can be 170723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn * reduced in size for smaller screens. Corresponds to 171723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn * {@link android.R.styleable#AndroidManifestSupportsScreens_smallScreens 172723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn * android:smallScreens}. 1735c1e00b14d2ef10ec76abf3e951fa8003a67f558Dianne Hackborn */ 174723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn public static final int FLAG_SUPPORTS_SMALL_SCREENS = 1<<9; 175723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn 176723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn /** 177723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn * Value for {@link #flags}: true when the application's window can be 178723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn * displayed on normal screens. Corresponds to 179723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn * {@link android.R.styleable#AndroidManifestSupportsScreens_normalScreens 180723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn * android:normalScreens}. 181723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn */ 182723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn public static final int FLAG_SUPPORTS_NORMAL_SCREENS = 1<<10; 183723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn 184723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn /** 185723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn * Value for {@link #flags}: true when the application's window can be 186723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn * increased in size for larger screens. Corresponds to 187723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn * {@link android.R.styleable#AndroidManifestSupportsScreens_largeScreens 18822ec9ab3b881d71866279ba9363c644a9e4e7164Dianne Hackborn * android:largeScreens}. 189723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn */ 190723738cfaec3dd7b0fe152c872c41bebf94074c4Dianne Hackborn public static final int FLAG_SUPPORTS_LARGE_SCREENS = 1<<11; 1915c1e00b14d2ef10ec76abf3e951fa8003a67f558Dianne Hackborn 1925c1e00b14d2ef10ec76abf3e951fa8003a67f558Dianne Hackborn /** 193c4db95c077f826585d20be2f3db4043c53d30cf5Dianne Hackborn * Value for {@link #flags}: true when the application knows how to adjust 194c4db95c077f826585d20be2f3db4043c53d30cf5Dianne Hackborn * its UI for different screen sizes. Corresponds to 195c4db95c077f826585d20be2f3db4043c53d30cf5Dianne Hackborn * {@link android.R.styleable#AndroidManifestSupportsScreens_resizeable 196c4db95c077f826585d20be2f3db4043c53d30cf5Dianne Hackborn * android:resizeable}. 197c4db95c077f826585d20be2f3db4043c53d30cf5Dianne Hackborn */ 198c4db95c077f826585d20be2f3db4043c53d30cf5Dianne Hackborn public static final int FLAG_RESIZEABLE_FOR_SCREENS = 1<<12; 199c4db95c077f826585d20be2f3db4043c53d30cf5Dianne Hackborn 200c4db95c077f826585d20be2f3db4043c53d30cf5Dianne Hackborn /** 20111b822d2a91ea17c34c0cb1c11e80a9a30d72864Dianne Hackborn * Value for {@link #flags}: true when the application knows how to 20211b822d2a91ea17c34c0cb1c11e80a9a30d72864Dianne Hackborn * accomodate different screen densities. Corresponds to 20311b822d2a91ea17c34c0cb1c11e80a9a30d72864Dianne Hackborn * {@link android.R.styleable#AndroidManifestSupportsScreens_anyDensity 20411b822d2a91ea17c34c0cb1c11e80a9a30d72864Dianne Hackborn * android:anyDensity}. 20511b822d2a91ea17c34c0cb1c11e80a9a30d72864Dianne Hackborn */ 20611b822d2a91ea17c34c0cb1c11e80a9a30d72864Dianne Hackborn public static final int FLAG_SUPPORTS_SCREEN_DENSITIES = 1<<13; 20711b822d2a91ea17c34c0cb1c11e80a9a30d72864Dianne Hackborn 20811b822d2a91ea17c34c0cb1c11e80a9a30d72864Dianne Hackborn /** 20923085b781e145ed684e7270af1d5ced6800b8effBen Cheng * Value for {@link #flags}: set to true if this application would like to 21023085b781e145ed684e7270af1d5ced6800b8effBen Cheng * request the VM to operate under the safe mode. Comes from 211ef3f5ddc2137ed99e41f00441b688fb56b855179Ben Cheng * {@link android.R.styleable#AndroidManifestApplication_vmSafeMode 212ef3f5ddc2137ed99e41f00441b688fb56b855179Ben Cheng * android:vmSafeMode} of the <application> tag. 21323085b781e145ed684e7270af1d5ced6800b8effBen Cheng */ 21423085b781e145ed684e7270af1d5ced6800b8effBen Cheng public static final int FLAG_VM_SAFE_MODE = 1<<14; 21523085b781e145ed684e7270af1d5ced6800b8effBen Cheng 21623085b781e145ed684e7270af1d5ced6800b8effBen Cheng /** 2173de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * Value for {@link #flags}: set to <code>false</code> if the application does not wish 2183de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * to permit any OS-driven backups of its data; <code>true</code> otherwise. 219181fafaf48208978b8ba2022683ffa78aaeddde1Christopher Tate * 2203de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * <p>Comes from the 2213de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * {@link android.R.styleable#AndroidManifestApplication_allowBackup android:allowBackup} 2223de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * attribute of the <application> tag. 223181fafaf48208978b8ba2022683ffa78aaeddde1Christopher Tate */ 22423085b781e145ed684e7270af1d5ced6800b8effBen Cheng public static final int FLAG_ALLOW_BACKUP = 1<<15; 2255e1ab335e6e8fbfa19c64d53880a22f472010953Christopher Tate 2265e1ab335e6e8fbfa19c64d53880a22f472010953Christopher Tate /** 2273de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * Value for {@link #flags}: set to <code>false</code> if the application must be kept 2283de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * in memory following a full-system restore operation; <code>true</code> otherwise. 2293de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * Ordinarily, during a full system restore operation each application is shut down 2303de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * following execution of its agent's onRestore() method. Setting this attribute to 2313de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * <code>false</code> prevents this. Most applications will not need to set this attribute. 2325e1ab335e6e8fbfa19c64d53880a22f472010953Christopher Tate * 2333de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * <p>If 2343de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * {@link android.R.styleable#AndroidManifestApplication_allowBackup android:allowBackup} 2353de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * is set to <code>false</code> or no 2363de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * {@link android.R.styleable#AndroidManifestApplication_backupAgent android:backupAgent} 2375e1ab335e6e8fbfa19c64d53880a22f472010953Christopher Tate * is specified, this flag will be ignored. 2385e1ab335e6e8fbfa19c64d53880a22f472010953Christopher Tate * 2393de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * <p>Comes from the 2403de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * {@link android.R.styleable#AndroidManifestApplication_killAfterRestore android:killAfterRestore} 2413de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * attribute of the <application> tag. 2425e1ab335e6e8fbfa19c64d53880a22f472010953Christopher Tate */ 24323085b781e145ed684e7270af1d5ced6800b8effBen Cheng public static final int FLAG_KILL_AFTER_RESTORE = 1<<16; 2445e1ab335e6e8fbfa19c64d53880a22f472010953Christopher Tate 2455e1ab335e6e8fbfa19c64d53880a22f472010953Christopher Tate /** 2463de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * Value for {@link #flags}: Set to <code>true</code> if the application's backup 2473de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * agent claims to be able to handle restore data even "from the future," 2483de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * i.e. from versions of the application with a versionCode greater than 2493de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * the one currently installed on the device. <i>Use with caution!</i> By default 2503de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * this attribute is <code>false</code> and the Backup Manager will ensure that data 2513de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * from "future" versions of the application are never supplied during a restore operation. 2525e1ab335e6e8fbfa19c64d53880a22f472010953Christopher Tate * 2533de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * <p>If 2543de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * {@link android.R.styleable#AndroidManifestApplication_allowBackup android:allowBackup} 2553de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * is set to <code>false</code> or no 2563de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * {@link android.R.styleable#AndroidManifestApplication_backupAgent android:backupAgent} 2575e1ab335e6e8fbfa19c64d53880a22f472010953Christopher Tate * is specified, this flag will be ignored. 2585e1ab335e6e8fbfa19c64d53880a22f472010953Christopher Tate * 2593de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * <p>Comes from the 2603de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * {@link android.R.styleable#AndroidManifestApplication_restoreAnyVersion android:restoreAnyVersion} 2613de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate * attribute of the <application> tag. 2625e1ab335e6e8fbfa19c64d53880a22f472010953Christopher Tate */ 2633de55bcd34afd5871816526294f9514d1adf3fe5Christopher Tate public static final int FLAG_RESTORE_ANY_VERSION = 1<<17; 2645e1ab335e6e8fbfa19c64d53880a22f472010953Christopher Tate 265181fafaf48208978b8ba2022683ffa78aaeddde1Christopher Tate /** 2663202d380226043fa665df3c92252f791f8c52d55Dianne Hackborn * Value for {@link #flags}: Set to true if the application is 2673202d380226043fa665df3c92252f791f8c52d55Dianne Hackborn * currently installed on external/removable/unprotected storage. Such 2683202d380226043fa665df3c92252f791f8c52d55Dianne Hackborn * applications may not be available if their storage is not currently 2693202d380226043fa665df3c92252f791f8c52d55Dianne Hackborn * mounted. When the storage it is on is not available, it will look like 2703202d380226043fa665df3c92252f791f8c52d55Dianne Hackborn * the application has been uninstalled (its .apk is no longer available) 2713202d380226043fa665df3c92252f791f8c52d55Dianne Hackborn * but its persistent data is not removed. 272af8e9f4805643f90a9dc0ecfa119e0a860c12f8aSuchi Amalapurapu */ 27394c567e1e344d49168603f5a0560215a4ce735e6Dianne Hackborn public static final int FLAG_EXTERNAL_STORAGE = 1<<18; 274af8e9f4805643f90a9dc0ecfa119e0a860c12f8aSuchi Amalapurapu 275af8e9f4805643f90a9dc0ecfa119e0a860c12f8aSuchi Amalapurapu /** 27614cee9f688c32d63d8521188e7422811629bb7c2Dianne Hackborn * Value for {@link #flags}: true when the application's window can be 27714cee9f688c32d63d8521188e7422811629bb7c2Dianne Hackborn * increased in size for extra large screens. Corresponds to 27814cee9f688c32d63d8521188e7422811629bb7c2Dianne Hackborn * {@link android.R.styleable#AndroidManifestSupportsScreens_xlargeScreens 27922ec9ab3b881d71866279ba9363c644a9e4e7164Dianne Hackborn * android:xlargeScreens}. 28014cee9f688c32d63d8521188e7422811629bb7c2Dianne Hackborn */ 28114cee9f688c32d63d8521188e7422811629bb7c2Dianne Hackborn public static final int FLAG_SUPPORTS_XLARGE_SCREENS = 1<<19; 28214cee9f688c32d63d8521188e7422811629bb7c2Dianne Hackborn 28314cee9f688c32d63d8521188e7422811629bb7c2Dianne Hackborn /** 2843b81bc18bb661c02ad8074c39dab16644c1e65d0Dianne Hackborn * Value for {@link #flags}: true when the application has requested a 2853b81bc18bb661c02ad8074c39dab16644c1e65d0Dianne Hackborn * large heap for its processes. Corresponds to 2863b81bc18bb661c02ad8074c39dab16644c1e65d0Dianne Hackborn * {@link android.R.styleable#AndroidManifestApplication_largeHeap 2873b81bc18bb661c02ad8074c39dab16644c1e65d0Dianne Hackborn * android:largeHeap}. 288a3cdaa5337fa573c4c61770195d6232c2e587090Jason parks */ 2893b81bc18bb661c02ad8074c39dab16644c1e65d0Dianne Hackborn public static final int FLAG_LARGE_HEAP = 1<<20; 290a3cdaa5337fa573c4c61770195d6232c2e587090Jason parks 291a3cdaa5337fa573c4c61770195d6232c2e587090Jason parks /** 292e7f972122db87dc54e41ed1a6e417534d43bca3aDianne Hackborn * Value for {@link #flags}: true if this application's package is in 293e7f972122db87dc54e41ed1a6e417534d43bca3aDianne Hackborn * the stopped state. 294e7f972122db87dc54e41ed1a6e417534d43bca3aDianne Hackborn */ 295e7f972122db87dc54e41ed1a6e417534d43bca3aDianne Hackborn public static final int FLAG_STOPPED = 1<<21; 296e7f972122db87dc54e41ed1a6e417534d43bca3aDianne Hackborn 297e7f972122db87dc54e41ed1a6e417534d43bca3aDianne Hackborn /** 29859dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio * Value for {@link #flags}: true when the application is willing to support 29959dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio * RTL (right to left). All activities will inherit this value. 30059dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio * 30159dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio * Set from the {@link android.R.attr#supportsRtl} attribute in the 30259dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio * activity's manifest. 30359dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio * 30459dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio * Default value is false (no support for RTL). 30559dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio */ 30659dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio public static final int FLAG_SUPPORTS_RTL = 1<<22; 30759dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio 30859dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio /** 3097767eac3232ba2fb9828766813cdb481d6a97584Dianne Hackborn * Value for {@link #flags}: true if the application is currently 3107767eac3232ba2fb9828766813cdb481d6a97584Dianne Hackborn * installed for the calling user. 3117767eac3232ba2fb9828766813cdb481d6a97584Dianne Hackborn */ 3127767eac3232ba2fb9828766813cdb481d6a97584Dianne Hackborn public static final int FLAG_INSTALLED = 1<<23; 3137767eac3232ba2fb9828766813cdb481d6a97584Dianne Hackborn 3147767eac3232ba2fb9828766813cdb481d6a97584Dianne Hackborn /** 3155e03e2ca7d25b899b129baad2dd5eca6bf99d88aDianne Hackborn * Value for {@link #flags}: true if the application only has its 3165e03e2ca7d25b899b129baad2dd5eca6bf99d88aDianne Hackborn * data installed; the application package itself does not currently 3175e03e2ca7d25b899b129baad2dd5eca6bf99d88aDianne Hackborn * exist on the device. 3185e03e2ca7d25b899b129baad2dd5eca6bf99d88aDianne Hackborn */ 3195e03e2ca7d25b899b129baad2dd5eca6bf99d88aDianne Hackborn public static final int FLAG_IS_DATA_ONLY = 1<<24; 3205e03e2ca7d25b899b129baad2dd5eca6bf99d88aDianne Hackborn 3215e03e2ca7d25b899b129baad2dd5eca6bf99d88aDianne Hackborn /** 32212d0b4cd960e18493b1dc237adbfabed432c9df5Jose Lima * Value for {@link #flags}: true if the application was declared to be a game, or 32312d0b4cd960e18493b1dc237adbfabed432c9df5Jose Lima * false if it is a non-game application. 32412d0b4cd960e18493b1dc237adbfabed432c9df5Jose Lima */ 32512d0b4cd960e18493b1dc237adbfabed432c9df5Jose Lima public static final int FLAG_IS_GAME = 1<<25; 32612d0b4cd960e18493b1dc237adbfabed432c9df5Jose Lima 32712d0b4cd960e18493b1dc237adbfabed432c9df5Jose Lima /** 328d1de2567c6758e81a87c0f5eff9ff53ffebab134Christopher Tate * Value for {@link #flags}: {@code true} if the application asks that only 329d1de2567c6758e81a87c0f5eff9ff53ffebab134Christopher Tate * full-data streaming backups of its data be performed even though it defines 330d1de2567c6758e81a87c0f5eff9ff53ffebab134Christopher Tate * a {@link android.app.backup.BackupAgent BackupAgent}, which normally 331d1de2567c6758e81a87c0f5eff9ff53ffebab134Christopher Tate * indicates that the app will manage its backed-up data via incremental 332d1de2567c6758e81a87c0f5eff9ff53ffebab134Christopher Tate * key/value updates. 333d1de2567c6758e81a87c0f5eff9ff53ffebab134Christopher Tate */ 334d1de2567c6758e81a87c0f5eff9ff53ffebab134Christopher Tate public static final int FLAG_FULL_BACKUP_ONLY = 1<<26; 335d1de2567c6758e81a87c0f5eff9ff53ffebab134Christopher Tate 336d1de2567c6758e81a87c0f5eff9ff53ffebab134Christopher Tate /** 33701a959d60a2c5f04ab240513a853d7845b3a309eAlex Klyubin * Value for {@link #flags}: {@code true} if the application may use cleartext network traffic 33801a959d60a2c5f04ab240513a853d7845b3a309eAlex Klyubin * (e.g., HTTP rather than HTTPS; WebSockets rather than WebSockets Secure; XMPP, IMAP, STMP 33901a959d60a2c5f04ab240513a853d7845b3a309eAlex Klyubin * without STARTTLS or TLS). If {@code false}, the app declares that it does not intend to use 34001a959d60a2c5f04ab240513a853d7845b3a309eAlex Klyubin * cleartext network traffic, in which case platform components (e.g., HTTP stacks, 34101a959d60a2c5f04ab240513a853d7845b3a309eAlex Klyubin * {@code WebView}, {@code MediaPlayer}) will refuse app's requests to use cleartext traffic. 34201a959d60a2c5f04ab240513a853d7845b3a309eAlex Klyubin * Third-party libraries are encouraged to honor this flag as well. 34301a959d60a2c5f04ab240513a853d7845b3a309eAlex Klyubin * 34401a959d60a2c5f04ab240513a853d7845b3a309eAlex Klyubin * @hide 34501a959d60a2c5f04ab240513a853d7845b3a309eAlex Klyubin */ 34601a959d60a2c5f04ab240513a853d7845b3a309eAlex Klyubin public static final int FLAG_USES_CLEARTEXT_TRAFFIC = 1<<27; 34701a959d60a2c5f04ab240513a853d7845b3a309eAlex Klyubin 34801a959d60a2c5f04ab240513a853d7845b3a309eAlex Klyubin /** 349b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * Value for {@link #flags}: true if code from this application will need to be 350b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * loaded into other applications' processes. On devices that support multiple 351b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * instruction sets, this implies the code might be loaded into a process that's 352b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * using any of the devices supported instruction sets. 353b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * 354b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * <p> The system might treat such applications specially, for eg., by 355b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * extracting the application's native libraries for all supported instruction 356b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * sets or by compiling the application's dex code for all supported instruction 357b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * sets. 358b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin */ 359b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin public static final int FLAG_MULTIARCH = 1 << 31; 360b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin 361b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin /** 362b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * Flags associated with the application. Any combination of 363b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@link #FLAG_SYSTEM}, {@link #FLAG_DEBUGGABLE}, {@link #FLAG_HAS_CODE}, 364b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@link #FLAG_PERSISTENT}, {@link #FLAG_FACTORY_TEST}, and 365b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@link #FLAG_ALLOW_TASK_REPARENTING} 366b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@link #FLAG_ALLOW_CLEAR_USER_DATA}, {@link #FLAG_UPDATED_SYSTEM_APP}, 367b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@link #FLAG_TEST_ONLY}, {@link #FLAG_SUPPORTS_SMALL_SCREENS}, 368b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@link #FLAG_SUPPORTS_NORMAL_SCREENS}, 369b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@link #FLAG_SUPPORTS_LARGE_SCREENS}, {@link #FLAG_SUPPORTS_XLARGE_SCREENS}, 370b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@link #FLAG_RESIZEABLE_FOR_SCREENS}, 371b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@link #FLAG_SUPPORTS_SCREEN_DENSITIES}, {@link #FLAG_VM_SAFE_MODE}, 372b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@link #FLAG_ALLOW_BACKUP}, {@link #FLAG_KILL_AFTER_RESTORE}, 373b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@link #FLAG_RESTORE_ANY_VERSION}, {@link #FLAG_EXTERNAL_STORAGE}, 374b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@link #FLAG_LARGE_HEAP}, {@link #FLAG_STOPPED}, 375b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@link #FLAG_SUPPORTS_RTL}, {@link #FLAG_INSTALLED}, 376b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@link #FLAG_IS_DATA_ONLY}, {@link #FLAG_IS_GAME}, 377b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@link #FLAG_FULL_BACKUP_ONLY}, {@link #FLAG_MULTIARCH}. 378b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin */ 379b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin public int flags = 0; 380b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin 381b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin /** 382b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * Value for {@link #privateFlags}: true if the application is hidden via restrictions and for 383589a1bc0b00e570db079b4b157f60229ad8ef8f9Narayan Kamath * most purposes is considered as not installed. 384589a1bc0b00e570db079b4b157f60229ad8ef8f9Narayan Kamath * {@hide} 385589a1bc0b00e570db079b4b157f60229ad8ef8f9Narayan Kamath */ 386b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin public static final int PRIVATE_FLAG_HIDDEN = 1<<0; 387589a1bc0b00e570db079b4b157f60229ad8ef8f9Narayan Kamath 388589a1bc0b00e570db079b4b157f60229ad8ef8f9Narayan Kamath /** 389b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * Value for {@link #privateFlags}: set to <code>true</code> if the application 390589a1bc0b00e570db079b4b157f60229ad8ef8f9Narayan Kamath * has reported that it is heavy-weight, and thus can not participate in 391589a1bc0b00e570db079b4b157f60229ad8ef8f9Narayan Kamath * the normal application lifecycle. 392589a1bc0b00e570db079b4b157f60229ad8ef8f9Narayan Kamath * 393589a1bc0b00e570db079b4b157f60229ad8ef8f9Narayan Kamath * <p>Comes from the 394589a1bc0b00e570db079b4b157f60229ad8ef8f9Narayan Kamath * android.R.styleable#AndroidManifestApplication_cantSaveState 395589a1bc0b00e570db079b4b157f60229ad8ef8f9Narayan Kamath * attribute of the <application> tag. 3964ce55a3987c14b939cd416e24116c6ab3c760b82Christopher Tate * 3974ce55a3987c14b939cd416e24116c6ab3c760b82Christopher Tate * {@hide} 3984ce55a3987c14b939cd416e24116c6ab3c760b82Christopher Tate */ 399b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin public static final int PRIVATE_FLAG_CANT_SAVE_STATE = 1<<1; 4004ce55a3987c14b939cd416e24116c6ab3c760b82Christopher Tate 4014ce55a3987c14b939cd416e24116c6ab3c760b82Christopher Tate /** 402b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * Value for {@link #privateFlags}: Set to true if the application has been 4033202d380226043fa665df3c92252f791f8c52d55Dianne Hackborn * installed using the forward lock option. 404af8e9f4805643f90a9dc0ecfa119e0a860c12f8aSuchi Amalapurapu * 40575e616e8203a540c860888ccff73ffaa87498c5eDianne Hackborn * NOTE: DO NOT CHANGE THIS VALUE! It is saved in packages.xml. 406b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * 407af8e9f4805643f90a9dc0ecfa119e0a860c12f8aSuchi Amalapurapu * {@hide} 408af8e9f4805643f90a9dc0ecfa119e0a860c12f8aSuchi Amalapurapu */ 409b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin public static final int PRIVATE_FLAG_FORWARD_LOCK = 1<<2; 410af8e9f4805643f90a9dc0ecfa119e0a860c12f8aSuchi Amalapurapu 411af8e9f4805643f90a9dc0ecfa119e0a860c12f8aSuchi Amalapurapu /** 412b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * Value for {@link #privateFlags}: set to {@code true} if the application 413589a1bc0b00e570db079b4b157f60229ad8ef8f9Narayan Kamath * is permitted to hold privileged permissions. 41402486b1327e3007c62d253dd89ba9db1852b87f8Dianne Hackborn * 41502486b1327e3007c62d253dd89ba9db1852b87f8Dianne Hackborn * {@hide} 41602486b1327e3007c62d253dd89ba9db1852b87f8Dianne Hackborn */ 417b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin public static final int PRIVATE_FLAG_PRIVILEGED = 1<<3; 41802486b1327e3007c62d253dd89ba9db1852b87f8Dianne Hackborn 41902486b1327e3007c62d253dd89ba9db1852b87f8Dianne Hackborn /** 420b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * Private/hidden flags. See {@code PRIVATE_FLAG_...} constants. 421b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin * {@hide} 4229066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 423b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin public int privateFlags; 424655d0e2029e6ae77a47e922dce4c4989818b8dd1Amith Yamasani 4259066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 426df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn * The required smallest screen width the application can run on. If 0, 427df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn * nothing has been specified. Comes from 428df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn * {@link android.R.styleable#AndroidManifestSupportsScreens_requiresSmallestWidthDp 429df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn * android:requiresSmallestWidthDp} attribute of the <supports-screens> tag. 430df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn */ 431df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn public int requiresSmallestWidthDp = 0; 432df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn 433df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn /** 434df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn * The maximum smallest screen width the application is designed for. If 0, 435df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn * nothing has been specified. Comes from 436df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn * {@link android.R.styleable#AndroidManifestSupportsScreens_compatibleWidthLimitDp 437df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn * android:compatibleWidthLimitDp} attribute of the <supports-screens> tag. 438df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn */ 439df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn public int compatibleWidthLimitDp = 0; 440df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn 441df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn /** 4422762ff3dc864018352362f6d103de471f9529ba6Dianne Hackborn * The maximum smallest screen width the application will work on. If 0, 4432762ff3dc864018352362f6d103de471f9529ba6Dianne Hackborn * nothing has been specified. Comes from 4442762ff3dc864018352362f6d103de471f9529ba6Dianne Hackborn * {@link android.R.styleable#AndroidManifestSupportsScreens_largestWidthLimitDp 4452762ff3dc864018352362f6d103de471f9529ba6Dianne Hackborn * android:largestWidthLimitDp} attribute of the <supports-screens> tag. 4462762ff3dc864018352362f6d103de471f9529ba6Dianne Hackborn */ 4472762ff3dc864018352362f6d103de471f9529ba6Dianne Hackborn public int largestWidthLimitDp = 0; 4482762ff3dc864018352362f6d103de471f9529ba6Dianne Hackborn 449d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey /** {@hide} */ 450d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey public String scanSourceDir; 451d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey /** {@hide} */ 452d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey public String scanPublicSourceDir; 453d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey 4542762ff3dc864018352362f6d103de471f9529ba6Dianne Hackborn /** 4558a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey * Full path to the base APK for this application. 4569066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 4579066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public String sourceDir; 4589066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 4599066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 4608a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey * Full path to the publicly available parts of {@link #sourceDir}, 4618a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey * including resources and manifest. This may be different from 4628a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey * {@link #sourceDir} if an application is forward locked. 4639066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 4649066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public String publicSourceDir; 4658a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey 4668a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey /** 4678a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey * Full paths to zero or more split APKs that, when combined with the base 4688a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey * APK defined in {@link #sourceDir}, form a complete application. 4698a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey */ 4708a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey public String[] splitSourceDirs; 4718a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey 4728a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey /** 4738a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey * Full path to the publicly available parts of {@link #splitSourceDirs}, 4748a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey * including resources and manifest. This may be different from 4758a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey * {@link #splitSourceDirs} if an application is forward locked. 4768a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey */ 4778a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey public String[] splitPublicSourceDirs; 4788a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey 4799066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 480d1ab01682b136b586aac94334f976f03c762b3c7Kenny Root * Full paths to the locations of extra resource packages this application 481d1ab01682b136b586aac94334f976f03c762b3c7Kenny Root * uses. This field is only used if there are extra resource packages, 482d1ab01682b136b586aac94334f976f03c762b3c7Kenny Root * otherwise it is null. 483ace5a3fbfbf1b41905410925f1ea007040a7a675Kenny Root * 484ace5a3fbfbf1b41905410925f1ea007040a7a675Kenny Root * {@hide} 485d1ab01682b136b586aac94334f976f03c762b3c7Kenny Root */ 486d1ab01682b136b586aac94334f976f03c762b3c7Kenny Root public String[] resourceDirs; 487d1ab01682b136b586aac94334f976f03c762b3c7Kenny Root 488d1ab01682b136b586aac94334f976f03c762b3c7Kenny Root /** 4890f40dc923c67e8822f9157aec4f786f73848af07Robert Craig * String retrieved from the seinfo tag found in selinux policy. This value 4900f40dc923c67e8822f9157aec4f786f73848af07Robert Craig * is useful in setting an SELinux security context on the process as well 4910f40dc923c67e8822f9157aec4f786f73848af07Robert Craig * as its data directory. 4920f40dc923c67e8822f9157aec4f786f73848af07Robert Craig * 4930f40dc923c67e8822f9157aec4f786f73848af07Robert Craig * {@hide} 4940f40dc923c67e8822f9157aec4f786f73848af07Robert Craig */ 4950f40dc923c67e8822f9157aec4f786f73848af07Robert Craig public String seinfo; 4960f40dc923c67e8822f9157aec4f786f73848af07Robert Craig 4970f40dc923c67e8822f9157aec4f786f73848af07Robert Craig /** 4989066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Paths to all shared libraries this application is linked against. This 4999066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * field is only set if the {@link PackageManager#GET_SHARED_LIBRARY_FILES 5009066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * PackageManager.GET_SHARED_LIBRARY_FILES} flag was used when retrieving 5019066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * the structure. 5029066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 5039066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public String[] sharedLibraryFiles; 5049066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 5059066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 5069066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Full path to a directory assigned to the package for its persistent 5079066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * data. 5089066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 5099066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public String dataDir; 51085387d7ba36e56b291cbde87acb5a5b2200fe01cKenny Root 51185387d7ba36e56b291cbde87acb5a5b2200fe01cKenny Root /** 51285387d7ba36e56b291cbde87acb5a5b2200fe01cKenny Root * Full path to the directory where native JNI libraries are stored. 51385387d7ba36e56b291cbde87acb5a5b2200fe01cKenny Root */ 51485387d7ba36e56b291cbde87acb5a5b2200fe01cKenny Root public String nativeLibraryDir; 51585387d7ba36e56b291cbde87acb5a5b2200fe01cKenny Root 5169066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 5177dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath * Full path where unpacked native libraries for {@link #secondaryCpuAbi} 5187dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath * are stored, if present. 5197dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath * 5207dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath * The main reason this exists is for bundled multi-arch apps, where 5217dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath * it's not trivial to calculate the location of libs for the secondary abi 5227dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath * given the location of the primary. 5237dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath * 5247dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath * TODO: Change the layout of bundled installs so that we can use 5257dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath * nativeLibraryRootDir & nativeLibraryRootRequiresIsa there as well. 5267dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath * (e.g {@code [ "/system/app-lib/Foo/arm", "/system/app-lib/Foo/arm64" ]} 5277dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath * instead of {@code [ "/system/lib/Foo", "/system/lib64/Foo" ]}. 5287dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath * 5297dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath * @hide 5307dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath */ 5317dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath public String secondaryNativeLibraryDir; 5327dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath 5337dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath /** 53484f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey * The root path where unpacked native libraries are stored. 53584f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey * <p> 53684f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey * When {@link #nativeLibraryRootRequiresIsa} is set, the libraries are 53784f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey * placed in ISA-specific subdirectories under this path, otherwise the 53884f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey * libraries are placed directly at this path. 539ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath * 54084f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey * @hide 54184f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey */ 54284f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey public String nativeLibraryRootDir; 54384f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey 54484f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey /** 54584f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey * Flag indicating that ISA must be appended to 54684f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey * {@link #nativeLibraryRootDir} to be useful. 547ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath * 54884f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey * @hide 549ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath */ 55084f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey public boolean nativeLibraryRootRequiresIsa; 551ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath 552ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath /** 553ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath * The primary ABI that this application requires, This is inferred from the ABIs 554ff0c470833b2cb4130a30895093630242d5f238dRamin Zaghi * of the native JNI libraries the application bundles. Will be {@code null} 555ff0c470833b2cb4130a30895093630242d5f238dRamin Zaghi * if this application does not require any particular ABI. 556ff0c470833b2cb4130a30895093630242d5f238dRamin Zaghi * 557ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath * If non-null, the application will always be launched with this ABI. 558ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath * 559ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath * {@hide} 560ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath */ 561ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath public String primaryCpuAbi; 562ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath 563ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath /** 564ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath * The secondary ABI for this application. Might be non-null for multi-arch 565ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath * installs. The application itself never uses this ABI, but other applications that 566ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath * use its code might. 567ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath * 568ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath * {@hide} 569ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath */ 570ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath public String secondaryCpuAbi; 571ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath 572ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath /** 5739066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * The kernel user-ID that has been assigned to this application; 5749066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * currently this is not a unique ID (multiple applications can have 5759066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * the same uid). 5769066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 5779066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public int uid; 5789066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 5798d112675879a2b83197d3b4ae4fb623abd1a1ec3Mitsuru Oshima /** 5803b3e145d3c41fd68974e08f799b1fd1f8f060cf0Dianne Hackborn * The minimum SDK version this application targets. It may run on earlier 581a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn * versions, but it knows how to work with any new behavior added at this 582a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn * version. Will be {@link android.os.Build.VERSION_CODES#CUR_DEVELOPMENT} 583a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn * if this is a development build and the app is targeting that. You should 584a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn * compare that this number is >= the SDK version number at which your 585a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn * behavior was introduced. 586a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn */ 587a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn public int targetSdkVersion; 5888472e6189cd4e0520c047bdb28457abc728b373fDianne Hackborn 5898472e6189cd4e0520c047bdb28457abc728b373fDianne Hackborn /** 5908472e6189cd4e0520c047bdb28457abc728b373fDianne Hackborn * The app's declared version code. 5918472e6189cd4e0520c047bdb28457abc728b373fDianne Hackborn * @hide 5928472e6189cd4e0520c047bdb28457abc728b373fDianne Hackborn */ 5938472e6189cd4e0520c047bdb28457abc728b373fDianne Hackborn public int versionCode; 5948472e6189cd4e0520c047bdb28457abc728b373fDianne Hackborn 595a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn /** 5969066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * When false, indicates that all components within this application are 5979066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * considered disabled, regardless of their individually set enabled status. 5989066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 5999066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public boolean enabled = true; 6009066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 60154e570f78b45d6c47578a4a2513097b590b6d43fDianne Hackborn /** 6020ac3031c159a0904e73eb4439cdc724d8df4a6e6Dianne Hackborn * For convenient access to the current enabled setting of this app. 6030ac3031c159a0904e73eb4439cdc724d8df4a6e6Dianne Hackborn * @hide 6040ac3031c159a0904e73eb4439cdc724d8df4a6e6Dianne Hackborn */ 6050ac3031c159a0904e73eb4439cdc724d8df4a6e6Dianne Hackborn public int enabledSetting = PackageManager.COMPONENT_ENABLED_STATE_DEFAULT; 6060ac3031c159a0904e73eb4439cdc724d8df4a6e6Dianne Hackborn 6070ac3031c159a0904e73eb4439cdc724d8df4a6e6Dianne Hackborn /** 60854e570f78b45d6c47578a4a2513097b590b6d43fDianne Hackborn * For convenient access to package's install location. 60954e570f78b45d6c47578a4a2513097b590b6d43fDianne Hackborn * @hide 61054e570f78b45d6c47578a4a2513097b590b6d43fDianne Hackborn */ 61154e570f78b45d6c47578a4a2513097b590b6d43fDianne Hackborn public int installLocation = PackageInfo.INSTALL_LOCATION_UNSPECIFIED; 61212d0b4cd960e18493b1dc237adbfabed432c9df5Jose Lima 6139066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public void dump(Printer pw, String prefix) { 6149066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project super.dumpFront(pw, prefix); 61512527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn if (className != null) { 61612527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn pw.println(prefix + "className=" + className); 61712527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn } 61812527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn if (permission != null) { 61912527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn pw.println(prefix + "permission=" + permission); 62012527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn } 62139792d2262352ae775091876d5488d2412a2ff92Dianne Hackborn pw.println(prefix + "processName=" + processName); 62239792d2262352ae775091876d5488d2412a2ff92Dianne Hackborn pw.println(prefix + "taskAffinity=" + taskAffinity); 62339792d2262352ae775091876d5488d2412a2ff92Dianne Hackborn pw.println(prefix + "uid=" + uid + " flags=0x" + Integer.toHexString(flags) 624b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin + " privateFlags=0x" + Integer.toHexString(privateFlags) 62539792d2262352ae775091876d5488d2412a2ff92Dianne Hackborn + " theme=0x" + Integer.toHexString(theme)); 626df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn pw.println(prefix + "requiresSmallestWidthDp=" + requiresSmallestWidthDp 6272762ff3dc864018352362f6d103de471f9529ba6Dianne Hackborn + " compatibleWidthLimitDp=" + compatibleWidthLimitDp 6282762ff3dc864018352362f6d103de471f9529ba6Dianne Hackborn + " largestWidthLimitDp=" + largestWidthLimitDp); 6299066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project pw.println(prefix + "sourceDir=" + sourceDir); 6308a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey if (!Objects.equals(sourceDir, publicSourceDir)) { 63139792d2262352ae775091876d5488d2412a2ff92Dianne Hackborn pw.println(prefix + "publicSourceDir=" + publicSourceDir); 63239792d2262352ae775091876d5488d2412a2ff92Dianne Hackborn } 6338a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey if (!ArrayUtils.isEmpty(splitSourceDirs)) { 6348a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey pw.println(prefix + "splitSourceDirs=" + Arrays.toString(splitSourceDirs)); 6358a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey } 6368a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey if (!ArrayUtils.isEmpty(splitPublicSourceDirs) 6378a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey && !Arrays.equals(splitSourceDirs, splitPublicSourceDirs)) { 6388a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey pw.println(prefix + "splitPublicSourceDirs=" + Arrays.toString(splitPublicSourceDirs)); 6398a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey } 64039792d2262352ae775091876d5488d2412a2ff92Dianne Hackborn if (resourceDirs != null) { 64139792d2262352ae775091876d5488d2412a2ff92Dianne Hackborn pw.println(prefix + "resourceDirs=" + resourceDirs); 64239792d2262352ae775091876d5488d2412a2ff92Dianne Hackborn } 6430f40dc923c67e8822f9157aec4f786f73848af07Robert Craig if (seinfo != null) { 6440f40dc923c67e8822f9157aec4f786f73848af07Robert Craig pw.println(prefix + "seinfo=" + seinfo); 6450f40dc923c67e8822f9157aec4f786f73848af07Robert Craig } 6469066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project pw.println(prefix + "dataDir=" + dataDir); 64712527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn if (sharedLibraryFiles != null) { 64812527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn pw.println(prefix + "sharedLibraryFiles=" + sharedLibraryFiles); 64912527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn } 6508472e6189cd4e0520c047bdb28457abc728b373fDianne Hackborn pw.println(prefix + "enabled=" + enabled + " targetSdkVersion=" + targetSdkVersion 6518472e6189cd4e0520c047bdb28457abc728b373fDianne Hackborn + " versionCode=" + versionCode); 65212527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn if (manageSpaceActivityName != null) { 65312527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn pw.println(prefix + "manageSpaceActivityName="+manageSpaceActivityName); 65412527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn } 65512527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn if (descriptionRes != 0) { 65612527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn pw.println(prefix + "description=0x"+Integer.toHexString(descriptionRes)); 65712527f9fb1cb0a1ad3be8149c1c88a0e731cb4d6Dianne Hackborn } 658269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell if (uiOptions != 0) { 659269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell pw.println(prefix + "uiOptions=0x" + Integer.toHexString(uiOptions)); 660269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell } 66159dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio pw.println(prefix + "supportsRtl=" + (hasRtlSupport() ? "true" : "false")); 6629066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project super.dumpBack(pw, prefix); 6639066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 66459dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio 66559dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio /** 66659dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio * @return true if "supportsRtl" has been set to true in the AndroidManifest 66759dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio * @hide 66859dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio */ 66959dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio public boolean hasRtlSupport() { 67059dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio return (flags & FLAG_SUPPORTS_RTL) == FLAG_SUPPORTS_RTL; 67159dfce8bdaf011337530a0dbec7f7280871f9bc9Fabrice Di Meglio } 6729066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 6739066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static class DisplayNameComparator 6749066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project implements Comparator<ApplicationInfo> { 6759066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public DisplayNameComparator(PackageManager pm) { 6769066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project mPM = pm; 6779066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 6789066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 6799066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public final int compare(ApplicationInfo aa, ApplicationInfo ab) { 6809066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project CharSequence sa = mPM.getApplicationLabel(aa); 6819066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project if (sa == null) { 6829066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project sa = aa.packageName; 6839066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 6849066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project CharSequence sb = mPM.getApplicationLabel(ab); 6859066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project if (sb == null) { 6869066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project sb = ab.packageName; 6879066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 6889066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 6899066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project return sCollator.compare(sa.toString(), sb.toString()); 6909066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 6919066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 6929066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project private final Collator sCollator = Collator.getInstance(); 6939066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project private PackageManager mPM; 6949066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 6959066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 6969066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public ApplicationInfo() { 6979066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 6989066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 6999066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public ApplicationInfo(ApplicationInfo orig) { 7009066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project super(orig); 7019066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project taskAffinity = orig.taskAffinity; 7029066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project permission = orig.permission; 7039066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project processName = orig.processName; 7049066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project className = orig.className; 7059066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project theme = orig.theme; 7069066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project flags = orig.flags; 707b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin privateFlags = orig.privateFlags; 708df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn requiresSmallestWidthDp = orig.requiresSmallestWidthDp; 709df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn compatibleWidthLimitDp = orig.compatibleWidthLimitDp; 7102762ff3dc864018352362f6d103de471f9529ba6Dianne Hackborn largestWidthLimitDp = orig.largestWidthLimitDp; 7117f1a57a3e709b9e1fdb03a7a8af5f13859f7f1adJeff Sharkey scanSourceDir = orig.scanSourceDir; 7127f1a57a3e709b9e1fdb03a7a8af5f13859f7f1adJeff Sharkey scanPublicSourceDir = orig.scanPublicSourceDir; 7139066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project sourceDir = orig.sourceDir; 7149066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project publicSourceDir = orig.publicSourceDir; 7158a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey splitSourceDirs = orig.splitSourceDirs; 7168a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey splitPublicSourceDirs = orig.splitPublicSourceDirs; 71785387d7ba36e56b291cbde87acb5a5b2200fe01cKenny Root nativeLibraryDir = orig.nativeLibraryDir; 7187dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath secondaryNativeLibraryDir = orig.secondaryNativeLibraryDir; 71984f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey nativeLibraryRootDir = orig.nativeLibraryRootDir; 72084f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey nativeLibraryRootRequiresIsa = orig.nativeLibraryRootRequiresIsa; 721ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath primaryCpuAbi = orig.primaryCpuAbi; 722ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath secondaryCpuAbi = orig.secondaryCpuAbi; 723d1ab01682b136b586aac94334f976f03c762b3c7Kenny Root resourceDirs = orig.resourceDirs; 7240f40dc923c67e8822f9157aec4f786f73848af07Robert Craig seinfo = orig.seinfo; 7259066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project sharedLibraryFiles = orig.sharedLibraryFiles; 7269066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dataDir = orig.dataDir; 7279066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project uid = orig.uid; 728a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn targetSdkVersion = orig.targetSdkVersion; 7298472e6189cd4e0520c047bdb28457abc728b373fDianne Hackborn versionCode = orig.versionCode; 7309066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project enabled = orig.enabled; 7310ac3031c159a0904e73eb4439cdc724d8df4a6e6Dianne Hackborn enabledSetting = orig.enabledSetting; 73254e570f78b45d6c47578a4a2513097b590b6d43fDianne Hackborn installLocation = orig.installLocation; 7339066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project manageSpaceActivityName = orig.manageSpaceActivityName; 7349066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project descriptionRes = orig.descriptionRes; 735269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell uiOptions = orig.uiOptions; 736bcb0255770caa6b053da100de13beb840da71b21Christopher Tate backupAgentName = orig.backupAgentName; 7379066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 7389066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 7399066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 7409066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public String toString() { 7419066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project return "ApplicationInfo{" 7429066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project + Integer.toHexString(System.identityHashCode(this)) 7439066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project + " " + packageName + "}"; 7449066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 7459066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 7469066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public int describeContents() { 7479066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project return 0; 7489066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 7499066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 7509066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public void writeToParcel(Parcel dest, int parcelableFlags) { 7519066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project super.writeToParcel(dest, parcelableFlags); 7529066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeString(taskAffinity); 7539066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeString(permission); 7549066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeString(processName); 7559066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeString(className); 7569066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeInt(theme); 7579066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeInt(flags); 758b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin dest.writeInt(privateFlags); 759df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn dest.writeInt(requiresSmallestWidthDp); 760df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn dest.writeInt(compatibleWidthLimitDp); 7612762ff3dc864018352362f6d103de471f9529ba6Dianne Hackborn dest.writeInt(largestWidthLimitDp); 7627f1a57a3e709b9e1fdb03a7a8af5f13859f7f1adJeff Sharkey dest.writeString(scanSourceDir); 7637f1a57a3e709b9e1fdb03a7a8af5f13859f7f1adJeff Sharkey dest.writeString(scanPublicSourceDir); 7649066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeString(sourceDir); 7659066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeString(publicSourceDir); 7668a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey dest.writeStringArray(splitSourceDirs); 7678a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey dest.writeStringArray(splitPublicSourceDirs); 76885387d7ba36e56b291cbde87acb5a5b2200fe01cKenny Root dest.writeString(nativeLibraryDir); 7697dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath dest.writeString(secondaryNativeLibraryDir); 77084f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey dest.writeString(nativeLibraryRootDir); 77184f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey dest.writeInt(nativeLibraryRootRequiresIsa ? 1 : 0); 772ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath dest.writeString(primaryCpuAbi); 773ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath dest.writeString(secondaryCpuAbi); 774d1ab01682b136b586aac94334f976f03c762b3c7Kenny Root dest.writeStringArray(resourceDirs); 7750f40dc923c67e8822f9157aec4f786f73848af07Robert Craig dest.writeString(seinfo); 7769066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeStringArray(sharedLibraryFiles); 7779066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeString(dataDir); 7789066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeInt(uid); 779a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn dest.writeInt(targetSdkVersion); 7808472e6189cd4e0520c047bdb28457abc728b373fDianne Hackborn dest.writeInt(versionCode); 7819066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeInt(enabled ? 1 : 0); 7820ac3031c159a0904e73eb4439cdc724d8df4a6e6Dianne Hackborn dest.writeInt(enabledSetting); 78354e570f78b45d6c47578a4a2513097b590b6d43fDianne Hackborn dest.writeInt(installLocation); 7849066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeString(manageSpaceActivityName); 785181fafaf48208978b8ba2022683ffa78aaeddde1Christopher Tate dest.writeString(backupAgentName); 7869066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dest.writeInt(descriptionRes); 787269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell dest.writeInt(uiOptions); 7889066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 7899066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 7909066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final Parcelable.Creator<ApplicationInfo> CREATOR 7919066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project = new Parcelable.Creator<ApplicationInfo>() { 7929066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public ApplicationInfo createFromParcel(Parcel source) { 7939066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project return new ApplicationInfo(source); 7949066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 7959066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public ApplicationInfo[] newArray(int size) { 7969066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project return new ApplicationInfo[size]; 7979066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 7989066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project }; 7999066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 8009066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project private ApplicationInfo(Parcel source) { 8019066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project super(source); 8029066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project taskAffinity = source.readString(); 8039066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project permission = source.readString(); 8049066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project processName = source.readString(); 8059066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project className = source.readString(); 8069066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project theme = source.readInt(); 8079066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project flags = source.readInt(); 808b9f8a5204a1b0b3919fa921e858d04124c582828Alex Klyubin privateFlags = source.readInt(); 809df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn requiresSmallestWidthDp = source.readInt(); 810df6e980e3f63eb0f6f9eb437fa925d5009cd9c44Dianne Hackborn compatibleWidthLimitDp = source.readInt(); 8112762ff3dc864018352362f6d103de471f9529ba6Dianne Hackborn largestWidthLimitDp = source.readInt(); 8127f1a57a3e709b9e1fdb03a7a8af5f13859f7f1adJeff Sharkey scanSourceDir = source.readString(); 8137f1a57a3e709b9e1fdb03a7a8af5f13859f7f1adJeff Sharkey scanPublicSourceDir = source.readString(); 8149066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project sourceDir = source.readString(); 8159066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project publicSourceDir = source.readString(); 8168a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey splitSourceDirs = source.readStringArray(); 8178a4c9721a9e09d20c63381c13fa29bd9f7cbc3e3Jeff Sharkey splitPublicSourceDirs = source.readStringArray(); 81885387d7ba36e56b291cbde87acb5a5b2200fe01cKenny Root nativeLibraryDir = source.readString(); 8197dba6eb3ac4fd6c8195cb0d0425866de50a9e114Narayan Kamath secondaryNativeLibraryDir = source.readString(); 82084f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey nativeLibraryRootDir = source.readString(); 82184f1294a958b42000755dc6570e3eda72ab42140Jeff Sharkey nativeLibraryRootRequiresIsa = source.readInt() != 0; 822ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath primaryCpuAbi = source.readString(); 823ff110bd61a69f7ed8602ae14b27f7befec76b2e7Narayan Kamath secondaryCpuAbi = source.readString(); 824d1ab01682b136b586aac94334f976f03c762b3c7Kenny Root resourceDirs = source.readStringArray(); 8250f40dc923c67e8822f9157aec4f786f73848af07Robert Craig seinfo = source.readString(); 8269066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project sharedLibraryFiles = source.readStringArray(); 8279066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project dataDir = source.readString(); 8289066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project uid = source.readInt(); 829a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn targetSdkVersion = source.readInt(); 8308472e6189cd4e0520c047bdb28457abc728b373fDianne Hackborn versionCode = source.readInt(); 8319066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project enabled = source.readInt() != 0; 8320ac3031c159a0904e73eb4439cdc724d8df4a6e6Dianne Hackborn enabledSetting = source.readInt(); 83354e570f78b45d6c47578a4a2513097b590b6d43fDianne Hackborn installLocation = source.readInt(); 8349066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project manageSpaceActivityName = source.readString(); 835181fafaf48208978b8ba2022683ffa78aaeddde1Christopher Tate backupAgentName = source.readString(); 8369066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project descriptionRes = source.readInt(); 837269248d112e35fe8e9f0d5d11c96dcb2ac1118b0Adam Powell uiOptions = source.readInt(); 8389066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 8398d112675879a2b83197d3b4ae4fb623abd1a1ec3Mitsuru Oshima 8409066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 8419066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Retrieve the textual description of the application. This 8429066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * will call back on the given PackageManager to load the description from 8439066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * the application. 8449066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * 8459066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * @param pm A PackageManager from which the label can be loaded; usually 8469066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * the PackageManager from which you originally retrieved this item. 8479066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * 8489066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * @return Returns a CharSequence containing the application's description. 8499066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * If there is no description, null is returned. 8509066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 8519066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public CharSequence loadDescription(PackageManager pm) { 8529066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project if (descriptionRes != 0) { 85307330791116513710d879c45b2f095cd314cbfd0Jeff Brown CharSequence label = pm.getText(packageName, descriptionRes, this); 8549066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project if (label != null) { 8559066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project return label; 8569066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 8579066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 8589066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project return null; 8599066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 860e5fb328825995aa33b5b7ecf8b5bee2b17f81715Mitsuru Oshima 861e5fb328825995aa33b5b7ecf8b5bee2b17f81715Mitsuru Oshima /** 862e5fb328825995aa33b5b7ecf8b5bee2b17f81715Mitsuru Oshima * Disable compatibility mode 863e5fb328825995aa33b5b7ecf8b5bee2b17f81715Mitsuru Oshima * 864e5fb328825995aa33b5b7ecf8b5bee2b17f81715Mitsuru Oshima * @hide 865e5fb328825995aa33b5b7ecf8b5bee2b17f81715Mitsuru Oshima */ 866e5fb328825995aa33b5b7ecf8b5bee2b17f81715Mitsuru Oshima public void disableCompatibilityMode() { 86769fff4a72d4dfc9208db79d773ef3ca23350287eMitsuru Oshima flags |= (FLAG_SUPPORTS_LARGE_SCREENS | FLAG_SUPPORTS_NORMAL_SCREENS | 86811b822d2a91ea17c34c0cb1c11e80a9a30d72864Dianne Hackborn FLAG_SUPPORTS_SMALL_SCREENS | FLAG_RESIZEABLE_FOR_SCREENS | 86914cee9f688c32d63d8521188e7422811629bb7c2Dianne Hackborn FLAG_SUPPORTS_SCREEN_DENSITIES | FLAG_SUPPORTS_XLARGE_SCREENS); 870e5fb328825995aa33b5b7ecf8b5bee2b17f81715Mitsuru Oshima } 87107330791116513710d879c45b2f095cd314cbfd0Jeff Brown 87207330791116513710d879c45b2f095cd314cbfd0Jeff Brown /** 87307330791116513710d879c45b2f095cd314cbfd0Jeff Brown * @hide 87407330791116513710d879c45b2f095cd314cbfd0Jeff Brown */ 875a709314537164d959a18ee78768c69c4a9cb33c7Alexandra Gherghina @Override 876a709314537164d959a18ee78768c69c4a9cb33c7Alexandra Gherghina public Drawable loadDefaultIcon(PackageManager pm) { 87707330791116513710d879c45b2f095cd314cbfd0Jeff Brown if ((flags & FLAG_EXTERNAL_STORAGE) != 0 87807330791116513710d879c45b2f095cd314cbfd0Jeff Brown && isPackageUnavailable(pm)) { 87907330791116513710d879c45b2f095cd314cbfd0Jeff Brown return Resources.getSystem().getDrawable( 88007330791116513710d879c45b2f095cd314cbfd0Jeff Brown com.android.internal.R.drawable.sym_app_on_sd_unavailable_icon); 88107330791116513710d879c45b2f095cd314cbfd0Jeff Brown } 88207330791116513710d879c45b2f095cd314cbfd0Jeff Brown return pm.getDefaultActivityIcon(); 88307330791116513710d879c45b2f095cd314cbfd0Jeff Brown } 88407330791116513710d879c45b2f095cd314cbfd0Jeff Brown 88507330791116513710d879c45b2f095cd314cbfd0Jeff Brown private boolean isPackageUnavailable(PackageManager pm) { 88607330791116513710d879c45b2f095cd314cbfd0Jeff Brown try { 88707330791116513710d879c45b2f095cd314cbfd0Jeff Brown return pm.getPackageInfo(packageName, 0) == null; 88807330791116513710d879c45b2f095cd314cbfd0Jeff Brown } catch (NameNotFoundException ex) { 88907330791116513710d879c45b2f095cd314cbfd0Jeff Brown return true; 89007330791116513710d879c45b2f095cd314cbfd0Jeff Brown } 89107330791116513710d879c45b2f095cd314cbfd0Jeff Brown } 892d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey 89307330791116513710d879c45b2f095cd314cbfd0Jeff Brown /** 89407330791116513710d879c45b2f095cd314cbfd0Jeff Brown * @hide 89507330791116513710d879c45b2f095cd314cbfd0Jeff Brown */ 8967487657ee9f3f91a1fb4e52ce2a03b56496ac1f4Fyodor Kupolov public boolean isForwardLocked() { 8977487657ee9f3f91a1fb4e52ce2a03b56496ac1f4Fyodor Kupolov return (privateFlags & ApplicationInfo.PRIVATE_FLAG_FORWARD_LOCK) != 0; 8987487657ee9f3f91a1fb4e52ce2a03b56496ac1f4Fyodor Kupolov } 8997487657ee9f3f91a1fb4e52ce2a03b56496ac1f4Fyodor Kupolov 9007487657ee9f3f91a1fb4e52ce2a03b56496ac1f4Fyodor Kupolov /** 9017487657ee9f3f91a1fb4e52ce2a03b56496ac1f4Fyodor Kupolov * @hide 9027487657ee9f3f91a1fb4e52ce2a03b56496ac1f4Fyodor Kupolov */ 90307330791116513710d879c45b2f095cd314cbfd0Jeff Brown @Override protected ApplicationInfo getApplicationInfo() { 90407330791116513710d879c45b2f095cd314cbfd0Jeff Brown return this; 90507330791116513710d879c45b2f095cd314cbfd0Jeff Brown } 906d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey 907d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey /** {@hide} */ public void setCodePath(String codePath) { scanSourceDir = codePath; } 908d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey /** {@hide} */ public void setBaseCodePath(String baseCodePath) { sourceDir = baseCodePath; } 909d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey /** {@hide} */ public void setSplitCodePaths(String[] splitCodePaths) { splitSourceDirs = splitCodePaths; } 910d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey /** {@hide} */ public void setResourcePath(String resourcePath) { scanPublicSourceDir = resourcePath; } 911d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey /** {@hide} */ public void setBaseResourcePath(String baseResourcePath) { publicSourceDir = baseResourcePath; } 912d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey /** {@hide} */ public void setSplitResourcePaths(String[] splitResourcePaths) { splitPublicSourceDirs = splitResourcePaths; } 913d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey 914d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey /** {@hide} */ public String getCodePath() { return scanSourceDir; } 915d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey /** {@hide} */ public String getBaseCodePath() { return sourceDir; } 916d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey /** {@hide} */ public String[] getSplitCodePaths() { return splitSourceDirs; } 917d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey /** {@hide} */ public String getResourcePath() { return scanPublicSourceDir; } 918d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey /** {@hide} */ public String getBaseResourcePath() { return publicSourceDir; } 919d746057f2414cba2bdc69257cc5be8cb681bb592Jeff Sharkey /** {@hide} */ public String[] getSplitResourcePaths() { return splitSourceDirs; } 9209066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project} 921