Add MTE Settings.
MTE is a technology to help prevent exploitation of some security bugs. We want to offer users that want to trade off a slight reduction in performance for higher security the option to do so from the settings menu. Test: make RunSettingsRoboTests check UI manually Bug: 245624194 Change-Id: Ifbb76e124142ae843ce90bd604ae8417d65fcc7b
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright (C) 2022 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.
|
||||
*/
|
||||
|
||||
package com.android.settings.security;
|
||||
|
||||
import com.android.internal.os.Zygote;
|
||||
|
||||
import org.robolectric.annotation.Implementation;
|
||||
import org.robolectric.annotation.Implements;
|
||||
|
||||
@Implements(Zygote.class)
|
||||
public class ZygoteShadow {
|
||||
private static boolean sSupportsMemoryTagging;
|
||||
|
||||
static void setSupportsMemoryTagging(boolean value) {
|
||||
sSupportsMemoryTagging = value;
|
||||
}
|
||||
|
||||
@Implementation
|
||||
public static boolean nativeSupportsMemoryTagging() {
|
||||
return sSupportsMemoryTagging;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user