From 420b7d6a3a8045b522035a4ea87ef4f8092f38a9 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Wed, 2 Jul 2014 15:07:37 +0200 Subject: Silence deprecation warning in xposed module --HG-- extra : rebase_source : bedaaa15ad9b43c5aa644358ffbbc359eb22905b --- .../blinkt/vpndialogxposed/AllowedVPNsChooser.java | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'vpndialogxposed') diff --git a/vpndialogxposed/src/main/java/de/blinkt/vpndialogxposed/AllowedVPNsChooser.java b/vpndialogxposed/src/main/java/de/blinkt/vpndialogxposed/AllowedVPNsChooser.java index 638ca2ba..0e7dc326 100644 --- a/vpndialogxposed/src/main/java/de/blinkt/vpndialogxposed/AllowedVPNsChooser.java +++ b/vpndialogxposed/src/main/java/de/blinkt/vpndialogxposed/AllowedVPNsChooser.java @@ -2,23 +2,23 @@ package de.blinkt.vpndialogxposed; import android.Manifest; import android.app.ListActivity; -import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; -import android.content.pm.*; +import android.content.pm.PackageInfo; +import android.content.pm.PackageManager; +import android.content.pm.ServiceInfo; import android.os.Bundle; import android.widget.AbsListView; import android.widget.ArrayAdapter; import android.widget.ListAdapter; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.*; +import java.util.Collection; +import java.util.HashSet; +import java.util.Random; +import java.util.Set; +import java.util.Vector; -/** - * Created by arne on 06.10.13. - */ public class AllowedVPNsChooser extends ListActivity { public static final String ALLOWED_APPS = "allowedApps"; @@ -47,7 +47,7 @@ public class AllowedVPNsChooser extends ListActivity { private Collection getAllowedApps(){ - SharedPreferences prefs = getPreferences(MODE_WORLD_READABLE); + @SuppressWarnings("deprecation") SharedPreferences prefs = getPreferences(MODE_WORLD_READABLE); HashSet defaultapps = new HashSet(); defaultapps.add("de.blinkt.openvpn"); return prefs.getStringSet(ALLOWED_APPS,defaultapps ); @@ -55,7 +55,7 @@ public class AllowedVPNsChooser extends ListActivity { private void saveAllowedApps(Set allowedApps) { - SharedPreferences prefs = getPreferences(MODE_WORLD_READABLE); + @SuppressWarnings("deprecation") SharedPreferences prefs = getPreferences(MODE_WORLD_READABLE); SharedPreferences.Editor prefeditor = prefs.edit(); prefeditor.putStringSet(ALLOWED_APPS,allowedApps); prefeditor.putInt("random",new Random().nextInt()); -- cgit v1.2.3