AOSP AndroidManifest.xml

It seems that there is no way to check the android manifest file, and developers can only follow the document from the developer's site. But sometimes I see funny things about manifest files in AOSP.

For example, there is a requirement for a priority attribute of an intent filter .

The value must be an integer, such as "100". Higher rooms have higher priority. The default value is 0. The value must be greater than -1000 and less than 1000.

Therefore, a valid value should be (-1000, 1000). However, in the latest AOSP code (get through https://source.android.com/source/downloading.html ) packages/apps/MusicFX/AndroidManifest.xml, packages/apps/MusicFX/AndroidManifest.xmlI saw something like android:priority="2147483647"; in addition, there are also many manifest files containing the pre-emptive filter priority from -1000/1000.

Does this mean that AOSP is not completely subject to the "rules", and these specifications are intended only for third-party applications?

+4
source share
1 answer

In fact, the AOSP code is incorrect in this code (not between SYSTEM_LOW_PRIORITYand SYSTEM_HIGH_PRIORITY). And no excuses, because it's from API 1.

, 24 2011 (git Google). AOSP ...

. , android:priority .

+2

Source: https://habr.com/ru/post/1623240/


All Articles