Merge remote-tracking branch 'origin/qutian_Fang' into develop

This commit is contained in:
ziji Wu 2019-10-11 23:54:28 +08:00
commit 199c8ed72f
3 changed files with 290 additions and 241 deletions

View File

@ -11,9 +11,8 @@
<component name="ChangeListManager">
<list default="true" id="a4b1c65b-c711-4e3b-9768-65e31cf57d47" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/net/micode/notes/gtask/remote/GTaskASyncTask.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/net/micode/notes/gtask/remote/GTaskASyncTask.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/net/micode/notes/gtask/remote/GTaskClient.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/net/micode/notes/gtask/remote/GTaskClient.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/net/micode/notes/gtask/remote/GTaskManager.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/net/micode/notes/gtask/remote/GTaskManager.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/net/micode/notes/tool/BackupUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/net/micode/notes/tool/BackupUtils.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/net/micode/notes/tool/DataUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/net/micode/notes/tool/DataUtils.java" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
@ -35,47 +34,38 @@
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/tool/BackupUtils.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="390">
<caret line="292" column="57" selection-start-line="292" selection-start-column="27" selection-end-line="292" selection-end-column="57" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/gtask/data/MetaData.java">
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/tool/DataUtils.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="135">
<caret line="29" column="36" lean-forward="true" selection-start-line="29" selection-start-column="36" selection-end-line="29" selection-end-column="36" />
<state relative-caret-position="2524">
<caret line="285" column="35" lean-forward="true" selection-start-line="285" selection-start-column="24" selection-end-line="285" selection-end-column="38" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/gtask/exception/ActionFailureException.java">
<entry file="jar://G:/Android/Sdk/platforms/android-28/android.jar!/android/content/ContentResolver.class">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="75">
<caret line="19" column="3" selection-start-line="19" selection-start-column="3" selection-end-line="19" selection-end-column="3" />
<state relative-caret-position="159">
<caret line="82" column="24" selection-start-line="82" selection-start-column="24" selection-end-line="82" selection-end-column="24" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/gtask/exception/NetworkFailureException.java">
<entry file="jar://G:/Android/Sdk/platforms/android-28/android.jar!/android/content/ContentProviderOperation.class">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="45">
<caret line="17" selection-start-line="17" selection-end-line="18" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/gtask/remote/GTaskASyncTask.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-495">
<caret line="61" column="48" lean-forward="true" selection-start-line="61" selection-start-column="48" selection-end-line="61" selection-end-column="48" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/gtask/remote/GTaskClient.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-1049">
<caret line="490" column="10" selection-start-line="490" selection-start-column="10" selection-end-line="490" selection-end-column="10" />
<state relative-caret-position="90">
<caret line="12" column="13" selection-start-line="12" selection-start-column="13" selection-end-line="12" selection-end-column="13" />
</state>
</provider>
</entry>
@ -83,29 +73,17 @@
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/gtask/remote/GTaskManager.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="195">
<caret line="110" lean-forward="true" selection-start-line="110" selection-end-line="110" />
<state relative-caret-position="375">
<caret line="68" column="21" selection-start-line="68" selection-start-column="21" selection-end-line="68" selection-end-column="21" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/data/Contact.java">
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/gtask/remote/GTaskSyncService.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="120">
<caret line="29" column="13" selection-start-line="29" selection-start-column="13" selection-end-line="29" selection-end-column="13" />
<folding>
<element signature="e#0#2650#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/data/Notes.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="75">
<caret line="19" selection-start-line="19" selection-end-line="21" selection-end-column="3" />
<caret line="27" column="29" selection-start-line="27" selection-start-column="13" selection-end-line="27" selection-end-column="29" />
</state>
</provider>
</entry>
@ -113,17 +91,26 @@
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/tool/ResourceParser.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="120">
<caret line="26" column="13" selection-start-line="26" selection-start-column="13" selection-end-line="26" selection-end-column="13" />
<state relative-caret-position="2205">
<caret line="185" column="1" selection-start-line="185" selection-start-column="1" selection-end-line="185" selection-end-column="1" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/ui/AlarmInitReceiver.java">
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/data/NotesDatabaseHelper.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="405">
<caret line="50" column="34" selection-start-line="50" selection-start-column="34" selection-end-line="50" selection-end-column="34" />
<state relative-caret-position="210">
<caret line="36" column="28" selection-start-line="36" selection-start-column="28" selection-end-line="36" selection-end-column="28" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/ui/NoteEditActivity.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="195">
<caret line="80" selection-start-line="80" selection-end-line="80" />
</state>
</provider>
</entry>
@ -135,6 +122,7 @@
<find>JSONObject</find>
<find>exportToText</find>
<find>equal</find>
<find>notesCursor.moveToFirst()</find>
</findStrings>
</component>
<component name="Git.Settings">
@ -155,15 +143,16 @@
<option value="$PROJECT_DIR$/app/src/main/java/net/micode/notes/data/NotesProvider.java" />
<option value="$PROJECT_DIR$/app/src/main/java/net/micode/notes/gtask/exception/ActionFailureException.java" />
<option value="$PROJECT_DIR$/app/src/main/java/net/micode/notes/gtask/exception/NetworkFailureException.java" />
<option value="$PROJECT_DIR$/app/src/main/java/net/micode/notes/gtask/remote/GTaskSyncService.java" />
<option value="$PROJECT_DIR$/app/src/main/java/net/micode/notes/tool/DataUtils.java" />
<option value="$PROJECT_DIR$/app/src/main/java/net/micode/notes/gtask/remote/GTaskASyncTask.java" />
<option value="$PROJECT_DIR$/app/src/main/java/net/micode/notes/gtask/remote/GTaskClient.java" />
<option value="$PROJECT_DIR$/app/src/main/java/net/micode/notes/gtask/remote/GTaskManager.java" />
<option value="$PROJECT_DIR$/app/src/main/java/net/micode/notes/gtask/remote/GTaskSyncService.java" />
<option value="$PROJECT_DIR$/app/src/main/java/net/micode/notes/tool/BackupUtils.java" />
<option value="$PROJECT_DIR$/app/src/main/java/net/micode/notes/tool/DataUtils.java" />
</list>
</option>
</component>
<component name="ProjectFrameBounds" extendedState="6">
<component name="ProjectFrameBounds">
<option name="x" value="-10" />
<option name="y" value="-10" />
<option name="width" value="1940" />
@ -195,7 +184,6 @@
<select />
</subPane>
</pane>
<pane id="Scope" />
<pane id="AndroidView">
<subPane>
<expand>
@ -226,44 +214,6 @@
<item name="notes" type="cbb59c9e:AndroidPsiDirectoryNode" />
<item name="data" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="Notes-master" type="1abcf292:AndroidViewProjectNode" />
<item name="app" type="feadf853:AndroidModuleNode" />
<item name="java" type="edd41e36:AndroidSourceTypeNode" />
<item name="notes" type="cbb59c9e:AndroidPsiDirectoryNode" />
<item name="gtask" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="Notes-master" type="1abcf292:AndroidViewProjectNode" />
<item name="app" type="feadf853:AndroidModuleNode" />
<item name="java" type="edd41e36:AndroidSourceTypeNode" />
<item name="notes" type="cbb59c9e:AndroidPsiDirectoryNode" />
<item name="gtask" type="462c0819:PsiDirectoryNode" />
<item name="data" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="Notes-master" type="1abcf292:AndroidViewProjectNode" />
<item name="app" type="feadf853:AndroidModuleNode" />
<item name="java" type="edd41e36:AndroidSourceTypeNode" />
<item name="notes" type="cbb59c9e:AndroidPsiDirectoryNode" />
<item name="gtask" type="462c0819:PsiDirectoryNode" />
<item name="exception" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="Notes-master" type="1abcf292:AndroidViewProjectNode" />
<item name="app" type="feadf853:AndroidModuleNode" />
<item name="java" type="edd41e36:AndroidSourceTypeNode" />
<item name="notes" type="cbb59c9e:AndroidPsiDirectoryNode" />
<item name="gtask" type="462c0819:PsiDirectoryNode" />
<item name="remote" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="Notes-master" type="1abcf292:AndroidViewProjectNode" />
<item name="app" type="feadf853:AndroidModuleNode" />
<item name="java" type="edd41e36:AndroidSourceTypeNode" />
<item name="notes" type="cbb59c9e:AndroidPsiDirectoryNode" />
<item name="model" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="Notes-master" type="1abcf292:AndroidViewProjectNode" />
<item name="app" type="feadf853:AndroidModuleNode" />
@ -318,6 +268,7 @@
<select />
</subPane>
</pane>
<pane id="Scope" />
</panes>
</component>
<component name="PropertiesComponent">
@ -423,15 +374,22 @@
<option name="project" value="LOCAL" />
<updated>1569866572075</updated>
</task>
<option name="localTasksCounter" value="2" />
<task id="LOCAL-00002" summary="1">
<created>1570536169255</created>
<option name="number" value="00002" />
<option name="presentableId" value="LOCAL-00002" />
<option name="project" value="LOCAL" />
<updated>1570536169255</updated>
</task>
<option name="localTasksCounter" value="3" />
<servers />
</component>
<component name="ToolWindowManager">
<frame x="-7" y="-7" width="1550" height="838" extended-state="6" />
<frame x="-8" y="-8" width="1552" height="840" extended-state="0" />
<editor active="true" />
<layout>
<window_info id="Captures" order="0" side_tool="true" weight="0.25" />
<window_info active="true" content_ui="combo" id="Project" order="1" visible="true" weight="0.2533512" />
<window_info active="true" content_ui="combo" id="Project" order="1" visible="true" weight="0.25301206" />
<window_info id="Structure" order="2" side_tool="true" />
<window_info id="Build Variants" order="3" side_tool="true" />
<window_info id="Image Layers" order="4" />
@ -442,8 +400,8 @@
<window_info anchor="bottom" id="Version Control" order="0" />
<window_info anchor="bottom" id="TODO" order="1" />
<window_info anchor="bottom" id="Terminal" order="2" sideWeight="0.49932975" weight="0.3286119" />
<window_info anchor="bottom" id="Event Log" order="3" sideWeight="0.5087131" side_tool="true" visible="true" weight="0.29036826" />
<window_info anchor="bottom" id="Build" order="4" sideWeight="0.49128687" visible="true" weight="0.29036826" />
<window_info anchor="bottom" id="Event Log" order="3" sideWeight="0.5107095" side_tool="true" visible="true" weight="0.289548" />
<window_info anchor="bottom" id="Build" order="4" sideWeight="0.4892905" visible="true" weight="0.289548" />
<window_info anchor="bottom" id="Logcat" order="5" sideWeight="0.49932975" weight="0.3286119" />
<window_info anchor="bottom" id="Android Profiler" order="6" show_stripe_button="false" sideWeight="0.49932975" weight="0.3286119" />
<window_info anchor="bottom" id="Run" order="7" sideWeight="0.49798927" weight="0.3286119" />
@ -459,6 +417,28 @@
<MESSAGE value="1" />
<option name="LAST_COMMIT_MESSAGE" value="1" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
<breakpoints>
<line-breakpoint enabled="true" type="java-method">
<url>jar://G:/Android/Sdk/platforms/android-28/android.jar!/android/database/AbstractCursor.class</url>
<line>39</line>
<properties class="android.database.AbstractCursor" method="getFloat">
<option name="EMULATED" value="true" />
</properties>
<option name="timeStamp" value="2" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-method">
<url>jar://G:/Android/Sdk/platforms/android-28/android.jar!/android/database/AbstractCursor.class</url>
<line>41</line>
<properties class="android.database.AbstractCursor" method="getDouble">
<option name="EMULATED" value="true" />
</properties>
<option name="timeStamp" value="3" />
</line-breakpoint>
</breakpoints>
</breakpoint-manager>
</component>
<component name="editorHistoryManager">
<entry file="jar://$APPLICATION_HOME_DIR$/jre/jre/lib/rt.jar!/java/lang/Thread.class">
<provider selected="true" editor-type-id="text-editor">
@ -520,13 +500,6 @@
</state>
</provider>
</entry>
<entry file="jar://G:/Android/Sdk/platforms/android-28/android.jar!/android/database/Cursor.class">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="855">
<caret line="63" column="13" selection-start-line="63" selection-start-column="13" selection-end-line="63" selection-end-column="13" />
</state>
</provider>
</entry>
<entry file="jar://G:/Android/Sdk/platforms/android-28/android.jar!/org/json/JSONObject.class">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="90">
@ -534,13 +507,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/gtask/remote/GTaskSyncService.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="90">
<caret line="25" column="9" selection-start-line="25" selection-start-column="9" selection-end-line="25" selection-end-column="9" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/ui/DateTimePicker.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="90">
@ -555,31 +521,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/tool/BackupUtils.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="735">
<caret line="84" column="5" selection-start-line="84" selection-start-column="5" selection-end-line="84" selection-end-column="5" />
<folding>
<element signature="e#2776#2777#0" expanded="true" />
<element signature="e#2825#2826#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/tool/GTaskStringUtils.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="90">
<caret line="20" column="13" selection-start-line="20" selection-start-column="13" selection-end-line="20" selection-end-column="13" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/tool/DataUtils.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="3375">
<caret line="255" column="97" selection-start-line="255" selection-start-column="92" selection-end-line="255" selection-end-column="97" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/model/WorkingNote.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1965">
@ -598,13 +539,6 @@
<provider editor-type-id="text-editor" />
<provider selected="true" editor-type-id="android-designer2" />
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/ui/NoteEditActivity.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="105">
<caret line="74" column="13" selection-start-line="74" selection-start-column="13" selection-end-line="74" selection-end-column="13" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/ui/NotesPreferenceActivity.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="105">
@ -633,13 +567,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/data/NotesDatabaseHelper.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="105">
<caret line="29" selection-start-line="29" selection-end-line="30" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/data/NotesProvider.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="120">
@ -647,61 +574,13 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/gtask/data/Task.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="445">
<caret line="259" selection-start-line="259" selection-end-line="259" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/gtask/data/TaskList.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="345">
<caret line="37" column="38" lean-forward="true" selection-start-line="37" selection-start-column="38" selection-end-line="37" selection-end-column="38" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/AndroidManifest.xml">
<provider editor-type-id="android-manifest" />
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1920">
<caret line="128" column="76" selection-start-line="128" selection-start-column="76" selection-end-line="128" selection-end-column="76" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/gtask/data/Node.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="120">
<caret line="24" column="32" selection-start-line="24" selection-start-column="28" selection-end-line="24" selection-end-column="32" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/model/Note.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="270">
<caret line="48" column="59" selection-start-line="48" selection-start-column="59" selection-end-line="48" selection-end-column="59" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/gtask/data/SqlData.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="105">
<caret line="37" column="8" selection-start-line="37" selection-start-column="8" selection-end-line="37" selection-end-column="8" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/gtask/data/SqlNote.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="4770">
<caret line="496" column="11" selection-start-line="496" selection-start-column="11" selection-end-line="496" selection-end-column="11" />
<folding>
<element signature="e#7068#13313#0" />
</folding>
</state>
</provider>
<provider editor-type-id="android-manifest" />
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/ui/AlarmAlertActivity.java">
<provider selected="true" editor-type-id="text-editor">
@ -717,45 +596,100 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/tool/ResourceParser.java">
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/gtask/exception/NetworkFailureException.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="120">
<caret line="26" column="13" selection-start-line="26" selection-start-column="13" selection-end-line="26" selection-end-column="13" />
<state relative-caret-position="90">
<caret line="20" column="36" lean-forward="true" selection-start-line="20" selection-start-column="13" selection-end-line="20" selection-end-column="36" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/gtask/data/MetaData.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-509">
<caret line="27" column="5" selection-start-line="27" selection-start-column="5" selection-end-line="27" selection-end-column="5" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/gtask/data/Node.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="15">
<caret line="25" selection-start-line="25" selection-end-line="26" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/gtask/data/SqlData.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-1769">
<caret line="48" column="10" lean-forward="true" selection-start-line="48" selection-start-column="10" selection-end-line="48" selection-end-column="10" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/data/Notes.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-3584">
<caret line="19" selection-start-line="19" selection-end-line="21" selection-end-column="3" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/gtask/data/Task.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-779">
<caret line="259" selection-start-line="259" selection-end-line="260" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/gtask/data/SqlNote.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="300">
<caret line="53" selection-start-line="53" selection-end-line="54" />
<folding>
<element signature="e#7068#13313#0" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/gtask/data/TaskList.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-3989">
<caret line="43" selection-start-line="43" selection-end-line="44" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/gtask/exception/ActionFailureException.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="75">
<caret line="19" column="3" selection-start-line="19" selection-start-column="3" selection-end-line="19" selection-end-column="3" />
<state relative-caret-position="90">
<caret line="20" column="35" selection-start-line="20" selection-start-column="13" selection-end-line="20" selection-end-column="35" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/gtask/exception/NetworkFailureException.java">
<entry file="jar://G:/Android/Sdk/platforms/android-28/android.jar!/android/app/NotificationManager.class">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="45">
<caret line="17" selection-start-line="17" selection-end-line="18" />
<state relative-caret-position="-315">
<caret line="18" column="13" selection-start-line="18" selection-start-column="13" selection-end-line="18" selection-end-column="13" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/gtask/remote/GTaskASyncTask.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-495">
<caret line="61" column="48" lean-forward="true" selection-start-line="61" selection-start-column="48" selection-end-line="61" selection-end-column="48" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/gtask/remote/GTaskClient.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-1049">
<caret line="490" column="10" selection-start-line="490" selection-start-column="10" selection-end-line="490" selection-end-column="10" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/gtask/remote/GTaskManager.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="195">
<caret line="110" lean-forward="true" selection-start-line="110" selection-end-line="110" />
<caret line="36" lean-forward="true" selection-start-line="36" selection-end-line="36" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/model/Note.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="270">
<caret line="48" column="59" selection-start-line="48" selection-start-column="59" selection-end-line="48" selection-end-column="59" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/tool/GTaskStringUtils.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="240">
<caret line="30" selection-start-line="30" selection-end-line="31" />
</state>
</provider>
</entry>
@ -769,17 +703,109 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/data/Notes.java">
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/gtask/remote/GTaskClient.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="75">
<caret line="19" selection-start-line="19" selection-end-line="21" selection-end-column="3" />
<state relative-caret-position="855">
<caret line="113" column="11" selection-start-line="113" selection-start-column="11" selection-end-line="113" selection-end-column="11" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/gtask/data/MetaData.java">
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/gtask/remote/GTaskManager.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="135">
<caret line="29" column="36" lean-forward="true" selection-start-line="29" selection-start-column="36" selection-end-line="29" selection-end-column="36" />
<state relative-caret-position="375">
<caret line="68" column="21" selection-start-line="68" selection-start-column="21" selection-end-line="68" selection-end-column="21" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/gtask/remote/GTaskSyncService.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="120">
<caret line="27" column="29" selection-start-line="27" selection-start-column="13" selection-end-line="27" selection-end-column="29" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/tool/ResourceParser.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2205">
<caret line="185" column="1" selection-start-line="185" selection-start-column="1" selection-end-line="185" selection-end-column="1" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/data/NotesDatabaseHelper.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="210">
<caret line="36" column="28" selection-start-line="36" selection-start-column="28" selection-end-line="36" selection-end-column="28" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/ui/NoteEditActivity.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="195">
<caret line="80" selection-start-line="80" selection-end-line="80" />
</state>
</provider>
</entry>
<entry file="jar://G:/Android/Sdk/platforms/android-28/android.jar!/android/database/AbstractWindowedCursor.class">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="159">
<caret line="34" selection-start-line="34" selection-end-line="34" />
<folding>
<element signature="e#887#888#0" expanded="true" />
<element signature="e#938#939#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="jar://G:/Android/Sdk/platforms/android-28/android.jar!/android/database/AbstractCursor.class">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="132">
<caret line="39" column="26" selection-start-line="39" selection-start-column="26" selection-end-line="39" selection-end-column="26" />
</state>
</provider>
</entry>
<entry file="jar://G:/Android/Sdk/platforms/android-28/android.jar!/android/database/MatrixCursor.class">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="159">
<caret line="52" column="17" selection-start-line="52" selection-start-column="17" selection-end-line="52" selection-end-column="17" />
<folding>
<element signature="e#1279#1280#0" expanded="true" />
<element signature="e#1330#1331#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="jar://G:/Android/Sdk/platforms/android-28/android.jar!/android/database/Cursor.class">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="159">
<caret line="63" column="27" lean-forward="true" selection-start-line="63" selection-start-column="27" selection-end-line="63" selection-end-column="27" />
</state>
</provider>
</entry>
<entry file="jar://G:/Android/Sdk/platforms/android-28/android.jar!/android/content/ContentProviderOperation.class">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="90">
<caret line="12" column="13" selection-start-line="12" selection-start-column="13" selection-end-line="12" selection-end-column="13" />
</state>
</provider>
</entry>
<entry file="jar://G:/Android/Sdk/platforms/android-28/android.jar!/android/content/ContentResolver.class">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="159">
<caret line="82" column="24" selection-start-line="82" selection-start-column="24" selection-end-line="82" selection-end-column="24" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/tool/BackupUtils.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="390">
<caret line="292" column="57" selection-start-line="292" selection-start-column="27" selection-end-line="292" selection-end-column="57" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/src/main/java/net/micode/notes/tool/DataUtils.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2524">
<caret line="285" column="35" lean-forward="true" selection-start-line="285" selection-start-column="24" selection-end-line="285" selection-end-column="38" />
</state>
</provider>
</entry>

View File

@ -42,7 +42,7 @@ public class BackupUtils {
private static final String TAG = "BackupUtils";
// Singleton stuff
private static BackupUtils sInstance;
//获得实例
public static synchronized BackupUtils getInstance(Context context) {
if (sInstance == null) {
sInstance = new BackupUtils(context);
@ -79,7 +79,7 @@ public class BackupUtils {
其中.equals表示的是二者的内容是否相等*/
return Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState());
}
//导出文本
public int exportToText() {
return mTextExport.exportToText();
}
@ -99,13 +99,13 @@ public class BackupUtils {
NoteColumns.SNIPPET,
NoteColumns.TYPE
};
//便签列id
private static final int NOTE_COLUMN_ID = 0;
//便签修改的日期
private static final int NOTE_COLUMN_MODIFIED_DATE = 1;
//便签列片段
private static final int NOTE_COLUMN_SNIPPET = 2;
//数据项
private static final String[] DATA_PROJECTION = {
DataColumns.CONTENT,
DataColumns.MIME_TYPE,
@ -114,15 +114,15 @@ public class BackupUtils {
DataColumns.DATA3,
DataColumns.DATA4,
};
//数据列中内容
private static final int DATA_COLUMN_CONTENT = 0;
//数据列中mime类型
private static final int DATA_COLUMN_MIME_TYPE = 1;
//数据中拨打日期
private static final int DATA_COLUMN_CALL_DATE = 2;
//数据列中的电话号码
private static final int DATA_COLUMN_PHONE_NUMBER = 4;
//文本格式
private final String [] TEXT_FORMAT;
private static final int FORMAT_FOLDER_NAME = 0;
private static final int FORMAT_NOTE_DATE = 1;
@ -154,6 +154,11 @@ public class BackupUtils {
}, null);
//下面有很多地方调用了android.database.Cursor类有一些固定用法
if (notesCursor != null) {
/*
查询出来的cursor的初始位置是指向第一条记录的前一个位置的
cursor.moveToFirst()指向查询结果的第一个位置
一般通过判断cursor.moveToFirst()的值为true或false来确定查询结果是否为空
*/
if (notesCursor.moveToFirst()) {
do {
// Print note's last modified date
@ -181,6 +186,7 @@ public class BackupUtils {
if (dataCursor != null) {
if (dataCursor.moveToFirst()) {
do {
//获取mimeType
String mimeType = dataCursor.getString(DATA_COLUMN_MIME_TYPE);
if (DataConstants.CALL_NOTE.equals(mimeType)) {
// Print phone number
@ -210,6 +216,7 @@ public class BackupUtils {
}
} while (dataCursor.moveToNext());
}
//及时关闭cursor
dataCursor.close();
}
// print a line separator between note
@ -233,6 +240,7 @@ public class BackupUtils {
}
//定义输出流ps
PrintStream ps = getExportToTextPrintStream();
//检查null
if (ps == null) {
Log.e(TAG, "get print stream error");
return STATE_SYSTEM_ERROR;
@ -250,18 +258,22 @@ public class BackupUtils {
do {
// Print folder's name
String folderName = "";
//若id为最近记录里调用的文件中
if(folderCursor.getLong(NOTE_COLUMN_ID) == Notes.ID_CALL_RECORD_FOLDER) {
folderName = mContext.getString(R.string.call_record_folder_name);
} else {
folderName = folderCursor.getString(NOTE_COLUMN_SNIPPET);
}
//若文本工具为空
if (!TextUtils.isEmpty(folderName)) {
ps.println(String.format(getFormat(FORMAT_FOLDER_NAME), folderName));
}
//获得文件id
String folderId = folderCursor.getString(NOTE_COLUMN_ID);
exportFolderToText(folderId, ps);
} while (folderCursor.moveToNext());
}
//及时关闭folderCursor
folderCursor.close();
}

View File

@ -41,10 +41,12 @@ public class DataUtils {
public static final String TAG = "DataUtils";
//批处理删除便签
public static boolean batchDeleteNotes(ContentResolver resolver, HashSet<Long> ids) {
//id不存在
if (ids == null) {
Log.d(TAG, "the ids is null");
return true;
}
//id在哈希表里
if (ids.size() == 0) {
Log.d(TAG, "no id is in the hashset");
return true;
@ -70,6 +72,7 @@ public class DataUtils {
return false;
}
return true;
//捕捉远程异常
} catch (RemoteException e) {
Log.e(TAG, String.format("%s: %s", e.toString(), e.getMessage()));
} catch (OperationApplicationException e) {
@ -121,6 +124,12 @@ public class DataUtils {
* Get the all folder count except system folders {@link Notes#TYPE_SYSTEM}}
*/
public static int getUserFolderCount(ContentResolver resolver) {
/*
ContentResolver直译为内容解析器
Android中程序间数据的共享是通过Provider/Resolver进行的
提供数据内容的就叫ProviderResovler提供接口对这个内容进行解读
在这里系统提供了联系人的Provider那么我们就需要构建一个Resolver来读取联系人的内容
*/
Cursor cursor =resolver.query(Notes.CONTENT_NOTE_URI,
new String[] { "COUNT(*)" },
NoteColumns.TYPE + "=? AND " + NoteColumns.PARENT_ID + "<>?",
@ -239,6 +248,7 @@ public class DataUtils {
null);
if (cursor != null && cursor.moveToFirst()) {
//获得第一行数据
try {
return cursor.getString(0);
} catch (IndexOutOfBoundsException e) {
@ -249,7 +259,7 @@ public class DataUtils {
}
return "";
}
//通过电话号码和日期获得便签ID
//通过电话号码和拨打日期获得便签ID
public static long getNoteIdByPhoneNumberAndCallDate(ContentResolver resolver, String phoneNumber, long callDate) {
Cursor cursor = resolver.query(Notes.CONTENT_DATA_URI,
new String [] { CallNote.NOTE_ID },
@ -262,6 +272,7 @@ public class DataUtils {
if (cursor.moveToFirst()) {
try {
return cursor.getLong(0);
//记录获取失败
} catch (IndexOutOfBoundsException e) {
Log.e(TAG, "Get call note id fails " + e.toString());
}