In settings we weren't properly taking into account battery saver
enabled dark theme. This CL makes it so that when battery saver
on we disable the toggle until battery saver is off since
you can't change dark theme in battery saver. Additionally it
adds a message indicating why the toggle was disabled so the
user doesn't get confused.
Test: robotests
Bug: 131913864
Change-Id: I855e429a666098c837650852d1e1355477afa13d
If it is true, then hide:
1. Network Select settings
2. Apn settings
Fixes: 131709441
Test: RunSettingsRoboTests
Change-Id: I203cda570564a41c5bb54a3ad9e60c7f35c0d30c
When no SIM, we can't get active subscription info.
So current code will not create TelephonyManager and cause IMEI not
retrieved.
Create TelephonyManager with default if no subscription info.
Bug: 132215720
Test: test with SIM and without SIM to check SIM status UI and atest ImeiInfoDialogControllerTest pass
Change-Id: Iaeb932ea66a6bee77136251941cca657984e456f
The feature failed after the CL "Force the adapter to rebind cards with
a toggle".
Because toggle slices have been forced to rebind after starting another
activity and when any slice is updating. This unpins Wi-Fi slice and
stops WifiScanWorker and then clears the saved clicked network.
Solution:
1. Change ConnectToWifiHandler from activity to receiver and send
broadcasts to it with FLAG_RECEIVER_FOREGROUND, so Wi-Fi slice won't
be forced to rebind.
2. Seperate Wi-Fi scan worker and contextual Wi-Fi scan worker. Keep the
original logic for the generic one, and then add the logic below to
the contextual one.
3. Do not clear the saved clicked network when slice is unppined because
it happens frequently in contextual homepage.
4. Introduce a static long in ContextualWifiScanWorker that updates once
in every visible UI session. A session is when the screen is visible
to user.
5. Use session token to determine whether auto-starting captive portal
is needed.
Fixes: 128056349
Test: robotest, visual in homepage and network panel
Change-Id: I9e03c379806e124fa7253b2a635574b2433f6afc
Functionality:
* Moves feature-level setting into developer settings (apps section)
* Adds bubbles in developer options under "apps" section
* Configures the app-specific bubble toggle in notifications settings
to be hidden / shown based on the developer setting
* Configures the channel-specific bubble toggle in notification channel
settings to be hidden / shown based on the developer setting
Tests:
* Anything that might be assuming that it's globally enabled now has
a bit to enable it globally in that test
* There is a logic change now where the app-level setting would be available
even if off globally, now that is not true -- if it's off globally the
app-level is no longer available
* Adds tests for the developer setting
Test: make -j40 RunSettingsRoboTests ROBOTEST_FILTER="Bubble"
Bug: 131845765
Change-Id: I5f6bf74e5ada3fc023571825cca10d7bddc60e6e
We should make sure both 'Use location' & 'Wi-Fi scanning' are enabled
before calling setWifiWakeupEnabled.
Bug: 131777439
Test: manual
Change-Id: I602917cfa7c5581ecb414e8c44b4e20c8f9ea78d
The network name in sim status dialog is not the same as the one in the
about page. This CL use the carrier text which is resolved in
ServiceStateTracker as the network name, this keep the network name sync
with the status bar and the summary of sim status in the about page.
Bug: 31784938
Test: build & manual test
Change-Id: Ia741baabaa98ae447dbedf9e28fd2fda222e6d2e
This CL makes it so that the order on the seekbar is increased
to a very large value to ensure it gets added to the end in the
case where a refresh is triggered due to the first time battery
saver dialog. Additionally it clears the preferences on the screen
when we receive confirmation to ensure that no caching can cause
the seekbar ot show up on top of other preferences.
Test: atest BatterySaverScheduleSeekBarControllerTest
Bug: 132107662
Change-Id: I26bf2772ed7135daa4879bca17e0ecfc22a2d0dd
Even though we unregister contentObserver in onPause and register
in onResume, callback still be called while fragment is detached.
Anyhow add a null check in settings to stop crash
Fixes: 131905853
Test: RunSettingsRoboTests
Change-Id: I8c0c2c04c3b8d942e0c97cf71a7d3e735a24b467
Update the test to handle new API and simplify the logic in the
controller.
Bug: 130897305
Test: make RunSettingsRoboTests -j64
Change-Id: I0c46ff22d4a3bf913add753f85a24af9aeee0a33
Data usage number was wrong because we didn't set correct
subId, this CL fixes this issue.
Bug: 132113657
Test: RunSettingsRoboTests
Change-Id: If7c9cf2f4709d9a8e5f9a154c02de9484800d6d5
Some contextual cards does not allow card dismissal, so they won't have
swipe background declared in the layout file. Add null check to prevent
from NPE.
Fixes: 132209310
Test: robotests & launch Settings
Change-Id: I31f897f445c4901d007c8187fe69aea416b915d1