Commit Graph

10692 Commits

Author SHA1 Message Date
Sunny Goyal
bab3075e2e Creating a common class for loading drawables and handling various badging
Test: Manually tested on device
Bug: 36591157
Change-Id: Ic847537d416650015cecaeb68f47f7f032e0dbaa
2017-04-18 16:36:15 -07:00
Bryce Lee
25b7687771 Merge "Deprecate ActivityManager#getRunningServices" into oc-dev 2017-04-18 14:10:57 +00:00
TreeHugger Robot
cf7cb9c993 Merge "Renamed ViewNode's getAutoFillHints() to getAutofillHints()" into oc-dev 2017-04-18 04:02:03 +00:00
Felipe Leme
b118021972 Renamed ViewNode's getAutoFillHints() to getAutofillHints()
Test: CtsAutoFillServiceTestCases pass
Bug: 35956626
Bug: 35364993
Change-Id: I2ad5a625da6ed4ff889315923c81cfd629e34074
2017-04-17 18:51:18 -07:00
TreeHugger Robot
00ed0baca8 Merge "Turn down the preliminary foreground service API" into oc-dev 2017-04-18 01:48:31 +00:00
TreeHugger Robot
eef5d285f9 Merge "Account for content insets in source rect hint for transition into PiP" into oc-dev 2017-04-18 01:33:28 +00:00
TreeHugger Robot
6e8f116647 Merge "Finish impl of job queue: handle URI permissions." into oc-dev 2017-04-18 01:07:18 +00:00
TreeHugger Robot
950fa06a29 Merge "More small fixes/adjustments to job scheduler." into oc-dev 2017-04-18 00:47:09 +00:00
TreeHugger Robot
89e8b7b58e Merge "AOD: Implement redacted notificatinos" into oc-dev 2017-04-18 00:31:59 +00:00
Dianne Hackborn
342e603710 Finish impl of job queue: handle URI permissions.
The job queue now handles URI permissions associated with
the Intent of each job.  Just (kind-of) like Service!

Also do the second pass of locking in job scheduler, getting
rid of all the async dispatching on a handler, and just executing
calls right in line with simple locking.  This probably fixes
a few other race issues, and allows us to make sure that we
always finish a job correctly when dequeuing the last work (we
will always atomically dequeue and finish, so no new work can
slip in between).

And fix a little debug output in IntentFilter.

Test: ran CtsJobSchedulerTestCases, added new test for URI perms.

Change-Id: I52f700ef0cd5be3ff70050f9c0f5fe3e8a5ccac1
2017-04-17 16:14:58 -07:00
Winson Chung
8802eac3d8 Account for content insets in source rect hint for transition into PiP
- As a part of transitioning into PiP, we remove the content insets, and
  as a result, we also need to adjust the source hint rect for the change
  in insets as well.

Bug: 37418994
Test: Enter PiP from YT, ensure no jump at the end

Change-Id: I74219b05c91d3c8b8466dd8fff4d6dd692f08725
2017-04-17 16:11:28 -07:00
Bryce Lee
f17e1d1a4d Deprecate ActivityManager#getRunningServices
This change deprecates the method akin to the previous deprecation of
ActivityManager#getRunningTasks. The documentation has been updated
to reflect the current limitations of the method.

Change-Id: I6f35309c1224fdf1f890bce3cc614be8aa343368
Fixes: 36937370
Test: documentation
2017-04-17 15:57:07 -07:00
Adrian Roos
1a1ecfcf5a AOD: Implement redacted notificatinos
Test: Turn on "show sensitive notifications on lockscreen", receive notification, observe AOD
Bug: 36610748
Change-Id: I981ef4cea7cefc76dcd55ebad9d05c758927dabb
2017-04-17 15:41:09 -07:00
Dianne Hackborn
fd8807accf More small fixes/adjustments to job scheduler.
- JobServiceEngine now takes a concrete Service instead of
generic Context in its constructor, since it really must be
associated with a real Service.

- Expand documentation of how dequeueWork() operates.

- Fix some job scheduler implementation to hopefully actually
match the docs: transfer remaining executing work to the new
job, and actually correctly transfer state from old and new
jobs if we are rescheduling due to a true return from onStopJob().

Test: bit CtsJobSchedulerTestCases:*
Change-Id: Ia66797049883eefb566264f930070afb69d469b1
2017-04-17 15:31:15 -07:00
Jeff Sharkey
200d72d933 Merge "Storage API polishing." into oc-dev 2017-04-17 22:26:44 +00:00
TreeHugger Robot
1ed2771450 Merge "Add user to channel/group modification callbacks." into oc-dev 2017-04-17 21:26:54 +00:00
Christopher Tate
242ba3e997 Turn down the preliminary foreground service API
The NotificationManager.startServiceInForeground() experiment is over,
and will not ship as API, so it's time to tidy up and get rid of it.

Bug 36130212
Test: manual

Change-Id: I834d1ce059aa464ff27f69f5e5d3625cc5e61d8a
2017-04-17 14:22:18 -07:00
TreeHugger Robot
3440e92009 Merge "Allow to finish session when all views are gone" into oc-dev 2017-04-17 20:45:05 +00:00
TreeHugger Robot
d8d7a283bd Merge changes I22b55b73,Id050f2f5 into oc-dev
* changes:
  Only foreground service notifications can be colorized
  Fixed a regression where the scrim would be black
2017-04-17 18:51:07 +00:00
Jeff Sharkey
789a8fc792 Storage API polishing.
Based on API council feedback, switch to using real UUID objects
instead of Strings.  Since UUID is a general-purpose utility class
that will be passed around quite a bit, add it to Parcel and Bundle.

Define well-known namespaced UUID values for "default" and "primary
physical" storage devices, which will let us annotate a bunch of
things with @NonNull.

Define new extras for MANAGE_STORAGE intent that apps can use to
signal where and how much space they'd like the user to free up.

Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.StorageHostTest
Bug: 37325923, 35812899, 35806020
Change-Id: I8421b126d680f69141a361c1e77223fe2bf4a325
2017-04-17 12:19:50 -06:00
Andrii Kulian
8f4bd67929 Merge "Temporary remove resource-display caching" into oc-dev 2017-04-17 17:00:06 +00:00
Andrii Kulian
cff2f814a8 Temporary remove resource-display caching
An instance of ResourceKey may correspond to different instances
of Resources at different points in time. This can lead to old
instances of Display returned from cache even if resources have
changed.
We need to ensure 1:1 correspondence between Resources and
ResourceKey before using this kind of cache. Disabling it for now
to fix CTS.

Change-Id: Ib53550c4f2d969c06a570ab6051529269b04b38d
Fixes: 37328072
Fixes: 37305567
Bug: 33430498
Test: android.server.cts.ActivityManagerAppConfigurationTests
Test: android.app.cts.DisplayTest#testRotation
2017-04-17 16:56:55 +00:00
TreeHugger Robot
ed8f49efdc Merge "Also use the notification's sound for the misc channel" into oc-dev 2017-04-17 16:23:55 +00:00
TreeHugger Robot
bbcf5fba1c Merge "Remove @removed method" into oc-dev 2017-04-17 15:01:54 +00:00
Julia Reynolds
b9e712ebde Also use the notification's sound for the misc channel
Even if it's nonexistent.

Test: runtest systemui-notification
Change-Id: I1167fdf10b776460de696657dd49ab6f2be85753
Fixes: 37414045
2017-04-17 14:33:30 +00:00
TreeHugger Robot
676590d060 Merge "expose the instant app installer component" into oc-dev 2017-04-17 14:17:27 +00:00
Julia Reynolds
f27d6b2b82 Add user to channel/group modification callbacks.
Because listeners can see notifications on managed profiles.

Test: runtest systemui-notification and testing with a sample app
(reading and updating channels and getting change
callbacks on a managed profile)
Change-Id: I5d7af3c417e3a3d18f992cc9ad01fbd7959de398
Fixes: 36783632
2017-04-17 08:44:35 -04:00
Philip P. Moltmann
494c3f5da2 Allow to finish session when all views are gone
An service can option to finish the session once all views that it
declared as important. Views that are important are all autofillable
views of any partition and the saveable fields of the last partition.

Test: CtsAutoFillServiceTestCases
Fixes: 35708237
Change-Id: I0ccade8ebb427e5d8928697ef0007c75d3f83df0
2017-04-16 21:36:25 -07:00
Jorim Jaggi
6acf7a7b45 Merge "Wallpaper color extraction API stub" into oc-dev 2017-04-15 04:52:24 +00:00
Lucas Dupin
c40608c041 Wallpaper color extraction API stub
Now it's possible to listen to changes on wallpaper colors by
registering a listener on WallpaperManager. It's also possible
to get the current wallpaper text color hints.

Bug: 36856508
Test: compilation
Change-Id: I5102cb7be9a4af60b85fc8913154a79dfe5c21a0
2017-04-14 18:33:08 -07:00
Dianne Hackborn
aaeb512331 Merge "Introduce a new JobServiceEngine class." into oc-dev 2017-04-15 00:55:55 +00:00
Sudheer Shanka
2359f016e2 Merge "Add new api Activity.getStartInitiatedTime." into oc-dev 2017-04-15 00:09:32 +00:00
Makoto Onuki
5f085792f6 Merge "Fix the wrong IMPORTANCE_ values." into oc-dev 2017-04-14 23:29:11 +00:00
Selim Cinek
22714f1c65 Only foreground service notifications can be colorized
Normal ongoing notifications are not allowed to do so
anymore.

Change-Id: I22b55b7350180e9fdfbab9f3f34826470d7c9fa8
Fixes: 34469375
2017-04-14 16:06:37 -07:00
Dianne Hackborn
579f75c8a4 Introduce a new JobServiceEngine class.
This allows any service to interact with JobScheduler, which
should give us a lot more opportunity to do interesting stuff
in the support lib.

Test: bit CtsJobSchedulerTestCases
Change-Id: I0843e8b212a0a63a17558b837b899b90cac22805
2017-04-14 15:56:47 -07:00
Sudheer Shanka
bc308988bd Add new api Activity.getStartInitiatedTime.
This api will return the timestamp at which this activity start was last
initiated by the system. Implementation is wip.

Bug: 9058261
Test: cts-tradefed run singleCommand cts-dev -m CtsAppTestCases -t \
      android.app.cts.ActivityStartTimeTest

Change-Id: I396458ecefbb09108f414b95f9c0beb6d609a4e1
2017-04-14 14:19:25 -07:00
TreeHugger Robot
28dab313ee Merge "Introduce NETWORK_TYPE_METERED job constraint" into oc-dev 2017-04-14 19:04:35 +00:00
Julia Reynolds
ad1e9c9825 Remove @removed method
Change-Id: I0b92edcc0440674003694ace9b53cad6124948dc
Fixes: 37340967
Test: make
2017-04-14 12:59:47 -04:00
TreeHugger Robot
7c8ab2651b Merge "Remove unnecessary casts on calls to findViewById" into oc-dev 2017-04-14 16:56:28 +00:00
Todd Kennedy
801e65905b expose the instant app installer component
Bug: 35873804
Test: TreeHugger
Change-Id: I4d962927587bb10833bfe3c3db27fdceab668fc3
2017-04-14 09:49:13 -07:00
Makoto Onuki
d7e405851f Fix the wrong IMPORTANCE_ values.
Bug: 36697597
Test: cts-tradefed run cts-dev --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -l INFO -m CtsAppTestCases -t android.app.cts.AlertWindowsTests

Change-Id: I3327d4668470400e8b30faeebb77534eeb2583ed
2017-04-14 09:47:54 -07:00
TreeHugger Robot
b7f0db8d89 Merge "Update more implementations of findViewById()" into oc-dev 2017-04-14 16:26:27 +00:00
Alan Viverette
51efddbd3b Remove unnecessary casts on calls to findViewById
Just frameworks/ this time. More paths to come.

Bug: 24137209
Test: make -j32
Change-Id: Iff27abd26fa43296ac2fff8f534fc6742d2ae80c
2017-04-14 11:15:50 -04:00
Andrew Scull
e52a1bfede Merge "Service for OEM lock management." into oc-dev 2017-04-14 11:31:06 +00:00
TreeHugger Robot
9d2f03ec5d Merge "Make sure theme attributes don't get lost" into oc-dev 2017-04-14 05:24:45 +00:00
Christopher Tate
60977f42db Introduce NETWORK_TYPE_METERED job constraint
When your job wants non-WiFi connectivity.

Bug 37219369
Test: CTS

Change-Id: I0981938061b6b7f354e7236221552ef03976f470
2017-04-13 17:14:07 -07:00
Alan Viverette
04fd470ce0 Update more implementations of findViewById()
Bug: 24137209
Test: make checkbuild -j32
Change-Id: I104969fc74d6dc1d159e3d1ff5926640b124a540
2017-04-13 16:50:32 -04:00
TreeHugger Robot
29c70437b3 Merge "Add new facility to find out when a PendingIntent is canceled." into oc-dev 2017-04-13 20:01:32 +00:00
Dianne Hackborn
f66adfd1cd Add new facility to find out when a PendingIntent is canceled.
This is just an internal API in the platform, not (yet?) available
in the SDK.  But it will be useful for system services that want to
clean up state if a pending intent that has been registered with them
is canceled (either explicitly by the app, through the app being
uninstalled, etc).

Also improve the activity manager's dump of pending intents to
organize them by package, making it much easier to read (now that
we have so many active pending intents these days).

Test: ran and booted.  no CTS, since no API.

Change-Id: Iad029cfedcd77e87357eca7da1b6ae94451dd981
2017-04-13 11:04:30 -07:00
Julia Reynolds
184b86da38 Allow notification channels to be silent.
This better accomodates those apps that play their own sounds.
Since most apps don't play their own sounds, update the documentation
on notificationchannel to add guidance about when they should add a
sound.

Fixes: 37237013
Test: runtest systemui-notification
Change-Id: If00b15b1b44da66d24dacb2895e9a6c0a06d1890
2017-04-13 11:03:57 -04:00