Merge "Add persistent MTE toggle to development options."
This commit is contained in:
committed by
Android (Google) Code Review
commit
834dda9105
@@ -6456,6 +6456,7 @@
|
||||
<string name="help_url_privacy_dashboard" translatable="false"></string>
|
||||
|
||||
<string name="help_url_memtag" translatable="false"></string>
|
||||
<string name="help_url_development_memtag" translatable="false"></string>
|
||||
<string name="help_url_network_dashboard" translatable="false"></string>
|
||||
<string name="help_url_connected_devices" translatable="false"></string>
|
||||
<string name="help_url_apps_and_notifications" translatable="false"></string>
|
||||
@@ -10867,14 +10868,26 @@
|
||||
|
||||
<!-- Title for the button to initiate a heap dump for the system server. [CHAR LIMIT=NONE] -->
|
||||
<string name="capture_system_heap_dump_title">Capture system heap dump</string>
|
||||
|
||||
<!-- [CHAR LIMIT=32] Name of MTE page in "Developer Options" and heading of page. -->
|
||||
<string name="development_memtag_page_title">Memory Tagging Extension</string>
|
||||
<!-- [CHAR LIMIT=52] Label for button to turn on / off MTE protection.-->
|
||||
<string name="development_memtag_intro">Memory Tagging Extension (MTE) makes it easier to find memory safety issues in your app and make native code in it more secure.</string>
|
||||
<string name="development_memtag_footer">Turning on MTE might cause slower device performance.</string>
|
||||
<string name="development_memtag_learn_more">Learn more about MTE</string>
|
||||
<string name="development_memtag_toggle">Enable MTE until you turn it off</string>
|
||||
<!-- [CHAR LIMIT=NONE] Message shown in dialog prompting user to reboot device to turn on MTE.-->
|
||||
<string name="development_memtag_reboot_message_on">You\u0027ll need to restart your device to turn on MTE.</string>
|
||||
<!-- [CHAR LIMIT=NONE] Message shown in dialog prompting user to reboot device to turn off MTE.-->
|
||||
<string name="development_memtag_reboot_message_off">You\u0027ll need to restart your device to turn off MTE.</string>
|
||||
<!-- Title for the button to reboot with MTE enabled. [CHAR LIMIT=NONE] -->
|
||||
<string name="reboot_with_mte_title">Reboot with MTE</string>
|
||||
<string name="reboot_with_mte_message">System will reboot and allow to experiment with Memory Tagging Extension (MTE). MTE may negatively impact system performance and stability. Will be reset on next subsequent reboot.</string>
|
||||
<string name="reboot_with_mte_title">Enable MTE for a single session</string>
|
||||
<string name="reboot_with_mte_message">System will restart and allow to experiment with Memory Tagging Extension (MTE). MTE may negatively impact system performance and stability. Will be reset on next subsequent reboot.</string>
|
||||
<!-- Subtext for button if MTE is not enabled through Advanced memory protection. -->
|
||||
<string name="reboot_with_mte_summary">Try MTE for a single boot for app development</string>
|
||||
<string name="reboot_with_mte_summary">Restart for a single session with MTE enabled</string>
|
||||
<!-- Subtext for button if MTE is already enabled through Advanced memory protection.
|
||||
The string for "Advanced memory protection" needs to match "memtag_toggle" above -->
|
||||
<string name="reboot_with_mte_already_enabled">MTE is enabled through Advanced memory protection</string>
|
||||
<string name="reboot_with_mte_already_enabled">MTE is already enabled</string>
|
||||
<!-- Toast that is shown when the user initiates capturing a heap dump for the system server. [CHAR LIMIT=NONE] -->
|
||||
<string name="capturing_system_heap_dump_message">Capturing system heap dump</string>
|
||||
<!-- Toast that is shown if there's an error capturing the user initiated heap dump. [CHAR LIMIT=NONE] -->
|
||||
|
||||
41
res/xml/development_memtag_page.xml
Normal file
41
res/xml/development_memtag_page.xml
Normal file
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2023 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
||||
android:title="@string/development_memtag_page_title">
|
||||
|
||||
<com.android.settingslib.widget.TopIntroPreference
|
||||
android:title="@string/development_memtag_intro"
|
||||
settings:searchable="false"/>
|
||||
|
||||
<com.android.settingslib.RestrictedSwitchPreference
|
||||
android:key="development_memtag"
|
||||
android:title="@string/development_memtag_toggle"
|
||||
settings:controller="com.android.settings.development.DevelopmentMemtagPreferenceController" />
|
||||
|
||||
<Preference
|
||||
android:key="reboot_with_mte"
|
||||
android:title="@string/reboot_with_mte_title"
|
||||
settings:controller="com.android.settings.development.RebootWithMtePreferenceController" />
|
||||
|
||||
<com.android.settingslib.widget.FooterPreference
|
||||
android:title="@string/development_memtag_footer"
|
||||
android:key="memtag_footer"
|
||||
settings:searchable="false"
|
||||
settings:controller="com.android.settings.development.DevelopmentMemtagFooterPreferenceController" />
|
||||
</PreferenceScreen>
|
||||
@@ -45,8 +45,9 @@
|
||||
android:title="@string/capture_system_heap_dump_title" />
|
||||
|
||||
<Preference
|
||||
android:key="reboot_with_mte"
|
||||
android:title="@string/reboot_with_mte_title" />
|
||||
android:key="development_memtag_page"
|
||||
android:title="@string/development_memtag_page_title"
|
||||
android:fragment="com.android.settings.development.DevelopmentMemtagPage" />
|
||||
|
||||
<Preference
|
||||
android:key="local_backup_password"
|
||||
|
||||
Reference in New Issue
Block a user