Commit Graph

15718 Commits

Author SHA1 Message Date
Automerger Merge Worker
fc94ebae09 docs: Fix typo in IMPORTANCE_SERVICE description am: 08a4e470b8 am: edcfda720b
Change-Id: Id0683ebab467f7baaac1650b15dd8e98f8057306
2020-01-06 18:24:58 +00:00
Automerger Merge Worker
edcfda720b docs: Fix typo in IMPORTANCE_SERVICE description am: 08a4e470b8
Change-Id: I32360f63be584c4223c6aae692beb48c0bdf4802
2020-01-06 18:13:01 +00:00
Kevin Hufnagle
08a4e470b8 docs: Fix typo in IMPORTANCE_SERVICE description
Test: make ds-docs -j32

Bug: 140783404

Change-Id: Ife86109eebefe9c87f7c9ed4a0587676e3392d90
Exempt-From-Owner-Approval: Docs-only change
2020-01-03 20:05:31 +00:00
Chris Wren
bc487b5759 track and report packages with undecorated remoteviews
print query results with:
  adb shell dumpsys notification --remote-view-stats

test the pulled atom with:
  make statsd_testdrive
  ./out/host/linux-x86/bin/statsd_testdrive 10066

Bug: 144855217
Test: atest frameworks/base/services/tests/uiservicestests/src/com/android/server/notification
Change-Id: I6dcc9871f78298a8b213a051223c7316f8feefc5
Merged-In: I773378fc7cfb47a9f9c7495404ddafa63f39cfaf
2019-12-09 15:48:14 -05:00
TreeHugger Robot
659f477f65 Merge "Fixes usage of WallpaperManager to make it optional." into qt-qpr1-dev 2019-11-23 00:05:20 +00:00
TreeHugger Robot
d6dfaf4c9d Merge "Update equals and hashCode methods of NoMan.Policy" into qt-qpr1-dev 2019-11-22 00:51:41 +00:00
Jay Aliomer
381e3300e8 Dark theme twilight mode backend and tile
When the user has Dark theme scheduling turned on (b/141567787), the quick settings tile subtext should reflect the following:
If Dark theme is on: "Until sunrise"
If Dark theme is off: "On at sunset"
If the user does not have Dark theme scheduled, the text should not appear.
This matches the appearance of the Night Light QS tile.
All starting windows snapshots will be deleted and splash screens
will be used instead.

Test: atest UiModeManagerServiceTest
Fix: 143874807
Merged-In: Ie2ce64b5c5544fffe76be7ec3f971eb7461f8c4d

Change-Id: Ie2ce64b5c5544fffe76be7ec3f971eb7461f8c4d
(cherry picked from commit 8b2671b029)
2019-11-21 18:05:22 +00:00
Satakshi Rana
73b4e1923a Merge "Screenshot Notification Smart Action: AiAi and - Sys UI integration" into qt-qpr1-dev 2019-11-19 17:14:49 +00:00
Felipe Leme
8d4c825ce3 Fixes usage of WallpaperManager to make it optional.
As the main javadoc states:
"An app can check whether wallpapers are supported for the current user,
by calling {@link #isWallpaperSupported()}, and whether setting of
wallpapers is allowed, by calling {@link #isSetWallpaperAllowed()}."

Test: manual verification on automotive
Test: atest CtsAppTestCases:android.app.cts.WallpaperManagerTest # on automotive

Bug: 138939803
Bug: 132111956

Change-Id: I88946f92ff54e556d289c41c28e22da3a4b8c8b8
Merged-In: I88946f92ff54e556d289c41c28e22da3a4b8c8b8
(cherry picked from commit 34a861add1)
2019-11-19 01:24:52 +00:00
Satakshi
ce35ce9f08 Screenshot Notification Smart Action: AiAi and - Sys UI integration
Create a constant in ContentSuggestionsManager, which will
be used to pass a hardware bitmap to ContentSuggestionsService.
In the presence of this key in the request extras, we skip taking a
snapshot in ContentSuggestionsPerUserService.
Bitmap is extracted from reading this value from extras in
ContentSuggestionsService.

Create ScreenshotNotificationSmartActionsProvider, which is overridden
in GoogleSystemUI.
Calling AiAi is guarded by a device config flag created in cl/277143225.

(cherry picked from commit d2010f2628 and c45d86fc15)

Test: Manually tested the code in this CL and corresponding change in SystemUIGoogle.
Took a screenshot and verified that AiAi gets invoked and the screenshot notification
shows smart actions.
Ran new tests added in this CL
'atest ScreenshotNotificationSmartActionsTest'
'atest ContentSuggestionsPerUserServiceTest'
Bug: 141634285
Change-Id: I439a4be9aac53fb02b566ae4d438afe3edf2b37a
Merged-In: I439a4be9aac53fb02b566ae4d438afe3edf2b37a
2019-11-18 16:06:08 -08:00
Kevin Hufnagle
0f18e3444e Merge "docs: Updated desc. of lockNow() method and its overload" into qt-dev am: 1ec7235ebe
am: c54b10fa62

Change-Id: I60ce7afd84eae7b1c297e6cc0f246680d84f5cc0
2019-11-18 14:10:11 -08:00
Kevin Hufnagle
c54b10fa62 Merge "docs: Updated desc. of lockNow() method and its overload" into qt-dev
am: 1ec7235ebe

Change-Id: Iec60117a620bf655859555e8d5e3bc028e73b8a0
2019-11-18 14:06:10 -08:00
Kevin Hufnagle
1ec7235ebe Merge "docs: Updated desc. of lockNow() method and its overload" into qt-dev 2019-11-18 21:47:10 +00:00
Kevin Hufnagle
496c0bae14 docs: Updated desc. of lockNow() method and its overload
Explains in more complete detail who should call lockNow(), when to call the method,
and what happens when there's no lock set on a device.

Test: make ds-docs -j32

Bug: 28831838
Change-Id: I5acc0cbfa63dffe8676e8b60476b584fd43b5bde
2019-11-15 19:44:11 +00:00
Suprabh Shukla
c8e1162852 Remove cancel listeners from pending intent alarms
The cancel listeners are created per PendingIntent instance and were
spamming the callback list stored inside PendingIntentRecord. In cases
where there is even a single live PendingIntent backed by this
PendingIntentRecord, all PendingIntent instances backed by this
PendingIntentRecord for which a callback was ever registered will leak.

Test: atest FrameworksMockingServicesTests:\
com.android.server.am.PendingIntentControllerTest
atest FrameworksMockingServicesTests:\
com.android.server.AlarmManagerServiceTest

Bug: 143091024
Change-Id: I65df12da0c437064e6e3719911926738c677c4eb
Merged-In: I65df12da0c437064e6e3719911926738c677c4eb
(cherry picked from commit 0d51a8bcc0)
2019-11-14 00:02:06 +00:00
Beverly
6bc5d3679e Update equals and hashCode methods of NoMan.Policy
Test: atest AudioManagerTest#testPriorityOnlyChannelsCanBypassDnd
Fixes: 142643922
Change-Id: I15835f784ba73b40eccf92a0a430905d28647669
Merged-In: I15835f784ba73b40eccf92a0a430905d28647669
(cherry picked from commit 4f8b0224e1)
2019-11-11 21:32:07 +00:00
Philip P. Moltmann
6f0fe03b7d [DO NOT MERGE] Split access-media-storage from read-external-storage
am: f3ff750f29

Change-Id: I0f37950a78df7d503a830ec5eff77acad7382fb8
2019-10-25 11:22:30 -07:00
Philip P. Moltmann
f3ff750f29 [DO NOT MERGE] Split access-media-storage from read-external-storage
And also pre-grant it to all apps that currently get any storage
permission pre-granted

Test: atest SplitPermissionTest
      m -j gts && gts-tradefed run commandAndExit gts-dev -m GtsPermissionTestCases --test=com.google.android.permission.gts.DefaultPermissionGrantPolicyTest#testDefaultGrantsWithRemoteExceptions
      Manual testing:
         All combinations of
           - App targetSdk = 28 and 29 (and 22 for extra credit)
           - App having the <uses-permission> tag for
             ACCESS_MEDIA_LOCATION or not
           - Upgrade from P->Q-QPR and from vanilla Q->Q-QPR
         Further upgrade of targetSdk from 28->29 while on Q-QPR
         ==> All permission behavior should make sense. Sometimes there
             are weird, but expected behaviors. Hence we need to
             collect the results and then look at the unexpected ones.
             See SplitPermissionTest for some tests I added for the
             location-background permission which was split from
             the fine/coarse-location permissions
Fixes: 141048840,140961754
Change-Id: Ib9f50d25c002036f13cf2d42fc4d1b214f20920c
(cherry picked from commit ac7b10c135)
2019-10-24 16:02:01 +00:00
Pinyao Ting
8deca19926 fix the issue slice cannot be triggered from uri
Bug: 122879432
Change-Id: Id36a45bbbdb858b5b8d9fd6f1b3f5f97eb84e9fd
Test:
1. install SliceViewer (https://github.com/android/user-interface-samples/releases)
2. adb shell am start -d "slice-https://sliceviewer.android.example.com/hello"
(cherry picked from commit 09b91e6027)
2019-10-18 16:12:47 +00:00
Lucas Dupin
7b4d885c7c Fix wrong Notification refactor
We're wrongly showing the BigText content after ag/5928752

Fixes: 141446552
Test: post big text notification, look at lock screen
Change-Id: I02506a160afefb457f86eb00adccdaff44ddbd29
2019-09-25 01:05:14 +00:00
Kevin Hufnagle
25309b11da Merge "docs: List BIOMETRIC_WEAK in setPasswordQuality()" into qt-dev am: 2a082b1e9e
am: 096ece8f53

Change-Id: I03b4f71aaa643e08a661fe383f2cff91c7a136f9
2019-09-23 16:19:39 -07:00
Kevin Hufnagle
096ece8f53 Merge "docs: List BIOMETRIC_WEAK in setPasswordQuality()" into qt-dev
am: 2a082b1e9e

Change-Id: I74d42b68ebed97c2db3a179e92ba3196ffc7a04f
2019-09-23 16:08:03 -07:00
Kevin Hufnagle
2a082b1e9e Merge "docs: List BIOMETRIC_WEAK in setPasswordQuality()" into qt-dev 2019-09-23 22:45:45 +00:00
Philip P. Moltmann
0698185471 Merge "[DO NOT MERGE] Split access-media-storage from read-external-storage" into qt-qpr1-dev 2019-09-20 23:09:43 +00:00
Philip P. Moltmann
ac7b10c135 [DO NOT MERGE] Split access-media-storage from read-external-storage
And also pre-grant it to all apps that currently get any storage
permission pre-granted

Test: atest SplitPermissionTest
      m -j gts && gts-tradefed run commandAndExit gts-dev -m GtsPermissionTestCases --test=com.google.android.permission.gts.DefaultPermissionGrantPolicyTest#testDefaultGrantsWithRemoteExceptions
      Manual testing:
         All combinations of
           - App targetSdk = 28 and 29 (and 22 for extra credit)
           - App having the <uses-permission> tag for
             ACCESS_MEDIA_LOCATION or not
           - Upgrade from P->Q-QPR and from vanilla Q->Q-QPR
         Further upgrade of targetSdk from 28->29 while on Q-QPR
         ==> All permission behavior should make sense. Sometimes there
             are weird, but expected behaviors. Hence we need to
             collect the results and then look at the unexpected ones.
             See SplitPermissionTest for some tests I added for the
             location-background permission which was split from
             the fine/coarse-location permissions
Fixes: 141048840,140961754
Change-Id: Ib9f50d25c002036f13cf2d42fc4d1b214f20920c
2019-09-20 16:45:58 +00:00
Philip P. Moltmann
4052d36f62 Fix dumpsys for appops proxy field
- Make flags is the last parameters in access decipher methods.
  All calling code assumes this.
- Get proxyUid info from the appropriate field
- Don't create proxy entries if uid is invalid
- Fixed some incorrect docs

Test: adb shell dumpsys appops now shows proxy information
Fixes: 141328071
Change-Id: I2f94e9b171133141643e628c9224d8d74ec5ad87
2019-09-19 16:12:43 -07:00
Mady Mellor
fd48588768 Merge "qt-r1-bubbles-dev @ build 5835883" into qt-qpr1-dev 2019-09-16 21:55:51 +00:00
Hongwei Wang
f0b5fb17fb Ensure bounds animination for expanding PiP window
The internal animation type maybe reset at the end of RecentsAnimation
following the repro path in bug comments. Ensure BOUNDS animation type
if we know for certain that we're expanding / collpasing the PiP window

Added also last reported multi-window and PiP mode in dumpsys. This is
for internal debug purpose only.

Bug: 137849660
Test: Manually, see b/137849660#comment9
Test: dumpsys activity -v all
Change-Id: I0b7d102ccb4bc27dd0e432d1022bc12a42a0c36d
Merged-In: I0b7d102ccb4bc27dd0e432d1022bc12a42a0c36d
(cherry picked from commit 2cebfd5e5f)
2019-09-12 21:55:46 +00:00
Jeff Sharkey
da99669780 RESTRICT AUTOMERGE Strict SQLiteQueryBuilder needs to be stricter. am: 0e66ea6f32
am: 71765a75d1

Change-Id: I83961bb6bdffa90583d28e416a98cb0efd62fb32
2019-09-11 16:20:00 -07:00
Jeff Sharkey
71765a75d1 RESTRICT AUTOMERGE Strict SQLiteQueryBuilder needs to be stricter.
am: 0e66ea6f32

Change-Id: I111fcc77d1e0c8b8065f5476fc2a0e75bf88f2a2
2019-09-11 16:13:02 -07:00
Mady Mellor
a5813e0e3d qt-r1-bubbles-dev @ build 5835883
Test: presubmit setup on source branch

Bug: 126945401
Bug: 128932906
Bug: 129158983
Bug: 130237686
Bug: 130250809
Bug: 130442248
Bug: 131267438
Bug: 131609280
Bug: 131692350
Bug: 131849856
Bug: 133444037
Bug: 134064116
Bug: 134064858
Bug: 134070807
Bug: 134077101
Bug: 134090085
Bug: 134155107
Bug: 134423445
Bug: 134512898
Bug: 134514210
Bug: 134514227
Bug: 134734945
Bug: 134960381
Bug: 134989736
Bug: 135214687
Bug: 135280077
Bug: 135472021
Bug: 135475155
Bug: 135487618
Bug: 135488406
Bug: 135518045
Bug: 135633218
Bug: 136034310
Bug: 136150954
Bug: 136199542
Bug: 136538998
Bug: 137201711
Bug: 137213469
Bug: 137214359
Bug: 137214536
Bug: 137233453
Bug: 137876221
Bug: 138301618
Bug: 138445026
Bug: 138659213
Bug: 138749133
Bug: 138799651
Bug: 138801505
Bug: 138941969
Bug: 139002444
Bug: 139025304
Bug: 139816141
Change-Id: Ia7364529ea58070c8d45ecd726ab6ac7d34f2abe
Merged-In: Ic271a6a0f0803941dd5a84124dabf4d8c5fcc755
Merged-In: Ic3a4ba793db7f1361678ef51c411d9eab85d9b85
2019-09-11 22:42:54 +00:00
Kevin Hufnagle
6e159aa9b9 docs: List BIOMETRIC_WEAK in setPasswordQuality()
Also converted curly quotes to straight in one of the notes.

Test: make ds-docs -j32

Bug: 135089189
Change-Id: I146fb7eec5da48496467a1bc7706f9d87dc339f7
2019-09-11 20:06:00 +00:00
Mark Renouf
1c25fc531f Removes strong ref to Activity from RequestFinishCallback
This change eliminates the strong reference from
RequestFinishCallback to Activity.

Bug: 139782368
Test: Open then finish an activity within an ongoing app process
      Observe the Activity instance is no longer strongly reachable
      in the app process after onDestroy() completes.

Change-Id: I13e9707e96721a2d491629147337aaedc3473651
2019-09-10 14:08:36 -04:00
Jeff Sharkey
13f49c4259 RESTRICT AUTOMERGE
Enable stricter SQLiteQueryBuilder options.

Malicious callers can leak side-channel information by using
subqueries in any untrusted inputs where SQLite allows "expr" values.

This change starts using setStrictColumns() and setStrictGrammar()
on SQLiteQueryBuilder to block this class of attacks.  This means we
now need to define the projection mapping of valid columns, which
consists of both the columns defined in the public API and columns
read internally by DownloadInfo.Reader.

We're okay growing sAppReadableColumnsSet like this, since we're
relying on our trusted WHERE clause to filter away any rows that
don't belong to the calling UID.

Remove the legacy Lexer code, since we're now internally relying on
the robust and well-tested SQLiteTokenizer logic.

Bug: 135270103
Bug: 135269143
Test: atest DownloadProviderTests
Test: atest CtsAppTestCases:android.app.cts.DownloadManagerTest
Change-Id: Iec1e8ce18dc4a9564318e0473d9d3863c8c2988a
2019-09-10 11:07:32 -07:00
Pinyao Ting
e3f595c0a4 Merge "fixes a security vulnerability in slice provider" into qt-dev
am: bc59740fe4

Change-Id: Iba3a00da2706910d34cb53cc999047c16023cf93
2019-09-04 16:40:54 -07:00
Pinyao Ting
a6364d92ed fixes a security vulnerability in slice provider
Bug: 138441555
Test: Manual
Change-Id: Ib1b4fba54ebd3599fe11021d21dc9b09d34e8965
Merged-In: Ib1b4fba54ebd3599fe11021d21dc9b09d34e8965
(cherry picked from commit 2b415a4c44)
2019-08-28 23:45:04 +00:00
Felipe Leme
87c5855e17 Fixed SystemServiceRegistry to return a null AppPredictionManager when the service is not defined.
Test: manual verification
Test: atest CtsAssistTestCases

Fixes: 139416391

Change-Id: Ieb2ae3f39bd42dc077ed3db1c6acdf429a39d519
2019-08-15 06:03:24 +00:00
Prabir Pradhan
b218cf2d0f Merge "apply empty transaction in startActivitySync" into qt-dev am: f928b661d9
am: 5cd874d792

Change-Id: I89a77c5ea7942be535496b7e41498c999232c987
2019-08-14 08:51:00 -07:00
Prabir Pradhan
fa6f50e13d Merge "apply empty transaction in startActivitySync" into qt-dev am: f928b661d9
am: 5cd874d792

Change-Id: I9c9ac83d6466c1d9c5ac666cfcfe0920b276ffdc
2019-08-14 01:53:13 -07:00
Prabir Pradhan
5cd874d792 Merge "apply empty transaction in startActivitySync" into qt-dev
am: f928b661d9

Change-Id: Ic4b27be6729a3a7627a8fc499cd99fdec42cad35
2019-08-14 01:40:41 -07:00
Pinyao Ting
2b415a4c44 fixes a security vulnerability in slice provider
Bug: 138441555
Test: Manual
Change-Id: Ib1b4fba54ebd3599fe11021d21dc9b09d34e8965
2019-08-13 00:25:33 +00:00
lumark
dc9b319039 DO NOT MERGE: Fix ActivityView surface can't visible for ActivityViewTest
CL [1] introduced ActivityView's surface view set alpha as zero by default.
but SurfaceView ignores alpha value by default.

So to archieve SurfaceView can support alpha value and then introduced CL[2].
with that CL, it will affect ActivityView that can't see the surface because
of this zero alpha value.

Since CLs[1] & [2] are mainly considered for BubbleController to implement
content visiblity with setting surface view's alpha value without
flickering, and in BubbleExpandedView#onFinishInflate has already
called setContentVisibility(false) to set ActivityView's alpha value as
zero before add this view.

So removing ActivityView's default zero alpha value would be fine, since
it may not always the case that need to set zero alpha but need to show
the black rectangle surface for user. (i.e. ActivityViewTest or Android Auto)

Also, refined ActivityView#setAlpha for some stuff to make it clear.

[1]: Ie5aed373996419b059935889b564ca91c2e3cf23
[2]: I86847de59109b2adf12a2c7c50c988c2cbcf0450

Bug: 137937105
Test: manual as below steps
      1) make & install ActivityViewTest
      2) launch "AV Main" shortcut
      3) press "Test ActivityView" -> "Launch test activity"
      4) see if launched Acitvity is visible as expected.
Test: atest ActivityViewTest, observe if ActivityView is visible during testing.

Change-Id: Iaf480912f06a6851001a42bf90e4d962c8a88a37
2019-08-09 14:26:12 +00:00
Issei Suzuki
94e8d116ab DO NOT MERGE: Support alpha value in SurfaceView.
For backward compatibility, SurfaceView ignores alpha value by
default. In order to reflect alpha value set on the SurfaceView
to its underlying surface, setUseAlpha() needs to be called.

Translucent alpha only works when the surface is placed z-above.
Otherwise only fully opaque and transparent status are supported.

Bug: 137937105
(Orignal bug from b/130442248)
Test: Manual, use BubblesTest app and checks if alpha is set.
Change-Id: I86847de59109b2adf12a2c7c50c988c2cbcf0450
2019-08-09 14:08:03 +00:00
Prabir Pradhan
03dde38efc apply empty transaction in startActivitySync
Force SurfaceFlinger to update synchronously by applying an empty
transaction. Without this, SurfaceFlinger will only update after the
next vsync, which may only happen after the instrumentation already
starts.

Since InputFlinger will only have the proper InputWindowInfo after
SurfaceFlinger updates, waiting for the vsync caused some
instruemntation tests to be flaky.

Bug: 138263890
Test: atest android.view.cts.HoverTest
Change-Id: I5457ab67ac574530dc1aa84549ca11e7e3f0d714
2019-08-07 12:59:01 -07:00
Kevin Hufnagle
05ad21feaf Merge "docs: Clarified when onRestoreInstanceState() executes" into qt-dev am: c80fe63001
am: ad1de8fbe4

Change-Id: I0f33586ecb3b8f7e6cfa91dac274f9b384428495
2019-08-06 09:22:59 -07:00
Kevin Hufnagle
609b68b711 Merge "docs: Clarified when onRestoreInstanceState() executes" into qt-dev am: c80fe63001
am: ad1de8fbe4

Change-Id: If640cc8efb66e28623b74bd7eff12e0684e95de6
2019-08-06 09:22:57 -07:00
Kevin Hufnagle
ad1de8fbe4 Merge "docs: Clarified when onRestoreInstanceState() executes" into qt-dev
am: c80fe63001

Change-Id: I332332fc88e565a3842297b04769778ee1c344ca
2019-08-06 09:09:56 -07:00
Jorim Jaggi
a830816c8f Merge "Fix overlapping remote and recents animations" into qt-r1-dev
am: b248a0343f

Change-Id: I13810205eddf4531786ef93c1568ed28d4004cf2
2019-08-05 11:40:07 -07:00
Jorim Jaggi
f76a0f8376 Merge "Fix overlapping remote and recents animations" into qt-r1-dev
am: b248a0343f

Change-Id: I65a0859aa03247262767107f3525b2b7490b5eb8
2019-08-05 11:39:03 -07:00
Jorim Jaggi
589c5ba0fa Fix overlapping remote and recents animations
Test: Open app and immediately swipe up while opening. Verify
Thread prioties in systrace

Test: WindowProcessControllerTests
Fixes: 137881181
Change-Id: Ic1d7403d2a648e6f1d1b6a3d55b56bf37bc57a2c
2019-08-05 17:10:18 +02:00