{"content":"Command: SRC=~/WorkBuddy/2026-10-23-15-17-57/cleanyourtv/launcher/app/src/main/java/com/gathin/tvhome\necho \"=== 检查 API 24+ 的常见调用 ===\"\ngrep -rn -E \"startForegroundService|NotificationChannel|ShortcutManager|JobScheduler|getSystemService\\((ConnectivityManager|AlarmManager|NotificationManager)\\.class\\)|setImportantForAutofill|registerReceiver\\([^,]+,\\s*[^,]+,\\s*RECEIVER|requestPinAppWidget|setShowWhenLocked|setLaunchDisplayId\" $SRC | head -20\necho \"=== AndroidManifest ===\"\ncat ~/WorkBuddy/2026-10-23-15-17-57/cleanyourtv/launcher/app/src/main/AndroidManifest.xml\nStdout: === 检查 API 24+ 的常见调用 ===\r\n/Users/nickchen/WorkBuddy/2026-10-23-15-17-57/cleanyourtv/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java:707:        ConnectivityManager cm = getSystemService(ConnectivityManager.class);\r\n/Users/nickchen/WorkBuddy/2026-10-23-15-17-57/cleanyourtv/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java:1089:        ConnectivityManager cm = getSystemService(ConnectivityManager.class);\r\n=== AndroidManifest ===\r\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\r\n    xmlns:tools=\"http://schemas.android.com/tools\">\r\n\r\n    <uses-feature android:name=\"android.software.leanback\" android:required=\"false\" />\r\n    <uses-feature android:name=\"android.hardware.touchscreen\" android:required=\"false\" />\r\n    <uses-feature android:name=\"android.hardware.wifi\" android:required=\"false\" />\r\n    <uses-feature android:name=\"android.hardware.location.gps\" android:required=\"false\" />\r\n\r\n    <uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\" />\r\n    <uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\" />\r\n    <!-- Needed since Android 10 to read the Wi-Fi network name for the network pill. Never requested at\r\n         runtime: build-and-install grants it with pm grant, so lint's Android 12 \"ask for COARSE with\r\n         FINE\" rule does not apply here. -->\r\n    <uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"\r\n        tools:ignore=\"CoarseFineLocation\" />\r\n    <!-- Puts the remote's accessibility helpers back after a force stop of this app took them off the enabled\r\n         list (ServiceRepair). Granted with pm grant by build-and-install when a helper is enabled. -->\r\n    <uses-permission android:name=\"android.permission.WRITE_SECURE_SETTINGS\"\r\n        tools:ignore=\"ProtectedPermissions\" />\r\n    <!-- YaOS (Yandex TV OS): HDMI, AV and the tuner all play in com.yandex.tv.live, whose activities require\r\n         this permission (protection level normal, so it is granted at install). Ignored on other TVs. -->\r\n    <uses-permission android:name=\"yandex.tv.permission.ACCESS_TV_SOURCE\" />\r\n\r\n    <!-- Android 11+ package visibility: lets the launcher list the TV apps it shows as tiles, and the\r\n         apps that declare a module card (docs/specs/card.md). -->\r\n    <queries>\r\n        <!-- The standard settings handlers, so package visibility doesn't hide them and send the pills to a vendor fallback by mistake. -->\r\n        <intent>\r\n            <action android:name=\"android.settings.SETTINGS\" />\r\n        </intent>\r\n        <intent>\r\n            <action android:name=\"android.settings.WIFI_SETTINGS\" />\r\n        </intent>\r\n        <intent>\r\n            <action android:name=\"android.settings.DISPLAY_SETTINGS\" />\r\n        </intent>\r\n        <intent>\r\n            <action android:name=\"android.settings.MANAGE_APPLICATIONS_SETTINGS\" />\r\n        </intent>\r\n        <intent>\r\n            <action android:name=\"android.intent.action.MAIN\" />\r\n            <category android:name=\"android.intent.category.LAUNCHER\" />\r\n        </intent>\r\n        <intent>\r\n            <action android:name=\"android.intent.action.MAIN\" />\r\n            <category android:name=\"android.intent.category.LEANBACK_LAUNCHER\" />\r\n        </intent>\r\n        <intent>\r\n            <action android:name=\"android.intent.action.MAIN\" />\r\n            <category android:name=\"com.gathin.tvhome.category.DOCK_CARD\" />\r\n        </intent>\r\n        <!-- stock_home_redirect: HomeKeyService looks up the stock launcher's HOME activity. -->\r\n        <intent>\r\n            <action android:name=\"android.intent.action.MAIN\" />\r\n            <category android:name=\"android.intent.category.HOME\" />\r\n        </intent>\r\n        <!-- China-market MIUI TV firmware: the Settings and Wi-Fi pills fall back to Xiaomi's settings app.\r\n             Fire TV: the real settings menu lives in the stock launcher (see settings_fallback_components). -->\r\n        <package android:name=\"com.xiaomi.mitv.settings\" />\r\n        <package android:name=\"com.tcl.settings\" />\r\n        <package android:name=\"com.amazon.tv.launcher\" />\r\n        <!-- Coocaa OS sources for the Inputs menu (coocaa_sources); see CoocaaSources. -->\r\n        <provider android:authorities=\"com.skyworth.tv.provider\" />\r\n        <provider android:authorities=\"com.skyworth.tv.sdk.provider\" />\r\n    </queries>\r\n\r\n    <application\r\n        android:label=\"@string/app_name\"\r\n        android:icon=\"@mipmap/ic_launcher\"\r\n        android:banner=\"@drawable/banner\"\r\n        android:theme=\"@style/Theme.TvHome\"\r\n        android:allowBackup=\"false\"\r\n        android:localeConfig=\"@xml/locales_config\">\r\n\r\n        <activity\r\n            android:name=\".MainActivity\"\r\n            android:exported=\"true\"\r\n            android:launchMode=\"singleTask\"\r\n            android:stateNotNeeded=\"true\"\r\n            android:excludeFromRecents=\"true\"\r\n            android:clearTaskOnLaunch=\"true\"\r\n            android:configChanges=\"orientation|screenSize|keyboard|keyboardHidden|uiMode\"\r\n            android:screenOrientation=\"landscape\">\r\n            <intent-filter>\r\n                <action android:name=\"android.intent.action.MAIN\" />\r\n                <category android:name=\"android.intent.category.HOME\" />\r\n                <category android:name=\"android.intent.category.DEFAULT\" />\r\n            </intent-filter>\r\n            <!-- Listed in the TV's own app list, so it can be opened from the stock home screen too. -->\r\n            <intent-filter>\r\n                <action android:name=\"android.intent.action.MAIN\" />\r\n                <category android:name=\"android.intent.category.LEANBACK_LAUNCHER\" />\r\n            </intent-filter>\r\n        </activity>\r\n\r\n        <activity\r\n            android:name=\".LauncherSettingsActivity\"\r\n            android:exported=\"false\"\r\n            android:excludeFromRecents=\"true\"\r\n            android:screenOrientation=\"landscape\" />\r\n        <!-- The system input switcher (com.android.tv.action.VIEW_INPUTS), which is what the remote's Input\r\n             button becomes through the TV's Live TV app or InputKeyService. Disabled here and switched on by\r\n             MainActivity only while handle_view_inputs is true (config.xml or a theme), for sets whose stock\r\n             launcher was the only handler of the action (Hisense huangshan, Android TV 10): kept off, a TV with\r\n             its own input picker never sees a second candidate and a chooser. -->\r\n        <activity\r\n            android:name=\".InputsRequestActivity\"\r\n            android:exported=\"true\"\r\n            android:enabled=\"false\"\r\n            android:excludeFromRecents=\"true\"\r\n            android:noHistory=\"true\"\r\n            android:theme=\"@android:style/Theme.NoDisplay\">\r\n            <intent-filter>\r\n                <action android:name=\"com.android.tv.action.VIEW_INPUTS\" />\r\n                <category android:name=\"android.intent.category.DEFAULT\" />\r\n            </intent-filter>\r\n        </activity>\r\n        <!-- Remote Settings button panel (settings_key_panel); own task so the app behind stays put. -->\r\n        <activity\r\n            android:name=\".QuickSettingsActivity\"\r\n            android:exported=\"false\"\r\n            android:taskAffinity=\"\"\r\n            android:launchMode=\"singleTop\"\r\n            android:excludeFromRecents=\"true\"\r\n            android:noHistory=\"true\"\r\n            android:screenOrientation=\"landscape\"\r\n            android:theme=\"@android:style/Theme.Translucent.NoTitleBar.Fullscreen\" />\r\n        <activity\r\n            android:name=\".HomeSettingsActivity\"\r\n            android:exported=\"false\"\r\n            android:taskAffinity=\"\"\r\n            android:excludeFromRecents=\"true\"\r\n            android:theme=\"@android:style/Theme.NoDisplay\" />\r\n        <!-- Home button for remotes that send KEYCODE_ALL_APPS (Xiaomi). Opt-in: HOME_KEY_SERVICE=1\r\n             build-and-install.sh; see HomeKeyService. -->\r\n        <service\r\n            android:name=\".HomeKeyService\"\r\n            android:label=\"@string/home_key_name\"\r\n            android:directBootAware=\"true\"\r\n            android:exported=\"true\"\r\n            android:permission=\"android.permission.BIND_ACCESSIBILITY_SERVICE\">\r\n            <intent-filter>\r\n                <action android:name=\"android.accessibilityservice.AccessibilityService\" />\r\n            </intent-filter>\r\n            <meta-data\r\n                android:name=\"android.accessibilityservice\"\r\n                android:resource=\"@xml/home_key_service\" />\r\n        </service>\r\n\r\n        <!-- The same clock, started by Home itself after home_idle_clock_minutes without input. -->\r\n        <activity\r\n            android:name=\".ClockActivity\"\r\n            android:exported=\"false\"\r\r\n            android:excludeFromRecents=\"true\"\r\n            android:noHistory=\"true\"\r\n            android:theme=\"@android:style/Theme.Black.NoTitleBar.Fullscreen\" />\r\n\r\n        <!-- Screensaver: pick it in Settings, or `settings put secure screensaver_components\r\n             com.gathin.tvhome/.ClockDream` over adb. -->\r\n        <service\r\n            android:name=\".ClockDream\"\r\n            android:label=\"@string/dream_name\"\r\n            android:exported=\"true\"\r\n            android:permission=\"android.permission.BIND_DREAM_SERVICE\">\r\n            <intent-filter>\r\n                <action android:name=\"android.service.dreams.DreamService\" />\r\n                <category android:name=\"android.intent.category.DEFAULT\" />\r\n            </intent-filter>\r\n        </service>\r\n\r\n        <!-- tools/theme.sh writes the theme through this where the shell can't reach Android/data;\r\n             see ThemeProvider. WRITE_SECURE_SETTINGS: the adb shell has it, ordinary apps don't. -->\r\n        <provider\r\n            android:name=\".ThemeProvider\"\r\n            android:authorities=\"${applicationId}.theme\"\r\n            android:exported=\"true\"\r\n            android:permission=\"android.permission.WRITE_SECURE_SETTINGS\" />\r\n\r\n        <!-- The remote's Input button (KEYCODE_TV or KEYCODE_TV_INPUT) opens the input switcher, and input_key_keycodes and\r\n         app_keys (config.xml or a theme) bring back other remote buttons; see InputKeyService. -->\r\n        <service\r\n            android:name=\".InputKeyService\"\r\n            android:exported=\"false\"\r\n            android:label=\"@string/app_name\"\r\n            android:permission=\"android.permission.BIND_ACCESSIBILITY_SERVICE\">\r\n            <intent-filter>\r\n                <action android:name=\"android.accessibilityservice.AccessibilityService\" />\r\n            </intent-filter>\r\n            <meta-data\r\n                android:name=\"android.accessibilityservice\"\r\n                android:resource=\"@xml/input_key_service\" />\r\n        </service>\r\n    </application>\r\n</manifest>\r\n\nStderr: (empty)\nExit Code: 0\nSignal: (none)","renderer":{"type":"text","value":"=== 检查 API 24+ 的常见调用 ===\r\n/Users/nickchen/WorkBuddy/2026-10-23-15-17-57/cleanyourtv/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java:707:        ConnectivityManager cm = getSystemService(ConnectivityManager.class);\r\n/Users/nickchen/WorkBuddy/2026-10-23-15-17-57/cleanyourtv/launcher/app/src/main/java/com/gathin/tvhome/MainActivity.java:1089:        ConnectivityManager cm = getSystemService(ConnectivityManager.class);\r\n=== AndroidManifest ===\r\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\r\n    xmlns:tools=\"http://schemas.android.com/tools\">\r\n\r\n    <uses-feature android:name=\"android.software.leanback\" android:required=\"false\" />\r\n    <uses-feature android:name=\"android.hardware.touchscreen\" android:required=\"false\" />\r\n    <uses-feature android:name=\"android.hardware.wifi\" android:required=\"false\" />\r\n    <uses-feature android:name=\"android.hardware.location.gps\" android:required=\"false\" />\r\n\r\n    <uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\" />\r\n    <uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\" />\r\n    <!-- Needed since Android 10 to read the Wi-Fi network name for the network pill. Never requested at\r\n         runtime: build-and-install grants it with pm grant, so lint's Android 12 \"ask for COARSE with\r\n         FINE\" rule does not apply here. -->\r\n    <uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"\r\n        tools:ignore=\"CoarseFineLocation\" />\r\n    <!-- Puts the remote's accessibility helpers back after a force stop of this app took them off the enabled\r\n         list (ServiceRepair). Granted with pm grant by build-and-install when a helper is enabled. -->\r\n    <uses-permission android:name=\"android.permission.WRITE_SECURE_SETTINGS\"\r\n        tools:ignore=\"ProtectedPermissions\" />\r\n    <!-- YaOS (Yandex TV OS): HDMI, AV and the tuner all play in com.yandex.tv.live, whose activities require\r\n         this permission (protection level normal, so it is granted at install). Ignored on other TVs. -->\r\n    <uses-permission android:name=\"yandex.tv.permission.ACCESS_TV_SOURCE\" />\r\n\r\n    <!-- Android 11+ package visibility: lets the launcher list the TV apps it shows as tiles, and the\r\n         apps that declare a module card (docs/specs/card.md). -->\r\n    <queries>\r\n        <!-- The standard settings handlers, so package visibility doesn't hide them and send the pills to a vendor fallback by mistake. -->\r\n        <intent>\r\n            <action android:name=\"android.settings.SETTINGS\" />\r\n        </intent>\r\n        <intent>\r\n            <action android:name=\"android.settings.WIFI_SETTINGS\" />\r\n        </intent>\r\n        <intent>\r\n            <action android:name=\"android.settings.DISPLAY_SETTINGS\" />\r\n        </intent>\r\n        <intent>\r\n            <action android:name=\"android.settings.MANAGE_APPLICATIONS_SETTINGS\" />\r\n        </intent>\r\n        <intent>\r\n            <action android:name=\"android.intent.action.MAIN\" />\r\n            <category android:name=\"android.intent.category.LAUNCHER\" />\r\n        </intent>\r\n        <intent>\r\n            <action android:name=\"android.intent.action.MAIN\" />\r\n            <category android:name=\"android.intent.category.LEANBACK_LAUNCHER\" />\r\n        </intent>\r\n        <intent>\r\n            <action android:name=\"android.intent.action.MAIN\" />\r\n            <category android:name=\"com.gathin.tvhome.category.DOCK_CARD\" />\r\n        </intent>\r\n        <!-- stock_home_redirect: HomeKeyService looks up the stock launcher's HOME activity. -->\r\n        <intent>\r\n            <action android:name=\"android.intent.action.MAIN\" />\r\n            <category android:name=\"android.intent.category.HOME\" />\r\n        </intent>\r\n        <!-- China-market MIUI TV firmware: the Settings and Wi-Fi pills fall back to Xiaomi's settings app.\r\n             Fire TV: the real settings menu lives in the stock launcher (see settings_fallback_components). -->\r\n        <package android:name=\"com.xiaomi.mitv.settings\" />\r\n        <package android:name=\"com.tcl.settings\" />\r\n        <package android:name=\"com.amazon.tv.launcher\" />\r\n        <!-- Coocaa OS sources for the Inputs menu (coocaa_sources); see CoocaaSources. -->\r\n        <provider android:authorities=\"com.skyworth.tv.provider\" />\r\n        <provider android:authorities=\"com.skyworth.tv.sdk.provider\" />\r\n    </queries>\r\n\r\n    <application\r\n        android:label=\"@string/app_name\"\r\n        android:icon=\"@mipmap/ic_launcher\"\r\n        android:banner=\"@drawable/banner\"\r\n        android:theme=\"@style/Theme.TvHome\"\r\n        android:allowBackup=\"false\"\r\n        android:localeConfig=\"@xml/locales_config\">\r\n\r\n        <activity\r\n            android:name=\".MainActivity\"\r\n            android:exported=\"true\"\r\n            android:launchMode=\"singleTask\"\r\n            android:stateNotNeeded=\"true\"\r\n            android:excludeFromRecents=\"true\"\r\n            android:clearTaskOnLaunch=\"true\"\r\n            android:configChanges=\"orientation|screenSize|keyboard|keyboardHidden|uiMode\"\r\n            android:screenOrientation=\"landscape\">\r\n            <intent-filter>\r\n                <action android:name=\"android.intent.action.MAIN\" />\r\n                <category android:name=\"android.intent.category.HOME\" />\r\n                <category android:name=\"android.intent.category.DEFAULT\" />\r\n            </intent-filter>\r\n            <!-- Listed in the TV's own app list, so it can be opened from the stock home screen too. -->\r\n            <intent-filter>\r\n                <action android:name=\"android.intent.action.MAIN\" />\r\n                <category android:name=\"android.intent.category.LEANBACK_LAUNCHER\" />\r\n            </intent-filter>\r\n        </activity>\r\n\r\n        <activity\r\n            android:name=\".LauncherSettingsActivity\"\r\n            android:exported=\"false\"\r\n            android:excludeFromRecents=\"true\"\r\n            android:screenOrientation=\"landscape\" />\r\n        <!-- The system input switcher (com.android.tv.action.VIEW_INPUTS), which is what the remote's Input\r\n             button becomes through the TV's Live TV app or InputKeyService. Disabled here and switched on by\r\n             MainActivity only while handle_view_inputs is true (config.xml or a theme), for sets whose stock\r\n             launcher was the only handler of the action (Hisense huangshan, Android TV 10): kept off, a TV with\r\n             its own input picker never sees a second candidate and a chooser. -->\r\n        <activity\r\n            android:name=\".InputsRequestActivity\"\r\n            android:exported=\"true\"\r\n            android:enabled=\"false\"\r\n            android:excludeFromRecents=\"true\"\r\n            android:noHistory=\"true\"\r\n            android:theme=\"@android:style/Theme.NoDisplay\">\r\n            <intent-filter>\r\n                <action android:name=\"com.android.tv.action.VIEW_INPUTS\" />\r\n                <category android:name=\"android.intent.category.DEFAULT\" />\r\n            </intent-filter>\r\n        </activity>\r\n        <!-- Remote Settings button panel (settings_key_panel); own task so the app behind stays put. -->\r\n        <activity\r\n            android:name=\".QuickSettingsActivity\"\r\n            android:exported=\"false\"\r\n            android:taskAffinity=\"\"\r\n            android:launchMode=\"singleTop\"\r\n            android:excludeFromRecents=\"true\"\r\n            android:noHistory=\"true\"\r\n            android:screenOrientation=\"landscape\"\r\n            android:theme=\"@android:style/Theme.Translucent.NoTitleBar.Fullscreen\" />\r\n        <activity\r\n            android:name=\".HomeSettingsActivity\"\r\n            android:exported=\"false\"\r\n            android:taskAffinity=\"\"\r\n            android:excludeFromRecents=\"true\"\r\n            android:theme=\"@android:style/Theme.NoDisplay\" />\r\n        <!-- Home button for remotes that send KEYCODE_ALL_APPS (Xiaomi). Opt-in: HOME_KEY_SERVICE=1\r\n             build-and-install.sh; see HomeKeyService. -->\r\n        <service\r\n            android:name=\".HomeKeyService\"\r\n            android:label=\"@string/home_key_name\"\r\n            android:directBootAware=\"true\"\r\n            android:exported=\"true\"\r\n            android:permission=\"android.permission.BIND_ACCESSIBILITY_SERVICE\">\r\n            <intent-filter>\r\n                <action android:name=\"android.accessibilityservice.AccessibilityService\" />\r\n            </intent-filter>\r\n            <meta-data\r\n                android:name=\"android.accessibilityservice\"\r\n                android:resource=\"@xml/home_key_service\" />\r\n        </service>\r\n\r\n        <!-- The same clock, started by Home itself after home_idle_clock_minutes without input. -->\r\n        <activity\r\n            android:name=\".ClockActivity\"\r\n            android:exported=\"false\"\r\r\n            android:excludeFromRecents=\"true\"\r\n            android:noHistory=\"true\"\r\n            android:theme=\"@android:style/Theme.Black.NoTitleBar.Fullscreen\" />\r\n\r\n        <!-- Screensaver: pick it in Settings, or `settings put secure screensaver_components\r\n             com.gathin.tvhome/.ClockDream` over adb. -->\r\n        <service\r\n            android:name=\".ClockDream\"\r\n            android:label=\"@string/dream_name\"\r\n            android:exported=\"true\"\r\n            android:permission=\"android.permission.BIND_DREAM_SERVICE\">\r\n            <intent-filter>\r\n                <action android:name=\"android.service.dreams.DreamService\" />\r\n                <category android:name=\"android.intent.category.DEFAULT\" />\r\n            </intent-filter>\r\n        </service>\r\n\r\n        <!-- tools/theme.sh writes the theme through this where the shell can't reach Android/data;\r\n             see ThemeProvider. WRITE_SECURE_SETTINGS: the adb shell has it, ordinary apps don't. -->\r\n        <provider\r\n            android:name=\".ThemeProvider\"\r\n            android:authorities=\"${applicationId}.theme\"\r\n            android:exported=\"true\"\r\n            android:permission=\"android.permission.WRITE_SECURE_SETTINGS\" />\r\n\r\n        <!-- The remote's Input button (KEYCODE_TV or KEYCODE_TV_INPUT) opens the input switcher, and input_key_keycodes and\r\n         app_keys (config.xml or a theme) bring back other remote buttons; see InputKeyService. -->\r\n        <service\r\n            android:name=\".InputKeyService\"\r\n            android:exported=\"false\"\r\n            android:label=\"@string/app_name\"\r\n            android:permission=\"android.permission.BIND_ACCESSIBILITY_SERVICE\">\r\n            <intent-filter>\r\n                <action android:name=\"android.accessibilityservice.AccessibilityService\" />\r\n            </intent-filter>\r\n            <meta-data\r\n                android:name=\"android.accessibilityservice\"\r\n                android:resource=\"@xml/input_key_service\" />\r\n        </service>\r\n    </application>\r\n</manifest>"}}