Commit Graph

15595 Commits

Author SHA1 Message Date
Ben Lin
6292565f13 Merge changes If42d4470,Ia0b701b7 into sc-dev
* changes:
  PiP: Add tap-to-unstash function.
  PiP: Allow stashing via dropping on the edge.
2021-02-02 19:27:55 +00:00
Wilson Wu
d8343be5ac Merge "Make IInputMethodManager to oneway (11/N)" into sc-dev 2021-02-02 07:35:56 +00:00
Jeff Sharkey
38835a6212 Merge "Add BATTERY_STATS_OWNERS for IBatteryStats.aidl" am: 0db5d441ad am: f486d1dc63 am: db00fbb7b3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1568920

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I799ab3aaaac352805ad2c8dccc3e1f155484494c
2021-02-02 01:28:57 +00:00
Remi NGUYEN VAN
9d060c9e6e Merge "Use consistent Wifi-only checking" into sc-dev 2021-02-02 01:26:16 +00:00
Jeff Sharkey
db00fbb7b3 Merge "Add BATTERY_STATS_OWNERS for IBatteryStats.aidl" am: 0db5d441ad am: f486d1dc63
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1568920

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie4e04f57ef860e64e5b3af541067c5d163abc7f1
2021-02-02 00:44:46 +00:00
Dmitri Plotnikov
1ef5d3f87e Add BATTERY_STATS_OWNERS for IBatteryStats.aidl
Change-Id: Iffb8ded9ff5edc899ab38c74ffe3ad98793ca67c
2021-02-01 23:42:59 +00:00
Chloris Kuo
b3a5d74f93 Merge "Conversation Blocklist" into sc-dev 2021-02-01 22:32:32 +00:00
Ben Lin
6930fd5cbc PiP: Allow stashing via dropping on the edge.
Changes so that:
1) PiP now can be stashed when the user releases/let go of input when
PiP is currently floating on top of the left/right edge of the device.
Currently, 1/3 of the PiP needs to be off-screen in order for stash to
happen.
2) Stashing is now allowed from one edge to the other (e.g. user flings
from left to right, right to left), with VERY high velocity (>=
18000.f).

Bug: 178752503
Test: Let go of PiP when off screen, stashes
Test: fling from left to right with extremely high velocity, stashes
Change-Id: Ia0b701b75f598965d79b07b10f09118f80562f09
2021-02-01 12:41:14 -08:00
Tony Huang
d346ee5315 Merge "Make AppTransition animations sharable (1/n)" into sc-dev 2021-02-01 10:16:33 +00:00
Seigo Nonaka
ff85b932d7 Add FontManager#updateFont API
Bug: 173619554
Test: atest FontManagerTest
Change-Id: I261e55783978d9840b06c586389e2126bc6eb2ca
2021-01-29 14:28:46 -08:00
Chloris Kuo
73bcb5b51f Conversation Blocklist
Add KEY_NOT_CONVERSATION into default allowed adjustments list and add
DeviceConfig to enable it

Bug: 173106605, 178151392
Test: tested on device
Change-Id: I9a34fc3aadadde785bfce2bdf2ff35b0cc0b0ec6
(cherry picked from commit 6fe1741d37)
2021-01-29 17:52:38 +00:00
TreeHugger Robot
8f15e41d76 Merge "ScreenPowerCalculator is responsible for smearing" into sc-dev 2021-01-28 20:39:30 +00:00
TreeHugger Robot
8f046c76d7 Merge "Revert "Revert "Use eBPF-based time-in-state monitoring for groups of threads""" into sc-dev 2021-01-28 18:20:14 +00:00
TreeHugger Robot
67c5128909 Merge "Correct trace name of LatencyTracker" into sc-dev 2021-01-28 13:24:30 +00:00
Wilson Wu
f226a79fee Make IInputMethodManager to oneway (11/N)
Comply following methods to IVoidResultCallback to emulate
current behavior and apply them to one-way.

-. startProtoDump
-. startImeTrace
-. stopImeTrace

Bug: 163453493
Test: atest CtsInputMethodTestCases
Test: 1) Enable the Winscope Trace tile
      2) Do some actions like open keyboard
      3) Disable the Winscope Trace tile
      4) Grad a bugreport and verify trace on go/Winscope
Change-Id: I3eafbc28ed3acf3ba859885bf201cb06b3149b94
2021-01-28 17:09:39 +08:00
Treehugger Robot
8172883202 Merge "Note network interfaces based on transport" am: 8334a265ad am: cd65235a77
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1562876

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I444343c7230c0f947a666334fb895736fa4bc153
2021-01-28 09:02:21 +00:00
Adam Bookatz
2ad7cd4169 ScreenPowerCalculator is responsible for smearing
The estimated energy used by the screen is
smeared over all apps based on their foreground time.
This calculation is performed by BatteryStatsHelper after
most of its other processing.
In this cl, we move that logic to the ScreenPowerCalculator,
which is actually responsible for calculating the total and
app screen energy blaming. This also allows other power calculators
for screen usage (such as actual screen energy measurements) to
be hooked up in the future, without BSH worrying about whether to
smear.

Note: Smeared energy is not included in the app's total energy usage
until the very end; prior to that, it is recorded in a special field
BatterySipper.screenPowerMah. This is NOT changed in this cl.

NOTE: The actual smearing algorithm is NOT altered in this cl.

Test: atest BatteryStatsHelperTest
Bug: 174818228
Bug: 162379528
Change-Id: I30b436b736e96071a1e4167d37512d250119665c
Merged-In: I30b436b736e96071a1e4167d37512d250119665c
(cherry picked from commit 3754504f4b)
2021-01-28 08:31:13 +00:00
Tony Huang
5fcda4f860 Make AppTransition animations sharable (1/n)
Move some animation functions in AppTransition to new
TransitionAnimation class for wm-shell using.

Bug: 175053726
Test: build
Change-Id: I7eef67359fd4532f7e4d97c787d5288362a32f13
2021-01-28 16:03:56 +08:00
Treehugger Robot
8334a265ad Merge "Note network interfaces based on transport" 2021-01-28 07:45:20 +00:00
Dmitri Plotnikov
8d247edc93 Revert "Revert "Use eBPF-based time-in-state monitoring for groups of threads""
This reverts commit c9e9058347.

This is the original CL, unchanged. The test that was the reason for
the rollback now passes, see http://go/forrest-run/L29200000799760670

The reason for the test failure was that Cuttlefish does not
define any CPU frequencies, which caused https://android.googlesource.com/platform/frameworks/native/+/refs/changes/65/1558465/2/libs/cputimeinstate/cputimeinstate.cpp#578
to fall into a near-infinite loop, thus locking up BatteryStats.

The no-frequencies issue was addressed in https://r.android.com/1558465.

Reason for revert: rolling forward since the test failure has been addressed

Bug: 169279846
Change-Id: I537561b4c86ef2aaf236b1807b844855fef38f8b
(cherry picked from commit 4a7792b30c)
Merged-In: I537561b4c86ef2aaf236b1807b844855fef38f8b
2021-01-28 07:16:16 +00:00
Remi NGUYEN VAN
8ec5d32772 Use consistent Wifi-only checking
Use the same checkWifiOnly method in BatteryUsageStatsProvider and other
battery stats logic.

Bug: 174436414
Test: atest
Change-Id: I6ae21c579a063c3dd65726620b7a6c9e9f09a957
2021-01-28 15:43:34 +09:00
Remi NGUYEN VAN
2c9ed7f32d Note network interfaces based on transport
Instead of classifying interfaces by network type in BatteryStats,
classify them based on the transports array provided by the
NetworkAgent.

Network types are deprecated and transports should be used instead. This
change allows BatteryStats to stop depending on unstable APIs such as
isNetworkTypeMobile.

This change also updates nullability annotations in ConnectivityService
and NetworkAgentInfo to show that the NetworkCapabilities are non-null
(as provided by the network agent) when calling
noteNetworkInterfaceTransports.

Bug: 174436414
Test: atest
  atest ConnectivityServiceTest#testBatteryStatsNetworkType \
      --rerun-until-failure 40

Merged-In: I4e928fac8a57a9b1fc758a44af2a5719b8c871b8

Change-Id: I4e928fac8a57a9b1fc758a44af2a5719b8c871b8
2021-01-28 15:10:54 +09:00
TreeHugger Robot
330454222a Merge "Revert "Revert "Note network interfaces based on transport""" into sc-dev 2021-01-28 05:55:23 +00:00
Wilson Wu
299897e9ba Merge "Make IInputMethodManager to oneway (10/N)" into sc-dev 2021-01-28 01:46:32 +00:00
Jackal Guo
199d13c73d Merge "Refactor PackageParser (4/n)" into sc-dev 2021-01-28 00:19:02 +00:00
Treehugger Robot
f5c35bcfa7 Merge "[FUI03] No-op refactoring of VpnInfo" am: f9dbe61693 am: b0989fd2d2 am: 046ebf41b7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1547637

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I05e6b14fca44919610317831c147413b0a431224
2021-01-27 14:16:00 +00:00
Treehugger Robot
046ebf41b7 Merge "[FUI03] No-op refactoring of VpnInfo" am: f9dbe61693 am: b0989fd2d2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1547637

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic947ae7aabd4e0095e94977dffb66c2f6b7b9e57
2021-01-27 13:57:34 +00:00
Wilson Wu
c4663ba6a9 Make IInputMethodManager to oneway (10/N)
1. Comply following methods to IVoidResultCallback to
emulate current behavior.

-. setAdditionalInputMethodSubtypes
-. removeImeSurface
-. removeImeSurfaceFromWindow

2. Add "oneway" to all methods which we already apply them
to result-callback model.

Bug: 163453493
Test: Manual test with keyboard
Test: atest CtsInputMethodTestCases
Test: atest DisplayImeControllerTest
Change-Id: Icb396ae5d74060af69c4ecb16723b2e37b9f2067
2021-01-27 09:12:47 +00:00
Remi NGUYEN VAN
84f8c48420 Revert "Revert "Note network interfaces based on transport""
Instead of classifying interfaces by network type in BatteryStats,
classify them based on the transports array provided by the
NetworkAgent.

Network types are deprecated and transports should be used instead. This
change allows BatteryStats to stop depending on unstable APIs such as
isNetworkTypeMobile.

This change also updates nullability annotations in ConnectivityService
and NetworkAgentInfo to show that the NetworkCapabilities are non-null
(as provided by the network agent) when calling
noteNetworkInterfaceTransports.

This is rolling forward a previously reverted change. The new change
also fixes MobileRadioPowerCalculatorTest that was broken when
submitting the previous change.

Bug: 174436414
Test: atest
      atest ConnectivityServiceTest#testBatteryStatsNetworkType \
          --rerun-until-failure 40

Merged-In: I4e928fac8a57a9b1fc758a44af2a5719b8c871b8

Change-Id: I4e928fac8a57a9b1fc758a44af2a5719b8c871b8
(cherry picked from commit 2d17d202bc)
2021-01-27 09:02:22 +00:00
Jackal Guo
f9f526f296 Refactor PackageParser (4/n)
Replace the usage of the constant and Package/ApkLite from
PackageParser by the alternative in order to move away from
PackageParser.

Bug: 174723245
Test: make
Test: atest -p core/java/android/content/pm \
        core/java/com/android/internal/content \
	services/core/java/com/android/server/pm \
	services/tests/servicestests/src/com/android/server/pm
Change-Id: I4e2a7666b2feede3994a6075edfe4d18e80433e9
(cherry picked from commit ce0715ba54)
2021-01-27 07:14:40 +00:00
junyulai
fa528b2d20 [FUI03] No-op refactoring of VpnInfo
As a preparation of exposing system API. This patch does some
harmless refactoring, which includes:
  1. Move VpnInfo to android.net
  2. Add nullability annotations
  3. Make members final

Bug: 174123988
Test: TH
Change-Id: I1530bb45d0e84c28c6deac33596bc686058afc0d
2021-01-27 15:03:06 +08:00
Riddle Hsu
40aaeac6ee Correct trace name of LatencyTracker
The action passing to getTraceNameOfAction is not the
definition of Atom. That causes wrong name in trace by
one offset, e.g. screen rotation (6) shows
ACTION_TURN_ON_SCREEN (5).

Also remove unnecessary reference of Context and print
the trace name in log.

Bug: 178472794
Test: Rotate device with recording trace, the trace
      should include ACTION_ROTATE_SCREEN.
Change-Id: If650161048a1f49ef375954d5a73108a27af0ba7
2021-01-27 13:55:46 +08:00
Dmitri Plotnikov
3274f73e97 Merge "Remove redundant method Binder.getNativeTid()" 2021-01-26 19:16:33 +00:00
Dmitri Plotnikov
bf06ab10de Remove redundant method Binder.getNativeTid()
Bug: 177257934
Test: atest BinderCallsStatsTest
Change-Id: I797a580e7bf6bc3c7174d061c1cf86bccc5b1f3a
2021-01-26 19:08:36 +00:00
Ahaan Ugale
4348003a0e Merge "Create basic behavior of HotwordDetectionService" 2021-01-26 18:33:14 +00:00
Benjamin Schwartz
3bf626d1cb Merge changes from topic "energyconsumer"
* changes:
  Update BatteryExternalStatsWorker to use the new EnergyConsumerType
  Update to new version of PowerStats HAL 2.0
2021-01-26 04:35:19 +00:00
Remi NGUYEN VAN
f5e542d64a Merge "Revert "Note network interfaces based on transport"" 2021-01-26 04:25:56 +00:00
Remi NGUYEN VAN
e1e8e9ec13 Revert "Note network interfaces based on transport"
This reverts commit ef0d81b294.

Reason for revert: Broke build of tests: b/178441996

Change-Id: Idaf35fa02f76852fa8134b0d505467007f6d0f60
2021-01-26 04:22:54 +00:00
Remi NGUYEN VAN
e8fc199452 Merge "Note network interfaces based on transport" 2021-01-26 03:20:21 +00:00
Michael Wachenschwanz
32d103d0db Update BatteryExternalStatsWorker to use the new EnergyConsumerType
EnergyConsumerId has been replaced with EnergyConsumerType and an ordinal int to determine an EnergyConsumer type

Bug: 178048034
Test: manual ("adb shell dumpsys batterystats --measured-energy" on
PowerStatshal2.0 enabled devices should report energy consumption data
while on battery)

Change-Id: Ie78b46fcb59d0327c00a20fbe2481dc537b910eb
2021-01-26 01:11:37 +00:00
lpeter
205ee1efed Create basic behavior of HotwordDetectionService
Create the HotwordDetectionService to help to verify the audio data.
The VoiceInteractor app will implement the HotwordDetectionService
and create the validation algorithm to increase the hotword accuracy.

The HotwordDetectionService will be triggered by VoiceInteractor app
from the VoiceInteractionService after the VoiceInteractionService
is ready.

The VoiceInteractionManagerService will check if we need to bind the
HotwordDetectionService.

After receiving the audio data from the DSP, the
VoiceInteractionManagerService will pass the audio data to the
HotwordDetectionService, then the HotwordDetectionService will verify
the audio data and send the result back.

If the hotword is valid, then the VoiceInteractionManagerService will
inform the VoiceInteractionService. The VoiceInteractor app will show
the UI.

Local test:
1.Make sure the original hotword function to work well manually.
2.Add the additional test code and check the log to make sure the
basic flow of hotword detection service runs well manually.

Bug: 175738546
Test: Manually
Test: atest CtsVoiceInteractionTestCases
Change-Id: Idb662bab37bb9691da24c9c2910a2c3dafedcadd
2021-01-26 00:58:37 +00:00
Jeff Sharkey
6958f2d1fd Merge "Add the owner for those files related to voice." am: 24bbd50cea am: 2a0549bc14 am: 6b2d1bb8c4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1554992

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I660a71a3f58a74bbcb50f22d363912ba35f56ff6
2021-01-26 00:46:41 +00:00
Jeff Sharkey
6b2d1bb8c4 Merge "Add the owner for those files related to voice." am: 24bbd50cea am: 2a0549bc14
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1554992

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I55d845133463c0e20cfa761a7c18ad50cd3f1dd2
2021-01-26 00:08:05 +00:00
Vadim Tryshev
aaa6b007ee Merge "Revert "Do not propogate test api access flags to Zygote."" 2021-01-25 21:37:53 +00:00
Vadim Tryshev
9c2ab16c86 Revert "Do not propogate test api access flags to Zygote."
This reverts commit 90264e56e1.

Reason for revert: Test monitor is here; see b/178404956

Change-Id: I473ae1562c5d4bb90b755edaba8a8463f55b7fb4
2021-01-25 21:36:55 +00:00
Seigo Nonaka
791ecf44a8 Merge "Add FontManager API and font manager shell commands" 2021-01-25 19:46:19 +00:00
Jeff Sharkey
24bbd50cea Merge "Add the owner for those files related to voice." 2021-01-25 19:21:12 +00:00
Seigo Nonaka
07a787dbe6 Merge "Add OWNERS for font manager related module" am: 61bb2cfccc am: 63c0ffd31e am: 6997779819
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1557448

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8c476fee426ec7998adb95f914c476ca7bf1950b
2021-01-25 17:34:49 +00:00
Seigo Nonaka
6997779819 Merge "Add OWNERS for font manager related module" am: 61bb2cfccc am: 63c0ffd31e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1557448

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic814c65f7885d9f1b0f25adcf6fdf1f7dab44cb4
2021-01-25 17:17:30 +00:00
Seigo Nonaka
46d6a3f9ce Add FontManager API and font manager shell commands
FontManager is an interface of communicating with FontManaserService.
With this CL, system apps can know the primitive information about
what font files are installed and how it is configured.

This CL also adds shell command of dumping font configuration.
Example usages are:

  # dump primitive font configuration.
  adb shell dumpsys font

  # dump fallback font list
  adb shell cmd font dump serif

Bug: 173619554
Test: atest FontManagerTest
Test: Manually confirmed above commands works.
Change-Id: I5cb855308e199ac38bd7b56b60821346247bdce3
2021-01-25 08:51:41 -08:00