This it a follow up CL to my previous CL [1], which introduced
EditorInfo#targetInputMethodUser.
Since EditorInfo#targetInputMethodUser is an @hide API, we cannot
directly its behavior in CTS. To make sure that it can be transferred
via IPCs , this CL introduces a simple unit test for it in
FrameworksCoreTests.
[1]: Ia7ea944438d69669ccdf9111b34ba400e786a602
0f5eade4a4
Bug: 120744418
Test: atest FrameworksCoreTests:EditorInfoTest
Change-Id: I3e722b3ccbd2ff33c264d4d41aa63e704970e78d
When an app takes a long time to handle broadcasts, we start deferring
further broadcasts to it to make sure that other broadcast traffic in
the system can continue to make progress. Global delivery order is
technically rearranged, but delivery order from the point of view of any
given app remains consistent with issuance order.
When alarm broadcasts are issued, we prioritize delivery of deferred
alarms to the alarm recipients (i.e. we suspend the deferral policy and
catch up as promptly as possible) in order to minimize wake time spent
waiting for the alarm broadcast to be delivered. Once an app with a
deferred broadcast backlog is no longer the target of an in-flight
alarm, we re-impose deferral policy on it.
This policy intentionally trades off increased broadcast delivery
latency to apps that take a "long" time to handle broadcasts, in
exchange for lowering delivery latency to all other apps in the system
that would previously have had to wait behind the slow app.
In addition, broadcast dispatch policy parameters can now be overlaid
via the usual global Settings mechanism. In particular, configuring the
"bcast_slow_time" parameter to a value in milliseconds higher than the
queue's broadcast timeout period will disable the new slow-receiver
policies.
Bug: 111404343
Test: device boots & runs
Test: tests/ActivityTests
Change-Id: I76ac79bdf41ca3cfcc48515bca779ea0f5744c0b
Add a IME state changes callback that pipes IME state into the Inset
consumer.
Bug: 118599175
Bug: 118118435
Test: atest InsetControllerTest
Test: atest InsetSourceConsumerTest
Test: atest ImeInsetsSourceConsumerTest
Change-Id: Id878226418e19cdf0499a0094f1d5c47fea33125
Capturing the app-declared notification category:
https://developer.android.com/training/notify-user/build-notification#system-category
Adding to StatusBarNotification.getLogMaker() means that it will be
put on many categories of notification logging automatically. No
extra data usage for notifications where the category was not
declared.
Bug: 123071368
Test: atest SystemUITests and manual test
Change-Id: I8f59fea1a8e7c98366fe888cf5a28cf252859fdf
objects that are returned by the model
1. TemplateIntentFactory is the intent generator. It reads from the
templates that are returned from the model, and construct the
intents accordingly. If template is missing, we fallback to use
LegacyIntentFactory.
2. LegacyIntentFactory is the old(existing) intent generator.
3. Added a flag to allow us to switch between them.
Test: atest TemplateIntentFactoryTest.java
Test: atest LegacyIntentFactoryTest.java
Change-Id: I7bdcc73321f5a0160c5ff0edf1a2095119f4dcb1
Otherwise we create the leash with visibility=shown before the
client can update it, creating a flicker.
Test: Open IME, go home, observe no flicker
Bug: 111084606
Change-Id: I38eadaef79c27036edf5a86b773f6695d463db5c
Required for feature tuning and experiments
Also
- Updates Javadoc as per API review request
- Updates TextClassificationConstants test
Bug: 120794314
Bug: 118296637
Bug: 34780395
Test: atest core/tests/coretests/src/android/view/textclassifier/TextClassificationConstantsTest.java
Test: (MANUAL)
1. Install an app that handles Intent.ACTION_TRANSLATE
2. Run adb shell settings put global text_classifier_constants system_textclassifier_enabled=false,lang_id_threshold_override=0
3. Select foreign text
4. Observe that a "Translate" option is shown in the selection toolbar
1. Install an app that handles Intent.ACTION_TRANSLATE
2. Run adb shell settings put global text_classifier_constants system_textclassifier_enabled=false,lang_id_threshold_override=2
3. Select foreign text
4. Observe that a "Translate" option is not shown in the selection toolbar
Change-Id: I02b6ca48669e66a24150b04bba2ebfcf9ebe6bfd
This adds a field Settings.Global.BATTERY_CHARGING_STATE_UPDATE_DELAY
that overrides the value of battery_charged_delay_ms in
Settings.GLOBAL.BATTERY_STATS_CONSTANTS.
This new field can then be set for experimentation, and easily reset to
default by deleting, or setting it to a negative value.
Expose a method in BatteryManager to set a value for this new setting.
Bug: 111360323
Test: adb shell settings put global battery_charging_state_update_delay 999
adb shell dumpsys batterystats --settings # should see battery_charged_delay_ms=999
adb shell settings put global battery_charging_state_update_delay -1
adb shell dumpsys batterystats --settings # should see battery_charged_delay_ms=90000
Change-Id: Ic308af938836a1f9c235cec341808b6c6c28d22d
1. Add get/setScore, so we can see how do scores affect the CTR and
eventually tune the threshold based on it.
2. Convert get/setEntity to get/setEntityTypes.
Some events like TYPE_ACTIONS_GENERATED and TYPE_ACTIONS_SHOWN
will need to have a list of entity types. Also, as TRON does not
support a field of list type. And thus workaround this by having
3 separate fields in TRON.
4. The result id of action is too easy to clash now as only messages
are taking into account. Use timestamp and the person object as
the input to the hash now.
5. Changes in TRON:
a) We will put conversation_action / language detection, etc to
category. And we will put the views to subtype.
b) As suggested by the TRON team, we should not reuse existing fields
in the clients directly. But we should rather introduce new fields,
and map them to existing fields in the server. So, TRON team could
suppress just the new logging if it goes wrong and not affect
existing loggings.
Test: atest TextClassifierEventTest.java
Tests: atest TextClassifierEventTronLoggerTest.java
BUG: 120803809
Change-Id: I2e71436b323a200beec57ea7c1a8bcc96c9c552f
In order to reduce the startup impact to near zero, we are
creating a whitelist to be checked before parsing rules.
The whitelist will be generated by the APK based on apps
mentioned in the rules files. At app launch, only those in
the whitelist will do full rules checking.
The whitelist will be checked via Global Settings, which will
be populated by the ANGLE APK when intents are received. The
APK will listen for intents at boot (LOCKED_BOOT_COMPLETED)
and when ANGLE itself is updated (MY_PACKAGE_REPLACED).
The whitelist can also be populated by hand:
adb shell settings put global angle_whitelist app1,app2,appN
We plan to further mitigate the ANGLE-enabled app impact
by parsing the full rules when creating the whitelist, off of
the critical path.
Note: Developer Options will continue to work, regardless of
whitelist. But temp rules will not be loaded if the app is
not whitelisted.
Test: atest CtsAngleIntegrationHostTestCases
Test: atest google/perf/app-startup/hermetic-apps/cold-dropcache-test -v
Bug: 80239516
Bug: 122528316
Change-Id: I96e5b4d5b4774f59aadbd1e52295437a395cab6b