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

Commit 1c75a77d authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Accessibility improvement around blue user education card" into ub-launcher3-master

parents a7c28940 913a7da5
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@
    android:layout_gravity="bottom"
    android:background="?android:attr/colorAccent"
    android:elevation="2dp"
    android:focusable="true"
    android:orientation="horizontal">

  <ImageView
@@ -42,6 +43,7 @@
        android:layout_marginTop="12dp"
        android:layout_marginEnd="12dp"
        android:layout_gravity="right"
        android:contentDescription="@string/bottom_work_tab_user_education_close_button"
        android:src="@drawable/ic_close"/>

    <TextView
+2 −1
Original line number Diff line number Diff line
@@ -330,5 +330,6 @@
    <string name="work_mode_on_label">Managed by your organization</string>
    <!-- This string appears under a the label of a toggle in the work profile tab on a user's phone. It describes the status of the toggle, "Work profile," when it's turned off. "Work profile" means a separate profile on a user's phone that's speficially for their work apps and is managed by their company.-->
    <string name="work_mode_off_label">Notifications and apps are off</string>

    <string name="bottom_work_tab_user_education_close_button">Close</string>
    <string name="bottom_work_tab_user_education_closed">Closed</string>
</resources>
+8 −0
Original line number Diff line number Diff line
@@ -22,11 +22,15 @@ import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.TouchDelegate;
import android.view.View;
import android.view.accessibility.AccessibilityEvent;

import com.android.launcher3.Insettable;
import com.android.launcher3.Launcher;
import com.android.launcher3.R;
import com.android.launcher3.anim.Interpolators;

import static com.android.launcher3.compat.AccessibilityManagerCompat.sendCustomAccessibilityEvent;

public class BottomUserEducationView extends AbstractSlideInView implements Insettable {

    private static final String KEY_SHOWED_BOTTOM_USER_EDUCATION = "showed_bottom_user_education";
@@ -90,6 +94,10 @@ public class BottomUserEducationView extends AbstractSlideInView implements Inse
            // close action.
            mLauncher.getSharedPrefs().edit()
                    .putBoolean(KEY_SHOWED_BOTTOM_USER_EDUCATION, true).apply();
            sendCustomAccessibilityEvent(
                    BottomUserEducationView.this,
                    AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED,
                    getContext().getString(R.string.bottom_work_tab_user_education_closed));
        }
    }