File tree Expand file tree Collapse file tree
src/com/android/settings/display Expand file tree Collapse file tree Original file line number Diff line number Diff line change 104104 android : key =" cutout_settings"
105105 android : fragment =" com.android.settings.display.CutoutFragment"
106106 android : icon =" @drawable/ic_settings_notch_display"
107- android : title =" @string/cutout_main" />
107+ android : title =" @string/cutout_main"
108+ settings : controller =" com.android.settings.display.CutoutPreferenceController" />
108109
109110 <SwitchPreference
110111 android : key =" show_operator_name"
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (C) 2021 Wave-OS
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+ package com.android.settings.display
17+
18+ import android.content.Context
19+
20+ import com.android.settings.core.TogglePreferenceController
21+
22+ class CutoutPreferenceController (context : Context ? , key : String? ) :
23+ TogglePreferenceController (context, key) {
24+
25+ override fun getAvailabilityStatus (): Int {
26+ return context.resources.getBoolean(
27+ com.android.internal.R .bool.config_fillMainBuiltInDisplayCutout
28+ ) ? AVAILABLE_UNSEARCHABLE : UNSUPPORTED_ON_DEVICE
29+ }
30+ }
You can’t perform that action at this time.
0 commit comments