Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 963e3fdd authored by Julia Reynolds's avatar Julia Reynolds Committed by Android (Google) Code Review
Browse files

Merge "Talkback improvements for Settings screens." into mnc-dev

parents 5c3b7c3a ce25af48
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -27,7 +27,8 @@
            android:layout_marginEnd="12dp"
            android:layout_marginTop="12dp"
            android:layout_weight="1">
        <LinearLayout android:layout_width="match_parent"
        <LinearLayout android:id="@+id/master_clear_container"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical">
            <TextView
+1 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@
    >

    <TextView
        android:id="@+id/master_clear_confirm"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="12dp"
+8 −0
Original line number Diff line number Diff line
@@ -1921,6 +1921,14 @@
    <string name="category_personal">Personal</string>
    <!-- Header for items under the work user [CHAR LIMIT=30] -->
    <string name="category_work">Work</string>
    <!-- Content description for work profile accounts group [CHAR LIMIT=NONE] -->
    <string name="accessibility_category_work">Work profile accounts - <xliff:g id="managed_by" example="Managed by Corporate application">%s</xliff:g></string>
    <!-- Content description for personal profile accounts group [CHAR LIMIT=NONE] -->
    <string name="accessibility_category_personal">Personal profile accounts</string>
    <!-- Content description for work profile details page title [CHAR LIMIT=NONE] -->
    <string name="accessibility_work_account_title">Work account - <xliff:g id="managed_by" example="Email provider">%s</xliff:g></string>
    <!-- Content description for personal profile details page title [CHAR LIMIT=NONE] -->
    <string name="accessibility_personal_account_title">Personal account - <xliff:g id="managed_by" example="Email provider">%s</xliff:g></string>
    <!-- Main Settings screen, setting option name to go into search settings -->
    <string name="search_settings">Search</string>
+43 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2015 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;

import android.content.Context;
import android.preference.PreferenceCategory;
import android.view.View;

/**
 * Preference category that accepts a content description for accessibility.
 */
public class AccessiblePreferenceCategory extends PreferenceCategory {
    private String mContentDescription;

    public AccessiblePreferenceCategory(Context context) {
        super(context);
    }

    public void setContentDescription(String contentDescription) {
        mContentDescription = contentDescription;
    }

    @Override
    protected void onBindView(View view) {
        super.onBindView(view);

        view.setContentDescription(mContentDescription);
    }
}
+12 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.settings;

import android.annotation.Nullable;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
@@ -82,6 +83,17 @@ public abstract class ConfirmDeviceCredentialBaseFragment extends InstrumentedFr
        }
    }

    protected void setAccessibilityTitle(CharSequence suplementalText) {
        Intent intent = getActivity().getIntent();
        if (intent != null) {
            CharSequence titleText = intent.getCharSequenceExtra(
                    ConfirmDeviceCredentialBaseFragment.TITLE_TEXT);
            String accessibilityTitle =
                    new StringBuilder(titleText).append(",").append(suplementalText).toString();
            getActivity().setTitle(Utils.createAccessibleSequence(titleText, accessibilityTitle));
        }
    }

    @Override
    public void onPause() {
        super.onPause();
Loading