summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/folder
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2016-09-02 10:41:43 -0700
committerSunny Goyal <sunnygoyal@google.com>2016-09-02 10:52:07 -0700
commit52851aa3fd2dd9957e190d779f904f6abaf53fed (patch)
treea45ec27214e4f1e6e074d15451c0fb469884305b /src/com/android/launcher3/folder
parent94b510cc683a6436ae82c6d323cbd8b429561b06 (diff)
downloadandroid_packages_apps_Trebuchet-52851aa3fd2dd9957e190d779f904f6abaf53fed.tar.gz
android_packages_apps_Trebuchet-52851aa3fd2dd9957e190d779f904f6abaf53fed.tar.bz2
android_packages_apps_Trebuchet-52851aa3fd2dd9957e190d779f904f6abaf53fed.zip
Fixing topView not being considered in all places when calculating accessible
and focusable views Bug: 30563273 Change-Id: I6253ce33ee5c328efdde2ea733029975b31e5eb8
Diffstat (limited to 'src/com/android/launcher3/folder')
-rw-r--r--src/com/android/launcher3/folder/Folder.java25
1 files changed, 8 insertions, 17 deletions
diff --git a/src/com/android/launcher3/folder/Folder.java b/src/com/android/launcher3/folder/Folder.java
index 1e87202f0..19956a9c8 100644
--- a/src/com/android/launcher3/folder/Folder.java
+++ b/src/com/android/launcher3/folder/Folder.java
@@ -42,7 +42,6 @@ import android.view.MotionEvent;
import android.view.View;
import android.view.ViewDebug;
import android.view.accessibility.AccessibilityEvent;
-import android.view.accessibility.AccessibilityManager;
import android.view.animation.AccelerateInterpolator;
import android.view.animation.AnimationUtils;
import android.view.inputmethod.EditorInfo;
@@ -52,7 +51,6 @@ import android.widget.TextView;
import com.android.launcher3.Alarm;
import com.android.launcher3.CellLayout;
-import com.android.launcher3.CellLayout.CellInfo;
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.DragSource;
import com.android.launcher3.DropTarget;
@@ -77,7 +75,6 @@ import com.android.launcher3.dragndrop.DragController;
import com.android.launcher3.dragndrop.DragController.DragListener;
import com.android.launcher3.dragndrop.DragLayer;
import com.android.launcher3.dragndrop.DragOptions;
-import com.android.launcher3.logging.UserEventDispatcher.LaunchSourceProvider;
import com.android.launcher3.pageindicators.PageIndicatorDots;
import com.android.launcher3.userevent.nano.LauncherLogProto;
import com.android.launcher3.userevent.nano.LauncherLogProto.Target;
@@ -366,7 +363,8 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList
LauncherModel.updateItemInDatabase(mLauncher, mInfo);
if (commit) {
- sendCustomAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED,
+ Utilities.sendCustomAccessibilityEvent(
+ this, AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED,
getContext().getString(R.string.folder_renamed, newTitle));
}
@@ -605,7 +603,9 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList
openFolderAnim.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationStart(Animator animation) {
- sendCustomAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED,
+ Utilities.sendCustomAccessibilityEvent(
+ Folder.this,
+ AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED,
mContent.getAccessibilityDescription());
mState = STATE_ANIMATING;
}
@@ -675,17 +675,6 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList
mDragController.addDragListener(this);
}
- @Thunk void sendCustomAccessibilityEvent(int type, String text) {
- AccessibilityManager accessibilityManager = (AccessibilityManager)
- getContext().getSystemService(Context.ACCESSIBILITY_SERVICE);
- if (accessibilityManager.isEnabled()) {
- AccessibilityEvent event = AccessibilityEvent.obtain(type);
- onInitializeAccessibilityEvent(event);
- event.getText().add(text);
- accessibilityManager.sendAccessibilityEvent(event);
- }
- }
-
public void animateClosed() {
if (!(getParent() instanceof DragLayer)) return;
final ObjectAnimator oa = LauncherAnimUtils.ofViewAlphaAndScale(this, 0, 0.9f, 0.9f);
@@ -697,7 +686,9 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList
}
@Override
public void onAnimationStart(Animator animation) {
- sendCustomAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED,
+ Utilities.sendCustomAccessibilityEvent(
+ Folder.this,
+ AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED,
getContext().getString(R.string.folder_closed));
mState = STATE_ANIMATING;
}