summaryrefslogtreecommitdiffstats
path: root/test-runner
Commit message (Collapse)AuthorAgeFilesLines
* am: Handle unchecked activity starts for protected components.Adnan Begovic2016-05-191-1/+2
| | | | | | | | | | | | Previously if you received a notification from a protected app, since AM would state that the calling package was also the target package, the protected apps implementation would allow you to launch into the application. Mitigate this by hooking into the unchecked activity start stack (pending intent launches) globally. Change-Id: I0371593ade9e4af2554962873d89a0f82a639b57 TICKET: PAELLA-216 FEIJ-160 FEIJ-177
* fw: Fix protected apps implementation.Adnan Begovic2016-01-221-0/+9
| | | | | | | | | | | | | | | Currently a protected component could be accessed from any other means other than the launcher, entirely defeating its purpose. Instead, hook into the activity stack supervisor and quelch attempts at invocation of protected components. This implementation also provides feedback to the user on any attempt to start the component when its in a protected state. TICKET: CYNGNOS-84 Change-Id: Ib0165e7504adb08e21e9566c7394b37dffd280d4
* Fix a couple of checkapi errors for themesScott Mertz2015-10-311-0/+4
| | | | Change-Id: Iee2ded64f0bea8a295895542eecf7b9256ce0476
* Themes: Properly hide recreateThemed34d2015-10-271-0/+1
| | | | Change-Id: Ifa23515cfbf8eaf16d2bbe26374cbdcf65929dff
* Clear Theme in System UIAndy Mast2015-10-271-0/+5
| | | | | | | | | | | | | When SystemUI first starts an android theme object is created which contains references to the currently applied CM theme. When the theme is changed to system, the theme remains in memory with old references to the prior applied theme. (See mPackages in ResTable::Theme) This patch introduces a recreate theme method into Context so that SystemUI can recreate its own theme object. Change-Id: I086a76afa6f456a69c0390573bc8af2eafa4fb4e
* Themes: Port to CM13 [1/3]Andy Mast2015-10-262-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Themes: Aapt port Id: I106d447daf7935bada65e78911d8973ce0ca27ae Themes: Port our additions to idmap Id: I2e47cc23de4e7c0b884cccbd87c7d77079ac6824 Themes: remove legacy theme support from idmap Id: I17dfe35f9985d8cef790b26a8bcda738ea65917c Themes: Forward port changes to Installer.java Id: If64e856773e50f5ed74f2358e0c590abad724689 Themes: Add clean spec for aapt Id: I68f5f63f7e83b99230860dd2d8646e96da484b62 androidfw: Port CM overlay contributions Id: Id7b7f5f35011922c668fcea3a8aec5b42bd28653 androidfw: Port addOverlayPath and removeOverlayPath Id: I279db083af28fd8941f3227f2a7512ff094742c1 androidfw: Port addCommonOverlayPath Id: I12d2fe05a04f6a7e553c330505a475346374b507 androidfw: Port addIconPath Id: Ide3db28cde0c7f93edd9e7ad626ebace8d4105cc androidfw: Allow package ID to be overriden at runtime Id: Ieca3a0ae070a6c0ad0cf2b73b5944d83397d08b9 Aapt: Zip Parsing Test Cases w/ Refactoring Id: I28f9115700e186136432138d228111ebcfbd0480 Themes: Update tests for idmap Id: I3dae5bd376d122eab397863378599ae0ac7c6734 androidfw: Add test case for overriding package id Id: I2668c529e24a55cd6bc8437406fc284b853a75e7 androidfw: Add tests for bags The overlayOverridesStyleAttribute will currently fail since our changes to allow theming styles is not currently implemented. Id: Idfacc4382baf4152c839799a22b6cbe015ef2197 androidfw: Don't consider package ids 0x60 and 0x61 as dynamic Package IDs that are not 0x01 (system) or 0x7f (app) are treated as dynamic references. Overlays are assigned specific package ids that fall within the region of shared libraries. This patch treats them the same as system and app resource packages. Id: Ieecaa889bed50490796351302405a38f77c84f4e Theme Parsing & Info Id: I3583d7e8ca704402e3d8c6e1c7cea1645b91c06f Port ThemeUtils and its dependencies This is pretty much copy/paste from cm-11.0 Id: I406860a259136ccca107b981aca0369851df445e Themes: AndroidManifest and Intent port Id: Ib97e8539301d20d120fd8b49891fdaae8205fe42 ComposedIconInfo Port (w/ stubbed IconPackHelper) IconPackHelper is stubbed out so that PMService can reference it, we'll need to port the Resource stack before porting the implementation. Id: I59b680511de525e1d375a4f3be04347686b5e81b Port PackageManagerService and other dependencies Id: I11629d1e5eee21e01c060bc6c0393aae96034b69 Themes: Add in ThemeService See also: external/selinux. The policy must be added in order for the service to start without a security exception. Change-Id: Ic6f64796b264e430e9706a17a3fd2a35085fd1ca TODO: ThemeService / Keyguard interaction TODO: SystemServer - AppsLaunchFailure Add AppsLaunchFailure Id: I09a3826f89c62cb898866408e807f269616f48fc androidfw: Update bags tests The overlayOverridesStyleAttribute was updated such that it does not check the attribute of the theme before adding the overlay. The bag is cached on the first call and the next call, after the overlay is attached, returns that pre-computed bag so the test would always fail. We now simply check that the attribute matches the one in the overlay, and if so then the test passes. This patch also adds a new test to check that an overlay can reference and access resources that are unique to the overlay. Currently this test fails. Id: I3892df3f0d9443a73eaa11b3d5e97cfe86620a73 androidfw: Add test for referencing overlay styles as parents Id: I4fa3bd447c888e96176955924ebe7ee5c784ab55 androidfw: Allow referencing and retrieving overlay resources This patch allows a theme to reference it's own resources. Overlays get their own group which contains those resources that are not idmapped. Idmapped resources end up in the target's group. Id: Ibc119ddcdb35d44a8afec3c6152bcab2909cda18 androidfw: Fill in missing attributes from overlay style Id: I74051b379b73c728c6a2aa4bc62f3cd268a40b53 Protect windowNoTitle and windowActionBar attributes This patch creates a new method to define "protected" attributes. These are attributes like windowActionBar which should not be modified by a theme. Some apps (eg gmail) use the appcompat library which has its own Actionbar classes. When an app uses its own Actionbar it must not include the default actionbar which is achieved through the windowActionBar attribute. Some themes may try to change these attributes, which can will cause the app to crash. Id: Ie3bb7285eed09f3f13facf9d142ea9eb83796eec Themes: Use SYSTEM_DEFAULT in ThemeService Id: I52794dd98ca2f64aa50046ecdd7f79f27c21dd98 androidfw: Test missing parent attributes are merged in This test checks that an overlaid style contains any attributes that were in the original style but omitted in the overlaid style. Id: I6b496ef2eb0a7ef27b4fafdfda5bdf7ccffad989 androidfw: Add test case for protected attributes For this test to pass a protected attribute, such as windowNoTitle, must be equal to the original and not the value specified in the overlay. Id: Ic03f11214a1fc4139e3c48d7e72694a80f819023 Themes: Attach theme and icon resources from java Id: I9ffa0ce96a4af603b78b32d6b190f9698d3e4b4f Themes: Icons, icons, icons! Let there be icons. Legacy icons and composed icons are included in this patch. Id: I9fedafa270f1c4dc30c9c8ffd4cf619895e688e6 Themes: Retrieve explicitly themed context and resources Id: I4e41c251aee47361b183b60089bf5666540f653e Themes: Add themeChange config change to manifest Id: Ia84c0089a79637906e4f75fa38a56e8ff3b21a2b Themes: Register THEME_SERVICE in ContextImpl Id: I608a0b65c7e2ff0d69bae7bf343916f2b985f4a0 Themes: Remove legacy theme support Id: I25887843d31f705425aa40f9a23482fd2cafaef8 androidfw: correctly index paths in idmap Since we added the mtime values for the target and overlay, the indices are increased by two. Id: Ie0f5474d425945d58a12021cd2739240d2e98c0a androidfw: Fix opening assets from theme resources Id: Iedb51163a62b046cdf7fda1ad1b55cc1ee409047 Themes: Consider overlaid resource as "best fit" Id: Ife8342a49eb9502be52f085f88161b113332e9e6 Themes: Save and restore theme config Id: I3fcd445fb458aa6ed09397c05df6eb66d9be7235 Themes: Let ThemeService process additional themes Id: I45837f26948367d5cc6c520e8c53f9da60bd1fda AAPT: Don't applyVersionForCompatibility on android When compiling themes with aapt, we do not want aapt to call applyVersionForCompatibility as this causes the entries in the resource table to have an incorrect path. Id: Ie2c69533b3659c7b7458d6e4b7bdc84946d1be8e androidfw: Don't consider package id 0x5f as dynamic Package id 0x5f is reserved for common overlay resources and needs to be reserved so that it is not considered a dynamic. Id: Id27b8e0e2231ee8541365274d512e347afcfd05b AAPT: Include resources.arsc in apk Common resources needs the resources.arsc in the resources.apk so that it can be included when processing other overlays. Without it, common resources cannot be referenced. Id: I4aee29f660e4a0aa1909240dc0ca5680f0a2d135 Themes: Add keyguard wallpaper support to theme service Id: Ib8f8acd55ab4d2b6ef06ee0a630dc50c4f870beb Themes: Don't pre-process non .9.png images When creating a resources.apk we do not need to pre-process the normal .png images as those can be referenced directly from the theme's apk. Id: Iaf846a03ead9ecb1e68c040eac6e0ecbfc6e5875 Themes: Adjust offsets for idmap hashes Idmap now has a header so the indices to the hashes need to be incremented by one. Id: If1fb183cc116ef9e3ad6cb4e17b6e44763e9e72a Themes: Use single ThemeInfo instead of an array We only ever used the first index so there is no need to use an array of ThemeInfo(s) Id: I9e2af076bc17396a0c978be3c0d31c41277db3df New converter for Kitkat -> L fonts.xml L introduced a new fonts xml format. Its great, but our themes will keep using hte old format. This provides a converter and test cases. The parser was taken from the chooser and remains mostly unchanged with the exception of a getName() helper method. Id: Ia1d42c9e50eb7b52d2d98fe6dbeee530bef3adc2 Themes: Port theme bootanimation support to CM12 Id: Ie016884b0e3b77e08732308923ac44e0975e0116 Resources: Clear drawable cache Id: I04b5b78cce703194a2baeff9c51d2e4733b8ccc9 Font switching Id: Ia43060a7db624102cdcd9b0d9dc7148441401584 Zygote changes Id: Ie3681cf0d2b9929661cf1214e899cef9a5f37471 Recreate String Blocks Id: I4747ebd1a0908b76ae7214b0584948353d426fc5 add a getter for the x and y offsets of the wallpaper window Id: I35294bcac664e85cc5d344b50b5c4335a60d3f37 Themes: Don't spam logcat with CREATING STRING CACHE When processing resources with AAPT on the device, it spams the logcat with warning messages about CREATING STRING CACHE. Change ALOGW to ALOGV so it will only show when verbose logging is enabled. Id: I5b591c3336e176dd71cebe672d60721c29651b00 SystemUI: Audio Volume Panel Id: I78c471864af401b274597339b8451e65931fdb32 AmService uiContext port Id: Ida251d7f80797b0ec78b3d20cf60a795d6c4c1f0 Cleanly detach theme assets Types from an overlay are added to the target group's TypeList and need to be removed when the overlay assets are detached. Failing to remove these types results in resources not being retieved due to the erroneous types. Id: I4a9c624e30309e61fce905ced45c55acd3ac4845 Themes: GlobalAction Port Id: Ifd87e04f94a284e77f1c48bec9fd75d69c45c47e Themes: Do not store forward locked themes in ASEC containers If a theme is in a asec container and is applied, when the device is rebooted the device will get stuck in a nasty boot loop since the theme resources must be read and the asec container is not ready yet. Id: I1d93d8175d5c40b34c222974960c43352012a5ad Use systemui's applied theme for notifications. Notifications contain RemoteViews which are inflated using the application's context for which this notification belongs to. This can look out of place if SystemUI is using a different theme than the rest of the system. This patch will use SystemUIs theme when inflating the RemoteViews, giving us a more consistent look in the notification drawer. Id: I9514ce7fcc4858bad3d3c4190f55c1f5a1441d7c SysUI: Add theme support This ports over the changes needed to facilitate a theme change in SystemUI. Id: I673fb79db90994371a9c0627746a97414132f0ba Themes: Allow composing of VectorDrawable Base icons can be vector drawables. This patch allows them to be composed. Currently, VectorDrawables cannot have filters applied since they do not have a method to get the Paint object like BitmapDrawable and PaintDrawable. Id: I762c8e1f4d1c945b8ebc164bbd7944120324bd42 Themes: Add target api to ThemesContract This will allow the ThemesProvider to track the api a theme was built for. We may want to let the user know when a theme may not be designed for the version of CM installed on their device. Id: Idf0e6cef0ce9ac5e221ce5ff7e0b155ae0258d5f Access Themed ResTables from compiled theme apk [1/2] Before this patch the ResTable for a theme/app was created and accessed seperate from the compiled APK. Since the compiled APK has its own copy of the resources.arsc, we can just reuse the table in the APK instead. Id: I106a2434e74784bc04014831098f49fe128bc7e2 Themes: Port AppsLaunchFailureReceiver to CM12 Id: I5c3265e64aef1536ba5fceed0ec89082e786b686 Themes: Bump idmap hash version to 3 Due to changes in idmap, we need to force the recreation of resource cache when upgrading from CM11 to CM12. Id: I25c1e2c598bca889818e2d685651e3214c30ab3c Remove debug logs Id: Ia5cfa83ddf6da195e20526a94ba154864b8d0ecb Send target sdk version to aapt [1/2] If vector drawables are used in a theme we must have a minSdkVersion of 21 passed to aapt or else aapt will Segfault. Id: I687ee146f9f80543bbcdd06d93891cb3b23001c4 Add missing imports to ActivityThread Id: I09fe07807ed824ccb938e0e174b06653c613c403 Themes: Dynamically add/remove content from StatusBarWindow StatusBarWindowView has logic for resizing and fading content which doesn't always behave correctly if this view is not the root. Rather than create a container, this patch uses the existing StatusBarWindowView as the container and the inflated status bar is then added to this view. Id: Ia93d25a589419145f95d75b1b56eb3c2f300f935 Themes: don't use preloaded drawables when themed If we have themed assets we should try and load those rather than pulling from the preloaded drawables. This allows us to continue and preload drawables in ZygoteInit while maintaining the ability to theme those preloaded assets. Id: I68cfc099d328ece0791b6d0e5cf11d07097fd1fd CM11 -> CM12 Upgrade [1/3] - Introduce a new secure setting "THEME_PREV_BOOT_API_LEVEL". This field will always be set to the previous api level for themes. So if we upgrade from CM11 to CM12 this value will differ from the current API causing an upgrade to trigger - When moving from CM11 -> CM12, unapply incompatible overlays - Rename "holo" to "system" in secure settings themeConfig - Provide a testing downgrade script to put the secure settings db into a state similiar to CM11 (at least for themes) Id: I71be2c0ad83e60ffe8c574f913e5eaecb9700045 Themes: Add constant for system target API Id: I0a6caf65c9e8b0feeef1ae848ba4683235304e8c Change-Id: Ide6d4e1daf535a54efb1ec7cf39ef8b2fb8cf272
* Protected appsRaj Yengisetty2015-10-231-0/+7
| | | | | | | | | | | | | | | | | | Fix up protected apps filter. Move filtering to correct place (when querying providers, ResolveInfo.activityInfo is null), and port over commit 4dad4a4e84ec385a80ebfae91c4dcd03ec30c9d0 from cm-11.0. Protected Apps: do not filter components from the same UID pm: Use ArraySet instead of HashSet packagemanager: Use ArrayMap/ArraySet as per AOSP * To reduce memory consumption Change-Id: Ic690387cd21fdfa09ef5fb19bd3de9305050cf6e
* Remove dependencies on the package installer's package nameSvet Ganov2015-07-291-0/+6
| | | | | | bug:22700053 Change-Id: I8540eb8577fbec84e1a67e31e1c31ba654c828a4
* Fix issue #21626564: MMS should be receivied while DozingDianne Hackborn2015-07-141-2/+8
| | | | | | | | | | | | | | | | | | | | | | We now place whoever is receiving the MMS on the temporary whitelist while doing so, so they can get network access to download it. There was also an issue that needed to be fixed where we were no longer updating the list of allowed uids while dozing based on their proc states... we now do that. Also did a bit of optimization of the temp white list update path do the network policy manager, instead of going through a broadcast we now directly call in to the network policy manager. This also allows us to have a synchronous version of updating the list, so we can know the app has network access before we tell it to do anything. Finally added battery stats events for things going on and off the whitelist so we can diagnose the behavior there. Change-Id: Ic7fe010af680034d9f8cb014bb135b2addef7455
* Added sendBroadcastMultiplePermissions methodFyodor Kupolov2015-07-141-0/+6
| | | | | | | | | Added Context.sendBroadcastMultiplePermissions(Intent intent, String[] receiverPermissions) method, which allows an array of required permissions to be enforced. Bug: 21852542 Change-Id: I27c9130e8f004b428452501ebc8a36aabde1f343
* Revert "Allow array of required permissions in sendBroadcast"Fyodor Kupolov2015-07-141-6/+0
| | | | | | This reverts commit b4e7283c9afd9fb15ebd63f6ce9b75c9c1af658b. Change-Id: Ie8390964bda5bdfa869cee8f46584043d8e7c664
* Allow array of required permissions in sendBroadcastFyodor Kupolov2015-07-141-0/+6
| | | | | | | | Added Context.sendBroadcast(Intent intent, String[] receiverPermissions) method, which allows an array of required permissions to be enforced. Bug: 21852542 Change-Id: I3b8ff258fa9f3249c344bb8093b820b24eef00c0
* Add an API for apps to query if a permisison is denied by policy.Svet Ganov2015-07-081-0/+5
| | | | | | bug:22177216 Change-Id: I32227f55097fae997f33743fd1eee06cb18f47f1
* Fix issue #21814207 and issue #21814212 (alarm manager)Dianne Hackborn2015-06-171-0/+17
| | | | | | | | | | | | | | | | | Issue #21814207: AlarmManager.setAndAllowWhileIdle should also allow wake locks. Introduce a whole new infrastructure for providing options when sending broadcasts, much like ActivityOptions. There is a single option right now, asking the activity manager to apply a tempory whitelist to each receiver of the broadcast. Issue #21814212: Need to allow configuration of alarm manager parameters The various alarm manager timing configurations are not modifiable through settings, much like DeviceIdleController. Also did a few tweaks in the existing DeviceIdleController impl. Change-Id: Ifd01013185acc4de668617b1e46e78e30ebed041
* Add system API to watch for permission changesSvetoslav2015-06-101-0/+12
| | | | Change-Id: I1ce450a59fb326c14848f46732d877dea33f33c7
* Add API to hint whether to show on-board UI before a permission request.Svetoslav2015-06-021-0/+6
| | | | | | bug:21511988 Change-Id: I9d1d7adf34b68074e65510f53b6e642cf784cf6b
* Add permission meta-state flags to support grant/revoke permission policy.Svet Ganov2015-05-111-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | We now maintain a mata-state with each permission in the form of flags specyfying the policy for this permission. This enables support of the following use cases: 1. The user denies a permission with prejudice in which case an app cannot request the permission at runtime. If an app requests such a permssion it gets a denial unless the user grants the permission from settings. 2. A legacy app with disabled app-ops being upgraded to support runtime permissions. The disabled app ops are converted to permission revocations. The app ops manager is a part of the activity manger which sits on top of the package manager, hence the latter cannot have a dependency on the former. To avoid this the package installer which is the global permission managment authority marks the permission as revoked on upgrade and the package manager revokes it on upgrade. 3. A device policy fixing a permission in a granted or revoked state. This additional information is folded in the meta-state flags and neither apps can request such permissions if revoked not the user can change the permission state in the UI. Change-Id: I443e8a7bb94bfcb4ff6003d158e1408c26149811
* Package and storage movement callbacks.Jeff Sharkey2015-04-231-8/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since package and primary storage movement can take quite awhile, we want to have SystemUI surface progress and allow the Settings app to be torn down while the movement proceeds in the background. Movement requests now return a unique ID that identifies an ongoing operation, and interested parties can observe ongoing progress and final status. Internally, progress and status are overloaded so the values 0-100 are progress, and any values outside that range are terminal status. Add explicit constants for special-cased volume UUIDs, and change the APIs to accept VolumeInfo to reduce confusion. Internally the UUID value "null" means internal storage, and "primary_physical" means the current primary physical volume. These values are used for both package and primary storage movement destinations. Persist the current primary storage location in MountService metadata, since it can be moved over time. Surface disk scanned events with separate volume count so we can determine when it's partitioned successfully. Also send broadcast to support TvSettings launching into adoption flow. Bug: 19993667 Change-Id: Ic8a4034033c3cb3262023dba4a642efc6795af10
* Always send volume UUID with installd commands.Jeff Sharkey2015-04-181-10/+5
| | | | | | | | Since packages can be moved to other volumes, all relevant commands to installd now require an explicit volume UUID parameter. Bug: 20275577 Change-Id: Ie84f5bc43c7aada5800b8d71692c7928b42b965e
* Add OP_READ_PHONE_STATE app op - frameworkSvet Ganov2015-04-171-0/+7
| | | | | | | | | The READ_PHONE_STATE permission protects PII information and is in the Phone group. This change is adding the corrseponding app op for gating access to the API guarded by READ_POHNE state which will be used instead as an access control for legacy apps. Change-Id: I2ff895a5a0e529f26ec0ad706266a30d829268ba
* Candidate volumes for packages, fix symlink.Jeff Sharkey2015-04-151-0/+14
| | | | | | | | | | | | | | Add API to determine the possible candidate volumes that a package can be moved to. For example, it currently knows that we need to move ASEC-based apps through internal storage before migrating them to a private volume. Comparator for consistent VolumeInfo ordering when displayed in UI. Fix native library symlink to be volume UUID aware. Bug: 19993667 Change-Id: I68d5fac5f0f776ac1c7dd15e7a984bfe2704f3f7
* Merge "Add Default Browser App support and relax Hosts validation for AppLinks"Fabrice Di Meglio2015-04-111-0/+10
|\
| * Add Default Browser App support and relax Hosts validation for AppLinksFabrice Di Meglio2015-04-101-0/+10
| | | | | | | | | | | | | | | | | | | | | | - add private PackageManager APIs for setting/getting the default Browser App package name - serialize / deserialize the default Browser App package name per User Also relax the Hosts name validation for the AppLinls feature. Now we just care if the IntentFilter is having an HTTP or HTTPS scheme. Change-Id: I4436f66ac6beff57e14f7f3a2a00b0b582c03be9
* | Merge "Expose Cursor.setExtras()."Jeff Brown2015-04-101-0/+47
|\ \ | |/ |/|
| * Expose Cursor.setExtras().Jeff Brown2015-04-091-0/+47
| | | | | | | | | | Bug: 19369537 Change-Id: I78e319667cbfaeb51f471d18c4fefeac01d49d80
* | Add IntentFilter auto verification - part 3Fabrice Di Meglio2015-04-071-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - add private API PackageManager.getAllIntentFilters(String) for getting all IntentFilters from a given package - update IntentFilterVerificationInfo to use an ArrayList<String> for domains instead of a String[] - if you make an App a default domain handler then make the others as non default - create an IntentVerificationInfo even if the App IntentFilters do not need to be verified. This would be done only if the App has some domain URLs defined and would allow to make it the default handler for a domain - a few code optimizations here and there Change-Id: I4535372a0bb1a2c8e662e1485be8ca700003e9b3
* | Installing packages to expanded storage.Jeff Sharkey2015-04-061-3/+8
|/ | | | | | | | | | | | | | | | | | | | | | | | PackageManager now offers to load/unload packages when expanded volumes are mounted/unmounted. Expanded storage volumes are still treated as FLAG_EXTERNAL_STORAGE from a public API point-of-view, but this change starts treating the INSTALL_EXTERNAL flag as exclusively meaning ASEC containers. Start tracking the UUID of the volume where a package is installed, giving us a quick way to find relevant packages. When resolving an install location, look across all expanded volumes and pick the one with the largest free space. When upgrading an existing package, continue preferring the existing volume. PackageInstaller now knows how to stage on these volumes. Add new movePackage() variant that accepts a target volume UUID as destination, it will eventually move data too. Expose this move command through "pm" command for testing. Automount expanded volumes when they appear. Bug: 19993667 Change-Id: I9ca2aa328b9977d34e8b3e153db4bea8b8d6f8e3
* Add IntentFilter auto verificationFabrice Di Meglio2015-03-301-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The purpose of this feature is to prompt the Disambiguation dialog to Users as less as possible. - add the new "autoVerify" property to the IntentFilter class - add new APIs to PackageManager: verifyIntentFilter(int, int, List<String>), getIntentVerificationStatus(String, int), updateIntentVerificationStatus(String, int, int), getIntentFilterVerifications(String) for supporting IntentFilter verification - add support for multi-user - update PackageManager for IntentFilter verification: basically when we are installing a new package, ask for verification of all domains from the IntentFilters that have the "autoVerify" to true. This means that the PackageManager will send a well defined protected broadcast (with a new INTENT_FILTER_NEEDS_VERIFICATION action) to an IntentFilter verifier to do the real job of verification. We are passing in the broadcast Intent all the necessary data for doing the verification. The PackageManager will receive as response the result code of the domain verifications and, if needed, the list of domains that have failed the verification. - add a new INTENT_FILTER_VERIFICATION_AGENT permission that needs to be set by an intent filter verifier to be considered as a trustable party by the PackageManager. - add also a new BIND_INTENT_FILTER_VERIFIER permission for securing the binding between the PackageManager and a service doing the intent filter verifications. - add ResolveInfo filterNeedsVerification which is a boolean to knows if the IntentFilter is of a type that needs a verification (action VIEW, category BROWABLE, HTTP/HTTPS data URI) - add new "domain-preferred-apps" / "d" dump command for listing the prefered Apps for all domains - add new "intent-filter-verifiers" / "ivf" command for listing the IntentFilterVerifier used - introduce the IntentVerificationService which is a basic service for verifying IntentFilters. This service will send HTTPS requests to the domain declared in the IntentFilter(s) for doing the verification. This service has a low priority level so that it can be replaced by a more sophisticated one if needed. This service is updating the PackageManager intent verification states thru the updateIntentVerificationStatus(...) API. - update MockPackageManager Change-Id: I0bfed193d0bf1f7c7ac79f6c1b160b7ab93b5fb5
* Runtime permissions: per user permission tracking.Svetoslav2015-03-232-2/+7
| | | | | | | | | | | | | | | | | | Before all permissions were granted at install time at once, so the user was persented with an all or nothing choice. In the new runtime permissions model all dangarous permissions (nomal are always granted and signature one are granted if signatures match) are not granted at install time and the app can request them as necessary at runtime. Before, all granted permission to an app were identical for all users as granting is performed at install time. However, the new runtime model allows the same app running under two different users to have different runtime permission grants. This change refactors the permissions book keeping in the package manager to enable per user permission tracking. The change also adds the app facing APIs for requesting runtime permissions. Change-Id: Icbf2fc2ced15c42ca206c335996206bd1a4a4be5
* Fix some javadocs typosEvan Charlton2015-03-021-3/+3
| | | | | | "Delegating" was misspelled in various ways. Change-Id: I7b441f1c33b7d876b8f82829fddc1eb017cce2d0
* Add Context.getSystemService(Class<?>).Jeff Brown2015-02-251-0/+5
| | | | | | | | | | | | Added an overload of getSystemService() that takes a class instead of a service name to eliminate the extra cast and provide more type safety. Cleaned up docs. Removed the default constructor of BatteryManager which should not have existed. Change-Id: I9da46b20641fc83ecd3342560e5b94cb721f289c
* am 42fec57f: am d9968438: Merge "Fix issue with call backs from media ↵Dianne Hackborn2014-11-213-3/+17
|\ | | | | | | | | | | | | process." into lmp-mr1-dev * commit '42fec57f3addfb1958f814b5d6772ff81341ba20': Fix issue with call backs from media process.
| * Fix issue with call backs from media process.Dianne Hackborn2014-11-193-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All but a few lines of this is for issue #16013164, which allowed apps to do some operations as the media uid by having it call back to them to open a file. The problem here is with the tempory identity stuff in the activity manager, allowing us to make the open call as the original caller... ideally we should figure out a way to just get rid of all of that, but the solution here is actually easier (even though it doesn't look it) -- we now hand a token over to the openFile() call that it can use when doing permission checks to say "yes I would like the check to be against whoever is responsible for the open". This allows us to do the uid remapping for only this one specific set of permission checks, and nothing else. Also fix issue #17487348: Isolated services can access system services they shouldn't be able to. Don't send any system service IBinder objects down for the first initialization of an isolated process. Change-Id: I3c70e16e0899d7eef0bae458e83958b41ed2b75e
* | am 73577862: am b1346d78: Merge "Change boot screen title to "Android is ↵Jeff Hao2014-10-301-0/+8
|\ \ | |/ | | | | | | | | | | starting" when not upgrading." into lmp-mr1-dev * commit '73577862ffe6332f326628febfa1fbb9e693bb40': Change boot screen title to "Android is starting" when not upgrading.
| * Change boot screen title to "Android is starting" when not upgrading.Jeff Hao2014-10-291-0/+8
| | | | | | | | | | Bug: 17565501 Change-Id: Id5741e6e7a40750feee1cd7306e79f7baeec67de
* | am 6c995613: am 301d2276: am 49e2371a: Merge "Log exception when creating ↵Filip Gruszczynski2014-10-101-4/+9
|\ \ | |/ | | | | | | | | | | Activity in ActivityUnitTestCase." into lmp-sprout-dev * commit '6c99561384dafaa080b804078e55c6167efe0e11': Log exception when creating Activity in ActivityUnitTestCase.
| * am 49e2371a: Merge "Log exception when creating Activity in ↵Filip Gruszczynski2014-10-091-4/+9
| |\ | | | | | | | | | | | | | | | | | | ActivityUnitTestCase." into lmp-sprout-dev * commit '49e2371a271e33bbe8177c3f87d5f3b8ef7f59c5': Log exception when creating Activity in ActivityUnitTestCase.
| | * Merge "Log exception when creating Activity in ActivityUnitTestCase." into ↵Filip Gruszczynski2014-10-081-4/+9
| | |\ | | | | | | | | | | | | lmp-sprout-dev
| | | * Log exception when creating Activity in ActivityUnitTestCase.Filip Gruszczynski2014-10-031-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If the creation of an Activity fails, it is impossible to determine what went wrong. We should log the exception immediately before failing on assert. Change-Id: Ie6cbe87ff342b8d60989f5e1a6ffa3efc058c585
* | | | am 59f7c4c7: am 1cb156bb: am f35c305f: am 6a3faf5a: Merge "Fix test ↵Raluca Sauciuc2014-10-071-1/+1
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | framework to allow Mockito tests to run successfully on ART." into lmp-dev * commit '59f7c4c749fb69c9f83a3d28784147a941fecc58': Fix test framework to allow Mockito tests to run successfully on ART.
| * | | am f35c305f: am 6a3faf5a: Merge "Fix test framework to allow Mockito tests ↵Raluca Sauciuc2014-10-071-1/+1
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | | | | | to run successfully on ART." into lmp-dev * commit 'f35c305f45db60394c3c7fec2e41b38963da70ca': Fix test framework to allow Mockito tests to run successfully on ART.
| | * | Fix test framework to allow Mockito tests to run successfully on ART.Raluca Sauciuc2014-10-031-1/+1
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, Mockito tests don't run on ART (KitKat & L) due to an extra NoClassDefFoundError exception being thrown while trying to resolve internal test runner classes. These exceptions are benign, Mockito's internal test runners all inherit from org.junit.runner.Runner, which is not included in the setup, but none of them are actually used in tests. The same apks succeed on Dalvik, and logcat shows the same exceptions going by, minus the NCDFE's. Section 5.3 of the VM spec says the virtual machine has to wrap a ClassNotFoundException in NoClassDefFoundError if the first exception arises from verification or resolution but not initialization of that particular class. Bug: 17042833 Change-Id: I3af20f6884d9fa3afc3fbf9fcb238be10267827a
* | | am 00fcb749: am 31409c0c: Merge "Introduce new API to get an unbadged icon ↵Benjamin Franz2014-10-061-0/+7
|\ \ \ | |/ / | | | | | | | | | | | | | | | and unbadge permissions." into lmp-mr1-dev * commit '00fcb749cbd26c83d1a29a974bd92967b41c5882': Introduce new API to get an unbadged icon and unbadge permissions.
| * | Introduce new API to get an unbadged icon and unbadge permissions.Benjamin Franz2014-10-031-0/+7
| |/ | | | | | | | | Bug: 17125560 Change-Id: I61b884186c96cc54dcaf1d3c7ee8f47610fd1d21
* | resolved conflicts for merge of ee665151 to lmp-mr1-dev-plus-aospNeil Fuller2014-10-021-2/+2
|\ \ | |/ |/| | | Change-Id: I2588c65b7a9fa43f968151a206924a804f0595a7
| * Switch from FloatMath -> Math and Math.hypot where possibleNeil Fuller2014-10-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The motivation is an API change: FloatMath is going to be deprecated and/or removed. Performance is not the goal of this change. That said... Math is faster than FloatMath with AOT compilation. While making the change, occurances of: {Float}Math.sqrt(x * x + y * y) and {Float}Math.sqrt({Float}Math.pow(x, 2) + {Float}Math.pow(y, 2)) have been replaced with: {(float)} Math.hypot(x, y) Right now there is no runtime intrinsic for hypot so is not faster in all cases for AOT compilation: Math.sqrt(x * x + y * y) is faster than Math.hypot(x, y) with AOT, but all other combinations of FloatMath, use of pow() etc. are slower than hypot(). hypot() has the advantage of being self documenting and could be optimized in future. None of the behavior differences around NaN and rounding appear to be important for the cases looked at: they all assume results and arguments are in range and usually the results are cast to float. Different implementations measured on hammerhead / L: AOT compiled: [FloatMath.hypot(x, y)] benchmark=Hypot_FloatMathHypot} 633.85 ns; σ=0.32 ns @ 3 trials [FloatMath.sqrt(x*x + y*y)] benchmark=Hypot_FloatMathSqrtMult} 684.17 ns; σ=4.83 ns @ 3 trials [FloatMath.sqrt(FloatMath.pow(x, 2) + FloatMath.pow(y, 2))] benchmark=Hypot_FloatMathSqrtPow} 1270.65 ns; σ=12.20 ns @ 6 trials [(float) Math.hypot(x, y)] benchmark=Hypot_MathHypot} 96.80 ns; σ=0.05 ns @ 3 trials [(float) Math.sqrt(x*x + y*y)] benchmark=Hypot_MathSqrtMult} 23.97 ns; σ=0.01 ns @ 3 trials [(float) Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2))] benchmark=Hypot_MathSqrtPow} 156.19 ns; σ=0.12 ns @ 3 trials Interpreter: benchmark=Hypot_FloatMathHypot} 1180.54 ns; σ=5.13 ns @ 3 trials benchmark=Hypot_FloatMathSqrtMult} 1121.05 ns; σ=3.80 ns @ 3 trials benchmark=Hypot_FloatMathSqrtPow} 3327.14 ns; σ=7.33 ns @ 3 trials benchmark=Hypot_MathHypot} 856.57 ns; σ=1.41 ns @ 3 trials benchmark=Hypot_MathSqrtMult} 1028.92 ns; σ=9.11 ns @ 3 trials benchmark=Hypot_MathSqrtPow} 2539.47 ns; σ=24.44 ns @ 3 trials Bug: https://code.google.com/p/android/issues/detail?id=36199 Change-Id: I06c91f682095e627cb547d60d936ef87941be692
* | Remove unnecessary waits in TouchUtil's dragYigit Boyar2014-09-221-25/+57
| | | | | | | | | | | | | | | | | | TouchUtil's drag method tries to sync after sending each event which is not necessary. Sync are slow so removing them greatly improves test running time. Bug: 17323559 Change-Id: Ia4ed02b2af44da0d821d93d28f963005d9d7ea79
* | Remove package level intent forwarding.Adam Connors2014-09-111-18/+0
| | | | | | | | | | | | | | Clean up unused methods. Bug: 17389110 Change-Id: I8a80fe3e14219f06572de05c390cdda0efcbf5db
* | Addressing API council comments for UserManager.Svetoslav2014-09-051-1/+24
| | | | | | | | | | | | bug:17390424 Change-Id: I498d2541289915cb7db16e5c3249ccc7a7dc5ee6
* | Fix ProviderTestCase2 broken by ag/519661:Akos Ludanyi2014-09-052-11/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: 1. ProviderTestCase2 passes a null as a ProviderInfo to the ContentProvider 2. mAuthority and mAuthorities will be null during the test 3. ContentProvider.matchesOurAuthorities will throw an NPE. Fix: Supply a ProviderInfo with authority. Example bug: b/17379295 Change-Id: Ia533313c0994727ef81f337a4e31a57ae7ec3c15