The initial translation related APIs. The APIs and the implementation
will be revised in the follow up changes. The service register will
on the next changes.
Bug: 173243538
Bug: 176208267
Test: manual verification (build)
Change-Id: Ib7b39e1b548bc6663a81482fa335632e8da18d6a
Currently when switching the user, it will be possible to meet this
kind of issue due to timing factor that the API of SoundTriggerSession
was called by previous user and caused the exception "Caller is not
the current voice interaction service.". It seems that the flow between
switching user and voice interaction needs to be improved to avoid this
race condition issue, but the impact will be high.
It would be better to catch the exception and return the fail status
to caller instead of crashing as a short term solution.
Four approaches are considered below:
(1) Change state to STATE_INVALID
When AlwaysOnHotwordDetector is shutdown, the state will be set to
STATE_INVALID. Then all called methods from it will fail with an
IllegalStateException. This is a normal behavior that has been defined
in the javadoc. But the STATE_INVALID does not clearly indicate what
happended in the AlwaysOnHotwordDetector for this issue and what to do
next. So it is not the best approach to change the state to
STATE_INVALID directly.
(2) Use a new state to inform the caller (apply this)
Define a new state STATE_ERROR to indicate the unknown active
keyphrase availability due to an error.
public static final int STATE_ERROR = 3;
When the exception occurs, it will pass STATE_ERROR to the caller by
the callback API "onAvailabilityChanged(int status)".
Then all called methods from it should fail with an IllegalStateException
due to AlwaysOnHotwordDetector can not be used currently.
The caller should create a new instance after receiving this state.
In order to avoid unintended behavior in the application, it would be
better to use this approach when the target SDK version is greater
than R.
(3) Use onError() callback to inform the caller
Currently when some errors occurred during Recognition, the onError()
callback will be called. But it doesn't mean the caller should stop
to using the AlwaysOnHotwordDetector. It is different from what we
want that the caller should not use the AlwaysOnHotwordDetector and
should create a new instance. So it is not suitable to use the onError()
callback to inform the caller due to no error reason in the onError()
callback. The caller will not know what happened and what to do next.
(4) Create a new onError(int reason) callback to inform the caller
In this approach, it will need to create a new onError(int reason)
callback to inform the caller. It also needs to change the state of
AlwaysOnHotwordDetector, then all called methods from it should fail
with an IllegalStateException due to AlwaysOnHotwordDetector can not
be used currently. This approach is also fine, but it is very similar
to approach 2. Finaly we use the approach 2.
Bug: 148136382
Test: atest CtsVoiceInteractionTestCases
Test: atest CtsSoundTriggerTestCases
Change-Id: I4697a2e6e26d412cf5c985467c652d30586adbe7
* Only regular view's viewnode info is produced. Virtual view is not
support yet, for efficiency reasons.
Test: manual
Test: atest android.autofillservice.cts.inline
Test: atest android.autofillservice.cts.augmented
Bug: 141703532
Change-Id: Ib9aa75ebf8504d674513bd0e6528460ba9db2c34
Add test infrastructure for the location time zone manager.
This test command injection facility is a generalization of the
pre-existing SimulatedBinderProviderEvent and so replaces it with a
distinct send_provider_test_command. This can be used to test the
ControllerImpl without using the real LocationTimeZoneProvider(s) (which
are disabled when the provider is set to simulation mode).
A command to a simulated secondary provider:
$ adb shell setprop persist.sys.geotz.secondary simulated
$ adb shell reboot
$ adb shell cmd location_time_zone_manager send_provider_test_command \
secondary on-bind
$ adb shell cmd location_time_zone_manager send_provider_test_command \
secondary success \
"tz=string_array:Europe/London\&Europe/Paris"
See also the following for help:
$ adb shell cmd time_zone_detector
$ adb shell cmd location_time_zone_manager
Bug: 152746105
Test: See steps above
Change-Id: I7259778ad7af8f2937cb3b4b8751a02c149d2b21
Modify ther permissions system around TimeZoneProviderService discovery.
Bug: 175718639
Test: Confirmed witholding the INSTALL_ permission led to a boot failure
Test: build / boot / treehugger
Change-Id: Id91fa7716e3ccc53cd2801aa4d7a469c01c990b6
Since the display cutout is a type of insets and the display cutout can
be obtained from WindowInsets, it makes sense that InsetsState has the
display cutout instance. In this way, we can send the display cutout to
client via W#insetsChanged instead of W#resized.
This can be a step to remove the class of ClientWindowFrames, and can
also be a step to make client compute its window frame locally.
Fix: 175858810
Bug: 161810301
Test: atest WindowAddRemovePerfTest ImeInsetsSourceConsumerTest
InsetsControllerTest InsetsStateTest ViewRootImplTest
WindowInsetsControllerTests ActivityRecordTests
DisplayPolicyLayoutTests LaunchParamsControllerTests
TaskSnapshotSurfaceTest WindowMetricsActivityTests
WindowMetricsWindowContextTests WindowMetricsTest
WindowFrameTests WindowStateTests WmDisplayCutoutTest
Change-Id: I9a930b1d2f7df3cea2b29629b767a4a5f31bca17
Bug: 168341541
Test: atest CtsAutoFillServiceTestCases:DatasetTest
Test: Manually tested image suggestions when the target app doesn't have media store permissions
Change-Id: I42546c76e45ec404e8d8de3bf63ca094d8a494c6
Call ExternalStorageService#freeCache from
PackageManagerService#freestorage via StorageManagerInternal
to free any cache held by ExternalStorageService under low storage
conditions.
Test: m
Bug: 170481432
Change-Id: Iaee2262705f4c99fb9e46875e321dcbbae841824
First step of moving LocationTimeZoneProvider from the
com.android.location.provider API surface to system API.
This copies / renames various APIs, generally dropping "Location" from
the name to try to generalize them. The
com/android/server/location/timezone classes have been updated
to use the new classes but the names have been left for now as they are
an internal detail and it's not clear which would be "location specific"
and which might be general.
Bug: 175633818
Test: build / treehugger
Change-Id: Ied2b43336ef80d2b4ed2eba8849ea1976145df8d
Bug: 174932174
Test: I solemnly swear I tested this conflict resolution.
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Change-Id: I9262a08ffc1ccede8e519d0eed90ed2bfcf0232c
We're temporarily blocked on internal Gerrit tooling to support
relaxed OWNERS validation, so this change temporarily replaces all
"android.com" accounts with "google.com" equivalents.
Bug: 174932174,175111824
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Change-Id: I114f2a40cee1b65e21250da7372e11c18cd73e25
As general background, OWNERS files expedite code reviews by helping
code authors quickly find relevant reviewers, and they also ensure
that stakeholders are involved in code changes in their areas.
Some teams under frameworks/base/ have been using OWNERS files
successfully for many years, and we're ready to expand them to cover
more areas. Here's the historical coverage statistics for the last
two years of changes before these new OWNERS changes land:
-- 56% of changes are fully covered by OWNERS
-- 17% of changes are partially covered by OWNERS
-- 25% of changes have no OWNERS coverage
Working closely with team leads, we've now identified clear OWNERS on
a per-package basis, and we're using "include" directives whenever
possible to to simplify future maintenance. With this extensive
effort, we've now improved our coverage as follows:
-- 98% of changes are fully covered by OWNERS
-- 1% of changes are partially covered by OWNERS
-- 1% of changes have no OWNERS coverage
This specific change is automatically generated by a script from
detailed ownership information confirmed by team leads.
Bug: 174932174
Test: manual
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Merged-In: I9789c97c1de8e5d962b48c29c57d82fe83729eba
Change-Id: I9789c97c1de8e5d962b48c29c57d82fe83729eba
* changes:
Hand-migration to TypedXml interface.
Mechanically apply TypedXml refaster template.
Mechanical refactoring to new typed XML classes.
Additional hand-migration to TypedXml interface.
"Resolve" both human-readable and binary XML.
Also adding Executor when callback, according to API council's
feedback.
Bug: 172087216
Test: build
Change-Id: Iaff6c75c1f92840424deeffbc4504a3ecf9bc1ee
Specifically, whether user and device policy manager settings
means that a notification should be hidden or redacted on
the lockscreen
Test: cts verifier
Fixes: 173090853
Change-Id: Ic09a2b05a1acce5d3d63732861bdc69b274a1eba