欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Android 跨進(jìn)程SharedPreferences異常詳解

 更新時(shí)間:2017年05月15日 15:37:08   作者:李培能  
這篇文章主要介紹了Android 跨進(jìn)程SharedPreferences異常詳解的相關(guān)資料,需要的朋友可以參考下

Android 跨進(jìn)程SharedPreferences異常詳解

Context c = null;
    try {
      c = context.createPackageContext(PREFERENCE_PACKAGE,
          Context.CONTEXT_IGNORE_SECURITY);
    } catch (NameNotFoundException e) {
      e.printStackTrace();
    }
    if (c != null) {
      SharedPreferences infoSp = c.getSharedPreferences(PREFERENCE_NAME,
          Context.MODE_MULTI_PROCESS);
      int status = infoSp.getInt("break", 1);
      Logcat.d("br" + status);
      return 0 == status;
    } else {
      Logcat.w("brake_status error.... c==null ");
    }
    return false;

感謝閱讀,希望能幫助到大家,謝謝大家對(duì)本站的支持!

相關(guān)文章

最新評(píng)論