Sfoglia il codice sorgente

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

Pen Li 8 anni fa
parent
commit
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;
         boolean compress = true;
         int retry_count = 2;
         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) {
         if (preferences != null) {
 
 
             auto_upload = preferences.getBoolean("auto_upload",true);
             auto_upload = preferences.getBoolean("auto_upload",true);
@@ -53,7 +54,8 @@ public class uploadSettingActivity extends AppCompatActivity {
 
 
     public void saveSetting() {
     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();
         SharedPreferences.Editor editor = preferences.edit();
 
 
         boolean auto_upload = auto_start_swt.isChecked();
         boolean auto_upload = auto_start_swt.isChecked();