Merge pull request '修改代码bug' (#17) from fanyiwen_weihu into dev

Xie_Changrong
pyxu2pz5g 3 years ago
commit da53fbd27c

@ -12,49 +12,7 @@
<option name="autoReloadType" value="NONE" /> <option name="autoReloadType" value="NONE" />
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="f028e52a-5f24-429b-8af1-f5a0863e8065" name="Default Changelist" comment=""> <list default="true" id="f028e52a-5f24-429b-8af1-f5a0863e8065" name="Default Changelist" comment="" />
<change beforePath="$PROJECT_DIR$/.gradle/7.2/executionHistory/executionHistory.bin" beforeDir="false" afterPath="$PROJECT_DIR$/.gradle/7.2/executionHistory/executionHistory.bin" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.gradle/7.2/executionHistory/executionHistory.lock" beforeDir="false" afterPath="$PROJECT_DIR$/.gradle/7.2/executionHistory/executionHistory.lock" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.gradle/7.2/fileHashes/fileHashes.bin" beforeDir="false" afterPath="$PROJECT_DIR$/.gradle/7.2/fileHashes/fileHashes.bin" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.gradle/7.2/fileHashes/fileHashes.lock" beforeDir="false" afterPath="$PROJECT_DIR$/.gradle/7.2/fileHashes/fileHashes.lock" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.gradle/7.2/fileHashes/resourceHashesCache.bin" beforeDir="false" afterPath="$PROJECT_DIR$/.gradle/7.2/fileHashes/resourceHashesCache.bin" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.gradle/buildOutputCleanup/buildOutputCleanup.lock" beforeDir="false" afterPath="$PROJECT_DIR$/.gradle/buildOutputCleanup/buildOutputCleanup.lock" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/dbnavigator.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/dbnavigator.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/sonarlint/issuestore/0/6/066a3db98a4a279fde40d6ddf92c417b5c93198b" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/sonarlint/issuestore/0/e/0e854f4195c0d44c8ada29e4ad9b0cb3970cb0e6" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/sonarlint/issuestore/5/3/53b98e6d0ece8f8c43934ef63db400be3bbe507c" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/sonarlint/issuestore/6/c/6c40630893054a28c13c2eb04ceb5fa51173b0b6" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/sonarlint/issuestore/7/2/72971ba5cd5eebd08ece719bc9283211cd06a429" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/sonarlint/issuestore/7/b/7bccae5ecd745bba36ddfd464ec07b66de678477" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/sonarlint/issuestore/b/6/b65a3167abb9f406cb51bd23d7afef4245bbcbb5" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/sonarlint/issuestore/f/0/f07866736216be0ee2aba49e392191aeae700a35" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/sonarlint/issuestore/index.pb" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/sonarlint/issuestore/index.pb" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/intermediates/desugar_graph/debug/out/currentProject/dirs_bucket_0/graph.bin" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/intermediates/desugar_graph/debug/out/currentProject/dirs_bucket_0/graph.bin" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/intermediates/desugar_graph/debug/out/currentProject/dirs_bucket_1/graph.bin" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/intermediates/desugar_graph/debug/out/currentProject/dirs_bucket_1/graph.bin" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/intermediates/desugar_graph/debug/out/currentProject/dirs_bucket_2/graph.bin" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/intermediates/desugar_graph/debug/out/currentProject/dirs_bucket_2/graph.bin" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/intermediates/desugar_graph/debug/out/currentProject/dirs_bucket_4/graph.bin" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/intermediates/desugar_graph/debug/out/currentProject/dirs_bucket_4/graph.bin" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/intermediates/dex/debug/mergeDexDebug/classes.dex" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/intermediates/dex/debug/mergeDexDebug/classes.dex" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/intermediates/incremental/mergeDebugResources/compile-file-map.properties" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/intermediates/incremental/mergeDebugResources/compile-file-map.properties" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/intermediates/incremental/mergeDebugResources/merger.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/intermediates/incremental/mergeDebugResources/merger.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/intermediates/incremental/packageDebug/tmp/debug/dex-renamer-state.txt" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/intermediates/incremental/packageDebug/tmp/debug/dex-renamer-state.txt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/intermediates/incremental/packageDebug/tmp/debug/zip-cache/androidResources" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/intermediates/incremental/packageDebug/tmp/debug/zip-cache/androidResources" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity.class" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NotesListActivity.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/intermediates/merged_res_blame_folder/debug/out/multi-v2/debug.json" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/intermediates/merged_res_blame_folder/debug/out/multi-v2/debug.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/intermediates/merged_res_blame_folder/debug/out/multi-v2/values-zh-rCN.json" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/intermediates/merged_res_blame_folder/debug/out/multi-v2/values-zh-rCN.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/intermediates/merged_res_blame_folder/debug/out/single/debug.json" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/intermediates/merged_res_blame_folder/debug/out/single/debug.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/intermediates/processed_res/debug/out/resources-debug.ap_" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/intermediates/processed_res/debug/out/resources-debug.ap_" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity.dex" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/intermediates/project_dex_archive/debug/out/net/micode/notes/ui/NotesListActivity.dex" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/intermediates/stable_resource_ids_file/debug/stableIds.txt" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/intermediates/stable_resource_ids_file/debug/stableIds.txt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/outputs/apk/debug/app-debug.apk" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/outputs/apk/debug/app-debug.apk" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin" beforeDir="false" afterPath="$PROJECT_DIR$/app/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/net/micode/notes/ui/NoteEditActivity.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/net/micode/notes/ui/NoteEditActivity.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/net/micode/notes/ui/NotesListActivity.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/net/micode/notes/ui/NotesListActivity.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/menu/sub_folder.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/menu/sub_folder.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/menu/trash_folder.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/menu/trash_folder.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/values-zh-rCN/strings.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/values-zh-rCN/strings.xml" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@ -63,7 +21,7 @@
<component name="CodeInsightWorkspaceSettings"> <component name="CodeInsightWorkspaceSettings">
<option name="optimizeImportsOnTheFly" value="true" /> <option name="optimizeImportsOnTheFly" value="true" />
</component> </component>
<component name="ExecutionTargetManager" SELECTED_TARGET="device_and_snapshot_combo_box_target[E:\SDK\avd\.android\avd\Pixel_2_XL_API_23.avd]" /> <component name="ExecutionTargetManager" SELECTED_TARGET="device_and_snapshot_combo_box_target[C:\Users\fanyi\.android\avd\Pixel_XL_API_23_2.avd]" />
<component name="ExternalProjectsData"> <component name="ExternalProjectsData">
<projectState path="$PROJECT_DIR$"> <projectState path="$PROJECT_DIR$">
<ProjectState /> <ProjectState />
@ -141,7 +99,7 @@
<property name="android-custom-viewE:/Notes-master1/app/src/main/java/net/micode/notes/ui/NoteEditText.java_SELECTED" value="NoteEditText" /> <property name="android-custom-viewE:/Notes-master1/app/src/main/java/net/micode/notes/ui/NoteEditText.java_SELECTED" value="NoteEditText" />
<property name="android-custom-viewE:/git/xcr_weihu/src/Notes-master1/app/src/main/java/net/micode/notes/ui/NoteEditText.java_NoteEditText_DIMENSIONS" value="1080&#10;1920" /> <property name="android-custom-viewE:/git/xcr_weihu/src/Notes-master1/app/src/main/java/net/micode/notes/ui/NoteEditText.java_NoteEditText_DIMENSIONS" value="1080&#10;1920" />
<property name="android-custom-viewE:/git/xcr_weihu/src/Notes-master1/app/src/main/java/net/micode/notes/ui/NoteEditText.java_SELECTED" value="NoteEditText" /> <property name="android-custom-viewE:/git/xcr_weihu/src/Notes-master1/app/src/main/java/net/micode/notes/ui/NoteEditText.java_SELECTED" value="NoteEditText" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/app/src/main/res/drawable-hdpi" /> <property name="last_opened_file_path" value="$PROJECT_DIR$/../Notes-master" />
<property name="project.structure.last.edited" value="Dependencies" /> <property name="project.structure.last.edited" value="Dependencies" />
<property name="project.structure.proportion" value="0.17" /> <property name="project.structure.proportion" value="0.17" />
<property name="project.structure.side.proportion" value="0.2" /> <property name="project.structure.side.proportion" value="0.2" />
@ -247,52 +205,6 @@
<option name="oldMeFiltersMigrated" value="true" /> <option name="oldMeFiltersMigrated" value="true" />
</component> </component>
<component name="XDebuggerManager"> <component name="XDebuggerManager">
<breakpoint-manager>
<breakpoints>
<line-breakpoint suspend="THREAD" type="java-method">
<url>file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/ui/NotesListActivity.java</url>
<line>154</line>
<properties class="net.micode.notes.ui.NotesListActivity" />
<option name="timeStamp" value="9" />
</line-breakpoint>
<line-breakpoint suspend="THREAD" type="java-method">
<url>file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/ui/NotesListActivity.java</url>
<line>287</line>
<properties class="net.micode.notes.ui.NotesListActivity.ModeCallback" />
<option name="timeStamp" value="11" />
</line-breakpoint>
<line-breakpoint suspend="THREAD" type="java-line">
<url>file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/ui/NotesListActivity.java</url>
<line>1086</line>
<option name="timeStamp" value="13" />
</line-breakpoint>
<line-breakpoint suspend="THREAD" type="java-line">
<url>file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/ui/NotesListActivity.java</url>
<line>929</line>
<option name="timeStamp" value="14" />
</line-breakpoint>
<line-breakpoint suspend="THREAD" type="java-line">
<url>file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/ui/NotesListActivity.java</url>
<line>293</line>
<option name="timeStamp" value="18" />
</line-breakpoint>
<line-breakpoint suspend="THREAD" type="java-line">
<url>file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/ui/NotesListActivity.java</url>
<line>369</line>
<option name="timeStamp" value="21" />
</line-breakpoint>
<line-breakpoint suspend="THREAD" type="java-line">
<url>file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/ui/NotesListActivity.java</url>
<line>666</line>
<option name="timeStamp" value="28" />
</line-breakpoint>
<line-breakpoint suspend="THREAD" type="java-line">
<url>file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/ui/NotesListActivity.java</url>
<line>729</line>
<option name="timeStamp" value="31" />
</line-breakpoint>
</breakpoints>
</breakpoint-manager>
<watches-manager> <watches-manager>
<configuration name="app"> <configuration name="app">
<watch expression="savedInstanceState" /> <watch expression="savedInstanceState" />

@ -182,6 +182,7 @@ public class Task extends Node {
} }
try { try {
if (js!=null) {
JSONObject note = js.getJSONObject(GTaskStringUtils.META_HEAD_NOTE); JSONObject note = js.getJSONObject(GTaskStringUtils.META_HEAD_NOTE);
JSONArray dataArray = js.getJSONArray(GTaskStringUtils.META_HEAD_DATA); JSONArray dataArray = js.getJSONArray(GTaskStringUtils.META_HEAD_DATA);
@ -197,6 +198,7 @@ public class Task extends Node {
break; break;
} }
} }
}
} catch (JSONException e) { } catch (JSONException e) {
Log.e(TAG, e.toString()); Log.e(TAG, e.toString());

@ -135,6 +135,7 @@ public class TaskList extends Node {
} }
try { try {
if (js != null) {
JSONObject folder = js.getJSONObject(GTaskStringUtils.META_HEAD_NOTE); JSONObject folder = js.getJSONObject(GTaskStringUtils.META_HEAD_NOTE);
if (folder.getInt(NoteColumns.TYPE) == Notes.TYPE_FOLDER) { if (folder.getInt(NoteColumns.TYPE) == Notes.TYPE_FOLDER) {
@ -151,6 +152,7 @@ public class TaskList extends Node {
} else { } else {
Log.e(TAG, "error type"); Log.e(TAG, "error type");
} }
}
} catch (JSONException e) { } catch (JSONException e) {
Log.e(TAG, e.toString()); Log.e(TAG, e.toString());
e.printStackTrace(); e.printStackTrace();
@ -205,7 +207,7 @@ public class TaskList extends Node {
return SYNC_ACTION_UPDATE_REMOTE; return SYNC_ACTION_UPDATE_REMOTE;
} else { } else {
// for folder conflicts, just apply local modification // for folder conflicts, just apply local modification
return SYNC_ACTION_UPDATE_REMOTE; return SYNC_ACTION_UPDATE_LOCAL;
} }
} }
} catch (Exception e) { } catch (Exception e) {

@ -306,11 +306,8 @@ public class GTaskClient {
input = new InflaterInputStream(entity.getContent(), inflater); input = new InflaterInputStream(entity.getContent(), inflater);
} }
try { try (InputStreamReader isr = new InputStreamReader(input); BufferedReader br = new BufferedReader(isr)){
InputStreamReader isr = new InputStreamReader(input);
BufferedReader br = new BufferedReader(isr);
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
while (true) { while (true) {
String buff = br.readLine(); String buff = br.readLine();
if (buff == null) { if (buff == null) {

@ -328,7 +328,11 @@ public class BackupUtils {
filedir.mkdir(); filedir.mkdir();
} }
if (!file.exists()) { if (!file.exists()) {
file.createNewFile(); boolean bool = file.createNewFile();
if(bool == false)
Log.e(TAG,"generateFileMountedOnSDcard: createNewFile false");
else
Log.e(TAG,"generateFileMountedOnSDcard: createNewFile true");
} }
return file; return file;
} catch (SecurityException e) { } catch (SecurityException e) {

@ -16,12 +16,6 @@
package net.micode.notes.ui; package net.micode.notes.ui;
import java.util.Calendar;
import net.micode.notes.R;
import net.micode.notes.ui.DateTimePicker;
import net.micode.notes.ui.DateTimePicker.OnDateTimeChangedListener;
import android.app.AlertDialog; import android.app.AlertDialog;
import android.content.Context; import android.content.Context;
import android.content.DialogInterface; import android.content.DialogInterface;
@ -29,6 +23,11 @@ import android.content.DialogInterface.OnClickListener;
import android.text.format.DateFormat; import android.text.format.DateFormat;
import android.text.format.DateUtils; import android.text.format.DateUtils;
import net.micode.notes.R;
import net.micode.notes.ui.DateTimePicker.OnDateTimeChangedListener;
import java.util.Calendar;
public class DateTimePickerDialog extends AlertDialog implements OnClickListener { public class DateTimePickerDialog extends AlertDialog implements OnClickListener {
private Calendar mDate = Calendar.getInstance(); private Calendar mDate = Calendar.getInstance();
@ -77,7 +76,7 @@ public class DateTimePickerDialog extends AlertDialog implements OnClickListener
DateUtils.FORMAT_SHOW_YEAR | DateUtils.FORMAT_SHOW_YEAR |
DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_SHOW_DATE |
DateUtils.FORMAT_SHOW_TIME; DateUtils.FORMAT_SHOW_TIME;
flag |= mIs24HourView ? DateUtils.FORMAT_24HOUR : DateUtils.FORMAT_24HOUR; flag |= mIs24HourView ? DateUtils.FORMAT_24HOUR : DateUtils.FORMAT_12HOUR;
setTitle(DateUtils.formatDateTime(this.getContext(), date, flag)); setTitle(DateUtils.formatDateTime(this.getContext(), date, flag));
} }

@ -79,7 +79,7 @@ import java.io.InputStream;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.util.HashSet; import java.util.HashSet;
public class NotesListActivity extends AppCompatActivity implements OnClickListener, OnItemLongClickListener { public class NotesListActivity<Params> extends AppCompatActivity implements OnClickListener, OnItemLongClickListener {
private int time_mode = 0; private int time_mode = 0;
private static final int FOLDER_NOTE_LIST_QUERY_TOKEN = 0; private static final int FOLDER_NOTE_LIST_QUERY_TOKEN = 0;
@ -175,20 +175,14 @@ public class NotesListActivity extends AppCompatActivity implements OnClickListe
if (!sp.getBoolean(PREFERENCE_ADD_INTRODUCTION, false)) { if (!sp.getBoolean(PREFERENCE_ADD_INTRODUCTION, false)) {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
InputStream in = null; InputStream in = null;
try { try (InputStreamReader isr = new InputStreamReader(in);BufferedReader br = new BufferedReader(isr)){
in = getResources().openRawResource(R.raw.introduction); in = getResources().openRawResource(R.raw.introduction);
if (in != null) {
InputStreamReader isr = new InputStreamReader(in);
BufferedReader br = new BufferedReader(isr);
char [] buf = new char[1024]; char [] buf = new char[1024];
int len = 0; int len = 0;
while ((len = br.read(buf)) > 0) { while ((len = br.read(buf)) > 0) {
sb.append(buf, 0, len); sb.append(buf, 0, len);
} }
} else {
Log.e(TAG, "Read introduction file error");
return;
}
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
return; return;
@ -510,8 +504,8 @@ public class NotesListActivity extends AppCompatActivity implements OnClickListe
return; return;
} }
} }
new AsyncTask<Void, Void, HashSet<AppWidgetAttribute>>() { new AsyncTask<Params, Void, HashSet<AppWidgetAttribute>>() {
protected HashSet<AppWidgetAttribute> doInBackground(Void... unused) { protected HashSet<AppWidgetAttribute> doInBackground(Params... unused) {
HashSet<AppWidgetAttribute> widgets = mNotesListAdapter.getSelectedWidget(); HashSet<AppWidgetAttribute> widgets = mNotesListAdapter.getSelectedWidget();
if (!isSyncMode()) { if (!isSyncMode()) {
if (mCurrentFolderId == Notes.ID_TRASH_FOLER){ if (mCurrentFolderId == Notes.ID_TRASH_FOLER){

Loading…
Cancel
Save