Commit Graph

15067 Commits

Author SHA1 Message Date
Abodunrinwa Toki
bc9ba87f5a Merge "Ensure the toolbar refreshes its PendingIntents when it changes." 2020-11-25 22:40:13 +00:00
Wilson Wu
151c83a08a Merge "Make IInputMethodManager to oneway (2/N)" 2020-11-25 05:59:39 +00:00
Wilson Wu
16b795f36d Make IInputMethodManager to oneway (2/N)
Make methods(await, logging) to utility in Completable
so that other modules could use them directly.

Bug: 163453493
Test: Manual test with keyboard
Test: atest CtsInputMethodTestCases
Change-Id: Idedb9de658de3e6e91afad16bab0c428ee68e7b3
2020-11-24 18:48:23 +08:00
Eugene Susla
c0bc040ece Merge "Deprecate AbstractRemoteService" 2020-11-24 01:56:12 +00:00
Eugene Susla
f468fa507b Deprecate AbstractRemoteService
Test: presubmit
Change-Id: I1e9f3d201213f3d4e12da612ddaceb3280a92d0d
2020-11-23 15:36:20 -08:00
TreeHugger Robot
b2fe21ee76 Merge "Update the database for file operations in FileSystemProvider" 2020-11-23 20:57:28 +00:00
Eugene Susla
bf0b3284e2 Merge "Add OWNERS to CDM and some utils I manitain" 2020-11-23 19:54:21 +00:00
Eugene Susla
abe605b1da Add OWNERS to CDM and some utils I manitain
Test: presubmit
Change-Id: I26a7f810c6edff8f96b32887acd6e4613a91c7ef
2020-11-23 09:59:56 -08:00
Michael Wachenschwanz
26acf27957 Merge changes I9b91ed27,Ia77d0eac,I014c2ee9
* changes:
  Fix PowerStatsView AppPicker activity start
  Utilize Measured Energy data in PowerStatsViewer
  Introduce MeasuredEnergyStats to BatteryStatsImpl
2020-11-23 17:38:05 +00:00
Ivan Chiang
69e1ad701a Update the database for file operations in FileSystemProvider
Use MediaStore.scanFile to Handle .nomedia file case for file
operations.

Fix: 173574639
Test: manual
      Rename/move/delete/copy files in storage root in DocumentsUI
Change-Id: I8231a67548bdb133bb47edf832db14aeb389e7ea
2020-11-23 15:38:14 +08:00
Michael Wachenschwanz
d23a7c4f03 Introduce MeasuredEnergyStats to BatteryStatsImpl
Initial checkin that plumbs the flow of energy consumption data through
BatteryStatsService, BatteryStatsImpl, and BatteryExternalStatsWorker.

Also, start monitoring the display subsystem measured enegy consumption
and attribute energy to screen on and screen doze state.

Fixes: 171728122
Test: atest FrameworksCoreTests:MeasuredEnergyStatsTest
Change-Id: I014c2ee99da773ebc93e18d026b2e2e694d0d4b2
2020-11-20 14:59:36 -08:00
Dmitri Plotnikov
9237e2cf09 Merge "Add a perf test for BatteryStatsHelper" 2020-11-20 22:56:26 +00:00
TreeHugger Robot
a9eb7e88d5 Merge "Revert "[Telephony] PhoneStateListener redesign for new event"" 2020-11-20 02:34:12 +00:00
Hall Liu
1f1dbee262 Revert "[Telephony] PhoneStateListener redesign for new event"
Revert "[Telephony] PhoneStateListener redesign - cts test"

Revert "[Telephony] PhoneStateListener redesign"

Revert submission 12947610-PhoneStateListener_Redesign

Reason for revert: Multiple test failures: b/173726360, b/173724464, b/173722831
Reverted Changes:
Id69d2b2e7:[Telephony] PhoneStateListener redesign - remove L...
I210f371ed:[Telephony] PhoneStateListener redesign - cts test...
I97e93707f:[Telephony] PhoneStateListener redesign - cts test...
Ibdbaa7d65:[Telephony] PhoneStateListener redesign - cts test...
I5ed16d700:[Telephony] PhoneStateListener redesign - cts test...
I40cc4c234:[Telephony] PhoneStateListener redesign for new ev...
Idd69f5e48:[Telephony] PhoneStateListener redesign
I827471472:[Telephony] PhoneStateListener redesign - cts test...
Bug: 173726360
Bug: 173724464
Bug: 173722831
Change-Id: Iba85a04db03c9fb9c4d4102618e65fcff537d815
2020-11-20 02:32:42 +00:00
Dmitri Plotnikov
a101c0af5a Add a perf test for BatteryStatsHelper
On Bramble, we get these results:

	endToEnd_median: 321.983605
	getStats_median: 258.134786
	getStats_cached_median: 48.506614
	powerCalculation_median: 51.798291

Test: Lock the device to little cores for consistency
  $ ./frameworks/base/libs/hwui/tests/scripts/prep_generic.sh little
  $ atest BatteryStatsPerfTests

Bug: 173446001

Change-Id: I307bcea38c7001d950de1b506c31b64f89629952
2020-11-19 18:22:54 -08:00
Abodunrinwa Toki
c132a22873 Ensure the toolbar refreshes its PendingIntents when it changes.
A bug in FloatingToolbar.isCurrentlyShowing(menuItems) caused the
toolbar not to update the menu item action in certain cases where the
text selection changed but the toolbar menu items did not change.
e.g. Fires a Translate PendingIntent with the wrong text selection.
This CL fixes that.

isCurrentlyShowing(menuItems) aims to help avoid the re-building of
toolbar views when unnecessary. This fix still maintains this idea
but ensures that the menuItem references are updated so that the
correct click listener is triggered when the menu item button is
clicked.

Bug: 150973392
Test: Manually tested. See bug for how to reproduce.
Test: atest android.widget.TextViewActivityTest
Test: atest android.view.textclassifier.cts.TextViewIntegrationTest
Test: atest android.widget.cts.TextViewTest

Change-Id: Iefedf40e1ea6f9499401918ab34d3ebac53fc385
2020-11-19 13:49:09 +00:00
Ryan Lin
00bca78ece Merge "Show notification to promote window magnification mode available" 2020-11-19 08:37:51 +00:00
Chiachang Wang
d0ba3573fb Merge "Move BasicShellCommandHandler to frameworks/lib/modules-utils" 2020-11-19 00:45:29 +00:00
Marcin Oczeretko
d620436ba7 Merge "Add configuration options to InteractionJankMonitor" 2020-11-18 23:00:53 +00:00
TreeHugger Robot
580ab7f58f Merge "Switch LatencyTracker to the DeviceConfig API" 2020-11-18 21:28:19 +00:00
Max Dashouk
cd2624a2bb Merge "Adds a flag to allow collection of Looper and Binder stats even when charging. This is done for automotive form factor. Notion of battery is not as significant as it is in phones." 2020-11-18 19:17:59 +00:00
Chiachang Wang
6a555279ec Move BasicShellCommandHandler to frameworks/lib/modules-utils
BasicShellCommandHandler is used by mainline modules and the
framwork. There is a new repo that was created for putting
this kind of utility class. Move BasicShellCommandHandler for
the incoming ConnectivityService mainline and updating the
related usage.

Bug: 170598012
Test: m ; verify with adb shell cmd
Change-Id: Ida30c877116090616d4bf3f87fdad835446dac84
2020-11-18 09:18:06 +00:00
Zoey Chen
8740b1ea93 Merge "[Telephony] PhoneStateListener redesign for new event" 2020-11-18 05:13:47 +00:00
Jeff Sharkey
3d39cd1cfc Merge changes from topic "nov14"
* changes:
  Hand-migration to TypedXml interface.
  Mechanically apply TypedXml refaster template.
  Refaster templates for new TypedXml classes.
  Mechanical refactoring to new XML resolvers.
  Refine TypedXmlPullParser API interface.
2020-11-18 01:56:22 +00:00
Zoey Chen
03105edc84 [Telephony] PhoneStateListener redesign for new event
1. Add int EVENT_* and expose these as @SystemApi
 2. Add listener interface
 3. Deprecated LISTEN_*

Bug: 167684594
Test: atest TelephonyManagerTest#testRegisterPhoneStateListener
Change-Id: Icfb2f892a18c4fd101473aed5c87c9d7a4bd3f18

[Telephony] PhoneStateListener redesign - use Set<Integer> instead of long

 - Remove old listen api
 - Use listenWithEventList for new design

Bug: 167684594
Test: atest TelephonyManagerTest#testRegisterPhoneStateListener
Change-Id: I2184454c3fd127989edee6c09b175185de960f06

[Telephony] PhoneStateListener redesign - registerPhoneStateListener

 - should register PhoneStateListener for event
 - get event from event listener
 - Add event to list

Bug: 167684594
Test: manual and atest TelephonyManagerTest#testRegisterPhoneStateListener
Change-Id: I7ef23287879111277610b27aeeab5c8218ab3361

[Telephony] PhoneStateListener redesign - check permission

Bug: 167684594
Test: atest TelephonyManagerTest#testRegisterPhoneStateListener
Change-Id: I40cc4c234ae6c70405193806ff3159fde0b4486d
2020-11-18 09:12:01 +08:00
Dmitri Plotnikov
152543056c Merge "Move calculations from BatteryStatsHelper to PowerCalculators" 2020-11-17 23:27:25 +00:00
Treehugger Robot
baae6129ee Merge "Fixed Handler Leak on RecyclerView" am: 62b028daca am: 78ac7dd921 am: a475e3f791 am: acbc01ea84
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1495867

Change-Id: I12ef4a07b4430c7eaa50d9fe3183d925cb26aeee
2020-11-17 22:00:36 +00:00
Treehugger Robot
acbc01ea84 Merge "Fixed Handler Leak on RecyclerView" am: 62b028daca am: 78ac7dd921 am: a475e3f791
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1495867

Change-Id: I484c140a0d7294f0ef4b797f5c41cc1ee542fc87
2020-11-17 21:37:23 +00:00
Treehugger Robot
62b028daca Merge "Fixed Handler Leak on RecyclerView" 2020-11-17 20:17:44 +00:00
Dmitri Plotnikov
4c3ede3fd7 Move calculations from BatteryStatsHelper to PowerCalculators
Bug: 162379528
Test: atest FrameworksCoreTests

Change-Id: I61002c3c1f198fb10441800eba49760aba90823a
2020-11-17 11:38:14 -08:00
Marcin Oczeretko
3b462716ce Add configuration options to InteractionJankMonitor
Test: UTs + manual
Bug: 162927074

Change-Id: I3edf8d2ce3d2b3b7410fa56d46db0833ac23366d
2020-11-17 18:37:58 +00:00
Marcin Oczeretko
2db59986eb Switch LatencyTracker to the DeviceConfig API
Test: manual
Bug: 162927074

Change-Id: I4eaae9db74ac1b23bdd0e90a6981a852375f788b
2020-11-17 18:37:51 +00:00
Ioana Stefan
06f759835a Merge changes from topics "ime-tracing-interface", "optimized-ime-tracing-clients", "optimized-ime-tracing-imms", "optimized-ime-tracing-ims"
* changes:
  Log only current client data in IME tracing
  Optimized workflow for IME tracing on InputMethodManagerService side
  Optimized workflow for IME tracing on InputMethodService side
  Optimized workflow for IME tracing on clients side
2020-11-17 15:18:30 +00:00
Miranda Kephart
92b7a54947 Merge "Close screenshot process on user switched" 2020-11-17 14:53:33 +00:00
Jeff DeCew
5185c6bf66 Merge changes from topic "template_redesign"
* changes:
  Update variable names to reduce confusion.
  Fix/hack MessagingStyle notifications
  Reduce notification minimized height
  Fix the placement of the work profile and feedback badges.
  Fix HUNs
  Remove the unneeded icon spacing in the InboxStyle.
  Hide app name from minimized notifications
  Notification Title is 16pt in Big state
  Ensure headerless notification with large icon is big enough.
  Round corners of BigPicture
  Increase the expand button touchable area.
  Remove the reply action entirely.
  Notification template redesign; part 1.
  Remove night-mode override of notification_divider_height
2020-11-17 13:21:53 +00:00
Janis Danisevskis
148e99707e resolve merge conflicts of 07bfeb3630 to master
Test: I solemnly swear I tested this conflict resolution.
Bug: None
Change-Id: Iab84b0fa8c708845aecd13dd45c242147829fd8b
2020-11-16 19:28:35 -08:00
Winson Chung
594c070243 Merge changes from topic "back_gesture_model_qpr" into rvc-qpr-dev am: 898602efc6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13005359

Change-Id: I8017c38ef9536b49ee2b7c1bed328c3e4ac1ec75
2020-11-17 03:26:33 +00:00
Maryam Karimzadehgan
1db145a655 Use ML model for the Back Gesture in EdgeBackGestureHandler. am: c7035fe4fe
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13005356

Change-Id: I22290f085b3eebabcc4ac028f0092d092d2c9864
2020-11-17 03:25:49 +00:00
Treehugger Robot
07bfeb3630 Merge changes I9731d978,I9e325782,I441a4d4d,I86a85e48,I9268fd66, ... am: aeb15e8592 am: 788f03de26 am: 365c77133b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1471565

Change-Id: If797faa86575774a6beeb1788e66ed6ae2d17994
2020-11-17 00:25:55 +00:00
Treehugger Robot
aeb15e8592 Merge changes I9731d978,I9e325782,I441a4d4d,I86a85e48,I9268fd66, ...
* changes:
  Keystore 2.0 SPI: Install legacy Keystore provider as AndroidKeyStoreLegacy
  Keystore 2.0 SPI: Zygote install Keystore2 provider conditionally
  Keystore 2.0 SPI: Evolve the generator SPI.
  Keystore 2.0 SPI: Evolve Factory SPI
  Keystore 2.0 SPI: AndroidKeyStoreProvider loads keys from Keystore 2.0
  Keystore 2.0 SPI: Evolve the Crypto SPI.
  Keystore 2.0 SPI: KeyParameter utilities.
  Keystore 2.0 SPI: Update the chunked streamer.
  Keystore 2.0 SPI: KeyStoreCryptoOperationUtils
  Keystore 2.0 SPI: KeyStoreKeys adopt Keystore 2.0
  Keystore 2.0: Shim around the basic functionality of Keystore 2.0
  Keystore 2.0 SPI: Duplicate Keystore SPI to android.security.keystore2 package
2020-11-16 22:51:03 +00:00
Jeff Sharkey
9242fb8b48 Mechanical refactoring to new XML resolvers.
Related changes are introducing new TypedXmlSerializer and
TypedXmlPullParser interfaces which offer efficient access to
primitive attributes.

This change is a purely mechanical refactoring to prepare for
upcoming data format shifts, and has no behavior changes.

Bug: 171832118
Test: manual
Change-Id: I716193540e8a8baeca72cffbc2ba62bb1f731c49
2020-11-16 14:43:40 -07:00
Jeff Sharkey
03dec84123 Refine TypedXmlPullParser API interface.
Techincally our additions should match the shape of the upstream
XmlPullParser interface, which throws XmlPullParserException when
there is a parsing issue; IOException should be reserved for actual
disk I/O issues.

Improve BinaryXmlPullParser handling of invalid inputs to match
how ForcedTypedXmlPullParser throws on any parsing trouble.

Bug: 171832118
Test: atest FrameworksCoreTests:android.util.XmlTest
Test: atest FrameworksCoreTests:android.util.BinaryXmlTest
Change-Id: I8f0e95d536b53570055a9e174f0849cf635da48c
2020-11-16 14:43:29 -07:00
Maryam Karimzadehgan
0ed68db06c Add flag to get the name of the Model file from the flag in case we want
to try out different models. In addition, we should not log touches in
the middle of the screen for logging so moving the block at the very
beginning.

Test: unittest, manual test
Bug: 150170384
Change-Id: I6ecb556fea01f26323248b999d17c7b1d1b7eeb7
Merged-In: I6ecb556fea01f26323248b999d17c7b1d1b7eeb7
2020-11-16 18:56:28 +00:00
Miranda Kephart
7ef1a5dd15 Close screenshot process on user switched
Currently, we keep the process up even if the user switches,
meaning that in some cases (if the user is switched while the
screenshot UI is up) we will save images to the wrong profile.
This change makes ScreenshotHelper listen for user switches and
close the screenshot service, so that a new screenshot is
guaranteed to be constructed with the correct user's context.

Bug: 170474245
Fix: 170474245
Test: manual -- verified bad state occurs if user switches within
the timeout period, ensured that screenshots work immediately
after switching with this change.

Change-Id: I9d32d0928e6c2bda161d04555438d0dd7afef0ba
2020-11-16 12:48:45 -05:00
Inseob Kim
71d21ecd60 Merge "Remove obsolete property ro.kernel.android.tracing" am: 3661fc477c am: cb98552e03 am: 1ee0a2519e am: d15205e7cc
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1498598

Change-Id: I2925414e9cb2ef68ddee4a6fc89c4d4b56e4def8
2020-11-16 12:40:42 +00:00
Inseob Kim
d15205e7cc Merge "Remove obsolete property ro.kernel.android.tracing" am: 3661fc477c am: cb98552e03 am: 1ee0a2519e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1498598

Change-Id: Icedff80bb584ab245b039d1bb3f5c56fb31d592c
2020-11-16 12:12:16 +00:00
Janis Danisevskis
6180e85e36 Keystore 2.0 SPI: Zygote install Keystore2 provider conditionally
This patch makes Zygote install the Keystore 2.0 SPI as
"AndroidKeyStore" and the old Keystore SPI as "AndroidKeyStoreLegacy"
if the platform property ro.android.security.keystore2.enable is
set to true. This allows us to boot Android with vital components, such
as LockSettingsService, still using the legacy Keystore, while we run
CTS tests against the new implementation, migrate other system
components, and perform migration tests.

This CL will be superseded by a CL that makes Zygote install the
Keystore 2.0 SPI exclusively when the migration of all dependent
components is complete.

Bug: 171305684
Test: None
Change-Id: I9e32578285167c4d63f4f536a07fe98473a883e0
2020-11-13 19:55:41 -08:00
TreeHugger Robot
81a1f37b1c Merge "Consistent handling of modified UTF-8." 2020-11-14 02:29:42 +00:00
Jeff Sharkey
50a99364c6 Consistent handling of modified UTF-8.
A recent set of patches had mismatched handling of UTF-8 vs modified
UTF-8; this change converges all paths towards using modified UTF-8
to match the DataInput/Output API contract.

New tests verify that underlying raw data is compatible between the
upstream and local implementations.

Bug: 171832118
Test: atest FrameworksCoreTests:android.util.CharsetUtilsTest
Test: atest FrameworksCoreTests:android.util.XmlTest
Test: atest FrameworksCoreTests:android.util.BinaryXmlTest
Test: atest FrameworksCoreTests:com.android.internal.util.FastDataTest
Change-Id: I49423edc867839fb6626cd8bd361abe7bc512633
2020-11-13 14:11:41 -07:00
TreeHugger Robot
385212485f Merge "Using CUJ name instead of ordinal in traces" 2020-11-13 20:39:09 +00:00