Commit Graph

5111 Commits

Author SHA1 Message Date
TreeHugger Robot
d89cf81f80 Merge "Change MaskableIconDrawable to AdaptiveIconDrawable" 2017-02-18 01:04:59 +00:00
TreeHugger Robot
168ec38060 Merge "Append entries for real" 2017-02-17 23:13:50 +00:00
TreeHugger Robot
96b9832163 Merge "API for accessing preloaded files cache" 2017-02-17 21:09:28 +00:00
TreeHugger Robot
8c9a6b0089 Merge "Revert "Revert "Per user setting for instant app""" 2017-02-17 20:46:12 +00:00
Hyunyoung Song
be8835e86b Change MaskableIconDrawable to AdaptiveIconDrawable
Test: $ make -j31 dist

Bug: 35399620
Change-Id: I5e54f75b3df21ffe546e0e54dbd7ea29499d1789
2017-02-17 12:13:22 -08:00
Fyodor Kupolov
61221290f5 API for accessing preloaded files cache
Added @SystemAPI method Context.getPreloadsFileCache.

Bug: 31008665
Test: manual
Change-Id: Id61ab5e1b78d8bfbd40f61985406a8de4082b30f
2017-02-17 10:40:54 -08:00
Svet Ganov
8a10ef58d3 Append entries for real
Test: manual

bug:35447008

Change-Id: I8ddbd39395f5064f7797562c3a423ba555c0c933
2017-02-16 21:00:31 -08:00
Andrii Kulian
b047b8bd7e Report move to display for activities that handle config changes
When activity that is moved between displays handles all configuration
changes, it won't be restarted. This CL adds a callback to the client
to notify it about display change. Usually it will be followed by
onConfigurationChanged, except when configuration didn't actually change.
When activity is recreated, it won't receive onMovedToDisplay.

Bug: 34862802
Test: android.server.cts.ActivityManagerDisplayTests
Test: #testOnMovedToDisplayCallback
Change-Id: I9a9501cab788623ada15a31efb53e4b2378639fe
2017-02-16 17:33:59 -08:00
TreeHugger Robot
1001478242 Merge "Do not return cryptic strings from ClipData.Item.coerceToText" 2017-02-16 22:22:31 +00:00
TreeHugger Robot
fc8139d086 Merge "Handle SecurityException in ClipData.Item.coerceToText" 2017-02-16 22:22:05 +00:00
TreeHugger Robot
ab9b002400 Merge "Clean up DialogInterface lint warnings, docs, ws" 2017-02-16 20:48:02 +00:00
Todd Kennedy
be0b8896d1 Revert "Revert "Per user setting for instant app""
This reverts commit be9ffa15af.

Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.EphemeralTest
Change-Id: Ib21321cf157a79890de487060a093840f7182047
2017-02-16 12:43:37 -08:00
Tomasz Mikolajewski
17c50da4be Change EXTRA_QUICK_VIEW_PLAIN to EXTRA_QUICK_VIEW_ADVANCED.
Test: Not testable, as the behavior depends on the quick viewer.
Bug: 32161075
Change-Id: I46ec36fdce481930096f9ae8ee3c54df792b0233
2017-02-16 14:53:57 +09:00
Hyunyoung Song
4c64c0d99e Merge "ShortcutManager should support MaskableBitmap Icon type" 2017-02-16 01:04:15 +00:00
Hyunyoung Song
f281e7afae ShortcutManager should support MaskableBitmap Icon type
Note: https://ag/1872683/ is where initial code review happened.

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'


b/34196580

Change-Id: I3b983c29387e474c7a8c687a524105ceaceac81e
2017-02-16 01:01:56 +00:00
Guang Zhu
626ffb4556 Merge "Revert "Per user setting for instant app"" 2017-02-15 21:47:34 +00:00
Guang Zhu
be9ffa15af Revert "Per user setting for instant app"
Bug: 35390781

This reverts commit 2f5811dcfd.

Change-Id: Ibb1c8dacbdc6908fc7fa2bc5dca664f2455162bf
2017-02-15 21:43:48 +00:00
Philip P. Moltmann
9a044dad00 Merge changes from topic 'revert-anr-revert'
* changes:
  Process queuedWork on main thread and add logging
  Revert accidential merge 492a058d58
2017-02-15 21:37:34 +00:00
Todd Kennedy
bf92b812db Merge "Per user setting for instant app" 2017-02-15 19:19:26 +00:00
Esteban Talavera
c3dfa81973 Merge "Revert "Use context's userId in ContentResolver class."" 2017-02-15 13:35:35 +00:00
Esteban Talavera
da2006a0bd Revert "Use context's userId in ContentResolver class."
This reverts commit 2b44387f5d.

Bug: 35374151
Change-Id: Ifdde7a3b4e9141d7e283478aff49971c6a5dcaa2
2017-02-15 13:20:24 +00:00
Philip P. Moltmann
82b902204f Revert accidential merge 492a058d58
Test: Clean revert
Change-Id: I61d339bb85936e1d50742be1e4c6dab781f3a4e7
2017-02-14 17:02:50 -08:00
TreeHugger Robot
7ad2067f98 Merge "Add API to track package changes" 2017-02-14 23:10:59 +00:00
Todd Kennedy
2f5811dcfd Per user setting for instant app
The same application can run as either an instant app or an installed
app. Store this setting per-user instead of based upon the install
location.

Bug: 25119046
Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.EphemeralTest
Change-Id: Iff565bb1ac10d631499f0bd0f69b401cb073c10e
2017-02-14 13:42:01 -08:00
Todd Kennedy
9106c64bf3 Add API to track package changes
After any package install, removal or update, save the changed
package and update a global sequence number. At any point, apps
can query for the packages changed since a particular sequence
number.

If a package is changed multiple times, it is only included once
in the change list.

Bug: 33865505
Test: Create sample app to query for changes and see which packages are changed after performing certain operations
Change-Id: Ia4646035362b16a97110e05f3f909ce385b48428
2017-02-14 12:44:50 -08:00
Sudheer Shanka
e5b514cbc3 Merge "Use context's userId in ContentResolver class." 2017-02-14 20:29:12 +00: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