Просмотр исходного кода

1.修改RA Image Android上传设置保存。

Pen Li 8 лет назад
Родитель
Сommit
6f48d961f2

+ 4 - 2
RA Image/app/src/main/java/com/usai/redant/raimage/uploadSettingActivity.java

@@ -28,7 +28,8 @@ public class uploadSettingActivity extends AppCompatActivity {
         boolean compress = true;
         int retry_count = 2;
 
-        SharedPreferences preferences = getSharedPreferences("uploadSetting", Context.MODE_PRIVATE);
+//        SharedPreferences preferences = getSharedPreferences("uploadSetting", Context.MODE_PRIVATE);
+        SharedPreferences preferences = RedAntApplication.getInstance().getSharedPreferences("UploadManager", 0);
         if (preferences != null) {
 
             auto_upload = preferences.getBoolean("auto_upload",true);
@@ -53,7 +54,8 @@ public class uploadSettingActivity extends AppCompatActivity {
 
     public void saveSetting() {
 
-        SharedPreferences preferences = getSharedPreferences("uploadSetting",Context.MODE_PRIVATE);
+//        SharedPreferences preferences = getSharedPreferences("uploadSetting",Context.MODE_PRIVATE);
+        SharedPreferences preferences = RedAntApplication.getInstance().getSharedPreferences("UploadManager", 0);
         SharedPreferences.Editor editor = preferences.edit();
 
         boolean auto_upload = auto_start_swt.isChecked();