private int readFromLocal(String accPath) { // isAlreadyReadLocal = true; String path = accPath + LOCAL_CONFIG_FILENAME; if (!FileOperation.fileExists(path)) { readConfig(); return -1; } byte[] buf = FileOperation.readFromFileV2(path, 0, -1); if (Util.isNullOrNil(buf)) { readConfig(); return -2; } String info = new String(buf); if (Util.isNullOrNil(info)) { readConfig(); return -3; } Log.d(TAG, "readFromLocal info " + info); cfgStg.set(ConstantsStorage.USERINFO_SERVER_CONFIG_INFO, info); isAlreadyReadLocal = true; super.doNotify(info); return 0; }
public int saveConfigInfo(String info) { Log.d(TAG, "dkconf info:[%s] ", info); if (isAlreadyReadLocal) { return 0; } cfgStg.set(ConstantsStorage.USERINFO_SERVER_CONFIG_INFO, info); infoCache = null; super.doNotify(info); return 0; }