Commit Graph

15100 Commits

Author SHA1 Message Date
TreeHugger Robot
af3e372ca6 Merge "Fix handling of null "standalone" value." 2020-12-01 21:00:44 +00:00
Jeff Sharkey
956f2ac9ac Fix handling of null "standalone" value.
As part of transitioning the OS towards FastXmlSerializer, we found
at least one example of a caller who is omitting a "standalone" value
by passing null.  Handle this by mirroring the behavior of the
upstream KXmlSerializer and omitting the attribute entirely when
the value is undefined.

Bug: 174561276
Test: manual
Change-Id: I868aceaed8e3dd1575947a56b28f8fff8759c0ae
2020-12-01 11:53:59 -07:00
Wilson Wu
b325530f65 Merge "Make IInputMethodManager to oneway (3/N)" 2020-12-01 10:39:18 +00:00
Eran Messeri
6aa9b789e4 Merge "DPMS: Enforce password complexity in lockscreen setting" 2020-12-01 09:53:08 +00:00
Wilson Wu
b9590fa1e1 Make IInputMethodManager to oneway (3/N)
-. Create InputBindResult result callback and apply it
   to startInputOrWindowGainedFocus().
-. Create a callback utility class.

Bug: 163453493
Test: Manual test with keyboard
Test: atest CtsInputMethodTestCases
Change-Id: If4b40244a2e0e3b11c38c1da9340ba8e5166ad64
2020-12-01 14:58:00 +08:00
Wilson Wu
21701d24c7 Merge "Prevent ANR when app is terminated abruptly" 2020-12-01 06:11:01 +00:00
Eran Messeri
9afde363cc DPMS: Enforce password complexity in lockscreen setting
Enforce a lock screen that adheres with the required complexity set by
the admin.

To do this, provide a method to let the Settings code query the
DevicePolicyManager for the effective password complexities that applies
to a user.

Bug: 165573442
Test: Manually, set complexity using TestDPC.
Test: m RunSettingsRoboTests
Change-Id: Ia03aebb725cacc7104d7fd765ae6ab53456e33e0
2020-11-30 22:28:06 +00:00
Alec Mouri
d90d2cad62 Merge "Temporarily additional stats into battery dumpsys" 2020-11-30 21:49:11 +00:00
TreeHugger Robot
a2be7ce315 Merge "AnimatedImageDrawable in MessageStyle+ConversationStyle" 2020-11-30 19:43:40 +00:00
Ioana Stefan
c9393ea0ad Merge changes I6718aa31,I4dc6147f
* changes:
  Add InputConnection app side tracing
  Add InputConnection debug information
2020-11-30 11:33:14 +00:00
Wilson Wu
02c934b09b Prevent ANR when app is terminated abruptly
When app is forced stop, the removeImeSurface flow
from DisplayImeController will be dropped in IMMS
and IMS because some fields (IMMS#mShowRequested,
IMS#mShowInputRequested..etc) still remain previous
state. The launcher cannot receive keyevent at that
time since IME surface remain and cause ANR.

Calling hideCurrentInputLocked() to hide the IME
surface when a IME client is removed.

Bug: 167780081
Test: atest CtsInputMethodTestCases
Test: Verify with issue reproduce steps:
      1) Add another language to the keyboard
      2) Open chrome and tap the EditText to show keyboard
      3) Tap to show language swiching dialog
      4) adb shell am force-stop com.android.chrome
      5) adb shell input keyevent 8
      6) Verify there is no ANR happen
Change-Id: Ifb91111f7136952462678ff6d0a5e917abb5005e
2020-11-30 17:12:05 +08:00
Ioana Stefan
bbdec456e2 Add InputConnection app side tracing
This change adds tracing for the methods exposed by the InputConnection
interface. The tracing is added to the wrapper class used to handle
InputConnection implementations created by different apps.

Bug: 154348613
Test: flash a device
      record a trace with Perfetto at https://ui.perfetto.dev/#!/record
      visualize traces and duration of tracing tags
Change-Id: I6718aa3183c95fc6802d93137e22d21b71869cfc
2020-11-27 17:44:10 +00:00
Ioana Stefan
c47b324d39 Add InputConnection debug information
Add InputConnection information to IME tracing. This change adds
only information about the text associated with an
EditableInputConnection instance: editable text, selected text, text
before and after the cursor (for a preset length) and cursor caps mode.

Test: flash a device
      start IME tracing with `adb shell ime tracing start`
      stop IME tracing with `adb shell ime tracing stop`
      visualise the traces in Winscope and see the inputConnection information
Change-Id: I4dc6147fb7baa2cea413d2c44226e8c84c056c37
2020-11-27 15:20:58 +00:00
TreeHugger Robot
bf598cdfbc Merge "SharedLibraryInfo.isNative() returns true for native libs" 2020-11-26 23:14:13 +00:00
Ioana Stefan
eb778956a4 Merge "Expose public interface to starting and stopping IME tracing" 2020-11-26 14:32:26 +00:00
Treehugger Robot
eeef7c8271 Merge "Make ChangeReporter.{Status,Source} proper enums" am: a421f8ff53 am: cdd4f0bdaf am: 4d61ec6e60
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1511333

Change-Id: Ib1c2122bb8fdc876529faf37954e1745b5e73805
2020-11-26 14:16:16 +00:00
Treehugger Robot
4d61ec6e60 Merge "Make ChangeReporter.{Status,Source} proper enums" am: a421f8ff53 am: cdd4f0bdaf
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1511333

Change-Id: Ie7b5bd929dba5bdaee67e5381bcac7099c1e0596
2020-11-26 14:11:15 +00:00
Treehugger Robot
a421f8ff53 Merge "Make ChangeReporter.{Status,Source} proper enums" 2020-11-26 13:37:45 +00:00
TreeHugger Robot
d329889eea Merge "Let IME#onFinishInput called without dup onStartInput when screen-off" 2020-11-26 11:25:22 +00:00
Treehugger Robot
b84b78893b Merge "Clarify why it's safe to add java.library.path to the classloader namespace." am: 27310f0340 am: bca09c81a3 am: e14a8ca797
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1507503

Change-Id: I39afd342c20288f3776da08584c5d2fa73c4f220
2020-11-26 03:32:49 +00:00
Treehugger Robot
e14a8ca797 Merge "Clarify why it's safe to add java.library.path to the classloader namespace." am: 27310f0340 am: bca09c81a3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1507503

Change-Id: Ia31368bc67bfde85e6845ed8832966363fdc7ac0
2020-11-26 03:10:33 +00:00
Treehugger Robot
27310f0340 Merge "Clarify why it's safe to add java.library.path to the classloader namespace." 2020-11-26 00:40:01 +00:00
Abodunrinwa Toki
bc9ba87f5a Merge "Ensure the toolbar refreshes its PendingIntents when it changes." 2020-11-25 22:40:13 +00:00
Alec Mouri
39db76b534 Temporarily additional stats into battery dumpsys
In dumpsys the following additional information is surfaced:
* Information regarding the current battery capacity as reported from
the battery info callback
* "Real" charge and power information reported from the IHealth HAL
* Per-uid Foreground power estimates

Bug: 169376495
Test: builds
Test: dumpsys batterystats
Change-Id: I90722f349b87d5102afa48e0bd32b04840691364
2020-11-25 13:46:20 -08:00
Andrei Onea
10fb2bcd15 Make ChangeReporter.{Status,Source} proper enums
They mistakenly were tagged as flags, which is not applicable for either
of them.

Test: m
Bug: 174237593
Change-Id: I982ddc53839f13255ea68c9852fd20c3fe5a8433
2020-11-25 17:30:23 +00:00
Ming-Shin Lu
152eacec4f Let IME#onFinishInput called without dup onStartInput when screen-off
Also called IME#onStartInput without dup onFinishInput when screen-on,
to fix the long-standing IME input connection lifecycle issue when
device screen state changes.

Bug: 156215187
Bug: 26851566
Test: atest InputMethodStartInputLifecycleTest
Test: manual as below steps
      0) Enable InputMethodService debug flag.
      0-1) In Settings -> Develop options -> AppCompatibility Changes,
           Select Gboard and then toggle
           "FINISH_INPUT_NO_FALLBACK_CONNECTION" change.
      1) Launch a app with focused a editor and show soft-input
      2) When device screen turned-off, will see InputMethodService only
         callbacks below logs:
           CALL: doFinishInput
           CALL: onFinishInputView
           CALL: onFinishInput
      3) When device screen turned-on, will see InputMethodService only
         callbacks below logs:
           CALL: onStartInput
           CALL: onStartInputView

Change-Id: I8a657e75e274d842fb46b60375f6aeafeab96a59
2020-11-25 23:32:49 +08:00
Wilson Wu
151c83a08a Merge "Make IInputMethodManager to oneway (2/N)" 2020-11-25 05:59:39 +00:00
Steve Elliott
75c0c1522d AnimatedImageDrawable in MessageStyle+ConversationStyle
Test: manual
Bug: 163595585
Change-Id: I0ab88ebefb5d94fd9a2392770c87cf9fcf3ad6aa
2020-11-25 05:14:08 +00:00
Ioana Stefan
e92ea72ef7 Expose public interface to starting and stopping IME tracing
The added interface makes it possible to start or stop IME tracing from
another process. This will be used together with the DevelopmentTiles to
ghather IME tracing data when the WinscopeTrace tile is used.

Bug: 154348613
Test: flash a device together with the other change in this topic
      enable the WinscopeTrace tile and do some actions
      disable the WinscopeTrace tile
      do a bugreport and visualise contents in Winscope
      or just check contents of /data/misc/wmtrace/ through adb
Change-Id: Id03ede35f71c3d513dea50ef69e4ed4ce05a8d53
2020-11-24 11:17:31 +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
Jiyong Park
4e4e82225a SharedLibraryInfo.isNative() returns true for native libs
This CL fixes a bug that SharedLibraryInfo.isNative() returns false
even for native shared libraries. This was because when a
SharedLibraryInfo is copied to a new SharedLibraryInfo (to add some
extra info about declaring package, etc.), the native-ness was
mistakenly ignored. Fixing the issue.

Also, the old constructor of SharedLibraryInfo that doesn't accept the
native-ness was removed to prevent similar mistakes.

Bug: 142191088
Test: atest CtsUsesNativeLibraryTest
Test: write an app that calls PackageManager.getSharedLibraries()
and inspect the mIsNative fields in the returned list. Entries for
native shared libs all have mIsNative=false. Will add a testcase to
the CTS test when isNative() becomes an API.

Change-Id: I35d9530f332614e0444448feec70a4461c9bbfa8
2020-11-24 18:35:37 +09: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
Martin Stjernholm
6e258a9c8b Clarify why it's safe to add java.library.path to the classloader
namespace.

Test: N/A - comment change only
Change-Id: I9ae485afc4b6b827c09bb7d65c3987eefd433492
2020-11-20 18:52:14 +00:00
Chiachang Wang
61199f587e Move BasicShellCommandHandler to frameworks/lib/modules-utils am: d5726c1916 am: d3e4d83eb7 am: b6f524b2df
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1483965

Change-Id: Ib09544e292d472e8dcd7dcf218035a0ec6de293c
2020-11-20 09:04:26 +00:00
Chiachang Wang
d3e4d83eb7 Move BasicShellCommandHandler to frameworks/lib/modules-utils am: d5726c1916
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1483965

Change-Id: Ib2a99f1aeb31b89e69a5b313ca3774ba145dde33
2020-11-20 07:47:11 +00:00
Chiachang Wang
1b414d61b4 Merge changes from topic "move_BSCH"
* changes:
  Remove BasicShellCommandHandler from frameworks/base
  Move BasicShellCommandHandler to frameworks/lib/modules-utils
2020-11-20 07:29:56 +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
d5726c1916 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: I8a2873df6e7d8342b7a8b466bda155f74c807ee3
Merged-In: Ida30c877116090616d4bf3f87fdad835446dac84
2020-11-19 03:16:03 +00:00