Commit Graph

17481 Commits

Author SHA1 Message Date
Bernardo Rufino
3cd2231fed Merge "Remove sendCloseSystemDialogs() from PhoneFallbackEventHandler" into sc-qpr1-dev am: d9ba2df119 am: 5a2619c678 am: 2e3c6e5724
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15836011

Change-Id: I49e47a24a5aacc746d9e9e3e67cad42c75a38b16
2021-09-17 15:56:07 +00:00
Bernardo Rufino
2e3c6e5724 Merge "Remove sendCloseSystemDialogs() from PhoneFallbackEventHandler" into sc-qpr1-dev am: d9ba2df119 am: 5a2619c678
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15836011

Change-Id: I0665dc366b5dd14ddacc61ad882770f36ff79456
2021-09-17 15:43:59 +00:00
Bernardo Rufino
5a2619c678 Merge "Remove sendCloseSystemDialogs() from PhoneFallbackEventHandler" into sc-qpr1-dev am: d9ba2df119
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15836011

Change-Id: I9a03f509116603c2286b2c385af4587bd8dd9b09
2021-09-17 15:29:37 +00:00
Bernardo Rufino
d9ba2df119 Merge "Remove sendCloseSystemDialogs() from PhoneFallbackEventHandler" into sc-qpr1-dev 2021-09-17 15:15:48 +00:00
Alex Buynytskyy
19f8adfbdf Cache least recently used output buffer.
- reduce memory allocations especially when Xml is serialized inside a
tight inner loop,
- performance slightly improved.

BEFORE:
100 packages:
[2/4] android.util.XmlPerfTest#timeWrite_Binary: PASSED (10.516s)
	timeWrite_Binary_mean: 674979
	threadAllocCount_mean: 59
	timeWrite_Binary_min: 671194
	timeWrite_Binary_median: 674798
	timeWrite_Binary_standardDeviation: 3658
	threadAllocSize_mean: 530176
10 packages:
[2/4] android.util.XmlPerfTest#timeWrite_Binary: PASSED (10.542s)
	timeWrite_Binary_mean: 71113
	threadAllocCount_mean: 56
	timeWrite_Binary_min: 70201
	timeWrite_Binary_median: 71237
	timeWrite_Binary_standardDeviation: 692
	threadAllocSize_mean: 59136
1 package:
[2/4] android.util.XmlPerfTest#timeWrite_Binary: PASSED (10.091s)
	timeWrite_Binary_mean: 15698
	threadAllocCount_mean: 56
	timeWrite_Binary_min: 15072
	timeWrite_Binary_median: 15677
	timeWrite_Binary_standardDeviation: 410
	threadAllocSize_mean: 6439

AFTER:
100 packages:
[1/1] android.util.XmlPerfTest#timeWrite_Binary: PASSED (10.221s)
	timeWrite_Binary_mean: 605862
	threadAllocCount_mean: 53
	timeWrite_Binary_min: 602353
	timeWrite_Binary_median: 604424
	timeWrite_Binary_standardDeviation: 4972
	threadAllocSize_mean: 492748
10 packages:
[1/1] android.util.XmlPerfTest#timeWrite_Binary: PASSED (10.575s)
	timeWrite_Binary_mean: 58710
	threadAllocCount_mean: 50
	timeWrite_Binary_min: 57551
	timeWrite_Binary_median: 57798
	timeWrite_Binary_standardDeviation: 2129
	threadAllocSize_mean: 21696
1 package:
[1/1] android.util.XmlPerfTest#timeWrite_Binary: PASSED (10.151s)
	timeWrite_Binary_mean: 11576
	threadAllocCount_mean: 50
	timeWrite_Binary_min: 11315
	timeWrite_Binary_median: 11381
	timeWrite_Binary_standardDeviation: 431
	threadAllocSize_mean: 4336

Test: atest FastDataPerfTest XmlPerfTest
Bug: 195994150
Fixes: 195994150

Change-Id: Ieedd27a676d718967c2fac30bc48a68ae636a180
2021-09-16 19:06:31 +00:00
Miranda Kephart
cf97f51c3d Merge "Fix direct share badges when sharing on work/personal profiles" into sc-qpr1-dev am: b51d58e6fd am: 0d5e670809 am: 6f87f6c3e6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15839049

Change-Id: I42d1724d8c892e0e9dba196eff6ec21cd3b3f3b5
2021-09-16 14:29:27 +00:00
Miranda Kephart
6f87f6c3e6 Merge "Fix direct share badges when sharing on work/personal profiles" into sc-qpr1-dev am: b51d58e6fd am: 0d5e670809
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15839049

Change-Id: Id5d2b3c70e7422e0040a927f3b778beb54bf297c
2021-09-16 14:14:04 +00:00
Miranda Kephart
0d5e670809 Merge "Fix direct share badges when sharing on work/personal profiles" into sc-qpr1-dev am: b51d58e6fd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15839049

Change-Id: I4ff949f7732fd4915b835e33a466165ab9d3c4f4
2021-09-16 14:03:52 +00:00
Joshua Trask
2e1a507ae7 Merge "Fix (still-disabled) sharesheet "token flow."" 2021-09-16 13:52:19 +00:00
Dmitri Plotnikov
f98c930e7c Merge "Add LongArrayMultiStateCounter.reset() and setEnabled()" 2021-09-16 01:56:16 +00:00
Miranda Kephart
63fe7d7343 Fix direct share badges when sharing on work/personal profiles
Use the passed-in user instead of the current user to determine
whether or not to add the work profile badge to direct share
target app icons, so that personal share targets do not have the
badge (even when sharing something from the work profile) and
work/managed share targets do have it (even when sharing something
from the personal profile).

Test: manual; tested appearance sharing from personal->work and
from work->personal
Bug: 197388251
Fix: 197388251

Change-Id: Ieee50d46e8058a92efa5be8aae9859447531c270
2021-09-15 15:20:14 -04:00
Joshua Trask
2ed0753a2e Fix (still-disabled) sharesheet "token flow."
Per b/132321687, we need to leave the system-side share
activity open (not call finish()) until the SysUI-side
chooser finishes, or else we'll invalidate the start-
activity token that the SysUI (delegate) chooser needs
when it launches the target activity.

Note that the delegated flow is still disabled by the
flag in DisplayResolveInfo.

Bug: 132321687,199743918
Test: Reproduced crash condition & confirmed fix manually.
Change-Id: Ic467dfe4eb417ca846c0ecf2e8a0067bd5275e9f
2021-09-15 13:58:38 -04:00
Yohei Yukawa
e8424ef600 Deprecate MissingMethodFlags to preserve invocation order
This CL effectively replaces my previous CL [1], which made
unimplemented methods in InputConnection not fatal errors, with a
simplified implementation that still gracefully take care of
unimplemented methods without causing app crashes.

Instead of propagating missing method information from the IME client
to the IME process, this CL will simply catch AbstractMethodError in
the IME client process.  Doing so enables us to

 1. preserve the strict invocation order of InputConnection APIs, and
 2. achieve the same goal with fewer lines of code.

The additional cost of throwing (and catching) AbstractMethodError
every time the IME calls an unimplemented InputConnection API can be
justified as it is really an exceptional scenario, and avoiding it
would require extra maintenance cost as seen in
InputConnectionInspector.

The above overhead (and complexity) due to AbstractMethodError can be
avoided by adding default implementations to those InputConnection
APIs, but doing so requires API signature update hence API council
approval to go ahead, which is to be discussed in Bug 199934664.

 [1]: I3c58fadd924fad72cb984f0c23d3099fd0295c64
      19a80a1e80

Bug: 27407234
Bug: 27642734
Bug: 27650039
Bug: 194110780
Test: atest CtsInputMethodTestCases
Change-Id: I9e801e92496a6e16cee37664870c97ed096f1413
2021-09-15 10:03:20 -07:00
Bernardo Rufino
1538b7fda7 Remove sendCloseSystemDialogs() from PhoneFallbackEventHandler
Today's flow of events is like this: key goes to focused app
(ViewRootImpl::processKeyEvent), the view hierarchy does not handle the
event, so ViewRootImpl uses FallbackEventHandler to invoke the fallback
action for this key.

The problem is that for many keys the app itself is closing system
dialogs before taking the appropriate action (often launching an
activity, eg. dialer for KEYCODE_CALL), but this is now prohibited in S
due to abuse of said action.

The long-term plan is to return to InputDispatcher the fact that the key
wasn't handled by the app and have ID call out to the policy, which will
launch the appropriate action and adjust the UI as it sees fit (close
system dialogs).

However, we need to prevent apps from crashing because of this, hence
this change for S still. The unfortunate effect is that system dialogs
won't be hidden in these cases, but this livable with until we properly
implement the infrastructure.

Bug: 199173862
Test: Simulate code-paths with affected keys and make sure apps don't
      crash:
      1. adb shell input keyevent --longpress KEYCODE_CALL
      2. adb shell input keyevent --longpress KEYCODE_CAMERA
Change-Id: I44ad41ac1eac9acc8320298ceb4c1b21bde8af5d
2021-09-15 15:25:47 +01:00
Wu Ahan
7af1589311 Merge "Add latency instrument point for ACTION_TURN_ON_SCREEN" into sc-v2-dev am: d0b1d557e9 am: 2feb569bed
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15271990

Change-Id: I38257099c72fd8941b3901f0bfe3cae8cf9951fe
2021-09-15 03:09:07 +00:00
Wu Ahan
2feb569bed Merge "Add latency instrument point for ACTION_TURN_ON_SCREEN" into sc-v2-dev am: d0b1d557e9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15271990

Change-Id: I41abfb32db86fca9feb39f4b8b5439a6071ea6e2
2021-09-15 02:50:09 +00:00
Wu Ahan
d0b1d557e9 Merge "Add latency instrument point for ACTION_TURN_ON_SCREEN" into sc-v2-dev 2021-09-15 02:33:51 +00:00
Dmitri Plotnikov
b934671543 Add LongArrayMultiStateCounter.reset() and setEnabled()
Bug: 197162116
Test: atest FrameworksCoreTests:LongArrayMultiStateCounterTest
Change-Id: I2f05c2ce56eaa52835fb350ecb0e5e4408f6b879
2021-09-15 01:04:44 +00:00
Dmitri Plotnikov
c1fa3a71f3 Merge "Make LongArrayMultiStateCounter parcelable" 2021-09-15 01:03:18 +00:00
Mark Renouf
9f7e10b7c1 Merge "No longer block the main thread on rendering" 2021-09-14 23:45:18 +00:00
Gaurav Bhola
8b57638362 Merge "Move the NotificationAccessConfirmationActivity component name to resource config so that it can be overlayed." into sc-v2-dev am: 9260cf2831 am: 3cd5455405
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15634240

Change-Id: I6f3ffc1333bee3ba17010b6d32a44c2167350932
2021-09-14 19:53:31 +00:00
Dmitri Plotnikov
e5292b4a24 Make LongArrayMultiStateCounter parcelable
Bug: 197162116
Test: atest FrameworksCoreTests:LongArrayMultiStateCounterTest
      atest CorePerfTests:LongArrayMultiStateCounterPerfTest

Change-Id: Ibc94620f2f106695fa7f17fc0737496f0e32ba48
2021-09-14 12:40:56 -07:00
Gaurav Bhola
3cd5455405 Merge "Move the NotificationAccessConfirmationActivity component name to resource config so that it can be overlayed." into sc-v2-dev am: 9260cf2831
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15634240

Change-Id: I8a97b36fb9e58ba97cab7c96dbe85ec02a969c05
2021-09-14 19:38:05 +00:00
Gaurav Bhola
9260cf2831 Merge "Move the NotificationAccessConfirmationActivity component name to resource config so that it can be overlayed." into sc-v2-dev 2021-09-14 19:25:04 +00:00
TreeHugger Robot
14086099fb Merge "Optimize InputConnection tracing logic a bit" 2021-09-14 18:53:58 +00:00
Daniel Olusakin
686b2cb516 Merge "Add resolved label to identifier when grouping targets for the alphabetical list" 2021-09-14 18:52:31 +00:00
PETER LIANG
cf1882754f Merge "Fix the title of the HW "Edit shortcuts" menu is truncated when the device is folded." into sc-v2-dev am: d596ae37f4 am: d60338ea9e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15746905

Change-Id: I9ed753fdb47b5590992d6d65f8c8d6c894d038f4
2021-09-14 04:24:03 +00:00
PETER LIANG
d60338ea9e Merge "Fix the title of the HW "Edit shortcuts" menu is truncated when the device is folded." into sc-v2-dev am: d596ae37f4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15746905

Change-Id: I2f993d298f539259506d499a242baa4a24ad487b
2021-09-14 04:08:58 +00:00
PETER LIANG
d596ae37f4 Merge "Fix the title of the HW "Edit shortcuts" menu is truncated when the device is folded." into sc-v2-dev 2021-09-14 03:58:38 +00:00
TreeHugger Robot
07589854d1 Merge "Integrate LongArrayMultiStateCounter with eBPF based time-in-state" 2021-09-13 23:11:26 +00:00
Yohei Yukawa
7cbc9bdf31 Optimize InputConnection tracing logic a bit
This CL is a follow up CL to our previous CL [1], which introduced
InputConnection logging as part of IME tracing project.

The goal of this CL is to consolidate RemoteInputConnectionImpl by
separating core business logic from orthogonal concept such as method
tracing, without sacrificing the runtime performance.

With this CL, both code and string resource duplicates will be
actually reduced.  There is no additional object allocation unless the
IME tracing is explicitly enabled.

 [1]: Iabd6af1b858803030848a0ef5e7dd9ecfc562716
      0653b692d1

Bug: 154348613
Bug: 192412909
Test: Manually verified that the IC tracing is still working
Change-Id: I329129241bdae231844dc3170faf9e8d11f49f08
2021-09-13 15:44:01 -07:00
Mark Renouf
72becb3095 No longer block the main thread on rendering
This change removes the use of setWaitForPresent(true)
on the FrameRenderRequest. This allows the method to return
as soon as the request is synced to the RenderThread and
no longer block while the frame is drawn.

Depends on ag/15411889

Bug: 194927650
Test: manual, capture long screenshot
Change-Id: I93795f3aad52067e52d3614982fd871de4f3432e
2021-09-13 21:17:31 +00:00
Daniel Olusakin
876a366043 Add resolved label to identifier when grouping targets for the alphabetical list
Change-Id: I168bd6f69660d401c98c50d450ab2155d3814a8e
2021-09-13 20:11:55 +00:00
Ahan Wu
767bae370b Add latency instrument point for ACTION_TURN_ON_SCREEN
We missed LatencyTracker.ACTION_TURN_ON_SCREEN, add proper instrument
point.

Bug: 188626939
Test: atest
Change-Id: If366a8bcbda41087dd1255110f4f60a8970cca15
2021-09-13 11:57:46 -08:00
TreeHugger Robot
4d16327f62 Merge "Stop lying about MissingMethodFlags.REQUEST_CURSOR_UPDATES" 2021-09-13 17:27:34 +00:00
Pavel Grafov
bc68f7d3df Merge "Respect PASSWORD_QUALITY_MANAGED for biometrics" into sc-qpr1-dev am: a238881ee0 am: d730a09568 am: 58ac1483e5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15778512

Change-Id: Id0dbd193a8bd961451451fcd74756d7a9c2fd7e4
2021-09-13 14:33:14 +00:00
Pavel Grafov
58ac1483e5 Merge "Respect PASSWORD_QUALITY_MANAGED for biometrics" into sc-qpr1-dev am: a238881ee0 am: d730a09568
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15778512

Change-Id: I51b6f6f162ac83c7b7c8cdf75494319e4c6d8648
2021-09-13 14:18:44 +00:00
Pavel Grafov
a9a29b6ffe Merge "Respect PASSWORD_QUALITY_MANAGED for biometrics" into sc-qpr1-dev am: a238881ee0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15778512

Change-Id: I7dd1ea2b9c10a2410917fe89fb50ad8a17f2c3ea
2021-09-13 14:09:29 +00:00
Pavel Grafov
d730a09568 Merge "Respect PASSWORD_QUALITY_MANAGED for biometrics" into sc-qpr1-dev am: a238881ee0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15778512

Change-Id: I44b1e9fa8d418ef84c1ab324306a00e47e5b4e9a
2021-09-13 14:08:56 +00:00
Pavel Grafov
a238881ee0 Merge "Respect PASSWORD_QUALITY_MANAGED for biometrics" into sc-qpr1-dev 2021-09-13 13:52:26 +00:00
Winson Chiu
be3c8efc93 Merge "Revert "Revert "Open up AndroidPackage as @SystemApi""" 2021-09-10 23:07:18 +00:00
Dmitri Plotnikov
41f99f531d Merge "Add OWNERS for BatteryStats related files" am: a84bdc93a8 am: cc225325e3 am: e69a707085 am: 58214c18dd am: ac031c0c4d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1822145

Change-Id: Ibd4173233b21e2ba7941db1bd2bf581e81203753
2021-09-10 20:48:10 +00:00
Daniel Olusakin
82bf215341 Merge "Update label loading logic to use intent-filter as sublabel for apps holding the right permission" 2021-09-10 20:19:01 +00:00
Dmitri Plotnikov
ac031c0c4d Merge "Add OWNERS for BatteryStats related files" am: a84bdc93a8 am: cc225325e3 am: e69a707085 am: 58214c18dd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1822145

Change-Id: I79141b6ae0be2d3aacc6a6168a9382940cfb3521
2021-09-10 19:25:01 +00:00
Dmitri Plotnikov
58214c18dd Merge "Add OWNERS for BatteryStats related files" am: a84bdc93a8 am: cc225325e3 am: e69a707085
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1822145

Change-Id: Iedc246526e371342096d6e3354b0e742bd4c855c
2021-09-10 18:56:26 +00:00
Dmitri Plotnikov
e69a707085 Merge "Add OWNERS for BatteryStats related files" am: a84bdc93a8 am: cc225325e3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1822145

Change-Id: I531bd2c8da470bbde94135dfdddc425de5dbbf9c
2021-09-10 18:41:20 +00:00
Yohei Yukawa
6d2e9786b4 Stop lying about MissingMethodFlags.REQUEST_CURSOR_UPDATES
This is a follow up CL to my previous CL [1], which used
MissingMethodFlags mechanism [2] to let that API fail when the IME and
the target app are not running on the same display.

As discussed in Bug 194110780, however, there is a problem in the
MissingMethodFlags mechanism that it could have caused unexpected task
reordarings from the IME developer when sync InputConnection APIs
immediatelly fail without waiting for those tasks to be scheduled to
the target app then handled.

As a preparation to fully deprecate MissingMethodFlags, this CL
enables InputMethodManagerService to stop lying about

  MissingMethodFlags.REQUEST_CURSOR_UPDATES

when the IME is rendered on a diffirent display than the target app.
Such check is now explicitly implemented in

  RemoteInputConnectionImpl.

Other than that, there is no observable behavior change.

 [1]: Ie2f7a5117cff3a13ad5c5806fd4b3abef7569549
      3d2cc0fffd
 [2]: I3c58fadd924fad72cb984f0c23d3099fd0295c64
      19a80a1e80

Bug: 131368625
Bug: 194110780
Test: atest CtsInputMethodTestCases
Test: atest MultiDisplaySystemDecorationTests#testCrossDisplayBasicImeOperations
Change-Id: Iec12733d37e112b7271436bba15094ae2a55a450
2021-09-10 11:37:40 -07:00
Dmitri Plotnikov
cc225325e3 Merge "Add OWNERS for BatteryStats related files" am: a84bdc93a8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1822145

Change-Id: If3cc87baf6a2249634e3f35ea8683177d9ace1c9
2021-09-10 18:20:32 +00:00
Daniel Olusakin
eb109bbd43 Update label loading logic to use intent-filter as sublabel for apps holding the right permission
Change-Id: I369365966925a2bee4b51453f7bfe271877c860c
Bug: 197665892
2021-09-10 18:07:04 +00:00
Winson Chiu
d7adbb01ba Revert "Revert "Open up AndroidPackage as @SystemApi""
This reverts commit 750ce30b84.

Reason for revert: b/199246839 fixed, re-introduce change

Change-Id: I48f3fd20ac14c823c85de55f667d1860dade1f97
2021-09-10 16:50:01 +00:00