From 857bfcf3247ef765e16ce595c10e4c1fa5c2a69b Mon Sep 17 00:00:00 2001 From: Sunny Goyal Date: Thu, 14 Jul 2016 15:30:24 -0700 Subject: [PATCH] Fixing some comments Change-Id: I9e6eaaf9ee145e2f37dfb97a3259509a72cd73af --- src/com/android/launcher3/PinchAnimationManager.java | 6 +++--- .../android/launcher3/util/MultiStateAlphaController.java | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/com/android/launcher3/PinchAnimationManager.java b/src/com/android/launcher3/PinchAnimationManager.java index 38079454d1..baeb77c824 100644 --- a/src/com/android/launcher3/PinchAnimationManager.java +++ b/src/com/android/launcher3/PinchAnimationManager.java @@ -149,11 +149,11 @@ public class PinchAnimationManager { if (startState == OVERVIEW) { animateOverviewPanelButtons(goingTowards == OVERVIEW); } else if (startState == NORMAL) { - animateHotseatAndPageIndicator(goingTowards == NORMAL); + animateHotseatAndQsb(goingTowards == NORMAL); } } else if (threshold == PinchThresholdManager.THRESHOLD_TWO) { if (startState == OVERVIEW) { - animateHotseatAndPageIndicator(goingTowards == NORMAL); + animateHotseatAndQsb(goingTowards == NORMAL); animateScrim(goingTowards == OVERVIEW); } else if (startState == NORMAL) { animateOverviewPanelButtons(goingTowards == OVERVIEW); @@ -188,7 +188,7 @@ public class PinchAnimationManager { } } - private void animateHotseatAndPageIndicator(boolean show) { + private void animateHotseatAndQsb(boolean show) { startAnimator(INDEX_HOTSEAT, mWorkspace.createHotseatAlphaAnimator(show ? 1 : 0), THRESHOLD_ANIM_DURATION); startAnimator(INDEX_QSB, mWorkspace.mQsbAlphaController.animateAlphaAtIndex( diff --git a/src/com/android/launcher3/util/MultiStateAlphaController.java b/src/com/android/launcher3/util/MultiStateAlphaController.java index df73bfdbcf..2a4936146b 100644 --- a/src/com/android/launcher3/util/MultiStateAlphaController.java +++ b/src/com/android/launcher3/util/MultiStateAlphaController.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008 The Android Open Source Project + * Copyright (C) 2016 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. @@ -53,6 +53,10 @@ public class MultiStateAlphaController { : (mAm.isEnabled() ? View.GONE : View.INVISIBLE)); } + /** + * Returns an animator which changes the alpha at the index {@param index} + * to {@param finalAlpha}. Alphas at other index are not affected. + */ public Animator animateAlphaAtIndex(float finalAlpha, final int index) { if (Float.compare(finalAlpha, mAlphas[index]) == 0) { // Return a dummy animator to avoid null checks.