Commit Graph

11222 Commits

Author SHA1 Message Date
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
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
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
TreeHugger Robot
2631fb58b6 Merge "Ensure Contrast: Address API feedback" into qt-dev 2019-04-18 11:17:43 +00:00
Paul Scovanner
956bbb7e5d Revert "Pretend to be having the original background"
This reverts commit 1ab06de89f.
Bug: b/130586696

Reason for revert: b/130586696 This change causes a major breakage in Maps and blocks droidfood.

Change-Id: I50cde4865f48825b82f27087b8cac6e6527d6d95
2019-04-17 21:47:46 +00:00
Adrian Roos
8c7ca4f5c2 Ensure Contrast: Address API feedback
Fixes: 130647853
Test: make checkapi
Test: atest EnsureBarContrastTest NavigationBarColorTest
Change-Id: Iafbdce8476134df56ea5d15155391b10afc9ce94
2019-04-17 21:36:04 +02:00
TreeHugger Robot
341ea09831 Merge "Gesture exclusion rects for Window" into qt-dev 2019-04-17 03:18:55 +00:00
TreeHugger Robot
cb86e128cf Merge "Sharesheet - Merge EXTRA_INITIAL_INTENTS + Ranked apps" into qt-dev 2019-04-16 21:53:27 +00:00
Adam Powell
5a40b71cd9 Gesture exclusion rects for Window
Property methods to get/set gesture exclusion rects for a window.
This is useful for games or other frameworks that use Window#takeSurface
and do not have a view hierarchy, leaving the associated View methods
unavailable.

Bug: 130572780
Test: cts via "atest SystemGestureExclusionRectsTest"
Change-Id: I2704aef1d1950158fcabf7c91413bedee08b8971
2019-04-16 14:38:55 -07:00
Chalard Jean
e7ef0a61f2 Merge "Move TrafficStats tags for the network stack constants" into qt-dev 2019-04-16 20:30:07 +00:00
Matt Pietal
dadc0d1541 Sharesheet - Merge EXTRA_INITIAL_INTENTS + Ranked apps
Organize app-supplied EXTRA_INITIAL_INTENTS plus the highest ranked
apps into a single row (4 in portrait, 8 landscape)

Bug: 130429746
Test: Visual inspection
Change-Id: Icd0755d25b2801b42ea2c3a8c984e9e1f0c7987e
2019-04-16 15:15:22 -04:00
TreeHugger Robot
5851d67727 Merge "Sharesheet - Prevent duplicate direct share targets" into qt-dev 2019-04-16 17:05:03 +00:00
Tarandeep Singh
77d354efa1 Merge "Allow MSIME to set inactive when window loses focus." into qt-dev 2019-04-16 07:37:06 +00:00
Mehdi Alizadeh
08c5083da3 Add new constructors for mandatory fields in AppTarget.Builder
Test: it builds
Test: atest AppPredictionServiceTest
Bug: 129901111
Change-Id: Ifacf5b86d5f436b02191af58541a403198840f18
2019-04-15 14:44:56 -07:00
TreeHugger Robot
bd8c161d8d Merge "Add AppPredictionServiceExists check." into qt-dev 2019-04-15 19:49:19 +00:00
Chalard Jean
6a76b7e2e4 Move TrafficStats tags for the network stack constants
As per API council feedback, these constants should live in
a place that is private to the network stack, only with a
range defined in system API.

Bug: 129433383
Test: m
Change-Id: I84a90f84a9af6fef4667ee4d512ebd0413222086
(cherry picked from commit 79a6330650ca04bd7a08afbd63f8016a3b30bc72)
2019-04-16 00:41:54 +09:00
Jeff Sharkey
b9c822d6b7 Merge "Renaming or moving files should initiate scan." into qt-dev 2019-04-15 03:27:32 +00:00
Jeff Sharkey
db73a7da26 Renaming or moving files should initiate scan.
These FileSystemProvider operations should initiate a MediaStore scan
to ensure that it presents an updated view of the filesystem.

Bug: 129901992, 130356514
Test: manual
Change-Id: I612481282cf739b88a1637b147fb4d4555fb5b8f
2019-04-14 12:23:37 -06:00
TreeHugger Robot
54bdb96c4e Merge "Sharesheet - force DS icons to be round" into qt-dev 2019-04-13 01:01:22 +00:00
George Hodulik
145b3a5129 Add AppPredictionServiceExists check.
When the flag is set, Chooser will check if APS exists and use it for
direct share ranking. Otherwise, Chooser defaults to just querying ShortcutManager
itself. ResolverActivity will register an appPredictor with ui surface
"resolver" and ChooserActivity will use ui surface "share".

Later, we will add a similar behavior to use the AppPredictor to
sort actvities by default (if it exists), otherwise use the old
API ResolverRankerService.

Test: atest frameworks/base/core/tests/coretests/src/com/android/internal/app
Test: Added parameterized tests for case when there is no AppPredictionService.
Bug:129014961
Change-Id: I6109aa8f2436cf0b3c3b4fbc36e571b2b00fe45c
2019-04-12 16:47:14 -07:00
Mike Digman
6f31c53606 Sharesheet - force DS icons to be round
DS icons cannot be provided as AdaptiveIcons. Most today are
provided as a circular bitmap but there is no shape guarantee.
To provide visual consistency, scale and mask all DS icons to a
circle. Currently, all DS icons are shaped making them hard to
see.

Fixes: 129980123
Test: manual images large and small, rectangular, circular, etc
Change-Id: I011b35c1334affb1224f62beafd3f72026198054
2019-04-12 16:29:16 -07:00
Christian Wailes
b9c3673cb2 Merge "Fix FD leak in the Zygote." into qt-dev 2019-04-12 23:22:43 +00:00
Alison Cichowlas
67ad0cabb2 Merge "Use the correct targets-per-row count for Landscape." into qt-dev 2019-04-12 19:58:37 +00:00
Matt Pietal
9d50143863 Sharesheet - Prevent duplicate direct share targets
Duplicate requests can originate with packageChanged events and when
an activity onRestart() is issued. Check for duplicates and do not
insert them. Also make sure there is adequate space per row even when
display size is at max setting.

Bug: 129980100
Test: ChooserActivityTest && visual inspection
Change-Id: Ica8afe5d20b8d3ae11be90206b23aaebbb03a2c1
2019-04-12 15:17:12 -04:00
Eugene Susla
06f0519a01 Make RemoteService propagate Context#bindService failure to PendingRequests
...and fix the attached bug which was caused by infinite wait due to lack
of said signal

Fixes: 129549258
Bug: 126266412
Test: - atest CtsContentCaptureServiceTestCases
- Ensure b/129549258#comment5 no longer reproduces
Change-Id: Id434ce268ca4ae6aa09140a3e17b6d8f476f3d9f
2019-04-12 16:19:08 +00:00
Jorim Jaggi
757cbfead3 Merge "Pretend to be having the original background" into qt-dev 2019-04-12 14:19:51 +00:00
TreeHugger Robot
dd0e027ca5 Merge "Sharesheet - Align spacing with spec" into qt-dev 2019-04-12 13:01:47 +00:00
Adrian Roos
76d2f52e3f Merge "System Bars: API to ensure contrast when app requested transparent bar" into qt-dev 2019-04-12 09:43:57 +00:00
Alison Cichowlas
13314611ff Use the correct targets-per-row count for Landscape.
Bug: 126566208
Test: Manual verification, both orientations
Change-Id: I971a033628a56c41c7c926d519106114c66bce80
2019-04-11 19:21:35 -04:00
Ying Zheng
a4b089bd10 Merge "Revert "Flip default value of headless user 0 flag."" into qt-dev 2019-04-11 23:08:01 +00:00
Tarandeep Singh
e1921a7b4d Allow MSIME to set inactive when window loses focus.
MSIME doesn't work when existing InputConnection is restored. The fix is
to allow MSIME to activate connection when window gains focus and set
inactive when window loses focus. This mimics single session IME.

Bug: 128751901
Test: Manually tested using steps in bug.
Change-Id: I22cef6c1dacb0ca402840da94a2bf02b989da447
2019-04-11 15:55:28 -07:00
Philip P. Moltmann
08ccf9bba4 Merge "Handle onBindingDied in AbstractRemoteService" into qt-dev 2019-04-11 22:12:49 +00:00
Matt Pietal
ab986b5fcf Sharesheet - Align spacing with spec
Various fixes including: correct fonts, colors, drag handle size, as
well as allowing more space for chooser grid items and text

Bug: 129980360
Test: Visual inspection
Change-Id: I10f78ef9c12b3444360e4ab50f7bd5900f2967f3
2019-04-11 12:36:36 -04:00
Ying Zheng
1deedca952 Revert "Flip default value of headless user 0 flag."
This reverts commit 4214a0933d.

Reason for revert: need to update per build

Bug: 130310171
Change-Id: I9ff55e9de4ec3ad64451ef41f34cbfe9b793a5e9
2019-04-11 16:16:46 +00:00
Matt Pietal
43e9ec2354 Merge "Sharesheet - 4->8 direct share expansion fix" into qt-dev 2019-04-11 15:30:34 +00:00