Commit Graph

5082 Commits

Author SHA1 Message Date
Philip P. Moltmann
82b902204f Revert accidential merge 492a058d58
Test: Clean revert
Change-Id: I61d339bb85936e1d50742be1e4c6dab781f3a4e7
2017-02-14 17:02:50 -08:00
Philip P. Moltmann
492a058d58 resolve merge conflicts of d043a840f7 to nyc-mr2-dev-plus-aosp
am: b02f8eb241

Change-Id: I1307ea308423c0fd34564d788ab64c023a5be2c5
2017-02-14 18:28:25 +00:00
Philip P. Moltmann
b02f8eb241 resolve merge conflicts of d043a840f7 to nyc-mr2-dev-plus-aosp
Test: Clean merge
Change-Id: Ib2420ff793fdf22fd80cfaed7848ff6b8be8d382
2017-02-14 09:51:16 -08:00
Philip P. Moltmann
d043a840f7 Merge "[DO NOT MERGE] Revert "[DO NOT MERGE] Delay SharedPreferences.apply() by 50 ms"" into nyc-mr2-dev 2017-02-14 16:03:32 +00:00
TreeHugger Robot
02761acc67 Merge "Declarative downloadable fonts" 2017-02-14 15:39:04 +00:00
Clara Bayarri
4b5a4d221f Declarative downloadable fonts
Implement support for downloadable font requests in xml. Given the
xml fonts feature in O, this adds support to not only declare
local font files as font resources, but also Downloadable fonts
from a fonts provider.

A provider returns a font family (of one or more files) given a
query, so the new attributes are added to the font-family tag.

Additionally, add support to pre-declare downloadable font resources
in the Android Manifest. These will then be fetched at app startup
time so they are available to use from the Typeface cache asap.

When retrieving downloadable fonts via resources, the cache is
checked to see if the font is already there and is used, otherwise
a request is sent to the provider and the default font is returned
as we need a result synchronously.

To do this, the developer declares an additional fonts xml resource
file with the list of fonts to preload and links it in the manifest
with a meta-data tag.

E.g.:

res/font/mydownloadedfont.xml

<font-family xmlns:android="http://schemas.android.com/apk/res/android"
        android:fontProviderAuthority="com.example.test.fontprovider"
        android:fontProviderQuery="myrequestedfont">
</font-family>

res/font/preloaded_fonts.xml

<?xml version="1.0" encoding="utf-8"?>
<font-family xmlns:android="http://schemas.android.com/apk/res/android">
    <font android:font="@font/mydownloadedfont" />
</font-family>

and in the AndroidManifest.xml

<meta-data android:name="preloaded_fonts"
    android:resource="@font/preloaded_fonts" />

Bug: 34660500, 34658116
Test: WIP, need to add more
Change-Id: I1d92555e115e241bf23b59e6f5c6cca6c7361de7
2017-02-14 13:32:41 +00:00
TreeHugger Robot
4dba3cdf89 Merge "Refactor auto-fill" 2017-02-14 09:37:53 +00:00
Svet Ganov
782043caf8 Refactor auto-fill
* Fix a layering issue where auto-fill manager which is in view
  depended on activity which is in app

* Moved auto-fill classes to view or service based on their
  purpose and removed dependecy on the classes in view to the
  classes in service

* Push state to local auto-fill manager whether auto-fill is
  enabled to avoid making IPC for every focus transition if
  the user did not enable the feature

* Remove unnecessary offload to messages when handling calls
  to auto-fill manager service as these are made over a oneway
  interface and in general they do almost no work and typically
  we do these on the binder thread

* Removed id from data set and fill response as the provider
  can embed everything it needs to id them in the auth pending
  intent

* Enforce the auth UI to be only an activity as this will work
  with multi-window, recents, and back and also does not require
  draw on top of other app special permission

* Authentication also no longer requires passing a remotable
  callback to the auth activity but the activity handles the
  request as if called for a result

* Handling stopping of a user to clean up in-memory state as
  well as handling when a user gets unlocked as a provider may
  be non-direct boot aware

* User the correct context when creating an auto-fill manager

* Move the receiver that listens for requests to hide system
  windows to the manager service as the UI is a singleton and
  no need every per-user state to register its own

* Removed extras from dataset as the only case a provider needs
  to associate state with a dataset is for auth and the provider
  can embed this data in the auth pending intent

Test: manual and CTS

Change-Id: I4bc54c13cf779d7f6fdb3ab894637f9fac73f603
2017-02-13 21:31:37 -08:00
Philip P. Moltmann
755d78dbd9 [DO NOT MERGE] Revert "[DO NOT MERGE] Delay SharedPreferences.apply() by 50 ms"
This reverts commit 2fc44947dd.

Bug: 30662828
Change-Id: Ia22343c19e155555dff3b0cb58f7b58df0ce6301
2017-02-13 23:44:31 +00:00
Makoto Onuki
0a2b187309 Merge "Do not allow work profile to see main other profiles" 2017-02-13 21:33:22 +00:00
Dianne Hackborn
b1e7776e2c Fix issue #35309312: Background start not allowed: service...
...Intent { flg=0x100 cmp=com.android.systemui/.SystemUIService }
to com.android.systemui/.SystemUIService from pid=28245 uid=1000 pkg=android

Rework the persistent app check to just directly look at the package
manager (but as efficiently as possible).  My idea for trying to keep
this in the UidRecord was stupid. :p

Test: manually tested it boots
Change-Id: I5a88717a27fa3529048d37a853518a3ec04055db
2017-02-13 12:02:42 -08:00
Makoto Onuki
de3c16c805 Do not allow work profile to see main other profiles
It won't throw SecurityException, but it'll pretend there's
no apps on the other profile.

- Also log an error about it, in the client side process.

- Also still send WTF() about the reverse access.

Bug: 34650921
Bug: 34340531

Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest1 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest2 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest3 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest4 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest5 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest6 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest7 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest8 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest9 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest10 -w com.android.frameworks.servicestests

Test: cts-tradefed run cts --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -m CtsShortcutHostTestCases -t 'android.content.pm.cts.shortcuthost.ShortcutManagerMultiuserTest'
Test: cts-tradefed run cts --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -m CtsDevicePolicyManagerTestCases -t 'com.android.cts.devicepolicy.LauncherAppsProfileTest'
Change-Id: I6164014685009db3f34a176a3f12c517766b2b49
2017-02-13 10:07:46 -08:00
Yohei Yukawa
22dac1c8df Introduce @SoftInputModeFlags annotation
Doing this allows us to annotate integer values that should corresponds
to WindowManager.LayoutParams#softInputMode.

Test: There should be no behavior change.  RetentionPolicy.SOURCE
      annotation should change nothing in production code.
Test: checkbuild
Bug: 32784563
Bug: 35079353
Change-Id: I96300b090edce327d0515c740183abe91ded6bac
2017-02-12 16:54:16 -08:00
Narayan Kamath
e714927b19 Partially revert commit ff5659fbc3.
ff5659fbc was intended to be a clean revert of 660cf30e21
that fixed a DOA issue. However, the author incorrectly rebased that
revert and picked up pieces of a separate change as well. This reverts
those sections of the change so that they can be submitted with the
correct attribution and with proper review.

Bug: 34415265
Bug: 34914977
Test: make

Change-Id: I977c3ba10bb05f04ac8cfd95d17954c454c83340
2017-02-10 14:56:57 +00:00
Dianne Hackborn
797772b162 Add command line options for some new intent flags.
Forgot to add these when the flags were added.

Test: manual
Change-Id: If71ea756ca85946155d7a6848454f61d137138c0
2017-02-08 16:33:43 -08:00
Shreyas Basarge
faf365dd5e Fix requiresCharging false value ignored issue
am: e33c3c81af

Change-Id: Ia96915b00e274ed6c7c8fdaea46ee5a0ba83bdcb
2017-02-08 00:58:47 +00:00
Clara Bayarri
5edceec2cc Merge "Cache Downloaded Fonts in Typeface" 2017-02-07 15:36:28 +00:00
Eugene Susla
6ed45d8cd3 CompanionDeviceManager
This introduces an API for apps that support companion devices to provide a
more streamlined flow for pairing and setting up the device

Bug: 30932767
Test: Using a toy app, invoke the newly introduced API (CompanionDeviceManager),
 and go through the flow. Ensure filtering works, and device is returned to
 the calling app. Ensure the calling app can pair to the selected device.
Change-Id: I0aeb653afd65e4adead13ea9c7248ec20971b04a
2017-02-06 12:50:55 -08:00
Shreyas Basarge
e33c3c81af Fix requiresCharging false value ignored issue
If a SyncRequest builder is used to create a sync
request and setRequiresCharging(bool) is used,
the sync request requires charging irrespective of
the boolean value provided. This cl fixes the issue.

Bug: 35027396

Test: Tested manually by looking for the charging bit in jobscheduler
dumpsys.

Change-Id: I8f642597a64b8964665f41f5ce9ca71529634069
(cherry picked from commit 3a147230a4)
2017-02-06 20:11:42 +00:00
Shreyas Basarge
0497eecf4a Merge "Fix requiresCharging false value ignored issue" 2017-02-06 20:07:02 +00:00
TreeHugger Robot
ad2409a26c Merge "Add Vulkan compute level system feature" 2017-02-06 18:47:38 +00:00
Shreyas Basarge
3a147230a4 Fix requiresCharging false value ignored issue
If a SyncRequest builder is used to create a sync
request and setRequiresCharging(bool) is used,
the sync request requires charging irrespective of
the boolean value provided. This cl fixes the issue.

Bug: 35027396

Test: Tested manually by looking for the charging bit in jobscheduler
dumpsys.

Change-Id: I8f642597a64b8964665f41f5ce9ca71529634069
2017-02-06 17:46:26 +00:00
Jesse Hall
1cd7e93195 Add Vulkan compute level system feature
The names of specific Vulkan API features can't be documented yet,
because they won't be ratified by Khronos before the documentation
becomes public in a developer preview.

Bug: 34745152
Test: android.graphics.cts.VulkanFeaturesTest
Change-Id: I9af673bcb5b0c74bde72ab7a579573894170a55d
2017-02-06 08:57:42 -08:00
Clara Bayarri
b12397e57e Cache Downloaded Fonts in Typeface
If the requested Typeface is already loaded into memory, return
from the cache.

Test: none, optimization
Change-Id: I32422c47c68502ba83b7d976f6e05f70dda5daed
2017-02-06 10:46:34 +00:00
TreeHugger Robot
85a05cd9b5 Merge "Refactoring of auto fill - lifecycle, auth, improvements" 2017-02-06 05:47:45 +00:00
Svet Ganov
0f4928f1f7 Refactoring of auto fill - lifecycle, auth, improvements
1. Move management of the remote fill service in a dedicated
   class that abstracts away the async and ephemeral nature
   of the binding.

2. Update auth to move fingerprint out of the platform and
   allow response and dataset auth.

3. Cleaned up the fill and save callback classes.

4. The UI is now shared among all sessions and cleaned up.

5. Reshuffled the remote callbacks to have cleaner separation.

6. Cleaned up and tightened the reponse and dataset classes.

7. Added API to support communicationn with intent based auth.

Test: CTS + manually

bug:31001899

Change-Id: Idc924a01d1aea82807e0397ff7293d2b8470d4d6
2017-02-06 04:02:35 +00:00
Zak Cohen
56345f4bfe Introduces VrManager as a system service.
Provides access to persistent VR mode as used by VR viewer when a device
is believed to be inside a viewer.

Bug: 34736524
Test: Built, run using build of vr services that enables mode.
Change-Id: I6ff392f09adb8e4bd522dacbd064777bba836282
2017-02-05 17:33:44 -08:00
TreeHugger Robot
f6f095a9c1 Merge "Removed android.R.attr#onTopLauncher" 2017-02-04 01:31:53 +00:00
Dianne Hackborn
340417356d Implement issue #30977956: Enable Instrumentation tests for multi-process apps
New android:targetProcess attribute on <instrumentation> allows you to
specify the processes the instrumentation will run in.

This reworks how instrumentation is run in the activity manager to better
formalize its state and semantics, allowing us to keep track of it across
multiple processes.  This also clearly defines what happens when multiple
instrumentations are running at the same time, which is useful for writing
CTS tests that test the instrumentation APIs themselves.

Adds a couple new APIs to Instrumentation that helps with the new
situation where instrumentation can run concurrently in multiple processes.

Test: new CTS tests added (textXxxProcessInstrumentation in
ActivityManagerTest.java in cts/tests/app/src)

Change-Id: I2811e6c75bc98d4856045b2f0a45fb24af5d366f
2017-02-03 16:07:54 -08:00
Wale Ogunwale
069bbd3828 Removed android.R.attr#onTopLauncher
The product that the feature was intended for never launched, so
removing the complexity from the code base.

Test: builds
Change-Id: I75e60ee2da46f6012f03a6077f77bc6b9acecad5
2017-02-03 23:39:46 +00:00
TreeHugger Robot
6ba95dab42 Merge "Fix bugs in FontResourcesParser and add coretests" 2017-02-03 10:16:01 +00:00
Philip P. Moltmann
416a36a83b [DO NOT MERGE] Delay SharedPreferences.apply() by 50 ms
am: 2fc44947dd

Change-Id: Ie0bb1c0c23928318cbaf3dc22ca0aa6761bbfa75
2017-02-02 19:21:40 +00:00
Chad Brubaker
aea3ec67a2 Merge "Allow ephemeral apps to reach any CATEGORY_BROWSABLE" 2017-02-02 19:08:00 +00:00
Clara Bayarri
9b161fbdbc Fix bugs in FontResourcesParser and add coretests
Bug: 34920360
Test: runtest --path frameworks/base/core/tests/coretests/src/android/content/res/FontResourcesParserTest.java
Change-Id: I41da558957d25a6f7ee62a4ed9fecf470b74f1d0
2017-02-02 18:45:54 +00:00
Narayan Kamath
ff5659fbc3 Revert "Call ActivityCallbacks after corresponding activity methods"
This reverts commit 660cf30e21.

bug: 34415265
bug: 34914977
Test: chrome launches

Change-Id: I170365fd47313bafb0d722e6d55ee119336137c4
2017-02-02 13:55:31 +00:00
Tomasz Mikolajewski
813ef268ac Merge "Add plain mode for the quick viewer." 2017-02-02 05:10:31 +00:00
Tomasz Mikolajewski
867addf393 Add plain mode for the quick viewer.
When EXTRA_QUICK_VIEW_PLAIN is passed, then plain UI should be shown.
This is just a hint for third party apps, whic may ignore it.

Test: Not testable, as it's just a hint.
Bug: 32161075
Change-Id: Ie244d28d552f6c654be93a5749ac164d2a77d25f
2017-02-02 12:21:16 +09:00
Brad Ebinger
e3482c2601 Merge "Adds @hide permission granting API for ImsServices" am: 390ec27f9d am: 6734275c2f am: fa1dca0ad6
am: 3aaf673c60

Change-Id: I6a6a2d136f0f31bbac984e4ba18f9f6b90808705
2017-02-01 19:46:55 +00:00
Brad Ebinger
3aaf673c60 Merge "Adds @hide permission granting API for ImsServices" am: 390ec27f9d am: 6734275c2f
am: fa1dca0ad6

Change-Id: Id2875b5b60401405e31e76eb07968798144df700
2017-02-01 19:42:16 +00:00
Brad Ebinger
fa1dca0ad6 Merge "Adds @hide permission granting API for ImsServices" am: 390ec27f9d
am: 6734275c2f

Change-Id: I6d502db3362aafcfed426b6598be0bd39dd38890
2017-02-01 19:35:56 +00:00
vinodkrishnan
495d891198 Revert "Revert "Remove getAppsUsingPermisisons""
This reverts commit a69c99fbc7.

Change-Id: I524a56ae3cd0d1a9dbd0e54fd7e57f09ed0b87f9
2017-01-31 16:59:46 -08:00
Andreas Huber
de17a63da6 Merge "Revert "Remove getAppsUsingPermisisons"" 2017-01-31 23:30:16 +00:00
vinodkrishnan
a69c99fbc7 Revert "Remove getAppsUsingPermisisons"
This reverts commit dfcf4fc29a.

Change-Id: Id08db7999158c76dc39f0908722ea8f5a6b21257
2017-01-31 23:00:45 +00:00
vinodkrishnan
9cfde54af0 Merge "Remove getAppsUsingPermisisons" 2017-01-31 22:30:56 +00:00
TreeHugger Robot
a941cbc59a Merge "Add a home intent category for VR headset UI mode." 2017-01-31 18:15:05 +00:00
TreeHugger Robot
c869ebff63 Merge "Add instant cookie APIs" 2017-01-31 03:17:49 +00:00
TreeHugger Robot
541af7f696 Merge "Add new api ClipDescription.getTimestamp." 2017-01-31 02:54:38 +00:00
Philip P. Moltmann
2fc44947dd [DO NOT MERGE] Delay SharedPreferences.apply() by 50 ms
... so that multiple applies can be combined into a single write.

Do do this I replaces the executor in the QueuedWork by a more Android-y
handler.

Test: Ran shared preferences CTS tests. Looked at log and saw a lot of
      skipped writes

Bug: 33385963
Bug: 30662828

Change-Id: I8f33df717be7091532930ccf6ca8c48940e4edd4
(cherry picked from commit 3349644872)
2017-01-31 02:50:24 +00:00
Svetoslav Ganov
096d304ae3 Add instant cookie APIs
This change adds APIs for instant apps to store cookie data
that is presisted across instant installs and across the
upgrade from an instant to a standard app. Standard apps
can use the cookie APIs but when they are uninstalled the
cookie is also deleted. The cookies are kept longer than
the instant apps as they are much smaller - 16KB by default.
We can change the cookie size via a system setting i.e.
after we ship we can increase size if needed.

We also add internal APIs to surface information about
installed and uninstalled instant apps which should be
used for showing them in the UI. For this puporse we store
the icon, permissions, and label of uninstalled apps. If
the app is re-installed we drop this meta-data but keep
the cookie around. If we have cookie data stored and the
signing cert of the app changes when it gets re-intalled
we wipe the cookie.

Test: CTS tests pass; hiddent APIs tested manually

Change-Id: If145c0440cc61a5303e2cbb70228d235d36037a5
2017-01-30 17:52:14 -08:00
Sudheer Shanka
09971befd7 Add new api ClipDescription.getTimestamp.
ClipDescription.getTimestamp can be used to know the time
at which the associated ClipData is copied to global clipboard.

Bug: 30873580
Test: cts-tradefed run singleCommand cts-dev --module CtsContentTestCases -t \
      android.content.cts.ClipDescriptionTest
Change-Id: I9486ab3fe0696959d42f6b4c98e40f5becee3019
2017-01-30 17:19:49 -08:00