Commit Graph

424299 Commits

Author SHA1 Message Date
Kevin Hufnagle
c67e4da871 Merge "docs: Add condition for hiding synth. activities" into qt-dev am: 00537efd07
am: 12298403b0

Change-Id: I7a71cdb8fd5ecfd008d0e8257185cdd8c5366ce0
2019-09-18 17:39:27 -07:00
Kevin Hufnagle
12298403b0 Merge "docs: Add condition for hiding synth. activities" into qt-dev
am: 00537efd07

Change-Id: I1ec3fb8fea7f6b5fe292807b3951fb265a9cbb94
2019-09-18 17:32:55 -07:00
Kevin Hufnagle
00537efd07 Merge "docs: Add condition for hiding synth. activities" into qt-dev 2019-09-19 00:20:47 +00:00
Govinda Wasserman
7b546489a6 Ensure that handles are hidden and stay hidden when not fully awake
Previously handles used either the wakefulness lifecycle or the doze
state to determine whether to hide the handles. This change makes them
use both and hides if either signal indicates that the phone is not
fully awake.

Test: atest google/perf/jank/SystemUI/UbSystemUIJankTests-Lock:android.platform.systemui.tests.jank.SystemUiJankTests#testUnlock -v
Test: atest AssistHandleLikeHomeBehaviorTest
BUG:141219006
FIX:141219006
Change-Id: Iedbf5421c369440a3170f1a0b1add66bd289ec7a
Merged-In: Iedbf5421c369440a3170f1a0b1add66bd289ec7a
2019-09-18 21:27:47 +00:00
TreeHugger Robot
51cf32b4f3 Merge "Camera: fix NPE from bad requestID" into qt-qpr1-dev 2019-09-18 20:54:27 +00:00
Seigo Nonaka
dbf4d68906 Merge "Do not compute outside given range in TextLine" into qt-dev am: 01082fe6ae
am: a2778ebe0d

Change-Id: I07c9f4c9a8bd9b6cdfa0f4da215d1b6f63ca9961
2019-09-18 13:30:17 -07:00
Seigo Nonaka
a2778ebe0d Merge "Do not compute outside given range in TextLine" into qt-dev
am: 01082fe6ae

Change-Id: I9d88c47a16747009fda893660fd36d325d212a40
2019-09-18 13:17:17 -07:00
TreeHugger Robot
01082fe6ae Merge "Do not compute outside given range in TextLine" into qt-dev 2019-09-18 20:05:29 +00:00
Dave Mankoff
46b9d68f6c Add new ProximitySensor wrapper that automatically uses appropriate sensor.
Bug: 140270231
Test: manual && atest SystemUITests
Change-Id: Id151ce8f702f7deadab73ee3904a0a883870b237
Merged-In: Id151ce8f702f7deadab73ee3904a0a883870b237
2019-09-18 14:48:39 -04:00
Mingguang Xu
d65f8c6704 Merge "Wifi usability: Data stall detection based on link layer stats" into qt-qpr1-dev 2019-09-18 18:28:02 +00:00
Yin-Chia Yeh
f83a966064 Camera: fix NPE from bad requestID
This avoid NPE exception and accompanying logspam from binder
callbacks.

Test: N/A
Bug: 141250131
Merged-In: I729f4905c94698c95733570abe92ca3ba9163cc5
Change-Id: I729f4905c94698c95733570abe92ca3ba9163cc5
(cherry picked from commit 67bd78ad73)
2019-09-18 18:14:16 +00:00
Lucas Dupin
01047d0372 Merge "Avoid going to SHADE_LOCKED when already in SHADE" into qt-qpr1-dev 2019-09-18 17:42:58 +00:00
Lucas Dupin
e7ff7be645 Avoid going to SHADE_LOCKED when already in SHADE
It's not possible for the device to go to SHADE_LOCKED after you're
already unlocked, still it's possible that it would happen.

Added an extra condition to avoid it, and logs to catch the regression
if it happens again.

Fixes: 139259891
Test: pull down notification while authenticating
Change-Id: I5c2b81906fa444dfd07d040b81a527245d4130e6
2019-09-18 10:38:34 -04:00
Ricky Wai
ba1b753b85 Do not return synthetic launcher activity for completely headless apps
Bug: 140477182
Test: Headless app: no icon is shown on launcher
Test: App with launchable activity but disabled by default: no icon
Test: App with launchable activity, enabled by default but then disabled by command: has an icon on launcher
Change-Id: I58a36ac93d34583b2d4e50464b73cced77ce8edb
Merged-In: I58a36ac93d34583b2d4e50464b73cced77ce8edb
(cherry picked from commit 3eb1cc6588)
2019-09-18 10:55:39 +00:00
Mingguang Xu
de3725b8fa Wifi usability: Data stall detection based on link layer stats
This is an effort to define new criterion for triggering Wifi data stall:
(1) Defined data stall criterion based on transmit and/or receive throughput, transmit packet error rate, and CCA level. Data stall is triggered when transmit and/or receive links are consecutively bad over multiple RSSI polls.
(2) Added DeviceConfig flags (that is disabled by default) which may be configured on the server side to tune the thresholds at which data stall gets triggered.

Bug: 141027476
Test: frameworks/base/wifi/tests/runtests.sh

Change-Id: I895fd54cc7ec32815bce1899354ca265d4e93ea9
Signed-off-by: Mingguang Xu <mingguangxu@google.com>
Merged-In: I76d6338cd2d482d198fde1e5a2d1a0540c087ca6
2019-09-18 01:58:33 -07:00
Gustav Sennton
dfa968d402 SSIN: Use the application's context to load icon resources.
SSIN = Smart Suggestions in Notifications.
When posting a notification with contextual/smart actions app developers
supply their own icons for their actions. These icons can reference
resources from within the application package. Therefore we need to use
a Context from that package to load icon resources.
Before this CL we were using the SystemUi context which doesn't have
access to the same resources as the app context - meaning we were not
able to load the icon the app developer was providing us (unless they
provided an Icon instance rather than just a resource ID for their icon).

Bug: 137044913
Test: atest SmartReplyViewTest
Test: manual - create a notification with a
contextual action whose icon is referenced through a resource ID (not an
Icon instance). Ensure the icon is shown correctly in the notification.
Change-Id: Ia6d7b3689c46b65558437e00a947ba3cd330e4ca
2019-09-18 08:07:52 +00:00
Chris.CC Lee
d424e202b3 Apply front scrim to doze pulsing
When ambient goes dark, apply the same front scrim opacity during doze
pulsing. The would then be a common behavior to all pulsing reaons.

Bug: 139445074
Test: Manual tests
Test: atest ScrimControllerTest
Change-Id: I3f1f7ca00b9d200ce4a7120b5328527ab9d9fb13
2019-09-18 14:38:25 +08:00
Cheonho Park
8c0b496c97 Merge "Allow signing key rotation" into qt-qpr1-dev 2019-09-18 05:04:12 +00:00
Jaegeuk Kim
64c2d37df2 Merge "IdleMaint: run more frequently during 3AM to 4AM" into qt-qpr1-dev 2019-09-18 02:28:03 +00:00
Mady Mellor
9be3bedc5b Restrict height of expanded view in landscape & fix left / right padding
Previously the height & width of expanded view was not updated when
switching between landscape & portrait. This CL:

* Adjusts max height calculation so it accounts for landscape
* Updates the position, height, & left / right padding of the expanded
  view when the orientation changes, also accounting for notches / navbar
* Also accounts display cutout when calculating IME inset for expanded
  view

Test: manual - have multiple bubbles with different heights (small & max)
             - expand the stack
             - go to each bubble and rotate to landscape / portrait
            => in landscape the heights should be restricted & width
               of the view shouldn't overlap notches (turn them on/off)
               or navbar (turn gesture nav on/off), in portrait
               the max height should increase
Bug: 135487618
Change-Id: Iaffcef0a070d3eb2d6b21248be3c94a861d77d5d
2019-09-17 18:12:07 -07:00
Mady Mellor
e19353d67b Restrict the space bubbles are centered in while in landscape
In landscape don't use the full screen width, instead, restrict to a
percentage of the screen & enforce a minimum of the width of the screen.

* Updates the displaySize passed to ExpandedAnimationController
  to be the "real size", this is consistent with what BubbleExpandedView
  uses now
* Alters positioning calculations in ExpandedAnimationController &
  accounts for notches / screen decorations

Test: manual - have multiple bubbles
             - expand the stack
             - rotate the device
             => observe that the bubbles look nicely centered (i.e. not
                too much space or too little space) in landscape & portrait
Bug: 135487618
Change-Id: Ief7fc6f762f8cc130e37963d48005f15a1bea743
2019-09-17 17:57:26 -07:00
TreeHugger Robot
27d33b157c Merge "Passing caller package name to setBluetoothTethering" into qt-qpr1-dev 2019-09-18 00:56:12 +00:00
TreeHugger Robot
795ef47130 Merge "Enter quick doze with non-wakeup alarm." into qt-qpr1-dev 2019-09-18 00:26:34 +00:00
TreeHugger Robot
fd20f775ac Merge "DO NOT MERGE Use realCallerId to check launch display for Bubbles" into qt-qpr1-dev 2019-09-18 00:21:23 +00:00
Mady Mellor
ca184aaecd Notify display is empty even if it's not the expanded bubble
onSingleTaskDisplayEmpty occurs when the activity is removed from the
activity view (e.g. app crash). When a bubble'd app crashes we want to
collapse the bubble (if expanded) & notify that it's empty so that next
time it's opened it will try to populate the activity again.

We were only doing this if the crashed app was the currently expanded
bubble, but that's not always the case.

This CL adds a method in BubbleData to clean up the display for a given
displayId & calls that in the non-expanded case.

Also adds some null pointer checks.

Test: manual - modify bubbles test app to have a crash when you click a button
             - post some bubbles
             - expand / collapse a bubble
             - crash the bubbles test app
             => see crash dialog
             - expand bubble
             => bubble should be populated
Bug: 138461119
Change-Id: I2fb226766676226980c67dc0536ed37eb43cedf1
2019-09-18 00:12:26 +00:00
Mady Mellor
5186b1311d No need to use getExpandedBubble for singleTaskDisplayDrawn/Empty callbacks
getExpandedBubble checks if the shade is expanded or not and returns
null if the shade is expanded, we don't care about that for the display
drawn callbacks.

Test: manual, have a bubble notification on lockscreen, tap it, note
      that the bubble is expanded & visible after going through lockscreen
Bug: 138461119
Change-Id: I00dff7cd3301db6a2613a947015ac0408b545202
2019-09-18 00:10:04 +00:00
Daniel Rosenberg
8c7f0100c7 Use mContext directly, and enforce via logging
We already have the context saved, so we can just use that.
Add a log statement so we can test for the existence of this patch from
a CTS test.

Test: Edited code to force expection path to be called, confirmed
      reboot happens
Bug: 138952436
Bug: 140111727

Change-Id: Iaceec82d4716837158d1233400b4a44cbf67a5e8
2019-09-17 23:54:39 +00:00
Paul Lawrence
32147f4c4e Revert "Use mContext directly"
This reverts commit dd3737611c.

Test: None, it's a revert
Bug: 138952436
Change-Id: Ib809ba017e3563c09ea35b1a9056a6a95f4bdfc2
2019-09-17 23:54:29 +00:00
Jaegeuk Kim
8975f78fff IdleMaint: run more frequently during 3AM to 4AM
This patch makes IdleMaint trigger multiple times between
3AM and 4AM, if device is idle and power is not low. This
will not trigger until next 3AM.

Bug: 128594671
Change-Id: Id6596be44ff96d39f77fb21dca52c35952f2cf7e
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2019-09-17 23:31:22 +00:00
Lucas Dupin
89ebc7c1ad Merge "Fix status bar flickering" into qt-qpr1-dev 2019-09-17 22:46:13 +00:00
Brad Stenning
1c6c190919 Merge "Adding scrim bubble to car's super_status_bar.xml" into qt-qpr1-dev 2019-09-17 22:23:57 +00:00
Winson Chung
4b15467f5f Merge "Skip updating exclusion rects unless one is set" into qt-qpr1-dev 2019-09-17 20:44:25 +00:00
Kevin Hufnagle
85bd2c62cb Merge "docs: Fixed contradictory info in IntentFilter" into qt-dev am: 1fe99017eb
am: 1e8492c744

Change-Id: Idbc73307a0c3f4a937a2a964667f01b28aa274ce
2019-09-17 12:32:20 -07:00
Kevin Hufnagle
1e8492c744 Merge "docs: Fixed contradictory info in IntentFilter" into qt-dev
am: 1fe99017eb

Change-Id: I13ba0297750b5b375f4874640b14b4955d17eeaa
2019-09-17 12:19:12 -07:00
Kevin Hufnagle
1fe99017eb Merge "docs: Fixed contradictory info in IntentFilter" into qt-dev 2019-09-17 18:54:20 +00:00
Kevin Hufnagle
b8779b82bb docs: Add condition for hiding synth. activities
If an app doesn't have a launcher activity enabled by default, a
synthesized activity isn't created for that app.

Test: make ds-docs -j32

Bug: 140968734
Change-Id: I2fe8666ee8cde479f404e43c622f03891d96c38f
2019-09-17 18:48:39 +00:00
jovanak
a090fe062a Adding scrim bubble to car's super_status_bar.xml
Bug: 140308332
Test: sys ui boots on hawk
Change-Id: I111a5eef67ebe599d65b96687643cf1949d6bfbe
(cherry picked from commit 481a104025)
2019-09-17 18:31:37 +00:00
TreeHugger Robot
10000738e4 Merge "Redraw legacy navigation bar paint onLayout" into qt-qpr1-dev 2019-09-17 16:19:23 +00:00
Lucas Dupin
7f356e28de Fix status bar flickering
The keyguard status bar would be visible momentarily while the keyguard
is fading out. Let's keep it hidden until the keyguard is gone.

Test: reach, auth, press power, look at status bar: gone
Test: reach, press power, look at status bar: gone
Test: reboot, reach, press power, look at status bar: visible
Test: reach, press power, wait for auth filure, look at status bar: visible
Test: reach, pull down, wait for auth filure, look at status bar: visible
Fixes: 140259100
Change-Id: I0aa705107e11e3ad8182ac8d5b6104c9f86754be
2019-09-17 10:17:51 -04:00
lumark
af0629a53a DO NOT MERGE Use realCallerId to check launch display for Bubbles
Since sysui is an entity that decides the App can launch Bubbles
thruogh PendingIntent, it would be make sense that using sysui's realCallerId
to check launch display.

But in RootActivityContainer#getLaunchStack will end up to check launch
display with PendingIntent creater's pid (-1) & uid, which won't pass
the check in the first place.

Add realCallerPid / realCallerUid in
RootActivityContainer#getLaunchStack for ActivityStarter to input
realCallerId to fix above scenario.

Fix: 138753287
Test: atest RootActivityContainerTests#testGetLaunchStackWithRealCallerId
Test: manual as below test steps:
    1) Launch any app
    2) Pop-up a Bubbles
    3) In geusture nav mode, swping up app's activity to close and then press
    Bubble icon to launch Bubble's activity quickly.
    4) Expected app's activity should not shown.

Change-Id: Id3447f6a02f007b66932c59f6f9486688b1e8bad
2019-09-17 16:51:33 +08:00
TreeHugger Robot
e569faf5fb Merge "GestureNav: Fix bug in exlcusion limit device config" into qt-qpr1-dev 2019-09-17 08:27:13 +00:00
Suprabh Shukla
873e19f63f DO NOT MERGE revoke certain app-ops on suspend
Revoking an apps authorizations to use camera and record or play audio
while suspended. Appops watchers will also be notified of this change to
re-evaluate privileges at the time of suspension.

Test: atest FrameworksServicesTests:SuspendPackagesTest
atest GtsSuspendAppsTestCases

Bug: 138636979
Change-Id: Ie95555856afdd56728125f7e60b6a78cf9fc0e58
Merged-In: Ic5fb1807deceabfd956b666fa76f8bcc94020ac3
2019-09-16 17:12:40 -07:00
Suprabh Shukla
ed5edb77dc DO NOT MERGE revoke certain app-ops on suspend
Revoking an apps authorizations to use camera and record or play audio
while suspended. Appops watchers will also be notified of this change to
re-evaluate privileges at the time of suspension.

Test: atest FrameworksServicesTests:SuspendPackagesTest

Bug: 138636979
Change-Id: Ie95555856afdd56728125f7e60b6a78cf9fc0e58
Merged-In: Ie95555856afdd56728125f7e60b6a78cf9fc0e58
Merged-In: Ic5fb1807deceabfd956b666fa76f8bcc94020ac3
2019-09-16 17:09:16 -07:00
Mehdi Alizadeh
30e495d0c4 Merge changes I41e08b86,I7760f37d into qt-qpr1-dev
* changes:
  Use ShortcutInfo#rank to order Sharing Shortcuts in ShareSheet
  Adds tests for AppPrediction service availability check
2019-09-16 23:15:22 +00:00
Seigo Nonaka
7c38cafc22 Do not compute outside given range in TextLine
This is second attempt of I646851973b3816bf9ba32dfe26748c0345a5a081
which breaks various layout test on application.
The empty string must be also handled by the TextLine since it
retrieves the default line height from the empty string.

Bug: 140632678
Test: StaticLayoutTest
Test: Manually done
Change-Id: I7089ed9b711dddd7de2b27c9c2fa0fb4cb53a735
2019-09-16 16:12:51 -07:00
Winson Chung
687bcb7f33 Skip updating exclusion rects unless one is set
Bug: 140775753
Bug: 140701977
Bug: 140758369
Test: atest google/perf/jank/SystemUI/UbSystemUIJankTests:android.platform.systemui.tests.jank.SystemUiJankTests#testQuickSettingsPull -v
Change-Id: I824ca918d141eb88aa99b1e90adafe64ca3eb672
2019-09-16 22:41:45 +00:00
Mady Mellor
fd48588768 Merge "qt-r1-bubbles-dev @ build 5835883" into qt-qpr1-dev 2019-09-16 21:55:51 +00:00
Vinit Nayak
0aa0f133b7 Redraw legacy navigation bar paint onLayout
Navigation bar background wasn't being redrawn
when using legacy navigation bar.

Fixes: 140096278
Test: Open Sheets app, turn landscape, select
a cell, press the "Fx" button on buttom left,
turn portrait and observe no black bar.
Open Sheets app, turn landscape, open recents
and select sheets icon and go into split screen,
choose any other app, click on cell, press "Fx",
turn portrait, observe no black bar.

Change-Id: Ibfe1abdba87a0d66c68478ee206b992c933cd9ad
(cherry picked from commit 7ab1fb8f37)
2019-09-16 21:04:58 +00:00
Da Xing
ecb568154a Crash app on foreground service notification error.
On any notification error, the NMS silently cancels the notification,
including foreground service notifications. Thus, an app could pass in a
garbage notification deliberately and start a foreground service silently.

This patch resolved this issue by judging the notification's flag, and if
it is a foreground notification, still crash the app as previous platforms,
and if it is a normal notification, don't crash the app.

Background: In 3ad4cdd1, which was merged into Android 9 release, the crash
behaviour is removed. But it is an important rule that foreground services
guaranteed to show an ongoing notification.

Test: Run the sample apk provided in the issue, it's main thread received
 a RemoteServiceException: Bad notification posted from package...
as intended behaviour.
Fixes: 118612296

Merged-In: I36ea0137ca6978ff401f64dccacb6f2edcadd7db
Change-Id: I36ea0137ca6978ff401f64dccacb6f2edcadd7db
Signed-off-by: Da Xing <qiyueliuhuo813@gmail.com>
(cherry picked from commit b740ed72b9)
2019-09-16 20:30:07 +00:00
Kevin Hufnagle
e0d4d96cc8 docs: Modernized AccessibilityNodeProvider example
Uses a delegate and more realistic method contents. Also added
language switcher for Kotlin-based and Java-based code.

Test: make ds-docs -j32

Bug: 138849874
Change-Id: Id31cf944f4adab2f09cf5004d68434b445da6eeb
2019-09-16 19:23:33 +00:00