Commit Graph

11155 Commits

Author SHA1 Message Date
Jorim Jaggi
44787038c2 Merge "Check for null bg insets during initialization" into qt-dev 2019-05-09 16:20:28 +00:00
Jorim Jaggi
89d1bdedf7 Merge "Only consume status bar if FULLSCREEN is set" into qt-dev 2019-05-09 14:34:19 +00:00
Jorim Jaggi
d798fd3f99 Check for null bg insets during initialization
Test: Turn on Ambient sensing, toggle ambient sensing in settings
Fixes: 132264167
Change-Id: I7f19a91a7d78f8e6ae730871aebb6f7bfb30a0c5
2019-05-09 16:06:02 +02:00
Jorim Jaggi
01d60d0907 Only consume status bar if FULLSCREEN is set
We only need to consume if the app may not expect to have insets,
meaning that they set fullscreen but it was denied.

Test: WindowInsetsPolicy
Fixes: 129272201
Change-Id: I6392f2bcb9a510db4c60bc4f071070b45f143dcb
2019-05-08 22:58:07 +02:00
TreeHugger Robot
b6e2ab9db9 Merge "Sharesheet - Address misleading logs" into qt-dev 2019-05-08 17:59:33 +00:00
Jorim Jaggi
f9363aadeb Merge "Pretend to be having the original background" into qt-dev 2019-05-08 12:21:53 +00:00
TreeHugger Robot
aae9d6c77a Merge "Do not hide caption for hiding navigation bar flag" into qt-dev 2019-05-07 22:23:33 +00:00
Jorim Jaggi
24cf50f00c Pretend to be having the original background
...as otherwise setWindowBackground(bg) => bg == dv.getBackground
property is violated.

Also ensure the setBackground updates mOriginalBackground as well,
such that getBackground doesn't return a stale value.

Test: WindowTest
Test: Open maps
Bug: 130586696
Fixes: 130170137
Change-Id: I22b74ca6d4fd18600645b5d24814a90b8528745c
2019-05-07 17:17:48 +02:00
Matt Pietal
62532e55d6 Sharesheet - Address misleading logs
Log more informative warnings to assist developers in adding an
optional preview section.

Bug: 132152987
Test: Manual
Change-Id: I4a97675315871317591d627cccc79da3f7e89d46
2019-05-07 10:02:47 -04:00
Mehdi Alizadeh
97fb3ed8bc Collects metrics for the new Sharing Shortcuts api
Bug: 122904954
Test: atest com.android.server.pm.ShortcutManagerTest1 \
            com.android.server.pm.ShortcutManagerTest2 \
            com.android.server.pm.ShortcutManagerTest3 \
            com.android.server.pm.ShortcutManagerTest4 \
            com.android.server.pm.ShortcutManagerTest5 \
            com.android.server.pm.ShortcutManagerTest6 \
            com.android.server.pm.ShortcutManagerTest7 \
            com.android.server.pm.ShortcutManagerTest8 \
            com.android.server.pm.ShortcutManagerTest9 \
            com.android.server.pm.ShortcutManagerTest10
Change-Id: Ifafcaa789814618846d41431d6190e4d79e871e5
2019-05-06 12:35:03 -07:00
TreeHugger Robot
f3c58fd242 Merge "Sharesheet - make loading placeholders unclickable" into qt-dev 2019-05-06 12:05:22 +00:00
Mike Digman
4b83c21d99 Sharesheet - make loading placeholders unclickable
The AVD used to animate loading ds targets is build using a
square with a ds shaped cutout. Ripples on touch that go below
the AVD show a square bounding box. This looks awful, prevent
ripples as clicking the placeholder does nothing anyway.

Fixes: 129979593
Test: visual inspection
Change-Id: Id8734f3d92bd104097a60a6aa411be71db3e4efe
2019-05-03 17:05:20 -07:00
TreeHugger Robot
23d047ab15 Merge "Reenable CursorAnchorInfo API with ActivityView" into qt-dev 2019-05-03 17:07:35 +00:00
TreeHugger Robot
3f713de610 Merge "Sharesheet - Fix expansion area min size" into qt-dev 2019-05-03 17:00:22 +00:00
Anton Hansson
3415499ae0 Merge "Make DocumentCursor opt-out of having a self-observer" into qt-dev 2019-05-03 15:57:38 +00:00
Anton Hansson
d79473f881 Make DocumentCursor opt-out of having a self-observer
A content observer is registered by default when setting a notification
uri for a Cursor, in order to make the Cursor correctly notify listeners
of all changes to its URI, not just the ones made locally.

This is not required for DocumentCursor, because it already has a
separate mechanism for watching for all changes made to the data backed
by the cursor.

This avoids DocumentProviders having to call into system_server to
answer queries about directory trees, which can otherwise add up to
significant amounts of time for large directory trees. In my tests,
this improves the performance of iterating through a directory by
roughly 20%. This number is likely to be higher on non-test devices,
that probably see more binder contention, and will also depend on the
structure of the file tree.

Bug: 130276310
Test: SAF test app
Change-Id: I386363b0608c420e9847caf6fbf6686641c955e2
2019-05-03 13:33:57 +01:00
Matt Pietal
394ebd00ed Sharesheet - Fix expansion area min size
Need to make sure we reserve enough height for the 4->8 direct share
expansion to work. Fix the calculation for offseting the sharesheet.

Bug: 129980100
Test: Visual inspection
Change-Id: Iaef245b9b8e2ed1dbacf01107dbafb6bf5016483
2019-05-03 07:55:34 -04:00
Richard Uhler
07a9e9f9f9 Merge "Ensure race between rollback and roll forward is properly handled" into qt-dev 2019-05-03 08:09:17 +00:00
TreeHugger Robot
d9a22cb829 Merge "Sharesheet - run APS sortTargets in newSingleThreadExecutor" into qt-dev 2019-05-02 21:29:24 +00:00
TreeHugger Robot
ba3a49b0b6 Merge "Enable using prediction manager for sharesheet." into qt-dev 2019-05-02 21:29:24 +00:00
George Hodulik
ccb0cbccfd Sharesheet - run APS sortTargets in newSingleThreadExecutor
Also add some debugging logs.

Bug:129014961
Test:Manually tested.
Test: atest frameworks/base/core/tests/coretests/src/com/android/internal/app
Change-Id: Id05cecf31f3c0afe5fd45911e78203e4ce4bd999
2019-05-02 12:23:44 -07:00
Matt Pietal
e54dcc2eea Sharesheet - Add logic to when 4->8 expansion occurs
Should help reduce the amount of reshuffling due to older
pull-style direct share targets.

Bug: 129980100
Test: Visual inspection
Change-Id: I6bd2dd3da2b4c39ee79edaf92da89f1f79b12f75
2019-05-02 14:24:25 -04:00
Andrei-Valentin Onea
7739542d2d Merge "DO NOT MERGE Fix setting hidden api usage log sample rate" into qt-dev 2019-05-02 15:59:13 +00:00
Yohei Yukawa
b4f328a2f3 Reenable CursorAnchorInfo API with ActivityView
With my previous CL [1], CursorAnchorInfo API was globally disabled
for cross-display scenario including ActivityView scenario.

This CL slightly relaxes the above condition so that IMEs can rely on
CursorAnchorInfo APIs again to interact with apps running inside
ActivityView.

The basic idea here is keeping reporting relevant information from
ActivityView to InputMethodManagerService (IMMS) so that IMMS can take
the display hierarchy because of ActivityView into account.  As long
as IMMS has the up-to-date hierarchical information, IMMS can tell
InputMethodManager (IMM) running in the IME client process about the
missing coordinate transformation information from the virtual display
space to the outer display space where the IME is actually shown.

Note that there was a similar fix for AccessibilityService that keeps
reporting ActivityView location to WindowManagerService (WMS) [2].
Ideally we should be able to share the logic, but to do so we need to
introduce a generalized callback mechanism into WMS so that IMMS can
be notified when a cetain coordinate transform matrix has changed.
For Q, this CL implements IMMS's own mechanism to keep track of
ActivityView hierarchy instead of introducing a direct dependency from
WMS to IMMS.

For R+, most likely we may want to reconsider how ActivityView should
be implemented.

There should be no behavior change in this CL if ActivityView is not
involved.

 [1]: Ie2f7a5117cff3a13ad5c5806fd4b3abef7569549
      3d2cc0fffd
 [2]: I38da5b84a11890bf0f4a57eb9d5b7e71bdcc16a9
      d8ec938609

Fix: 115693908
Test: atest CtsWindowManagerDeviceTestCases:ActivityViewTest#testInputMethod
Change-Id: Id0411a80456182111bb5b681c6d1230b58e7ec2e
2019-05-02 08:41:27 -07:00
TreeHugger Robot
ff7fc1de48 Merge "Sharesheet - Make ripples consistent" into qt-dev 2019-05-02 15:13:26 +00:00
Matt Pietal
84a55bd5eb Sharesheet - Make ripples consistent
There were differences in ripple behavior depending on the list row
background. Modify this so the ripples propogate against the same
parent background. Make copy button style match the work profile style.

Bug: 129979196
Test: Visual inspection
Change-Id: I51f1b7503c2169bd03f04edecf98927850e6582b
2019-05-02 07:37:39 -04:00
George Hodulik
1428bebe69 Enable using prediction manager for sharesheet.
Sharesheet in AiAi is currently disabled, so sharesheet will
default to ranker. This will allow remote enabling for experimentation.

Bug:129014961
Test:Manually tested.
Test: atest frameworks/base/core/tests/coretests/src/com/android/internal/app
Change-Id: I0c21c29356120a873940bcaa8a659ea02046be71
2019-05-01 17:04:23 -07:00
George Hodulik
2f8f43514f Merge "Default to RankerResolver if AppPredictor is disabled" into qt-dev 2019-05-02 00:00:35 +00:00
TreeHugger Robot
545021d0c9 Merge "Cleanup messages in onDestory in ChooserActivity" into qt-dev 2019-05-01 22:37:36 +00:00
George Hodulik
3f399f2b16 Default to RankerResolver if AppPredictor is disabled
The AppPredictionServiceResolverComparator will use the ResolverRankerService
if APS appears to be disabled for share activities (returning empty despite
being given a non-empty target list).

For Direct share targets, if the share target list returned is empty, we fall
back on calling the ShortcutManager directly and relying on ChooserTargetService
to rank.

Bug:129014961
Test:Manually tested.
Test: atest frameworks/base/core/tests/coretests/src/com/android/internal/app
Change-Id: I9891a3a4d879e247b84a651408058153ea57c766
2019-05-01 22:01:16 +00:00
TreeHugger Robot
fabb5ebb59 Merge "Propagate light nav bar info" into qt-dev 2019-05-01 18:44:39 +00:00
Mehdi Alizadeh
f472313347 Cleanup messages in onDestory in ChooserActivity
Bug: 129679731
Test: Builds and ShareSheet works
Change-Id: I78afd4546e139698213e952495d46fc401fba540
2019-05-01 18:40:36 +00:00
Andrei Onea
b019c7eea3 DO NOT MERGE Fix setting hidden api usage log sample rate
This fix addresses two related issues: one with the
DeviceConfig.onPropertiesChangedListener, and another with
HiddenApiUsageLogger.setHiddenApiAccessLogSampleRates.
In both cases, setting one of the sample rates
(hidden_api_access_log_sampling_rate or
hidden_api_access_statslog_sampling_rate) unsets the other. This is due
to them being sent sequentially instead of simultaneously.
Additionally, out of an abundance of caution, mirror the behaviour in
attemptConnectionToPrimaryZygote and attemptConnectionToSecondaryZygote
for the statslog sample rate. This was overlooked in a previous change.

Bug: 119217680
Test: m
Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases -t \
            android.cts.statsd.atom.UidAtomTests#testHiddenApiUsed

Change-Id: I8a5534403269a2339fcabc8f847199ab837ae71b
2019-05-01 19:04:00 +01:00
Anton Hansson
0397997310 Merge "Optimize FileSystemProvider.includeFile" into qt-dev 2019-05-01 13:51:31 +00:00
TreeHugger Robot
df7e984cc3 Merge "Sharesheet - Talkback fixes" into qt-dev 2019-05-01 13:00:30 +00:00
Richard Uhler
2124d4b313 Ensure race between rollback and roll forward is properly handled
If rollback for a package is committed at the same time the package is
updated, it's possible we will incorrectly roll back the newly updated
version of the application.

Add a hidden API to the package installer that lets you set a required
existing version of a package to be updated. If the expected package
version is not installed at the time of commit, the update install
fails.

The RollbackManager uses this new API to ensure that rollback will fail
if the package in question was just updated.

Test: atest RollbackTest, with new test added and manual confirmation
      that the race condition was exercised by the new test.
Bug: 128831080

Change-Id: Ifa5627e257d2ef13e2b213ef0dbc93932797ce0d
2019-05-01 09:10:36 +00:00
TreeHugger Robot
565e2634e6 Merge changes I2b059826,I64bee605 into qt-dev
* changes:
  Sharesheet - make az list label disappear with use
  Sharesheet - add a-z list label
2019-05-01 00:14:53 +00:00
TreeHugger Robot
b6b549baf6 Merge "Move timeout from RankerResolverServiceComparator to abstract class." into qt-dev 2019-05-01 00:00:33 +00:00
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
Matt Pietal
791b1c3741 Sharesheet - Bump up limit for shortcuts
Allow apps to provide more targets via shortcut API, and allow AIAI
or default ranker to order them appropriately.

Bug: 130812721
Test: Visual inspection using Messages which has Shortcuts!
Change-Id: I4b16f3317056a2c5daad9b0576c22faa7ad3ca7b
2019-04-30 17:35:02 -04:00
George Hodulik
1f5d9bfa84 Move timeout from RankerResolverServiceComparator to abstract class.
BUG:129014961
Test: atest frameworks/base/core/tests/coretests/src/com/android/internal/app
Change-Id: Ia34e938e4e641a134cbc8bff3419d25f09f0370d
2019-04-30 20:37:53 +00:00
Anton Hansson
788ec75be5 Optimize FileSystemProvider.includeFile
When traversing a file tree using SAF, this method is called for
every file in the tree, so wasted cycles add up to quite a lot
of total time for large trees.

Optimizations:
- don't look up info not necessary by the cursor, by inspecting
  the projection columns
- remove a few redundant double-lookups, of e.g. the File path
- mark variables final where possible

On my device/file tree, this reduces the total time spent in includeFile
from ~33 seconds to ~22 seconds. This is where the majority of cycles
are spent when traversing a dir with SAF.

Bug: 130276310
Test: SAF test app
Change-Id: Ibdfc335253a90eb87795a7a4eecb8b7b89601f09
2019-04-30 15:49:33 +01:00
Matt Pietal
8a8cfc46ca Sharesheet - Talkback fixes
Disable the content preview area so it is not clickable. Do not make
the drag handle clickable.

Bug: 131121700
Test: Use Talkback on Sharesheet
Change-Id: Iad60eae8f2b69a7680914cff88a6902a1246364f
2019-04-30 07:59:14 -04: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
Mike Digman
849a9d13f0 Sharesheet - make az list label disappear with use
Following example set by launcher, eventually make a-z list
label disappear after n expansions. Done with the Sharedpref
associated with ChooserActivity.

Test: manual
Fixes: 130349817
Change-Id: I2b05982654265804bbc1b3e4821f05ced1e011cd
2019-04-29 12:30:03 -07: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
Mike Digman
ae730b1f07 Sharesheet - add a-z list label
New users may not understand what the a-z list is, as demoed in
user testing. Add a label above the list that describes the
contents.

Bug: 130349817
Test: manual
Change-Id: I64bee605ab33dd486ef6cd95346c46f4eff62269
2019-04-26 11:55:47 -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