{"push_id":983691610,"size":1,"distinct_size":1,"ref":"refs/heads/6.0.1","head":"c1e661904653cfb2035e2005ae5e1cd16eeef8ce","before":"95e7b3fd37a5c31a83d9f67030f701fbbf8f515d","commits":[{"sha":"c1e661904653cfb2035e2005ae5e1cd16eeef8ce","author":{"email":"dc2725693754f1a7a91164b380c7dc13093f6fdb@sonymobile.com","name":"Mårten Kongstad"},"message":"Runtime resource overlay: support downloaded overlay packages\n\nRequire non-pre-loaded, ie downloaded, overlay package's signature\nmatch that of the target package.\n\nSECURITY\n--------\nOverlay packages may either be pre-loaded, ie part of the system image,\nor downloaded. Pre-loaded overlays are trusted by definition (as\nsystem/vendor packages). Downloaded overlays are only applied if their\nsignature matches the signature of their target package.\n\nLOOKUP PRIORITY\n---------------\nDuring resource lookup, packages are sequentially queried to provide a\nbest match, given the constraints of the current configuration. If any\npackage provides a better match than what has been found so far, it\nreplaces the previous match. The target package is always queried last.\n\nWhen loading a package with more than one overlay, the order in which\nthe overlays are added becomes significant if several packages overlay\nthe same resource.\n\nFor downloaded overlays, the install time is used to determine the load\norder: packages installed later will be queried first and can therefore\nshadow previously installed overlays. Downloaded overlays always trump\npre-installed ones.\n\nFor pre-installed overlays, the install time is randomly determined by\nthe order in which the Package Manager locates the packages during\ninitial boot. To support a well-defined order, pre-installed overlay\npackages are expected to define an additional 'priority' attribute in\ntheir <overlay> tags:\n\n    <overlay target=\"com.target.package\" priority=\"1234\"/>\n\nPre-installed overlays are loaded in order of their priority attributes,\nsorted in ascending order.\n\nThe following example shows the ResTable and PackageGroups after loading\nan application and four overlays. The resource lookup framework will\nquery the packages in the order E, D, C, B, A.\n\n        +------+------+-     -+------+------+\n        | 0x01 |      |  ...  |      | 0x7f |\n        +------+------+-     -+------+------+\n            |                           |\n        \"android\"                Target package A\n                                        |\n                       Pre-installed overlay B (priority 1)\n                                        |\n                       Pre-installed overlay C (priority 2)\n                                        |\n                      Downloaded overlay D (install time T)\n                                        |\n                    Downloaded overlay E (install time T + 1)\n\nTEST CASES\n----------\nTest cases are part of CTS. To verify this patch, run\n\n    $ make cts\n    $ echo | cts-tradefed run cts --package android.runtimeresourceoverlay\n\nChange-Id: I3d678921f642fe00dd9580bcb5828789c1b1c915\n\nConflicts:\n\tservices/core/java/com/android/server/pm/PackageManagerService.java","distinct":true,"url":"https://api.github.com/repos/ReOSProject/android_frameworks_base-new/commits/c1e661904653cfb2035e2005ae5e1cd16eeef8ce"}]}