This CL introduces cellular data stall recovery based on
network validation result. It still re-uses the existing
recovery steps but the triggers are based on networkStatus
from NetworkMonitor when the network is bad. Each recovery
step is spaced by a configurable grace period (default 3 mins)
to avoid back to back recovery.
This feature is controlled by the following settings. If this
feature is enabled then the legacy data stall detection based
on TrafficStats will automatically be disabled.
Settings.Global.DATA_STALL_RECOVERY_ON_BAD_NETWORK
1 => Enabled (default)
0 => Disabled
Settings.Global.MIN_DURATION_BETWEEN_RECOVERY_STEPS_IN_MS
3 minutes is default value
Bug: 113916551
Test: atest FrameworksTelephonyTests:com.android.internal.telephony.dataconnection.DcTrackerTest
Change-Id: I738fc7ed08803de1114f7a3d79bf278449e94ea8
Add namespace to allow us to receive feature control values of Game Driver.
BUG: 121350991
Test: Build, flash and boot
Change-Id: I395c66c76eb8a0079f71bac1a2218e5e8d22391c
* changes:
Fix hdmi framework tests.
Use the Short Audio Descriptor xml parser to get config when receive request short audio descriptor message.
Add parser for Short Audio Descriptor xml config
Add an API for clients to know if a target device is connected to the current device.
Add TV_INPUT_ALLOW_3RD_PARTY_INPUTS to settings
ACTION_CHARGING is sent when the device is in a good enough charging
state for power-heavy work to be done. It was sent immediately when this
determination was done:
1. plugged in and level >= 90
2. plugged in and level is increasing
However this lead to many jobs being ungated when this happen, and
defeats the purpose of plugging in your device to get a quick boost.
In the case of 2. we defer the sending of ACTION_CHARGING by a
configurable time, defaulting to 15minutes, after said determination.
The adb command to play with this is:
adb shell settings put global battery_stats_constants battery_charged_delay_ms=90000
Bug: 111360323
Test: Set the delay to 15s, then cmd battery unplug and reset,
verify that broadcast is sent in dumpsys activity broadcasts
Change-Id: I71f8d06604041efeba12fbdfd0374aaff2f04807
This CL introduces a new configurable sensor type: config_dozeTapSensorType
Test: atest SystemUITests
Test: set config_dozeTapSensorType to double tap gesture on overlay
Bug: 121198822
Bug: 111414690
Change-Id: I54f3c20473a6d97c860ee02f324edbcf89ba85d1
Permissions READ_DEVICE_CONFIG and WRITE_DEVICE_CONFIG are required to
use DeviceConfig API. Actual checks for new permissions are not added
as we are waiting for gmscore to include them into manifest.
Also added "configurator" protection flag.
Test: atest FrameworksCoreTests:DeviceConfigTest
atest FrameworksCoreTests:SettingsProviderTest
atest SettingsProviderTest:DeviceConfigServiceTest
Bug:109919982
Bug:113100523
Bug:113101834
Bug:117663715
Change-Id: I66c256b57c5491201c6c7834620a287b6c81c23c
* changes:
Adding HDMI_CEC_SWITCH_ENABLE Global property to enable/disable Routing Control feature.
Fix spelling errors in HdmiCecMessage.toString
More skeleton code for <RequestShortAuidoDescriptor>
Add a getPhysicalAddress api to hdmicontrolservice.
Set System Audio Mode on when switch to Audio Only source
Call HdmiCecLocalDeviceAudioSystem to report audio status.
Add a delay state into DeviceDiscoveryAction.
This is a follow up CL to my previous CL [1], which implemented
per-profile IME behind the flag.
Some secure settings need to be cloned to the profile owner's settings
depending on whether per-profile IME is enabled or not. My previous
CL correctly took care of the following settings,
* DEFAULT_INPUT_METHOD
* ENABLED_INPUT_METHODS
* SELECTED_SPELL_CHECKER
* SELECTED_SPELL_CHECKER_SUBTYPE
but somehow forgot to do so for SELECTED_INPUT_METHOD_SUBTYPE.
With this CL, SELECTED_INPUT_METHOD_SUBTYPE also becomes per-profile
when per-profile IME is enabled with the runtime flag.
[1]: Ied99664d3dc61b97c919b220c601f90b29761b96
a878b9500e
Bug: 121348796
Test: Manually made sure as follows.
1. adb root
2. adb shell setprop persist.debug.per_profile_ime 1
3. adb reboot
4. Install Test DPC.
5. Enable managed profile with Test DPC.
6. adb shell settings 'put secure --user 0 enabled_input_methods \
"com.android.inputmethod.latin/.LatinIME;-921088104;774684257"'
7. adb shell settings 'put secure --user 10 enabled_input_methods \
"com.android.inputmethod.latin/.LatinIME;-921088104;774684257"'
8. Open "Files" app for the main profile.
9. Tap the search box to show AOSP Keyboard.
10. Tap the globe button on the AOSP Keyboard to switch to Deutsch
layout.
11. Open "Files" app for the work profile.
12. Tap the search box to show AOSP Keyboard.
13. Make sure that the AOSP Keyboard is in English layout.
Change-Id: I9696396eb5f99b2e45a95d356b4da09502ac7e3d
Add an intent ACTION_REPORT_RADIO_BUG for reporting radio error
Also add new settings for radio error detection
Bug: 113635050
Test: Build pass
Change-Id: I060db9b11776a67ce4da1c3142b2e6cdc23f38cf
* changes:
Atom: initPortInfo when receive hotplug from tx for audiosystem device[1/3]
handle manual port switching
Claim Active Source during System Audio Mode init by AVR when the device also has playback type and can't get Active Source.
Switch away from ARC input when ARC is terminated.
Request Active Source when ARC is enabled in ArcInitiationActionFromAvr.
Refactor the Active Source updating logic in CEC devices.
Fix tests failure on com.android.server.hdmi
Making functions visible for testing com.android.server.hdmi
Back out unneeded ag/4808863. Standby has been handled in ag/4881453.
Updating the CallScreeningService to support passing call identification
information for incoming/outgoing calls.
Updating call log to log call identification information.
Bug: 63966743
Test: Manual with test app.
Merged-In: Ie6c172c09007eb5f4853d36ae0a99b782bfb5ddb
Change-Id: Ie6c172c09007eb5f4853d36ae0a99b782bfb5ddb
For experiment flag testing, add input_native_boot flag in DeviceConfig
Test: presubmit
Bug: 120794829
Change-Id: I1ee76cb1210379bd5c04c19de71c777948c2dad3
With this CL we add a new key-value pair to
smart_replies_in_notifications_flags to control whether smart
suggestions should be turned on for heads-up notifications. By default
the suggestions are turned ON.
Bug: 122351821
Test: atest SmartReplyConstantsTest
Test: Run "adb shell settings put global
smart_replies_in_notifications_flags show_in_heads_up=false" and ensure
heads-up notifications do not contain smart suggestions.
Change-Id: I84292c10a4545112b0e993af33bb01a8cc18ce23
In order to support BYOD (Bring your own device) use cases, Android
phones can associate multiple users into a single profile group so
that other system components such as launcher can help users
seamlessly switch user identity without doing a heavy-weight
device-level user switching.
For instance, an Android device can be configured to work for two
different users Alice and Bob, while Alice also has two different
identities: one as her private account and the other for her
work-related account.
Profile group X == Alice:
Parent user X (user id: 0)
for personal account, under her control.
Child user 1 (user id: 10)
for work-related account, partly under system-admin's control.
Profile group Y == Bob:
Parent user Y (user id: 11)
private account, under his control.
The above configuration allows system-level data separation not only
between Alice (user 0) and Bob (user 11) but also between Alice's
personal account (user 0) and Alice's work-related account
(user 10). For instance, Calendar app that runs under user 0 cannot
see any data for other users including user 10.
IME is one of known exceptions in the above design. For instance, when
Alice is using the device, the system launches InputMethodService,
which is the code-level representation of IMEs, only for the user 0
then gives it a special ability to interact with all the applications
that run under the same profile group.
Profile group X == Alice:
IME works as user 0 but interacts with apps that run under
user 0 and 10.
Profile group Y == Bob:
IME works as user 11 and interacts with apps that run under
user 11.
Of course there are non-trivial imprications by sharing the same
instance of InputMethodService across profiles but this was basically
the only option when we initially introduced in Android 5.0 [1]
because of multiple challenges (schedule, complexity, performance
concerns, and so on). To to mitigate the risk, we also introduced APIs
that allow system administrators to whitelist what IMEs can be enabled
for the entire profile [2]. Even with such a whitelist feature, we
have received multiple feature requests to completely separate IME
instances by profile boundaries, like other applications behave.
This is why this CL was authored.
With this CL, a new runtime mode "per-profile IME" is introduced
behind the flag. When the flag is enabled:
* InputMethodManagerService (IMMS) may calls IMMS#switchUserLocked()
from IMMS#startInputOrWindowGainedFocus() every time when a
different profile's IME client gains IME focus.
* SpellCheckerService also enables per-user mode, which has been
temporarily disabled [3].
* DevicePolicyManagerService no longer disable packages that contain
system IMEs when creating a new profile user.
* Following IME APIs start returning result based on the caller's
user (profile) ID.
* InputMethodManager#getInputMethodList()
* InputMethodManager#getEnabledInputMethodList()
* InputMethodManager#getEnabledInputMethodSubtypeList()
There are still multiple known issues though. Hopefully we can address
those issues in subsequent CLs.
* Inline-reply from non-primary profiles is still dispatched to the
main profile's IME because SysUI is always running under main
profile (Bug 120744418). This probably can be addressed by
allowing the IME clients that have INTERACT_ACROSS_USERS_FULL to
specify the target user ID in some @hide parameter.
* IMMS#switchUserLocked() is not yet fully optimized (Bug 28750507).
New client app's UI thread can be blocked more than 100ms,
depending on the number of installed IMEs and the number of IME
subtypes implemented by those IMEs.
* Even after IMMS#switchUserLocked() is fully optimized, IMEs'
cold-startups are known to be slow. One way to optimize this is
keeping binding to those IMEs, but doing so would require 1)
non-trivial amount of code changes and 2) doubles RAM consumption.
* Virtual keyboard settings page for profile users are not yet
available (Bug 120748696).
* Migration from shared-profile IME mode to per-profile IME mode is
not yet supported (Bug 121348796). By default, IME packages will
be automatically disabled when a profile user is created. This
means if the device switches from shared-profile IME mode to
per-profile IME mode, IME packages continue to be disabled hence
the user cannot type anything for those profiles.
Anyway, there should be no behavior change unless the debug flag is
explicitly flipped.
[1]: I3bd87b32aec69c3f8d470c8b29b144f4e849c808
734983fff3
[2]: I921888660d29a5370395db87adf75d4d106660c9
9c9cbac5b71a23ed0dbab0f44cb78a820514cfc6
[3]: Ic046f832f203115106409a53418a5746eb6d4939
3f8c568883
Fix: 120709962
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Test: Made sure that there is no behavior change if the debug flag is
not set as follows.
1. Install Test DPC
2. Enable managed profile with Test DPC
3. make -j EditTextVariations
4. adb install -r $ANDROID_TARGET_OUT_TESTCASES/EditTextVariations/EditTextVariations.apk
5. Open two EditTextVariations instances in split-screen mode
5.1. One is for the main profile
5.2. The other is for the managed profile
6. Make sure that main profile's instance of AOSP Keyboard is used
for both applications.
7. Make sure that main profile's instance of Android Spell Checker
is used for both applications.
8. adb shell ime list -a -s --user all
-> Only "com.android.inputmethod.latin/.LatinIME" is shown.
9. adb shell dumpsys textservices
-> Only result for user #0 is shown.
Test: Made sure that basic text input can be done with
"per-profile IME" mode enabled as follows.
1. adb root
2. adb shell setprop persist.debug.per_profile_ime 1
3. adb reboot
4. Install Test DPC
5. Enable managed profile with Test DPC
6. make -j EditTextVariations
7. adb install -r $ANDROID_TARGET_OUT_TESTCASES/EditTextVariations/EditTextVariations.apk
8. Open two EditTextVariations instances in split-screen mode
8.1. One is for the main profile
8.2. The other is for the managed profile
9. Make sure that AOSP Keyboard will be re-launched to correspond to
the focused IME client's user profile.
9.1 When EditTextVariations for the main profile is focused,
AOSP Keyboard for the main profile is shown.
9.2 When EditTextVariations for the work profile is focused,
AOSP Keyboard for the work profile is shown.
10. Make sure that different instances of Android Spell Checker are
used based on target application's profile
11. adb shell ime list -a -s --user all
-> "com.android.inputmethod.latin/.LatinIME" is shown for both
user #0 and user #10.
12. adb shell dumpsys textservices
-> Both user #0 and user #10 have results.
Test: atest DevicePolicyManagerTest#testSetPermittedInputMethods_failIfNotProfileOwner
Test: atest com.android.server.devicepolicy.OverlayPackagesProviderTest
Change-Id: Ied99664d3dc61b97c919b220c601f90b29761b96
This change is the main check in for the historical app op feature.
The idea is to store a historical data about past app op rejections,
accesses, and durations per op for any UID state indefinitely.
Keeping all operations on record is not practical as app ops are
very frequently performed. To address this we are storing aggregated
data as snapshots where we store for every UID and its packages
how many times each op was accessed, rejected, lasted as an aggregate.
To allow history scaling indefinitely we are taking a logarithmic
approach with only the most recent state stored in memory and all
preceding state stored on disk. State on disk is stored in separate
files where each preceding file, i.e. for an older period, would
cover X times longer period with X number of snapshots covering
X times longer period. Initially X is ten but can be tweaked. For
example, the first file could contain data for ten days with daily
snapshots, while the file for older period would have data
for a hundred days with snapshots every ten days, etc.
The implementation is optimized for fast history update and no impact
on system runtime performance and minimizing memory footprint. We
are lazily persisting state to disk on a dedicated thread as this is
slow. We are also reading the relevant historical files on a query
as this is very rare as opposed to state updates.
The base snapshot interval, i.e. snapshot time span, in the initial
iteration and the logarithmic step are configurable. These can be
changed dynamically and the history would be rewriten to take this
into account.
Test: atest CtsAppOpsTestCases
bug:111061782
Change-Id: I55c32c79911ba12b2ace58d2a782b8df1e6bff60
Completely deprecate LOCATION_PROVIDERS_ALLOWED (but still support it).
Adds additional locking and @GuardedBy annotations where appropriate,
and some minor code cleanup is copied from previous CLs.
Bug: 118885128
Test: Manual + CTS
Change-Id: I3c0b4b2354a4c2b6a120fc467af60cb3409dd671
Synchronize settings between sound and accessibility menus
Bug: 116172311
Test: See accessibility vibration settings - ring and notification
settings sould be separate. Try changing vibration settings in sound and
accessibility menus - the settings should stay in sync.
Change-Id: Ia0276dfdd0efafe211c14cda140831b57f8c42b1
Add a new key-value pair to smart_replies_in_notifications_flags that
controls the default tap-to-edit behaviour.
Bug: 111437455
Test: atest SmartReplyConstantsTest
Test: Try "adb shell settings put global smart_replies_in_notifications_flags edit_choices_before_sending=true" and observe
Change-Id: Ida90b98c28f4183697e84a6722768d41c72dd9cf