This fixes an exception in startActivity() call:
"android.util.AndroidRuntimeException: Calling startActivity() from outside of
an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really
what you want?"
Bug: 132904820
Test: manual
Change-Id: I0c687ea76068778554b072b6cc8274352de6fa28
For some kinds of telephony changes that might happen while we're
already showing one of these dialogs, we already get sent a new intent
for the dialog which we internally convert into a refresh of the dialog
contents instead of stacking a new copy on top of the old one.
But it turns out there are some other cases where the telephony stack
doesn't send a new intent for the dialog but *does* send a change event
through the SubscriptionManager, and we want to respond to those as
well. This CL adds a listener for those events.
Fixes: 135276696
Test: make RunSettingsRoboTests
Change-Id: Ifb93ae95f45fda5831e112306dd9361ccaa5119c
That is caused by layout xml changes. The radio button was clickable
in old xml resource. But it is not clickable in new xml resource.
Therefore we can't receive click callback. Fixed by changing
Radio button state when preference is clicked.
Fixes: 135285101
Test: manual, make RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.tts"
Change-Id: Idd7bf37d9ccbc1b56d41978d19dc05c8a81cc49a
After a user uses Wi-Fi QR code scanner to scan a QR code of an unreachable
Wi-Fi network, the scanner does not recognize any QR code until the scanner is
restarted or back from a screen off state.
To restart QrCamera after a Wi-Fi QR code recognition, we should stop it before
start, otherwise the DecodeTask will not work.
Bug: 135225856
Test: Scan a Wi-Fi QR code of unreachable Wi-Fi network and
scan a Wi-Fi QR code of reachable Wi-Fi network, check
if the scanner recognizes QR code.
Change-Id: I0063c867d8e4046f184d02134bda842887c003a1
As we don't allow pSIM modem disablment, we should simply use isActiveSubId
to decide whether a subscription's preferences is changable. This will
avoid potential modem bugs that reports wrong modem status that result
in Setting's UX error.
Bug: 135222940
Test: manual and robo
Change-Id: I7cccf2fdab7c89d26dac4daad51cd5d6f3a90eba
When the phone is in DSDS mode and the user tries to send an MMS message
from the SIM that isn't the default for data, we need to pop up a
notification letting them know that the action can't succeed unless they
turn on the advanced option to allow data use for MMS messages. This
notification was using the operator name instead of the subscription
display name, so it didn't reflect any renaming the user might have done
to keep track of their SIMs, which is obviously confusing especially if
they have two different SIMs for the same carrier. This CL switches to
using the subscription display name in this notification.
Fixes: 134771858
Test: make RunSettingsRoboTests
Change-Id: I6995bf9dd6d5e9544e26f0d8e30e97c4e73ab783
In cases where MobileData should not be changed:
- Airplane mode
- No data subscriptions
we will return a null slice, rather than a slice with a no-op intent
attached as a primary action. The problem with the no-op intent is that
Slices assumes all actions are by definition, actionable, and the the
TalkBack description announces that the item is clickable, which it
really isn't.
We will in the future investigate disabled actions on Slices, but this
is the short-term fix.
Fixes: 132924748
Test: Robolectric
Test: Panel tester app
Change-Id: I1d62af32fe2dd985f0b52ea4188651e76f9c90ec
The entire preference is already clickable/focusable. Also, changed it so that
the entire preferenceview is clickable/focusable in non-accessibility mode as well
to better match Settings UX.
Also, no need to setClickable, since it is already by default
Fixes: 130398575
Test: With and without accessibility turned on, toggle works
Test: With accessibility turned on, toggle no longer takes a separate
focus in addition to the preference
Change-Id: Iaff05cdf350f8d4f4c0f53b539770a7ad1f7d8ad
Previously, on devices that cannot add a restricted profile (e.g. most
phones), the Multiple users menu had an option to "Add user", whereas
for devices that can, the option read "Add user or profile". Now it only
says the latter, due to ag/6412347. We add back the original wording
here.
Fixes: 135294519
Test: manual confirmation on a phone that text says "Add user"
Test: m -j ROBOTEST_FILTER=UserSettingsTest RunSettingsRoboTests
Change-Id: Ia166b6ff9c69c0042e8a781be1146a5622177121
We display a dialog in AccountManager.removeAccountAsUser() callback, but at that
time fragment is onstop() which causes the IllegalStateException.
Fixes: 133253227
Fixes: 135004255
Test: make RunSettingsRoboTests -j56 ROBOTEST_FILTER=com.android.settings.accounts
make RunSettingsRoboTests -j56 ROBOTEST_FILTER=com.android.settings.core
make RunSettingsRoboTests -j56 ROBOTEST_FILTER=com.android.settings.dashboard
Change-Id: I8534e8f7118234f6346607415698f9f91c3e5ffb
(cherry picked from commit d843ee85de)