Commit Graph

17650 Commits

Author SHA1 Message Date
Antonio Kantek
5d9adbcb7b Roll forward of "Revert "TouchMode (5/n) Implementing onTouchModeChanged""
This reverts commit 8e8e721f61.

Reason for revert: ViewRootImpl#windowFocusChanged to also change touch
mode.

Fixes: 173468133
Bug: 193718270
Test: atest FrameworksCoreTests CtsWindowManagerDeviceTestCases

Change-Id: I21780b86574c395cd6c2c5c05a88078c050edb8c
2021-11-04 14:04:57 -07:00
Miranda Kephart
f50afcbabb Don't show nested badge for work profile direct share targets
Currently, we add a work badge (briefcase icon) to app icons in
the sharesheet. If the target is an app, this results in the
regular app icon with a work badge. However, for direct share
targets we show the person, with the app icon as a badge. This
means that for direct share targets, we show an app icon badge
that itself has a (very tiny) work profile badge.

This change removes the "nested" work profile badge for direct
share targets.

Bug: 179783660
Fix: 179783660
Test: manual (shared something and verified that no direct share
targets have a work profile badge, but work profile apps are still
badged)

Change-Id: I5196184a6f1fb442eee905240656faa6c9fc4cfb
2021-11-04 11:45:48 -04:00
Wu Ahan
807047352c Merge "Instrument jank of splash screen AVD and exit animation" into sc-v2-dev am: 43f59bb11b am: d9dd71a4d7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16084829

Change-Id: I04e420e50cb9895f9f8ca181cc5ecbc2750bb2fd
2021-11-03 03:08:35 +00:00
Wu Ahan
d9dd71a4d7 Merge "Instrument jank of splash screen AVD and exit animation" into sc-v2-dev am: 43f59bb11b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16084829

Change-Id: If8539d0bbfe18404d5a3bd4013109bfc6ba23898
2021-11-03 02:57:02 +00:00
Wu Ahan
43f59bb11b Merge "Instrument jank of splash screen AVD and exit animation" into sc-v2-dev 2021-11-03 02:44:08 +00:00
TreeHugger Robot
f70e2f4880 Merge "Avoid autoboxing." 2021-11-02 16:17:08 +00:00
TreeHugger Robot
a2175c42ca Merge "Remove deadlock path between InteractionJankMonitor and FrameTracker" into sc-v2-dev am: 9de009c3a5 am: d9358f6fec
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15828030

Change-Id: I3d4c9d4e3f96c68c7aa4ebac4235a528bb78f901
2021-11-02 15:43:46 +00:00
TreeHugger Robot
d9358f6fec Merge "Remove deadlock path between InteractionJankMonitor and FrameTracker" into sc-v2-dev am: 9de009c3a5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15828030

Change-Id: I516149ab133ca36bcc915bb9cbc65191342a8a01
2021-11-02 15:30:19 +00:00
Ahan Wu
aac160b107 Remove deadlock path between InteractionJankMonitor and FrameTracker
A deadlock path is found:
- FrameTracker$1.lambda$surfaceDestroyed (held A)
- InteractionJankMonitor.end (held B) -> FrameTracker.end (wait for A)
- FrameTracker.end -> InteractionJankMonitor.handleCujEvents (wait for B)
This cl resolves this by using a single lock among monitor and tracker.

Bug: 197804653
Test: atest InteractionJankMonitorTest --rerun-until-failure 100
Test: atest FrameTrackerTest --rerun-until-failure 100
Change-Id: Ia6aa196370bdb51b8a5c84c74a3d174a3d4b689f
2021-11-02 12:23:06 +00:00
Dmitri Plotnikov
6b93377684 Merge "Use per process state CPU Active time in CpuPowerCalculator" 2021-11-01 22:55:51 +00:00
TreeHugger Robot
048b74a0d5 Merge "Avoid autoboxing." 2021-11-01 18:34:05 +00:00
Dmitri Plotnikov
47e5825623 Use per process state CPU Active time in CpuPowerCalculator
Bug: 191921016
Test: atest FrameworksCoreTests:BatteryStatsTests
Change-Id: I6ebbbacb35815fa30392628f7e5a30add365b21f
2021-11-01 17:05:06 +00:00
Dmitri Plotnikov
3b367873a0 Merge "Update CpuPowerCalculator to do per process state attribution" 2021-11-01 17:04:29 +00:00
Kweku Adams
e3c8c2f385 Avoid autoboxing.
Avoid autoboxing longs into Longs by using dedicated long SomeArgs
variables.

Bug: 204459169
Test: Android builds
Change-Id: I4a6056c0cf20a7105553b0db59739434461e9d7e
2021-11-01 09:41:10 -07:00
Kweku Adams
e729a7fbc9 Avoid autoboxing.
Avoid autoboxing longs into Longs by using dedicated long SomeArgs
variables.

Bug: 204459169
Test: Android builds
Change-Id: Ic683ffe641bf586b93c08990fb31762b42249b39
2021-11-01 09:32:28 -07:00
TreeHugger Robot
92bc6f4c08 Merge "Implement InputConnection task cancellation" 2021-10-29 16:49:00 +00:00
Treehugger Robot
c95f7731ca Merge "Create dedicated long variables." am: 78106c0ea4 am: dbca2d9a1f am: 742e35e203 am: 2afff12071 am: 8ec2e93056
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1874248

Change-Id: Ic3ec1ccf1b0e250ec54f2105475164de77a78c1a
2021-10-29 16:17:51 +00:00
Treehugger Robot
8ec2e93056 Merge "Create dedicated long variables." am: 78106c0ea4 am: dbca2d9a1f am: 742e35e203 am: 2afff12071
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1874248

Change-Id: I1a56e7e0c2052ccd6ab6fb9316aabfc4b97f4e2b
2021-10-29 16:04:25 +00:00
Treehugger Robot
2afff12071 Merge "Create dedicated long variables." am: 78106c0ea4 am: dbca2d9a1f am: 742e35e203
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1874248

Change-Id: I872014db65c9f1d1b1cfc0c9c6fb338fb0b3917f
2021-10-29 15:48:38 +00:00
Treehugger Robot
742e35e203 Merge "Create dedicated long variables." am: 78106c0ea4 am: dbca2d9a1f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1874248

Change-Id: I3c334fc91ff1e747a7eb6476cdc669b547ff23c1
2021-10-29 15:30:53 +00:00
Dmitri Plotnikov
f4f9528352 Update CpuPowerCalculator to do per process state attribution
Bug: 191921016
Test: atest FrameworksCoreTests:BatteryStatsTests

Change-Id: I6c69f2b2aa03a61ade6c087e17891c079bc3e054
2021-10-28 18:16:57 -07:00
Yohei Yukawa
5b848f27e4 Implement InputConnection task cancellation
This CL introduces the task cancellation mechanism into
RemoteInputConnection and RemoteInputConnectionImpl.

The code idea is to ignore InputConnection tasks if the session IDs do
not match.  By incrementing the session ID upon every "interruption",
we can effectively cancel any pending events issued before the
"interruption" happened.

Note that even with this CL RemoteInputConnection and
RemoteInputConnectionImpl still uses "0" as the session ID.
Hence there should be no user observable behavior change yet.

Fix: 203086369
Test: presubmit
Change-Id: I383c3958d2ac1a8d217706509fa12a92b381bbb3
2021-10-28 15:47:01 -07:00
kwekua
5aacac2a71 Create dedicated long variables.
Bug: 194532703
Bug: 204459169
Change-Id: Ic4c57d3797b19869e5c9151ccb183543ba5f6df0
2021-10-28 19:33:25 +00:00
Fabian Kozynski
0ec04cf8d7 Merge "Restrict packages to a single concurrent request" 2021-10-28 19:24:08 +00:00
Brad Stenning
8c0a989475 Merge "Allow a shared library to be positioned after the application on the classpath" am: 3120b13f56 am: 6e2646eacd am: dfb49ce58c am: 779d574b3d am: ba7d862103
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1852914

Change-Id: I06f2b0cfba86a150cb4beada0d020d416a655e78
2021-10-27 22:50:59 +00:00
Brad Stenning
ba7d862103 Merge "Allow a shared library to be positioned after the application on the classpath" am: 3120b13f56 am: 6e2646eacd am: dfb49ce58c am: 779d574b3d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1852914

Change-Id: I2e3425881355d2c5185038e2868b55b02867d973
2021-10-27 22:22:20 +00:00
Brad Stenning
779d574b3d Merge "Allow a shared library to be positioned after the application on the classpath" am: 3120b13f56 am: 6e2646eacd am: dfb49ce58c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1852914

Change-Id: Id6cf9e1e78db5f8aea040bcf51b24435a7529e0f
2021-10-27 22:02:48 +00:00
Brad Stenning
dfb49ce58c Merge "Allow a shared library to be positioned after the application on the classpath" am: 3120b13f56 am: 6e2646eacd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1852914

Change-Id: I6b68af9a6f028103453e4cb6e014e852ef8838d1
2021-10-27 21:43:17 +00:00
Brad Stenning
89dfd0902e Allow a shared library to be positioned after the application on the classpath
This is useful if/when it's desired that an application contains the same
fully qualified class name that's also in the library.

The shared libraries that are treated in this manor are controlled by the resource
com.android.internal.R.config_shared_libraries_loaded_after_app

Bug: 179429740

Test: atest SharedLibraryLoadingTests

Change-Id: Ia37ff9bd545918d1e0f1f38548dcd86f177559d5
2021-10-27 10:06:16 -07:00
Treehugger Robot
92e4b728c7 Merge "Fix RRO loading from inside APEXes." am: de3baffb29 am: 23cd20c926 am: 09341a5ec4 am: c1ceac41b8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1830600

Change-Id: Ie51639568f0d24c90c1e10284de0536238ab1778
2021-10-26 23:36:17 +00:00
Treehugger Robot
c1ceac41b8 Merge "Fix RRO loading from inside APEXes." am: de3baffb29 am: 23cd20c926 am: 09341a5ec4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1830600

Change-Id: I47f88d5567eeccdf1d19d2d337d47d168ec98bf5
2021-10-26 23:16:06 +00:00
Treehugger Robot
09341a5ec4 Merge "Fix RRO loading from inside APEXes." am: de3baffb29 am: 23cd20c926
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1830600

Change-Id: I2d2fdda8b4f0fc6f4c9b32ca3e2e1c810b3d5384
2021-10-26 22:46:40 +00:00
Jing Ji
7d478995e5 Merge "Support time-in-state proc stats for UIDs" 2021-10-26 03:33:03 +00:00
Daniel Norman
653a1c1a28 Fix RRO loading from inside APEXes.
APEXes can already contain RRO APKs by using the 'rro' apex Soong
module field. However, these RROs were not being loaded properly by
Zygote or PackageManagerService.

For all RROs inside APEXes, the RRO uses the same overlay config that
is used for other RROs on the APEX's preinstalled partition.

For RROs targeting 'android', which are installed by Zygote
using AssetManager:
1. OverlayConfig looks for active APEXes in the apex-info-list file,
   which is already accessible to Zygote.
2. OverlayConfig passes the APEX module names to OverlayConfigParser,
   for each preinstalled-partition.
3. OverlayConfigParser uses OverlayScanner to scan the
   each /apex/<APEX>/overlay directory.

For other RROs:
1. PackageManagerService already parses and provides RROs inside APEXes
   to OverlayConfig.
2. RROs inside APEXes used to have no config rule applied because their
   path prefix (/apex/) did not match any partition rule. Now, their
   preinstalled path is used instead.

Bug: 199200417
Test: Define a static RRO targeting 'android' inside a /vendor APEX.
      Define a static RRO for settings provider inside a /vendor APEX.
      Observe APEXes are enabled by default.
Test: Make a change to an RRO inside a /vendor APEX.
      m <apex>; adb install <apex artifact>; adb reboot;
      Observe change has taken effect.
Change-Id: I2bce9bc704789329b8c6aac6d476f17ff6718e0f
Merged-In: I2bce9bc704789329b8c6aac6d476f17ff6718e0f
2021-10-25 13:04:24 -07:00
Rahul Sabnis
b2d01e4d5f Merge "Adding @SystemApi annotation to Bluetooth energy stats." am: a12c77ab44 am: a125c31d21 am: f91171d35e am: 6f74b5dd8b am: 01eb71be00
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1854179

Change-Id: I69db1ef2bbb305ee5b6839f763ad1abb867b0f97
2021-10-25 17:31:41 +00:00
Dmitri Plotnikov
0054447bec Merge changes Ie40ff8ae,Iff6eb6de
* changes:
  Add @GuardedBy annotations
  Add support for per process state data to MeasuredEnergyStats
2021-10-25 17:24:55 +00:00
Rahul Sabnis
01eb71be00 Merge "Adding @SystemApi annotation to Bluetooth energy stats." am: a12c77ab44 am: a125c31d21 am: f91171d35e am: 6f74b5dd8b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1854179

Change-Id: I9e271a266c640fb739a5c394d0f5d091803143f4
2021-10-25 17:24:00 +00:00
Rahul Sabnis
6f74b5dd8b Merge "Adding @SystemApi annotation to Bluetooth energy stats." am: a12c77ab44 am: a125c31d21 am: f91171d35e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1854179

Change-Id: Ib49bb57260772b4200a11bb59e010ad8b8aa172e
2021-10-25 17:09:57 +00:00
Rahul Sabnis
f91171d35e Merge "Adding @SystemApi annotation to Bluetooth energy stats." am: a12c77ab44 am: a125c31d21
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1854179

Change-Id: Id4834acb7d38f9bd98e1eb29b9be0636a2f27a73
2021-10-25 16:53:04 +00:00
Daniel Norman
28382069f8 Merge "Fix RRO loading from inside APEXes." 2021-10-25 15:19:11 +00:00
Shawn Lin
61bdfe4267 Merge "Add APIs to get system bar heights" into sc-v2-dev am: 59f51a9538 am: 65c8136d34
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15611697

Change-Id: Ia433011dcfdab2c27533dffa5caad31c47751e46
2021-10-25 04:42:25 +00:00
Shawn Lin
65c8136d34 Merge "Add APIs to get system bar heights" into sc-v2-dev am: 59f51a9538
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15611697

Change-Id: Ia9cb364e66ff9ef778e41d239a78da4b79e6d993
2021-10-25 04:23:07 +00:00
Shawn Lin
59f51a9538 Merge "Add APIs to get system bar heights" into sc-v2-dev 2021-10-25 04:07:12 +00:00
Wu Ahan
61cd0b63c4 Instrument jank of splash screen AVD and exit animation
Add jank instrument support for splash screen avd and exit animation.

Bug: 195736656
Test: see trace in comment
Change-Id: I1fdb9e14145bcf519eea99e440de74238e3c765c
2021-10-25 03:56:42 +00:00
TreeHugger Robot
e2323bb53c Merge "Add InputConnectionCommandHeader" 2021-10-22 19:04:59 +00:00
Dmitri Plotnikov
e713584cf5 Add @GuardedBy annotations
Test: m -j64 RUN_ERROR_PRONE=true framework 2>&1  | grep BatteryStatsImpl | grep GuardedBy

Change-Id: Ie40ff8ae50bdd2577d7b695f1b8a9e7111cee854
2021-10-21 20:15:23 -07:00
Jing Ji
ccfcee5bd1 Support time-in-state proc stats for UIDs
Bug: 200326767
Test: atest ProcStatsValidationTests
Test: atest ProcessStatsDumpsysTest
Test: Manual - dumpsys procstats -a
Change-Id: Ic2da178c244706bb43488e57fb808a77225bad6d
2021-10-21 13:55:19 -07:00
Dmitri Plotnikov
ecee8e9134 Add support for per process state data to MeasuredEnergyStats
Also, simplify the design of MeasuredEnergyStats by separating
data from configuration

Bug: 191921016
Test: atest FrameworksCoreTests:BatteryStatsTests

Change-Id: Iff6eb6ded644fbc6886f6a7efdb6577b1fa42cf5
2021-10-21 13:53:45 -07:00
Etienne Ruffieux
d372361fe3 Adding @SystemApi annotation to Bluetooth energy stats.
Added @SystemApi annotation to BluetoothActivityEnergyInfo
and UidTraffic getters for mainline compatibility. Replaced
raw array by List. Deleted unused constructors.

Tag: #feature
Bug: 200201373
Test: Manual
Change-Id: Id93215f48bf08d31ac269af9e064cf598f50b6d3
2021-10-21 20:39:31 +00:00
Daniel Norman
66ebced16e Fix RRO loading from inside APEXes.
APEXes can already contain RRO APKs by using the 'rro' apex Soong
module field. However, these RROs were not being loaded properly by
Zygote or PackageManagerService.

For all RROs inside APEXes, the RRO uses the same overlay config that
is used for other RROs on the APEX's preinstalled partition.

For RROs targeting 'android', which are installed by Zygote
using AssetManager:
1. OverlayConfig looks for active APEXes in the apex-info-list file,
   which is already accessible to Zygote.
2. OverlayConfig passes the APEX module names to OverlayConfigParser,
   for each preinstalled-partition.
3. OverlayConfigParser uses OverlayScanner to scan the
   each /apex/<APEX>/overlay directory.

For other RROs:
1. PackageManagerService already parses and provides RROs inside APEXes
   to OverlayConfig.
2. RROs inside APEXes used to have no config rule applied because their
   path prefix (/apex/) did not match any partition rule. Now, their
   preinstalled path is used instead.

Bug: 199200417
Test: Define a static RRO targeting 'android' inside a /vendor APEX.
      Define a static RRO for settings provider inside a /vendor APEX.
      Observe APEXes are enabled by default.
Test: Make a change to an RRO inside a /vendor APEX.
      m <apex>; adb install <apex artifact>; adb reboot;
      Observe change has taken effect.
Change-Id: I2bce9bc704789329b8c6aac6d476f17ff6718e0f
2021-10-21 12:47:16 -07:00