When updating the panel after getting a second intent to the
activity, there is a small window of opportunity for the user
to close the activity before the animation ends, causing an
NPE when onFinish is called as the activity already closed down.
This change will check that there is an activity before trying
to finish it.
Bug: 150322041
Test:
For an easy way to reproduce this, turn the screen on and run the
following in a terminal:
while true; do adb shell am start -a \
android.settings.panel.action.INTERNET_CONNECTIVITY; \
sleep 0.1; done
Then press the back button while the screen is attempting to
display the fragment. There should be no Settings crash.
Change-Id: I4ca831d71a7221a7a4a62bb29e802f507ce5213c
ApnEditor tries read and set the UI in onCreate, before the previous
bundle is restored. This caused problems when the configuration has
changed (such as switching to Dark Theme).
This moves the UI changes to onViewRestored
Fixes: 146399432
Test: make SettingsGoogle and manual test UI
Change-Id: I8147ec96569fa28867c088d6c36584aa344f40ed
Merged-In: I8147ec96569fa28867c088d6c36584aa344f40ed
Allow LockScreenPattern to be launched in the pinning screen
If work profile lock is enabled and work app is pinned, users will get a
black/white screen on the phone. That's because Settings is prevented
from other apps launch any pages of Settings in the pinning mode.
In order to launch some pages of Settings from other apps, we add a
condition to the preventive mechanism and allow the activity inherited
from SettingsBaseActivity to override the condition to have the activity
to be launched from other apps in the pinning mode.
Bug: 137015265
Bug: 135604684
Test: manual test
Change-Id: I8070de79a83350d1658efcb19e983669dad0e673
Merged-In: I8070de79a83350d1658efcb19e983669dad0e673
Allow LockScreenPattern to be launched in the pinning screen
If work profile lock is enabled and work app is pinned, users will get a
black/white screen on the phone. That's because Settings is prevented
from other apps launch any pages of Settings in the pinning mode.
In order to launch some pages of Settings from other apps, we add a
condition to the preventive mechanism and allow the activity inherited
from SettingsBaseActivity to override the condition to have the activity
to be launched from other apps in the pinning mode.
Bug: 137015265
Bug: 135604684
Test: manual test
Change-Id: I8070de79a83350d1658efcb19e983669dad0e673
Merged-In: I8070de79a83350d1658efcb19e983669dad0e673
Allow LockScreenPattern to be launched in the pinning screen
If work profile lock is enabled and work app is pinned, users will get a
black/white screen on the phone. That's because Settings is prevented
from other apps launch any pages of Settings in the pinning mode.
In order to launch some pages of Settings from other apps, we add a
condition to the preventive mechanism and allow the activity inherited
from SettingsBaseActivity to override the condition to have the activity
to be launched from other apps in the pinning mode.
Bug: 137015265
Bug: 135604684
Test: manual test
Change-Id: I8070de79a83350d1658efcb19e983669dad0e673
slider position is smaller than min value causes the exception.
Fixed by limit the position within min and max value.
Fixes: 148270968
Fixes: 149973990
Test: manual
Change-Id: I3d162f6d2f1035b81b1b2eb915b488084e7ea36e
(cherry picked from commit fcd9f1a870)
Merged-In: I3d162f6d2f1035b81b1b2eb915b488084e7ea36e
When enabling "Automatically select network" in "Settings -> Network &
internet -> Mobile network -> Advanced" and rotating the device while
the dialog is showing there will be an IllegalArgumentException since
the decorView isn't attached to the window when dismissing the dialog.
Fixed by simply catching the exception since the dialog will be gone
anyway.
Bug: 146057372
Test: manual (see comment above)
Change-Id: I15f1d6f505fdf33964ce973ece31d6aa0d8f3909
This CL updates Settings for IKEv2/IPsec Platform VPN profiles.
Platform VPN profiles currently configure DNS and routes based on the
configuration received from the server. As such, these parameters are
not required to start an always-on VPN.
Similarly, a numeric server address is not required, as the IKEv2
library will do the DNS resolution based on the current Network. This
has the nice property of allowing the VPN to run with IPv4 or IPv6 outer
addresses (as opposed to LegacyVpn, which runs only in IPv4)
Lastly, this always allows configuration of the IKEv2 local identifier,
whether MSCHAPv2, RSA or PSK authentication is used.
Bug: 148991741
Test: Compiles, manually tested.
Change-Id: Ib1049fdc602e349bb0d24de536767a6e15adf194