There were two issues that stopped the options menu from
showing properly. First, the SettingsPreferenceFragment did
not call its super class, causing the Lifecycle methods to
never be called. Second, the options menu was not being
invalidated which also stopped the Lifecycle methods from
being called.
Change-Id: I29f2fc105c7ecae7adaccb2e4643e48646398d8d
Fixes: 37255835
Test: Robotest
Check for null settings activity before trying to create settings
intent. If there is no settings activity, we will not show settings gear
for the preference.
Change-Id: I16f9d695cf9ef09ff65f4511d53d5778760125b5
Fix: 37161567
Test: make RunSettingsRoboTests
- Refactored network restriction checking logic into a checker class to
share across different places
- Added test
Test: make RunSettingsRoboTests
Change-Id: I6b7ea78f28fd1b61aacb070c377821150e441a74
Fix: 37134598
In previous code, it didn't update summary when preference is changed.
This cl adds it and also updates the title for Battery Optimization.
Bug: 37163617
Test: RunSettingsRoboTests
Change-Id: I276d9a267379104794998a605a8e258660dcf350
1. Add method "shouldHideSummary" to check it
2. Also change method "shouldHide" to "shouldHideCategory",
to distinguish it from shouldHideSummary
Fix: 37293815
Test: RunSettingsRoboTests
Change-Id: I4364d0331f3aac143fad9ebdeab52207f5cb98bf
On the app info page, instant apps show only the supported links
dialog rather than Open by default which opens in a secondary page
where the user can control things that aren't relevant to instant
apps.
Test: make RunSettingsRoboTests
Bug: 36497697
Change-Id: If4eba7c11c5490cbda1ef617002121fe108c4085
It may crash if opened during the uninstall of an app. By catching
the exception which may occur, we can just skip the uninstalled app
and avoid crashing.
Change-Id: I1b96b0697f4041be356260d6c675593affc1cb69
Merged-In: If556db7b5a299ba53a29baefbbe9709ba6d12190
Fixes: 36793223
Fixes: 36793372
Test: Settings unit test
This allows the WifiNetworkDetailsFragment to update dynamically based
on network and connection changes.
Bug: b/36278407
Test: make RunSettingsRoboTests
Change-Id: I388cf9842a144e45b68f2d173c7b29f347226b78
This cl refine battery icon ui in low battery mode:
1. Should show indicator(fixed in ag/2035178)
2. Show bolt icon when charging
3. When battery is low, set battery background as red and indicator
as white.
This cl also includes the field updates for battery.
Bug: 36862496
Test: RunSettingsRoboTests
Change-Id: Ifb2ed339742119bbff78712df09288b895756b1f
This cl moves following methods to BatteryUtils:
1. shouldHideSipper
2. removeHiddenBatterySippers
3. calculateBatteryPercent
As a result, we could use these methods in battery page as well
as app info page.
This cl also move bunch of tests to new file and add test for
method calculateBatteryPercent
Bug: 36816681
Test: RunSettingsRoboTests
Change-Id: Ic32700fe9741fbb96363db4af2d4fccb3ee8e317
If icons were fetched before displayPreference() is called, it can
cause a NPE. This adds a null check to ensure that it never
attempts to set an icon without both the icon and preference being
non-null.
Change-Id: Ib4269428e64545c9e255f7e3292fb6c046c1f307
Fixes: 37248158
Test: Settings Robotest
Test: make RunSettingsRoboTests
Test: Try to import custom ringtone in work profile, no crash observed
Test: Set the custom ringtone as default. Tested both work gmail and
calendar can play that ringtone.
Test: Try to import the peresonal ringtone, it is still working.
Bug: 37197930
Change-Id: I2b662247d7e70b59bae08e082e9682d74d797484
- Fix NPE in WifiDetailPreferenceController#setIpText
- Add MAC address preference in the details section
- Set subnet mask and gateway preferences
- Do not show IP information preferences if no information is available
- Fix string capitalization errors
- Only show IPv4 DNS servers under "Network details" section
Bug: 36483230
Bug: 37096448
Bug: 36482499
Bug: 37165860
Test: m RunSettingsRoboTests
Change-Id: I0e3f0ccfc4a8d802b51ed6b3be81c75e384dd06f
DEFAULT is not actually the right thing; it's a subtlety used for
other things that have compound state. ALLOWED is the proper
outright "let this thing run free" state for this appop.
Also, set the appop only for the target package, not for the
entire uid.
Bug 37226920
Bug 37242946
Test: make RunSettingsRoboTests
Change-Id: I8c0a995b9519f980685e8573da946dcc93ac4e7c
The hotspot receiver if used to cancel any tethering alarm set when wifi
ap state changes. Removing it from the manifest, and only register the
receiver when we schedule the tethering alarm.
Change-Id: I97c3be6e2a374949208bbdd4ac5ccc2fabf0291a
Fix: 35968322
Test: make RunSettingsRoboTests
The fast track storage calculation returns a non-zero answer after
the storage has been cleared. The simplest workaround here is to
fake the size as 0 bytes in the view after cache clearing.
It will not be zero if the user exits and comes back, but this
should be fine.
MARK IT ZERO!
Change-Id: Ia012c2cf2842040d5eac3d4a72539ec7dcfb9570
Fixes: 34965659
Test: Settings Robotest
(cherry picked from commit bf1f8e9ca7)
This reverts commit 457c3cbec2.
Revert with fix/test.
The fix is that we removed DevicePickerFragment#initDevicePreference(),
which incorrectly set a useless widget on preference, and removes the
gear icon from preference, preventing bind() call to go through
Change-Id: Ia70cdb51d13cca6035a4e7fe8008d195f7f00c6e
Fix: 36511169
Test: runtest --path tests/app/src/com/android/settings/bluetooth/DevicePickerActivityTest.java
When the user gets an OTA or changes language, settings
will clear the database and reindex it.
Test: make RunSettingsRoboTests
Change-Id: I379ece86b2d41d673bbbffbcf947774f3ccd4cb9
Fixes: 36859162
This icon is loaded in the background to avoid doing IO on
the main thread. Once we know there are more users and also
have the icon loaded, we add the category to the view.
Fixes: 36252572
Test: Robotest
Change-Id: Ib50287bb7ed323f22fbe407b56be1bf2fe98f121