1) Loads configuration values from the display device config file
2) Passes those values through to AutomaticBrightnessController
3) Uses configuration in new HighBrightnessModeController class
to drive High Brightness mode via AutomaticBrightnessController.
Test: manual. Set HBM to enabled in display-config file.
Bug: 168210138
Change-Id: I4824bbc9d97cb668efc3bcaddb036d508a40fa87
This value is migrated from Settings.Secure to EmergencyInfo app via a contentprovider.
Bug: 177006940
Test: Robotests
Change-Id: I345d9ff828021da35556f2d51da512840dda8026
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
Add API to set IME will temporarily consumes the input, for
this case, the cursor will be invisible in the app.
Bug: 175362887
Test: atest FrameworksCoreTests:TextViewTest
Test: atest CtsWidgetTestCases:TextViewTest
Change-Id: Ic04cacfd73f1f4cb254bb16caf6b04c00c91a318