You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
git/AndroidManifest.xml

259 lines
11 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<?xml version="1.0" encoding="utf-8"?>
<!--
AndroidManifest.xml - Android应用清单文件
此文件定义了应用的基本信息、组件、权限等核心配置
version="1.0" - XML版本
encoding="utf-8" - 文件编码格式
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<!--
manifest - 根元素,定义应用的包名、版本等元数据
xmlns:android - Android命名空间用于访问Android系统属性
xmlns:tools - 工具命名空间,用于开发工具的特殊处理
-->
<!-- ======================= 权限声明区域 ======================= -->
<!-- 这一部分列出了应用需要的所有系统权限,安装时会向用户请求 -->
<!-- 写入外部存储权限 - 允许应用保存文件到设备存储 -->
<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" />
<!-- 读取联系人权限 - 允许应用访问设备联系人 -->
<uses-permission android:name="android.permission.READ_CONTACTS" />
<!-- 管理账户权限 - 允许应用管理账户(添加/删除账户等) -->
<!-- tools:ignore="Deprecated" - 忽略此权限已被弃用的警告 -->
<uses-permission
android:name="android.permission.MANAGE_ACCOUNTS"
tools:ignore="Deprecated" />
<!-- 验证账户权限 - 允许应用验证账户凭据 -->
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
<!-- 获取账户权限 - 允许应用读取设备上的账户列表 -->
<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:icon - 应用图标,显示在桌面和应用列表中,支持不同分辨率需提供多套资源
android:label - 应用名称,引用字符串资源
android:allowBackup - 是否允许系统备份应用数据
android:supportsRtl - 是否支持从右到左的布局(如阿拉伯语)
android:theme - 应用主题样式
tools:replace - 指定要替换的属性(用于解决与其他应用的冲突)
-->
<application
android:icon="@drawable/icon_app"
android:label="@string/app_name"
android:allowBackup="true"
android:supportsRtl="true"
android:theme="@style/NoteTheme"
tools:replace="android:icon,android:theme">
<!-- ======================= Activity组件 ======================= -->
<!-- 主Activity - 便签列表界面 -->
<!--
android:name - Activity类名.表示相对路径)
android:configChanges - 指定配置变化时由应用自己处理
android:label - Activity标题
android:launchMode - 启动模式singleTop栈顶复用
android:uiOptions - 界面选项splitActionBarWhenNarrow窄屏时拆分操作栏
android:windowSoftInputMode - 软键盘显示模式adjustPan调整面板
android:exported - 是否允许外部应用调用true表示允许
-->
<activity
android:name=".ui.NotesListActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/app_name"
android:launchMode="singleTop"
android:theme="@style/NoteTheme"
android:uiOptions="splitActionBarWhenNarrow"
android:windowSoftInputMode="adjustPan"
android:exported="true">
<!-- intent-filter - 意图过滤器定义Activity能响应的操作 -->
<intent-filter>
<!-- 主入口点应用启动时第一个显示的Activity -->
<action android:name="android.intent.action.MAIN" />
<!-- 启动器类别,会在应用列表中显示 -->
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- 编辑Activity - 便签编辑界面 -->
<activity
android:name=".ui.NoteEditActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:launchMode="singleTop"
android:theme="@style/NoteTheme"
android:exported="true">
<!-- 第一个intent-filter查看便签 -->
<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" />
</intent-filter>
<!-- 第二个intent-filter插入或编辑便签 -->
<intent-filter>
<action android:name="android.intent.action.INSERT_OR_EDIT" />
<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" />
</intent-filter>
<!-- 第三个intent-filter搜索功能 -->
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<!-- 搜索配置元数据 -->
<meta-data
android:name="android.app.searchable"
android:resource="@xml/searchable" />
</activity>
<!-- ======================= Content Provider组件 ======================= -->
<!-- 数据提供者 - 管理便签数据 -->
<!--
android:name - Provider类名
android:authorities - 内容URI的授权标识
android:multiprocess - 是否支持多进程
android:exported - 是否允许外部应用访问false表示不允许
tools:replace - 替换authorities属性
-->
<provider
android:name="net.micode.notes.data.NotesProvider"
android:authorities="micode_notes"
android:multiprocess="true"
android:exported="false"
tools:replace="android:authorities" />
<!-- ======================= Broadcast Receiver组件 ======================= -->
<!-- 2x2桌面小部件接收器 -->
<!--
android:name - Receiver类名
android:label - 小部件名称
android:exported - 是否允许外部应用调用
-->
<receiver
android:name=".widget.NoteWidgetProvider_2x"
android:label="@string/app_widget2x2"
android:exported="true"
tools:replace="android:label">
<!-- 小部件相关广播过滤器 -->
<intent-filter>
<!-- 小部件更新 -->
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
<!-- 小部件删除 -->
<action android:name="android.appwidget.action.APPWIDGET_DELETED" />
<!-- 隐私模式变更 -->
<action android:name="android.intent.action.PRIVACY_MODE_CHANGED" />
</intent-filter>
<!-- 小部件配置元数据 -->
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/widget_2x_info" />
</receiver>
<!-- 4x4桌面小部件接收器 -->
<receiver
android:name=".widget.NoteWidgetProvider_4x"
android:label="@string/app_widget4x4"
android:exported="true"
tools:replace="android:label">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
<action android:name="android.appwidget.action.APPWIDGET_DELETED" />
<action android:name="android.intent.action.PRIVACY_MODE_CHANGED" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/widget_4x_info" />
</receiver>
<!-- 闹钟初始化接收器 - 接收开机启动完成广播 -->
<receiver
android:name=".ui.AlarmInitReceiver"
android:exported="true">
<intent-filter>
<!-- 系统启动完成广播 -->
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<!-- 闹钟接收器 - 处理闹钟提醒 -->
<!--
android:process=":remote" - 在独立进程中运行
避免主进程被杀死时无法接收闹钟
-->
<receiver
android:name="net.micode.notes.ui.AlarmReceiver"
android:process=":remote" />
<!-- ======================= 其他Activity组件 ======================= -->
<!-- 闹钟提醒Activity - 显示闹钟提醒界面 -->
<!--
android:launchMode="singleInstance" - 独立任务栈启动
android:theme - 使用系统主题(无标题栏壁纸主题)
-->
<activity
android:name=".ui.AlarmAlertActivity"
android:label="@string/app_name"
android:launchMode="singleInstance"
android:theme="@android:style/Theme.Holo.Wallpaper.NoTitleBar"
tools:replace="android:theme" />
<!-- 设置Activity - 应用偏好设置界面 -->
<activity
android:name="net.micode.notes.ui.NotesPreferenceActivity"
android:label="@string/preferences_title"
android:launchMode="singleTop"
android:theme="@style/NoteTheme"
tools:replace="android:theme" />
<!-- ======================= Service组件 ======================= -->
<!-- 同步服务 - 处理Google任务同步 -->
<!--
android:exported="false" - 不允许外部应用绑定此服务
这是应用内部使用的同步服务
-->
<service
android:name="net.micode.notes.gtask.remote.GTaskSyncService"
android:exported="false" />
<!-- ======================= 应用级元数据 ======================= -->
<!-- 默认搜索Activity配置 -->
<!--
指定应用默认的搜索Activity
当用户执行搜索操作时会启动此Activity
-->
<meta-data
android:name="android.app.default_searchable"
android:value=".ui.NoteEditActivity" />
</application>
</manifest>