Change to getSystemService(Class<T>) to align the capability with framework
part.
Bug: 179640862
Test: local
Change-Id: I1b4812044fc4876bec6645570049a60f9470dbbd
These methods have all moved to VpnManager.
Bug: 173331190
Test: atest SettingsRoboTests
Change-Id: I1dd57fa2213b1785a94ec9d6ab4cce3a5d2684ff
Merged-In: I1dd57fa2213b1785a94ec9d6ab4cce3a5d2684ff
The VPN code is moving out of ConnectivityService to a new
VpnManagerService. Update Settings to call into the VpnManager
class instead of using the AIDL interface directly. This way,
the VPN code can be moved without touching Settings.
Bug: 173331190
Test: builds, boots
Test: manually verified VPN settings page
Change-Id: Id2731a166b5d6783acb1c711a54604b69aa8c0d7
This change allows the Settings VPN pages to pull the apps providing a
new Platform VPN.
Bug: 144246835
Test: Compiles, manual testing
Change-Id: Ibb7e79ccde754724c9fc00c88da98e975f325ba7
Converting to Soong will move some code from directly compiled
into the app to compiled into an Android library and then
shared between the app and the tests. This will cause resource
IDs in the library to become non-final, which means they can
no longer be used in case statements. Convert affect case
statements to if blocks.
Test: m RunSettingsRoboTests
Change-Id: I25742a374f06d3fa4decbfc0d223a350acc50881
This means that in some cases RestrictedLockUtils has to be used and in
some RestrictedLockUtilsInternal.
This causes a lot of trivial code changes.
I also updated the ordering of the imports in all affected files.
Bug: 110953302
Test: Built
make -j RunSettingsRoboTests
Change-Id: I9bdf8b89134f853bae4f38c81af436715c73e924
Having consistent import order will reduce chance of merge
conflict between internal and external master
Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
This is a clean up to action bar menu item pattern, we will use the same
pattern to build search icon on all pages in a later change.
Bug: 68814716
Test: robotests
Change-Id: Iedd3ec263e8ccb63ed75ec7a95b28c00878b1de4
This is a case we found in monkey test, the main thread handles message while the activity has been recycled. It will raise a NullPointerException when we use getActivity() in following lines.
Assumpt the situation is: settings run in background and activity been recycled quickly, but handler still in the process.
Test: NA
Change-Id: I19db4f13e13294618ec8e42e4d9c54ce23504344
Signed-off-by: liurong <liurong@xiaomi.com>
- Add a method in VisibilityLoggerMixin to log visible event using
LogMaker, which allows logging additional FIELD_CONTEXT field.
- In Utils.startFragment, add current page's metricsCategory as an extra
to next page.
- In next page's onResume(), extract the previous page's metricsCategory
and send it to VisibilityLoggerMixin.visible()
- Update all caller with additional paramters
Change-Id: I8e1f2597fa465b7d3aa16fa1d21c052a3219694a
Fix: 35359289
Test: RunSettingsRoboTests
1. When Settings > More and change disallow configuring VPN policy
and resume Settings, update VPN preference state.
2. When Settings > More > VPN and change disallow configuring VPN policy
and resume VPN Settings, update its state.
Test: manual
Signed-off-by : Sungmin Lee <insight.lee@lge.com>
Change-Id: I4f3c85733ca6ba05cba46e2f4854f54a42b10c21
For validating that when VPNs are added / removed, the right set of
changes are made to the PreferenceGroup in which they are supposed to
be shown.
Bug: 30998549
Bug: 29093779
Test: runtest -x packages/apps/Settings/tests/unit/src/com/android/settings/vpn2/PreferenceListTest.java
Change-Id: I9394db0e78cc984ab62e3670aa0a7942ae767a66
So there's a way to disconnect from it, if someone deletes all the
keystore entries and the VPN doesn't actually exist any more (but
is still sitting around in memory somewhere keeping the connection
alive).
Bug: 29093779
Fix: 32880676
Test: runtest -x tests/app/src/com/android/settings/vpn2/VpnTests.java
Change-Id: I97671a74af746e5baaa5be0b5cff24e2b1766f53
Bug: 30681771
Test: SettingsUnitTests
Refactor visibility logging from InstrumentedFragment into a mixin. And
apply mixin in remaining fragments.
Change-Id: Ibbb59904336254a3e4bb9e8c7d0b36e5a6bc2622
As any change to the preference title will cause it to lose focus,
best not to do this too often.
Change-Id: Ibac27ee1de42fd7ca05f3e3685b84f37dac39517
Fix: 28191965
- Move always-on option for legacy vpn into the legacy vpn config page
- This implementation doesn't show dialogue when replacing existing always-on vpn
- Continue to disable lockdown option for legacy vpn when "persist.radio.imsregrequired" is true.
Not applying to vpn app
- Force to save account info when legacy vpn is always-on
- When legacy vpn is always-on, don't try to connect. (Otherwise, an exception is thrown)
TODO: Remove EXTRA_PICK_LOCKDOWN in LockdownVpnTracker in framework
Bug: 26950700
Change-Id: Ia80669359c0b7cdb955c84937156c020ac6e9af5
- Show admin support details when user taps on a cell and user restriction is on
- Show always-on-vpn active status in preference summary
- User can still open non-configurable per-VPN info page even when user restriction is applied
- Rename ConfigPreference to LegacyVpnPreference
- Move summary String handling into ManageablePreference
- ManageablePreference inherits GearPreference to reuse the code
- Don't show disconnect dialog when always-on is enabled
BUG=26950700
Change-Id: I37b087879cf3b674df528e7787d7bb1eead3310f
This CL adds a setting for each VPN
- When no_config_vpn user restriction is applied, user can't change anything in the page
- Launch the subsetting activity in the corresponding user to unlock keystore and force work challenge
- Show dialog when user replace always-on-VPN package
- When forget VPN, unset always-on-vpn
TODO: show per-VPN status in VPN list
Change-Id: Ica360ea44117db6a4ecfaed1eec6c188189c246c
As VPN settings listens to network events it may get woken up again
while it's in the background.
Bug: 23596799
Change-Id: If6e07493da447d7ded324ff86b6e7d57c5c615e3
Removed the left-alignment on restricted empty views which was
inherited from Bluetooth settings but inconsistent with normal
settings fragments.
Bug: 22685111
Change-Id: I3a36c47d523392b8925031d4cac2ab3ef681e360
This does not include certificates, private keys etc. which are still
saved in the KeyStore with the encryption the user requested for them.
Makes connecting to lockdown vpn before user unlock possible.
Bug: 26108660
Change-Id: I56c1672c7a41e761c2791584b99900aff51b59e4
The old way was garbage-heavy. To add to that some changes to the way
PreferenceScreens are redrawn was leading to some artifacts with items
fading in/out every tick.
Bug: 25588385
Change-Id: Idabf7546ab519bf196ad3b8582caa2ec6bf9e084
KeyStore.saw was renamed to KeyStore.list for clarity. The
implementation of both methods is exactly the same.
Bug: 18088752
Change-Id: I2f171a4b7479683d5af898ebdf1b6f8a741536d1
On a secondary user, the fragments ApnSettings, TetherSettings and VpnSettings
should not be started.
But an app can still send an intent to start these fragments.
Prevent this by checkin the userId in these fragments.
BUG:15313261
BUG:15312781
BUG:15312494
Change-Id: I2a36bb89a8e37e4440aa28372d7a1800b33dae37
These fetch info for the wrong user, which may be either wrong or worse
wholly nonexistent.
Bug: 20747154
Change-Id: Ibd5f2e5d3c5dfd252a032ebdfe204de7166fa3a5
VPN apps are shown alongside configured VPNs now. The requirement that
a password is set is now only enforced when setting up a configured
VPN as this is not necessary for apps.
Some UI redesign.
Bug: 19573824
Bug: 17474682
Bug: 19575658
Change-Id: I02bd977136929647d65b9784fb4cc5df24b45428