Commit Graph

16264 Commits

Author SHA1 Message Date
Winson Chiu
627cac02ad Merge changes Ie90dc390,Ia9513817 into sc-dev
* changes:
  Strip invalid domains in DVS#addPackage
  Move withPackageSettingsSnapshot methods into PackageManagerInternal
2021-04-30 21:24:05 +00:00
Florian Mayer
748c3a8040 Merge changes from topic "playprofileable" into sc-dev
* changes:
  Add packageInstaller to packages.list.
  Add profileable opt-out to packages.list.
2021-04-30 20:42:16 +00:00
Winson
a74c1f3c69 Move withPackageSettingsSnapshot methods into PackageManagerInternal
For consumers who don't care about blocking package data updates and
only need data at a specific snapshot in time, these methods would
avoid locking PMS during the iteration process.

Bug: 183643808

Test: atest com.android.server.pm.test.verify.domain

Change-Id: Ia951381798d75f77c4ad5fc010a469b69992f074
2021-04-30 10:46:32 -07:00
Winson Chiu
1b8610d9a9 Merge "Implement domain verification backup and restore" into sc-dev 2021-04-30 16:17:30 +00:00
Florian Mayer
6ea939f3bf Add profileable opt-out to packages.list.
We now have two notions of profileable:
 * profileable from shell: the user can profile the app using ADB-based
   tools (e.g. Android Studio or shell) . This is off unless the app
   opts in.
 * profileable from platform services: trusted platform services can,
   in accordance to the app installer's Terms Of Service profile the
   app. This is the default unless the app opts out. This is enforced
   by the profilers with information provided by the framework.

A new flag <profileable android:enable="false"/> can be used to opt out
of profiling in general. If this is not given, the app is considered
profilable by the platform, but the data will *not* be exposed to the
user via shell or adb. If profiles of the app should be given to the
user (e.g. for using Android Studio), <profileable
android:shell="true"/> can can still be used.

We write whether the app opted out or not to packages.list, to be
consumed by the profilers.

CTS-Coverage-Bug: 186720347

Test: m
Test: on userdebug: /data/system/packages.list for preinstalled, Play
      Store installed app and sideloaded app.
Test: on user: atest CtsPerfettoTestCases.
Bug: 170284829

Change-Id: I8d4bbedc043976fd11a95a511bd95a05c7ced7b9
2021-04-30 11:52:31 +00:00
PETER LIANG
42c7ce491e Merge "Fix the GAR issue of all the icons on A11y FM have no meaningful A11y label." into sc-dev 2021-04-30 03:51:13 +00:00
Taran Singh
2fef6def9a Merge "Add log for showSoftInput called from Insets API" into sc-dev 2021-04-29 22:41:26 +00:00
Jing Ji
be5425c6fd Merge "Add state BOUND_FGS_OR_TOP and FGS into ProcessState Enum in ProcStats" into sc-dev 2021-04-29 21:23:11 +00:00
Jing Ji
72eee56f06 Merge "Support aggregation over association sources per process" into sc-dev 2021-04-29 20:46:50 +00:00
Jing Ji
9d28fa063d Add state BOUND_FGS_OR_TOP and FGS into ProcessState Enum in ProcStats
Previously these two states in AMS are being mapped into the ImpFg
in the ProcStats, we were unable to distinguish them in the aggregated
proc stats. Now with these two new states in ProcStats, the process
states we're using in AMS could be mapped into them, and eventually
get mapped into the state definition in the aggregated proc stats.

Bug: 186438656
Test: atest ProcStatsValidationTests
Test: atest ProcessStatsDumpsysTest
Test: atest CtsIncidentHostTestCases:ProcStatsProtoTest
Test: atest CtsStatsdHostTestCases
Test: atest CtsAppTestCases:ActivityManagerProcessStateTest
Change-Id: I94eaa18d9c99f90200603fd0aafe198b62e963f7
2021-04-29 10:05:19 -07:00
James O'Leary
3d121b7119 Merge "Don't use pow for distance calculation" into sc-dev 2021-04-29 15:55:49 +00:00
James O'Leary
fada9e8571 Don't use pow for distance calculation
Bug: 186664313
Test: `mp droid`, verify wallpaper extraction continues to succeed
Change-Id: I8136522379abfe5cbce83beae904559e68725aca
2021-04-29 11:48:39 -04:00
Peter_Liang
6f90704f49 Fix the GAR issue of all the icons on A11y FM have no meaningful A11y label.
Patch action:
Add the state or content description into the corresponding feature target.

Bug: 178289063
Test: atest AccessibilityTargetAdapterTest AccessibilityTargetAdapterTest
Change-Id: I2f421da027bc95021ab24cadf8b3afdc30fa6d4a
2021-04-29 21:58:35 +08:00
Wilson Wu
37051aef38 Make IInputMethodPrivilegedOperations to async (6/N)
-. Remove VoidResultCallback of applyImeVisibility.
   and let it be truly asynchronous.
-. Rename this method to applyImeVisibilityAsync.

Bug: 183587528
Test: atest CtsInputMethodTestCases
Change-Id: Ica564c526223d32641a2485c0c0f3490fe4bfd39
2021-04-29 16:05:05 +08:00
Treehugger Robot
1b68aeee56 Merge "Internal graphics package owners" am: 1084a81a68 am: 8f7c666464 am: 3bbfa132e8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1690227

Change-Id: If739aeeea360f864710746e133bedc335808da9d
2021-04-29 03:38:14 +00:00
Treehugger Robot
3bbfa132e8 Merge "Internal graphics package owners" am: 1084a81a68 am: 8f7c666464
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1690227

Change-Id: Ic7ba3d5ea2be74c0860eb61d80aac078e17b48de
2021-04-29 03:35:43 +00:00
Yohei Yukawa
c09a657113 Merge "Make IInputMethodPrivilegedOperations to async (5/N)" into sc-dev 2021-04-29 00:45:17 +00:00
Lucas Dupin
56b401709b Internal graphics package owners
Bug: 186640057
Test: none
Change-Id: I59af9cbaa0fbc1b3206b9b3d852e845413aa9e71
2021-04-28 14:09:00 -07:00
Taran Singh
11472f70b4 Add log for showSoftInput called from Insets API
Add a debug log to identify calls to showSoftInput from Insets API.

Fix: 1865976
Test: manually using steps:
      1. Use an app like launcher that uses Insets API to show IME.
      2. dump using adb shell dumpsys input_method
      3. Verify log.
      4. use another app that shows IME using showSoftInput like gmail
      5. verify the log

Change-Id: I6ba0d3f7912855f31e033735557b44eeed3e6652
2021-04-28 18:30:25 +00:00
Yohei Yukawa
1d14a33860 Merge "Make IInputMethodPrivilegedOperations to async (4/N)" into sc-dev 2021-04-28 15:45:58 +00:00
Siim Sammul
afbe75fd4a Merge "Add a version of SettingsObserver to BinderCallsStats and make it public so it could be used to collect binder latency data from bluetooth and telephony." into sc-dev 2021-04-28 11:38:42 +00:00
Jason Hsu
b9e5094100 Merge "Add accessibility shortcut icon into adaptive icon" into sc-dev 2021-04-28 10:02:14 +00:00
Wilson Wu
e702c9d381 Make IInputMethodPrivilegedOperations to async (5/N)
-. Remove VoidResultCallback of notifyUserAction.
   and let it be truly asynchronous.
-. Rename this method to notifyUserActionAsync.

Bug: 183587528
Test: atest CtsInputMethodTestCases
Change-Id: I384fd689b6bd1d418ff5208444fbba2c1eac6f85
2021-04-28 14:40:08 +08:00
jasonwshsu
5ade32bdf6 Add accessibility shortcut icon into adaptive icon
* add/modify icons list: color correction, color inversion,
magnification, extra dim

Fix: 184081577
Test: manual test
Change-Id: I5ceee75f0263072805af23a7bbdfc68d7008db6e
2021-04-28 14:08:41 +08:00
Wilson Wu
78a23141be Make IInputMethodPrivilegedOperations to async (4/N)
-. Remove VoidResultCallback of updateStatusIcon
   and let it be truly asynchronous.
-. Rename this method to updateStatusIconAsync.

Bug: 183587528
Test: atest CtsInputMethodTestCases
Change-Id: Ic7759354ec06a3293ea370ab7afe7422eb2d9356
2021-04-28 12:56:38 +08:00
Jing Ji
276ff21ada Support aggregation over association sources per process
Process state association tracks the state via the bindings between
the source and the destination processes, there could be overlaps
from the timeline wise over these bindings, hence the exact duration
that a source process binds to a destination process is unknown.

Now add the support of this, by tracking the association sources per
process, the state changes of these sources will be driven by the
changes from individual source state per association.

The output of 'procstats dump -a; will include a new section
"Aggregated Association Sources" per process.An example:

  * com.android.providers.contacts / u0a122 / v30:
      Process android.process.acore (multi, 2 entries):
        [......]
        Aggregated Association Sources:
          <- com.android.bluetooth/1002 (com.android.bluetooth):
               Active count 271 (ImpFg): +1m0s849ms / 9.2%

Also updated the logic of pulling the procstats data from stastd to
use this new data structure.

Bug: 183101565
Bug: 186438656
Test: atest ProcStatsValidationTests
Test: atest ProcessStatsDumpsysTest
Test: atest CtsIncidentHostTestCases:ProcStatsProtoTest
Test: atest CtsStatsdHostTestCases
Test: Manual - compare statsd proto dump vs. dumpsys procstat -a
Change-Id: I9bf9ba7565761ae3d42046ed4886c8d17f6c18b3
2021-04-27 13:44:28 -07:00
Jeff DeCew
ac431bc027 Merge "Change icon alignment for collapsed Conversation groups" into sc-dev 2021-04-27 19:26:55 +00:00
Siim Sammul
58f933471d Add a version of SettingsObserver to BinderCallsStats and make it public so it could be
used to collect binder latency data from bluetooth and telephony.

Test: latency collection is unit tested, this is just an alternative settings configuration
Bug: 180584913
Change-Id: Ide51afb7eb26a96c7692bceb0a22585a74f08aa7
2021-04-27 18:47:00 +01:00
Siim Sammul
909042e9a4 Merge "Enable binder latency collection from system_server for dogfood." into sc-dev 2021-04-27 17:32:02 +00:00
Jeff DeCew
2bd9821e71 Change icon alignment for collapsed Conversation groups
Fixes: 185512447
Test: manual; visual testing
Change-Id: I4c007eef035b1bc225d0bea52c5b330ecabd670c
2021-04-27 09:36:08 -04:00
Ming-Shin Lu
20f2cdd39a Merge "Consolidate InputMethodManager#toggleSoftInput reliability" into sc-dev 2021-04-27 02:32:35 +00:00
Dmitri Plotnikov
840f73e773 Merge "Use POWER_COMPONENT_ constants instead of TIME_COMPONENT_... constants" into sc-dev 2021-04-26 22:44:26 +00:00
Jeff DeCew
2c87b91f85 Merge "Fix layout oscillation at the root of a few bugs." into sc-dev 2021-04-26 21:44:14 +00:00
TreeHugger Robot
ecfc497460 Merge "Async startInputOrWindowGainedFocus" into sc-dev 2021-04-26 19:06:26 +00:00
Ming-Shin Lu
2c8068c98a Consolidate InputMethodManager#toggleSoftInput reliability
As previously InputMethodManager#toggleSoftInput is designed to tell
InputMethodService directly through IInputMethodSession to toggle
soft-keyboard visibility, this could be happened some unexpected IME
visibility issues that when the app calling this method in the wrong
state like the app toggling IME visibility when the app is off-screen
but unexpectedly it ends up showing soft-keyboard when the IME is in
invisible state.

To minimize the app compatibility without changing the public API
surface and reducing unexpected IME visibilty been toggled behavior
especially happens when switching the apps, changed the internal IPC
protocols to call IMMS#showSoftInput or IMMS#hideSoftInput directly
according the previous IME consumer requested visibility state,
so that in IMMS side can validate to see if the token user is
still focused and ready to toggle the IME visibility to show or hide.

As the result, we deprecated toggleSoftInput and
toggleSoftInputFromWindow to state the reason as the above, and
recommand to use showSoftInput or hideSoftInputFromWindow instead,
so that framework side no longer has to call {InputMethodSessionWrapper,
InputMethodSessionImpl}#toggleSoftInput.

Bug: 182071625
Test: m checkapi doc-comment-check-docs
Test: atest KeyboardVisibilityControlTest#testToggleSoftInput
Change-Id: I390dc029e7bcc30c200926a9bfbbbd0268a1f714
2021-04-27 01:34:12 +08:00
Jeff DeCew
fb33675a10 Fix layout oscillation at the root of a few bugs.
Note: The CL which introduced this bug was Ic9cd89e899a03010a523bee4f1ef72fbfbd8b43f

Test: visual, manual
Test: Use TalkBack to validate that the size of the touch target is still >48dp tall.
Test: Use an app (e.g. LINE) which only posts the most recent message in an update to send 2+ messages to the device (to make the unread number visible), and validate that 1) the text is visible, and 2) there are not thousands of View errors spamming adb.
Fixes: 182474419
Change-Id: Ia23113f5903fe2c508fc2dbad99160471dcec5fd
2021-04-26 10:36:58 -04:00
Siim Sammul
f95c09e3f4 Enable binder latency collection from system_server for dogfood.
Bug: 180584913
Test: code is unit tested
Change-Id: I68ab7f3bfc3364505ab6005933c2dc92f6eb486e
2021-04-26 14:22:26 +01:00
Wilson Wu
5e2d9f271d Async startInputOrWindowGainedFocus
We ignore the result if startInputReason is
WINDOW_FOCUS_GAIN_REPORT_WITH_CONNECTION or
WINDOW_FOCUS_GAIN_REPORT_WITHOUT_CONNECTION
in startInputOrWindowGainedFocus.

Introduce USE_REPORT_WINDOW_GAINED_FOCUS_ASYNC
flag to control following behavior:

-. Don't wait the result if it only report the
   focus gain. Have another IPC for this case
   to prevent the UI thread be blocked.

-. Throw the exception to the client side if it
   happened.

Bug: 185928120
Test: atest CtsInputMethodTestCases
Change-Id: Ic584203c1221fbae17f5e2d8f09e3992df061646
2021-04-26 17:13:03 +08:00
Lucas Dupin
15565a139c Merge "Color extraction OWNERS" am: 9ed1dac67c am: 4111abc621 am: f9215ba0ef
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1685208

Change-Id: I68ae0f0233134718317dac205deac5a7a61d3d6d
2021-04-25 02:14:08 +00:00
Lucas Dupin
f9215ba0ef Merge "Color extraction OWNERS" am: 9ed1dac67c am: 4111abc621
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1685208

Change-Id: I4a1b6666bbb1abd91641b256c3b5a2ddd119ca04
2021-04-25 02:00:36 +00:00
Lucas Dupin
477aab1fa3 Merge "A new shade pull down animation" into sc-dev 2021-04-25 01:03:18 +00:00
Lucas Dupin
370279459d Color extraction OWNERS
Bug: 184891403
Test: none
Change-Id: Ieba5767a8c6f465bf8eca28c277aba5b9a6b7f9b
2021-04-24 13:51:21 -07:00
Lucas Dupin
976de38e37 A new shade pull down animation
Test: manual
Test: atest ScrimViewTest
Test: atest ScrimControllerTest
Bug: 185683835
Fixes: 184891403
Change-Id: I1c51f3dc0d8afe97457aea8712c4322ebbda6ae4
2021-04-24 13:08:34 -07:00
Santos Cordon
33946ea33f Merge "Add listener for brightness-specific changes." into sc-dev 2021-04-24 15:38:20 +00:00
TreeHugger Robot
7edccec5c6 Merge "Avoid NetInitiatedActivity overlaid by non-system apps" into sc-dev 2021-04-24 03:41:24 +00:00
Dmitri Plotnikov
70b37cbf6a Use POWER_COMPONENT_ constants instead of TIME_COMPONENT_... constants
Bug: 186006876
Test: atest FrameworksCoreTests:com.android.internal.os.BatteryStatsTests
Change-Id: Ie52616e8d7b0d5c848802af94aeb3d3780af117a
2021-04-23 14:39:28 -07:00
Santos Cordon
e5dae0ddc5 Add listener for brightness-specific changes.
Add FLAG to registerDisplayListener method to receive
brightness-specific changes.

getBrightnessInfo() method added to
android.view.Display to get brightness value, min, max
and highBrightnessMode status.

Bug: 168210311
Bug: 171023136
Test: atest com.android.server.display
Change-Id: I581e86e039cc7cf1bbca4cf7af03daa41dbddfe0
2021-04-23 22:18:55 +01:00
Yu-Han Yang
b7e17b9a74 Avoid NetInitiatedActivity overlaid by non-system apps
Bug: 181588735
Test: tests passing
Change-Id: I95868b786ed8a57f77f4f27fde96e88c6b9f04dc
2021-04-23 13:59:47 -07:00
Song Hu
0482828ca6 Merge "Query and surface Quick Share chip before screenshot image compress/export. Update chip intent, once image URL is available after compress/export." into sc-dev 2021-04-23 17:10:16 +00:00
Jorim Jaggi
469c53f256 Merge "Only start tracing in the next frame" into sc-dev 2021-04-23 16:23:12 +00:00