File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
app/src/main/java/com/afwsamples/testdpc/policy/networking Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 18
18
19
19
import android .annotation .TargetApi ;
20
20
import android .app .admin .DevicePolicyManager ;
21
+ import android .content .ComponentName ;
21
22
import android .content .Context ;
22
23
import android .content .pm .PackageManager ;
23
24
import android .os .Build ;
@@ -56,7 +57,8 @@ public void onResume() {
56
57
@ Override
57
58
protected void setSelectedPackage (String pkg ) {
58
59
try {
59
- mDpm .setAlwaysOnVpnPackage (DeviceAdminReceiver .getComponentName (getActivity ()), pkg );
60
+ final ComponentName who = DeviceAdminReceiver .getComponentName (getActivity ());
61
+ mDpm .setAlwaysOnVpnPackage (who , pkg , /* lockdownEnabled */ true );
60
62
} catch (PackageManager .NameNotFoundException | UnsupportedOperationException e ) {
61
63
if (pkg != null ) {
62
64
clearSelectedPackage ();
You can’t perform that action at this time.
0 commit comments