Merge changes I60d2b23a,I7cb15a46 into main

* changes:
  [Accessibility] Color Contrast address talkback bugs
  [Accessibility] Color Contrast address UX bugs
This commit is contained in:
Marcus Ge
2024-03-26 20:26:10 +00:00
committed by Android (Google) Code Review
7 changed files with 189 additions and 87 deletions

View File

@@ -0,0 +1,37 @@
/*
* Copyright (C) 2024 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.accessibility;
import android.content.Context;
import androidx.annotation.NonNull;
import com.android.settings.R;
/** Preference controller for footer in color contrast page. */
public class ColorContrastFooterPreferenceController extends
AccessibilityFooterPreferenceController {
public ColorContrastFooterPreferenceController(@NonNull Context context,
@NonNull String key) {
super(context, key);
}
@Override
protected String getIntroductionTitle() {
return mContext.getString(R.string.color_contrast_about_title);
}
}

View File

@@ -26,7 +26,7 @@ import android.app.UiModeManager;
import android.content.Context;
import android.provider.Settings;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@@ -53,7 +53,7 @@ public class ContrastSelectorPreferenceController extends BasePreferenceControll
private final Executor mMainExecutor;
private final UiModeManager mUiModeManager;
private Map<Integer, FrameLayout> mContrastButtons = new HashMap<>();
private Map<Integer, LinearLayout> mContrastButtons = new HashMap<>();
public ContrastSelectorPreferenceController(@NonNull Context context,
@NonNull String preferenceKey) {