diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2018-06-03 07:26:36 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2018-06-03 07:26:36 +0000 |
commit | 73859d052104d841fdb8560e49d8a46c5bff93b1 (patch) | |
tree | 58cf13d9da0fde15896d03148bfece106ad78f61 /quickstep/src/com/android/quickstep/views/ShelfScrimView.java | |
parent | df0843e569b93e77355990f7a71fe39746b43493 (diff) | |
parent | bf29023212a107481b6cbf3dbe4fda52c6f50180 (diff) | |
download | android_packages_apps_Trebuchet-lineage-16.0_20181101.tar.gz android_packages_apps_Trebuchet-lineage-16.0_20181101.tar.bz2 android_packages_apps_Trebuchet-lineage-16.0_20181101.zip |
Snap for 4818534 from bf29023212a107481b6cbf3dbe4fda52c6f50180 to pi-releaselineage-16.0_20181101
Change-Id: I06c92e93af46c5f35d997815ed1392cca2f05c46
Diffstat (limited to 'quickstep/src/com/android/quickstep/views/ShelfScrimView.java')
-rw-r--r-- | quickstep/src/com/android/quickstep/views/ShelfScrimView.java | 55 |
1 files changed, 1 insertions, 54 deletions
diff --git a/quickstep/src/com/android/quickstep/views/ShelfScrimView.java b/quickstep/src/com/android/quickstep/views/ShelfScrimView.java index aca8351a0..c780b6234 100644 --- a/quickstep/src/com/android/quickstep/views/ShelfScrimView.java +++ b/quickstep/src/com/android/quickstep/views/ShelfScrimView.java @@ -28,9 +28,6 @@ import android.graphics.Paint; import android.graphics.Path; import android.graphics.Path.Direction; import android.graphics.Path.Op; -import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.view.accessibility.AccessibilityNodeInfoCompat; import android.util.AttributeSet; import com.android.launcher3.DeviceProfile; @@ -48,11 +45,6 @@ import com.android.launcher3.views.ScrimView; */ public class ShelfScrimView extends ScrimView { - private static final int THRESHOLD_ALPHA_DARK = 102; - private static final int THRESHOLD_ALPHA_LIGHT = 46; - private static final int THRESHOLD_ALPHA_SUPER_LIGHT = 128; - private static final int CLEAR_ALL_TASKS = R.string.recents_clear_all; - // In transposed layout, we simply draw a flat color. private boolean mDrawingFlatColor; @@ -81,13 +73,7 @@ public class ShelfScrimView extends ScrimView { mMaxScrimAlpha = OVERVIEW.getWorkspaceScrimAlpha(mLauncher); mEndAlpha = Color.alpha(mEndScrim); - if (Themes.getAttrBoolean(mLauncher, R.attr.isMainColorDark)) { - mThresholdAlpha = THRESHOLD_ALPHA_DARK; - } else if (Themes.getAttrBoolean(mLauncher, R.attr.isWorkspaceDarkText)) { - mThresholdAlpha = THRESHOLD_ALPHA_SUPER_LIGHT; - } else { - mThresholdAlpha = THRESHOLD_ALPHA_LIGHT; - } + mThresholdAlpha = Themes.getAttrInteger(context, R.attr.allAppsInterimScrimAlpha); mRadius = mLauncher.getResources().getDimension(R.dimen.shelf_surface_radius); mPaint = new Paint(Paint.ANTI_ALIAS_FLAG); @@ -208,43 +194,4 @@ public class ShelfScrimView extends ScrimView { mRadius, mRadius, mPaint); return minTop - mDragHandleSize - top; } - - @NonNull - @Override - protected AccessibilityHelper createAccessibilityHelper() { - return new ShelfScrimAccessibilityHelper(); - } - - protected class ShelfScrimAccessibilityHelper extends AccessibilityHelper { - @Override - protected void onPopulateNodeForVirtualView(int virtualViewId, - AccessibilityNodeInfoCompat node) { - super.onPopulateNodeForVirtualView(virtualViewId, node); - - if (mLauncher.isInState(OVERVIEW)) { - final RecentsView overviewPanel = mLauncher.getOverviewPanel(); - if (overviewPanel.getChildCount() != 0) { - node.addAction( - new AccessibilityNodeInfoCompat.AccessibilityActionCompat( - CLEAR_ALL_TASKS, - getContext().getText(CLEAR_ALL_TASKS))); - } - } - } - - @Override - protected boolean onPerformActionForVirtualView( - int virtualViewId, int action, Bundle arguments) { - if (super.onPerformActionForVirtualView(virtualViewId, action, arguments)) return true; - - if (action == CLEAR_ALL_TASKS) { - if (mLauncher.isInState(OVERVIEW)) { - mLauncher.<RecentsView>getOverviewPanel().dismissAllTasks(); - } - return true; - } - - return false; - } - } } |