2026-11-28 00:25:22 +08:00
|
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
|
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
|
|
|
|
|
|
2026-11-28 16:31:49 +08:00
|
|
|
|
<!-- 计时在前台服务里跑,需要常驻通知;息屏后 EMUI 可能冻结进程,
|
|
|
|
|
|
到点结算靠精确闹钟唤醒兜底(Android 12+ 需要 SCHEDULE_EXACT_ALARM,
|
|
|
|
|
|
拿不到时退化为窗口闹钟)。 -->
|
2026-11-28 00:25:22 +08:00
|
|
|
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
2026-11-28 21:21:36 +08:00
|
|
|
|
<!-- specialUse:Android 14 起 dataSync 类型有 24 小时 6 小时的累计上限,
|
2026-11-29 10:05:14 +08:00
|
|
|
|
番茄钟连续衔接多轮会被强停;specialUse 没有这个限制。
|
|
|
|
|
|
但 specialUse 是 Android 14 才引入的类型,Android 12/13 不认识这个位,
|
|
|
|
|
|
startForeground 会被拒绝 → 计时冻结成负数。因此两种类型都声明:
|
|
|
|
|
|
运行时按系统版本选(<34 用 dataSync,>=34 用 specialUse)。 -->
|
|
|
|
|
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
|
2026-11-28 21:21:36 +08:00
|
|
|
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE" />
|
2026-11-28 00:25:22 +08:00
|
|
|
|
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
2026-11-29 12:50:37 +08:00
|
|
|
|
<!-- 锁屏全屏倒计时:计时中锁屏亮屏时把全屏页盖在锁屏上 -->
|
|
|
|
|
|
<uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />
|
2026-11-28 16:31:49 +08:00
|
|
|
|
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
|
2026-11-28 00:25:22 +08:00
|
|
|
|
<uses-permission android:name="android.permission.VIBRATE" />
|
|
|
|
|
|
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
|
|
|
|
|
|
|
|
|
|
|
<application
|
|
|
|
|
|
android:name=".App"
|
|
|
|
|
|
android:allowBackup="true"
|
|
|
|
|
|
android:fullBackupContent="true"
|
|
|
|
|
|
android:icon="@mipmap/ic_launcher"
|
|
|
|
|
|
android:label="@string/app_name"
|
|
|
|
|
|
android:roundIcon="@mipmap/ic_launcher"
|
|
|
|
|
|
android:supportsRtl="true"
|
|
|
|
|
|
android:theme="@style/AppTheme">
|
|
|
|
|
|
|
|
|
|
|
|
<activity
|
|
|
|
|
|
android:name=".ui.MainActivity"
|
2026-11-28 10:39:57 +08:00
|
|
|
|
android:configChanges="orientation|screenSize|keyboardHidden"
|
2026-11-28 00:25:22 +08:00
|
|
|
|
android:exported="true"
|
|
|
|
|
|
android:launchMode="singleTask"
|
|
|
|
|
|
android:screenOrientation="portrait"
|
|
|
|
|
|
android:windowSoftInputMode="adjustResize">
|
|
|
|
|
|
<intent-filter>
|
|
|
|
|
|
<action android:name="android.intent.action.MAIN" />
|
|
|
|
|
|
<category android:name="android.intent.category.LAUNCHER" />
|
|
|
|
|
|
</intent-filter>
|
|
|
|
|
|
</activity>
|
|
|
|
|
|
|
2026-11-29 12:50:37 +08:00
|
|
|
|
<activity
|
|
|
|
|
|
android:name=".ui.lockscreen.LockScreenActivity"
|
|
|
|
|
|
android:excludeFromRecents="true"
|
|
|
|
|
|
android:exported="false"
|
2026-11-29 13:54:10 +08:00
|
|
|
|
android:launchMode="singleTask"
|
2026-11-29 12:50:37 +08:00
|
|
|
|
android:showWhenLocked="true"
|
|
|
|
|
|
android:taskAffinity=""
|
2026-11-29 13:54:10 +08:00
|
|
|
|
android:theme="@style/LockScreenTheme" />
|
2026-11-29 12:50:37 +08:00
|
|
|
|
|
2026-11-28 00:25:22 +08:00
|
|
|
|
<service
|
|
|
|
|
|
android:name=".service.TimerService"
|
|
|
|
|
|
android:exported="false"
|
2026-11-29 10:05:14 +08:00
|
|
|
|
android:foregroundServiceType="dataSync|specialUse">
|
2026-11-28 21:21:36 +08:00
|
|
|
|
<!-- Android 14 要求说明 specialUse 的具体用途;旧系统忽略此声明 -->
|
|
|
|
|
|
<property
|
|
|
|
|
|
android:name="android.app.PROPERTY_SPECIAL_USE_FGS_SUBTYPE"
|
|
|
|
|
|
android:value="pomodoro_timer_countdown" />
|
|
|
|
|
|
</service>
|
2026-11-28 16:31:49 +08:00
|
|
|
|
|
|
|
|
|
|
<receiver
|
|
|
|
|
|
android:name=".service.DeadlineReceiver"
|
|
|
|
|
|
android:exported="false" />
|
2026-11-28 00:25:22 +08:00
|
|
|
|
</application>
|
|
|
|
|
|
|
|
|
|
|
|
</manifest>
|