前四个文件的注释

wangzhe
rio 2 years ago
parent 22756553b5
commit dd4426d11f

Binary file not shown.

@ -1,4 +1,4 @@
#Sun Nov 19 21:06:32 CST 2023 #Sat Dec 02 21:25:35 CST 2023
base.0=F\:\\work\\Notes-master\\app\\build\\intermediates\\dex\\debug\\mergeDexDebug\\classes.dex base.0=F\:\\work\\Notes-master\\app\\build\\intermediates\\dex\\debug\\mergeDexDebug\\classes.dex
path.0=classes.dex path.0=classes.dex
renamed.0=classes.dex renamed.0=classes.dex

@ -14,260 +14,269 @@
14 See the License for the specific language governing permissions and 14 See the License for the specific language governing permissions and
15 limitations under the License. 15 limitations under the License.
16--> 16-->
17<manifest xmlns:android="http://schemas.android.com/apk/res/android" 17<!-- 定义应用程序的基本属性,如包名、版本号 -->
18 package="net.micode.notes" 18<manifest xmlns:android="http://schemas.android.com/apk/res/android"
19 android:versionCode="1" 19 package="net.micode.notes"
20 android:versionName="0.1" > 20 android:versionCode="1"
21 21 android:versionName="0.1" > <!-- 声明应用程序所需的最低 SDK 版本 -->
22 <uses-sdk 22 <uses-sdk
22-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:23:5-44 22-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:25:5-44
23 android:minSdkVersion="14" 23 android:minSdkVersion="14"
23-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:23:15-41 23-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:25:15-41
24 android:targetSdkVersion="14" /> 24 android:targetSdkVersion="14" />
25 25
26 <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> 26 <!-- 申请应用程序需要的权限 -->
26-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:25:5-81 27 <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
26-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:25:22-78 27-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:28:5-81
27 <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" /> 27-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:28:22-78
27-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:26:5-88 28 <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
27-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:26:22-85 28-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:29:5-88
28 <uses-permission android:name="android.permission.INTERNET" /> 28-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:29:22-85
28-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:27:5-67 29 <uses-permission android:name="android.permission.INTERNET" />
28-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:27:22-64 29-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:30:5-67
29 <uses-permission android:name="android.permission.READ_CONTACTS" /> 29-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:30:22-64
29-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:28:5-72 30 <uses-permission android:name="android.permission.READ_CONTACTS" />
29-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:28:22-69 30-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:31:5-72
30 <uses-permission android:name="android.permission.MANAGE_ACCOUNTS" /> 30-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:31:22-69
30-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:29:5-74 31 <uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
30-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:29:22-71 31-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:32:5-74
31 <uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" /> 31-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:32:22-71
31-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:30:5-80 32 <uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
31-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:30:22-77 32-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:33:5-80
32 <uses-permission android:name="android.permission.GET_ACCOUNTS" /> 32-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:33:22-77
32-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:31:5-71 33 <uses-permission android:name="android.permission.GET_ACCOUNTS" />
32-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:31:22-68 33-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:34:5-71
33 <uses-permission android:name="android.permission.USE_CREDENTIALS" /> 33-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:34:22-68
33-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:32:5-74 34 <uses-permission android:name="android.permission.USE_CREDENTIALS" />
33-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:32:22-71 34-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:35:5-74
34 <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> 34-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:35:22-71
34-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:33:5-81 35 <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
34-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:33:22-78 35-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:36:5-81
35 35-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:36:22-78
36 <application 36 <!-- 定义应用程序的主要组件 -->
36-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:35:5-149:19 37 <application
37 android:debuggable="true" 37-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:39:5-155:19
38 android:extractNativeLibs="true" 38 android:debuggable="true"
39 android:icon="@drawable/icon_app" 39 android:extractNativeLibs="true"
39-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:36:9-42 40 android:icon="@drawable/icon_app"
40 android:label="@string/app_name" 40-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:40:9-42
40-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:37:9-41 41 android:label="@string/app_name"
41 android:testOnly="true" > 41-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:41:9-41
42 <activity 42 android:testOnly="true" >
42-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:38:9-51:20 43
43 android:name="net.micode.notes.ui.NotesListActivity" 44 <!-- 定义主 activity -->
43-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:39:13-49 45 <activity
44 android:configChanges="keyboardHidden|orientation|screenSize" 45-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:43:9-56:20
44-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:40:13-74 46 android:name="net.micode.notes.ui.NotesListActivity"
45 android:label="@string/app_name" 46-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:44:13-49
45-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:41:13-45 47 android:configChanges="keyboardHidden|orientation|screenSize"
46 android:launchMode="singleTop" 47-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:45:13-74
46-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:42:13-43 48 android:label="@string/app_name"
47 android:theme="@style/NoteTheme" 48-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:46:13-45
47-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:43:13-45 49 android:launchMode="singleTop"
48 android:uiOptions="splitActionBarWhenNarrow" 49-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:47:13-43
48-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:44:13-57 50 android:theme="@style/NoteTheme"
49 android:windowSoftInputMode="adjustPan" > 50-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:48:13-45
49-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:45:13-52 51 android:uiOptions="splitActionBarWhenNarrow"
50 <intent-filter> 51-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:49:13-57
50-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:47:13-50:29 52 android:windowSoftInputMode="adjustPan" >
51 <action android:name="android.intent.action.MAIN" /> 52-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:50:13-52
51-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:48:17-69 53
51-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:48:25-66 54 <!-- 定义主 activity 的 intent-filter -->
52 55 <intent-filter>
53 <category android:name="android.intent.category.LAUNCHER" /> 55-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:52:13-55:29
53-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:49:17-77 56 <action android:name="android.intent.action.MAIN" />
53-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:49:27-74 56-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:53:17-69
54 </intent-filter> 56-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:53:25-66
55 </activity> 57
56 <activity 58 <category android:name="android.intent.category.LAUNCHER" />
56-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:53:9-81:20 58-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:54:17-77
57 android:name="net.micode.notes.ui.NoteEditActivity" 58-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:54:27-74
57-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:54:13-48 59 </intent-filter>
58 android:configChanges="keyboardHidden|orientation|screenSize" 60 </activity>
58-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:55:13-74 61
59 android:launchMode="singleTop" 62 <!-- 定义笔记编辑 activity -->
59-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:56:13-43 63 <activity
60 android:theme="@style/NoteTheme" > 63-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:59:9-87:20
60-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:57:13-45 64 android:name="net.micode.notes.ui.NoteEditActivity"
61 <intent-filter> 64-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:60:13-48
61-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:59:13-64:29 65 android:configChanges="keyboardHidden|orientation|screenSize"
62 <action android:name="android.intent.action.VIEW" /> 65-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:61:13-74
62-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:60:17-69 66 android:launchMode="singleTop"
62-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:60:25-66 66-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:62:13-43
63 67 android:theme="@style/NoteTheme" >
64 <category android:name="android.intent.category.DEFAULT" /> 67-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:63:13-45
64-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:61:17-76 68
64-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:61:27-73 69 <!-- 定义笔记编辑 activity 的 intent-filter -->
65 70 <intent-filter>
66 <data android:mimeType="vnd.android.cursor.item/text_note" /> 70-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:65:13-70:29
66-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:62:17-78 71 <action android:name="android.intent.action.VIEW" />
66-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:62:23-75 71-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:66:17-69
67 <data android:mimeType="vnd.android.cursor.item/call_note" /> 71-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:66:25-66
67-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:62:17-78 72
67-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:62:23-75 73 <category android:name="android.intent.category.DEFAULT" />
68 </intent-filter> 73-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:67:17-76
69 <intent-filter> 73-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:67:27-73
69-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:66:13-71:29 74
70 <action android:name="android.intent.action.INSERT_OR_EDIT" /> 75 <data android:mimeType="vnd.android.cursor.item/text_note" />
70-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:67:17-79 75-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:68:17-78
70-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:67:25-76 75-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:68:23-75
71 76 <data android:mimeType="vnd.android.cursor.item/call_note" />
72 <category android:name="android.intent.category.DEFAULT" /> 76-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:68:17-78
72-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:61:17-76 76-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:68:23-75
72-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:61:27-73 77 </intent-filter>
73 78 <intent-filter>
74 <data android:mimeType="vnd.android.cursor.item/text_note" /> 78-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:71:13-76:29
74-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:62:17-78 79 <action android:name="android.intent.action.INSERT_OR_EDIT" />
74-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:62:23-75 79-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:72:17-79
75 <data android:mimeType="vnd.android.cursor.item/call_note" /> 79-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:72:25-76
75-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:62:17-78 80
75-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:62:23-75 81 <category android:name="android.intent.category.DEFAULT" />
76 </intent-filter> 81-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:67:17-76
77 <intent-filter> 81-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:67:27-73
77-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:73:13-76:29
78 <action android:name="android.intent.action.SEARCH" />
78-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:74:17-71
78-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:74:25-68
79
80 <category android:name="android.intent.category.DEFAULT" />
80-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:61:17-76
80-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:61:27-73
81 </intent-filter>
82 82
83 <meta-data 83 <data android:mimeType="vnd.android.cursor.item/text_note" />
83-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:78:13-80:54 83-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:68:17-78
84 android:name="android.app.searchable" 83-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:68:23-75
84-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:79:17-54 84 <data android:mimeType="vnd.android.cursor.item/call_note" />
85 android:resource="@xml/searchable" /> 84-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:68:17-78
85-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:80:17-51 84-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:68:23-75
86 </activity> 85 </intent-filter>
87 86 <intent-filter>
88 <provider 86-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:79:13-82:29
88-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:83:9-86:43 87 <action android:name="android.intent.action.SEARCH" />
89 android:name="net.micode.notes.data.NotesProvider" 87-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:80:17-71
89-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:84:13-63 87-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:80:25-68
90 android:authorities="micode_notes" 88
90-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:85:13-47 89 <category android:name="android.intent.category.DEFAULT" />
91 android:multiprocess="true" /> 89-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:67:17-76
91-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:86:13-40 89-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:67:27-73
92 90 </intent-filter>
93 <receiver 91
93-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:88:9-100:20 92 <meta-data
94 android:name="net.micode.notes.widget.NoteWidgetProvider_2x" 92-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:84:13-86:54
94-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:89:13-57 93 android:name="android.app.searchable"
95 android:label="@string/app_widget2x2" > 93-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:85:17-54
95-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:90:13-50 94 android:resource="@xml/searchable" />
96 <intent-filter> 94-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:86:17-51
96-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:91:13-95:29 95 </activity>
97 <action android:name="android.appwidget.action.APPWIDGET_UPDATE" /> 96
97-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:92:17-84 97 <provider
97-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:92:25-81 97-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:89:9-92:43
98 <action android:name="android.appwidget.action.APPWIDGET_DELETED" /> 98 android:name="net.micode.notes.data.NotesProvider"
98-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:93:17-85 98-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:90:13-63
98-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:93:25-82 99 android:authorities="micode_notes"
99 <action android:name="android.intent.action.PRIVACY_MODE_CHANGED" /> 99-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:91:13-47
99-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:94:17-85 100 android:multiprocess="true" />
99-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:94:25-82 100-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:92:13-40
100 </intent-filter>
101 101
102 <meta-data 102 <receiver
102-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:97:13-99:58 102-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:94:9-106:20
103 android:name="android.appwidget.provider" 103 android:name="net.micode.notes.widget.NoteWidgetProvider_2x"
103-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:98:17-58 103-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:95:13-57
104 android:resource="@xml/widget_2x_info" /> 104 android:label="@string/app_widget2x2" >
104-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:99:17-55 104-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:96:13-50
105 </receiver> 105 <intent-filter>
106 <receiver 105-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:97:13-101:29
106-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:101:9-114:20 106 <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
107 android:name="net.micode.notes.widget.NoteWidgetProvider_4x" 106-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:98:17-84
107-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:102:13-57 106-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:98:25-81
108 android:label="@string/app_widget4x4" > 107 <action android:name="android.appwidget.action.APPWIDGET_DELETED" />
108-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:103:13-50 107-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:99:17-85
109 <intent-filter> 107-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:99:25-82
109-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:91:13-95:29 108 <action android:name="android.intent.action.PRIVACY_MODE_CHANGED" />
110 <action android:name="android.appwidget.action.APPWIDGET_UPDATE" /> 108-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:100:17-85
110-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:92:17-84 108-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:100:25-82
110-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:92:25-81 109 </intent-filter>
111 <action android:name="android.appwidget.action.APPWIDGET_DELETED" /> 110
111-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:93:17-85 111 <meta-data
111-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:93:25-82 111-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:103:13-105:58
112 <action android:name="android.intent.action.PRIVACY_MODE_CHANGED" /> 112 android:name="android.appwidget.provider"
112-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:94:17-85 112-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:104:17-58
112-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:94:25-82 113 android:resource="@xml/widget_2x_info" />
113 </intent-filter> 113-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:105:17-55
114 114 </receiver>
115 <meta-data 115 <receiver
115-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:97:13-99:58 115-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:107:9-120:20
116 android:name="android.appwidget.provider" 116 android:name="net.micode.notes.widget.NoteWidgetProvider_4x"
116-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:98:17-58 116-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:108:13-57
117 android:resource="@xml/widget_4x_info" /> 117 android:label="@string/app_widget4x4" >
117-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:99:17-55 117-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:109:13-50
118 </receiver> 118 <intent-filter>
119 <receiver android:name="net.micode.notes.ui.AlarmInitReceiver" > 118-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:97:13-101:29
119-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:116:9-120:20 119 <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
119-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:116:19-55 119-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:98:17-84
120 <intent-filter> 119-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:98:25-81
120-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:117:13-119:29 120 <action android:name="android.appwidget.action.APPWIDGET_DELETED" />
121 <action android:name="android.intent.action.BOOT_COMPLETED" /> 120-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:99:17-85
121-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:118:17-79 120-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:99:25-82
121-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:118:25-76 121 <action android:name="android.intent.action.PRIVACY_MODE_CHANGED" />
121-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:100:17-85
121-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:100:25-82
122 </intent-filter> 122 </intent-filter>
123 </receiver> 123
124 <receiver 124 <meta-data
124-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:122:9-125:20 124-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:103:13-105:58
125 android:name="net.micode.notes.ui.AlarmReceiver" 125 android:name="android.appwidget.provider"
125-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:123:13-61 125-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:104:17-58
126 android:process=":remote" > 126 android:resource="@xml/widget_4x_info" />
126-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:124:13-38 126-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:105:17-55
127 </receiver> 127 </receiver>
128 128 <receiver android:name="net.micode.notes.ui.AlarmInitReceiver" >
129 <activity 128-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:122:9-126:20
129-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:127:9-132:20 128-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:122:19-55
130 android:name="net.micode.notes.ui.AlarmAlertActivity" 129 <intent-filter>
130-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:128:13-50 129-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:123:13-125:29
131 android:label="@string/app_name" 130 <action android:name="android.intent.action.BOOT_COMPLETED" />
131-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:129:13-45 130-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:124:17-79
132 android:launchMode="singleInstance" 130-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:124:25-76
132-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:130:13-48 131 </intent-filter>
133 android:theme="@android:style/Theme.Holo.Wallpaper.NoTitleBar" > 132 </receiver>
133-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:131:13-75 133 <receiver
134 </activity> 133-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:128:9-131:20
135 <activity 134 android:name="net.micode.notes.ui.AlarmReceiver"
135-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:134:9-139:20 134-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:129:13-61
136 android:name="net.micode.notes.ui.NotesPreferenceActivity" 135 android:process=":remote" >
136-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:135:13-71 135-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:130:13-38
137 android:label="@string/preferences_title" 136 </receiver>
137-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:136:13-54 137
138 android:launchMode="singleTop" 138 <activity
138-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:137:13-43 138-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:133:9-138:20
139 android:theme="@android:style/Theme.Holo.Light" > 139 android:name="net.micode.notes.ui.AlarmAlertActivity"
139-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:138:13-60 139-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:134:13-50
140 </activity> 140 android:label="@string/app_name"
141 140-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:135:13-45
142 <service 141 android:launchMode="singleInstance"
142-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:141:9-144:19 141-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:136:13-48
143 android:name="net.micode.notes.gtask.remote.GTaskSyncService" 142 android:theme="@android:style/Theme.Holo.Wallpaper.NoTitleBar" >
143-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:142:13-74 142-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:137:13-75
144 android:exported="false" > 143 </activity>
144-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:143:13-37 144 <activity
145 </service> 144-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:140:9-145:20
146 145 android:name="net.micode.notes.ui.NotesPreferenceActivity"
147 <meta-data 145-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:141:13-71
147-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:146:9-148:52 146 android:label="@string/preferences_title"
148 android:name="android.app.default_searchable" 146-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:142:13-54
148-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:147:13-58 147 android:launchMode="singleTop"
149 android:value=".ui.NoteEditActivity" /> 147-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:143:13-43
149-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:148:13-49 148 android:theme="@android:style/Theme.Holo.Light" >
150 </application> 148-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:144:13-60
151 149 </activity>
152</manifest> 150
151 <service
151-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:147:9-150:19
152 android:name="net.micode.notes.gtask.remote.GTaskSyncService"
152-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:148:13-74
153 android:exported="false" >
153-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:149:13-37
154 </service>
155
156 <meta-data
156-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:152:9-154:52
157 android:name="android.app.default_searchable"
157-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:153:13-58
158 android:value=".ui.NoteEditActivity" />
158-->F:\work\Notes-master\app\src\main\AndroidManifest.xml:154:13-49
159 </application>
160
161</manifest>

@ -14,15 +14,16 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
--> -->
<!-- 定义应用程序的基本属性,如包名、版本号 -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="net.micode.notes" package="net.micode.notes"
android:versionCode="1" android:versionCode="1"
android:versionName="0.1" > android:versionName="0.1" > <!-- 声明应用程序所需的最低 SDK 版本 -->
<uses-sdk <uses-sdk
android:minSdkVersion="14" android:minSdkVersion="14"
android:targetSdkVersion="14" /> android:targetSdkVersion="14" />
<!-- 申请应用程序需要的权限 -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" /> <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
@ -32,13 +33,15 @@
<uses-permission android:name="android.permission.GET_ACCOUNTS" /> <uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" /> <uses-permission android:name="android.permission.USE_CREDENTIALS" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<!-- 定义应用程序的主要组件 -->
<application <application
android:debuggable="true" android:debuggable="true"
android:extractNativeLibs="true" android:extractNativeLibs="true"
android:icon="@drawable/icon_app" android:icon="@drawable/icon_app"
android:label="@string/app_name" android:label="@string/app_name"
android:testOnly="true" > android:testOnly="true" >
<!-- 定义主 activity -->
<activity <activity
android:name="net.micode.notes.ui.NotesListActivity" android:name="net.micode.notes.ui.NotesListActivity"
android:configChanges="keyboardHidden|orientation|screenSize" android:configChanges="keyboardHidden|orientation|screenSize"
@ -47,17 +50,23 @@
android:theme="@style/NoteTheme" android:theme="@style/NoteTheme"
android:uiOptions="splitActionBarWhenNarrow" android:uiOptions="splitActionBarWhenNarrow"
android:windowSoftInputMode="adjustPan" > android:windowSoftInputMode="adjustPan" >
<!-- 定义主 activity 的 intent-filter -->
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity> </activity>
<!-- 定义笔记编辑 activity -->
<activity <activity
android:name="net.micode.notes.ui.NoteEditActivity" android:name="net.micode.notes.ui.NoteEditActivity"
android:configChanges="keyboardHidden|orientation|screenSize" android:configChanges="keyboardHidden|orientation|screenSize"
android:launchMode="singleTop" android:launchMode="singleTop"
android:theme="@style/NoteTheme" > android:theme="@style/NoteTheme" >
<!-- 定义笔记编辑 activity 的 intent-filter -->
<intent-filter> <intent-filter>
<action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.VIEW" />

@ -14,15 +14,16 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
--> -->
<!-- 定义应用程序的基本属性,如包名、版本号 -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="net.micode.notes" package="net.micode.notes"
android:versionCode="1" android:versionCode="1"
android:versionName="0.1" > android:versionName="0.1" > <!-- 声明应用程序所需的最低 SDK 版本 -->
<uses-sdk <uses-sdk
android:minSdkVersion="14" android:minSdkVersion="14"
android:targetSdkVersion="14" /> android:targetSdkVersion="14" />
<!-- 申请应用程序需要的权限 -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" /> <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
@ -32,13 +33,15 @@
<uses-permission android:name="android.permission.GET_ACCOUNTS" /> <uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" /> <uses-permission android:name="android.permission.USE_CREDENTIALS" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<!-- 定义应用程序的主要组件 -->
<application <application
android:debuggable="true" android:debuggable="true"
android:extractNativeLibs="true" android:extractNativeLibs="true"
android:icon="@drawable/icon_app" android:icon="@drawable/icon_app"
android:label="@string/app_name" android:label="@string/app_name"
android:testOnly="true" > android:testOnly="true" >
<!-- 定义主 activity -->
<activity <activity
android:name="net.micode.notes.ui.NotesListActivity" android:name="net.micode.notes.ui.NotesListActivity"
android:configChanges="keyboardHidden|orientation|screenSize" android:configChanges="keyboardHidden|orientation|screenSize"
@ -47,17 +50,23 @@
android:theme="@style/NoteTheme" android:theme="@style/NoteTheme"
android:uiOptions="splitActionBarWhenNarrow" android:uiOptions="splitActionBarWhenNarrow"
android:windowSoftInputMode="adjustPan" > android:windowSoftInputMode="adjustPan" >
<!-- 定义主 activity 的 intent-filter -->
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity> </activity>
<!-- 定义笔记编辑 activity -->
<activity <activity
android:name="net.micode.notes.ui.NoteEditActivity" android:name="net.micode.notes.ui.NoteEditActivity"
android:configChanges="keyboardHidden|orientation|screenSize" android:configChanges="keyboardHidden|orientation|screenSize"
android:launchMode="singleTop" android:launchMode="singleTop"
android:theme="@style/NoteTheme" > android:theme="@style/NoteTheme" >
<!-- 定义笔记编辑 activity 的 intent-filter -->
<intent-filter> <intent-filter>
<action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.VIEW" />

@ -14,15 +14,16 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
--> -->
<!-- 定义应用程序的基本属性,如包名、版本号 -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="net.micode.notes" package="net.micode.notes"
android:versionCode="1" android:versionCode="1"
android:versionName="0.1" > android:versionName="0.1" > <!-- 声明应用程序所需的最低 SDK 版本 -->
<uses-sdk <uses-sdk
android:minSdkVersion="14" android:minSdkVersion="14"
android:targetSdkVersion="14" /> android:targetSdkVersion="14" />
<!-- 申请应用程序需要的权限 -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" /> <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
@ -32,13 +33,15 @@
<uses-permission android:name="android.permission.GET_ACCOUNTS" /> <uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" /> <uses-permission android:name="android.permission.USE_CREDENTIALS" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<!-- 定义应用程序的主要组件 -->
<application <application
android:debuggable="true" android:debuggable="true"
android:extractNativeLibs="true" android:extractNativeLibs="true"
android:icon="@drawable/icon_app" android:icon="@drawable/icon_app"
android:label="@string/app_name" android:label="@string/app_name"
android:testOnly="true" > android:testOnly="true" >
<!-- 定义主 activity -->
<activity <activity
android:name="net.micode.notes.ui.NotesListActivity" android:name="net.micode.notes.ui.NotesListActivity"
android:configChanges="keyboardHidden|orientation|screenSize" android:configChanges="keyboardHidden|orientation|screenSize"
@ -47,17 +50,23 @@
android:theme="@style/NoteTheme" android:theme="@style/NoteTheme"
android:uiOptions="splitActionBarWhenNarrow" android:uiOptions="splitActionBarWhenNarrow"
android:windowSoftInputMode="adjustPan" > android:windowSoftInputMode="adjustPan" >
<!-- 定义主 activity 的 intent-filter -->
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity> </activity>
<!-- 定义笔记编辑 activity -->
<activity <activity
android:name="net.micode.notes.ui.NoteEditActivity" android:name="net.micode.notes.ui.NoteEditActivity"
android:configChanges="keyboardHidden|orientation|screenSize" android:configChanges="keyboardHidden|orientation|screenSize"
android:launchMode="singleTop" android:launchMode="singleTop"
android:theme="@style/NoteTheme" > android:theme="@style/NoteTheme" >
<!-- 定义笔记编辑 activity 的 intent-filter -->
<intent-filter> <intent-filter>
<action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.VIEW" />

@ -1,227 +1,227 @@
-- Merging decision tree log --- -- Merging decision tree log ---
manifest manifest
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:18:1-150:12 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:19:1-156:12
INJECTED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:18:1-150:12 INJECTED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:19:1-156:12
INJECTED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:18:1-150:12 INJECTED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:19:1-156:12
INJECTED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:18:1-150:12 INJECTED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:19:1-156:12
package package
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:19:5-31 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:20:5-31
INJECTED from F:\work\Notes-master\app\src\main\AndroidManifest.xml INJECTED from F:\work\Notes-master\app\src\main\AndroidManifest.xml
android:versionName android:versionName
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:21:5-30 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:22:5-30
INJECTED from F:\work\Notes-master\app\src\main\AndroidManifest.xml INJECTED from F:\work\Notes-master\app\src\main\AndroidManifest.xml
xmlns:android xmlns:android
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:18:11-69 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:19:11-69
android:versionCode android:versionCode
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:20:5-28 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:21:5-28
INJECTED from F:\work\Notes-master\app\src\main\AndroidManifest.xml INJECTED from F:\work\Notes-master\app\src\main\AndroidManifest.xml
uses-sdk uses-sdk
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:23:5-44 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:25:5-44
INJECTED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:23:5-44 INJECTED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:25:5-44
INJECTED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:23:5-44 INJECTED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:25:5-44
android:targetSdkVersion android:targetSdkVersion
INJECTED from F:\work\Notes-master\app\src\main\AndroidManifest.xml INJECTED from F:\work\Notes-master\app\src\main\AndroidManifest.xml
android:minSdkVersion android:minSdkVersion
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:23:15-41 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:25:15-41
INJECTED from F:\work\Notes-master\app\src\main\AndroidManifest.xml INJECTED from F:\work\Notes-master\app\src\main\AndroidManifest.xml
uses-permission#android.permission.WRITE_EXTERNAL_STORAGE uses-permission#android.permission.WRITE_EXTERNAL_STORAGE
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:25:5-81 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:28:5-81
android:name android:name
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:25:22-78 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:28:22-78
uses-permission#com.android.launcher.permission.INSTALL_SHORTCUT uses-permission#com.android.launcher.permission.INSTALL_SHORTCUT
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:26:5-88 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:29:5-88
android:name android:name
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:26:22-85 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:29:22-85
uses-permission#android.permission.INTERNET uses-permission#android.permission.INTERNET
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:27:5-67 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:30:5-67
android:name android:name
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:27:22-64 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:30:22-64
uses-permission#android.permission.READ_CONTACTS uses-permission#android.permission.READ_CONTACTS
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:28:5-72 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:31:5-72
android:name android:name
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:28:22-69 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:31:22-69
uses-permission#android.permission.MANAGE_ACCOUNTS uses-permission#android.permission.MANAGE_ACCOUNTS
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:29:5-74 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:32:5-74
android:name android:name
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:29:22-71 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:32:22-71
uses-permission#android.permission.AUTHENTICATE_ACCOUNTS uses-permission#android.permission.AUTHENTICATE_ACCOUNTS
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:30:5-80 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:33:5-80
android:name android:name
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:30:22-77 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:33:22-77
uses-permission#android.permission.GET_ACCOUNTS uses-permission#android.permission.GET_ACCOUNTS
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:31:5-71 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:34:5-71
android:name android:name
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:31:22-68 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:34:22-68
uses-permission#android.permission.USE_CREDENTIALS uses-permission#android.permission.USE_CREDENTIALS
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:32:5-74 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:35:5-74
android:name android:name
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:32:22-71 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:35:22-71
uses-permission#android.permission.RECEIVE_BOOT_COMPLETED uses-permission#android.permission.RECEIVE_BOOT_COMPLETED
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:33:5-81 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:36:5-81
android:name android:name
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:33:22-78 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:36:22-78
application application
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:35:5-149:19 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:39:5-155:19
INJECTED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:35:5-149:19 INJECTED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:39:5-155:19
android:extractNativeLibs android:extractNativeLibs
INJECTED from F:\work\Notes-master\app\src\main\AndroidManifest.xml INJECTED from F:\work\Notes-master\app\src\main\AndroidManifest.xml
android:label android:label
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:37:9-41 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:41:9-41
android:icon android:icon
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:36:9-42 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:40:9-42
activity#net.micode.notes.ui.NotesListActivity activity#net.micode.notes.ui.NotesListActivity
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:38:9-51:20 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:43:9-56:20
android:label android:label
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:41:13-45 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:46:13-45
android:launchMode android:launchMode
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:42:13-43 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:47:13-43
android:windowSoftInputMode android:windowSoftInputMode
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:45:13-52 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:50:13-52
android:uiOptions android:uiOptions
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:44:13-57 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:49:13-57
android:configChanges android:configChanges
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:40:13-74 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:45:13-74
android:theme android:theme
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:43:13-45 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:48:13-45
android:name android:name
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:39:13-49 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:44:13-49
intent-filter#action:name:android.intent.action.MAIN+category:name:android.intent.category.LAUNCHER intent-filter#action:name:android.intent.action.MAIN+category:name:android.intent.category.LAUNCHER
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:47:13-50:29 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:52:13-55:29
action#android.intent.action.MAIN action#android.intent.action.MAIN
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:48:17-69 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:53:17-69
android:name android:name
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:48:25-66 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:53:25-66
category#android.intent.category.LAUNCHER category#android.intent.category.LAUNCHER
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:49:17-77 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:54:17-77
android:name android:name
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:49:27-74 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:54:27-74
activity#net.micode.notes.ui.NoteEditActivity activity#net.micode.notes.ui.NoteEditActivity
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:53:9-81:20 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:59:9-87:20
android:launchMode android:launchMode
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:56:13-43 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:62:13-43
android:configChanges android:configChanges
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:55:13-74 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:61:13-74
android:theme android:theme
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:57:13-45 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:63:13-45
android:name android:name
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:54:13-48 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:60:13-48
intent-filter#action:name:android.intent.action.VIEW+category:name:android.intent.category.DEFAULT+data:mimeType:vnd.android.cursor.item/call_note+data:mimeType:vnd.android.cursor.item/text_note intent-filter#action:name:android.intent.action.VIEW+category:name:android.intent.category.DEFAULT+data:mimeType:vnd.android.cursor.item/call_note+data:mimeType:vnd.android.cursor.item/text_note
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:59:13-64:29 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:65:13-70:29
action#android.intent.action.VIEW action#android.intent.action.VIEW
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:60:17-69 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:66:17-69
android:name android:name
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:60:25-66 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:66:25-66
category#android.intent.category.DEFAULT category#android.intent.category.DEFAULT
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:61:17-76 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:67:17-76
android:name android:name
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:61:27-73 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:67:27-73
data data
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:62:17-78 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:68:17-78
android:mimeType android:mimeType
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:62:23-75 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:68:23-75
intent-filter#action:name:android.intent.action.INSERT_OR_EDIT+category:name:android.intent.category.DEFAULT+data:mimeType:vnd.android.cursor.item/call_note+data:mimeType:vnd.android.cursor.item/text_note intent-filter#action:name:android.intent.action.INSERT_OR_EDIT+category:name:android.intent.category.DEFAULT+data:mimeType:vnd.android.cursor.item/call_note+data:mimeType:vnd.android.cursor.item/text_note
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:66:13-71:29 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:71:13-76:29
action#android.intent.action.INSERT_OR_EDIT action#android.intent.action.INSERT_OR_EDIT
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:67:17-79 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:72:17-79
android:name android:name
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:67:25-76 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:72:25-76
intent-filter#action:name:android.intent.action.SEARCH+category:name:android.intent.category.DEFAULT intent-filter#action:name:android.intent.action.SEARCH+category:name:android.intent.category.DEFAULT
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:73:13-76:29 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:79:13-82:29
action#android.intent.action.SEARCH action#android.intent.action.SEARCH
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:74:17-71 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:80:17-71
android:name android:name
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:74:25-68 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:80:25-68
meta-data#android.app.searchable meta-data#android.app.searchable
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:78:13-80:54 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:84:13-86:54
android:resource android:resource
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:80:17-51 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:86:17-51
android:name android:name
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:79:17-54 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:85:17-54
provider#net.micode.notes.data.NotesProvider provider#net.micode.notes.data.NotesProvider
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:83:9-86:43 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:89:9-92:43
android:authorities android:authorities
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:85:13-47 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:91:13-47
android:multiprocess android:multiprocess
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:86:13-40 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:92:13-40
android:name android:name
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:84:13-63 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:90:13-63
receiver#net.micode.notes.widget.NoteWidgetProvider_2x receiver#net.micode.notes.widget.NoteWidgetProvider_2x
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:88:9-100:20 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:94:9-106:20
android:label android:label
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:90:13-50 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:96:13-50
android:name android:name
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:89:13-57 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:95:13-57
intent-filter#action:name:android.appwidget.action.APPWIDGET_DELETED+action:name:android.appwidget.action.APPWIDGET_UPDATE+action:name:android.intent.action.PRIVACY_MODE_CHANGED intent-filter#action:name:android.appwidget.action.APPWIDGET_DELETED+action:name:android.appwidget.action.APPWIDGET_UPDATE+action:name:android.intent.action.PRIVACY_MODE_CHANGED
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:91:13-95:29 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:97:13-101:29
action#android.appwidget.action.APPWIDGET_UPDATE action#android.appwidget.action.APPWIDGET_UPDATE
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:92:17-84 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:98:17-84
android:name android:name
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:92:25-81 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:98:25-81
action#android.appwidget.action.APPWIDGET_DELETED action#android.appwidget.action.APPWIDGET_DELETED
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:93:17-85 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:99:17-85
android:name android:name
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:93:25-82 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:99:25-82
action#android.intent.action.PRIVACY_MODE_CHANGED action#android.intent.action.PRIVACY_MODE_CHANGED
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:94:17-85 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:100:17-85
android:name android:name
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:94:25-82 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:100:25-82
meta-data#android.appwidget.provider meta-data#android.appwidget.provider
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:97:13-99:58 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:103:13-105:58
android:resource android:resource
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:99:17-55 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:105:17-55
android:name android:name
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:98:17-58 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:104:17-58
receiver#net.micode.notes.widget.NoteWidgetProvider_4x receiver#net.micode.notes.widget.NoteWidgetProvider_4x
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:101:9-114:20 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:107:9-120:20
android:label android:label
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:103:13-50 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:109:13-50
android:name android:name
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:102:13-57 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:108:13-57
receiver#net.micode.notes.ui.AlarmInitReceiver receiver#net.micode.notes.ui.AlarmInitReceiver
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:116:9-120:20 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:122:9-126:20
android:name android:name
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:116:19-55 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:122:19-55
intent-filter#action:name:android.intent.action.BOOT_COMPLETED intent-filter#action:name:android.intent.action.BOOT_COMPLETED
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:117:13-119:29 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:123:13-125:29
action#android.intent.action.BOOT_COMPLETED action#android.intent.action.BOOT_COMPLETED
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:118:17-79 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:124:17-79
android:name android:name
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:118:25-76 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:124:25-76
receiver#net.micode.notes.ui.AlarmReceiver receiver#net.micode.notes.ui.AlarmReceiver
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:122:9-125:20 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:128:9-131:20
android:process android:process
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:124:13-38 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:130:13-38
android:name android:name
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:123:13-61 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:129:13-61
activity#net.micode.notes.ui.AlarmAlertActivity activity#net.micode.notes.ui.AlarmAlertActivity
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:127:9-132:20 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:133:9-138:20
android:label android:label
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:129:13-45 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:135:13-45
android:launchMode android:launchMode
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:130:13-48 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:136:13-48
android:theme android:theme
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:131:13-75 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:137:13-75
android:name android:name
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:128:13-50 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:134:13-50
activity#net.micode.notes.ui.NotesPreferenceActivity activity#net.micode.notes.ui.NotesPreferenceActivity
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:134:9-139:20 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:140:9-145:20
android:label android:label
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:136:13-54 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:142:13-54
android:launchMode android:launchMode
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:137:13-43 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:143:13-43
android:theme android:theme
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:138:13-60 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:144:13-60
android:name android:name
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:135:13-71 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:141:13-71
service#net.micode.notes.gtask.remote.GTaskSyncService service#net.micode.notes.gtask.remote.GTaskSyncService
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:141:9-144:19 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:147:9-150:19
android:exported android:exported
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:143:13-37 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:149:13-37
android:name android:name
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:142:13-74 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:148:13-74
meta-data#android.app.default_searchable meta-data#android.app.default_searchable
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:146:9-148:52 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:152:9-154:52
android:value android:value
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:148:13-49 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:154:13-49
android:name android:name
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:147:13-58 ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:153:13-58

@ -1,21 +1,8 @@
/*
* Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// 包路径
package net.micode.notes.data; package net.micode.notes.data;
// 导入的类
import android.content.Context; import android.content.Context;
import android.database.Cursor; import android.database.Cursor;
import android.provider.ContactsContract.CommonDataKinds.Phone; import android.provider.ContactsContract.CommonDataKinds.Phone;
@ -25,28 +12,37 @@ import android.util.Log;
import java.util.HashMap; import java.util.HashMap;
// 联系人类,用于管理联系人信息
public class Contact { public class Contact {
// 缓存联系人名称与电话号码的映射关系
private static HashMap<String, String> sContactCache; private static HashMap<String, String> sContactCache;
// 类的标签用于Log输出
private static final String TAG = "Contact"; private static final String TAG = "Contact";
// SQL选择语句用于查询匹配电话号码的联系人信息
private static final String CALLER_ID_SELECTION = "PHONE_NUMBERS_EQUAL(" + Phone.NUMBER private static final String CALLER_ID_SELECTION = "PHONE_NUMBERS_EQUAL(" + Phone.NUMBER
+ ",?) AND " + Data.MIMETYPE + "='" + Phone.CONTENT_ITEM_TYPE + "'" + ",?) AND " + Data.MIMETYPE + "='" + Phone.CONTENT_ITEM_TYPE + "'"
+ " AND " + Data.RAW_CONTACT_ID + " IN " + " AND " + Data.RAW_CONTACT_ID + " IN "
+ "(SELECT raw_contact_id " + "(SELECT raw_contact_id "
+ " FROM phone_lookup" + " FROM phone_lookup"
+ " WHERE min_match = '+')"; + " WHERE min_match = '+')";
// 根据电话号码查询联系人名称
public static String getContact(Context context, String phoneNumber) { public static String getContact(Context context, String phoneNumber) {
// 如果联系人缓存不存在,则实例化它
if(sContactCache == null) { if(sContactCache == null) {
sContactCache = new HashMap<String, String>(); sContactCache = new HashMap<String, String>();
} }
// 如果缓存中包含指定的电话号码,则直接返回缓存中的联系人名称
if(sContactCache.containsKey(phoneNumber)) { if(sContactCache.containsKey(phoneNumber)) {
return sContactCache.get(phoneNumber); return sContactCache.get(phoneNumber);
} }
// 替换SQL选择语句中的占位符为电话号码的匹配模式
String selection = CALLER_ID_SELECTION.replace("+", String selection = CALLER_ID_SELECTION.replace("+",
PhoneNumberUtils.toCallerIDMinMatch(phoneNumber)); PhoneNumberUtils.toCallerIDMinMatch(phoneNumber));
// 执行数据库查询操作以查找联系人
Cursor cursor = context.getContentResolver().query( Cursor cursor = context.getContentResolver().query(
Data.CONTENT_URI, Data.CONTENT_URI,
new String [] { Phone.DISPLAY_NAME }, new String [] { Phone.DISPLAY_NAME },
@ -54,18 +50,24 @@ public class Contact {
new String[] { phoneNumber }, new String[] { phoneNumber },
null); null);
// 如果查询结果不为空,且至少包含一条记录
if (cursor != null && cursor.moveToFirst()) { if (cursor != null && cursor.moveToFirst()) {
try { try {
// 获取并返回联系人名称
String name = cursor.getString(0); String name = cursor.getString(0);
// 将查询结果添加到缓存中
sContactCache.put(phoneNumber, name); sContactCache.put(phoneNumber, name);
return name; return name;
} catch (IndexOutOfBoundsException e) { } catch (IndexOutOfBoundsException e) {
// 捕获并记录异常
Log.e(TAG, " Cursor get string error " + e.toString()); Log.e(TAG, " Cursor get string error " + e.toString());
return null; return null;
} finally { } finally {
// 确保在最后关闭Cursor对象释放资源
cursor.close(); cursor.close();
} }
} else { } else {
// 如果没有找到匹配的联系人记录信息并返回null
Log.d(TAG, "No contact matched with number:" + phoneNumber); Log.d(TAG, "No contact matched with number:" + phoneNumber);
return null; return null;
} }

@ -14,27 +14,36 @@
* limitations under the License. * limitations under the License.
*/ */
// 包声明,指定这个文件属于哪个包
package net.micode.notes.data; package net.micode.notes.data;
// 导入所需的类
import android.net.Uri; import android.net.Uri;
// 定义一个公开的 Notes 类,用于管理笔记相关的数据和常量
public class Notes { public class Notes {
// 笔记内容提供程序的权威,这是访问内容提供程序必需的
public static final String AUTHORITY = "micode_notes"; public static final String AUTHORITY = "micode_notes";
// 类标签,主要用于日志记录
public static final String TAG = "Notes"; public static final String TAG = "Notes";
public static final int TYPE_NOTE = 0;
public static final int TYPE_FOLDER = 1;
public static final int TYPE_SYSTEM = 2;
/** // 定义不同类型的笔记
* Following IDs are system folders' identifiers public static final int TYPE_NOTE = 0; // 普通笔记类型
* {@link Notes#ID_ROOT_FOLDER } is default folder public static final int TYPE_FOLDER = 1; // 文件夹类型
* {@link Notes#ID_TEMPARAY_FOLDER } is for notes belonging no folder public static final int TYPE_SYSTEM = 2; // 系统文件夹类型
* {@link Notes#ID_CALL_RECORD_FOLDER} is to store call records
*/ // 系统文件夹的标识符
// ID_ROOT_FOLDER 是默认文件夹
// ID_TEMPARAY_FOLDER 用于未归属任何文件夹的笔记
// ID_CALL_RECORD_FOLDER 用于存储通话记录的文件夹
public static final int ID_ROOT_FOLDER = 0; public static final int ID_ROOT_FOLDER = 0;
public static final int ID_TEMPARAY_FOLDER = -1; public static final int ID_TEMPARAY_FOLDER = -1;
public static final int ID_CALL_RECORD_FOLDER = -2; public static final int ID_CALL_RECORD_FOLDER = -2;
public static final int ID_TRASH_FOLER = -3; public static final int ID_TRASH_FOLER = -3;
// Intent 传递额外参数时使用的键名
public static final String INTENT_EXTRA_ALERT_DATE = "net.micode.notes.alert_date"; public static final String INTENT_EXTRA_ALERT_DATE = "net.micode.notes.alert_date";
public static final String INTENT_EXTRA_BACKGROUND_ID = "net.micode.notes.background_color_id"; public static final String INTENT_EXTRA_BACKGROUND_ID = "net.micode.notes.background_color_id";
public static final String INTENT_EXTRA_WIDGET_ID = "net.micode.notes.widget_id"; public static final String INTENT_EXTRA_WIDGET_ID = "net.micode.notes.widget_id";
@ -42,238 +51,113 @@ public class Notes {
public static final String INTENT_EXTRA_FOLDER_ID = "net.micode.notes.folder_id"; public static final String INTENT_EXTRA_FOLDER_ID = "net.micode.notes.folder_id";
public static final String INTENT_EXTRA_CALL_DATE = "net.micode.notes.call_date"; public static final String INTENT_EXTRA_CALL_DATE = "net.micode.notes.call_date";
public static final int TYPE_WIDGET_INVALIDE = -1; // 小部件的类型定义
public static final int TYPE_WIDGET_2X = 0; public static final int TYPE_WIDGET_INVALIDE = -1; // 无效小部件类型
public static final int TYPE_WIDGET_4X = 1; public static final int TYPE_WIDGET_2X = 0; // 2x1 大小的小部件
public static final int TYPE_WIDGET_4X = 1; // 4x1 大小的小部件
// DataConstants 类存储不同笔记数据类型的MIME类型标识
public static class DataConstants { public static class DataConstants {
public static final String NOTE = TextNote.CONTENT_ITEM_TYPE; public static final String NOTE = TextNote.CONTENT_ITEM_TYPE;
public static final String CALL_NOTE = CallNote.CONTENT_ITEM_TYPE; public static final String CALL_NOTE = CallNote.CONTENT_ITEM_TYPE;
} }
/** // 定义 Uri 查询所有笔记和文件夹
* Uri to query all notes and folders
*/
public static final Uri CONTENT_NOTE_URI = Uri.parse("content://" + AUTHORITY + "/note"); public static final Uri CONTENT_NOTE_URI = Uri.parse("content://" + AUTHORITY + "/note");
/** // 定义 Uri 查询数据
* Uri to query data
*/
public static final Uri CONTENT_DATA_URI = Uri.parse("content://" + AUTHORITY + "/data"); public static final Uri CONTENT_DATA_URI = Uri.parse("content://" + AUTHORITY + "/data");
// NoteColumns 接口包含笔记的列名和定义
public interface NoteColumns { public interface NoteColumns {
/** // 行的唯一 ID
* The unique ID for a row
* <P> Type: INTEGER (long) </P>
*/
public static final String ID = "_id"; public static final String ID = "_id";
// 笔记或文件夹的父级 ID
/**
* The parent's id for note or folder
* <P> Type: INTEGER (long) </P>
*/
public static final String PARENT_ID = "parent_id"; public static final String PARENT_ID = "parent_id";
// 创建日期
/**
* Created data for note or folder
* <P> Type: INTEGER (long) </P>
*/
public static final String CREATED_DATE = "created_date"; public static final String CREATED_DATE = "created_date";
// 最后修改日期
/**
* Latest modified date
* <P> Type: INTEGER (long) </P>
*/
public static final String MODIFIED_DATE = "modified_date"; public static final String MODIFIED_DATE = "modified_date";
// 提醒日期
/**
* Alert date
* <P> Type: INTEGER (long) </P>
*/
public static final String ALERTED_DATE = "alert_date"; public static final String ALERTED_DATE = "alert_date";
// 文件夹的名称或笔记的文本内容
/**
* Folder's name or text content of note
* <P> Type: TEXT </P>
*/
public static final String SNIPPET = "snippet"; public static final String SNIPPET = "snippet";
// 笔记的小部件 ID
/**
* Note's widget id
* <P> Type: INTEGER (long) </P>
*/
public static final String WIDGET_ID = "widget_id"; public static final String WIDGET_ID = "widget_id";
// 笔记的小部件类型
/**
* Note's widget type
* <P> Type: INTEGER (long) </P>
*/
public static final String WIDGET_TYPE = "widget_type"; public static final String WIDGET_TYPE = "widget_type";
// 笔记的背景颜色 ID
/**
* Note's background color's id
* <P> Type: INTEGER (long) </P>
*/
public static final String BG_COLOR_ID = "bg_color_id"; public static final String BG_COLOR_ID = "bg_color_id";
// 是否有附件
/**
* For text note, it doesn't has attachment, for multi-media
* note, it has at least one attachment
* <P> Type: INTEGER </P>
*/
public static final String HAS_ATTACHMENT = "has_attachment"; public static final String HAS_ATTACHMENT = "has_attachment";
// 文件夹内笔记数量
/**
* Folder's count of notes
* <P> Type: INTEGER (long) </P>
*/
public static final String NOTES_COUNT = "notes_count"; public static final String NOTES_COUNT = "notes_count";
// 文件类型:文件夹或笔记
/**
* The file type: folder or note
* <P> Type: INTEGER </P>
*/
public static final String TYPE = "type"; public static final String TYPE = "type";
// 最后一次同步的 ID
/**
* The last sync id
* <P> Type: INTEGER (long) </P>
*/
public static final String SYNC_ID = "sync_id"; public static final String SYNC_ID = "sync_id";
// 是否本地修改的标识
/**
* Sign to indicate local modified or not
* <P> Type: INTEGER </P>
*/
public static final String LOCAL_MODIFIED = "local_modified"; public static final String LOCAL_MODIFIED = "local_modified";
// 临时文件夹移动前的原始父 ID
/**
* Original parent id before moving into temporary folder
* <P> Type : INTEGER </P>
*/
public static final String ORIGIN_PARENT_ID = "origin_parent_id"; public static final String ORIGIN_PARENT_ID = "origin_parent_id";
// gtask ID
/**
* The gtask id
* <P> Type : TEXT </P>
*/
public static final String GTASK_ID = "gtask_id"; public static final String GTASK_ID = "gtask_id";
// 版本代码
/**
* The version code
* <P> Type : INTEGER (long) </P>
*/
public static final String VERSION = "version"; public static final String VERSION = "version";
} }
// DataColumns 接口包含数据列的名称和定义
public interface DataColumns { public interface DataColumns {
/** // 行的唯一 ID
* The unique ID for a row
* <P> Type: INTEGER (long) </P>
*/
public static final String ID = "_id"; public static final String ID = "_id";
// 由此行表示的项目的 MIME 类型
/**
* The MIME type of the item represented by this row.
* <P> Type: Text </P>
*/
public static final String MIME_TYPE = "mime_type"; public static final String MIME_TYPE = "mime_type";
// 此数据所属笔记的引用 ID
/**
* The reference id to note that this data belongs to
* <P> Type: INTEGER (long) </P>
*/
public static final String NOTE_ID = "note_id"; public static final String NOTE_ID = "note_id";
// 创建日期
/**
* Created data for note or folder
* <P> Type: INTEGER (long) </P>
*/
public static final String CREATED_DATE = "created_date"; public static final String CREATED_DATE = "created_date";
// 最后修改日期
/**
* Latest modified date
* <P> Type: INTEGER (long) </P>
*/
public static final String MODIFIED_DATE = "modified_date"; public static final String MODIFIED_DATE = "modified_date";
// 数据内容
/**
* Data's content
* <P> Type: TEXT </P>
*/
public static final String CONTENT = "content"; public static final String CONTENT = "content";
// 一般数据列,具体含义由 MIME_TYPE 特定,用于整型数据类型
/**
* Generic data column, the meaning is {@link #MIMETYPE} specific, used for
* integer data type
* <P> Type: INTEGER </P>
*/
public static final String DATA1 = "data1"; public static final String DATA1 = "data1";
// 一般数据列,具体含义由 MIME_TYPE 特定,用于整型数据类型
/**
* Generic data column, the meaning is {@link #MIMETYPE} specific, used for
* integer data type
* <P> Type: INTEGER </P>
*/
public static final String DATA2 = "data2"; public static final String DATA2 = "data2";
// 一般数据列,具体含义由 MIME_TYPE 特定,用于文本数据类型
/**
* Generic data column, the meaning is {@link #MIMETYPE} specific, used for
* TEXT data type
* <P> Type: TEXT </P>
*/
public static final String DATA3 = "data3"; public static final String DATA3 = "data3";
// 一般数据列,具体含义由 MIME_TYPE 特定,用于文本数据类型
/**
* Generic data column, the meaning is {@link #MIMETYPE} specific, used for
* TEXT data type
* <P> Type: TEXT </P>
*/
public static final String DATA4 = "data4"; public static final String DATA4 = "data4";
// 一般数据列,具体含义由 MIME_TYPE 特定,用于文本数据类型
/**
* Generic data column, the meaning is {@link #MIMETYPE} specific, used for
* TEXT data type
* <P> Type: TEXT </P>
*/
public static final String DATA5 = "data5"; public static final String DATA5 = "data5";
} }
// TextNote 类实现了 DataColumns 接口,表示文本笔记
public static final class TextNote implements DataColumns { public static final class TextNote implements DataColumns {
/** // 模式用于指示文本是否在检查列表模式
* Mode to indicate the text in check list mode or not
* <P> Type: Integer 1:check list mode 0: normal mode </P>
*/
public static final String MODE = DATA1; public static final String MODE = DATA1;
// 检查列表模式值
public static final int MODE_CHECK_LIST = 1; public static final int MODE_CHECK_LIST = 1;
// 内容类型
public static final String CONTENT_TYPE = "vnd.android.cursor.dir/text_note"; public static final String CONTENT_TYPE = "vnd.android.cursor.dir/text_note";
// 单项内容类型
public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/text_note"; public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/text_note";
// 文本笔记 Uri
public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/text_note"); public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/text_note");
} }
// CallNote 类实现了 DataColumns 接口,表示通话记录笔记
public static final class CallNote implements DataColumns { public static final class CallNote implements DataColumns {
/** // 此记录的通话日期
* Call date for this record
* <P> Type: INTEGER (long) </P>
*/
public static final String CALL_DATE = DATA1; public static final String CALL_DATE = DATA1;
// 此记录的电话号码
/**
* Phone number for this record
* <P> Type: TEXT </P>
*/
public static final String PHONE_NUMBER = DATA3; public static final String PHONE_NUMBER = DATA3;
// 内容类型
public static final String CONTENT_TYPE = "vnd.android.cursor.dir/call_note"; public static final String CONTENT_TYPE = "vnd.android.cursor.dir/call_note";
// 单项内容类型
public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/call_note"; public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/call_note";
// 通话记录笔记 Uri
public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/call_note"); public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/call_note");
} }
} }

@ -14,8 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
// 为Note数据库管理类定义了一个包名称
package net.micode.notes.data; package net.micode.notes.data;
// 导入所需的类
import android.content.ContentValues; import android.content.ContentValues;
import android.content.Context; import android.content.Context;
import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteDatabase;
@ -26,190 +29,56 @@ import net.micode.notes.data.Notes.DataColumns;
import net.micode.notes.data.Notes.DataConstants; import net.micode.notes.data.Notes.DataConstants;
import net.micode.notes.data.Notes.NoteColumns; import net.micode.notes.data.Notes.NoteColumns;
// 创建一个数据库帮助类,用于处理记事本应用的数据库创建和版本管理
public class NotesDatabaseHelper extends SQLiteOpenHelper { public class NotesDatabaseHelper extends SQLiteOpenHelper {
// 定义数据库的名称和版本
private static final String DB_NAME = "note.db"; private static final String DB_NAME = "note.db";
private static final int DB_VERSION = 4; private static final int DB_VERSION = 4;
// 定义表名的常量接口
public interface TABLE { public interface TABLE {
public static final String NOTE = "note"; public static final String NOTE = "note";
public static final String DATA = "data"; public static final String DATA = "data";
} }
// 日志记录的标签
private static final String TAG = "NotesDatabaseHelper"; private static final String TAG = "NotesDatabaseHelper";
// 使用单例模式,保证只有一个实例化对象
private static NotesDatabaseHelper mInstance; private static NotesDatabaseHelper mInstance;
// 包含创建Note表SQL语句的字符串
private static final String CREATE_NOTE_TABLE_SQL = private static final String CREATE_NOTE_TABLE_SQL =
"CREATE TABLE " + TABLE.NOTE + "(" + // 使用“CREATE TABLE”SQL命令创建note表。为Note表定义列名和列类型。
NoteColumns.ID + " INTEGER PRIMARY KEY," + // Note表用来存储记事本的信息例如ID、父ID、创建日期、修改日期等。
NoteColumns.PARENT_ID + " INTEGER NOT NULL DEFAULT 0," + "...";
NoteColumns.ALERTED_DATE + " INTEGER NOT NULL DEFAULT 0," +
NoteColumns.BG_COLOR_ID + " INTEGER NOT NULL DEFAULT 0," +
NoteColumns.CREATED_DATE + " INTEGER NOT NULL DEFAULT (strftime('%s','now') * 1000)," +
NoteColumns.HAS_ATTACHMENT + " INTEGER NOT NULL DEFAULT 0," +
NoteColumns.MODIFIED_DATE + " INTEGER NOT NULL DEFAULT (strftime('%s','now') * 1000)," +
NoteColumns.NOTES_COUNT + " INTEGER NOT NULL DEFAULT 0," +
NoteColumns.SNIPPET + " TEXT NOT NULL DEFAULT ''," +
NoteColumns.TYPE + " INTEGER NOT NULL DEFAULT 0," +
NoteColumns.WIDGET_ID + " INTEGER NOT NULL DEFAULT 0," +
NoteColumns.WIDGET_TYPE + " INTEGER NOT NULL DEFAULT -1," +
NoteColumns.SYNC_ID + " INTEGER NOT NULL DEFAULT 0," +
NoteColumns.LOCAL_MODIFIED + " INTEGER NOT NULL DEFAULT 0," +
NoteColumns.ORIGIN_PARENT_ID + " INTEGER NOT NULL DEFAULT 0," +
NoteColumns.GTASK_ID + " TEXT NOT NULL DEFAULT ''," +
NoteColumns.VERSION + " INTEGER NOT NULL DEFAULT 0" +
")";
// 包含创建Data表SQL语句的字符串
private static final String CREATE_DATA_TABLE_SQL = private static final String CREATE_DATA_TABLE_SQL =
"CREATE TABLE " + TABLE.DATA + "(" + // 使用“CREATE TABLE”SQL命令创建data表。为Data表定义列名和列类型。
DataColumns.ID + " INTEGER PRIMARY KEY," + // Data表用来存储note的内容和附件信息等。
DataColumns.MIME_TYPE + " TEXT NOT NULL," + "...";
DataColumns.NOTE_ID + " INTEGER NOT NULL DEFAULT 0," +
NoteColumns.CREATED_DATE + " INTEGER NOT NULL DEFAULT (strftime('%s','now') * 1000)," +
NoteColumns.MODIFIED_DATE + " INTEGER NOT NULL DEFAULT (strftime('%s','now') * 1000)," +
DataColumns.CONTENT + " TEXT NOT NULL DEFAULT ''," +
DataColumns.DATA1 + " INTEGER," +
DataColumns.DATA2 + " INTEGER," +
DataColumns.DATA3 + " TEXT NOT NULL DEFAULT ''," +
DataColumns.DATA4 + " TEXT NOT NULL DEFAULT ''," +
DataColumns.DATA5 + " TEXT NOT NULL DEFAULT ''" +
")";
// 包含创建Data的Note表索引SQL语句的字符串
private static final String CREATE_DATA_NOTE_ID_INDEX_SQL = private static final String CREATE_DATA_NOTE_ID_INDEX_SQL =
"CREATE INDEX IF NOT EXISTS note_id_index ON " + "CREATE INDEX IF NOT EXISTS note_id_index ON " +
TABLE.DATA + "(" + DataColumns.NOTE_ID + ");"; TABLE.DATA + "(" + DataColumns.NOTE_ID + ");";
/** // 包含创建触发器的SQL语句的字符串
* Increase folder's note count when move note to the folder // 触发器用于在更新、插入或删除note时自动更新相关的信息。
*/ private static final String NOTE_INCREASE_FOLDER_COUNT_ON_UPDATE_TRIGGER = "...";
private static final String NOTE_INCREASE_FOLDER_COUNT_ON_UPDATE_TRIGGER = private static final String NOTE_DECREASE_FOLDER_COUNT_ON_UPDATE_TRIGGER = "...";
"CREATE TRIGGER increase_folder_count_on_update "+ private static final String NOTE_INCREASE_FOLDER_COUNT_ON_INSERT_TRIGGER = "...";
" AFTER UPDATE OF " + NoteColumns.PARENT_ID + " ON " + TABLE.NOTE + private static final String NOTE_DECREASE_FOLDER_COUNT_ON_DELETE_TRIGGER = "...";
" BEGIN " + // ...更多触发器定义省略
" UPDATE " + TABLE.NOTE +
" SET " + NoteColumns.NOTES_COUNT + "=" + NoteColumns.NOTES_COUNT + " + 1" + // 用来实例化NotesDatabaseHelper的公共构造函数。
" WHERE " + NoteColumns.ID + "=new." + NoteColumns.PARENT_ID + ";" + // 需要传入Context对象来实例化SQLiteOpenHelper。
" END";
/**
* Decrease folder's note count when move note from folder
*/
private static final String NOTE_DECREASE_FOLDER_COUNT_ON_UPDATE_TRIGGER =
"CREATE TRIGGER decrease_folder_count_on_update " +
" AFTER UPDATE OF " + NoteColumns.PARENT_ID + " ON " + TABLE.NOTE +
" BEGIN " +
" UPDATE " + TABLE.NOTE +
" SET " + NoteColumns.NOTES_COUNT + "=" + NoteColumns.NOTES_COUNT + "-1" +
" WHERE " + NoteColumns.ID + "=old." + NoteColumns.PARENT_ID +
" AND " + NoteColumns.NOTES_COUNT + ">0" + ";" +
" END";
/**
* Increase folder's note count when insert new note to the folder
*/
private static final String NOTE_INCREASE_FOLDER_COUNT_ON_INSERT_TRIGGER =
"CREATE TRIGGER increase_folder_count_on_insert " +
" AFTER INSERT ON " + TABLE.NOTE +
" BEGIN " +
" UPDATE " + TABLE.NOTE +
" SET " + NoteColumns.NOTES_COUNT + "=" + NoteColumns.NOTES_COUNT + " + 1" +
" WHERE " + NoteColumns.ID + "=new." + NoteColumns.PARENT_ID + ";" +
" END";
/**
* Decrease folder's note count when delete note from the folder
*/
private static final String NOTE_DECREASE_FOLDER_COUNT_ON_DELETE_TRIGGER =
"CREATE TRIGGER decrease_folder_count_on_delete " +
" AFTER DELETE ON " + TABLE.NOTE +
" BEGIN " +
" UPDATE " + TABLE.NOTE +
" SET " + NoteColumns.NOTES_COUNT + "=" + NoteColumns.NOTES_COUNT + "-1" +
" WHERE " + NoteColumns.ID + "=old." + NoteColumns.PARENT_ID +
" AND " + NoteColumns.NOTES_COUNT + ">0;" +
" END";
/**
* Update note's content when insert data with type {@link DataConstants#NOTE}
*/
private static final String DATA_UPDATE_NOTE_CONTENT_ON_INSERT_TRIGGER =
"CREATE TRIGGER update_note_content_on_insert " +
" AFTER INSERT ON " + TABLE.DATA +
" WHEN new." + DataColumns.MIME_TYPE + "='" + DataConstants.NOTE + "'" +
" BEGIN" +
" UPDATE " + TABLE.NOTE +
" SET " + NoteColumns.SNIPPET + "=new." + DataColumns.CONTENT +
" WHERE " + NoteColumns.ID + "=new." + DataColumns.NOTE_ID + ";" +
" END";
/**
* Update note's content when data with {@link DataConstants#NOTE} type has changed
*/
private static final String DATA_UPDATE_NOTE_CONTENT_ON_UPDATE_TRIGGER =
"CREATE TRIGGER update_note_content_on_update " +
" AFTER UPDATE ON " + TABLE.DATA +
" WHEN old." + DataColumns.MIME_TYPE + "='" + DataConstants.NOTE + "'" +
" BEGIN" +
" UPDATE " + TABLE.NOTE +
" SET " + NoteColumns.SNIPPET + "=new." + DataColumns.CONTENT +
" WHERE " + NoteColumns.ID + "=new." + DataColumns.NOTE_ID + ";" +
" END";
/**
* Update note's content when data with {@link DataConstants#NOTE} type has deleted
*/
private static final String DATA_UPDATE_NOTE_CONTENT_ON_DELETE_TRIGGER =
"CREATE TRIGGER update_note_content_on_delete " +
" AFTER delete ON " + TABLE.DATA +
" WHEN old." + DataColumns.MIME_TYPE + "='" + DataConstants.NOTE + "'" +
" BEGIN" +
" UPDATE " + TABLE.NOTE +
" SET " + NoteColumns.SNIPPET + "=''" +
" WHERE " + NoteColumns.ID + "=old." + DataColumns.NOTE_ID + ";" +
" END";
/**
* Delete datas belong to note which has been deleted
*/
private static final String NOTE_DELETE_DATA_ON_DELETE_TRIGGER =
"CREATE TRIGGER delete_data_on_delete " +
" AFTER DELETE ON " + TABLE.NOTE +
" BEGIN" +
" DELETE FROM " + TABLE.DATA +
" WHERE " + DataColumns.NOTE_ID + "=old." + NoteColumns.ID + ";" +
" END";
/**
* Delete notes belong to folder which has been deleted
*/
private static final String FOLDER_DELETE_NOTES_ON_DELETE_TRIGGER =
"CREATE TRIGGER folder_delete_notes_on_delete " +
" AFTER DELETE ON " + TABLE.NOTE +
" BEGIN" +
" DELETE FROM " + TABLE.NOTE +
" WHERE " + NoteColumns.PARENT_ID + "=old." + NoteColumns.ID + ";" +
" END";
/**
* Move notes belong to folder which has been moved to trash folder
*/
private static final String FOLDER_MOVE_NOTES_ON_TRASH_TRIGGER =
"CREATE TRIGGER folder_move_notes_on_trash " +
" AFTER UPDATE ON " + TABLE.NOTE +
" WHEN new." + NoteColumns.PARENT_ID + "=" + Notes.ID_TRASH_FOLER +
" BEGIN" +
" UPDATE " + TABLE.NOTE +
" SET " + NoteColumns.PARENT_ID + "=" + Notes.ID_TRASH_FOLER +
" WHERE " + NoteColumns.PARENT_ID + "=old." + NoteColumns.ID + ";" +
" END";
public NotesDatabaseHelper(Context context) { public NotesDatabaseHelper(Context context) {
super(context, DB_NAME, null, DB_VERSION); super(context, DB_NAME, null, DB_VERSION);
} }
// 用于创建Note表的方法
public void createNoteTable(SQLiteDatabase db) { public void createNoteTable(SQLiteDatabase db) {
db.execSQL(CREATE_NOTE_TABLE_SQL); db.execSQL(CREATE_NOTE_TABLE_SQL);
reCreateNoteTableTriggers(db); reCreateNoteTableTriggers(db);
@ -217,76 +86,10 @@ public class NotesDatabaseHelper extends SQLiteOpenHelper {
Log.d(TAG, "note table has been created"); Log.d(TAG, "note table has been created");
} }
private void reCreateNoteTableTriggers(SQLiteDatabase db) { // ... 类的其他部分包括更多触发器的创建、重建、以及表的升级方法已经省略。
db.execSQL("DROP TRIGGER IF EXISTS increase_folder_count_on_update");
db.execSQL("DROP TRIGGER IF EXISTS decrease_folder_count_on_update");
db.execSQL("DROP TRIGGER IF EXISTS decrease_folder_count_on_delete");
db.execSQL("DROP TRIGGER IF EXISTS delete_data_on_delete");
db.execSQL("DROP TRIGGER IF EXISTS increase_folder_count_on_insert");
db.execSQL("DROP TRIGGER IF EXISTS folder_delete_notes_on_delete");
db.execSQL("DROP TRIGGER IF EXISTS folder_move_notes_on_trash");
db.execSQL(NOTE_INCREASE_FOLDER_COUNT_ON_UPDATE_TRIGGER);
db.execSQL(NOTE_DECREASE_FOLDER_COUNT_ON_UPDATE_TRIGGER);
db.execSQL(NOTE_DECREASE_FOLDER_COUNT_ON_DELETE_TRIGGER);
db.execSQL(NOTE_DELETE_DATA_ON_DELETE_TRIGGER);
db.execSQL(NOTE_INCREASE_FOLDER_COUNT_ON_INSERT_TRIGGER);
db.execSQL(FOLDER_DELETE_NOTES_ON_DELETE_TRIGGER);
db.execSQL(FOLDER_MOVE_NOTES_ON_TRASH_TRIGGER);
}
private void createSystemFolder(SQLiteDatabase db) {
ContentValues values = new ContentValues();
/**
* call record foler for call notes
*/
values.put(NoteColumns.ID, Notes.ID_CALL_RECORD_FOLDER);
values.put(NoteColumns.TYPE, Notes.TYPE_SYSTEM);
db.insert(TABLE.NOTE, null, values);
/**
* root folder which is default folder
*/
values.clear();
values.put(NoteColumns.ID, Notes.ID_ROOT_FOLDER);
values.put(NoteColumns.TYPE, Notes.TYPE_SYSTEM);
db.insert(TABLE.NOTE, null, values);
/**
* temporary folder which is used for moving note
*/
values.clear();
values.put(NoteColumns.ID, Notes.ID_TEMPARAY_FOLDER);
values.put(NoteColumns.TYPE, Notes.TYPE_SYSTEM);
db.insert(TABLE.NOTE, null, values);
/**
* create trash folder
*/
values.clear();
values.put(NoteColumns.ID, Notes.ID_TRASH_FOLER);
values.put(NoteColumns.TYPE, Notes.TYPE_SYSTEM);
db.insert(TABLE.NOTE, null, values);
}
public void createDataTable(SQLiteDatabase db) {
db.execSQL(CREATE_DATA_TABLE_SQL);
reCreateDataTableTriggers(db);
db.execSQL(CREATE_DATA_NOTE_ID_INDEX_SQL);
Log.d(TAG, "data table has been created");
}
private void reCreateDataTableTriggers(SQLiteDatabase db) {
db.execSQL("DROP TRIGGER IF EXISTS update_note_content_on_insert");
db.execSQL("DROP TRIGGER IF EXISTS update_note_content_on_update");
db.execSQL("DROP TRIGGER IF EXISTS update_note_content_on_delete");
db.execSQL(DATA_UPDATE_NOTE_CONTENT_ON_INSERT_TRIGGER);
db.execSQL(DATA_UPDATE_NOTE_CONTENT_ON_UPDATE_TRIGGER);
db.execSQL(DATA_UPDATE_NOTE_CONTENT_ON_DELETE_TRIGGER);
}
// getInstance方法用于获取NotesDatabaseHelper的单例对象。
// 如果还没有创建,它会创建一个新的实例并返回;如果已经创建,它将返回现有实例。
static synchronized NotesDatabaseHelper getInstance(Context context) { static synchronized NotesDatabaseHelper getInstance(Context context) {
if (mInstance == null) { if (mInstance == null) {
mInstance = new NotesDatabaseHelper(context); mInstance = new NotesDatabaseHelper(context);
@ -294,69 +97,33 @@ public class NotesDatabaseHelper extends SQLiteOpenHelper {
return mInstance; return mInstance;
} }
// 当数据库首次创建时调用onCreate方法。这个方法里调用前面定义的创建表的方法。
@Override @Override
public void onCreate(SQLiteDatabase db) { public void onCreate(SQLiteDatabase db) {
createNoteTable(db); createNoteTable(db);
createDataTable(db); createDataTable(db);
} }
// 如果数据库版本升级onUpgrade方法将被调用。
// 这个方法包含多种情况下的升级逻辑,以确保数据库结构是最新的。
@Override @Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
boolean reCreateTriggers = false; // ... 升级相关代码已省略
boolean skipV2 = false;
if (oldVersion == 1) {
upgradeToV2(db);
skipV2 = true; // this upgrade including the upgrade from v2 to v3
oldVersion++;
}
if (oldVersion == 2 && !skipV2) {
upgradeToV3(db);
reCreateTriggers = true;
oldVersion++;
}
if (oldVersion == 3) {
upgradeToV4(db);
oldVersion++;
}
if (reCreateTriggers) {
reCreateNoteTableTriggers(db);
reCreateDataTableTriggers(db);
}
if (oldVersion != newVersion) {
throw new IllegalStateException("Upgrade notes database to version " + newVersion
+ "fails");
}
} }
// 包含从数据库版本1升级到版本2的方法。
private void upgradeToV2(SQLiteDatabase db) { private void upgradeToV2(SQLiteDatabase db) {
db.execSQL("DROP TABLE IF EXISTS " + TABLE.NOTE); // ... 升级逻辑已省略
db.execSQL("DROP TABLE IF EXISTS " + TABLE.DATA);
createNoteTable(db);
createDataTable(db);
} }
// 包含从数据库版本2升级到版本3的方法。
private void upgradeToV3(SQLiteDatabase db) { private void upgradeToV3(SQLiteDatabase db) {
// drop unused triggers // ... 升级逻辑已省略
db.execSQL("DROP TRIGGER IF EXISTS update_note_modified_date_on_insert");
db.execSQL("DROP TRIGGER IF EXISTS update_note_modified_date_on_delete");
db.execSQL("DROP TRIGGER IF EXISTS update_note_modified_date_on_update");
// add a column for gtask id
db.execSQL("ALTER TABLE " + TABLE.NOTE + " ADD COLUMN " + NoteColumns.GTASK_ID
+ " TEXT NOT NULL DEFAULT ''");
// add a trash system folder
ContentValues values = new ContentValues();
values.put(NoteColumns.ID, Notes.ID_TRASH_FOLER);
values.put(NoteColumns.TYPE, Notes.TYPE_SYSTEM);
db.insert(TABLE.NOTE, null, values);
} }
// 包含从数据库版本3升级到版本4的方法。
private void upgradeToV4(SQLiteDatabase db) { private void upgradeToV4(SQLiteDatabase db) {
db.execSQL("ALTER TABLE " + TABLE.NOTE + " ADD COLUMN " + NoteColumns.VERSION // ... 升级逻辑已省略
+ " INTEGER NOT NULL DEFAULT 0");
} }
} }

Loading…
Cancel
Save