Loading packages/VpnDialogs/src/com/android/vpndialogs/ConfirmDialog.java +6 −3 Original line number Diff line number Diff line Loading @@ -23,7 +23,8 @@ import android.content.DialogInterface; import android.content.Intent; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.net.ConnectivityManager; import android.net.IConnectivityManager; import android.os.ServiceManager; import android.util.Log; import android.view.View; import android.widget.Button; Loading @@ -37,7 +38,7 @@ public class ConfirmDialog extends Activity implements CompoundButton.OnCheckedC private String mPackageName; private ConnectivityManager mService; private IConnectivityManager mService; private AlertDialog mDialog; private Button mButton; Loading @@ -47,7 +48,9 @@ public class ConfirmDialog extends Activity implements CompoundButton.OnCheckedC super.onResume(); try { mPackageName = getCallingPackage(); mService = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); mService = IConnectivityManager.Stub.asInterface( ServiceManager.getService(Context.CONNECTIVITY_SERVICE)); if (mPackageName.equals(mService.prepareVpn(null))) { setResult(RESULT_OK); Loading packages/VpnDialogs/src/com/android/vpndialogs/ManageDialog.java +5 −3 Original line number Diff line number Diff line Loading @@ -23,9 +23,10 @@ import android.content.DialogInterface; import android.content.Intent; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.net.ConnectivityManager; import android.net.IConnectivityManager; import android.os.Handler; import android.os.Message; import android.os.ServiceManager; import android.os.SystemClock; import android.util.Log; import android.view.View; Loading @@ -45,7 +46,7 @@ public class ManageDialog extends Activity implements private String mInterfaceName; private long mStartTime; private ConnectivityManager mService; private IConnectivityManager mService; private AlertDialog mDialog; private TextView mDuration; Loading @@ -64,7 +65,8 @@ public class ManageDialog extends Activity implements mInterfaceName = intent.getStringExtra("interfaceName"); mStartTime = intent.getLongExtra("startTime", 0); mService = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); mService = IConnectivityManager.Stub.asInterface( ServiceManager.getService(Context.CONNECTIVITY_SERVICE)); PackageManager pm = getPackageManager(); ApplicationInfo app = pm.getApplicationInfo(mPackageName, 0); Loading Loading
packages/VpnDialogs/src/com/android/vpndialogs/ConfirmDialog.java +6 −3 Original line number Diff line number Diff line Loading @@ -23,7 +23,8 @@ import android.content.DialogInterface; import android.content.Intent; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.net.ConnectivityManager; import android.net.IConnectivityManager; import android.os.ServiceManager; import android.util.Log; import android.view.View; import android.widget.Button; Loading @@ -37,7 +38,7 @@ public class ConfirmDialog extends Activity implements CompoundButton.OnCheckedC private String mPackageName; private ConnectivityManager mService; private IConnectivityManager mService; private AlertDialog mDialog; private Button mButton; Loading @@ -47,7 +48,9 @@ public class ConfirmDialog extends Activity implements CompoundButton.OnCheckedC super.onResume(); try { mPackageName = getCallingPackage(); mService = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); mService = IConnectivityManager.Stub.asInterface( ServiceManager.getService(Context.CONNECTIVITY_SERVICE)); if (mPackageName.equals(mService.prepareVpn(null))) { setResult(RESULT_OK); Loading
packages/VpnDialogs/src/com/android/vpndialogs/ManageDialog.java +5 −3 Original line number Diff line number Diff line Loading @@ -23,9 +23,10 @@ import android.content.DialogInterface; import android.content.Intent; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.net.ConnectivityManager; import android.net.IConnectivityManager; import android.os.Handler; import android.os.Message; import android.os.ServiceManager; import android.os.SystemClock; import android.util.Log; import android.view.View; Loading @@ -45,7 +46,7 @@ public class ManageDialog extends Activity implements private String mInterfaceName; private long mStartTime; private ConnectivityManager mService; private IConnectivityManager mService; private AlertDialog mDialog; private TextView mDuration; Loading @@ -64,7 +65,8 @@ public class ManageDialog extends Activity implements mInterfaceName = intent.getStringExtra("interfaceName"); mStartTime = intent.getLongExtra("startTime", 0); mService = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); mService = IConnectivityManager.Stub.asInterface( ServiceManager.getService(Context.CONNECTIVITY_SERVICE)); PackageManager pm = getPackageManager(); ApplicationInfo app = pm.getApplicationInfo(mPackageName, 0); Loading