summaryrefslogtreecommitdiffstats
path: root/tests/SharedLibrary
Commit message (Collapse)AuthorAgeFilesLines
* Load shared library dependencies for AppWidgetsAdam Lesinski2014-10-075-0/+79
| | | | | | | | | | PackageManager and AppWidgetHostServiceImpl should be loading the resources of any shared libraries being used by the app, as they have references in their Widgets or application icons/labels, etc. Bug:17668152 Change-Id: I359662334edb125d7570089916727df4eeba02bb
* Revert "Fix issue with using locally defined attrs in a shared lib"Adam Powell2014-10-013-28/+5
| | | | | | | | | | This reverts commit 5069dd69898bd0d9c69ba2bbd37239ec8d1c9dc6. The reverted commit caused issues loading resources supplied by static libraries. Bug 17748356 Change-Id: I860a4f31451ee7c03c02974826472a67226b029f
* Fix issue with using locally defined attrs in a shared libAdam Lesinski2014-09-303-5/+28
| | | | | | | | | | | The attribute name resource IDs were never fixed up with the runtime package ID so we weren't finding attributes whenever the runtime package ID was different than the build time one, which happened to be when a shared lib referenced itself (0x00 vs 0x02). Bug:17666947 Change-Id: Icf3e874bcea0e27eebe42d60fbed626a34bf9266
* Add shared library support to aapt dumpAdam Lesinski2014-07-302-1/+2
| | | | | | | | AAPT dump should be able to handle dynamic references that often come with shared library resources. Bug:16678251 Change-Id: I6c8cd943145aab20ca9db9694c8c433b3c64279b
* Use new build var to depend on an APKs resourcesAdam Lesinski2014-03-251-1/+1
| | | | | | | Some other projects use LOCAL_APK_LIBRARIES and don't yet work with the new shared library changes. Change-Id: Ibb54bc1b5e3eb1252cf5b4e45249b089d25854ac
* Shared library resource supportAdam Lesinski2014-03-2513-6/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Shared libraries can now export resources for applications to use. Exporting resources works the same way the framework exports resources, by defining the public symbols in res/values/public.xml. Building a shared library requires aapt to be invoked with the --shared-lib option. Shared libraries will be assigned a package ID of 0x00 at build-time. At runtime, all loaded shared libraries will be assigned a new package ID. Currently, shared libraries should not import other shared libraries, as those dependencies will not be loaded at runtime. At runtime, reflection is used to update the package ID of resource symbols in the shared library's R class file. The package name of the R class file is assumed to be the same as the shared library's package name declared in its manifest. This will be customizable in a future commit. See /tests/SharedLibrary/ for examples of a shared library and its client. Bug:12724178 Change-Id: I60c0cb8ab87849f8f8a1a13431562fe8603020a7
* Improve/flesh-out shared library version check.Dianne Hackborn2013-03-152-35/+102
| | | | Change-Id: I3d6eb19c8aeaae07a6d17de81ac707c7741608fb
* Implement limited shared libraries in apks.Dianne Hackborn2013-03-129-0/+275
You can now declare shared libraries in apks that are on the system image. This is like the existing mechanism of using raw jar files as shared libraries, but since they are contained in an apk the library can actually be updated from the Play Store. And this even (mostly) works. There are some deliberate limitations on this feature. A new shared library *must* be declared by an apk on the system image. Installing an update to a system image apk does not allow you to add new shared libraries; they must be defined by everything on the base system image. This allows us to get rid of a lot of ugly edge cases (shared libraries that were there disappearing after an update is uninstalled for example) and give some brakes on apps that happen to be pre-installed on devices from being able to throw in new shared libraries after the fact. In working on this, I ran into a recently introduced bug where uninstalling updated to system apps would fail. This was done to allow for the new restricted users that don't have all system apps, but conflicts with the existing semantics for uninstalling system apps. To fix this I added a new uninstall flag that lets you switch on the new mode if desired. Also to implement the desired logic for limitations on declaring new shared libraries in app updates, I needed to slightly tweak the initial boot to keep the Package object for hidden system packages associated with their PackageSetting, so we can look at it to determine which shared libraries are allowed. I think this is probably more right than it was before -- we already need to parse the package anyway, so we have it, and when you install an update to a system app we are in this same state until you reboot anyway. And having this fixed also allowed me to fix another bug where we wouldn't grant a new permission to an updated app if its system image version is updated to request the permission but its version is still older than whatever is currently installed as an update. So that's good. Also add new sample code showing the implementation of an apk shared library and a client app using it. Change-Id: I8ccca8f3c3bffd036c5968e22bd7f8a73e69be22