Commit Graph

14630 Commits

Author SHA1 Message Date
Dianne Hackborn
058f1e4468 Implement system API for monitoring uid importance changes.
Changed the permission for registerUidObserver to be
PACKAGE_USAGE_STATS, which better matches the semantics of this
API and is accessible to system apps.

Test: Added testUidImportanceListener()

Change-Id: Ib47d02bd654fbe399a9c92550c89ecbd38f928dc
2016-11-04 17:05:27 -07:00
Garfield Tan
0b3cf666d0 Unhide findPath() API. Add JavaDoc to related features.
Also remove comments that disallow folders in search results.

Test: It builds.

Bug: 30948740
Bug: 32512923
Change-Id: I72706b69163aa98ee9568939e09e5048b6e8f9f8
2016-11-03 15:42:18 -07:00
TreeHugger Robot
9c1202be95 Merge "Add VERSION_CODES.O" 2016-11-02 20:27:15 +00:00
Makoto Onuki
864f4bd9ed Add VERSION_CODES.O
So that the framework can do "targetSdk >= O".

Test: Additional hidden constant only. "m"
Change-Id: I6cde68869c3b8bdc8e8b06b7d63f164714fbd2b0
2016-11-02 11:30:14 -07:00
Julia Reynolds
73481c8837 Merge "Some channel model updates" 2016-11-02 01:20:20 +00:00
Julia Reynolds
85769915e7 Some channel model updates
- Apps cannot update their channel settings after creation.
- Importance is required when creating a channel.
- Some method name changes.
- Ranker can't modify fields a user has changed.
- High and Max importance mean the same thing.
- The default channel adopts app wide settings on creation.
- The default channel is limited to importance low once target api is post n mr1
  unless the user changed it.

Test: runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/notification

Change-Id: I73c449a6abe6d709046de79c5c54339cb2edf0b8
2016-11-01 19:31:34 +00:00
Pankaj Kanwar
44b2ac9d3d Merge "Provide an API to make USSD calls and read the responses." 2016-11-01 17:42:32 +00:00
pkanwar
19ba736c22 Provide an API to make USSD calls and read the responses.
Test: will be added in a subsequent CL.
Bug: 30973910
Change-Id: Ic1214330ddf6846973d8bd28ee6ff1d28ae8c852
2016-10-31 17:13:18 -07:00
Chad Brubaker
006b53a681 Merge "Add ephemeral protection level" 2016-10-31 20:02:53 +00:00
Rob Carr
293a00c98b Merge "Allow specifying rotation animation in manifest." 2016-10-31 19:39:44 +00:00
Chad Brubaker
c19706a937 Add ephemeral protection level
Ephemeral applications will only be able to be granted permissions that
have the ephemeral proteciton level, this allows us to tighly define
what behavior is OK for ephemeral applications.

This includes an initial small whitelist of permissions for ephemeral
apps, it may be expanded later.

Test: adb install --ephemeral, verified against both runtime and install
time permissions
Test: cts-tradefed run cts -m CtsPermission2TestCases
Change-Id: I854c44cf7a293d484b674cdd4fb5141e362a2f1a
2016-10-31 18:27:28 +00:00
Stephen Chen
26b0c6ae69 Merge "Define API for metering network stats buckets." 2016-10-31 17:22:12 +00:00
TreeHugger Robot
27e9c97803 Merge "Add FragmentLifecycleCallbacks" 2016-10-28 23:53:21 +00:00
Adam Powell
38c67ff93b Add FragmentLifecycleCallbacks
Add a new callback object that can be attached to a FragmentManager to
observe all fragment lifecycle events within that
FragmentManager. Useful for dependency injection and other
shenanigans.

FragmentLifecycleCallbacks can be registered as recursive, in which
case they will be activated for any lifecycle events that happen in
descendant FragmentManagers as well.

Test: cts-tradefed run singleCommand cts --skip-preconditions --skip-device-info --module CtsFragmentTestCases
Change-Id: I816b1fbef6c29616ccc3fd729ee847c5f1a6f72f
2016-10-28 14:59:54 -07:00
John Reck
1952e2dc9b Merge "Add SurfaceHolder#lockHardwareCanvas()" 2016-10-28 19:38:45 +00:00
Przemyslaw Szczepaniak
27649153cf Merge "Track libcore change 16fa17012b56e990ced91cd023dee33f96deedf9" am: ec3e884e88 am: 29d6af7fe7 am: 0cf19a9a27
am: 4ffbf4e72f

Change-Id: Ifa2373f5f98283cf616c9a64be0346f3d7b917e9
2016-10-28 12:26:14 +00:00
Przemyslaw Szczepaniak
29d6af7fe7 Merge "Track libcore change 16fa17012b56e990ced91cd023dee33f96deedf9"
am: ec3e884e88

Change-Id: Ibf708f685bf8cb8e5f88423b48ed05986c223651
2016-10-28 12:05:56 +00:00
Robert Carr
0f5d753972 Allow specifying rotation animation in manifest.
In the case where activity launching may trigger orientation
changes we may wish to run the rotation animation with a starting
window, in which case the app won't have had time to set the
rotation animation on the window yet, so we desire a way to
specify it for the whole activity.

Test: Run RotationAnimation activity from API Demos and verify default animation is crossfade
Bug: 29940147
Change-Id: I5deae6c6a32ee51a0a5409d38f0e5d15ca464a1b
2016-10-27 22:08:11 +00:00
John Reck
6bc7014210 Add SurfaceHolder#lockHardwareCanvas()
Bug: 26988043
Test: SurfaceViewTests#testSurfaceHolderHardwareCanvas CTS test
Change-Id: I3e5352d498dbe2fc56a18ca27360d129a14c7784
2016-10-27 14:13:44 -07:00
Philip P. Moltmann
08b678c029 Correctly use ByteBuffer in UsbRequest
Meaning: Read/Write to correct area in buffer, set position correectly.

- Create a new method UsbRequest#enqueue that has correct behavior, deprecate
  UsbRequest#queue.
- Move all description of the weird (legacy) UsbRequest#queue behavior to
  this method.

Change-Id: Ibeed400b4ad2aa9d005ace345c7895a3dc4ba1ad
Fixes: 31050148
Test: Submitted alongside
2016-10-27 10:25:40 -07:00
Philip P. Moltmann
411f8215fc Merge "Add UsbDeviceConnection.requestWait with a timeout" 2016-10-27 16:15:15 +00:00
Philip P. Moltmann
927fefe813 Add UsbDeviceConnection.requestWait with a timeout
Test: Test is submitted alongside this change
Change-Id: I1c46143030a2822ee76676ddc80d3b5c8c62ee80
Fixes: 31288102
2016-10-26 10:21:21 -07:00
Przemyslaw Szczepaniak
5753515d3d Track libcore change 16fa17012b56e990ced91cd023dee33f96deedf9
Test: cts run of CtsLibcoreTestCases
Bug: 29935305
Change-Id: I01465dd11d8ef13d6d47f2dec73100af988edfa1
2016-10-26 17:57:33 +01:00
Stephen Chen
9ac251d116 Define API for metering network stats buckets.
This is a continuation of b/26545374, since now we can also set the
metered bit with NetworkScorer. The tracking of metered state changes
will be implemented in a seperate CL.

Bug: 31015360
Bug: 26545374
Test: N/A
Change-Id: I0eccd10c0316357abb03af4d9cf0c4191a66abfb
2016-10-25 18:16:15 -07:00
Dianne Hackborn
fe51103711 Merge "Tweak ActivityManager.getPackageImportance()" 2016-10-25 22:41:00 +00:00
TreeHugger Robot
942fde1415 Merge "Add the ability to postpone transitions." 2016-10-25 21:12:12 +00:00
TreeHugger Robot
d80812b882 Merge "Optimize Fragment operations so that minimal work is done." 2016-10-25 19:33:27 +00:00
Dianne Hackborn
9df8f51044 Tweak ActivityManager.getPackageImportance()
- Now requires PACKAGE_USAGE_STATS permission.
- Simpler implementation.

Test: none

Change-Id: Id42ee31d0af8d896cbc94c81666bc734198c1273
2016-10-24 17:59:27 -07:00
Shuzhen Wang
461f767606 Merge "Camera2: Add onCaptureQueueEmpty callback" 2016-10-20 21:36:16 +00:00
Julia Reynolds
e2b77a55b3 Merge "Move autogrouping into framework." 2016-10-20 15:23:27 +00:00
Julia Reynolds
8f488d3f2f Move autogrouping into framework.
Test: runtest systemui, and post and dismiss notifications, checking that they
are grouped (or not) appropriately.

Change-Id: I8f3ec497cebcb14a7853fac98b844a3fd4503141
2016-10-19 22:30:58 +00:00
TreeHugger Robot
a5da5d6ee7 Merge "Un-hide ROTATION_ANIMATION_SEAMLESS." 2016-10-19 01:50:24 +00:00
Shuzhen Wang
88f1af2410 Camera2: Add onCaptureQueueEmpty callback
onCaptureQueueEmpty indicates that the non-repeating
capture request queue of camera device is empty, and
is ready to process a new request.

Test: testMultipleCapture in PerformanceTest.java

Bug: 29006447
Change-Id: If245ff6abf352548ca13a10fcfbd1550b92c1224
2016-10-18 17:50:17 -07:00
Jordan Liu
b53000dd8c Merge "Add key for sms_convert_destination_number" 2016-10-19 00:40:43 +00:00
Jordan Liu
5ac6f5c95d Add key for sms_convert_destination_number
Add the CarrierConfig key
KEY_SMS_REQUIRES_DESTINATION_NUMBER_CONVERSION_BOOL
and remove the old configs. Note that this value no longer needs to be a
string-array, as CarrierConfigManager handles gid.

Bug: 29873049
Change-Id: I3edbcf5329177f6b370d08a09318c35c55e5e052
2016-10-18 13:15:18 -07:00
Philip P. Moltmann
ee53f0d419 Merge "Allow to select printer from info activity." 2016-10-18 14:55:51 +00:00
Robert Carr
652aae43e6 Un-hide ROTATION_ANIMATION_SEAMLESS.
For N the Camera used ROTATION_ANIMATION_JUMPCUT
which was reinterpreted as seamless rotation if possible.
However this ended up being non ideal in app transition
scenarios where the rotation animation replaces the app
transition. Here we also can't seamlessly rotate, so the
window just suddenly appears with jumpcut. In fact we want
crossfade as a fallback animation and this is what distinguishes
ROTATION_ANIMATION_JUMPCUT and SEAMLESS. The problem was patched
over in N by having double-tap gestures fire camera intents
with a SEAMLESS ActivityOptions.rotationAnimationHint,
but it was too late to un-hide for consumption by apps. While here,
clean up some documentation that doesn't really parse.

Test: Manual, try the RotationAnimation activity in ApiDemos sample.
Bug: 28838855
Bug: 28823590
Change-Id: I17b5e9fa967df8ade0943337cd7b6c3956d3a499
2016-10-17 17:23:09 -07:00
Jordan Liu
a9469e64e4 Merge "Add KEY_ONLY_SINGLE_DC_ALLOWED_INT_ARRAY" 2016-10-17 18:54:24 +00:00
Gustav Sennton
bf683e07c3 Add an API for retrieving information about the current WebView package.
Now that WebView can be loaded from one out of a set of packages we
provide an API for fetching information about this package.
Such API is especially useful for debugging crashes.

Bug: 30597460

Change-Id: I13dd746f7efcf2917b517053010b73ea35241325
2016-10-17 07:26:37 +00:00
Joe Onorato
073e4e40e6 Merge "Add android.util.proto package as an @TestApi." 2016-10-14 17:41:10 +00:00
Julia Reynolds
3752e50766 Merge "Add support for snoozing notifications" 2016-10-14 12:38:17 +00:00
Philip P. Moltmann
c8d6f54be3 Allow to select printer from info activity.
Test: Manual testing with modified experimental print service and new
      CTS test for the new API
Fixes: 27746841
Change-Id: I4ef728e54679271a01397d9f04d3b8ac804ffcf3
2016-10-13 17:09:17 -07:00
Julia Reynolds
72f1cbb3b9 Add support for snoozing notifications
To a notification listener, snoozing will appear as a cancel
(with reason snoozed) followed by a post (when the snooze period
ends).

Apps can repost a snoozed notification, but the updates will not be shown
to the user until the snooze period ends.

Snoozing is canceled if the posting app or a notification listener
cancels the notification.

Any notification listener can snooze a notification. Technically apps
can snooze their own notifications also, though that's not public.

In this iteration snoozed notifications will be lost on device reboot.

Test: included. Also, various post, snooze, update, cancel tests with
a listener.

Bug: 30997603
Change-Id: I568a6448196f0992a17d20a4dac296321ec5092b
2016-10-13 16:18:11 -04:00
Makoto Onuki
4e5434ba5a Merge "Pass client package name to GAL providers (framework)" 2016-10-13 17:49:17 +00:00
Joe Onorato
6c9547d8e1 Add android.util.proto package as an @TestApi.
The classes there add a way for the platform to write out
protocol buffers that doesn't require lots of small objects,
generate code, and extra copying.

Includes the plugin for protoc to generate the constants.

Test: proto cts tests

Change-Id: I6385c198cecda9ac6fa533151609e3ace341af01
2016-10-12 16:37:18 -07:00
Makoto Onuki
296a5fd5b9 Pass client package name to GAL providers (framework)
Test: Manually tested with a corp account and verified with the log

Bug 32072962

Change-Id: I3575b277973263171288fc8665a830f4b83064ab
2016-10-12 13:18:08 -07:00
Jordan Liu
2420a0a7d7 Add KEY_ONLY_SINGLE_DC_ALLOWED_INT_ARRAY
Add the key to CarrierConfigManager and remove the old configs which are
no longer needed.

Test: ran "make checkbuild" locally
Bug: 29873049
Change-Id: I2197cabca2addbbbe15f0f13985a6f5d8794d64a
2016-10-11 16:17:23 -07:00
Keyvan Amiri
00a981e522 Merge "Added min support to ProgressBar and SeekBar" 2016-10-11 21:53:41 +00:00
Jordan Liu
9011f8f926 Merge "Add key for carrier_volte_provisioned" 2016-10-11 18:24:49 +00:00
Nick Kralevich
44761c81eb Delete "Show CPU usage" am: fc4a5c2d85 am: f0c0188a8a
am: 34547a8dc2

Change-Id: I410846d3ff6856e5f9dee2efd551af8b9d1d94dc
2016-10-11 18:21:32 +00:00