1. Set mNetwork before the NetworkCallbacks can be delivered.
Previously, the code would set mNetwork in updateInfo, relying
on the fact that the BroadcastReceiver registered in onResume
is immediately invoked. However, this races with the
callbacks, which are also immediately invoked. If the
callbacks won the race, mNetwork would not be set and they
would be ignored.
2. Call updateInfo in onResume instead of in displayPreference.
This ensures that it's always called exactly once before the
activity starts running, regardless of whether it's being
displayed the first time (i.e., after onStart) or resumed
by switching from another app. displayPreference is only
called in the former case.
3. Don't call getLinkProperties and getNetworkCapabilities in
updateInfo. These calls are superfluous, because this
information is update by the NetworkCallbacks, and they can
cause jank because updateInfo is called on the UI thread.
This requires that the tests be changed so they always call
onResume, since no UI elements are populated until onResume is
called.
Bug: 62209358
Test: make -j64 RunSettingsRoboTests
Change-Id: Iccb1b9ae51188755d890a6df83004dbe9bec565e
This cl refactor it so:
1. AnomayLoader could create its own BatteryStatsHelper if needed.
2. AnomalyDetector could detect the anomaly with a target package name
3. Remove FeatureProvider in AnomalyLoader and use
AnomalyDetectionPolicy instead
With this cl, we could add anomaly detection to battery usage page
more easily.
Bug: 36924669
Test: RunSettingsRoboTests
Change-Id: I1ee09701de8b5c8855f44e447813760285794c89
When user update the setting for flip camera, check if there is managed
profile for the user, and update the setting for the managed user id as
well, so that the work profile camera app can read the correct setting
value.
Change-Id: I757041289329870311bc8473b19fd49ecdd0fadb
Fix: 62078588
Test: make RunSettingsRoboTests
If the enhanced estimate is being used in battery settings
it is now possible to long press on the text to have it display
both instead of the string that is normally used.
Adds another loader to enable this since it needs both the old
and the new estimates simultaneously.
Feature is hidden behind a feature flag that only googlers will
have enabled.
Test: robotests
Bug: 38399275
Change-Id: I5caf26513baada27efd50ddb0e72d3868da47150
- replace it with ConnectivityManager.stopTethering() instead.
Change-Id: I112863b1be37c0fef5d59c16d73f0c6cf71c6dea
Fix: 62191978
Test: make RunSettingsRoboTests
String change CL for support strings in settings.
Test: image attached, robotests still pass
Bug: 62145221
Change-Id: Ib10998374be961e42ab6994a7b32e521c49c4652
Replace "Emergency broadcast" with "Emergency alerts" to be
consistent.
Test: manual
Bug: b/62291344
Change-Id: I79d6f1162d4c112dedf49a3b43ec26011adba9bf
In the Storage Settings, if the text is too long, it will overlap with
the donut. After discussing with UX, we've opted to shrink the text in
the extenuating circumstances. This is because this text is more of a
helper and the full information is on the left.
Bug: 38030457
Test: Manual with Telugu
Change-Id: I18bcaaae74d049c42eaff50868d3861ae258839d
In preparation for modifying the graph code to show detailed projections
(see bug), this change moves it into Settings along with related tests
and resources.
Bug: 38400320
Test: manual, make SettingsUnitTests, make SettingsGoogleUnitTests
Change-Id: I88e5336c15827727b3427e29b10954bba9cfba7d
* Modified DeviceListPreferenceFragment to have enable/disable scanning
methods. In ENABLE state, each onScanningStateChanged(false) will
restart another round of scanning
* Subclasses of DeviceListPreferenceFragment should call enable/disable
scanning when scanning is needed for long period of time
* Currently, BluetoothPairingDetail and DevicePickerFragment call
enableScanning() when Bluetooth is turned ON and call disableScanning
when some device is picked in their lists
* Both BluetoothPairingDetail and DevicePickerFragment will re-enable
scanning if pairing failed for selected device
* Added associated unit tests as well
Bug: 32172815
Test: make, pair Bluetooth device, send file over Bluetooth Opp
Change-Id: I99325e06aadd7b00e7a7ba6d6c282a6831859d8b
- Apply entity header effect to battery summary screen.
- BidiWrap wifi ap name is it's correctly displayed in RLT languages
- Remove footer preference layout - settingslib already has one
Fix: 62039146
Fix: 62138362
Fix: 37920219
Test: make RunSettingsRoboTests
Change-Id: Idf1385ee40772c63075e5f81eb039c6da56256ab
When setting up fingerprint's backup screen lock, show a different
header text that says
"To use fingerprint, set {PIN/pattern/password}" instead of
"Choose your {PIN/pattern/password}".
Test: Manual. Existing tests pass
Bug: 62187833
Change-Id: If1084e64b99291a0eda63c174793b5a091ab4bae
Bug: 35877479
Test: make RunSettingsRoboTests
The existing behavior is to bring up a dialog with Bluetooth device
details with checkboxes for each supported profile. This adds a new page
that serves the same purpose with a switch for each profile and a footer
containing the MAC address.
Whether to use the new page or old dialog is controlled by a flag
accessible via BluetoothFeatureProvider.
Change-Id: I026c363d4cd33932a84017a67cbef51c258bad10
cherry-picked from ag/2301717
Both the footer preference and the TextView they contain
were clickable, which confused some accessibility services.
Bug: 62050563
Test: Verified that switch access no longer offers users
the option of clicking on the footer for accessibility
services and Magnification as well as in the Battery
settings screen.
Change-Id: I5cb13d6268466c690dd38f2b652422d2c3d813b4
Merged-In: I937340fda93f6a8097919e1f86d5d890487370bc
This stops the AP summary from getting stuck on "Connected, no
Internet" even when the system has validated Internet access.
Bug: 62209358
Test: make -j64 RunSettingsRoboTests
Change-Id: I235404408f7d8b958653d25656d97da8206e35ce