Commit Graph

11254 Commits

Author SHA1 Message Date
Tarandeep Singh
e439dec155 Propagate light nav bar info
When SystemUI (notification UI) is pulled down, the windows behind are
dimmed, including navigation bar. At this point of time, navigationbar
color could be controlled by IME and system overrides it.
With this fix, we check if IME is already controlling navbar color.

Change-Id: I9f25860a5b7858f1d17d2921816910a938c656bb
Fix: 122439339
Test: Manually verified using steps in bug.
2019-04-30 14:41:23 -07:00
Ying Zheng
7f39f77d6c Merge "Rename headless system user flag to under 32 chars." into qt-dev 2019-04-29 21:07:56 +00:00
Ying Zheng
a71afb26d3 Rename headless system user flag to under 32 chars.
Test: build
Bug: 131601785
Change-Id: I7199b444e90063fe6c29c7c7be42197e820c59da
2019-04-29 10:11:16 -07:00
Svet Ganov
3b6be08c3d Address API council feedback
Make the get actions API async. Also fix a potenrial
memory leak when exchaning callbacks.

Test: atest CtsVoiceInteractionTestCases

bug:129705716

Change-Id: I91f1beb3dc7a395c6c6307ca4601fe7b7097f6e3
2019-04-28 23:01:30 -07:00
TreeHugger Robot
0fcd8ceef8 Merge "Fix app crash while running in second display" into qt-dev 2019-04-26 07:30:51 +00:00
TreeHugger Robot
862a21c977 Merge "Zygote: add a way to preload Vulkan driver" into qt-dev 2019-04-26 05:20:34 +00:00
TreeHugger Robot
2f956b53df Merge "Sharesheet - Modify header scrolling behavior" into qt-dev 2019-04-25 21:49:04 +00:00
Yiwei Zhang
4bf3d9eda4 Zygote: add a way to preload Vulkan driver
Since HWUI render pipeline has both GL and Vulkan backends now, we'd
like to preload either GL or Vulkan driver based upon HWUI's choice on
the render backend.

1) Keep using ro.zygote.disable_gl_preload property to disable Vulkan
driver preloading if HWUI's render pipeline uses Vulkan backend.
Properly rename the corresponding APIs for driver preloading.

2) Add a path to preload Vulkan driver based on HWUI's render backend.

Bug: 131249898
Test: build, flash and boot.
Test: verified with set USE_VULKAN=true
Test: verified with setprop debug.hwui.renderer skiagl/skiavk
Change-Id: Ie0bf5d18edcf907c75a25ac3249e2620ec21b63c
2019-04-25 14:29:34 -07:00
Matt Pietal
c6d3ac2385 Sharesheet - Modify header scrolling behavior
To align with UX, scroll the listview before the header when
collapsing the sharesheet to its minified state, on both flings and
drags. Fix an issue with the expansion area, whereby state is only
updated if view positions are actually updated.

Bug: 129979914
Test: Visual inspection
Change-Id: I2e32a1a3288a21bcd3ce07819f77760f10d5d929
2019-04-25 14:42:19 -04:00
sanryhuang
2ed879f213 Fix app crash while running in second display
Launch DocumentsUI at second display,then crash happened after
pressing right button of mouse to trigger conext menu.

Create a new DecorContext instance for external display.

Bug: b/117215434
Test: atest PhoneWindowTest, DecorContextTest and manual test
Change-Id: I2f1dc1ac3721a20a7a49cfcde97fb168fcbfcc56
2019-04-25 17:19:24 +08:00
Svetoslav Ganov
5a6f9dc608 Merge "[DO NOT MERGE] Adding API for defining and invoking DirectActions" into qt-dev 2019-04-25 08:45:49 +00:00
Sunny Goyal
d40c345536 [DO NOT MERGE] Adding API for defining and invoking DirectActions
DirectActions are abstract actions defined by an Activtiy. The
actual definition of these actions will be available through
the support lib.

This API provides a secure channel for system or assistant to
interact with a running app using these Actions.

Test: atest CtsVoiceInteractionTestCases
Test: added android.voiceinteraction.cts.DirectActionsTest

Bug: 129705716

Change-Id: I0ce568e0d8f41e0fe46306052016a74c7b394efa
2019-04-25 00:06:02 -07:00
Kevin Chyn
d9919f2750 Merge "Do not dismiss BiometricPrompt when "soft" errors are received" into qt-dev 2019-04-25 03:20:30 +00:00
TreeHugger Robot
b6e9673bd4 Merge "Sharesheet - add label loading placeholder" into qt-dev 2019-04-24 22:59:28 +00:00
Christian Wailes
88ee294504 Merge "Load the default graphics driver in USAPs." into qt-dev 2019-04-24 21:18:14 +00:00
Kevin Chyn
e674e85497 Do not dismiss BiometricPrompt when "soft" errors are received
Some errors such as ERROR_TIMEOUT should not caues the BiometricPrompt
dialog to be dismissed. Updated plumbing to allow
onBiometricAuthenticated to pass a string indicating the failure reason

Fixes: 131240917

Test: BiometricPromptDemo
Change-Id: I63a6f1138a24fbc3736184efefc620dd5bb640dd
2019-04-24 12:44:35 -07:00
Susi Kharraz-Post
131a7fe872 Merge "Restructure logging for selection of share targets" into qt-dev 2019-04-24 18:29:01 +00:00
Chris Wailes
35fdbc570b Load the default graphics driver in USAPs.
This patch causes unspecialized app processes to load the OpenGL driver
after they are forked.  The ZygoteProcess code will then take an
application's driver preference into account when selecting how to
launch it.

Test: m & boot & launch & inspect traces for driver loading
Bug: 130029351
Change-Id: If6fa02f9c387596162e75a685b04208b45a5c86b
Merged-In: If6fa02f9c387596162e75a685b04208b45a5c86b
(cherry picked from commit 301a1c46da)
2019-04-24 17:43:15 +00:00
Mike Digman
bd7e0dfc54 Sharesheet - add label loading placeholder
When loading DS targets we show an animated icon, also want to
show a label placeholder.

Fixes: 129979593
Test: manual, visual
Change-Id: I2f8fbbad552dd412fd5aed3dfad9ac2a5abed0b0
2019-04-24 08:27:10 -07:00
TreeHugger Robot
c35533726d Merge "Sharesheet - Scrolling UI adjustments" into qt-dev 2019-04-24 01:56:52 +00:00
TreeHugger Robot
b8c3309a64 Merge "Sharesheet - update direct share loading animation" into qt-dev 2019-04-23 23:48:41 +00:00
Mady Mellor
aebf984d90 Merge "Let NoMan know when something is no longer a bubble" into qt-dev 2019-04-23 21:07:05 +00:00
TreeHugger Robot
aabebff4b8 Merge "Sharesheet - make work profile badges render" into qt-dev 2019-04-23 19:20:56 +00:00
Susi Kharraz-Post
4bcca528e3 Restructure logging for selection of share targets
After discussions with Matt restructuring the logging so each category
corresponds to one of the fields in the new sharesheet and add a field
that indicates the number of caller supplied share targets.
Also fixing a bug that resulted in double logging.

Bug: 131170860
Test: Manual testing with adb logcat
Change-Id: I75e69f7dec2d6634fca7d55321298d9d8acf4382
2019-04-23 15:07:10 -04:00
Mady Mellor
a54e9fab92 Let NoMan know when something is no longer a bubble
This is needed for some of the notification group summary stuff to work.

More importantly, this is needed so that we can properly report to apps
if their notification is bubbled or not, e.g. if the user dismisses the
bubble & the notification is in the shade, that shouldn't be reported as
'FLAG_BUBBLE' as that notification is not actually being shown as a bubble.

* Adds onBubbleNotificationChanged to NotificationDelegate to pipe through
  changes in bubble state, currently we only ever change it to 'false' but
  this CL includes ability to flip it to 'true' (and also checks if the
  notif should actually be able to bubble)
* Factors code that indicates something is approved to bubble into own
  method
* Adds way to set BubbleMetadata on a notification (hidden !!)

Bug: 130250809
Test: atest NotificationManagerServiceTest
Change-Id: I8df4cc1231ed5d078ce4d50a70d2631f82fd2306
2019-04-23 11:22:00 -07:00
Matt Pietal
b1d629dc71 Sharesheet - Scrolling UI adjustments
Add elevation on scroll for 'scroll under' effect. Remove scrollbars.

Bug: 129979914
Test: Visual inspection
Change-Id: Ia2fd19fc2fd2f3f2e966991e8a907f25c6925df9
2019-04-23 12:15:41 -04:00
Blake Kragten
25b06f04d4 Merge "Update Rail Data Collection Frequency" into qt-dev 2019-04-23 14:26:48 +00:00
Blake Kragten
f68fa9e364 Update Rail Data Collection Frequency
Fixed the frequency of the rail updates by updating the rails when
either the wifi or radio activity info is updated.

Test: Compiled onto phone, ran wifi and modem test cases and collected
bug report. Viewed a more accurate frequency of rail energy data.

Bug: 130174319

Change-Id: I4d79e58dfcc90e1c30253f524c85f26a8299f8d6
2019-04-22 16:37:20 -07:00
TreeHugger Robot
845d5ee587 Merge "Fixed content capture whitelist for specific activities." into qt-dev 2019-04-22 22:34:09 +00:00
Mike Digman
b2e5e71840 Sharesheet - make work profile badges render
Iconloaderlib has launcher specific logic for pulling and
rendering work profile badges. Alter to work properly with
Sharesheet. Currently, work profile badges aren't shown on top
of app targets.

Fixes: 126568207
Test: manual, visual inspection
Change-Id: If247d0077e8d1fd6256ff6aceb155e245a031001
2019-04-22 13:05:05 -07:00
TreeHugger Robot
5c5e22e910 Merge "Fix UID tracking in ProcessCpuTracker." into qt-dev 2019-04-22 18:35:27 +00:00
TreeHugger Robot
b2dfe6129f Merge "Sharesheet - Fix wrong metric value being recorded" into qt-dev 2019-04-21 00:27:23 +00:00
TreeHugger Robot
8daf5927ff Merge "Block clicks on smart actions and replies just after creation/update." into qt-dev 2019-04-20 22:15:21 +00:00
Felipe Leme
cbf7f26baa Fixed content capture whitelist for specific activities.
Test: manual verification (it cannot be fully verified using the current CTS setup)
Test: atest CtsContentCaptureServiceTestCases:android.contentcaptureservice.cts.WhitelistTest
Test: atest FrameworksCoreTests:android.content.ContentCaptureOptionsTest
Test: atest CtsContentCaptureServiceTestCases # sanity check
Test: m update-api

Fixes: 130573023
Merged-In: I2c76a01bd98c4154c4c59099f1368232d2dba80d
Change-Id: I2c76a01bd98c4154c4c59099f1368232d2dba80d
2019-04-19 20:25:45 -07:00
Lucas Dupin
e4b593b8e3 Merge "Let there be color" into qt-dev 2019-04-20 01:22:18 +00:00
zhouwenjie
56856cea47 Fix UID tracking in ProcessCpuTracker.
Many processes are incorrectly listed under UID 0 (e.g. surfaceflinger)
because some "/proc/$PID/stat" files are with user "root".
The user of the folder "/proc/$PID/" is the correct one to use.

Bug: 119218763
Test: adb shell dumpsys batterystats -c | grep surfaceflinger
Change-Id: Ibfbe9b04c884bc9bde383629bcbba73f48ed34ee
(cherry picked from commit 7ead3ee46f)
2019-04-20 00:56:11 +00:00
Lucas Dupin
7367eca784 Let there be color
Use notification colors even on night mode (enforcing contrast of
course)

Test: pull down shade on LS and launcher
Fixes: 130756560
Change-Id: I3f3f6e426163e316906692ef8b9c416ca94242ee
2019-04-19 15:38:42 -07:00
Mike Digman
ac1d88c07a Sharesheet - update direct share loading animation
Uses gradient animation to reinforce that targets are loading
in both dark and light mode. Updates resolver placeholder colors
to match.

Fixes: 129979593
Test: manual
Change-Id: Ifb869256d9c1c104d9529c056a8bad8fb6f10c52
2019-04-19 14:52:43 -07:00
TreeHugger Robot
d4cced9ab6 Merge "Sharesheet - Move work profile text into list" into qt-dev 2019-04-19 20:12:27 +00:00
Matt Pietal
9a6b23d685 Sharesheet - Fix wrong metric value being recorded
When apps are sending EXTRA_CHOOSER_TARGETS, the wrong value is
getting recorded for metrics tracking. Use the correct offset.

Bug: 130613626
Test: Retest share through Imgur app
Change-Id: I0bccbfb064796f547b2e7b474f5aa06993ac3920
2019-04-19 15:04:17 -04:00
TreeHugger Robot
f2087397ef Merge "Propogate per-display IME status to SysUI" into qt-dev 2019-04-19 18:31:46 +00:00
Susi Kharraz-Post
fb3c3679c1 Merge "Add logging field for direct share selection" into qt-dev 2019-04-19 17:47:55 +00:00
Sudheer Shanka
26bcc0e5ae Merge "Use MediaStore.scanFile instead of manually inserting to MediaProvider." into qt-dev 2019-04-19 15:57:38 +00:00
Matt Pietal
74c6ed0ee5 Sharesheet - Move work profile text into list
Move the profile switching logic into the scrollable list area. Fix
visual artifact due to reusing drawable.

Bug: 130353935
Test: atest ChooserActivityTest + visual inspection
Change-Id: I0666b0e61ea696017c2da4854e407d502b7b556c
2019-04-19 11:31:43 -04:00
Susi Kharraz-Post
8c14f77cb2 Add logging field for direct share selection
To help evaluate the new ranking algo we want to know if the package for
a direct share was also offered as one of the ranked apps.
Logging the position if it is part of the top apps, otherwise logging
-1.
Also added a test case I missed for HashedStringCache and removing the
test for hashing resulting in the same hashed string when called twice
from the ChooserActivityTest since we now cover that in the
HashedStringCacheTest.

Bug: 130658734
Test: Added more test cases in ChooserActivityTest and did manual
testing

Change-Id: I0e34a6bf64114d94197f62b8219652c33c03a410
2019-04-19 14:44:09 +00:00
lumark
7570cac60e Propogate per-display IME status to SysUI
CL [1] introduced SystemUI to support updating IME window status per
display. (i.e. IStatusBarService#setImeWindowStatus left TODO item to
add displayId parameter to select the target display.)

For IMMS, we applied this API base on current token's displayId, and refined
the code flow in Sysui to reset IME window state for non-target display's
NavBar when single IME switch to another display case.

And make sure some cases in IMMS should reset IME window status:
- When current method unbind.
- When current top window focus display is not same as current token's display.
  (That means the input session may connected but IME window not
  yet attached. Note that it doesn't include external display without
  system decoration and show IME window on default display case since it
  is intentional behavior and we still need to update status for this
  case.)

Also added testSetImeWindowStatusWhenImeSwitchOnDisplay in
NavigationBarFragmentTest to enhance the ability of verifying external
navigation bar.

[1]: 24e7a9fdb5

Bug: 127309955
Bug: 117478341
Test: atest NavigationBarFragmentTest
Test: manual as below steps:
      - Pre-condition:
          1. Enable desktop mode.
          2. Create simulated display.
      - Use case 1):
          1. Launch an activity with input field on simulated display.
          2. Bring up the IME there, expect back key icon on external
             NavBar will changed when IME bring up.
          3. Tap on primary display or launch an activity there.
	     (or pressing home key)
          4. Expect IME will hide & back key icon on external NavBar will
             set back.
      - Use case 2):
          1. Launch activity with input field on default display.
          2. Tapping EditText in activity on default display.
	  3. Expect IME will bring up here and back key icon on default
	     display will changed when IME bring up.
          4. Launch activity without input field in external display.
	     (i.e. clock app)
          5. Expect Both Default & external display's nav bar back key icon
	     will set back.

Change-Id: Ia414b8aea631e295cccd6f6da44d04bad16545c7
2019-04-19 13:33:21 +08:00
George Hodulik
c681ce43f9 Add AppPredictionServiceResolverComparator
This will sort the share activities based on the APS sorting.
We add a constructor for ResolverListController which takes an
AbstractResolverComparator, so that ChooserActivity may pass in
the APS comparator if it is enabled and available.

Test: Manually tested on APS sorter that did no sorting.
Test: atest frameworks/base/core/tests/coretests/src/com/android/internal/app
Bug: 129014961
Change-Id: I542254ffb0debad45bcd8d5073cc3f3e1bafc616
Signed-off-by: George Hodulik <georgehodulik@google.com>
2019-04-19 02:10:16 +00:00
Sudheer Shanka
74322a0e3b Use MediaStore.scanFile instead of manually inserting to MediaProvider.
Bug: 126378047
Test: manual
Change-Id: Ided7c2fa861055d41581b15bd9d0678a29bcb825
2019-04-18 18:28:43 -07:00
TreeHugger Robot
7fdbe22475 Merge "Make RemoteService propagate Context#bindService failure to PendingRequests" into qt-dev 2019-04-18 23:07:32 +00:00
Gustav Sennton
8a52dc3af4 Block clicks on smart actions and replies just after creation/update.
To avoid accidental clicks on smart actions and replies we here block
clicks on those buttons just after they are created. We block clicks
on those buttons when a notification is updated - but only if the
buttons are new, or different from previous buttons shown in the
notification. I.e. if the notification is updated but the smart
suggestion buttons stay the same we don't block clicks on them.

Bug: 128683184
Test: manually ensure clicks are blocked within the initialization
delay (for new / changed buttons), and ensure the delay changes
when calling
adb shell device_config put systemui ssin_onclick_init_delay X
where X is the delay in ms.
Test: SmartReplyConstantsTest, SmartReplyViewTest
Change-Id: I9a44eb6ade6579a42e35b36cce4bd5863332c60e
2019-04-18 15:31:32 +01:00