summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2014-11-21 17:53:55 +0100
committerArne Schwabe <arne@rfc2549.org>2014-11-21 17:53:55 +0100
commit4e40f6128960ac9e0fc617d86aeee9331a95381d (patch)
tree594c59c5e9c50ebd807e56877b7aeec284a1ea5f
parentf086819427fb2bb5a7887242a1a821c5bd975293 (diff)
Do not use an implicit Intent in the remote example
--HG-- extra : rebase_source : a7e9847f15adfa702c2712b5ee8d9878674ba4b6
-rw-r--r--main/src/main/java/de/blinkt/openvpn/activities/ConfigConverter.java2
-rw-r--r--remoteExample/src/main/java/de/blinkt/openvpn/remote/MainFragment.java7
2 files changed, 5 insertions, 4 deletions
diff --git a/main/src/main/java/de/blinkt/openvpn/activities/ConfigConverter.java b/main/src/main/java/de/blinkt/openvpn/activities/ConfigConverter.java
index d958bf5f..91b6efcd 100644
--- a/main/src/main/java/de/blinkt/openvpn/activities/ConfigConverter.java
+++ b/main/src/main/java/de/blinkt/openvpn/activities/ConfigConverter.java
@@ -536,10 +536,8 @@ public class ConfigConverter extends Activity implements FileSelectCallback {
if (data!=null)
cursor = getContentResolver().query(data, null, null, null, null);
-
try {
-
if (cursor!=null && cursor.moveToFirst()) {
int columnIndex = cursor.getColumnIndex(OpenableColumns.DISPLAY_NAME);
diff --git a/remoteExample/src/main/java/de/blinkt/openvpn/remote/MainFragment.java b/remoteExample/src/main/java/de/blinkt/openvpn/remote/MainFragment.java
index 0bb634aa..4f6481b0 100644
--- a/remoteExample/src/main/java/de/blinkt/openvpn/remote/MainFragment.java
+++ b/remoteExample/src/main/java/de/blinkt/openvpn/remote/MainFragment.java
@@ -159,8 +159,11 @@ public class MainFragment extends Fragment implements View.OnClickListener, Hand
private String mStartUUID=null;
private void bindService() {
- getActivity().bindService(new Intent(IOpenVPNAPIService.class.getName()),
- mConnection, Context.BIND_AUTO_CREATE);
+
+ Intent icsopenvpnService = new Intent(IOpenVPNAPIService.class.getName());
+ icsopenvpnService.setPackage("de.blinkt.openvpn");
+
+ getActivity().bindService(icsopenvpnService, mConnection, Context.BIND_AUTO_CREATE);
}
protected void listVPNs() {