Android 的manifest解析,2024最新阿里Android面经

  1. * Class implementing the Application’s backup functionality.  From

  2. * the “backupAgent” attribute.  This is an optional attribute and

  3. * will be null if the application does not specify it in its manifest.

  4. *

  5. If android:allowBackup is set to false, this attribute is ignored.

  6. */

  7. public String backupAgentName;

  8. /**

  9. * The default extra UI options for activities in this application.

  10. * Set from the {@link android.R.attr#uiOptions} attribute in the

  11. * activity’s manifest.

  12. */

  13. public int uiOptions = 0;

  14. /**

  15. * Value for {@link #flags}: if set, this application is installed in the

  16. * device’s system image.

  17. */

  18. public static final int FLAG_SYSTEM = 1<<0;

  19. /**

  20. * Value for {@link #flags}: set to true if this application would like to

  21. * allow debugging of its

  22. * code, even when installed on a non-development system.  Comes

  23. * from {@link android.R.styleable#AndroidManifestApplication_debuggable

  24. * android:debuggable} of the  tag.

  25. */

  26. public static final int FLAG_DEBUGGABLE = 1<<1;

  27. /**

  28. * Value for {@link #flags}: set to true if this application has code

  29. * associated with it.  Comes

  30. * from {@link android.R.styleable#AndroidManifestApplication_hasCode

  31. * android:hasCode} of the  tag.

  32. */

  33. public static final int FLAG_HAS_CODE = 1<<2;

  34. /**

  35. * Value for {@link #flags}: set to true if this application is persistent.

  36. * Comes from {@link android.R.styleable#AndroidManifestApplication_persistent

  37. * android:persistent} of the  tag.

  38. */

  39. public static final int FLAG_PERSISTENT = 1<<3;

  40. /**

  41. * Value for {@link #flags}: set to true if this application holds the

  42. * {@link android.Manifest.permission#FACTORY_TEST} permission and the

  43. * device is running in factory test mode.

  44. */

  45. public static final int FLAG_FACTORY_TEST = 1<<4;

  46. /**

  47. * Value for {@link #flags}: default value for the corresponding ActivityInfo flag.

  48. * Comes from {@link android.R.styleable#AndroidManifestApplication_allowTaskReparenting

  49. * android:allowTaskReparenting} of the  tag.

  50. */

  51. public static final int FLAG_ALLOW_TASK_REPARENTING = 1<<5;

  52. /**

  53. * Value for {@link #flags}: default value for the corresponding ActivityInfo flag.

  54. * Comes from {@link android.R.styleable#AndroidManifestApplication_allowClearUserData

  55. * android:allowClearUserData} of the  tag.

  56. */

  57. public static final int FLAG_ALLOW_CLEAR_USER_DATA = 1<<6;

  58. /**

  59. * Value for {@link #flags}: this is set if this application has been

  60. * install as an update to a built-in system application.

  61. */

  62. public static final int FLAG_UPDATED_SYSTEM_APP = 1<<7;

  63. /**

  64. * Value for {@link #flags}: this is set of the application has specified

  65. * {@link android.R.styleable#AndroidManifestApplication_testOnly

  66. * android:testOnly} to be true.

  67. */

  68. public static final int FLAG_TEST_ONLY = 1<<8;

  69. /**

  70. * Value for {@link #flags}: true when the application’s window can be

  71. * reduced in size for smaller screens.  Corresponds to

  72. * {@link android.R.styleable#AndroidManifestSupportsScreens_smallScreens

  73. * android:smallScreens}.

  74. */

  75. public static final int FLAG_SUPPORTS_SMALL_SCREENS = 1<<9;

  76. /**

  77. * Value for {@link #flags}: true when the application’s window can be

  78. * displayed on normal screens.  Corresponds to

  79. * {@link android.R.styleable#AndroidManifestSupportsScreens_normalScreens

  80. * android:normalScreens}.

  81. */

  82. public static final int FLAG_SUPPORTS_NORMAL_SCREENS = 1<<10;

  83. /**

  84. * Value for {@link #flags}: true when the application’s window can be

  85. * increased in size for larger screens.  Corresponds to

  86. * {@link android.R.styleable#AndroidManifestSupportsScreens_largeScreens

  87. * android:largeScreens}.

  88. */

  89. public static final int FLAG_SUPPORTS_LARGE_SCREENS = 1<<11;

  90. /**

  91. * Value for {@link #flags}: true when the application knows how to adjust

  92. * its UI for different screen sizes.  Corresponds to

  93. * {@link android.R.styleable#AndroidManifestSupportsScreens_resizeable

  94. * android:resizeable}.

  95. */

  96. public static final int FLAG_RESIZEABLE_FOR_SCREENS = 1<<12;

  97. /**

  98. * Value for {@link #flags}: true when the application knows how to

  99. * accomodate different screen densities.  Corresponds to

  100. * {@link android.R.styleable#AndroidManifestSupportsScreens_anyDensity

  101. * android:anyDensity}.

  102. */

  103. public static final int FLAG_SUPPORTS_SCREEN_DENSITIES = 1<<13;

  104. /**

  105. * Value for {@link #flags}: set to true if this application would like to

  106. * request the VM to operate under the safe mode. Comes from

  107. * {@link android.R.styleable#AndroidManifestApplication_vmSafeMode

  108. * android:vmSafeMode} of the  tag.

  109. */

  110. public static final int FLAG_VM_SAFE_MODE = 1<<14;

  111. /**

  112. * Value for {@link #flags}: set to false if the application does not wish

  113. * to permit any OS-driven backups of its data; true otherwise.

  114. *

  115. Comes from the

  116. * {@link android.R.styleable#AndroidManifestApplication_allowBackup android:allowBackup}

  117. * attribute of the  tag.

  118. */

  119. public static final int FLAG_ALLOW_BACKUP = 1<<15;

  120. /**

  121. * Value for {@link #flags}: set to false if the application must be kept

  122. * in memory following a full-system restore operation; true otherwise.

  123. * Ordinarily, during a full system restore operation each application is shut down

  124. * following execution of its agent’s onRestore() method.  Setting this attribute to

  125. false prevents this.  Most applications will not need to set this attribute.

  126. *

  127. If

  128. * {@link android.R.styleable#AndroidManifestApplication_allowBackup android:allowBackup}

  129. * is set to false or no

  130. * {@link android.R.styleable#AndroidManifestApplication_backupAgent android:backupAgent}

  131. * is specified, this flag will be ignored.

  132. *

  133. Comes from the

  134. * {@link android.R.styleable#AndroidManifestApplication_killAfterRestore android:killAfterRestore}

  135. * attribute of the  tag.

  136. */

  137. public static final int FLAG_KILL_AFTER_RESTORE = 1<<16;

  138. /**

  139. * Value for {@link #flags}: Set to true if the application’s backup

  140. * agent claims to be able to handle restore data even “from the future,”

  141. * i.e. from versions of the application with a versionCode greater than

  142. * the one currently installed on the device.  Use with caution!  By default

  143. * this attribute is false and the Backup Manager will ensure that data

  144. * from “future” versions of the application are never supplied during a restore operation.

  145. *

  146. If

  147. * {@link android.R.styleable#AndroidManifestApplication_allowBackup android:allowBackup}

  148. * is set to false or no

  149. * {@link android.R.styleable#AndroidManifestApplication_backupAgent android:backupAgent}

  150. * is specified, this flag will be ignored.

  151. *

  152. Comes from the

  153. * {@link android.R.styleable#AndroidManifestApplication_restoreAnyVersion android:restoreAnyVersion}

  154. * attribute of the  tag.

  155. */

  156. public static final int FLAG_RESTORE_ANY_VERSION = 1<<17;

  157. /**

  158. * Value for {@link #flags}: Set to true if the application is

  159. * currently installed on external/removable/unprotected storage.  Such

  160. * applications may not be available if their storage is not currently

  161. * mounted.  When the storage it is on is not available, it will look like

  162. * the application has been uninstalled (its .apk is no longer available)

  163. * but its persistent data is not removed.

  164. */

  165. public static final int FLAG_EXTERNAL_STORAGE = 1<<18;

  166. /**

  167. * Value for {@link #flags}: true when the application’s window can be

  168. * increased in size for extra large screens.  Corresponds to

  169. * {@link android.R.styleable#AndroidManifestSupportsScreens_xlargeScreens

  170. * android:xlargeScreens}.

  171. */

  172. public static final int FLAG_SUPPORTS_XLARGE_SCREENS = 1<<19;

  173. /**

  174. * Value for {@link #flags}: true when the application has requested a

  175. * large heap for its processes.  Corresponds to

  176. * {@link android.R.styleable#AndroidManifestApplication_largeHeap

  177. * android:largeHeap}.

  178. */

  179. public static final int FLAG_LARGE_HEAP = 1<<20;

  180. /**

  181. * Value for {@link #flags}: true if this application’s package is in

  182. * the stopped state.

  183. */

  184. public static final int FLAG_STOPPED = 1<<21;

  185. /**

  186. * Value for {@link #flags}: true  when the application is willing to support

  187. * RTL (right to left). All activities will inherit this value.

  188. *

  189. * Set from the {@link android.R.attr#supportsRtl} attribute in the

  190. * activity’s manifest.

  191. *

  192. * Default value is false (no support for RTL).

  193. */

  194. public static final int FLAG_SUPPORTS_RTL = 1<<22;

  195. /**

  196. * Value for {@link #flags}: true if the application is currently

  197. * installed for the calling user.

  198. */

  199. public static final int FLAG_INSTALLED = 1<<23;

  200. /**

  201. * Value for {@link #flags}: true if the application only has its

  202. * data installed; the application package itself does not currently

  203. * exist on the device.

  204. */

  205. public static final int FLAG_IS_DATA_ONLY = 1<<24;

  206. /**

  207. * Value for {@link #flags}: Set to true if the application has been

  208. * installed using the forward lock option.

  209. *

  210. * NOTE: DO NOT CHANGE THIS VALUE!  It is saved in packages.xml.

  211. *

  212. * {@hide}

  213. */

  214. public static final int FLAG_FORWARD_LOCK = 1<<29;

  215. /**

  216. * Value for {@link #flags}: set to true if the application

  217. * has reported that it is heavy-weight, and thus can not participate in

  218. * the normal application lifecycle.

  219. *

  220. Comes from the

  221. * {@link android.R.styleable#AndroidManifestApplication_cantSaveState android:cantSaveState}

  222. * attribute of the  tag.

  223. *

  224. * {@hide}

  225. */

  226. public static final int FLAG_CANT_SAVE_STATE = 1<<28;

  227. /**

  228. * Flags associated with the application.  Any combination of

  229. * {@link #FLAG_SYSTEM}, {@link #FLAG_DEBUGGABLE}, {@link #FLAG_HAS_CODE},

  230. * {@link #FLAG_PERSISTENT}, {@link #FLAG_FACTORY_TEST}, and

  231. * {@link #FLAG_ALLOW_TASK_REPARENTING}

  232. * {@link #FLAG_ALLOW_CLEAR_USER_DATA}, {@link #FLAG_UPDATED_SYSTEM_APP},

  233. * {@link #FLAG_TEST_ONLY}, {@link #FLAG_SUPPORTS_SMALL_SCREENS},

  234. * {@link #FLAG_SUPPORTS_NORMAL_SCREENS},

  235. * {@link #FLAG_SUPPORTS_LARGE_SCREENS}, {@link #FLAG_SUPPORTS_XLARGE_SCREENS},

  236. * {@link #FLAG_RESIZEABLE_FOR_SCREENS},

  237. * {@link #FLAG_SUPPORTS_SCREEN_DENSITIES}, {@link #FLAG_VM_SAFE_MODE},

  238. * {@link #FLAG_INSTALLED}.

  239. */

  240. public int flags = 0;

  241. /**

  242. * The required smallest screen width the application can run on.  If 0,

  243. * nothing has been specified.  Comes from

  244. * {@link android.R.styleable#AndroidManifestSupportsScreens_requiresSmallestWidthDp

  245. * android:requiresSmallestWidthDp} attribute of the  tag.

  246. */

  247. public int requiresSmallestWidthDp = 0;

  248. /**

  249. * The maximum smallest screen width the application is designed for.  If 0,

  250. * nothing has been specified.  Comes from

  251. * {@link android.R.styleable#AndroidManifestSupportsScreens_compatibleWidthLimitDp

  252. * android:compatibleWidthLimitDp} attribute of the  tag.

  253. */

  254. public int compatibleWidthLimitDp = 0;

  255. /**

  256. * The maximum smallest screen width the application will work on.  If 0,

  257. * nothing has been specified.  Comes from

  258. * {@link android.R.styleable#AndroidManifestSupportsScreens_largestWidthLimitDp

  259. * android:largestWidthLimitDp} attribute of the  tag.

  260. */

  261. public int largestWidthLimitDp = 0;

  262. /**

  263. * Full path to the location of this package.

  264. */

  265. public String sourceDir;

  266. /**

  267. * Full path to the location of the publicly available parts of this

  268. * package (i.e. the primary resource package and manifest).  For

  269. * non-forward-locked apps this will be the same as {@link #sourceDir).

  270. */

  271. public String publicSourceDir;

  272. /**

  273. * Full paths to the locations of extra resource packages this application

  274. * uses. This field is only used if there are extra resource packages,

  275. * otherwise it is null.

  276. *

  277. * {@hide}

  278. */

  279. public String[] resourceDirs;

  280. /**

  281. * Paths to all shared libraries this application is linked against.  This

  282. * field is only set if the {@link PackageManager#GET_SHARED_LIBRARY_FILES

  283. * PackageManager.GET_SHARED_LIBRARY_FILES} flag was used when retrieving

  284. * the structure.

  285. */

  286. public String[] sharedLibraryFiles;

  287. /**

  288. * Full path to a directory assigned to the package for its persistent

  289. * data.

  290. */

  291. public String dataDir;

  292. /**

  293. * Full path to the directory where native JNI libraries are stored.

  294. */

  295. public String nativeLibraryDir;

  296. /**

  297. * The kernel user-ID that has been assigned to this application;

  298. * currently this is not a unique ID (multiple applications can have

  299. * the same uid).

  300. */

  301. public int uid;

  302. /**

  303. * The minimum SDK version this application targets.  It may run on earlier

  304. * versions, but it knows how to work with any new behavior added at this

  305. * version.  Will be {@link android.os.Build.VERSION_CODES#CUR_DEVELOPMENT}

  306. * if this is a development build and the app is targeting that.  You should

  307. * compare that this number is >= the SDK version number at which your

  308. * behavior was introduced.

  309. */

  310. public int targetSdkVersion;

  311. /**

  312. * When false, indicates that all components within this application are

  313. * considered disabled, regardless of their individually set enabled status.

  314. */

  315. public boolean enabled = true;

  316. /**

  317. * For convenient access to the current enabled setting of this app.

  318. * @hide

  319. */

  320. public int enabledSetting = PackageManager.COMPONENT_ENABLED_STATE_DEFAULT;

  321. /**

  322. * For convenient access to package’s install location.

  323. * @hide

  324. */

  325. public int installLocation = PackageInfo.INSTALL_LOCATION_UNSPECIFIED;

  326. public void dump(Printer pw, String prefix) {

  327. super.dumpFront(pw, prefix);

  328. if (className != null) {

  329. pw.println(prefix + “className=” + className);

  330. }

  331. if (permission != null) {

  332. pw.println(prefix + “permission=” + permission);

  333. }

  334. pw.println(prefix + “processName=” + processName);

  335. pw.println(prefix + “taskAffinity=” + taskAffinity);

  336. pw.println(prefix + “uid=” + uid + " flags=0x" + Integer.toHexString(flags)

  337. + " theme=0x" + Integer.toHexString(theme));

  338. pw.println(prefix + “requiresSmallestWidthDp=” + requiresSmallestWidthDp

  339. + " compatibleWidthLimitDp=" + compatibleWidthLimitDp

  340. + " largestWidthLimitDp=" + largestWidthLimitDp);

  341. pw.println(prefix + “sourceDir=” + sourceDir);

  342. if (sourceDir == null) {

  343. if (publicSourceDir != null) {

  344. pw.println(prefix + “publicSourceDir=” + publicSourceDir);

  345. }

  346. } else if (!sourceDir.equals(publicSourceDir)) {

  347. pw.println(prefix + “publicSourceDir=” + publicSourceDir);

  348. }

  349. if (resourceDirs != null) {

  350. pw.println(prefix + “resourceDirs=” + resourceDirs);

  351. }

  352. pw.println(prefix + “dataDir=” + dataDir);

  353. if (sharedLibraryFiles != null) {

  354. pw.println(prefix + “sharedLibraryFiles=” + sharedLibraryFiles);

  355. }

  356. pw.println(prefix + “enabled=” + enabled + " targetSdkVersion=" + targetSdkVersion);

  357. if (manageSpaceActivityName != null) {

  358. pw.println(prefix + “manageSpaceActivityName=”+manageSpaceActivityName);

  359. }

  360. if (descriptionRes != 0) {

  361. pw.println(prefix + “description=0x”+Integer.toHexString(descriptionRes));

  362. }

  363. if (uiOptions != 0) {

  364. pw.println(prefix + “uiOptions=0x” + Integer.toHexString(uiOptions));

  365. }

  366. pw.println(prefix + “supportsRtl=” + (hasRtlSupport() ? “true” : “false”));

  367. super.dumpBack(pw, prefix);

  368. }

  369. /**

  370. * @return true if “supportsRtl” has been set to true in the AndroidManifest

  371. * @hide

  372. */

  373. public boolean hasRtlSupport() {

  374. return (flags & FLAG_SUPPORTS_RTL) == FLAG_SUPPORTS_RTL;

  375. }

  376. public static class DisplayNameComparator

  377. implements Comparator {

  378. public DisplayNameComparator(PackageManager pm) {

  379. mPM = pm;

  380. }

  381. public final int compare(ApplicationInfo aa, ApplicationInfo ab) {

  382. CharSequence  sa = mPM.getApplicationLabel(aa);

  383. if (sa == null) {

  384. sa = aa.packageName;

  385. }

  386. CharSequence  sb = mPM.getApplicationLabel(ab);

  387. if (sb == null) {

  388. sb = ab.packageName;

  389. }

  390. return sCollator.compare(sa.toString(), sb.toString());

  391. }

  392. private final Collator   sCollator = Collator.getInstance();

  393. private PackageManager   mPM;

  394. }

  395. public ApplicationInfo() {

  396. }

  397. public ApplicationInfo(ApplicationInfo orig) {

  398. super(orig);

  399. taskAffinity = orig.taskAffinity;

  400. permission = orig.permission;

  401. processName = orig.processName;

  402. className = orig.className;

  403. theme = orig.theme;

  404. flags = orig.flags;

  405. requiresSmallestWidthDp = orig.requiresSmallestWidthDp;

  406. compatibleWidthLimitDp = orig.compatibleWidthLimitDp;

  407. largestWidthLimitDp = orig.largestWidthLimitDp;

  408. sourceDir = orig.sourceDir;

  409. publicSourceDir = orig.publicSourceDir;

  410. nativeLibraryDir = orig.nativeLibraryDir;

  411. resourceDirs = orig.resourceDirs;

  412. sharedLibraryFiles = orig.sharedLibraryFiles;

  413. dataDir = orig.dataDir;

  414. uid = orig.uid;

  415. targetSdkVersion = orig.targetSdkVersion;

  416. enabled = orig.enabled;

  417. enabledSetting = orig.enabledSetting;

  418. installLocation = orig.installLocation;

  419. manageSpaceActivityName = orig.manageSpaceActivityName;

  420. descriptionRes = orig.descriptionRes;

  421. uiOptions = orig.uiOptions;

  422. backupAgentName = orig.backupAgentName;

  423. }

  424. public String toString() {

  425. return “ApplicationInfo{”

  426. + Integer.toHexString(System.identityHashCode(this))

  427. + " " + packageName + “}”;

  428. }

  429. public int describeContents() {

  430. return 0;

  431. }

  432. public void writeToParcel(Parcel dest, int parcelableFlags) {

  433. super.writeToParcel(dest, parcelableFlags);

  434. dest.writeString(taskAffinity);

  435. dest.writeString(permission);

  436. dest.writeString(processName);

  437. dest.writeString(className);

  438. dest.writeInt(theme);

  439. dest.writeInt(flags);

  440. dest.writeInt(requiresSmallestWidthDp);

  441. dest.writeInt(compatibleWidthLimitDp);

  442. dest.writeInt(largestWidthLimitDp);

  443. dest.writeString(sourceDir);

  444. dest.writeString(publicSourceDir);

  445. dest.writeString(nativeLibraryDir);

  446. dest.writeStringArray(resourceDirs);

  447. dest.writeStringArray(sharedLibraryFiles);

  448. dest.writeString(dataDir);

  449. dest.writeInt(uid);

  450. dest.writeInt(targetSdkVersion);

  451. dest.writeInt(enabled ? 1 : 0);

  452. dest.writeInt(enabledSetting);

  453. dest.writeInt(installLocation);

  454. dest.writeString(manageSpaceActivityName);

  455. dest.writeString(backupAgentName);

  456. dest.writeInt(descriptionRes);

  457. dest.writeInt(uiOptions);

  458. }

  459. public static final Parcelable.Creator CREATOR

  460. = new Parcelable.Creator() {

  461. public ApplicationInfo createFromParcel(Parcel source) {

  462. return new ApplicationInfo(source);

  463. }

  464. public ApplicationInfo[] newArray(int size) {

  465. return new ApplicationInfo[size];

  466. }

  467. };

  468. private ApplicationInfo(Parcel source) {

  469. super(source);

  470. taskAffinity = source.readString();

  471. permission = source.readString();

  472. processName = source.readString();

  473. className = source.readString();

  474. theme = source.readInt();

  475. flags = source.readInt();

  476. requiresSmallestWidthDp = source.readInt();

  477. compatibleWidthLimitDp = source.readInt();

  478. largestWidthLimitDp = source.readInt();

  479. sourceDir = source.readString();

  480. publicSourceDir = source.readString();

  481. nativeLibraryDir = source.readString();

  482. resourceDirs = source.readStringArray();

  483. sharedLibraryFiles = source.readStringArray();

  484. dataDir = source.readString();

  485. uid = source.readInt();

  486. targetSdkVersion = source.readInt();

  487. enabled = source.readInt() != 0;

  488. enabledSetting = source.readInt();

  489. installLocation = source.readInt();

  490. manageSpaceActivityName = source.readString();

  491. backupAgentName = source.readString();

  492. descriptionRes = source.readInt();

  493. uiOptions = source.readInt();

  494. }

  495. /**

  496. * Retrieve the textual description of the application.  This

  497. * will call back on the given PackageManager to load the description from

  498. * the application.

  499. *

  500. * @param pm A PackageManager from which the label can be loaded; usually

  501. * the PackageManager from which you originally retrieved this item.

  502. *

  503. * @return Returns a CharSequence containing the application’s description.

  504. * If there is no description, null is returned.

  505. */

  506. public CharSequence loadDescription(PackageManager pm) {

  507. if (descriptionRes != 0) {

  508. CharSequence label = pm.getText(packageName, descriptionRes, this);

  509. if (label != null) {

  510. return label;

  511. }

  512. }

  513. return null;

  514. }

  515. /**

  516. * Disable compatibility mode

  517. *

  518. * @hide

  519. */

  520. public void disableCompatibilityMode() {

  521. flags |= (FLAG_SUPPORTS_LARGE_SCREENS | FLAG_SUPPORTS_NORMAL_SCREENS |

  522. FLAG_SUPPORTS_SMALL_SCREENS | FLAG_RESIZEABLE_FOR_SCREENS |

  523. FLAG_SUPPORTS_SCREEN_DENSITIES | FLAG_SUPPORTS_XLARGE_SCREENS);

  524. }

  525. /**

  526. * @hide

  527. */

  528. @Override protected Drawable loadDefaultIcon(PackageManager pm) {

  529. if ((flags & FLAG_EXTERNAL_STORAGE) != 0

  530. && isPackageUnavailable(pm)) {

  531. return Resources.getSystem().getDrawable(

  532. com.android.internal.R.drawable.sym_app_on_sd_unavailable_icon);

  533. }

  534. return pm.getDefaultActivityIcon();

  535. }

  536. private boolean isPackageUnavailable(PackageManager pm) {

  537. try {

  538. return pm.getPackageInfo(packageName, 0) == null;

  539. } catch (NameNotFoundException ex) {

  540. return true;

  541. }

  542. }

  543. /**

  544. * @hide

  545. */

  546. @Override protected ApplicationInfo getApplicationInfo() {

  547. return this;

  548. }

  549. }

PackageItemInfo.java源码:

[java]  view plain copy 外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传 外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传

  1. /*

  2. * Copyright © 2007 The Android Open Source Project

  3. *

  4. * Licensed under the Apache License, Version 2.0 (the “License”);

  5. * you may not use this file except in compliance with the License.

  6. * You may obtain a copy of the License at

  7. *

  8. *      http://www.apache.org/licenses/LICENSE-2.0

  9. *

  10. * Unless required by applicable law or agreed to in writing, software

  11. * distributed under the License is distributed on an “AS IS” BASIS,

  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  13. * See the License for the specific language governing permissions and

  14. * limitations under the License.

  15. */

  16. package android.content.pm;

  17. import android.content.res.XmlResourceParser;

  18. import android.graphics.drawable.Drawable;

  19. import android.os.Bundle;

  20. import android.os.Parcel;

  21. import android.text.TextUtils;

  22. import android.util.Printer;

  23. import java.text.Collator;

  24. import java.util.Comparator;

  25. /**

  26. * Base class containing information common to all package items held by

  27. * the package manager.  This provides a very common basic set of attributes:

  28. * a label, icon, and meta-data.  This class is not intended

  29. * to be used by itself; it is simply here to share common definitions

  30. * between all items returned by the package manager.  As such, it does not

  31. * itself implement Parcelable, but does provide convenience methods to assist

  32. * in the implementation of Parcelable in subclasses.

  33. */

  34. public class PackageItemInfo {

  35. /**

  36. * Public name of this item. From the “android:name” attribute.

  37. */

  38. public String name;

  39. /**

  40. * Name of the package that this item is in.

  41. */

  42. public String packageName;

  43. /**

  44. * A string resource identifier (in the package’s resources) of this

  45. * component’s label.  From the “label” attribute or, if not set, 0.

  46. */

  47. public int labelRes;

  48. /**

  49. * The string provided in the AndroidManifest file, if any.  You

  50. * probably don’t want to use this.  You probably want

  51. * {@link PackageManager#getApplicationLabel}

  52. */

  53. public CharSequence nonLocalizedLabel;

自我介绍一下,小编13年上海交大毕业,曾经在小公司待过,也去过华为、OPPO等大厂,18年进入阿里一直到现在。

深知大多数Android工程师,想要提升技能,往往是自己摸索成长或者是报班学习,但对于培训机构动则几千的学费,着实压力不小。自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!

因此收集整理了一份《2024年Android移动开发全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友,同时减轻大家的负担。
img
img
img
img
img
img
img

既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,基本涵盖了95%以上Android开发知识点,真正体系化!

由于文件比较大,这里只是将部分目录大纲截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且后续会持续更新

如果你觉得这些内容对你有帮助,可以添加V获取:vip204888 (备注Android)
img

最后

这里我希望可以帮助到大家提升进阶。

内容包含:Android学习PDF+架构视频+面试文档+源码笔记高级架构技术进阶脑图、Android开发面试专题资料,高级进阶架构资料 这几块的内容。非常适合近期有面试和想在技术道路上继续精进的朋友。

喜欢本文的话,不妨给我点个小赞、评论区留言或者转发支持一下呗~

img

  1. * probably don’t want to use this.  You probably want

  2. * {@link PackageManager#getApplicationLabel}

  3. */

  4. public CharSequence nonLocalizedLabel;

自我介绍一下,小编13年上海交大毕业,曾经在小公司待过,也去过华为、OPPO等大厂,18年进入阿里一直到现在。

深知大多数Android工程师,想要提升技能,往往是自己摸索成长或者是报班学习,但对于培训机构动则几千的学费,着实压力不小。自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!

因此收集整理了一份《2024年Android移动开发全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友,同时减轻大家的负担。
[外链图片转存中…(img-3uqnSbh9-1711624866067)]
[外链图片转存中…(img-8oyIYDVq-1711624866067)]
[外链图片转存中…(img-VBc61FEh-1711624866068)]
[外链图片转存中…(img-ttCvVsnE-1711624866068)]
[外链图片转存中…(img-Ypv2SKzw-1711624866069)]
[外链图片转存中…(img-YTu5As5u-1711624866069)]
img

既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,基本涵盖了95%以上Android开发知识点,真正体系化!

由于文件比较大,这里只是将部分目录大纲截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且后续会持续更新

如果你觉得这些内容对你有帮助,可以添加V获取:vip204888 (备注Android)
[外链图片转存中…(img-HvVig6BB-1711624866070)]

最后

这里我希望可以帮助到大家提升进阶。

内容包含:Android学习PDF+架构视频+面试文档+源码笔记高级架构技术进阶脑图、Android开发面试专题资料,高级进阶架构资料 这几块的内容。非常适合近期有面试和想在技术道路上继续精进的朋友。

喜欢本文的话,不妨给我点个小赞、评论区留言或者转发支持一下呗~

img

本文已被CODING开源项目:《Android学习笔记总结+移动架构视频+大厂面试真题+项目实战源码》收录

  • 28
    点赞
  • 30
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值