Commit Graph

15422 Commits

Author SHA1 Message Date
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
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
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
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
Wu Ahan
b274cd0165 Merge "Add jank instrumentation logic in keyguard" 2021-01-25 14:46:14 +00:00
Artur Satayev
5744991315 Merge "Do not propogate test api access flags to Zygote." 2021-01-25 14:33:42 +00:00
Hai Zhang
0b4f1718f8 Move role into module.
These changes have to be in this CL together because:

- Code in service-permission depends on IRoleManager in
framework-permission, so the APIs in framework-permission and the code
in service-permission need to be moved together.

- The changes to service-permission build rules doesn't make sense
without the code moved in, so they have to be together as well.

Other details:

- framework-annotations: Several annotations are added into
framework-annoatations. Since the discussion with API council seems to
allow user IDs in system server in-process APIs, @UserIdInt and
@AppIdInt is added. @MainThread and @AnyThread is added since
@WorkerThread is already added. @CallSuper is added since @CheckResult
is also already added and they are similar in terms of category of
functionality.

- framework-permission-s-shared-srcs: 3 classes (and 2 AIDL files)
from framework is copied as shared source files and jarjared for
framework-permission, and an additional 3 is added for
service-permission as service-permission-shared-srcs. Similar to
framework-wifi and service-wifi, the 3 classes in framework-permission
is also available to service-permission by the stub library
framework-permission-pre-jarjar, and the other 3 classes used only for
service-permission is included separately to minimize our impact on
classes loaded into boot classpath. framework-permission and
service-permission shares the same jarjar rules to make sure the
classes remain available, and for the same reason framework-permission
cannot be shrank during any optimization.

- framework-permission-s-shared: A java_library target for
framework-permission-shared-srcs is created to make sure that the
public classes won't be counted as APIs, as it would be if directly
included as srcs for framework-permission
java_sdk_library. service-permission-shared is the same thing for
service-permission.

- framework-permission-s: A new java_sdk_library target created to be
loaded into bootclasspath by Android S+.

- Dumpsys Protobuf: The dumpsys protobuf
file (rolemanagerservice.proto) is moved into the module, and both the
platform (incident.proto) and the module uses protoc-gen-javastream to
generate the Java classes from it. This should be fine since it's a
"source level inclusion", and we jarjar the generated classes in our
module to avoid conflict with platform copies.

Bug: 158736025
Test: manual
Test: device boots, default apps can be changed successfully.
Change-Id: I1914774f631e51d0c587a7e527a1c9bc05ee1595
2021-01-24 12:55:16 -08:00
Nicholas Ambur
ed1413316f Merge changes from topic "hotword-battery-saver"
* changes:
  add API for ST clients run in battery saver mode
  add SOUND_TRIGGER_RUN_IN_BATTERY_SAVER permission
  add SoundTrigger service modes in battery saver
2021-01-23 21:51:13 +00:00
SongFerng Wang
1581f4fc97 Merge "Improve AllowedNetworkTypesForReason and refactor PreferredNetworkType" 2021-01-23 07:41:10 +00:00
Nicholas Ambur
28cc6364d6 add API for ST clients run in battery saver mode
New system API interface for both SoundTriggerManager and
AlwaysOnHotwordDetector to indicate if a recognition should run in
battery saver mode or not.

Clients supply this information through the existing startRecognition
calls, and the client must hold a new privledged permission,
SOUND_TRIGGER_RUN_IN_BATTERY_SAVER, to indicate this intention.

As a prerequisite, the device PowerManagerService must have the
SoundTrigger service enabled in the battery saver mode battery policy.
If not enabled, recognition will be paused as if the client did not
provide the indication to run in battery saver mode.

Bug: 172294448
Test: build with Google search apk using this feature and verify
recognition keeps running in battery saver mode

Change-Id: Ia43be99290e6fd7c50ff8e4908d6c60ea513b19a
2021-01-22 18:24:39 -08:00
SongFerngWang
7d95185d46 Improve AllowedNetworkTypesForReason and refactor PreferredNetworkType
- Add more reasons of allowed network type
  - ALLOWED_NETWORK_TYPES_REASON_USER
  - ALLOWED_NETWORK_TYPES_REASON_CARRIER
- Add @systemApi for below
  - ALLOWED_NETWORK_TYPES_REASON_USER
  - ALLOWED_NETWORK_TYPES_REASON_POWER
  - ALLOWED_NETWORK_TYPES_REASON_CARRIER
  - setAllowedNetworkTypesForReason API
  - getAllowedNetworkTypesForReason API
  - getAllowedNetworkTypesBitmask API
- Add Public for below
  - CARRIER_NR_AVAILABILITY_NONE
  - CARRIER_NR_AVAILABILITY_NSA
  - CARRIER_NR_AVAILABILITY_SA
  - KEY_CARRIER_NR_AVAILABILITY_INT
- @Deprecated API
  - setPreferredNetworkTypeBitmask
  - getPreferredNetworkTypeBitmask
  - setAllowedNetworkType
  - getAllowedNetworkType
- Add a new way to notify allowedNetworkType at PhoneStateListener
- Replace KEY_NR_ENABLED_BOOL with KEY_CARRIER_NR_AVAILABILITY_INT

Bug: 161434786
Test: atest TelephonyManagerTest#testSetAllowedNetworkTypesForReason
(PASS)
atest TelephonyManagerTest#\
testSetAllowedNetworkTypesForReason_moreReason
(PASS)
atest PhoneStateListenerTest#\
testOnAllowedNetworkTypesChangedByRegisterPhoneStateListener
(PASS)

Change-Id: I3d0c119a0c2a30c56b0c127ba6525f8992b4e9dd
2021-01-23 06:51:05 +08:00
Artur Satayev
90264e56e1 Do not propogate test api access flags to Zygote.
The flow has been replaced by @ChangeId ALLOW_TEST_API_ACCESS, making
old approach obsolete.

Bug: 147113465
Test: presubmit would be sufficient
Change-Id: I9cf8f80abb0165d4aefbf943bade57f5e031904b
2021-01-22 18:47:12 +00:00
Seigo Nonaka
580f6ddeb2 Add OWNERS for font manager related module
Bug: N/A
Test: N/A
Change-Id: I8a653349bd6df6365e1d6cbb2fc3b3ac10c8fcd7
2021-01-22 10:07:27 -08:00
lpeter
7593a84876 Add the owner for those files related to voice.
Bug: 177641730
Test: n/a
Change-Id: Ib693e399efd14acbc00a83421e1bff77fede6cd6
2021-01-22 20:49:30 +08:00
Dmitri Plotnikov
9a8a94c10c Convert SensorPowerCalculator to work with BatteryUsageStats
Test: atest FrameworksCoreTests:com.android.internal.os.GnssPowerCalculatorTest
Test: atest FrameworksCoreTests:com.android.internal.os.SensorPowerCalculatorTest
Bug: 175644968
Bug: 173546795

Change-Id: I97cc3f75836bdcc719428dc2bb8d8464a609bf14
2021-01-21 18:47:12 -08:00
Dmitri Plotnikov
dfce528997 Convert MobileRadioPowerCalculator to work with BatteryUsageStats
Test: atest FrameworksCoreTests:com.android.internal.os.MobileRadioPowerCalculatorTest
Bug: 175644968
Change-Id: Iea088a14adde4255767ca76d8ec4c40b404cb33c
2021-01-21 13:19:21 -08:00
TreeHugger Robot
aca883298a Merge "Add supportedAttributes param for spell checker." 2021-01-21 19:45:17 +00:00
Josh Tsuji
fd577558f6 Merge "Adds the power button unlock animation and plumbs detailed wake/sleep reason to System UI." 2021-01-21 18:55:52 +00:00
TreeHugger Robot
8197beb008 Merge "Make IInputMethodManager to oneway (9/N)" 2021-01-21 03:10:40 +00:00
Kohsuke Yatoh
036c61877a Merge "Add missing textservice OWNERS files." am: 0f4112a760 am: 49023f3cd8 am: 782d427971
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1554552

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie00b4339b17b58e4041b506d23c8f7a984839481
2021-01-21 01:20:06 +00:00
Josh Tsuji
cb27bd1a83 Adds the power button unlock animation and plumbs detailed wake/sleep reason to System UI.
Test: unlock the phone using either the power button or lifting it
Bug: 169693662
Change-Id: I567555e6ee04f369ce7f4b32744639be70583112
2021-01-20 20:08:37 -05:00
Kohsuke Yatoh
782d427971 Merge "Add missing textservice OWNERS files." am: 0f4112a760 am: 49023f3cd8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1554552

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ifeae70e9e0e68b1f0420c95676c3a2445c9433ef
2021-01-21 01:00:21 +00:00
Kohsuke Yatoh
0f4112a760 Merge "Add missing textservice OWNERS files." 2021-01-20 23:16:33 +00:00
Kohsuke Yatoh
93d47b0487 Add supportedAttributes param for spell checker.
Bug: 166304720
Test: atest CtsInputMethodTestCases:SpellCheckerTest
Change-Id: I22f4a59a0c8ccb43f799351062f9fabca42403cd
2021-01-20 20:06:12 +00:00
satayev
c9805723c9 Merge "Allow clearing a single change id for tests usage." am: 2805c99594 am: 3bbe9c336f am: 311ed3bc6a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1553537

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I92f1b8bf5d2675ea88cf8b67cec37a381178e10a
2021-01-20 18:56:44 +00:00
satayev
2dcbe22daa Merge "Refactor PlatformCompat and related files." am: 5d37ff2d33 am: 3cfd32b11f am: 1c8e894bd8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1553536

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If7d1fe2f9b0165c3bb46a64b77a2f00756f207e3
2021-01-20 18:55:11 +00:00
Kohsuke Yatoh
b1d2fe86f7 Add missing textservice OWNERS files.
Test: n/a
Change-Id: I56939ce3a22c72ac489e4d9248de9e0ce4ee9413
2021-01-20 18:53:11 +00:00
satayev
311ed3bc6a Merge "Allow clearing a single change id for tests usage." am: 2805c99594 am: 3bbe9c336f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1553537

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie864851627231669743899b8e0d110635cee6c60
2021-01-20 18:49:03 +00:00