Merge "Removing some unused functionalities" into ub-launcher3-burnaby
This commit is contained in:
@@ -1,19 +1,3 @@
|
||||
-keep class com.android.launcher3.Launcher {
|
||||
public void previousScreen(android.view.View);
|
||||
public void nextScreen(android.view.View);
|
||||
public void launchHotSeat(android.view.View);
|
||||
public void onClickSearchButton(android.view.View);
|
||||
public void onClickVoiceButton(android.view.View);
|
||||
public void onClickConfigureButton(android.view.View);
|
||||
public void onClickAllAppsButton(android.view.View);
|
||||
public void dismissFirstRunCling(android.view.View);
|
||||
public void dismissMigrationClingCopyApps(android.view.View);
|
||||
public void dismissMigrationClingUseDefault(android.view.View);
|
||||
public void dismissMigrationWorkspaceCling(android.view.View);
|
||||
public void dismissWorkspaceCling(android.view.View);
|
||||
public void dismissAllAppsCling(android.view.View);
|
||||
}
|
||||
|
||||
-keep class com.android.launcher3.CellLayout {
|
||||
public float getBackgroundAlpha();
|
||||
public void setBackgroundAlpha(float);
|
||||
@@ -44,8 +28,6 @@
|
||||
-keep class com.android.launcher3.Workspace {
|
||||
public float getBackgroundAlpha();
|
||||
public void setBackgroundAlpha(float);
|
||||
public float getChildrenOutlineAlpha();
|
||||
public void setChildrenOutlineAlpha(float);
|
||||
}
|
||||
|
||||
-keep class com.android.launcher3.MemoryDumpActivity {
|
||||
|
||||
@@ -103,8 +103,6 @@ public class CellLayout extends ViewGroup implements BubbleTextShadowHandler {
|
||||
private float FOREGROUND_ALPHA_DAMPER = 0.65f;
|
||||
private int mForegroundAlpha = 0;
|
||||
private float mBackgroundAlpha;
|
||||
private float mBackgroundAlphaMultiplier = 1.0f;
|
||||
private boolean mDrawBackground = true;
|
||||
|
||||
private Drawable mNormalBackground;
|
||||
private Drawable mActiveGlowBackground;
|
||||
@@ -423,10 +421,6 @@ public class CellLayout extends ViewGroup implements BubbleTextShadowHandler {
|
||||
}
|
||||
}
|
||||
|
||||
void disableBackground() {
|
||||
mDrawBackground = false;
|
||||
}
|
||||
|
||||
void disableDragTarget() {
|
||||
mIsDragTarget = false;
|
||||
}
|
||||
@@ -448,12 +442,16 @@ public class CellLayout extends ViewGroup implements BubbleTextShadowHandler {
|
||||
|
||||
@Override
|
||||
protected void onDraw(Canvas canvas) {
|
||||
if (!mIsDragTarget) {
|
||||
return;
|
||||
}
|
||||
|
||||
// When we're large, we are either drawn in a "hover" state (ie when dragging an item to
|
||||
// a neighboring page) or with just a normal background (if backgroundAlpha > 0.0f)
|
||||
// When we're small, we are either drawn normally or in the "accepts drops" state (during
|
||||
// a drag). However, we also drag the mini hover background *over* one of those two
|
||||
// backgrounds
|
||||
if (mDrawBackground && mBackgroundAlpha > 0.0f) {
|
||||
if (mBackgroundAlpha > 0.0f) {
|
||||
Drawable bg;
|
||||
|
||||
if (mIsDragOverlapping) {
|
||||
@@ -463,7 +461,7 @@ public class CellLayout extends ViewGroup implements BubbleTextShadowHandler {
|
||||
bg = mNormalBackground;
|
||||
}
|
||||
|
||||
bg.setAlpha((int) (mBackgroundAlpha * mBackgroundAlphaMultiplier * 255));
|
||||
bg.setAlpha((int) (mBackgroundAlpha * 255));
|
||||
bg.setBounds(mBackgroundRect);
|
||||
bg.draw(canvas);
|
||||
}
|
||||
@@ -951,17 +949,6 @@ public class CellLayout extends ViewGroup implements BubbleTextShadowHandler {
|
||||
return mBackgroundAlpha;
|
||||
}
|
||||
|
||||
public void setBackgroundAlphaMultiplier(float multiplier) {
|
||||
if (mBackgroundAlphaMultiplier != multiplier) {
|
||||
mBackgroundAlphaMultiplier = multiplier;
|
||||
invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
public float getBackgroundAlphaMultiplier() {
|
||||
return mBackgroundAlphaMultiplier;
|
||||
}
|
||||
|
||||
public void setBackgroundAlpha(float alpha) {
|
||||
if (mBackgroundAlpha != alpha) {
|
||||
mBackgroundAlpha = alpha;
|
||||
|
||||
@@ -89,10 +89,6 @@ public class Workspace extends SmoothPagedView
|
||||
Insettable, UninstallSource, AccessibilityDragSource {
|
||||
private static final String TAG = "Launcher.Workspace";
|
||||
|
||||
private static final int CHILDREN_OUTLINE_FADE_OUT_DELAY = 0;
|
||||
private static final int CHILDREN_OUTLINE_FADE_OUT_DURATION = 375;
|
||||
private static final int CHILDREN_OUTLINE_FADE_IN_DURATION = 100;
|
||||
|
||||
protected static final int SNAP_OFF_EMPTY_SCREEN_DURATION = 400;
|
||||
protected static final int FADE_EMPTY_SCREEN_DURATION = 150;
|
||||
|
||||
@@ -101,11 +97,6 @@ public class Workspace extends SmoothPagedView
|
||||
static final boolean MAP_NO_RECURSE = false;
|
||||
static final boolean MAP_RECURSE = true;
|
||||
|
||||
// These animators are used to fade the children's outlines
|
||||
private ObjectAnimator mChildrenOutlineFadeInAnimation;
|
||||
private ObjectAnimator mChildrenOutlineFadeOutAnimation;
|
||||
private float mChildrenOutlineAlpha = 0;
|
||||
|
||||
private static final long CUSTOM_CONTENT_GESTURE_DELAY = 200;
|
||||
private long mTouchDownTime = -1;
|
||||
private long mCustomContentShowTime = -1;
|
||||
@@ -388,7 +379,6 @@ public class Workspace extends SmoothPagedView
|
||||
updateChildrenLayersEnabled(false);
|
||||
mLauncher.lockScreenOrientation();
|
||||
mLauncher.onInteractionBegin();
|
||||
setChildrenBackgroundAlphaMultipliers(1f);
|
||||
// Prevent any Un/InstallShortcutReceivers from updating the db while we are dragging
|
||||
InstallShortcutReceiver.enableInstallQueue();
|
||||
post(new Runnable() {
|
||||
@@ -578,7 +568,6 @@ public class Workspace extends SmoothPagedView
|
||||
public void createCustomContentContainer() {
|
||||
CellLayout customScreen = (CellLayout)
|
||||
mLauncher.getLayoutInflater().inflate(R.layout.workspace_screen, this, false);
|
||||
customScreen.disableBackground();
|
||||
customScreen.disableDragTarget();
|
||||
|
||||
mWorkspaceScreens.put(CUSTOM_CONTENT_SCREEN_ID, customScreen);
|
||||
@@ -1533,45 +1522,12 @@ public class Workspace extends SmoothPagedView
|
||||
}
|
||||
}
|
||||
|
||||
void showOutlines() {
|
||||
if (!workspaceInModalState() && !mIsSwitchingState) {
|
||||
if (mChildrenOutlineFadeOutAnimation != null) mChildrenOutlineFadeOutAnimation.cancel();
|
||||
if (mChildrenOutlineFadeInAnimation != null) mChildrenOutlineFadeInAnimation.cancel();
|
||||
mChildrenOutlineFadeInAnimation = LauncherAnimUtils.ofFloat(this, "childrenOutlineAlpha", 1.0f);
|
||||
mChildrenOutlineFadeInAnimation.setDuration(CHILDREN_OUTLINE_FADE_IN_DURATION);
|
||||
mChildrenOutlineFadeInAnimation.start();
|
||||
}
|
||||
}
|
||||
|
||||
void hideOutlines() {
|
||||
if (!workspaceInModalState() && !mIsSwitchingState) {
|
||||
if (mChildrenOutlineFadeInAnimation != null) mChildrenOutlineFadeInAnimation.cancel();
|
||||
if (mChildrenOutlineFadeOutAnimation != null) mChildrenOutlineFadeOutAnimation.cancel();
|
||||
mChildrenOutlineFadeOutAnimation = LauncherAnimUtils.ofFloat(this, "childrenOutlineAlpha", 0.0f);
|
||||
mChildrenOutlineFadeOutAnimation.setDuration(CHILDREN_OUTLINE_FADE_OUT_DURATION);
|
||||
mChildrenOutlineFadeOutAnimation.setStartDelay(CHILDREN_OUTLINE_FADE_OUT_DELAY);
|
||||
mChildrenOutlineFadeOutAnimation.start();
|
||||
}
|
||||
}
|
||||
|
||||
public void showOutlinesTemporarily() {
|
||||
if (!mIsPageMoving && !isTouchActive()) {
|
||||
snapToPage(mCurrentPage);
|
||||
}
|
||||
}
|
||||
|
||||
public void setChildrenOutlineAlpha(float alpha) {
|
||||
mChildrenOutlineAlpha = alpha;
|
||||
for (int i = 0; i < getChildCount(); i++) {
|
||||
CellLayout cl = (CellLayout) getChildAt(i);
|
||||
cl.setBackgroundAlpha(alpha);
|
||||
}
|
||||
}
|
||||
|
||||
public float getChildrenOutlineAlpha() {
|
||||
return mChildrenOutlineAlpha;
|
||||
}
|
||||
|
||||
float backgroundAlphaInterpolator(float r) {
|
||||
float pivotA = 0.1f;
|
||||
float pivotB = 0.4f;
|
||||
@@ -1601,13 +1557,6 @@ public class Workspace extends SmoothPagedView
|
||||
}
|
||||
}
|
||||
|
||||
private void setChildrenBackgroundAlphaMultipliers(float a) {
|
||||
for (int i = 0; i < getChildCount(); i++) {
|
||||
CellLayout child = (CellLayout) getChildAt(i);
|
||||
child.setBackgroundAlphaMultiplier(a);
|
||||
}
|
||||
}
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
@Override
|
||||
public void enableAccessibleDrag(boolean enable) {
|
||||
@@ -2004,7 +1953,6 @@ public class Workspace extends SmoothPagedView
|
||||
|
||||
public void onStartReordering() {
|
||||
super.onStartReordering();
|
||||
showOutlines();
|
||||
// Reordering handles its own animations, disable the automatic ones.
|
||||
disableLayoutTransitions();
|
||||
}
|
||||
@@ -2017,7 +1965,6 @@ public class Workspace extends SmoothPagedView
|
||||
return;
|
||||
}
|
||||
|
||||
hideOutlines();
|
||||
mScreenOrder.clear();
|
||||
int count = getChildCount();
|
||||
for (int i = 0; i < count; i++) {
|
||||
@@ -2969,9 +2916,6 @@ public class Workspace extends SmoothPagedView
|
||||
|
||||
mSpringLoadedDragController.cancel();
|
||||
|
||||
if (!mIsPageMoving) {
|
||||
hideOutlines();
|
||||
}
|
||||
mLauncher.getDragLayer().hidePageHints();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user