ปรับแต่งศูนย์ความปลอดภัย

เปิดหรือปิดใช้ศูนย์ความปลอดภัย

หากต้องการเปิดหรือปิดใช้ศูนย์ความปลอดภัย ให้ใช้โฆษณาที่วางซ้อนได้ ฟิลด์บูลีน config_enableSafetyCenter ในฟิลด์ frameworks/base/core/res/res/values/config.xml

อุปกรณ์ส่วนใหญ่รองรับศูนย์ความปลอดภัยโดยค่าเริ่มต้น เช่น ในโทรศัพท์ และแท็บเล็ต ในบางรูปแบบของอุปกรณ์ ศูนย์ความปลอดภัยจะปิดใช้งานโดยค่าเริ่มต้นสำหรับ เช่น Auto, TV และ Wear

<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
    <!-- ... -->
   <!-- Determines whether SafetyCenter feature is enabled. -->
    <bool name="config_enableSafetyCenter">true</bool>
    <!-- ... -->
</resources>

หากต้องการรองรับศูนย์ความปลอดภัย ให้ตั้งค่า config_enableSafetyCenter เป็น true หากคุณ หากไม่ต้องการรองรับศูนย์ความปลอดภัย ให้ตั้งค่านี้เป็น false เพื่อปิดใช้

เมื่อปิดใช้ศูนย์ความปลอดภัย ความพยายามใดๆ ที่จะเปลี่ยนเส้นทางไปยังศูนย์รักษาความปลอดภัย หน้าความเป็นส่วนตัวจะเปิดแอปการตั้งค่าแทน ความพยายามใดๆ ในการโต้ตอบกับ ระบบจะละเว้น API โดยอัตโนมัติหรือแสดงผลค่าเริ่มต้น Quick ที่เกี่ยวข้อง การ์ดการตั้งค่าและรายการการตั้งค่าจะแสดงหรือซ่อนด้วย โดยขึ้นอยู่กับ เปิดใช้งานศูนย์ความปลอดภัยแล้ว

แฟล็ก DeviceConfig

นอกจากการเปิดใช้ศูนย์ความปลอดภัยโดยใช้ config_enableSafetyCenter การกำหนดค่า DeviceConfig Flag (safety_center_is_enabled) ใช้เพื่อเปิดหรือปิดใช้ความปลอดภัยจากระยะไกล ของเรา

ใน Android 14 ขึ้นไป คุณไม่จำเป็นต้องดำเนินการใดๆ เพิ่มเติม เนื่องจากแฟล็กนี้คือ true โดยค่าเริ่มต้น

ใน Android 13 ศูนย์ความปลอดภัยจะปิดอยู่โดยค่าเริ่มต้น ฝั่งเซิร์ฟเวอร์และเปิดใช้โดยรายการที่อนุญาตที่ใช้ Flag นี้ ส่งอุปกรณ์ ลายนิ้วมือ และติดต่อ TAM ของคุณเพื่อเพิ่มเข้าไปในรายการที่อนุญาต โปรดทราบว่า ต้องเพิ่มเวอร์ชันเมนไลน์ M-2022-11 ขึ้นไปลงในรายการที่อนุญาต สำหรับการพัฒนาและการทดสอบในเครื่อง คุณจะเปิดหรือปิดใช้ Flag ในเครื่องได้ (จนกว่าจะรีบูต) ด้วยคำสั่ง adb เช่น หากต้องการเปิดใช้การตั้งค่าสถานะ ให้ดำเนินการดังนี้

adb root
adb shell device_config set_sync_disabled_for_tests until_reboot
adb shell device_config put privacy safety_center_is_enabled true

หากต้องการยืนยันว่ามีการเปิดใช้ศูนย์ความปลอดภัยหรือไม่ ให้ทำดังนี้

adb root
adb shell cmd safety_center enabled

เอาต์พุตจะแสดงว่ามีการเปิดใช้ศูนย์ความปลอดภัยอย่างถูกต้องในอุปกรณ์หรือไม่

อัปเดตไฟล์การกำหนดค่า

ใช้ไฟล์การกำหนดค่า safety_center_config.xml เพื่อแก้ไขเนื้อหาของ หน้าจอศูนย์ความปลอดภัย คุณสามารถวางซ้อนไฟล์นี้ได้โดยสมมติว่าคุณมี ข้อกำหนดการปรับแต่ง

วางซ้อนไฟล์การกำหนดค่า

หากต้องการซ้อนทับไฟล์ safety_center_config.xml โปรดดูเปลี่ยนค่าของ ทรัพยากรของแอปขณะรันไทม์ เพื่อดูข้อมูลเกี่ยวกับการแก้ไขการวางซ้อนทรัพยากรรันไทม์ (RRO)

ใน Android 14 ตรวจสอบว่าได้วางซ้อน res/raw-v34/safety_center_config.xml ไฟล์ ไม่ใช่ res/raw/safety_center_config.xml ตามค่าแรกจะมีความสำคัญเหนือกว่า (และ จะมีผลกับไฟล์อื่นๆ ที่กำหนดขอบเขตไว้เป็น v34 เช่น res/values-v34/strings.xml) แพ็กเกจการวางซ้อนต้องมี SDK ขั้นต่ำต่ำกว่า มากกว่า 34 มิฉะนั้นตัวระบุ v34 อาจถูกตัดออกระหว่างการเพิ่มประสิทธิภาพ และโปรดใช้การวางซ้อนแบบคงที่ด้วยเนื่องจากค่านี้โหลดขึ้นระหว่างการเปิดเครื่อง

สำหรับอุปกรณ์ Android Open Source Project (AOSP) ให้กำหนดเป้าหมายแพ็กเกจ com.android.safetycenter.resources ไม่มีการกำหนดค่าการวางซ้อนสำหรับ เป้าหมาย ทรัพยากรทั้งหมดวางซ้อนได้โดยไม่มีข้อจำกัดในเนื้อหา

สำหรับอุปกรณ์ GMS ที่ได้รับการกำหนดค่าให้ได้รับการอัปเดตเมนไลน์ ให้กำหนดเป้าหมาย แพ็กเกจ com.google.android.safetycenter.resources กำหนดเป้าหมายการกำหนดค่า SafetyCenterConfig การกำหนดค่านี้กำหนดให้แพ็กเกจการวางซ้อนอยู่ใน พาร์ติชัน product, system หรือ vendor GMS OEM ควรคัดลอก Google ระบุ safety_center_config.xml ไฟล์ และขีดจำกัด การแก้ไขที่ GTS อนุญาต การทดสอบ คำจำกัดความของการวางซ้อน ควรใกล้กับข้อมูลนี้

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="your.overlay.package"
    android:versionCode="1"
    android:versionName="1.0">
    <application android:hasCode="false" />
    <overlay
      android:targetPackage="com.google.android.safetycenter.resources"
      android:targetName="SafetyCenterConfig"
      android:isStatic="true"
      android:priority="0"/>
</manifest>

สำหรับอุปกรณ์ GMS ที่ไม่ได้กำหนดค่าให้รับการอัปเดตเมนไลน์ ให้กำหนดเป้าหมาย แพ็กเกจ com.android.safetycenter.resources ไม่มีการกำหนดค่าการวางซ้อน เพื่อกำหนดเป้าหมาย แพ็กเกจที่วางซ้อนต้องใช้ชื่อแพ็กเกจ com.google.android.safetycenter.resources

GMS OEM ควรคัดลอกไฟล์ safety_center_config.xml ที่ Google ให้ไว้และ จำกัดการแก้ไขที่การทดสอบ GTS อนุญาต GMS OEM ต้องกําหนด สตริงที่ใช้ในการกำหนดค่า XML

โครงสร้างไฟล์

ในระดับสูง ไฟล์ safety_center_config.xml เป็นรายการความปลอดภัย แหล่งที่มา ระบบจะจัดระเบียบแหล่งข้อมูลความปลอดภัยเหล่านี้เป็นกลุ่มๆ เพื่อจัดการสัญญาณใน หน้าจอศูนย์ความปลอดภัย ตัวอย่างเช่น ความปลอดภัยของแอป หรือการล็อกหน้าจอ ลำดับของ รายการนี้จะเป็นตัวกำหนดลำดับการแสดง

<safety-center-config> <!-- Wrapper for the Safety Center configuration -->
    <safety-sources-config>< !-- Wrapper for the safety sources groups -->
        <safety-sources-group> <!-- Contains information about a safety sources group -->
            <dynamic-safety-source /> <!-- Contains information about a safety source -->
            <!-- More safety sources in the group -->
        </safety-sources-group> <!-- More safety sources groups -->
    </safety-sources-config>
</safety-center-config>

ไฟล์การกำหนดค่าของ Google

ไฟล์การกำหนดค่า AOSP อยู่ใน packages/modules/Permission/SafetyCenter/Resources/res/raw/safety_center_config.xml

ใน Android 13 ไฟล์การกำหนดค่าของ Google คือ

<safety-center-config>
    <safety-sources-config>
        <safety-sources-group
            id="GoogleAppSecuritySources"
            title="@com.google.android.safetycenter.resources:string/google_app_security_sources_title"
            summary="@com.google.android.safetycenter.resources:string/google_app_security_sources_summary">
            <dynamic-safety-source
                id="GooglePlayProtect"
                packageName="com.android.vending"
                profile="all_profiles"
                intentAction="com.google.android.finsky.PLAY_PROTECT"
                title="@com.google.android.safetycenter.resources:string/google_play_protect_title"
                titleForWork="@com.google.android.safetycenter.resources:string/google_play_protect_title_for_work"
                summary="@com.google.android.safetycenter.resources:string/google_play_protect_summary"
                searchTerms="@com.google.android.safetycenter.resources:string/google_play_protect_search_terms"
                refreshOnPageOpenAllowed="true"/>
            <dynamic-safety-source
                id="GoogleAppProtectionService"
                packageName="com.google.android.odad"
                profile="primary_profile_only"
                initialDisplayState="hidden"
                loggingAllowed="false"/>
        </safety-sources-group>
        <safety-sources-group
            id="AndroidLockScreenSources"
            title="@com.google.android.safetycenter.resources:string/google_lock_screen_sources_title"
            summary="@com.google.android.safetycenter.resources:string/google_lock_screen_sources_summary">
            <dynamic-safety-source
                id="AndroidLockScreen"
                packageName="com.android.settings"
                profile="primary_profile_only"
                title="@com.google.android.safetycenter.resources:string/google_lock_screen_title"
                summary="@com.google.android.safetycenter.resources:string/google_lock_screen_summary"
                searchTerms="@com.google.android.safetycenter.resources:string/google_lock_screen_search_terms"
                initialDisplayState="disabled"
                maxSeverityLevel="300"
                refreshOnPageOpenAllowed="true"/>
            <dynamic-safety-source
                id="AndroidBiometrics"
                packageName="com.android.settings"
                profile="primary_profile_only"
                title="@com.google.android.safetycenter.resources:string/google_biometrics_title"
                summary="@com.google.android.safetycenter.resources:string/google_biometrics_summary"
                searchTerms="@com.google.android.safetycenter.resources:string/google_biometrics_search_terms"
                initialDisplayState="@com.google.android.safetycenter.resources:string/google_biometrics_initial_display_state"
                maxSeverityLevel="0"
                refreshOnPageOpenAllowed="true"/>
        </safety-sources-group>
        <safety-sources-group
            id="GoogleAccountsSources"
            title="@com.google.android.safetycenter.resources:string/google_accounts_sources_title"
            summary="@com.google.android.safetycenter.resources:string/google_accounts_sources_summary">
            <dynamic-safety-source
                id="GoogleSecurityCheckup"
                packageName="com.google.android.gms"
                profile="all_profiles"
                intentAction="com.google.android.gms.accountsettings.action.SAFETY_CENTER_SECURITY_CHECKUP"
                title="@com.google.android.safetycenter.resources:string/google_security_checkup_title"
                titleForWork="@com.google.android.safetycenter.resources:string/google_security_checkup_title_for_work"
                summary="@com.google.android.safetycenter.resources:string/google_security_checkup_summary"
                searchTerms="@com.google.android.safetycenter.resources:string/google_security_checkup_search_terms"
                refreshOnPageOpenAllowed="true"/>
        </safety-sources-group>
        <safety-sources-group
            id="GoogleDeviceFinderSources"
            title="@com.google.android.safetycenter.resources:string/google_device_finder_sources_title"
            summary="@com.google.android.safetycenter.resources:string/google_device_finder_sources_summary">
            <dynamic-safety-source
                id="GoogleFindMyDevice"
                packageName="com.google.android.gms"
                profile="primary_profile_only"
                intentAction="com.google.android.gms.settings.FIND_MY_DEVICE_SETTINGS"
                title="@com.google.android.safetycenter.resources:string/google_find_my_device_title"
                summary="@com.google.android.safetycenter.resources:string/google_find_my_device_summary"
                searchTerms="@com.google.android.safetycenter.resources:string/google_find_my_device_search_terms"
                refreshOnPageOpenAllowed="true"/>
            <dynamic-safety-source
                id="GoogleRogueTag"
                packageName="com.google.android.gms"
                profile="primary_profile_only"
                initialDisplayState="hidden"
                refreshOnPageOpenAllowed="true"/>
        </safety-sources-group>
        <safety-sources-group
            id="GoogleUpdateSources"
            title="@com.google.android.safetycenter.resources:string/google_updates_title"
            summary="@com.google.android.safetycenter.resources:string/google_updates_summary">
            <dynamic-safety-source
                id="GoogleSecurityUpdates"
                packageName="com.google.android.gms"
                profile="primary_profile_only"
                intentAction="@com.google.android.safetycenter.resources:string/google_security_updates_intent"
                title="@com.google.android.safetycenter.resources:string/google_security_updates_title"
                summary="@com.google.android.safetycenter.resources:string/google_security_updates_summary"
                searchTerms="@com.google.android.safetycenter.resources:string/google_security_updates_search_terms"
                refreshOnPageOpenAllowed="true"/>
            <dynamic-safety-source
                id="GooglePlaySystemUpdate"
                packageName="com.android.vending"
                profile="primary_profile_only"
                intentAction="android.settings.MODULE_UPDATE_SETTINGS"
                title="@com.google.android.safetycenter.resources:string/google_play_system_update_title"
                summary="@com.google.android.safetycenter.resources:string/google_play_system_update_summary"
                searchTerms="@com.google.android.safetycenter.resources:string/google_play_system_update_search_terms"
                refreshOnPageOpenAllowed="true"/>
        </safety-sources-group>
        <safety-sources-group
            id="AndroidPrivacySources"
            title="@com.google.android.safetycenter.resources:string/google_privacy_sources_title"
            summary="@com.google.android.safetycenter.resources:string/google_privacy_sources_summary"
            statelessIconType="privacy">
            <static-safety-source
                id="AndroidPermissionUsage"
                profile="primary_profile_only"
                intentAction="android.intent.action.REVIEW_PERMISSION_USAGE"
                title="@com.google.android.safetycenter.resources:string/google_permission_usage_title"
                summary="@com.google.android.safetycenter.resources:string/google_permission_usage_summary"
                searchTerms="@com.google.android.safetycenter.resources:string/google_permission_usage_search_terms"/>
            <static-safety-source
                id="AndroidPermissionManager"
                profile="primary_profile_only"
                intentAction="android.intent.action.MANAGE_PERMISSIONS"
                title="@com.google.android.safetycenter.resources:string/google_permission_manager_title"
                summary="@com.google.android.safetycenter.resources:string/google_permission_manager_summary"
                searchTerms="@com.google.android.safetycenter.resources:string/google_permission_manager_search_terms"/>
            <static-safety-source
                id="AndroidPrivacyControls"
                profile="primary_profile_only"
                intentAction="android.settings.PRIVACY_CONTROLS"
                title="@com.google.android.safetycenter.resources:string/google_privacy_controls_title"
                summary="@com.google.android.safetycenter.resources:string/google_privacy_controls_summary"
                searchTerms="@com.google.android.safetycenter.resources:string/google_privacy_controls_search_terms"/>
            <issue-only-safety-source
                id="AndroidAccessibility"
                packageName="com.google.android.permissioncontroller"
                profile="all_profiles"
                refreshOnPageOpenAllowed="true"/>
            <issue-only-safety-source
                id="AndroidNotificationListener"
                packageName="com.google.android.permissioncontroller"
                profile="primary_profile_only"
                refreshOnPageOpenAllowed="true"/>
            <issue-only-safety-source
                id="AndroidBackgroundLocation"
                packageName="com.google.android.permissioncontroller"
                profile="all_profiles"
                refreshOnPageOpenAllowed="true"/>
            <issue-only-safety-source
                id="AndroidPermissionAutoRevoke"
                packageName="com.google.android.permissioncontroller"
                profile="all_profiles"
                refreshOnPageOpenAllowed="true"/>
        </safety-sources-group>
        <safety-sources-group
            id="AndroidAdvancedSources"
            title="@com.google.android.safetycenter.resources:string/google_advanced_title">
            <dynamic-safety-source
                id="AndroidWorkPolicyInfo"
                packageName="com.google.android.permissioncontroller"
                profile="primary_profile_only"
                initialDisplayState="hidden"
                refreshOnPageOpenAllowed="true"/>
            <static-safety-source
                id="AndroidAdvancedSecurity"
                profile="primary_profile_only"
                intentAction="com.android.settings.security.SECURITY_ADVANCED_SETTINGS"
                title="@com.google.android.safetycenter.resources:string/google_advanced_security_title"
                summary="@com.google.android.safetycenter.resources:string/google_advanced_security_summary"
                searchTerms="@com.google.android.safetycenter.resources:string/google_advanced_security_search_terms"/>
            <static-safety-source
                id="AndroidAdvancedPrivacy"
                profile="primary_profile_only"
                intentAction="android.settings.PRIVACY_ADVANCED_SETTINGS"
                title="@com.google.android.safetycenter.resources:string/google_advanced_privacy_title"
                summary="@com.google.android.safetycenter.resources:string/google_advanced_privacy_summary"
                searchTerms="@com.google.android.safetycenter.resources:string/google_advanced_privacy_search_terms"/>
        </safety-sources-group>
    </safety-sources-config>
</safety-center-config>

ใน Android 14 ไฟล์การกำหนดค่าของ Google คือ

<safety-center-config>
    <safety-sources-config>
        <safety-sources-group
            id="GoogleAppSecuritySources"
            title="@com.google.android.safetycenter.resources:string/google_app_security_sources_title"
            summary="@com.google.android.safetycenter.resources:string/google_app_security_sources_summary">
            <dynamic-safety-source
                id="GooglePlayProtect"
                packageName="com.android.vending"
                profile="all_profiles"
                intentAction="com.google.android.finsky.PLAY_PROTECT"
                title="@com.google.android.safetycenter.resources:string/google_play_protect_title"
                titleForWork="@com.google.android.safetycenter.resources:string/google_play_protect_title_for_work"
                summary="@com.google.android.safetycenter.resources:string/google_play_protect_summary"
                searchTerms="@com.google.android.safetycenter.resources:string/google_play_protect_search_terms"
                notificationsAllowed="true"
                packageCertificateHashes="1975b2f17177bc89a5dff31f9e64a6cae281a53dc1d1d59b1d147fe1c82afa00,f0fd6c5b410f25cb25c3b53346c8972fae30f8ee7411df910480ad6b2d60db83,d22cc500299fb22873a01a010de1c82fbe4d061119b94814dd301dab50cb7678,7ce83c1b71f3d572fed04c8d40c5cb10ff75e6d87d9df6fbd53f0468c2905053"
                deduplicationGroup="AppSecurity"/>
            <issue-only-safety-source
                id="GoogleAppProtectionService"
                packageName="com.google.android.odad"
                profile="primary_profile_only"
                loggingAllowed="false"
                deduplicationGroup="AppSecurity"/>
        </safety-sources-group>
        <safety-sources-group
            id="AndroidLockScreenSources"
            title="@com.google.android.safetycenter.resources:string/google_lock_screen_sources_title"
            summary="@com.google.android.safetycenter.resources:string/google_lock_screen_sources_summary">
            <dynamic-safety-source
                id="AndroidLockScreen"
                packageName="com.android.settings"
                profile="primary_profile_only"
                title="@com.google.android.safetycenter.resources:string/google_lock_screen_title"
                summary="@com.google.android.safetycenter.resources:string/google_lock_screen_summary"
                searchTerms="@com.google.android.safetycenter.resources:string/google_lock_screen_search_terms"
                initialDisplayState="disabled"
                notificationsAllowed="true"
                maxSeverityLevel="300"/>
            <dynamic-safety-source
                id="AndroidBiometrics"
                packageName="com.android.settings"
                profile="all_profiles"
                title="@com.google.android.safetycenter.resources:string/google_biometrics_title"
                titleForWork="@com.google.android.safetycenter.resources:string/google_biometrics_title_for_work"
                summary="@com.google.android.safetycenter.resources:string/google_biometrics_summary"
                searchTerms="@com.google.android.safetycenter.resources:string/google_biometrics_search_terms"
                initialDisplayState="@com.google.android.safetycenter.resources:string/google_biometrics_initial_display_state"
                maxSeverityLevel="0"/>
        </safety-sources-group>
        <safety-sources-group
            id="GoogleAccountsSources"
            title="@com.google.android.safetycenter.resources:string/google_accounts_sources_title"
            summary="@com.google.android.safetycenter.resources:string/google_accounts_sources_summary">
            <dynamic-safety-source
                id="GoogleSecurityCheckup"
                packageName="com.google.android.gms"
                profile="all_profiles"
                intentAction="com.google.android.gms.accountsettings.action.SAFETY_CENTER_SECURITY_CHECKUP"
                title="@com.google.android.safetycenter.resources:string/google_security_checkup_title"
                titleForWork="@com.google.android.safetycenter.resources:string/google_security_checkup_title_for_work"
                summary="@com.google.android.safetycenter.resources:string/google_security_checkup_summary"
                searchTerms="@com.google.android.safetycenter.resources:string/google_security_checkup_search_terms"
                deduplicationGroup="AccountRequired"
                packageCertificateHashes="1975b2f17177bc89a5dff31f9e64a6cae281a53dc1d1d59b1d147fe1c82afa00,f0fd6c5b410f25cb25c3b53346c8972fae30f8ee7411df910480ad6b2d60db83,d22cc500299fb22873a01a010de1c82fbe4d061119b94814dd301dab50cb7678,7ce83c1b71f3d572fed04c8d40c5cb10ff75e6d87d9df6fbd53f0468c2905053"
                refreshOnPageOpenAllowed="true"/>
            <dynamic-safety-source
                id="GooglePasswordCheckup"
                packageName="com.google.android.gms"
                profile="all_profiles"
                title="@com.google.android.safetycenter.resources:string/google_password_checkup_title"
                titleForWork="@com.google.android.safetycenter.resources:string/google_password_checkup_title_for_work"
                searchTerms="@com.google.android.safetycenter.resources:string/google_password_checkup_search_terms"
                initialDisplayState="hidden"
                notificationsAllowed="true"
                deduplicationGroup="AccountRequired"
                packageCertificateHashes="1975b2f17177bc89a5dff31f9e64a6cae281a53dc1d1d59b1d147fe1c82afa00,f0fd6c5b410f25cb25c3b53346c8972fae30f8ee7411df910480ad6b2d60db83,d22cc500299fb22873a01a010de1c82fbe4d061119b94814dd301dab50cb7678,7ce83c1b71f3d572fed04c8d40c5cb10ff75e6d87d9df6fbd53f0468c2905053"
                refreshOnPageOpenAllowed="false"/>
        </safety-sources-group>
        <safety-sources-group
            id="GoogleDeviceFinderSources"
            title="@com.google.android.safetycenter.resources:string/google_device_finder_sources_title"
            summary="@com.google.android.safetycenter.resources:string/google_device_finder_sources_summary">
            <dynamic-safety-source
                id="GoogleFindMyDevice"
                packageName="com.google.android.gms"
                profile="primary_profile_only"
                intentAction="com.google.android.gms.settings.FIND_MY_DEVICE_SETTINGS"
                title="@com.google.android.safetycenter.resources:string/google_find_my_device_title"
                summary="@com.google.android.safetycenter.resources:string/google_find_my_device_summary"
                notificationsAllowed="true"
                deduplicationGroup="AccountRequired"
                packageCertificateHashes="1975b2f17177bc89a5dff31f9e64a6cae281a53dc1d1d59b1d147fe1c82afa00,f0fd6c5b410f25cb25c3b53346c8972fae30f8ee7411df910480ad6b2d60db83,d22cc500299fb22873a01a010de1c82fbe4d061119b94814dd301dab50cb7678,7ce83c1b71f3d572fed04c8d40c5cb10ff75e6d87d9df6fbd53f0468c2905053"
                searchTerms="@com.google.android.safetycenter.resources:string/google_find_my_device_search_terms"/>
            <dynamic-safety-source
                id="GoogleRogueTag"
                packageName="com.google.android.gms"
                profile="primary_profile_only"
                packageCertificateHashes="1975b2f17177bc89a5dff31f9e64a6cae281a53dc1d1d59b1d147fe1c82afa00,f0fd6c5b410f25cb25c3b53346c8972fae30f8ee7411df910480ad6b2d60db83,d22cc500299fb22873a01a010de1c82fbe4d061119b94814dd301dab50cb7678,7ce83c1b71f3d572fed04c8d40c5cb10ff75e6d87d9df6fbd53f0468c2905053"
                initialDisplayState="hidden"/>
        </safety-sources-group>
        <safety-sources-group
            id="GoogleUpdateSources"
            title="@com.google.android.safetycenter.resources:string/google_updates_title"
            summary="@com.google.android.safetycenter.resources:string/google_updates_summary">
            <dynamic-safety-source
                id="GoogleSecurityUpdates"
                packageName="com.google.android.gms"
                profile="primary_profile_only"
                intentAction="@com.google.android.safetycenter.resources:string/google_security_updates_intent"
                title="@com.google.android.safetycenter.resources:string/google_security_updates_title"
                summary="@com.google.android.safetycenter.resources:string/google_security_updates_summary"
                notificationsAllowed="true"
                packageCertificateHashes="1975b2f17177bc89a5dff31f9e64a6cae281a53dc1d1d59b1d147fe1c82afa00,f0fd6c5b410f25cb25c3b53346c8972fae30f8ee7411df910480ad6b2d60db83,d22cc500299fb22873a01a010de1c82fbe4d061119b94814dd301dab50cb7678,7ce83c1b71f3d572fed04c8d40c5cb10ff75e6d87d9df6fbd53f0468c2905053"
                searchTerms="@com.google.android.safetycenter.resources:string/google_security_updates_search_terms"/>
            <dynamic-safety-source
                id="GooglePlaySystemUpdate"
                packageName="com.android.vending"
                profile="primary_profile_only"
                intentAction="android.settings.MODULE_UPDATE_SETTINGS"
                title="@com.google.android.safetycenter.resources:string/google_play_system_update_title"
                summary="@com.google.android.safetycenter.resources:string/google_play_system_update_summary"
                notificationsAllowed="true"
                deduplicationGroup="AccountRequired"
                packageCertificateHashes="1975b2f17177bc89a5dff31f9e64a6cae281a53dc1d1d59b1d147fe1c82afa00,f0fd6c5b410f25cb25c3b53346c8972fae30f8ee7411df910480ad6b2d60db83,d22cc500299fb22873a01a010de1c82fbe4d061119b94814dd301dab50cb7678,7ce83c1b71f3d572fed04c8d40c5cb10ff75e6d87d9df6fbd53f0468c2905053"
                searchTerms="@com.google.android.safetycenter.resources:string/google_play_system_update_search_terms"/>
            <dynamic-safety-source
                id="GoogleBackupAndRestore"
                packageName="com.google.android.gms"
                profile="primary_profile_only"
                initialDisplayState="hidden"
                title="@com.google.android.safetycenter.resources:string/google_backup_title"
                packageCertificateHashes="1975b2f17177bc89a5dff31f9e64a6cae281a53dc1d1d59b1d147fe1c82afa00,f0fd6c5b410f25cb25c3b53346c8972fae30f8ee7411df910480ad6b2d60db83,d22cc500299fb22873a01a010de1c82fbe4d061119b94814dd301dab50cb7678,7ce83c1b71f3d572fed04c8d40c5cb10ff75e6d87d9df6fbd53f0468c2905053"
                searchTerms="@com.google.android.safetycenter.resources:string/google_backup_search_terms"/>
        </safety-sources-group>
        <safety-sources-group
            id="AndroidPrivacySources"
            title="@com.google.android.safetycenter.resources:string/google_privacy_sources_title"
            summary="@com.google.android.safetycenter.resources:string/google_privacy_sources_summary"
            statelessIconType="privacy">
            <static-safety-source
                id="AndroidPermissionManager"
                profile="primary_profile_only"
                intentAction="android.intent.action.MANAGE_PERMISSIONS"
                title="@com.google.android.safetycenter.resources:string/google_permission_manager_title"
                summary="@com.google.android.safetycenter.resources:string/google_permission_manager_summary"
                searchTerms="@com.google.android.safetycenter.resources:string/google_permission_manager_search_terms"/>
            <static-safety-source
                id="AndroidPermissionUsage"
                profile="primary_profile_only"
                intentAction="android.intent.action.REVIEW_PERMISSION_USAGE"
                title="@com.google.android.safetycenter.resources:string/google_permission_usage_title"
                summary="@com.google.android.safetycenter.resources:string/google_permission_usage_summary"
                searchTerms="@com.google.android.safetycenter.resources:string/google_permission_usage_search_terms"/>
            <static-safety-source
                id="GoogleAdsIdentity"
                profile="all_profiles"
                packageName="com.google.android.gms"
                intentAction="com.google.android.gms.adsidentity.ACTION_ADS_IDENTITY_SETTINGS"
                title="@com.google.android.safetycenter.resources:string/google_ads_identity_title"
                titleForWork="@com.google.android.safetycenter.resources:string/google_ads_identity_title_for_work"
                summary="@com.google.android.safetycenter.resources:string/google_ads_identity_summary"
                searchTerms="@com.google.android.safetycenter.resources:string/google_ads_identity_search_terms"/>
            <dynamic-safety-source
                id="AndroidHealthConnect"
                profile="primary_profile_only"
                packageName="com.google.android.healthconnect.controller"
                initialDisplayState="hidden"
                refreshOnPageOpenAllowed="false"
                title="@com.google.android.safetycenter.resources:string/google_health_connect_title"
                searchTerms="@com.google.android.safetycenter.resources:string/google_health_connect_search_terms"/>
            <dynamic-safety-source
                id="AndroidPrivacyAppDataSharingUpdates"
                packageName="com.google.android.permissioncontroller"
                profile="primary_profile_only"
                initialDisplayState="hidden"
                refreshOnPageOpenAllowed="true"
                title="@com.google.android.safetycenter.resources:string/google_app_data_sharing_updates_title"
                searchTerms="@com.google.android.safetycenter.resources:string/google_app_data_sharing_updates_search_terms"/>
            <static-safety-source
                id="AndroidPrivacyControls"
                profile="primary_profile_only"
                intentAction="android.settings.PRIVACY_CONTROLS"
                title="@com.google.android.safetycenter.resources:string/google_privacy_controls_title"
                summary="@com.google.android.safetycenter.resources:string/google_privacy_controls_summary"
                searchTerms="@com.google.android.safetycenter.resources:string/google_privacy_controls_search_terms"/>
            <static-safety-source
                id="GoogleActivityControls"
                profile="all_profiles"
                packageName="com.google.android.gms"
                intentAction="com.google.android.gms.accountsettings.action.ACTIVITY_CONTROLS"
                title="@com.google.android.safetycenter.resources:string/google_activity_controls_title"
                titleForWork="@com.google.android.safetycenter.resources:string/google_activity_controls_title_for_work"
                summary="@com.google.android.safetycenter.resources:string/google_activity_controls_summary"
                searchTerms="@com.google.android.safetycenter.resources:string/google_activity_controls_search_terms"/>
            <issue-only-safety-source
                id="AndroidAccessibility"
                packageName="com.google.android.permissioncontroller"
                profile="all_profiles"
                notificationsAllowed="true"
                refreshOnPageOpenAllowed="true"/>
            <issue-only-safety-source
                id="AndroidNotificationListener"
                packageName="com.google.android.permissioncontroller"
                profile="primary_profile_only"
                notificationsAllowed="true"
                refreshOnPageOpenAllowed="true"/>
            <issue-only-safety-source
                id="AndroidBackgroundLocation"
                packageName="com.google.android.permissioncontroller"
                profile="all_profiles"
                notificationsAllowed="true"
                refreshOnPageOpenAllowed="true"/>
            <issue-only-safety-source
                id="AndroidPermissionAutoRevoke"
                packageName="com.google.android.permissioncontroller"
                profile="all_profiles"
                notificationsAllowed="true"
                refreshOnPageOpenAllowed="true"/>
        </safety-sources-group>
        <safety-sources-group
            id="AndroidAdvancedSources"
            title="@com.google.android.safetycenter.resources:string/google_advanced_title">
            <dynamic-safety-source
                id="AndroidWorkPolicyInfo"
                packageName="com.google.android.permissioncontroller"
                profile="primary_profile_only"
                title="@com.google.android.safetycenter.resources:string/google_work_policy_title"
                initialDisplayState="hidden"
                refreshOnPageOpenAllowed="true"/>
            <static-safety-source
                id="AndroidMoreSettings"
                profile="primary_profile_only"
                intentAction="com.android.settings.MORE_SECURITY_PRIVACY_SETTINGS"
                title="@com.google.android.safetycenter.resources:string/google_more_settings_title"
                summary="@com.google.android.safetycenter.resources:string/google_more_settings_summary"
                searchTerms="@com.google.android.safetycenter.resources:string/google_more_settings_search_terms"/>
        </safety-sources-group>
    </safety-sources-config>
</safety-center-config>

ปรับแต่งแหล่งที่มาของศูนย์ความปลอดภัย

ประเภทแหล่งที่มาของศูนย์ความปลอดภัย

แหล่งที่มาอาจเป็นแบบไดนามิก ปัญหาเท่านั้น หรือคงที่ ขึ้นอยู่กับประเภทของข้อมูล ให้กับศูนย์ความปลอดภัย

แหล่งที่มาแบบไดนามิก

ทําเครื่องหมายแหล่งที่มาความปลอดภัยเป็น dynamic-safety-source หากให้ข้อมูลแบบไดนามิกได้ ไปยังศูนย์ความปลอดภัยทั้งสำหรับการเข้าออกและการ์ดคำเตือนที่อาจเป็นไปได้

<dynamic-safety-source
    id="AndroidLockScreen"
    packageName="com.android.settings"
    profile="primary_profile_only"
    title="@com.google.android.safetycenter.resources:string/google_lock_screen_title"
    summary="@com.google.android.safetycenter.resources:string/google_lock_screen_summary"
    searchTerms="@com.google.android.safetycenter.resources:string/google_lock_screen_search_terms"
    initialDisplayState="disabled"
    maxSeverityLevel="300"
    refreshOnPageOpenAllowed="true"/>

แหล่งที่มาที่เป็นปัญหาเท่านั้น

ทําเครื่องหมายแหล่งที่มาเป็น issue-only-safety-source หากมี ไม่มีการตั้งค่าที่เชื่อมโยง แต่ยังคงมีคำเตือนอยู่ คุณระบุได้เฉพาะคำเตือน การให้ รายการการตั้งค่าเกิดข้อผิดพลาด

<issue-only-safety-source
    id="AndroidAccessibility"
    packageName="com.google.android.permissioncontroller"
    profile="all_profiles"
    refreshOnPageOpenAllowed="true"/>

แหล่งที่มาแบบคงที่

ทำเครื่องหมายแหล่งที่มาเป็น static-safety-source หากเป็นรายการเปลี่ยนเส้นทางที่ไม่มี ข้อมูลแบบไดนามิก:

<static-safety-source
    id="AndroidAdvancedSecurity"
    profile="primary_profile_only"
    intentAction="com.google.android.settings.security.SECURITY_ADVANCED_SETTINGS"
    title="@com.google.android.safetycenter.resources:string/google_advanced_security_title"
    summary="@com.google.android.safetycenter.resources:string/google_advanced_security_summary"
    searchTerms="@com.google.android.safetycenter.resources:string/google_advanced_security_search_terms"/>

การกำหนดค่าแหล่งที่มาของศูนย์ความปลอดภัย

การกำหนดค่าขึ้นอยู่กับประเภทแหล่งที่มาของศูนย์ความปลอดภัยและตัวแปรอื่นๆ ฟิลด์ของไฟล์เป็นฟิลด์ที่ไม่บังคับ ฟิลด์บังคับ หรือฟิลด์ไม่อนุญาต และสามารถปรับแต่งได้ดังนี้

  • id
    • ตัวระบุที่ไม่ซ้ำกันสำหรับแหล่งที่มาความปลอดภัย ต้องไม่ซ้ำกันใน และต้องประกอบด้วยอักขระที่เป็นตัวอักษรเท่านั้น (a-z, A-Z) และ พิจารณาตัวพิมพ์เล็กและตัวพิมพ์ใหญ่
    • ประเภทสตริง
    • ต้องระบุสำหรับแหล่งที่มาความปลอดภัยทุกประเภท
  • packageName
    • ชื่อแพ็กเกจที่เป็นเจ้าของแหล่งข้อมูลความปลอดภัยนี้ ตัวอย่างเช่น com.google.android.permissioncontroller
    • ประเภทสตริง
    • ต้องระบุสำหรับแหล่งที่มาด้านความปลอดภัยแบบไดนามิกและเฉพาะปัญหาเท่านั้น
    • ไม่ได้รับอนุญาตสำหรับแหล่งข้อมูลด้านความปลอดภัยแบบคงที่ใน Android 13; ใน Android 14 นี้ สามารถตั้งค่าให้กำหนดเป้าหมาย intentAction ของแหล่งที่มาหรือไม่ก็ได้ โดยชัดเจนแทนที่จะบอกเป็นนัย (โปรดดูความละเอียดของความตั้งใจ เอกสารประกอบ เพื่อดูรายละเอียดเพิ่มเติม)
  • initialDisplayState
    • วิธีแสดงรายการ UI แสดงขึ้นเมื่อไม่มีการระบุข้อมูลโดยฝ่ายความปลอดภัย แหล่งข้อมูล
    • ประเภท enum ที่แสดงเป็นสตริงต้องเป็นอย่างใดอย่างหนึ่งต่อไปนี้
      • enabled (ค่าเริ่มต้น แสดงปกติ)
      • disabled (แสดงเป็นสีเทา ไม่สามารถคลิกได้)
      • hidden (ไม่แสดง)
    • ไม่บังคับสำหรับแหล่งที่มาความปลอดภัยแบบไดนามิก (ค่าเริ่มต้นคือ enabled)
    • ไม่ได้รับอนุญาตสำหรับแหล่งข้อมูลด้านความปลอดภัยที่มีเฉพาะปัญหาเท่านั้นและแบบคงที่
  • profile
    • แหล่งที่มาของความปลอดภัยนี้โต้ตอบกับโปรไฟล์ที่มีการจัดการของผู้ใช้หรือไม่
    • ประเภท enum ที่แสดงเป็นสตริงต้องเป็นอย่างใดอย่างหนึ่งต่อไปนี้
      • primary_profile_only (โต้ตอบกับผู้ปกครองเท่านั้น)
      • all_profiles (ยังโต้ตอบกับโปรไฟล์ที่มีการจัดการได้ด้วย)
    • ในวันที่ all_profiles จะมีการสร้างรายการ UI หลายรายการ (รายการหนึ่งสำหรับโปรไฟล์ ผู้ปกครอง และอีก 1 รายการสำหรับแต่ละโปรไฟล์ที่มีการจัดการ) ข้อมูลที่แหล่งข้อมูลความปลอดภัยสามารถมอบให้ ข้อมูลที่แตกต่างกันสำหรับแต่ละโปรไฟล์
    • ต้องระบุสำหรับแหล่งข้อมูลความปลอดภัยทั้งหมด
  • searchTerms
    • รายการข้อความค้นหาที่จับคู่กับรายการศูนย์ความปลอดภัยเมื่อใช้ ค้นหาในแอปการตั้งค่า
    • รหัสทรัพยากรที่แสดงเป็นชื่อทรัพยากรที่มีคุณสมบัติครบถ้วน ตัวอย่างเช่น @package:string/my_search_terms
    • ไม่บังคับสำหรับแหล่งที่มาความปลอดภัยแบบไดนามิกและแบบคงที่ (ค่าเริ่มต้นคือไม่มีการค้นหา ข้อกำหนด)
    • ไม่ได้รับอนุญาตสำหรับแหล่งข้อมูลด้านความปลอดภัยที่เป็นปัญหาเท่านั้น
  • title
    • ชื่อเริ่มต้นของรายการ UI ใช้เมื่อไม่มีข้อมูลแบบไดนามิก ตามแหล่งที่มา
    • รหัสทรัพยากรที่แสดงเป็นชื่อทรัพยากรที่มีคุณสมบัติครบถ้วน ตัวอย่างเช่น @package:string/my_title
    • ต้องระบุสำหรับแหล่งที่มาความปลอดภัยแบบไดนามิกและแบบคงที่ (เว้นแต่ initialDisplayState="hidden" ที่ไม่มี searchTerms)
    • ไม่ได้รับอนุญาตสำหรับแหล่งข้อมูลด้านความปลอดภัยที่เป็นปัญหาเท่านั้น
  • titleForWork
    • ชื่อเริ่มต้นของรายการ UI สำหรับโปรไฟล์ที่มีการจัดการ ซึ่งใช้เมื่อ แหล่งที่มาไม่ได้ให้ข้อมูลแบบไดนามิก
    • รหัสทรัพยากรที่แสดงเป็นชื่อทรัพยากรที่มีคุณสมบัติครบถ้วน ตัวอย่างเช่น @package:string/my_title_for_work
    • จำเป็นสำหรับแหล่งที่มาความปลอดภัยแบบไดนามิกและแบบคงที่ที่ระบุ profile="all_profiles" (ยกเว้น initialDisplayState="hidden" ที่ไม่มี searchTerms)
    • ต้องห้ามสำหรับแหล่งที่มาด้านความปลอดภัยที่เป็นปัญหาเท่านั้นหรือแหล่งที่มาที่มี profile="primary_profile_only"
  • summary
    • สรุปเริ่มต้นของรายการ UI (นี่เป็นข้อความคำอธิบายที่ยาวขึ้น แสดงใต้ชื่อ) ใช้เมื่อไม่ได้ระบุข้อมูลแบบไดนามิกโดย แหล่งที่มา
    • รหัสทรัพยากรที่แสดงเป็นชื่อทรัพยากรที่มีคุณสมบัติครบถ้วน ตัวอย่างเช่น @package:string/my_summary
    • ไม่บังคับสำหรับแหล่งที่มาความปลอดภัยแบบคงที่ (ค่าเริ่มต้นคือไม่มีสรุป)
    • ต้องระบุสำหรับแหล่งที่มาความปลอดภัยแบบไดนามิก (เว้นแต่ว่า initialDisplayState คือ hidden)
    • ไม่ได้รับอนุญาตสำหรับแหล่งข้อมูลด้านความปลอดภัยที่เป็นปัญหาเท่านั้น
  • intentAction
    • การทำงานที่จะทริกเกอร์เมื่อมีการคลิกรายการ UI
    • ประเภทสตริง เช่น com.google.android.settings.security.SECURITY_ADVANCED_SETTINGS หรือ รหัสทรัพยากรที่แสดงเป็นชื่อทรัพยากรที่มีคุณสมบัติครบถ้วน ตัวอย่างเช่น วันที่ @package:string/my_intent_action
    • หากการดำเนินการผ่าน Intent นี้แก้ไขสำหรับ packageName ที่ระบุไม่ได้ (หาก ) รายการ UI จะทำงานในลักษณะเดียวกับ วันที่ initialDisplayState="disabled"
    • จำเป็นสำหรับแหล่งที่มาความปลอดภัยแบบคงที่และแหล่งที่มาความปลอดภัย dynamic รายการที่ มี initialDisplayState="enabled"
    • ไม่ได้รับอนุญาตสำหรับแหล่งข้อมูลด้านความปลอดภัยที่เป็นปัญหาเท่านั้น
  • maxSeverityLevel
    • ระดับความรุนแรงสูงสุดที่แหล่งข้อมูลของศูนย์ความปลอดภัยนี้สามารถระบุได้
    • จำนวนเต็มที่แสดงเป็นสตริง เช่น 300
    • ไม่บังคับสำหรับแหล่งที่มาด้านความปลอดภัยแบบไดนามิกและเฉพาะปัญหาเท่านั้น (ค่าเริ่มต้นคือไม่ สูงสุด)
    • ห้ามใช้สำหรับแหล่งที่มาความปลอดภัยแบบคงที่
  • loggingAllowed
    • ศูนย์ความปลอดภัยจะบันทึกการโต้ตอบหรือข้อมูลที่เกี่ยวข้องกับเรื่องนี้ได้หรือไม่ แหล่งข้อมูล
    • บูลีนแสดงเป็นสตริง เช่น false
    • ไม่บังคับสำหรับแหล่งที่มาด้านความปลอดภัยแบบไดนามิกและเฉพาะปัญหาเท่านั้น (ค่าเริ่มต้นคือ true)
    • ห้ามใช้สำหรับแหล่งที่มาความปลอดภัยแบบคงที่
  • refreshOnPageOpenAllowed
    • ควรส่งสัญญาณไปยังแหล่งข้อมูลความปลอดภัยเพื่อรีเฟรชข้อมูลหรือไม่ เมื่อหน้าจอศูนย์ความปลอดภัยเปิดขึ้น
    • บูลีนจะแสดงเป็นสตริง เช่น true
    • ไม่บังคับสำหรับแหล่งที่มาด้านความปลอดภัยแบบไดนามิกและเฉพาะปัญหาเท่านั้น (ค่าเริ่มต้นคือ false)
    • ห้ามใช้สำหรับแหล่งที่มาความปลอดภัยแบบคงที่
  • notificationsAllowed (ตั้งแต่ Android 14 เป็นต้นไป)
    • แหล่งข้อมูลความปลอดภัยเลือกที่จะแสดงการแจ้งเตือนได้หรือไม่ รายงานปัญหา
    • บูลีนจะแสดงเป็นสตริง เช่น true
    • ไม่บังคับสำหรับแหล่งที่มาด้านความปลอดภัยแบบไดนามิกและเฉพาะปัญหาเท่านั้น (ค่าเริ่มต้นคือ false)
    • ห้ามใช้สำหรับแหล่งที่มาความปลอดภัยแบบคงที่
  • deduplicationGroup (ตั้งแต่ Android 14 เป็นต้นไป)
    • ตัวระบุที่ไม่ซ้ำกันที่เป็นไปได้ซึ่งสามารถใช้เพื่อกรองปัญหาที่ซ้ำกันออก มาจากแหล่งที่มาต่างๆ แหล่งที่มาภายในการกรองข้อมูลที่ซ้ำกันออกเดียวกัน สามารถส่งปัญหาที่มีรหัสการกรองข้อมูลที่ซ้ำกันออกซึ่งไม่บังคับ ปัญหาเกี่ยวกับ รหัสการกรองที่ซ้ำกันที่ซ้ำกันออกจะปรากฏขึ้นเพียงครั้งเดียวใน UI แม้ว่า แหล่งที่มาหลายแห่งส่งบทความ
    • ประเภทสตริง
    • ไม่บังคับสำหรับแหล่งที่มาด้านความปลอดภัยแบบไดนามิกและเฉพาะปัญหาเท่านั้น (ค่าเริ่มต้นคือไม่ การกรองข้อมูลที่ซ้ำกันออก)
    • ห้ามใช้สำหรับแหล่งที่มาความปลอดภัยแบบคงที่
  • packageCertificateHashes (ตั้งแต่ Android 14 เป็นต้นไป)
    • รายการแฮชใบรับรองที่คั่นด้วยคอมมาสำหรับ packageName หากตั้งค่าไว้ ใบรับรอง ตรวจสอบ จะดำเนินการเทียบกับ packageCertificateHashes ที่ระบุสำหรับ ให้ packageName เมื่อโต้ตอบกับแหล่งที่มาความปลอดภัย สำหรับ เพื่อความปลอดภัย
    • ประเภทสตริง
    • ไม่บังคับสำหรับแหล่งที่มาด้านความปลอดภัยแบบไดนามิกและเฉพาะปัญหาเท่านั้น (ค่าเริ่มต้นคือไม่ ตรวจสอบใบรับรอง)
    • ห้ามใช้สำหรับแหล่งที่มาความปลอดภัยแบบคงที่

ปรับแต่งกลุ่มแหล่งที่มาของศูนย์ความปลอดภัย

แหล่งที่มาของศูนย์ความปลอดภัยต้องอยู่ภายในกลุ่มแหล่งที่มาของศูนย์ความปลอดภัย กลุ่มแหล่งที่มาแต่ละกลุ่มจะแสดงใน UI ตามลำดับที่กลุ่มแหล่งที่มา ที่แสดงอยู่ในไฟล์ แหล่งที่มาแต่ละรายการจะแสดงภายในกลุ่มตามลำดับ จะมีการแสดงแหล่งที่มาในไฟล์ หากกลุ่มมีแหล่งข้อมูลความปลอดภัยแหล่งเดียว แสดงเป็นรายการเดียว ไม่ใช่เป็นกลุ่ม

แหล่งที่มาของการกำหนดค่ากลุ่มในศูนย์ความปลอดภัย

ใช้ตัวแปรต่อไปนี้เพื่อปรับแต่งกลุ่มแหล่งที่มาของศูนย์ความปลอดภัย

  • id
    • ตัวระบุที่ไม่ซ้ำกันสำหรับกลุ่มแหล่งที่มาความปลอดภัย ต้องไม่ซ้ำกันใน ทั้งไฟล์
    • ประเภทสตริง
    • ต้องระบุ
  • title
    • ชื่อกลุ่มใน UI
    • รหัสทรัพยากรที่แสดงเป็นชื่อทรัพยากรที่มีคุณสมบัติครบถ้วน ตัวอย่างเช่น @package:string/my_title
    • ต้องระบุหากมีแหล่งที่มาความปลอดภัยแบบไดนามิกหรือแบบคงที่อย่างน้อย 1 แหล่งภายใน กลุ่ม (เช่น กลุ่มไม่ใช่ของ type="hidden")
  • summary
    • คำอธิบายสั้นๆ ของกลุ่มใน UI แสดงอยู่ใต้ชื่อ แสดงภายใต้เงื่อนไขบางอย่าง โดยทั่วไปเวลาที่ไม่ได้ระบุข้อมูล หรือไม่เช่นนั้น สรุปจะคำนวณตามข้อมูลที่ได้จาก แหล่งที่มาภายในกลุ่ม
    • รหัสทรัพยากรที่แสดงเป็นชื่อทรัพยากรที่มีคุณสมบัติครบถ้วน ตัวอย่างเช่น @package:string/my_summary
    • ไม่บังคับ (ค่าเริ่มต้นคือไม่มีสรุป)
  • statelessIconType
    • ประเภทไอคอนที่แสดงสำหรับกลุ่มเมื่อไม่มีการระบุสถานะ แหล่งที่มาของความปลอดภัย ตัวอย่างเช่น รายการแบบคงที่
    • ประเภท enum ที่แสดงเป็นสตริงต้องเป็น none หรือ privacy (ประเภทไอคอนความเป็นส่วนตัว)
    • ไม่บังคับ (ค่าเริ่มต้นคือ none)
  • type (ตั้งแต่ Android 14 เป็นต้นไป)
    • ประเภทที่ชัดเจนสำหรับการตรวจสอบวิธีที่กลุ่มนี้โต้ตอบกับศูนย์ความปลอดภัย
    • ประเภท enum ที่แสดงเป็นสตริงต้องเป็นอย่างใดอย่างหนึ่งต่อไปนี้
      • stateful (แสดงผลและมีส่วนร่วมในศูนย์ความปลอดภัยโดยรวม สถานะ)
      • stateless (แสดงผลและไม่มีผลต่อความปลอดภัยโดยรวม สถานะศูนย์)
      • hidden (ไม่แสดง แหล่งที่มาทั้งหมดต้องเป็นปัญหาเท่านั้น)
    • ไม่บังคับ มีการอนุมานโดยค่าเริ่มต้นโดยใช้แหล่งข้อมูลความปลอดภัยที่มีอยู่ใน กลุ่มดังกล่าว รวมถึง summary และ statelessIconType หาก มีการระบุ type ที่มีการบังคับใช้ตัวแปรเพิ่มเติมเพื่อให้มั่นใจว่า ที่ตรงกับแหล่งที่มาที่พบในกลุ่ม (ตัวอย่างเช่น กลุ่มไม่สามารถเป็น hidden ได้หากมีรายการที่ผู้ใช้มองเห็นได้)

ประเภทกลุ่มแหล่งที่มาของศูนย์ความปลอดภัย

กลุ่มแหล่งที่มาของศูนย์ความปลอดภัยจะได้รับการจัดประเภทเป็นการเก็บสถานะ ไม่เก็บสถานะ หรือซ่อน ตามสถานะของบางช่อง

กลุ่มที่เก็บสถานะ

กลุ่มที่มีทั้งชื่อและสรุป หรือ stateLessIconType="privacy" คือ สถานะ "เก็บสถานะ" จะมีผลในสถานะโดยรวมของศูนย์ความปลอดภัย

<safety-sources-group
    id="GoogleAppSecuritySources"
    title="@com.google.android.safetycenter.resources:string/google_app_security_sources_title"
    summary="@com.google.android.safetycenter.resources:string/google_app_security_sources_summary">
    <dynamic-safety-source
        id="GooglePlayProtect"
        packageName="com.android.vending"
        profile="all_profiles"
        intentAction="com.google.android.finsky.PLAY_PROTECT"
        title="@com.google.android.safetycenter.resources:string/google_play_protect_title"
        titleForWork="@com.google.android.safetycenter.resources:string/google_play_protect_title_for_work"
        summary="@com.google.android.safetycenter.resources:string/google_play_protect_summary"
        searchTerms="@com.google.android.safetycenter.resources:string/google_play_protect_search_terms"
        refreshOnPageOpenAllowed="true"/>
    <dynamic-safety-source
        id="GoogleAppProtectionService"
        packageName="com.google.android.odad"
        profile="primary_profile_only"
        initialDisplayState="hidden"
        loggingAllowed="false"/>
</safety-sources-group>

ใน Android 13 กลุ่มดังกล่าวจะแสดงเป็นแบบย่อได้ ใน UI ใน Android 14 แอปนี้จะแสดงเป็น รายการที่มีสถานะของตัวเองซึ่งเปลี่ยนเส้นทางไปยังหน้าย่อย

กลุ่มที่ไม่เก็บสถานะ

กลุ่มที่มีชื่อแต่ไม่มีข้อมูลสรุป และ stateLessIconType="none" คือ จะถือว่าไม่เก็บสถานะและไม่มีผลต่อสถานะโดยรวมของศูนย์ความปลอดภัย

<safety-sources-group
    id="AndroidPrivacySources"
    title="@com.google.android.safetycenter.resources:string/google_privacy_sources_title"
    summary="@com.google.android.safetycenter.resources:string/google_privacy_sources_summary"
    statelessIconType="privacy">
    <static-safety-source
        id="AndroidPermissionUsage"
        profile="primary_profile_only"
        intentAction="android.intent.action.REVIEW_PERMISSION_USAGE"
        title="@com.google.android.safetycenter.resources:string/google_permission_usage_title"
        summary="@com.google.android.safetycenter.resources:string/google_permission_usage_summary"
        searchTerms="@com.google.android.safetycenter.resources:string/google_permission_usage_search_terms"/>
    <static-safety-source
        id="AndroidPermissionManager"
        profile="primary_profile_only"
        intentAction="android.intent.action.MANAGE_PERMISSIONS"
        title="@com.google.android.safetycenter.resources:string/google_permission_manager_title"
        summary="@com.google.android.safetycenter.resources:string/google_permission_manager_summary"
        searchTerms="@com.google.android.safetycenter.resources:string/google_permission_manager_search_terms"/>
    <static-safety-source
        id="AndroidPrivacyControls"
        profile="primary_profile_only"
        intentAction="android.settings.PRIVACY_CONTROLS"
        title="@com.google.android.safetycenter.resources:string/google_privacy_controls_title"
        summary="@com.google.android.safetycenter.resources:string/google_privacy_controls_summary"
        searchTerms="@com.google.android.safetycenter.resources:string/google_privacy_controls_search_terms"/>
    <issue-only-safety-source
        id="AndroidAccessibility"
        packageName="com.google.android.permissioncontroller"
        profile="all_profiles"
        refreshOnPageOpenAllowed="true"/>
    <issue-only-safety-source
        id="AndroidNotificationListener"
        packageName="com.google.android.permissioncontroller"
        profile="primary_profile_only"
        refreshOnPageOpenAllowed="true"/>
    <issue-only-safety-source
        id="AndroidBackgroundLocation"
        packageName="com.google.android.permissioncontroller"
        profile="all_profiles"
        refreshOnPageOpenAllowed="true"/>
    <issue-only-safety-source
        id="AndroidPermissionAutoRevoke"
        packageName="com.google.android.permissioncontroller"
        profile="all_profiles"
        refreshOnPageOpenAllowed="true"/>
</safety-sources-group>

กลุ่มดังกล่าวจะแสดงเป็นรายการที่เข้มงวดใน UI

กลุ่มที่ซ่อนไว้

กลุ่มที่ซ่อนจะมีเฉพาะแหล่งข้อมูลด้านความปลอดภัยที่เกี่ยวข้องกับปัญหาเท่านั้นและไม่มีชื่อ กลุ่มที่ซ่อนจะไม่ปรากฏใน UI ดังนี้

<safety-sources-group
    id="HiddenGroup">
    <issue-only-safety-source
        id="AndroidAccessibility"
        packageName="com.google.android.permissioncontroller"
        profile="all_profiles"
        refreshOnPageOpenAllowed="true"/>
</safety-sources-group>

ข้อมูลแบบไดนามิกสำหรับรายการแบบคงที่

คุณสามารถแสดงผลแหล่งข้อมูลของศูนย์ความปลอดภัยแบบไดนามิกเป็นรายการแบบคงที่ ซึ่งช่วยให้ การพุชรายการการเปลี่ยนเส้นทางโดยขึ้นอยู่กับเงื่อนไขบางอย่าง และอนุญาตให้ปรับแต่ง เนื้อหาขณะรันไทม์ กำหนดแหล่งที่มาแบบไดนามิกภายในกลุ่มแบบไม่เก็บสถานะสำหรับ เช่น ขึ้นอยู่กับการป้อนข้อมูลนโยบายการทำงาน

ตัวอย่างนี้แสดงแหล่งที่มาความปลอดภัยแบบไดนามิกที่ไม่ได้ให้สัญญาณความปลอดภัย เนื่องจากอยู่ในกลุ่มแบบไม่เก็บสถานะ

<safety-sources-group
    id="AndroidAdvancedSources"
    title="@com.google.android.safetycenter.resources:string/google_advanced_title">
    <dynamic-safety-source
        id="AndroidWorkPolicyInfo"
        packageName="com.google.android.permissioncontroller"
        profile="primary_profile_only"
        initialDisplayState="hidden"
        refreshOnPageOpenAllowed="true"/>
            <!-- … -->
</safety-sources-group>

ในตัวอย่างนี้ แหล่งที่มาสามารถพุชเฉพาะการ์ดคำเตือนสีเขียวและระบุ สถานะที่ไม่ได้ระบุ แหล่งที่มาต้องอยู่ใน "ข้อมูลอื่น" เท่านั้น กลุ่มที่เก็บสถานะ

ปรับแต่งสตริงและช่องโฆษณาซ้อนทับ

สำหรับอุปกรณ์ GMS ที่ไม่ได้รับการกำหนดค่าให้รับการอัปเดตเมนไลน์แทน ซ้อนทับไฟล์การกำหนดค่าทั้งไฟล์ คุณสามารถวางซ้อนทรัพยากรสตริง 6 รายการเพื่อ ตอบสนองความต้องการที่กำหนดเองได้ทั้งหมด ทรัพยากรสตริงที่มีการวางซ้อนจะแสดงรายการ ในตาราง

ทรัพยากรสตริง คำอธิบาย
google_lock_screen_sources_summary วางซ้อนค่านี้เพื่อกำหนดข้อมูลสรุปแบบคงที่ที่จะแสดงสำหรับ กลุ่ม AndroidLockScreenSources เมื่อแหล่งที่มาทั้งหมดใน กลุ่มอยู่ในสถานะที่ดี (ข้อมูลหรือความรุนแรงที่ไม่ได้ระบุ ระดับ) ศูนย์ความปลอดภัยจะแสดงชื่อของแหล่งที่มาทั้งหมดโดยค่าเริ่มต้น ในกลุ่มที่ต่อกันเป็นข้อมูลสรุปสำหรับกลุ่ม
google_biometrics_title วางซ้อนค่านี้เพื่อระบุชื่อแบบคงที่สำหรับแหล่งข้อมูลไบโอเมตริก เป็นของแพ็กเกจ com.android.settings ที่ใช้เมื่อไม่มี ข้อมูลแบบไดนามิกได้มาจากแหล่งที่มา วางซ้อนข้อมูลนี้เมื่อ วางซ้อนชื่อแบบไดนามิก ที่ได้จากแหล่งที่มาใน แพ็กเกจ com.android.settings ระบบจะละเว้นรายการนี้โดยค่าเริ่มต้น เนื่องจากสถานะการแสดงผลเริ่มต้นของแหล่งที่มาคือ hidden
google_biometrics_summary วางซ้อนค่านี้เพื่อกำหนดข้อมูลสรุปแบบคงที่สำหรับข้อมูลไบโอเมตริก แหล่งที่มาที่เป็นของแพ็กเกจ com.android.settings ที่ใช้ เมื่อแหล่งที่มาไม่ได้ระบุข้อมูลแบบไดนามิก ซึ่งละเว้นโดย เป็นค่าเริ่มต้นเนื่องจากสถานะการแสดงผลเริ่มต้นของแหล่งที่มาคือ hidden
google_biometrics_search_terms วางซ้อนค่านี้เพื่อกำหนดรายการข้อความค้นหาสำหรับข้อมูลไบโอเมตริก แหล่งที่มาที่เป็นของแพ็กเกจ com.android.settings
google_biometrics_initial_display_state วางซ้อนค่านี้เพื่อแสดงรายการ UI สำหรับแหล่งข้อมูลไบโอเมตริกที่เป็นเจ้าของ ตามแพ็กเกจ com.android.settings เมื่อไม่มีข้อมูลแบบไดนามิก มาจากแหล่งที่มา ค่าเริ่มต้นคือ hidden
google_security_updates_intent วางซ้อนค่านี้เพื่อเปลี่ยน Intent ที่ใช้ในการเปิดกิจกรรม ซึ่งให้ผู้ใช้ตรวจสอบและติดตั้งการอัปเดตความปลอดภัยได้ ช่วงเวลานี้ การดำเนินการ Intent ต้องเชื่อมโยงกับกิจกรรมที่ส่งออก ค่าเริ่มต้นคือ android.settings.SYSTEM_UPDATE_SETTINGS

ไม่มีสตริงอื่นๆ ในแพ็กเกจ com.google.android.safetycenter.resources วางซ้อนได้

สำหรับอุปกรณ์ AOSP ทรัพยากรทั้งหมดในcom.android.safetycenter.resources สามารถวางซ้อนได้โดยไม่มีข้อจำกัดใดๆ ในเนื้อหา

สำหรับอุปกรณ์ GMS ที่ไม่ได้รับการกำหนดค่าให้รับการอัปเดตเมนไลน์ ให้สร้าง การแทนที่หรือวางซ้อนแพ็กเกจ com.google.android.safetycenter.resources รายการ com.android.safetycenter.resources ที่กำหนดสตริงทั้งหมดที่คาดไว้ภายใน การทดสอบ GTS

สตริงเหล่านี้ได้แก่

  • google_app_security_sources_title
  • google_app_security_sources_summary
  • google_play_protect_title
  • google_play_protect_title_for_work
  • google_play_protect_summary
  • google_play_protect_search_terms
  • google_lock_screen_sources_title
  • google_lock_screen_sources_summary
  • google_lock_screen_title
  • google_lock_screen_summary
  • google_lock_screen_search_terms
  • google_biometrics_title
  • google_biometrics_summary
  • google_biometrics_search_terms
  • google_biometrics_initial_display_state
  • google_accounts_sources_title
  • google_accounts_sources_summary
  • google_security_checkup_title
  • google_security_checkup_title_for_work
  • google_security_checkup_summary
  • google_security_checkup_search_terms
  • google_device_finder_sources_title
  • google_device_finder_sources_summary
  • google_find_my_device_title
  • google_find_my_device_summary
  • google_find_my_device_search_terms
  • google_updates_title
  • google_updates_summary
  • google_security_updates_title
  • google_security_updates_summary
  • google_security_updates_search_terms
  • google_security_updates_intent
  • google_play_system_update_title
  • google_play_system_update_summary
  • google_play_system_update_search_terms
  • google_privacy_sources_title
  • google_privacy_sources_summary
  • google_permission_usage_title
  • google_permission_usage_summary
  • google_permission_usage_search_terms
  • google_permission_manager_title
  • google_permission_manager_summary
  • google_permission_manager_search_terms
  • google_privacy_controls_title
  • google_privacy_controls_summary
  • google_privacy_controls_search_terms
  • google_advanced_title
  • google_advanced_security_title
  • google_advanced_security_summary
  • google_advanced_security_search_terms
  • google_advanced_privacy_title
  • google_advanced_privacy_summary
  • google_advanced_privacy_search_terms

ข้อกำหนดการปรับแต่ง

ข้อกำหนดรูปแบบไฟล์

ไฟล์การกำหนดค่าต้องเป็นไฟล์ XML และเป็นไปตามรูปแบบที่อธิบายไว้ใน อัปเดตไฟล์การกำหนดค่า ไฟล์ต้องอยู่ใน raw โฟลเดอร์ โดยต้องเป็นไปตามตัวแปรที่อธิบายไว้ในปรับแต่งศูนย์ความปลอดภัย แหล่งที่มาและ ปรับแต่งแหล่งที่มาของศูนย์ความปลอดภัย กลุ่ม หาก ไฟล์การกำหนดค่าไม่ได้มีลักษณะสอดคล้องกับข้อกำหนดข้างต้น ฟีเจอร์ถูกปิดใช้งานโดยสิ้นเชิง การแยกวิเคราะห์ไฟล์นี้ได้รับการสนับสนุนโดย CTS และ GTS ด้วย ที่สามารถให้บริบทเพิ่มเติมในกรณีที่ไฟล์มีรูปแบบไม่ถูกต้อง (เปิด ของ logcat บันทึกของอุปกรณ์)

อุปกรณ์ของบริการ Google

ในอุปกรณ์ GMS จะมีการกำหนดข้อจำกัดบางอย่างในไฟล์นี้ รองรับโดย GTS การทดสอบ

อุปกรณ์ AOSP

ในอุปกรณ์ AOSP ไฟล์การกำหนดค่าต้องมีรูปแบบที่ถูกต้องและส่ง CTS การทดสอบด้านความปลอดภัย ของเรา การทดสอบจะยืนยันว่าไฟล์มีรูปแบบที่ถูกต้อง นอกจากนี้อุปกรณ์ GMS ยังต้องมี ผ่านการทดสอบเหล่านี้