Commit Graph

12959 Commits

Author SHA1 Message Date
TreeHugger Robot
44662a157e Merge "Add Application.getProcessName()" into pi-dev 2018-03-12 19:43:22 +00:00
Bryce Lee
2b9620cc71 Merge "Update documentation for Activity#onCreate." into pi-dev 2018-03-12 19:18:36 +00:00
TreeHugger Robot
81cacb274c Merge "Statsd BroadcastSubscribers can receive 'cookies'" into pi-dev 2018-03-12 18:27:02 +00:00
Bryce Lee
476edc8148 Update documentation for Activity#onCreate.
The current description incorrectly states #onDestroy will be called
immediately when invoking #finish during #onCreate.

Change-Id: I816a54457d7aca0b40feac9a5656d94f7e712c76
Fixes: 69144863
Test: comment update.
2018-03-12 10:06:23 -07:00
Bookatz
058d869826 Statsd BroadcastSubscribers can receive 'cookies'
Subscribers can now provide additional Strings that will be passed back to
it when an anomaly is detected. This way, the Subscriber can be informed
about anomaly-specific information has meaning to it.
Statsd itself does not use these strings and doesn't care what they are
- it simply passes them back to the subscriber.

Change-Id: If269872397c4ed2c67e41d54d850cdc664d4f73e
Fixes: 74012329
Test: run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.alert.BroadcastSubscriberTests
2018-03-09 10:44:48 -08:00
Jason Monk
5e676a22a0 Add intent category for slices to help identify them
Test: cts, testMapIntentToSlice
Bug: 73123733
Change-Id: I75c3e132861d04301f5c856c235eadfc4be8f9bc
2018-03-09 10:56:01 -05:00
Julia Reynolds
0b4626aa23 Merge changes from topic "jr-viseffects" into pi-dev
* changes:
  Make systemui obey new visual effect flags
  Expand the visual effects that DND can suppress.
2018-03-09 13:38:06 +00:00
Jorim Jaggi
3a78ec6ae4 Merge changes I46e93397,Ie0a157a9 into pi-dev
* changes:
  Also set calling pid when registering for next activity start
  Revert "Revert "Elevate remote/recents animation priority""
2018-03-09 12:05:01 +00:00
TreeHugger Robot
526973aebb Merge "Don't use android namespaces in docs" into pi-dev 2018-03-08 18:28:39 +00:00
Jorim Jaggi
bc2aabe845 Revert "Revert "Elevate remote/recents animation priority""
This reverts commit a8b48ab733.

Original issue has been fixed in follow up CL.

Bug: 73555925
Change-Id: Ie0a157a91c3c66df52370adad7b188f59c4749ea
2018-03-08 18:04:21 +01:00
Jason Monk
ad594516b6 Don't use android namespaces in docs
We don't want to encourage devs to do that.

Test: none
Change-Id: I5633fc2a5b9bddddcc67daaff43798c9b66d036c
Fixes: 73123987
2018-03-08 11:35:55 -05:00
Jason Monk
8d15ff047d Merge "Remove registerSliceCallback and formalize setCallerNeeded" into pi-dev 2018-03-08 15:02:26 +00:00
Julia Reynolds
ccc6ae64ff Expand the visual effects that DND can suppress.
Additionally default to disabling all visual effects when DND is on,
to gather dogfood feedback.

The 'dnd has changed' notification will be reposted after this
CL and has updated text.

Test: runtest systemui-notification
Bug: 74075050
Change-Id: I5bec8ccc6456d98112907b0264ecd52734983984
2018-03-08 09:48:16 -05:00
TreeHugger Robot
8c55e8c306 Merge "DO NOT MERGE - Disable warning on blocking one-way call from autofill server." into pi-dev 2018-03-07 21:24:46 +00:00
Felipe Leme
385ee5393d DO NOT MERGE - Disable warning on blocking one-way call from autofill server.
This behavior existed since autofill was introduced on O and it won't be fixed
on P, so there's no point on warning. In fact, the warning is often a red
herring for other issues, not to mention a big logcat spammer.

Bug: 35708678
Test: manual verification looking at logcat

Change-Id: I40be4ce25abc5b097ea67e5cb34bb9c4237f0826
2018-03-07 19:24:45 +00:00
TreeHugger Robot
1e36211a96 Merge "Avoid service wrapper initialization deadlock." into pi-dev 2018-03-07 18:11:15 +00:00
TreeHugger Robot
5a169cf2f6 Merge "System sounds get its own dnd toggle" into pi-dev 2018-03-07 16:39:40 +00:00
Rubin Xu
50ac241221 Clarify javadoc for DevicePolicyManager.setTrustAgentConfiguration
Fixes: 36887130
Test: builds
Change-Id: Ieccd3edc0122c9ae49903a3c5fc9fb0aba6c08a2
2018-03-07 14:21:35 +00:00
Scott Main
655d98bdb5 Merge "Fix javadoc typo causing broken links" into oc-mr1-dev
am: ac2cdc0dba

Change-Id: Ib8d63b1bfcc20e398314501a51bd2fad76a8d10e
2018-03-07 01:54:15 +00:00
Makoto Onuki
f896f1254c Avoid service wrapper initialization deadlock.
- Don't initialize a service wrapper with the cache lock held.
- Instead, use AtomicInteger to avoid instantiating the same service
multiple times.

Test: build, boot, presubmit
Bug: 71882178

Change-Id: Iea4207b855043addac4d24381778babf8eedd84d
2018-03-06 17:40:59 -08:00
Scott Main
bda0cc9c3c Fix javadoc typo causing broken links
Change-Id: I988e06100562c574bbda1bb530359da289062d65

bug: 74262753
2018-03-07 01:39:29 +00:00
Dianne Hackborn
16268a69d6 Merge "Fix issue #72116995: Add permission guarding Service#startForeground" into pi-dev 2018-03-06 23:04:16 +00:00
Jason Monk
b8e5fa9dee Remove registerSliceCallback and formalize setCallerNeeded
Test: update-api
Change-Id: I690064fb416f017f7175a63980827a4ad773ad37
Fixes: 73124257
2018-03-06 17:51:30 -05:00
TreeHugger Robot
29d047bab8 Merge "WallpaperColors hint computation" into pi-dev 2018-03-06 22:16:50 +00:00
Lucas Dupin
1c6e3ba66d Merge "WallpaperColors.fromDrawable Drawable mutation" into pi-dev 2018-03-06 17:34:48 +00:00
Andrew Grieve
4700befb26 Add Application.getProcessName()
This information is already available to non-sandboxed processes via
ActivityManager.getRunningAppProcesses(). However, performing an IPC and
iterating processes is quite cumbersome. See other alternatives devs have tried:

https://stackoverflow.com/questions/19631894/is-there-a-way-to-get-current-process-name-in-android

My specific motivation for exposing this information more directly is to
be able to perform process-specific initialization logic in
Application.attachBaseContext():

https://cs.chromium.org/chromium/src/chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java?rcl=ac2e180a1265f88dd4030bb35d69f5d0b2dc488d&l=54

Bug: 73344323
Test: Same code that's used in Chrome via reflection.
Change-Id: I83cec468458078e3fa183427a039869f74539c3d
2018-03-06 17:28:47 +00:00
Beverly
d696476fb3 System sounds get its own dnd toggle
- Added logic for streams to be muted by dnd (unassociated with ringer)

Test: runtest -x frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/ZenModeHelperTest.java
Bug: 73362490
Change-Id: I1101e67282f7331497e91eb510d2bf4f1ea6b4b1
2018-03-06 09:08:29 -05:00
Tony Mak
6a97535f28 Revert accidental change of isUsingUnifiedPassword javadoc
Test: None

Change-Id: I72735b790ae37838917b2330b84a3cfef32ce7b8
2018-03-06 11:34:08 +00:00
Dianne Hackborn
dd027b3ab2 Fix issue #72116995: Add permission guarding Service#startForeground
Now requires permission if targeting P.

Note that this is a separate permission from the existing one
that is required for instant apps to use foreground services.  The
reason for this is that their semantics are different (the instant
apps permission is associated with an app op for control over what
the app is allowed, while the regular app permission is just a
normal permission that is always granted and only there for
auditing of apps), and there are probably going to be cases where
a developer will want to use a foreground service in the full
version of their app but not as an instant app.

Bug: 72116995
Test: atest CtsAppTestCases
Change-Id: I883c9515c307ed8e39f0bf888c4045944c8183ac
2018-03-05 16:59:21 -08:00
Tony Mak
329047bd16 Improve javadocs of some DPM APIs
FIX: 70332970
FIX: 73919570
FIX: 67495520
FIX: 71566404

Test: None

Change-Id: Ic9b485ff7c15e0d244cba9e71def8d5c41e52070
(cherry picked from commit 8309c8f760)
2018-03-05 20:21:57 +00:00
Lucas Dupin
ffbf37e611 WallpaperColors.fromDrawable Drawable mutation
WallpaperColors.fromDrawable should never mutate Drawable bounds

Test: tests/app/src/android/app/cts/WallpaperColorsTest.java
Change-Id: I7467033c6a4e587b04e60423ceec3404b980cdf2
Fixes: 73506557
2018-03-05 17:27:28 +00:00
Lucas Dupin
c50f47d970 WallpaperColors hint computation
Public WallpaperColors surface should not compute hints, malicious apps
might use theme inversion to slow down the system.

Change-Id: I9d14259e433b1047d2512b3d994524dca5e8531a
Fixes: 69532159
Test: set white wallpaper, black wallpaper, observe theme changing
Test: runtest -x services/tests/servicestests/src/com/android/server/wallpaper/WallpaperServiceTests.java
2018-03-05 17:26:58 +00:00
TreeHugger Robot
48553062fa Merge "Fix crash with AppComponentFactory" 2018-03-04 17:47:14 +00:00
Suprabh Shukla
c0fe0626f6 Merge "An api to query usage events for the caller" 2018-03-03 01:32:21 +00:00
Adam Lesinski
40a32d9ff0 Merge "Refactor AssetManager" 2018-03-02 22:05:45 +00:00
TreeHugger Robot
b60ca84e23 Merge "Fix toast lifetime" 2018-03-02 20:58:34 +00:00
TreeHugger Robot
3c4c64455e Merge "Add a HINT_KEYWORDS to Slice" 2018-03-02 19:14:26 +00:00
TreeHugger Robot
7bbedee7a4 Merge "Clarify javadoc for DevicePolicyManager.KEYGUARD_DISABLE_WIDGETS_ALL" 2018-03-02 19:03:25 +00:00
Jason Monk
6ee51bb6d6 Fix crash with AppComponentFactory
Allow for a null classloader, but make sure we recrete if the
classloader changes later.

Test: Added CTS
Change-Id: Ibea54d7e03acd5201d81b2261bab0739020de12d
Fixes: 74089652
2018-03-02 11:20:31 -05:00
TreeHugger Robot
6f5ed04ab7 Merge "Addresses API feedback for Intent Discovery change" 2018-03-02 15:52:32 +00:00
Rubin Xu
4b2f7aacd1 Clarify javadoc for DevicePolicyManager.KEYGUARD_DISABLE_WIDGETS_ALL
Change-Id: I773336ef85fc268fc8026a9031632ba018833eb6
Fixes: 36847262
Test: builds
2018-03-02 15:41:53 +00:00
Mady Mellor
15e2c5d54d Add a HINT_KEYWORDS to Slice
Want to be able to support allowing a Slice to specify some keywords
associated with it; need a new hint to identify these.

Bug: 74086214
Test: make
Change-Id: I79d3f1806eecf416f5e3ae09451b90507b382c24
2018-03-02 00:54:15 +00:00
Robert Carr
99742734e3 Fix toast lifetime
In NotificationManagerService#cancelToast we have been calling
WindowManagerService#removeWindowToken with 'removeWindows'=true. This
is allowing for Surface destruction without any sort of synchronization
from the client. Before the call to removeWindowToken we are emitting
a one-way hide call to the Toast client. As a solution to the lifetime
issue we have the client callback to let us know it has processed the
hide call (and thus stopped the ViewRoot). On the server side we also instate
a timeout. This mirrors the app stop timeout. All codepaths I could find
leading to this sort of situation where a client is still rendering
in to a toast following the total duration expiring seem to indicate a hung
client UI thread.

Bug: 62536731
Bug: 70530552
Test: Manual. go/wm-smoke
Change-Id: I89643b3c3a9fa42423b498c1bd3a422a7959aaaf
2018-03-01 12:43:40 -08:00
Leif Wilden
6d228a7515 Merge "Update javadoc for SearchManager api on TV." 2018-03-01 19:23:31 +00:00
Patrick Baumann
3abf547d1f Addresses API feedback for Intent Discovery change
* Clarifies purpose and effects of resolver methods
* Adds javadocs to non-obvious constructors and constants

Test: none - no functional changes
Bug: 73950163
Change-Id: Id668b890a8c97da74502698f71b16cc213eda6c6
2018-03-01 10:03:05 -08:00
TreeHugger Robot
d71809bb8b Merge "Sanity check to avoice NPE if an app-provided URI is invalid." 2018-03-01 17:31:40 +00:00
TreeHugger Robot
15c3e602e9 Merge "Removed AMS.updatePersistableUriPermission()" 2018-03-01 17:30:33 +00:00
Adam Lesinski
bebfcc46a2 Refactor AssetManager
Bug: 64071469
Test: atest CtsContentTestCases
Change-Id: Ia6856157e8813856268fba003e1e591d690cb26e
2018-02-28 19:06:48 -08:00
Felipe Leme
98f4c694e0 Sanity check to avoice NPE if an app-provided URI is invalid.
Test: atest VirtualContainerActivityCompatModeTest#testAutofillSync

Fixes: 73790788

Change-Id: Ic73eb800f4532425effb03396f0ab455142ab6dc
2018-02-28 17:43:34 -08:00
TreeHugger Robot
30982facc5 Merge "Finish ops started on behalf of a removed package." 2018-03-01 01:11:35 +00:00