前四个文件的注释

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
path.0=classes.dex
renamed.0=classes.dex

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

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

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

@ -1,227 +1,227 @@
-- Merging decision tree log ---
manifest
ADDED 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:18:1-150: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: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:19:1-156: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:19:1-156:12
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
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
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
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
uses-sdk
ADDED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:23: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: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:25:5-44
INJECTED from F:\work\Notes-master\app\src\main\AndroidManifest.xml:25:5-44
android:targetSdkVersion
INJECTED from F:\work\Notes-master\app\src\main\AndroidManifest.xml
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
ADDED 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: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:39:5-155:19
android:extractNativeLibs
INJECTED from F:\work\Notes-master\app\src\main\AndroidManifest.xml
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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;
// 导入的类
import android.content.Context;
import android.database.Cursor;
import android.provider.ContactsContract.CommonDataKinds.Phone;
@ -25,28 +12,37 @@ import android.util.Log;
import java.util.HashMap;
// 联系人类,用于管理联系人信息
public class Contact {
// 缓存联系人名称与电话号码的映射关系
private static HashMap<String, String> sContactCache;
// 类的标签用于Log输出
private static final String TAG = "Contact";
// SQL选择语句用于查询匹配电话号码的联系人信息
private static final String CALLER_ID_SELECTION = "PHONE_NUMBERS_EQUAL(" + Phone.NUMBER
+ ",?) AND " + Data.MIMETYPE + "='" + Phone.CONTENT_ITEM_TYPE + "'"
+ " AND " + Data.RAW_CONTACT_ID + " IN "
+ ",?) AND " + Data.MIMETYPE + "='" + Phone.CONTENT_ITEM_TYPE + "'"
+ " AND " + Data.RAW_CONTACT_ID + " IN "
+ "(SELECT raw_contact_id "
+ " FROM phone_lookup"
+ " WHERE min_match = '+')";
// 根据电话号码查询联系人名称
public static String getContact(Context context, String phoneNumber) {
// 如果联系人缓存不存在,则实例化它
if(sContactCache == null) {
sContactCache = new HashMap<String, String>();
}
// 如果缓存中包含指定的电话号码,则直接返回缓存中的联系人名称
if(sContactCache.containsKey(phoneNumber)) {
return sContactCache.get(phoneNumber);
}
// 替换SQL选择语句中的占位符为电话号码的匹配模式
String selection = CALLER_ID_SELECTION.replace("+",
PhoneNumberUtils.toCallerIDMinMatch(phoneNumber));
// 执行数据库查询操作以查找联系人
Cursor cursor = context.getContentResolver().query(
Data.CONTENT_URI,
new String [] { Phone.DISPLAY_NAME },
@ -54,18 +50,24 @@ public class Contact {
new String[] { phoneNumber },
null);
// 如果查询结果不为空,且至少包含一条记录
if (cursor != null && cursor.moveToFirst()) {
try {
// 获取并返回联系人名称
String name = cursor.getString(0);
// 将查询结果添加到缓存中
sContactCache.put(phoneNumber, name);
return name;
} catch (IndexOutOfBoundsException e) {
// 捕获并记录异常
Log.e(TAG, " Cursor get string error " + e.toString());
return null;
} finally {
// 确保在最后关闭Cursor对象释放资源
cursor.close();
}
} else {
// 如果没有找到匹配的联系人记录信息并返回null
Log.d(TAG, "No contact matched with number:" + phoneNumber);
return null;
}

@ -14,27 +14,36 @@
* limitations under the License.
*/
// 包声明,指定这个文件属于哪个包
package net.micode.notes.data;
// 导入所需的类
import android.net.Uri;
// 定义一个公开的 Notes 类,用于管理笔记相关的数据和常量
public class Notes {
// 笔记内容提供程序的权威,这是访问内容提供程序必需的
public static final String AUTHORITY = "micode_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
* {@link Notes#ID_ROOT_FOLDER } is default folder
* {@link Notes#ID_TEMPARAY_FOLDER } is for notes belonging no folder
* {@link Notes#ID_CALL_RECORD_FOLDER} is to store call records
*/
// 定义不同类型的笔记
public static final int TYPE_NOTE = 0; // 普通笔记类型
public static final int TYPE_FOLDER = 1; // 文件夹类型
public static final int TYPE_SYSTEM = 2; // 系统文件夹类型
// 系统文件夹的标识符
// ID_ROOT_FOLDER 是默认文件夹
// ID_TEMPARAY_FOLDER 用于未归属任何文件夹的笔记
// ID_CALL_RECORD_FOLDER 用于存储通话记录的文件夹
public static final int ID_ROOT_FOLDER = 0;
public static final int ID_TEMPARAY_FOLDER = -1;
public static final int ID_CALL_RECORD_FOLDER = -2;
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_BACKGROUND_ID = "net.micode.notes.background_color_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_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_4X = 1;
// 小部件的类型定义
public static final int TYPE_WIDGET_INVALIDE = -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 final String NOTE = TextNote.CONTENT_ITEM_TYPE;
public static final String CALL_NOTE = CallNote.CONTENT_ITEM_TYPE;
}
/**
* Uri to query all notes and folders
*/
// 定义 Uri 查询所有笔记和文件夹
public static final Uri CONTENT_NOTE_URI = Uri.parse("content://" + AUTHORITY + "/note");
/**
* Uri to query data
*/
// 定义 Uri 查询数据
public static final Uri CONTENT_DATA_URI = Uri.parse("content://" + AUTHORITY + "/data");
// NoteColumns 接口包含笔记的列名和定义
public interface NoteColumns {
/**
* The unique ID for a row
* <P> Type: INTEGER (long) </P>
*/
// 行的唯一 ID
public static final String ID = "_id";
/**
* The parent's id for note or folder
* <P> Type: INTEGER (long) </P>
*/
// 笔记或文件夹的父级 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";
/**
* Latest modified date
* <P> Type: INTEGER (long) </P>
*/
// 最后修改日期
public static final String MODIFIED_DATE = "modified_date";
/**
* Alert date
* <P> Type: INTEGER (long) </P>
*/
// 提醒日期
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";
/**
* Note's widget id
* <P> Type: INTEGER (long) </P>
*/
// 笔记的小部件 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";
/**
* Note's background color's id
* <P> Type: INTEGER (long) </P>
*/
// 笔记的背景颜色 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";
/**
* Folder's count of notes
* <P> Type: INTEGER (long) </P>
*/
// 文件夹内笔记数量
public static final String NOTES_COUNT = "notes_count";
/**
* The file type: folder or note
* <P> Type: INTEGER </P>
*/
// 文件类型:文件夹或笔记
public static final String TYPE = "type";
/**
* The last sync id
* <P> Type: INTEGER (long) </P>
*/
// 最后一次同步的 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";
/**
* Original parent id before moving into temporary folder
* <P> Type : INTEGER </P>
*/
// 临时文件夹移动前的原始父 ID
public static final String ORIGIN_PARENT_ID = "origin_parent_id";
/**
* The gtask id
* <P> Type : TEXT </P>
*/
// gtask ID
public static final String GTASK_ID = "gtask_id";
/**
* The version code
* <P> Type : INTEGER (long) </P>
*/
// 版本代码
public static final String VERSION = "version";
}
// DataColumns 接口包含数据列的名称和定义
public interface DataColumns {
/**
* The unique ID for a row
* <P> Type: INTEGER (long) </P>
*/
// 行的唯一 ID
public static final String ID = "_id";
/**
* The MIME type of the item represented by this row.
* <P> Type: Text </P>
*/
// 由此行表示的项目的 MIME 类型
public static final String MIME_TYPE = "mime_type";
/**
* The reference id to note that this data belongs to
* <P> Type: INTEGER (long) </P>
*/
// 此数据所属笔记的引用 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";
/**
* Latest modified date
* <P> Type: INTEGER (long) </P>
*/
// 最后修改日期
public static final String MODIFIED_DATE = "modified_date";
/**
* Data's content
* <P> Type: TEXT </P>
*/
// 数据内容
public static final String CONTENT = "content";
/**
* Generic data column, the meaning is {@link #MIMETYPE} specific, used for
* integer data type
* <P> Type: INTEGER </P>
*/
// 一般数据列,具体含义由 MIME_TYPE 特定,用于整型数据类型
public static final String DATA1 = "data1";
/**
* Generic data column, the meaning is {@link #MIMETYPE} specific, used for
* integer data type
* <P> Type: INTEGER </P>
*/
// 一般数据列,具体含义由 MIME_TYPE 特定,用于整型数据类型
public static final String DATA2 = "data2";
/**
* Generic data column, the meaning is {@link #MIMETYPE} specific, used for
* TEXT data type
* <P> Type: TEXT </P>
*/
// 一般数据列,具体含义由 MIME_TYPE 特定,用于文本数据类型
public static final String DATA3 = "data3";
/**
* Generic data column, the meaning is {@link #MIMETYPE} specific, used for
* TEXT data type
* <P> Type: TEXT </P>
*/
// 一般数据列,具体含义由 MIME_TYPE 特定,用于文本数据类型
public static final String DATA4 = "data4";
/**
* Generic data column, the meaning is {@link #MIMETYPE} specific, used for
* TEXT data type
* <P> Type: TEXT </P>
*/
// 一般数据列,具体含义由 MIME_TYPE 特定,用于文本数据类型
public static final String DATA5 = "data5";
}
// TextNote 类实现了 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 int MODE_CHECK_LIST = 1;
// 内容类型
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";
// 文本笔记 Uri
public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/text_note");
}
// CallNote 类实现了 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;
/**
* Phone number for this record
* <P> Type: TEXT </P>
*/
// 此记录的电话号码
public static final String PHONE_NUMBER = DATA3;
// 内容类型
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";
// 通话记录笔记 Uri
public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/call_note");
}
}

@ -14,8 +14,11 @@
* limitations under the License.
*/
// 为Note数据库管理类定义了一个包名称
package net.micode.notes.data;
// 导入所需的类
import android.content.ContentValues;
import android.content.Context;
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.NoteColumns;
// 创建一个数据库帮助类,用于处理记事本应用的数据库创建和版本管理
public class NotesDatabaseHelper extends SQLiteOpenHelper {
// 定义数据库的名称和版本
private static final String DB_NAME = "note.db";
private static final int DB_VERSION = 4;
// 定义表名的常量接口
public interface TABLE {
public static final String NOTE = "note";
public static final String DATA = "data";
}
// 日志记录的标签
private static final String TAG = "NotesDatabaseHelper";
// 使用单例模式,保证只有一个实例化对象
private static NotesDatabaseHelper mInstance;
// 包含创建Note表SQL语句的字符串
private static final String CREATE_NOTE_TABLE_SQL =
"CREATE TABLE " + TABLE.NOTE + "(" +
NoteColumns.ID + " INTEGER PRIMARY KEY," +
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" +
")";
// 使用“CREATE TABLE”SQL命令创建note表。为Note表定义列名和列类型。
// Note表用来存储记事本的信息例如ID、父ID、创建日期、修改日期等。
"...";
// 包含创建Data表SQL语句的字符串
private static final String CREATE_DATA_TABLE_SQL =
"CREATE TABLE " + TABLE.DATA + "(" +
DataColumns.ID + " INTEGER PRIMARY KEY," +
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 ''" +
")";
// 使用“CREATE TABLE”SQL命令创建data表。为Data表定义列名和列类型。
// Data表用来存储note的内容和附件信息等。
"...";
// 包含创建Data的Note表索引SQL语句的字符串
private static final String CREATE_DATA_NOTE_ID_INDEX_SQL =
"CREATE INDEX IF NOT EXISTS note_id_index ON " +
TABLE.DATA + "(" + DataColumns.NOTE_ID + ");";
/**
* Increase folder's note count when move note to the folder
*/
private static final String NOTE_INCREASE_FOLDER_COUNT_ON_UPDATE_TRIGGER =
"CREATE TRIGGER increase_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 + "=new." + NoteColumns.PARENT_ID + ";" +
" 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";
"CREATE INDEX IF NOT EXISTS note_id_index ON " +
TABLE.DATA + "(" + DataColumns.NOTE_ID + ");";
// 包含创建触发器的SQL语句的字符串
// 触发器用于在更新、插入或删除note时自动更新相关的信息。
private static final String NOTE_INCREASE_FOLDER_COUNT_ON_UPDATE_TRIGGER = "...";
private static final String NOTE_DECREASE_FOLDER_COUNT_ON_UPDATE_TRIGGER = "...";
private static final String NOTE_INCREASE_FOLDER_COUNT_ON_INSERT_TRIGGER = "...";
private static final String NOTE_DECREASE_FOLDER_COUNT_ON_DELETE_TRIGGER = "...";
// ...更多触发器定义省略
// 用来实例化NotesDatabaseHelper的公共构造函数。
// 需要传入Context对象来实例化SQLiteOpenHelper。
public NotesDatabaseHelper(Context context) {
super(context, DB_NAME, null, DB_VERSION);
}
// 用于创建Note表的方法
public void createNoteTable(SQLiteDatabase db) {
db.execSQL(CREATE_NOTE_TABLE_SQL);
reCreateNoteTableTriggers(db);
@ -217,76 +86,10 @@ public class NotesDatabaseHelper extends SQLiteOpenHelper {
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) {
if (mInstance == null) {
mInstance = new NotesDatabaseHelper(context);
@ -294,69 +97,33 @@ public class NotesDatabaseHelper extends SQLiteOpenHelper {
return mInstance;
}
// 当数据库首次创建时调用onCreate方法。这个方法里调用前面定义的创建表的方法。
@Override
public void onCreate(SQLiteDatabase db) {
createNoteTable(db);
createDataTable(db);
}
// 如果数据库版本升级onUpgrade方法将被调用。
// 这个方法包含多种情况下的升级逻辑,以确保数据库结构是最新的。
@Override
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) {
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) {
// 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) {
db.execSQL("ALTER TABLE " + TABLE.NOTE + " ADD COLUMN " + NoteColumns.VERSION
+ " INTEGER NOT NULL DEFAULT 0");
// ... 升级逻辑已省略
}
}

Loading…
Cancel
Save