התאם אישית את מרכז הבטיחות

הפעל או השבת את מרכז הבטיחות

כדי להפעיל או להשבית את מרכז הבטיחות, השתמש בשדה הבוליאני config_enableSafetyCenter הניתן ל-overlay בקובץ 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 ) משמש להפעלה או השבתה מרחוק של מרכז הבטיחות.

באנדרואיד 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 , ראה שינוי הערך של משאבי אפליקציה בזמן ריצה לקבלת מידע על שינוי שכבות על משאבי זמן ריצה (RROs).

ב-Android 14, הקפד לשכב על קובץ res/raw-v34/safety_center_config.xml ולא ה- res/raw/safety_center_config.xml , מכיוון שהקודם מקבל עדיפות (זה חל גם על קבצים אחרים עם היקף v34 עבור למשל res/values-v34/strings.xml ). חבילת שכבת-העל חייבת להיות בעלת SDK מינימלית נמוכה מ 34 , אחרת ייתכן שה- v34 qualifier יוסר במהלך האופטימיזציה. הקפד גם להשתמש בשכבת-על סטטית, שכן ערך זה נטען סביב זמן האתחול.

עבור מכשירי Android Open Source Project (AOSP), מקד לחבילה com.android.safetycenter.resources . אין תצורת שכבת-על למיקוד. כל המשאבים ניתנים לשכבת-על ללא הגבלה על התוכן.

עבור מכשירי GMS שמוגדרים לקבל עדכוני Mainline, מקד לחבילה com.google.android.safetycenter.resources . כוון את התצורה SafetyCenterConfig . תצורה זו מחייבת שחבילת שכבת העל תהיה במחיצת product , system או vendor . יצרני ציוד מקורי של 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 .

יצרני ציוד מקורי של GMS צריכים להעתיק את הקובץ safety_center_config.xml שסופק על ידי Google ולהגביל את השינויים לאלו המותרים על ידי מבחני GTS. יצרני OEM של GMS חייבים גם להגדיר את המחרוזות המשמשות בתצורת ה-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>

קובץ התצורה של גוגל

קובץ התצורה של AOSP ממוקם packages/modules/Permission/SafetyCenter/Resources/res/raw/safety_center_config.xml .

באנדרואיד 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>

באנדרואיד 14, קובץ התצורה של גוגל הוא:

<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
    • כיצד מוצג ערך ממשק המשתמש כאשר מקור הבטיחות לא מספק נתונים
    • סוג Enum המיוצג כמחרוזת, חייב להיות אחד מהבאים:
      • enabled (ברירת מחדל, מוצג כרגיל)
      • disabled (מוצג באפור, לא ניתן ללחוץ עליו)
      • hidden (לא מוצג)
    • אופציונלי עבור מקורות בטיחות דינמיים (ברירת המחדל enabled )
    • אסור למקורות בטיחות סטטיים בלבד
  • profile
    • האם מקור הבטיחות הזה מקיים אינטראקציה עם הפרופיל המנוהל של המשתמש
    • סוג Enum המיוצג כמחרוזת, חייב להיות אחד מהבאים:
      • primary_profile_only (מקיים אינטראקציה רק ​​עם אב הפרופיל בלבד)
      • all_profiles (יכול גם לקיים אינטראקציה עם הפרופיל/ים המנוהלים)
    • ב- all_profiles נוצרות מספר כניסות ממשק משתמש (אחת עבור האב הפרופיל, ואחת עבור כל פרופיל מנוהל); מקור הבטיחות יכול לספק נתונים שונים עבור כל פרופיל
    • נדרש עבור כל מקורות הבטיחות
  • searchTerms
    • רשימה של מונחי חיפוש שממפים לערך מרכז הבטיחות בעת שימוש בחיפוש באפליקציית ההגדרות
    • מזהה משאב מיוצג כשם משאב מלא, לדוגמה, @package:string/my_search_terms
    • אופציונלי עבור מקורות בטיחות דינמיים וסטטיים (ברירת המחדל היא ללא מונחי חיפוש)
    • אסור למקורות בטיחות הקשורים לבעיות בלבד
  • title
    • כותרת ברירת המחדל של ערך ממשק המשתמש, משמשת כאשר לא מסופקים נתונים באופן דינמי על ידי המקור
    • מזהה משאב מיוצג כשם משאב מלא, לדוגמה, @package:string/my_title
    • נדרש עבור מקורות בטיחות דינמיים וסטטיים (אלא אם initialDisplayState="hidden" ללא מונחי searchTerms )
    • אסור למקורות בטיחות הקשורים לבעיות בלבד
  • titleForWork
    • כותרת ברירת המחדל של ערך ממשק המשתמש עבור הפרופיל המנוהל המשמש כאשר הנתונים אינם מסופקים באופן דינמי על ידי המקור
    • מזהה משאב מיוצג כשם משאב מלא, לדוגמה, @package:string/my_title_for_work
    • נדרש עבור מקורות בטיחות דינמיים וסטטיים שציינו profile="all_profiles" (אלא אם initialDisplayState="hidden" ללא מונחי searchTerms )
    • אסור עבור מקורות בטיחות הקשורים לבעיות בלבד או מקורות עם profile="primary_profile_only"
  • summary
    • סיכום ברירת המחדל של ערך ממשק המשתמש (זהו תיאור טקסט ארוך יותר המוצג מתחת לכותרת), משמש כאשר הנתונים אינם מסופקים באופן דינמי על ידי המקור
    • מזהה משאב מיוצג כשם משאב מלא, לדוגמה, @package:string/my_summary
    • אופציונלי עבור מקורות בטיחות סטטיים (ברירת המחדל אינה סיכום)
    • נדרש עבור מקורות בטיחות דינמיים (אלא אם initialDisplayState hidden )
    • אסור למקורות בטיחות הקשורים לבעיות בלבד
  • intentAction
    • פעולה להפעלה כאשר לחיצה על ערך ממשק המשתמש
    • סוג מחרוזת, לדוגמה, com.google.android.settings.security.SECURITY_ADVANCED_SETTINGS , או מזהה משאב המיוצג כשם משאב מלא, לדוגמה, @package:string/my_intent_action
    • אם פעולת הכוונה הזו לא נפתרת עבור packageName הנתון (אם יש), ערך ממשק המשתמש מתנהג באותו האופן שבו initialDisplayState="disabled"
    • נדרש עבור מקורות בטיחות סטטיים ומקורות בטיחות dynamic עם initialDisplayState="enabled"
    • אסור למקורות בטיחות הקשורים לבעיות בלבד
  • maxSeverityLevel
    • רמת חומרה מקסימלית שמקור מרכז הבטיחות הזה יכול לספק
    • מספר שלם המיוצג כמחרוזת, לדוגמה, 300
    • אופציונלי עבור מקורות בטיחות דינמיים ולבעיות בלבד (ברירת המחדל אינה מקסימום)
    • אסור עבור מקורות בטיחות סטטיים
  • loggingAllowed
    • האם מרכז הבטיחות יכול לרשום אינטראקציות או נתונים הקשורים למקור זה
    • בוליאנית מיוצגת כמחרוזת, למשל false
    • אופציונלי עבור מקורות בטיחות דינמיים ולבעיות בלבד (ברירת המחדל היא true )
    • אסור עבור מקורות בטיחות סטטיים
  • refreshOnPageOpenAllowed
    • האם יש לשלוח אות למקור הבטיחות כדי לרענן את הנתונים שלו כאשר מסך מרכז הבטיחות נפתח
    • בוליאנית המיוצגת כמחרוזת, למשל, true
    • אופציונלי עבור מקורות בטיחות דינמיים ובעלי בעיות בלבד (ברירת המחדל היא false )
    • אסור עבור מקורות בטיחות סטטיים
  • notificationsAllowed (החל מ-Android 14)
    • האם מקור הבטיחות יכול לספק הודעה אופציונלית בעת דיווח על בעיה
    • בוליאנית המיוצגת כמחרוזת, למשל, true
    • אופציונלי עבור מקורות בטיחות דינמיים ובעלי בעיות בלבד (ברירת המחדל היא false )
    • אסור עבור מקורות בטיחות סטטיים
  • deduplicationGroup (מתחיל אנדרואיד 14)
    • מזהה ייחודי פוטנציאלי שניתן להשתמש בו כדי לבטל כפילות של בעיות המגיעות ממקורות שונים. מקורות בתוך אותה קבוצת מניעת כפילויות יכולים לשלוח בעיות עם מזהה ביטול כפילות אופציונלי. בעיות עם אותו מזהה ביטול כפילויות יוצגו רק פעם אחת בממשק המשתמש, גם אם מספר מקורות שולחים אותן.
    • סוג מחרוזת
    • אופציונלי עבור מקורות בטיחות דינמיים ולבעיות בלבד (ברירת המחדל אינה מניעת כפילויות)
    • אסור עבור מקורות בטיחות סטטיים
  • packageCertificateHashes (מתחיל אנדרואיד 14)
    • רשימה מופרדת בפסיק של גיבוב אישורים עבור שם packageName הנתון. אם זה מוגדר, תבוצע בדיקת אישור מול החבילה הנתונה packageCertificateHashes עבור packageName בעת ​​אינטראקציה עם מקור הבטיחות, למטרות אבטחה.
    • סוג מחרוזת
    • אופציונלי עבור מקורות בטיחות דינמיים ובעלי בעיות בלבד (ברירת המחדל היא ללא בדיקות אישורים)
    • אסור עבור מקורות בטיחות סטטיים

התאם אישית קבוצות מקורות של מרכז הבטיחות

מקורות מרכז הבטיחות חייבים להיכלל בתוך קבוצת מקורות מרכז בטיחות. כל קבוצת מקור מוצגת בממשק המשתמש בסדר שבו קבוצות מקור מופיעות בקובץ. כל מקור מוצג בתוך הקבוצה לפי סדר שמות המקורות בקובץ. אם הקבוצה מכילה מקור בטיחות יחיד, היא מוצגת כערך בודד ולא כקבוצה.

תצורת קבוצת מקורות מרכז הבטיחות

השתמש במשתנים הבאים כדי להתאים אישית קבוצות מקור של מרכז הבטיחות:

  • id
    • מזהה ייחודי לקבוצת מקורות הבטיחות; חייב להיות ייחודי בקובץ כולו
    • סוג מחרוזת
    • נדרש
  • title
    • כותרת הקבוצה בממשק המשתמש
    • מזהה משאב מיוצג כשם משאב מלא, לדוגמה, @package:string/my_title
    • נדרש אם יש לפחות מקור בטיחות דינמי או סטטי אחד בתוך הקבוצה (כלומר, הקבוצה אינה type="hidden" )
  • summary
    • תיאור קצר של הקבוצה בממשק המשתמש, מוצג מתחת לכותרת. מוצג בתנאים ספציפיים, בדרך כלל כאשר נתונים לא מסופקים; אחרת, הסיכום מחושב על סמך הנתונים המסופקים על ידי המקורות בקבוצה.
    • מזהה משאב מיוצג כשם משאב מלא, לדוגמה, @package:string/my_summary
    • אופציונלי (ברירת המחדל אינה סיכום)
  • statelessIconType
    • סוג הסמל המוצג עבור הקבוצה כאשר לא מסופק מצב על ידי מקורות הבטיחות, למשל, ערכים סטטיים
    • סוג Enum מיוצג כמחרוזת שחייבת להיות none או privacy (סוג סמל הפרטיות)
    • אופציונלי (ברירת המחדל היא none )
  • type (מתחיל אנדרואיד 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>

באנדרואיד 13, קבוצה כזו תוצג כערך מתקפל בממשק המשתמש. באנדרואיד 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>

קבוצה כזו תוצג כרשימה נוקשה של ערכים בממשק המשתמש.

קבוצה נסתרת

קבוצה נסתרת מכילה רק מקורות בטיחות לבעיות בלבד ואין לה כותרת. קבוצות נסתרות אינן מופיעות בממשק המשתמש:

<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 שכף ערך זה כדי להציג ערך ממשק משתמש עבור המקור הביומטרי שבבעלות החבילה 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 ).

מכשירי שירותי גוגל

על מכשירי GMS, כמה אילוצים מוטלים על קובץ זה. זה נתמך על ידי מבחני GTS .

מכשירי AOSP

בהתקני AOSP, קובץ התצורה חייב להיות מעוצב היטב ולעבור את מבחני ה-CTS עבור מרכז הבטיחות. הבדיקות מאמתות שהקובץ בנוי היטב. גם מכשירי GMS חייבים לעבור את הבדיקות הללו.