Here you can find the source of getPrefObject(SharedPreferences pref, String key)
protected static Object getPrefObject(SharedPreferences pref, String key)
//package com.java2s; import java.util.Map; import android.content.SharedPreferences; public class Main { protected static Object getPrefObject(SharedPreferences pref, String key) { Map<String, ?> all = pref.getAll(); if (all != null) { Object obj = all.get(key); return obj; }/* w w w . j av a2s . c o m*/ return null; } }