Back to project page matkakortti-widget.
The source code is released under:
GNU General Public License
If you think the Android project matkakortti-widget listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
/* * Matkakortti Widget is licensed under GPLv2. * See LICENSE.txt for more information. *//*w ww . j a v a 2 s . com*/ package fi.iki.dezgeg.matkakorttiwidget.gui; import android.content.SharedPreferences; import java.net.SocketException; import java.net.UnknownHostException; import java.util.Map; public class Utils { public static boolean isConnectionProblemRelatedException(Throwable e) { if (e instanceof UnknownHostException) return true; if (e instanceof SocketException) return true; if (e.getCause() != null) return isConnectionProblemRelatedException(e.getCause()); return false; } public static String prefKeyForWidgetId(int appWidgetId, String key) { return "widget_" + key + "_" + appWidgetId; } public static void dumpPrefs(SharedPreferences prefs) { System.out.println("Preferences:"); for (Map.Entry<String, ?> pair : prefs.getAll().entrySet()) { System.out.println(" " + pair.getKey() + " -> " + pair.getValue()); } System.out.println(); } }