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

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

หากต้องการเปิดใช้งานหรือปิดใช้งาน Safety Center ให้ใช้ฟิลด์บูลีน config_enableSafetyCenter ที่ซ้อนทับได้ในไฟล์ frameworks/base/core/res/res/values/config.xml

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

ค่าสถานะ DeviceConfig

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

ใน Android 14 ขึ้นไป ไม่จำเป็นต้องดำเนินการใดๆ เพิ่มเติม เนื่องจากการตั้งค่าสถานะนี้เป็น true ตามค่าเริ่มต้น

ใน Android 13 ศูนย์ความปลอดภัยจะปิดใช้โดยค่าเริ่มต้นฝั่งเซิร์ฟเวอร์และเปิดใช้โดยรายการที่อนุญาตโดยใช้แฟล็กนี้ ส่งลายนิ้วมืออุปกรณ์ของคุณและติดต่อ TAM ของคุณเพื่อเพิ่มลงในรายการที่อนุญาต โปรดทราบว่าต้องเพิ่มเวอร์ชันหลัก M-2022-11 หรือสูงกว่าลงในรายการที่อนุญาต สำหรับการพัฒนาและการทดสอบในเครื่อง คุณสามารถเปิดใช้งานหรือปิดใช้งานการตั้งค่าสถานะในเครื่องได้ (จนกว่าจะรีบูต) ด้วยคำสั่ง 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 ที่กำหนดค่าให้รับการอัปเดต Mainline ให้กำหนดเป้าหมายแพ็คเกจ com.google.android.safetycenter.resources กำหนดเป้าหมายการกำหนดค่า SafetyCenterConfig การกำหนดค่านี้ต้องการให้แพ็คเกจโอเวอร์เลย์อยู่ใน product system หรือพาร์ติชัน vendor OEM ของ GMS ควรคัดลอก ไฟล์ safety_center_config.xml ที่ Google มอบให้ และจำกัดการแก้ไขเฉพาะที่ได้รับอนุญาตจาก การทดสอบ 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 ที่ไม่ได้กำหนดค่าให้รับการอัปเดต Mainline ให้กำหนดเป้าหมายแพ็คเกจ com.android.safetycenter.resources ไม่มีการกำหนดค่าซ้อนทับที่จะกำหนดเป้าหมาย แพ็คเกจซ้อนทับต้องใช้ชื่อแพ็คเกจ com.google.android.safetycenter.resources

OEM ของ GMS ควรคัดลอกไฟล์ 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
    • ตัวระบุที่ไม่ซ้ำสำหรับแหล่งที่มาด้านความปลอดภัย จะต้องไม่ซ้ำกันในไฟล์ทั้งหมด และต้องประกอบด้วยอักขระตัวอักษรเท่านั้น (az, AZ) และคำนึงถึงตัวพิมพ์เล็กและตัวพิมพ์ใหญ่
    • ประเภทสตริง
    • จำเป็นสำหรับแหล่งความปลอดภัยทุกประเภท
  • 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 หลายรายการจะถูกสร้างขึ้น (หนึ่งรายการสำหรับโปรไฟล์พาเรนต์ และอีกรายการหนึ่งสำหรับแต่ละโปรไฟล์ที่ได้รับการจัดการ) แหล่งที่มาด้านความปลอดภัยสามารถให้ข้อมูลที่แตกต่างกันสำหรับแต่ละโปรไฟล์ได้
    • จำเป็นสำหรับแหล่งความปลอดภัยทั้งหมด
  • 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
    • หากการกระทำตามเจตนานี้ไม่ได้รับการแก้ไขสำหรับ 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
    • จำเป็นหากมีอย่างน้อยหนึ่งแหล่งความปลอดภัยแบบไดนามิกหรือคงที่ภายในกลุ่ม (กล่าวคือ กลุ่มนั้นไม่ใช่ 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 ที่ไม่ได้กำหนดค่าให้รับการอัปเดต Mainline แทนที่จะซ้อนทับไฟล์การกำหนดค่าทั้งหมด คุณสามารถซ้อนทับทรัพยากรสตริงหกรายการเพื่อตอบสนองความต้องการในการปรับแต่งทั้งหมดได้ ทรัพยากรสตริงที่ซ้อนทับแสดงอยู่ในตาราง

ทรัพยากรสตริง คำอธิบาย
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 ซ้อนทับค่านี้เพื่อเปลี่ยนจุดประสงค์ที่จำเป็นในการเปิดกิจกรรมที่อนุญาตให้ผู้ใช้ตรวจสอบและติดตั้งการอัปเดตความปลอดภัย การดำเนินการตามเจตนานี้จะต้องเชื่อมโยงกับกิจกรรมที่ส่งออก ค่าเริ่มต้นคือ android.settings.SYSTEM_UPDATE_SETTINGS

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

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

สำหรับอุปกรณ์ GMS ที่ไม่ได้กำหนดค่าให้รับการอัปเดต Mainline ให้สร้างแพ็คเกจ 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 จะต้องผ่านการทดสอบเหล่านี้ด้วย