Commit Graph

64863 Commits

Author SHA1 Message Date
Ben Lin
bbd711c2a5 Merge "Adding ContentProvider#refresh and ContentResolver#refresh." 2016-11-11 19:13:40 +00:00
TreeHugger Robot
40d0e338a1 Merge "health: import android.hardware.health@1.0 constants into BatteryManager" 2016-11-11 18:57:47 +00:00
Jason Monk
97a06a12ed Add switchable theme to tuner
Allows option in tuner to switch between system theme overlays
if multiple exist. Requires a restart to take effect.

Test: Settings -> Tuner -> Other -> Theme
Change-Id: Iea43b9cbb67fd91c6008be594ad4cfd19c3f57ec
2016-11-11 09:01:20 -05:00
liangweikang
84086bb997 Merge "fixed applyConfigurationToResourcesLocked WeakReference is null" am: 264d1f12a3 am: 45562df8bb am: b95e567919
am: 04a9be65c8

Change-Id: I94321a4192a854feb171b35fc2930887095d2da3
2016-11-11 03:46:14 +00:00
Yohei Yukawa
e9b99f8260 Merge changes I7918c0a3,I19d87fc1
* changes:
  Support content URIs w/ userId in IC#commitContent
  Fix up content URI for different users
2016-11-11 03:40:32 +00:00
liangweikang
04a9be65c8 Merge "fixed applyConfigurationToResourcesLocked WeakReference is null" am: 264d1f12a3 am: 45562df8bb
am: b95e567919

Change-Id: I2916de2a4c09849e12bff2dea5a4cd34c080b2f9
2016-11-11 03:39:39 +00:00
Yohei Yukawa
3933a6e0c3 Support content URIs w/ userId in IC#commitContent
With this CL, one can specify a content URI with an embedded user ID to
InputContentInfo, like such a URI is supported in
Context#grantUriPermission().

Note that such a scenario is actually possible when 1) an application
running as User X sets a content URI to the system clipboard then 2) the
IME runing as User Y who share the clipboard with User X obtains the
content URI from the system and tries to create a new instance of
InputContentInfo.

Bug: 32427307
Bug: 32778718
Test: 'adb shell dumpsys activity permissions' with a custom IME that
      instantiates InputContentInfo from the content URI obtained from
      the clipboard.
Change-Id: I7918c0a379b8f3e7e64b106447b42447876f9057
2016-11-11 03:39:25 +00:00
Yohei Yukawa
16e67edb36 Fix up content URI for different users
Currently Commit Content API work only when the content URI provided by
the IME is accessible to the target application.  This is non-trivial if
the target application is running as a different user (profile) and it
is actually a possible scenario when managed profile is enabled.

This CL takes care of such a situation, by fixing up the content URI
when and only when InputContentInfo#getContentUri() is called from a
different user than the owner of the content URI.

This CL also makes it clear that we currently do not support content
URIs that already have embedded user IDs.  Since
IActivityManager#grantUriPermissionFromOwner() does not support such
URIs, we should have had a special handling for such a case, which will
be addressed in a subsequent CL.

Bug: 32427307
Bug: 32778718
Test: Made sure that Commit Content API works as expected on a managed
      profile created by
      https://github.com/googlesamples/android-testdpc
Change-Id: I19d87fc19beea248f49b59ec5a5711b95bcbb466
2016-11-11 03:38:15 +00:00
liangweikang
b95e567919 Merge "fixed applyConfigurationToResourcesLocked WeakReference is null" am: 264d1f12a3
am: 45562df8bb

Change-Id: Ibd3818f9b37ee58c6225a9b6d7cefd486f20bdb9
2016-11-11 03:32:05 +00:00
liangweikang
45562df8bb Merge "fixed applyConfigurationToResourcesLocked WeakReference is null"
am: 264d1f12a3

Change-Id: Icfaf039b078d7ce43b23bed09cd0102427c6f047
2016-11-11 03:25:41 +00:00
Treehugger Robot
264d1f12a3 Merge "fixed applyConfigurationToResourcesLocked WeakReference is null" 2016-11-11 03:16:42 +00:00
TreeHugger Robot
a4438c4977 Merge "Adding experiment for minimized pinned stack." 2016-11-11 00:54:13 +00:00
Romain Guy
972fad90d4 Merge "Improve support for half floats and expose as public API" 2016-11-10 23:55:18 +00:00
Winson Chung
fa7053789f Adding experiment for minimized pinned stack.
- Also refactoring the PIP touch handling to be independent gestures

Test: Enable the setting in SystemUI tuner, then drag the PIP slightly
      offscreen. This is only experimental behaviour, and
      android.server.cts.ActivityManagerPinnedStackTests will be updated
      accordingly if we keep this behavior.

Change-Id: I5834971fcbbb127526339e764e7d76b5d22d4707
2016-11-10 23:09:17 +00:00
Winson Chung
7075d79cab Merge "Adding API for apps to specify their aspect ratio when entering PIP." 2016-11-10 23:08:54 +00:00
Sandeep Patil
a21c42769f health: import android.hardware.health@1.0 constants into BatteryManager
Test: make
Bug: b/32724915

Change-Id: I7ca7507b7be54442dc3250b02db3e4f7e95f0685
Signed-off-by: Sandeep Patil <sspatil@google.com>
2016-11-10 14:02:45 -08:00
Ben Lin
1cf454fcb6 Adding ContentProvider#refresh and ContentResolver#refresh.
Original CL is from ag/1568530.

Bug: 31647485
Change-Id: Ib45fc995a361b8c75cd3600f638910b18a263d51
2016-11-10 13:53:27 -08:00
Julia Reynolds
05675c80c1 Merge "Expose dismiss reasons to notification listeners." 2016-11-10 20:46:07 +00:00
TreeHugger Robot
48b3ffc557 Merge "Not blocking focus on action bar on tab" 2016-11-10 20:45:26 +00:00
Jakub Pawlowski
1cc78aa2c3 Merge "BLE OOB Pairing - parse address type (5/5)" am: 97d9fe0a2f am: c3cfff6ef6 am: f59ad8bd68
am: 196fe3597c

Change-Id: Idf087fc9dcd88733ec7755196fab3eac944bf8cf
2016-11-10 20:31:12 +00:00
Jakub Pawlowski
196fe3597c Merge "BLE OOB Pairing - parse address type (5/5)" am: 97d9fe0a2f am: c3cfff6ef6
am: f59ad8bd68

Change-Id: I8307894e80bdfc1c260708c7174d294178ffa00b
2016-11-10 20:24:10 +00:00
Jakub Pawlowski
f59ad8bd68 Merge "BLE OOB Pairing - parse address type (5/5)" am: 97d9fe0a2f
am: c3cfff6ef6

Change-Id: Ia05bccadc06b202cf6ac1039b1e227bd67575bb5
2016-11-10 20:14:24 +00:00
Jakub Pawlowski
c3cfff6ef6 Merge "BLE OOB Pairing - parse address type (5/5)"
am: 97d9fe0a2f

Change-Id: I935cc35d9f7f1eea5459f0091ad14dc8b200bc02
2016-11-10 20:07:39 +00:00
Dianne Hackborn
e07641d4fb Start implementing background restrictions for eph apps.
This implements the additional intended path for checking
allowed background operations, APP_START_MODE_DISABLED, which
doesn't allow an app to launch in the background at all.

Also change the semantics of delivering broadcasts to manifest
receivers to always restrict those, not changing based on
whether the app is currently idle.  This is the desired intended
behavior for apps as they explicitly update to work with
bg check.

And now that we have ephemerality associated with the uid state
in the activity manager, we can propagate this through the
relevant callbacks in IUidObserver so things watching these
changes can immediately determine whether they should do their
more aggressive shut down work for the uid rather than having
to walk through all their state looking for package associated
with that uid and whether they should be shut down.

Also remove the "lenient" bg check mode, since that was
just an early experiment that we won't actually use.

Add a new "make-idle" activity manager command to immediately
put a uid into the idle state (if possible) to make it easier
to test.

Test: manually against an eph app
Change-Id: I43a138ff281f69a9251d3f29ab6e13f48cff8ad6
2016-11-10 12:01:20 -08:00
Jakub Pawlowski
f465823f6d BLE OOB Pairing - parse address type (5/5)
When address type is not parsed, creating bond to devices not using
random address is impossible.

Bug: 32780409
Test: try pairing with nRF52DK using random address
Change-Id: Ie6cc1f8c008d43b2acd021b47f9bbfb1f63472e8
2016-11-10 19:51:49 +00:00
Winson Chung
84a3834a0c Adding API for apps to specify their aspect ratio when entering PIP.
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testEnterPipAspectRatio
Test: #testEnterPipExtremeAspectRatios

Change-Id: I9efba942b9a6451dec07428fe1e428ef4a896867
2016-11-10 09:19:52 -08:00
TreeHugger Robot
446e723c08 Merge "The big Keyguard transition refactor (8/n)" 2016-11-10 00:54:54 +00:00
Jorim Jaggi
e69c93181f The big Keyguard transition refactor (8/n)
Don't force mKeyguardGoingAway, as this never recovers. Make sure
to only show the dismissing Keyguard activtiy and recover the
state when trusted state changes.

Test: Make sure Keyguard is in a trusted state, start an activity
with FLAG_DISMISS_KEYGUARD from FLAG_SHOW_WHEN_LOCKED activity
and make sure there is no flicker.

Bug: 32057734
Change-Id: I5d212f6f9d5430250b22c8370f45dc95756432d2
2016-11-09 15:32:04 -08:00
Julia Reynolds
3aa5f1eec0 Expose dismiss reasons to notification listeners.
Test: see cts tests on same topic
Change-Id: Ibae45e125ebc2aa394fbdb41c00341bf0ac101e5
2016-11-09 15:43:49 -05:00
Julia Reynolds
3775a39e39 Merge "Move notification channel from record to sbn." 2016-11-09 20:40:41 +00:00
Julia Reynolds
67c8e1e61f Merge "Ranker --> Assistant." 2016-11-09 20:38:47 +00:00
Sunny Goyal
0a1ce4237f Merge "Fixing async inflation for nested RemoteViews" 2016-11-09 20:20:46 +00:00
TreeHugger Robot
00f42c3b28 Merge "Initial implementation of the Auto-Fill Framework classes." 2016-11-09 19:19:32 +00:00
Sunny Goyal
7b0e2c7659 Fixing async inflation for nested RemoteViews
> Fixing isRootNamespace check
> Updating ViewTree when ViewStub is inflated
> Applying ViewGroupAction on previously found views instead of finding it again
  as the viewTree might have changed.

Test: am instrument -w -e class android.widget.RemoteViewsTest com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Bug: 32639592

Change-Id: I0815fb3a981efbc04fb0d080b81949985c2d9bc3
2016-11-09 10:02:44 -08:00
Jeff Sharkey
d0ac9d3bac Merge "Detect non-oneway calls leaving system_server." 2016-11-09 16:51:41 +00:00
Julia Reynolds
423b9fc83d Move notification channel from record to sbn.
So notificationlisteners know about it.

Test: runtest systemui-notification
Change-Id: I28fc86730d3f7ad246a0164f44157594f57430c0
2016-11-09 09:51:08 -05:00
Julia Reynolds
77b2cc920f Ranker --> Assistant.
Rename ranker to assistant and make some of the methods public.
Delete the ext services ranker and restore the listener-type
lifecycle to the assistant.

Test: manual. add a notification assistant and verify it gets
assistant and listener callbacks.

Change-Id: Ia3406c8c14d923426c1b8a6d8b5187efe64c31c3
2016-11-09 09:04:16 -05:00
Erik Kline
5f4a37c9aa Handle IpReachabilityMonitor errors better. am: e452660466
am: d8a06fa28a

Change-Id: I820f887205de7565bbf70fe66de66680fa571475
2016-11-09 02:48:22 +00:00
Erik Kline
d8a06fa28a Handle IpReachabilityMonitor errors better.
am: e452660466

Change-Id: I3bb9ce7caa99e166ddc576399453fcc9e172d6a6
2016-11-09 02:37:17 +00:00
Romain Guy
12ae9a0736 Improve support for half floats and expose as public API
Half floats (often called fp16) are commonly used to store floating
point data efficiently without having to use lossy compression schemes.

Half floats are commonly used in the following cases:
- Wide gamut colors
- Meshes (OpenGL and Vulkan)
- HDR images/textures
- Lookup tables as textures (OpenGL and Vulkan), particularly
  in physically-based renderers
- Maching learning/compute

OpenGL and Renderscript both provide Java language APIs that accept
half floats but the platform offers no support to create fp16 values
from fp32 data. The Half class is an IEEE 754 compliant implementation
of half floats that can be used to feed OpenGL and Renderscript properly
encoded values. A comprehensive series of test is also added to CTS.

Test: cts-tradefed run singleCommand cts-dev --module CtsUtilTestCases --test android.util.cts.HalfTest
Bug: 29940137

Change-Id: I908bde7b3c6f65f7a24e0ab5652be4d16cc0358d
2016-11-08 17:58:54 -08:00
liangweikang
a9c9bf5106 fixed applyConfigurationToResourcesLocked WeakReference is null
https://code.google.com/p/android/issues/detail?id=226956

Test: compile anr monkey test

Signed-off-by: liangweikang <liangweikang900911@gmail.com>
2016-11-09 01:40:33 +00:00
TreeHugger Robot
1183883b2e Merge "Implement new API" 2016-11-09 00:30:44 +00:00
Dianne Hackborn
80361c9ea7 Merge "Move code for handling uid obs "cutoff" to activity manager" 2016-11-08 23:03:21 +00:00
Felipe Leme
5381aa4b58 Initial implementation of the Auto-Fill Framework classes.
This CL provides the initial, skeleton implementation of the Auto-Fill
Framework classes:

- Defines the system service and app-based
  AIDL (IAutoFillManagerService.aidl and IAutoFillService.aidl respectively).
- Defines the 'adb shell cmd' interface.
- Defines the permission required to access the service.
- Registers the service on SystemServer.
- Adds the code to bind the app-specified service to system_server.
- Defines the service class (AutoFillService) required by providers.
- Implements the initial startSession() method.

This is still a very early, "work-in-progress" change:
- It has many TODOs.
- It does not have unit or CTS tests yet.
- It does not provide a callback method to auto-fill the fields.
- In fact, it has a lot of TODOs.

Despite these adversities, it can be tested by following the steps
below:

1.Create an app with a service extending AutoFillService

2.Implement the onNewSession() method

3.In the manifest:
 - Listen to android.service.autofill.AutoFillService intents.
 - Require the android.permission.BIND_AUTO_FILL permission.

4.Explicitly set the app as an autofill-service by running:
  adb shell settings put secure auto_fill_service MY_APP/.MY_SERVICE

5.Start a session against the top activity:
  adb shell cmd autofill start session

BUG: 31001899
Test: manually built and ran it

Change-Id: I00f4822159b31ddddba8f513e57c4474bc74eb89
2016-11-08 14:40:56 -08:00
Steven Moreland
78c6b4cfa5 Merge "Update for namespaced services in hwservicemanager." am: 605df82c9e am: 3dcee9882d am: 1a384933df
am: 97186e09ae

Change-Id: Idc856de883500636be54f91d7529a1cc82c7313e
2016-11-08 21:48:59 +00:00
Todd Kennedy
e5195dd17c Implement new API
This is the first swack at the new, 2-phase API. Adds the new methods
to the resolver service and makes the split name explicit on the
installer intent.

The 2nd phase will not yet be invoked; that's coming in a follow-on
change.

Bug: 25119046
Test: build & install the sample resolver and run 'adb shell am start -a android.intent.action.VIEW -c android.intent.category.BROWSABLE -d "https://www.tripadvisor.com/Tourism-g33020-San_Jose_California-Vacations.html"'
Change-Id: I2df6fa64d46f17a86a2e32b19417632c594fb10f
2016-11-08 13:47:28 -08:00
Steven Moreland
97186e09ae Merge "Update for namespaced services in hwservicemanager." am: 605df82c9e am: 3dcee9882d
am: 1a384933df

Change-Id: I3ab231d9342ec1100866d3da2d752c70793cdcd8
2016-11-08 21:36:10 +00:00
Steven Moreland
1a384933df Merge "Update for namespaced services in hwservicemanager." am: 605df82c9e
am: 3dcee9882d

Change-Id: I929f34098061e084f1d9a92070179351c65d5acc
2016-11-08 21:29:31 +00:00
TreeHugger Robot
00c2ed26f6 Merge "Add an extra to pass initial location URI for file choosers." 2016-11-08 21:24:55 +00:00
Steven Moreland
3dcee9882d Merge "Update for namespaced services in hwservicemanager."
am: 605df82c9e

Change-Id: I38d861ca107665f1f865f19eebd1be368a8c77a4
2016-11-08 21:20:57 +00:00