pull/1/head
ganshihao 12 months ago
parent b786fb3177
commit 8b2e24e6ee

@ -1,9 +0,0 @@
# generated files
bin/
gen/
# Local configuration file (sdk path, etc)
project.properties
.settings/
.classpath
.project

@ -1,190 +0,0 @@
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.
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.
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS

@ -1,23 +0,0 @@
[中文]
1. MiCode便签是小米便签的社区开源版由MIUI团队(www.miui.com) 发起并贡献第一批代码遵循NOTICE文件所描述的开源协议
今后为MiCode社区(www.micode.net) 拥有,并由社区发布和维护。
2. Bug反馈和跟踪请访问Github,
https://github.com/MiCode/Notes/issues?sort=created&direction=desc&state=open
3. 功能建议和综合讨论请访问MiCode,
http://micode.net/forum.php?mod=forumdisplay&fid=38
[English]
1. MiCode Notes is open source edition of XM notepad, it's first initiated and sponsored by MIUI team (www.miui.com).
It's opened under license described by NOTICE file. It's owned by the MiCode community (www.micode.net). In future,
the MiCode community will release and maintain this project.
2. Regarding issue tracking, please visit Github,
https://github.com/MiCode/Notes/issues?sort=created&direction=desc&state=open
3. Regarding feature request and general discussion, please visit Micode forum,
http://micode.net/forum.php?mod=forumdisplay&fid=38

@ -0,0 +1,20 @@
{
"version": 3,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "net.micode.notes.test",
"variantName": "debugAndroidTest",
"elements": [
{
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 0,
"versionName": "",
"outputFile": "app-debug-androidTest.apk"
}
],
"elementType": "File"
}

@ -0,0 +1,20 @@
{
"version": 3,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "net.micode.notes",
"variantName": "debug",
"elements": [
{
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 1,
"versionName": "0.1",
"outputFile": "app-debug.apk"
}
],
"elementType": "File"
}

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

@ -16,7 +16,6 @@
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="net.micode.notes"
android:versionCode="1"
android:versionName="0.1" >
@ -42,8 +41,8 @@
android:launchMode="singleTop"
android:theme="@style/NoteTheme"
android:uiOptions="splitActionBarWhenNarrow"
android:windowSoftInputMode="adjustPan" >
android:windowSoftInputMode="adjustPan"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
@ -54,15 +53,16 @@
android:name=".ui.NoteEditActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:launchMode="singleTop"
android:theme="@style/NoteTheme" >
android:theme="@style/NoteTheme"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="vnd.android.cursor.item/text_note" />
<data android:mimeType="vnd.android.cursor.item/call_note" />
<data android:mimeType="vnd.android.cursor.item/text_note" android:scheme="content" android:host="com.example.notes.provider" android:path="/notes" />
<data android:mimeType="vnd.android.cursor.item/call_note" android:scheme="content" android:host="com.example.notes.provider" android:path="/notes" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.INSERT_OR_EDIT" />
<category android:name="android.intent.category.DEFAULT" />
@ -87,7 +87,8 @@
<receiver
android:name=".widget.NoteWidgetProvider_2x"
android:label="@string/app_widget2x2" >
android:label="@string/app_widget2x2"
android:exported="false">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
<action android:name="android.appwidget.action.APPWIDGET_DELETED" />
@ -100,7 +101,8 @@
</receiver>
<receiver
android:name=".widget.NoteWidgetProvider_4x"
android:label="@string/app_widget4x4" >
android:label="@string/app_widget4x4"
android:exported="false">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
@ -113,7 +115,7 @@
android:resource="@xml/widget_4x_info" />
</receiver>
<receiver android:name=".ui.AlarmInitReceiver" >
<receiver android:name=".ui.AlarmInitReceiver" android:exported="false">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>

@ -13,21 +13,23 @@
* 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;
import android.provider.ContactsContract.Data;
import android.telephony.PhoneNumberUtils;
import android.util.Log;
import android.content.Context;//引入context类用于提供全局信息环境
import android.database.Cursor;//引入cursor类表示数据库的结果集
import android.provider.ContactsContract.CommonDataKinds.Phone;//引入其中的Phone子类包含了关于联系人电话号码的常量定义
import android.provider.ContactsContract.Data;//引入ContactsContract类中的Data类用于访问设备上的联系人数据
import android.telephony.PhoneNumberUtils;//引入PhoneNumberUtils类提供电话号码处理的实用方法
import android.util.Log;//引入Log类它提供在代码中打印日志信息的方法
import java.util.HashMap;
//用于实现根据给定的手机号码获取对应的联系人姓名
public class Contact {
private static HashMap<String, String> sContactCache;
private static final String TAG = "Contact";
private static HashMap<String, String> sContactCache;//用于缓存已查询的联系人信息,键是手机号码,值是对应的联系人姓名
private static final String TAG = "Contact";//定义一个常量,用于在日志中打印标签
private static final String CALLER_ID_SELECTION = "PHONE_NUMBERS_EQUAL(" + Phone.NUMBER
+ ",?) AND " + Data.MIMETYPE + "='" + Phone.CONTENT_ITEM_TYPE + "'"
@ -36,11 +38,11 @@ public class Contact {
+ " FROM phone_lookup"
+ " WHERE min_match = '+')";
public static String getContact(Context context, String phoneNumber) {
if(sContactCache == null) {
public static String getContact(Context context, String phoneNumber) { //用于根据给定的电话号码查询联系人
if(sContactCache == null) { // 如果sContactCache为空则创建一个新的HashMap对象
sContactCache = new HashMap<String, String>();
}
// 如果sContactCache中已经包含了phoneNumber对应的联系人姓名则直接返回缓存中的姓名
if(sContactCache.containsKey(phoneNumber)) {
return sContactCache.get(phoneNumber);
}
@ -53,7 +55,7 @@ public class Contact {
selection,
new String[] { phoneNumber },
null);
// 如果查询结果不为空同时在移动到第一条记录的情况下将从Cursor中获取联系人姓名
if (cursor != null && cursor.moveToFirst()) {
try {
String name = cursor.getString(0);
@ -66,6 +68,7 @@ public class Contact {
cursor.close();
}
} else {
// 如果查询结果为空打印日志并返回null表示没有找到匹配的联系人
Log.d(TAG, "No contact matched with number:" + phoneNumber);
return null;
}

@ -1,25 +1,13 @@
/*
* 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.ContentUris;
import android.net.Uri;
// Notes 类中定义了很多常量这些常量大多是int型和string型
public class Notes {
public static final String AUTHORITY = "micode_notes";
public static final String TAG = "Notes";
//以下三个常量对NoteColumns.TYPE的值进行设置时会用到
public static final int TYPE_NOTE = 0;
public static final int TYPE_FOLDER = 1;
public static final int TYPE_SYSTEM = 2;
@ -35,12 +23,24 @@ public class Notes {
public static final int ID_CALL_RECORD_FOLDER = -2;
public static final int ID_TRASH_FOLER = -3;
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";
public static final String INTENT_EXTRA_WIDGET_TYPE = "net.micode.notes.widget_type";
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_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";
public static final String INTENT_EXTRA_WIDGET_TYPE =
"net.micode.notes.widget_type";
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;
@ -54,13 +54,20 @@ public class Notes {
/**
* 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");//定义查询便签和文件夹的指针。
// public static final Uri my_URI = ContentUris.withAppendedId(Notes.CONTENT_NOTE_URI , 10);
/**
* 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 {
/**
* The unique ID for a row
@ -72,7 +79,7 @@ public class Notes {
* 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";//为什么会有parent_id
/**
* Created data for note or folder
@ -140,7 +147,7 @@ public class Notes {
* 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
@ -165,8 +172,9 @@ public class Notes {
* <P> Type : INTEGER (long) </P>
*/
public static final String VERSION = "version";
}
}//这些常量主要是定义便签的属性的。
// 定义DataColumns的常量,用于后面创建数据库的表头
public interface DataColumns {
/**
* The unique ID for a row
@ -206,41 +214,45 @@ public class Notes {
/**
* Generic data column, the meaning is {@link #MIMETYPE} specific, used for
* Generic data column, the meaning is {@link #MIMETYPE} specific,
used for
* integer data type
* <P> Type: INTEGER </P>
*/
public static final String DATA1 = "data1";
/**
* Generic data column, the meaning is {@link #MIMETYPE} specific, used for
* Generic data column, the meaning is {@link #MIMETYPE} specific,
used for
* integer data type
* <P> Type: INTEGER </P>
*/
public static final String DATA2 = "data2";
/**
* Generic data column, the meaning is {@link #MIMETYPE} specific, used for
* Generic data column, the meaning is {@link #MIMETYPE} specific,
used for
* TEXT data type
* <P> Type: TEXT </P>
*/
public static final String DATA3 = "data3";
/**
* Generic data column, the meaning is {@link #MIMETYPE} specific, used for
* Generic data column, the meaning is {@link #MIMETYPE} specific,
used for
* TEXT data type
* <P> Type: TEXT </P>
*/
public static final String DATA4 = "data4";
/**
* Generic data column, the meaning is {@link #MIMETYPE} specific, used for
* 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 class TextNote implements DataColumns {
/**
* Mode to indicate the text in check list mode or not
@ -250,12 +262,18 @@ public class Notes {
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 =
public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/text_note";
"vnd.android.cursor.dir/text_note";
public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/text_note");
}
public static final String CONTENT_ITEM_TYPE =
"vnd.android.cursor.item/text_note";
public static final Uri CONTENT_URI = Uri.parse("content://" +
AUTHORITY + "/text_note");
}//文本内容的数据结构
public static final class CallNote implements DataColumns {
/**
@ -270,10 +288,16 @@ public class Notes {
*/
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 =
public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/call_note";
"vnd.android.cursor.dir/call_note";
public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/call_note");
}
}
public static final String CONTENT_ITEM_TYPE =
"vnd.android.cursor.item/call_note";
public static final Uri CONTENT_URI = Uri.parse("content://" +
AUTHORITY + "/call_note");
}//电话内容的数据结构
}

@ -77,9 +77,11 @@ public class GTaskASyncTask extends AsyncTask<Void, String, Integer> {
pendingIntent = PendingIntent.getActivity(mContext, 0, new Intent(mContext,
NotesListActivity.class), 0);
}
notification.setLatestEventInfo(mContext, mContext.getString(R.string.app_name), content,
pendingIntent);
// notification.setLatestEventInfo(mContext, mContext.getString(R.string.app_name), content,
// pendingIntent);
notification.contentIntent = pendingIntent;
mNotifiManager.notify(GTASK_SYNC_NOTIFICATION_ID, notification);
}
@Override

@ -34,10 +34,10 @@ import net.micode.notes.ui.NotesListAdapter.AppWidgetAttribute;
import java.util.ArrayList;
import java.util.HashSet;
//数据处理的函数
public class DataUtils {
public static final String TAG = "DataUtils";
public static boolean batchDeleteNotes(ContentResolver resolver, HashSet<Long> ids) {
public static boolean batchDeleteNotes(ContentResolver resolver, HashSet<Long> ids) {//批量删除笔记
if (ids == null) {
Log.d(TAG, "the ids is null");
return true;
@ -72,7 +72,7 @@ public class DataUtils {
return false;
}
public static void moveNoteToFoler(ContentResolver resolver, long id, long srcFolderId, long desFolderId) {
public static void moveNoteToFoler(ContentResolver resolver, long id, long srcFolderId, long desFolderId) {//将笔记移动到指定文件夹。给定笔记的ID、源文件夹ID和目标文件夹ID通过ContentValues设置新的父文件夹ID和原始父文件夹ID然后调用ContentResolver的update方法更新笔记
ContentValues values = new ContentValues();
values.put(NoteColumns.PARENT_ID, desFolderId);
values.put(NoteColumns.ORIGIN_PARENT_ID, srcFolderId);
@ -80,7 +80,7 @@ public class DataUtils {
resolver.update(ContentUris.withAppendedId(Notes.CONTENT_NOTE_URI, id), values, null, null);
}
public static boolean batchMoveToFolder(ContentResolver resolver, HashSet<Long> ids,
public static boolean batchMoveToFolder(ContentResolver resolver, HashSet<Long> ids,//批量移动笔记到指定文件夹
long folderId) {
if (ids == null) {
Log.d(TAG, "the ids is null");
@ -114,7 +114,7 @@ public class DataUtils {
/**
* Get the all folder count except system folders {@link Notes#TYPE_SYSTEM}}
*/
public static int getUserFolderCount(ContentResolver resolver) {
public static int getUserFolderCount(ContentResolver resolver) {//获取用户文件夹的数量
Cursor cursor =resolver.query(Notes.CONTENT_NOTE_URI,
new String[] { "COUNT(*)" },
NoteColumns.TYPE + "=? AND " + NoteColumns.PARENT_ID + "<>?",
@ -135,7 +135,7 @@ public class DataUtils {
}
return count;
}
//检查笔记是否在数据库中可见
public static boolean visibleInNoteDatabase(ContentResolver resolver, long noteId, int type) {
Cursor cursor = resolver.query(ContentUris.withAppendedId(Notes.CONTENT_NOTE_URI, noteId),
null,
@ -152,7 +152,7 @@ public class DataUtils {
}
return exist;
}
//检查笔记是否存在于数据库中
public static boolean existInNoteDatabase(ContentResolver resolver, long noteId) {
Cursor cursor = resolver.query(ContentUris.withAppendedId(Notes.CONTENT_NOTE_URI, noteId),
null, null, null, null);
@ -166,7 +166,7 @@ public class DataUtils {
}
return exist;
}
//作用同上
public static boolean existInDataDatabase(ContentResolver resolver, long dataId) {
Cursor cursor = resolver.query(ContentUris.withAppendedId(Notes.CONTENT_DATA_URI, dataId),
null, null, null, null);
@ -180,7 +180,7 @@ public class DataUtils {
}
return exist;
}
//检查可见文件夹名称是否已存在
public static boolean checkVisibleFolderName(ContentResolver resolver, String name) {
Cursor cursor = resolver.query(Notes.CONTENT_NOTE_URI, null,
NoteColumns.TYPE + "=" + Notes.TYPE_FOLDER +
@ -223,7 +223,7 @@ public class DataUtils {
}
return set;
}
//根据笔记ID获取通话号码
public static String getCallNumberByNoteId(ContentResolver resolver, long noteId) {
Cursor cursor = resolver.query(Notes.CONTENT_DATA_URI,
new String [] { CallNote.PHONE_NUMBER },
@ -242,7 +242,7 @@ public class DataUtils {
}
return "";
}
//根据电话号码和通话日期获取笔记ID
public static long getNoteIdByPhoneNumberAndCallDate(ContentResolver resolver, String phoneNumber, long callDate) {
Cursor cursor = resolver.query(Notes.CONTENT_DATA_URI,
new String [] { CallNote.NOTE_ID },
@ -263,7 +263,7 @@ public class DataUtils {
}
return 0;
}
//根据笔记ID获取摘要内容
public static String getSnippetById(ContentResolver resolver, long noteId) {
Cursor cursor = resolver.query(Notes.CONTENT_NOTE_URI,
new String [] { NoteColumns.SNIPPET },
@ -281,7 +281,7 @@ public class DataUtils {
}
throw new IllegalArgumentException("Note is not found with id: " + noteId);
}
//格式化摘要内容
public static String getFormattedSnippet(String snippet) {
if (snippet != null) {
snippet = snippet.trim();

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save