Previously battery history is kept in the in-memory mHistoryBuffer
with size of 512KB (96KB on low memory device). When the buffer is
close to full we drop certain types of history. When the buffer is
full the whole buffer is reset and we lost elder history. On a
device with long battery life this problem is more frequent.
This CL changes mHistoryBuffer to 128KB (64KB on low memory device).
When the buffer is full, it is saved to history file on file system.
By default we allow 32 history files (64 history files on low-memory
device) which gives us 4MB history (compare to 512KB today).
The MAX_HISTORY_BUFFER and MAX_HISTORY_FILES can be remote configured
through GServices or P/H.
In case of history exceeding 4MB, the oldest history file is deleted
and new history file is open.
This change increases battery history by using disk file and the
chance of losing history is greatly reduced.
Bug: 67297625
Test: adb shell dumpsys batterystats --history
Change-Id: Id9aafea761649d7323b97d1e44135f7880a95414
The CL was intended only for P as a temporary solution.
This reverts commit f0800fa3bd.
Test: switch wallpapers, observe theme
Bug: 110758454
Change-Id: If10e4d87b6ddac10063b2671abd99e0baccdf92e
For instance, to enabled detailed tracking locally.
adb shell settings put global binder_calls_stats detailed_tracking=true
Also adds the ability to turn off data collection completely and
changing the sampling interval. Uploading data through westworld can
re-use the same flag once implemented.
Test: Unit tested
Change-Id: I808c9902b8124ab643d9b197703d537da040ae3e
This CL logically reverts the following CL (and some subsequent
changes) to stop restoring spell checker related secure settings.
* Ib8382f0296f0726b64494d3b1fd8237e13adb540
06cbaddb87
Reason for revert:
Although we believe it would be great if we can seamlessly migrate to
a new phone with keeping spell checker related settings, there still
remain several tricky scenarios.
* We are not ready to distinguish whether a certain spell checker
related setting was explicitly set by the user or programmatically
set by some components in the previoud device. This includes the
case where TextServicesManagerService (TSMS) itself automatically
updates those settings e.g. by selecting a default spell checker
service from the pre-installed ones. We are not sure if trying to
migrate such an auto-selected setting to a new device actually
makes sense, especially if it happens without any user
confirmation.
* We have a strict rule about what spell checker service can be
selected automatically, and the rule has been that only
pre-installed spell checker services can be automatically selected
by the system, unless some system components that have
WRITE_SECURE_SETTINGS permission overrides it. Mechanically
selecting a spell checker service just because it was enabled in
the previous device may not fit this model well.
* Unlike IMEs, currently the Android OS allows only one spell checker
service to be enabled. This means that if the new device doesn't
have the corresponding spell checker service, the user will lose
spell checking functionality even if the device pre-installs
functional spell checker service. This problem is hard to notice
because unlike IMEs spell checker service does not have its own UI.
* Also unlike IMEs, spell checker related secure settings are still
hidden and not published as public APIs. Those settings do not
have no official compatibility story across devices yet.
* It is also possible that the default spell checker service in the
previous device is not published to all the devices thus there is
no way for the the new device to install it.
This CL therefore excludes spell checker related settings from
backup/restore, as a short-term answer to above scenarios until we
come up with better ideas to deal nicely with them.
Bug: 110367605
Test: atest FrameworksCoreTests:android.provider.SettingsBackupTest
Test: atest FrameworksCoreTests:android.provider.SettingsValidatorsTest
Change-Id: I8e4a0d4b3b758a84d5a075fa52851b1e8dd707eb
- Add secure setting to enable/disable in call notifications
- Can toggle system setting using the following adb command:
adb shell settings put secure in_call_notification_enabled [0/1]
Bug: 71586014
Test: manual
Change-Id: I32e1d1d6dcae806e655ae6875a43d07ca83e77f4
This CL fixes a bug that COMPONENT_NAME_VALIDATOR is mistakenly used
for SELECTED_SPELL_CHECKER_SUBTYPE secure settings due to a comment
bug. ANY_INTEGER_VALIDATOR should be used instead because it stores
the hashcode of SpellCheckerSubtype.
This CL also addresses the comment bug, which caused this issue.
Fix: 110363012
Test: atest FrameworksCoreTests:android.provider.SettingsBackupTest
Test: atest FrameworksCoreTests:android.provider.SettingsValidatorsTest
Test: manually verified as follows
1. In a source device, complete the setup wizard (without restoring
the previous settings) then run 'adb shell bmgr backupnow --all'
2. In a destination device, restore settings by choosing the option
from a cloud backup.
3. Check logcat. Make sure that the following message is not shown.
SettingsBackupAgent: Attempted restore of selected_spell_checker_subtype setting, but its value didn't pass validation, value: 0
Test: manually verified as follows
1. In a source device
1.1. complete the setup wizard without restoring the previous
settings
1.2. Open Settings -> System -> Languages & input -> Advanced
-> Spell checker -> Languages
1.3. Select 'French'
1.4. adb shell settings get secure selected_spell_checker_subtype
-> Make sure it shows '102517'
1.5. adb shell bmgr backupnow --all
2. In a destination device
2.1. Restore settings by choosing the option from a cloud backup.
2.2. adb shell settings get secure selected_spell_checker_subtype
-> Make sure it shows '102517'
Change-Id: I560395a2ccd5bcf1bf7446123b892b23ab14f9f5
Use noteOp instead of checkOp as checkOp doesn't consider
background status.
Watch location permission changes caused by background status.
Restrict age of last location for foreground-only apps.
Bug: 80318398
Test: Manual
Change-Id: I3499d4150478b6f501966953f8e4a08169f3557c
Add a histogram of link speed values with count and rssi values.
Collect this metrics only when enabled in settings. By default, we don't
collect this metrics.
Bug: 78354985
Test: Settings Unittest
Change-Id: I683dfb45a01de5e1243d612a117a5544b0d4dc05
Generate WifiIsUnusableEvent when there is a data stall or a firmware
alert. In WifiIsUnusableEvent, store metrics related to time, packet
counts, trigger reason, and score.
Also, log ExperimentValues that we plan to change through global
settings varaible.
This logging is enabled by setting WIFI_IS_UNUSABLE_EVENT_METRICS_ENABLED
to 1. By default, this metric is not collected.
Manual Check Process:
- Connect to a network
- adb shell settings put global wifi_is_unusable_event_metrics_enabled 1
- adb shell dumpsys wifi wifiMetricsProto
- Move away from the ap to trigger data stall
- adb shell dumpsys wifi | grep -10 WifiIsUnusableEventList
- Verify that there is a WifiIsUnusableEvent
Bug: 77603216
Test: Unittest (settings core/tests/coretests).
Test: Manual Check.
Change-Id: I2d8425a420f5ba18e3eee0e11b6f35f6239a97b2
Add a button on power menu to launch emergency dialer.
Add FASTER_EMERGENCY_PHONE_CALL_ENABLED to SettingsBackupTest blacklist.
Test: Manually
Change-Id: I9c920e31433c0ac23165f917d8dd2befaaa4938d
Bug: 80376488
Fixes: 72715022
Test: With two devices, set up one, back up onto the other.
SUW for Assist Gesture does not get skipped
Test: atest SettingsBackupTest
Change-Id: Id7348542a618c0366f89c47833af6f66bf52b18f
This is an extension of the User Absent power feature on Wear aka "for small batteries". Turning the
sensor off is one of the aspects of power saving we want to take advantage of when the user is
absent.
Bug: 77293569
Test: make -j80
Test: Device boots
Change-Id: I25a3577d8eb2d157c20ed344056138bc32e8d158
This is an extension of the User Absent power feature on Wear aka "for small batteries". Turning the
sensor off is one of the aspects of power saving we want to take advantage of when the user is
absent.
Bug: 77293569
Test: make -j80
Test: Device boots
Change-Id: I25a3577d8eb2d157c20ed344056138bc32e8d158
doclava was accidentally suppressing all these broken links
in @see tags. This CL fixes issues so we can start enfocing
checks for broken @see links.
Test: make docs
Change-Id: If7830ece85f8d1f27c991eae282230814726e115
Exempt-From-Owner-Approval: Fixing @see javadoc link issues that are currently completely broken
The probes allow testing for a configurable status code and location
header (regexes). They are disabled by default, so this CL is a
no-op unless the probe configurations are pushed.
Bug: b/79499239
Test: tests in CL pass, manual: captive portal login works
Change-Id: I785723aaed06054b9aa8ebff77803f23d7836db9
Add a ContentObserver on WallpaperManagerService to
listen THEME_MODE value change. When changed, call
notifyWallpaperColorsChanged and set WallpaperColors
color hint by the current mode.
Bug: 63903361
Test: manual
Change-Id: I4f7aa7b184565b1bb23c7f4f1f07fc310dac7546