summaryrefslogtreecommitdiff
path: root/java/com/android/dialershared
diff options
context:
space:
mode:
authorsail <sail@google.com>2017-06-29 08:56:18 -0700
committerBrandon Maxwell <maxwelb@google.com>2017-06-30 14:42:36 -0700
commit0986419765c49887f4c97d19295bfce1157056af (patch)
tree156b8b4e7df0b7c8b96424dd497f35187c63794e /java/com/android/dialershared
parent3331545bd3fb769ae3f9246c0bd92fe35c6308ab (diff)
Automated g4 rollback of changelist 160349111.
*** Reason for rollback *** Possible cause of Dialer crash: b/63128348 *** Original change description *** Add accessibility info for bubble. *** Bug: 62886248,63128348 Test: N/A PiperOrigin-RevId: 160531267 Change-Id: Ia9bf5fe29523d6f6280e4ed6fcf9a8d23ee72579
Diffstat (limited to 'java/com/android/dialershared')
-rw-r--r--java/com/android/dialershared/bubble/Bubble.java38
-rw-r--r--java/com/android/dialershared/bubble/BubbleInfo.java10
-rw-r--r--java/com/android/dialershared/bubble/res/values/strings.xml20
3 files changed, 0 insertions, 68 deletions
diff --git a/java/com/android/dialershared/bubble/Bubble.java b/java/com/android/dialershared/bubble/Bubble.java
index 81e1dcbfb..f2ba117d8 100644
--- a/java/com/android/dialershared/bubble/Bubble.java
+++ b/java/com/android/dialershared/bubble/Bubble.java
@@ -31,7 +31,6 @@ import android.graphics.drawable.RippleDrawable;
import android.net.Uri;
import android.os.Build.VERSION;
import android.os.Build.VERSION_CODES;
-import android.os.Bundle;
import android.os.Handler;
import android.provider.Settings;
import android.support.annotation.ColorInt;
@@ -50,15 +49,12 @@ import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
-import android.view.View.AccessibilityDelegate;
import android.view.ViewGroup;
import android.view.ViewGroup.MarginLayoutParams;
import android.view.ViewPropertyAnimator;
import android.view.ViewTreeObserver.OnPreDrawListener;
import android.view.WindowManager;
import android.view.WindowManager.LayoutParams;
-import android.view.accessibility.AccessibilityNodeInfo;
-import android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction;
import android.view.animation.AnticipateInterpolator;
import android.view.animation.OvershootInterpolator;
import android.widget.FrameLayout;
@@ -111,38 +107,6 @@ public class Bubble {
private Integer overrideGravity;
private ViewPropertyAnimator exitAnimator;
- private final AccessibilityDelegate accessibilityDelegate =
- new AccessibilityDelegate() {
- @Override
- public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfo info) {
- super.onInitializeAccessibilityNodeInfo(host, info);
- if (textShowing) {
- info.setContentDescription(viewHolder.getPrimaryText().getText());
- return;
- }
- if (expanded) {
- info.setContentDescription(currentInfo.getPrimaryContentDescription());
- info.addAction(AccessibilityAction.ACTION_CLICK);
- } else {
- info.setContentDescription(currentInfo.getBubbleContentDescription());
- info.addAction(
- new AccessibilityAction(
- AccessibilityNodeInfo.ACTION_CLICK,
- host.getContext().getString(R.string.content_description_action_bubble_click)));
- }
- info.addAction(AccessibilityAction.ACTION_MOVE_WINDOW);
- }
-
- @Override
- public boolean performAccessibilityAction(View host, int action, Bundle args) {
- if (action == AccessibilityNodeInfo.ACTION_CLICK) {
- primaryButtonClick();
- return true;
- }
- return super.performAccessibilityAction(host, action, args);
- }
- };
-
@Retention(RetentionPolicy.SOURCE)
@IntDef({CollapseEnd.NOTHING, CollapseEnd.HIDE})
private @interface CollapseEnd {
@@ -749,8 +713,6 @@ public class Bubble {
secondButton = contentView.findViewById(R.id.bubble_icon_second);
thirdButton = contentView.findViewById(R.id.bubble_icon_third);
- primaryButton.setAccessibilityDelegate(accessibilityDelegate);
-
root.setOnBackPressedListener(
() -> {
if (visibility == Visibility.SHOWING && expanded) {
diff --git a/java/com/android/dialershared/bubble/BubbleInfo.java b/java/com/android/dialershared/bubble/BubbleInfo.java
index 99875fe2a..eb9abd059 100644
--- a/java/com/android/dialershared/bubble/BubbleInfo.java
+++ b/java/com/android/dialershared/bubble/BubbleInfo.java
@@ -28,9 +28,6 @@ import java.util.List;
/** Info for displaying a {@link Bubble} */
@AutoValue
public abstract class BubbleInfo {
- @NonNull
- public abstract CharSequence getBubbleContentDescription();
-
@ColorInt
public abstract int getPrimaryColor();
@@ -38,9 +35,6 @@ public abstract class BubbleInfo {
public abstract Icon getPrimaryIcon();
@NonNull
- public abstract CharSequence getPrimaryContentDescription();
-
- @NonNull
public abstract PendingIntent getPrimaryIntent();
@Px
@@ -66,16 +60,12 @@ public abstract class BubbleInfo {
@AutoValue.Builder
public abstract static class Builder {
- public abstract Builder setBubbleContentDescription(@NonNull CharSequence description);
-
public abstract Builder setPrimaryColor(@ColorInt int primaryColor);
public abstract Builder setPrimaryIcon(@NonNull Icon primaryIcon);
public abstract Builder setPrimaryIntent(@NonNull PendingIntent primaryIntent);
- public abstract Builder setPrimaryContentDescription(@NonNull CharSequence description);
-
public abstract Builder setStartingYPosition(@Px int startingYPosition);
public abstract Builder setActions(List<Action> actions);
diff --git a/java/com/android/dialershared/bubble/res/values/strings.xml b/java/com/android/dialershared/bubble/res/values/strings.xml
deleted file mode 100644
index c68619899..000000000
--- a/java/com/android/dialershared/bubble/res/values/strings.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2017 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
- -->
-
-<resources>
- <string name="content_description_action_bubble_click">Expand drawer</string>
-</resources>