OSDN Git Service

Cleaning up imports and dead code.
authorWinson <winsonc@google.com>
Wed, 6 Jan 2016 23:21:41 +0000 (15:21 -0800)
committerWinson Chung <winsonc@google.com>
Thu, 7 Jan 2016 23:06:07 +0000 (23:06 +0000)
Change-Id: Ie59fa7fc7c69eb375792c9227295d75c4672e802

23 files changed:
packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java
packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java
packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java
packages/SystemUI/src/com/android/systemui/recents/events/EventBus.java
packages/SystemUI/src/com/android/systemui/recents/events/activity/HideHistoryEvent.java
packages/SystemUI/src/com/android/systemui/recents/events/activity/ShowHistoryEvent.java
packages/SystemUI/src/com/android/systemui/recents/events/activity/TaskStackUpdatedEvent.java
packages/SystemUI/src/com/android/systemui/recents/events/ui/DeleteTaskDataEvent.java
packages/SystemUI/src/com/android/systemui/recents/events/ui/dragndrop/DragEndEvent.java
packages/SystemUI/src/com/android/systemui/recents/history/RecentsHistoryAdapter.java
packages/SystemUI/src/com/android/systemui/recents/history/RecentsHistoryView.java
packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java
packages/SystemUI/src/com/android/systemui/recents/model/TaskStack.java
packages/SystemUI/src/com/android/systemui/recents/views/FreeformWorkspaceLayoutAlgorithm.java
packages/SystemUI/src/com/android/systemui/recents/views/RecentsTransitionHelper.java
packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java
packages/SystemUI/src/com/android/systemui/recents/views/RecentsViewTouchHandler.java
packages/SystemUI/src/com/android/systemui/recents/views/SystemBarScrimViews.java
packages/SystemUI/src/com/android/systemui/recents/views/TaskStackAnimationHelper.java
packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewTouchHandler.java
packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java
packages/SystemUI/src/com/android/systemui/recents/views/TaskViewAnimation.java

index 0cfe076..e4d8067 100644 (file)
@@ -68,7 +68,6 @@ import com.android.systemui.recents.events.ui.focus.FocusNextTaskViewEvent;
 import com.android.systemui.recents.events.ui.focus.FocusPreviousTaskViewEvent;
 import com.android.systemui.recents.history.RecentsHistoryView;
 import com.android.systemui.recents.misc.DozeTrigger;
-import com.android.systemui.recents.misc.ReferenceCountedTrigger;
 import com.android.systemui.recents.misc.SystemServicesProxy;
 import com.android.systemui.recents.model.RecentsPackageMonitor;
 import com.android.systemui.recents.model.RecentsTaskLoadPlan;
index cfbd1cb..67135d5 100644 (file)
@@ -19,7 +19,6 @@ package com.android.systemui.recents;
 import android.content.Context;
 import android.content.res.Resources;
 import android.graphics.Rect;
-import android.provider.Settings;
 import com.android.systemui.R;
 import com.android.systemui.recents.misc.SystemServicesProxy;
 
index fd00289..213018a 100644 (file)
@@ -338,7 +338,6 @@ public class RecentsImpl extends IRecentsNonSystemUserCallbacks.Stub implements
             if (topTask != null && ssp.isRecentsTopMost(topTask, isTopTaskHome)) {
                 RecentsConfiguration config = Recents.getConfiguration();
                 RecentsActivityLaunchState launchState = config.getLaunchState();
-                RecentsDebugFlags flags = Recents.getDebugFlags();
                 if (!launchState.launchedWithAltTab) {
                     // Notify recents to move onto the next task
                     EventBus.getDefault().post(new IterateRecentsEvent());
index 5c49ac3..b0c8ff3 100644 (file)
@@ -27,7 +27,6 @@ import android.os.SystemClock;
 import android.os.UserHandle;
 import android.util.Log;
 import android.util.MutableBoolean;
-
 import com.android.systemui.recents.misc.ReferenceCountedTrigger;
 
 import java.lang.ref.WeakReference;
@@ -663,8 +662,6 @@ public class EventBus extends BroadcastReceiver {
 
     /**
      * Registers a new subscriber.
-     *
-     * @return return whether or not this
      */
     private void registerSubscriber(Object subscriber, int priority,
             MutableBoolean hasInterprocessEventsChangedOut) {
index e85dea3..af3eeb0 100644 (file)
@@ -17,7 +17,6 @@
 package com.android.systemui.recents.events.activity;
 
 import com.android.systemui.recents.events.EventBus;
-import com.android.systemui.recents.misc.ReferenceCountedTrigger;
 
 /**
  * This is sent when the history view will be closed.
index 94e5a97..b39d645 100644 (file)
@@ -17,7 +17,6 @@
 package com.android.systemui.recents.events.activity;
 
 import com.android.systemui.recents.events.EventBus;
-import com.android.systemui.recents.misc.ReferenceCountedTrigger;
 
 /**
  * This is sent when the history view button is clicked.
index b94ed7b..7579cd8 100644 (file)
@@ -16,7 +16,6 @@
 
 package com.android.systemui.recents.events.activity;
 
-import com.android.systemui.recents.RecentsAppWidgetHost;
 import com.android.systemui.recents.events.EventBus;
 import com.android.systemui.recents.model.TaskStack;
 
index bf14082..4ed0270 100644 (file)
@@ -18,7 +18,6 @@ package com.android.systemui.recents.events.ui;
 
 import com.android.systemui.recents.events.EventBus;
 import com.android.systemui.recents.model.Task;
-import com.android.systemui.recents.views.TaskView;
 
 /**
  * This is sent when the data associated with a given {@link Task} should be deleted from the
index 8aa4631..73c282f 100644 (file)
@@ -17,7 +17,6 @@
 package com.android.systemui.recents.events.ui.dragndrop;
 
 import com.android.systemui.recents.events.EventBus;
-import com.android.systemui.recents.misc.ReferenceCountedTrigger;
 import com.android.systemui.recents.model.Task;
 import com.android.systemui.recents.views.DropTarget;
 import com.android.systemui.recents.views.TaskView;
index 72ec7b7..f0fa1da 100644 (file)
@@ -185,7 +185,6 @@ public class RecentsHistoryAdapter extends RecyclerView.Adapter<RecentsHistoryAd
      * remove the task from the TaskStack since the TaskStackView will also receive this event.
      */
     public void removeTasks(String packageName, int userId) {
-        boolean packagesRemoved = false;
         for (int i = mRows.size() - 1; i >= 0; i--) {
             Row row = mRows.get(i);
             if (row.getViewType() == TASK_ROW_VIEW_TYPE) {
index 9524da5..a2f5159 100644 (file)
@@ -35,7 +35,6 @@ import com.android.systemui.recents.RecentsConfiguration;
 import com.android.systemui.recents.events.EventBus;
 import com.android.systemui.recents.events.activity.PackagesChangedEvent;
 import com.android.systemui.recents.misc.ReferenceCountedTrigger;
-import com.android.systemui.recents.misc.SystemServicesProxy;
 import com.android.systemui.recents.model.TaskStack;
 
 /**
index 108029d..ca50fc5 100644 (file)
@@ -68,7 +68,6 @@ import com.android.systemui.Prefs;
 import com.android.systemui.R;
 import com.android.systemui.recents.RecentsDebugFlags;
 import com.android.systemui.recents.RecentsImpl;
-import com.android.systemui.statusbar.BaseStatusBar;
 
 import java.io.IOException;
 import java.util.ArrayList;
@@ -79,7 +78,6 @@ import java.util.Random;
 import static android.app.ActivityManager.StackId.DOCKED_STACK_ID;
 import static android.app.ActivityManager.StackId.FREEFORM_WORKSPACE_STACK_ID;
 import static android.app.ActivityManager.StackId.HOME_STACK_ID;
-import static android.app.ActivityManager.StackId.INVALID_STACK_ID;
 import static android.provider.Settings.Global.DEVELOPMENT_ENABLE_FREEFORM_WINDOWS_SUPPORT;
 
 /**
index bae4784..856200d 100644 (file)
@@ -495,9 +495,6 @@ public class TaskStack {
         // Sort all the tasks to ensure they are ordered correctly
         Collections.sort(newTasks, FREEFORM_LAST_ACTIVE_TIME_COMPARATOR);
 
-        // TODO: Update screen pinning for the new front-most task post refactoring lockToTask out
-        // of the Task
-
         // Filter out the historical tasks from this new list
         ArrayList<Task> stackTasks = new ArrayList<>();
         ArrayList<Task> historyTasks = new ArrayList<>();
index 871afd9..fce916b 100644 (file)
@@ -19,8 +19,6 @@ package com.android.systemui.recents.views;
 import android.content.Context;
 import android.graphics.Rect;
 import android.graphics.RectF;
-import android.util.Log;
-
 import com.android.systemui.R;
 import com.android.systemui.recents.model.Task;
 
index 796556d..51cae86 100644 (file)
@@ -32,16 +32,15 @@ import android.view.AppTransitionAnimationSpec;
 import android.view.IAppTransitionAnimationSpecsFuture;
 import android.view.WindowManagerGlobal;
 import com.android.internal.annotations.GuardedBy;
-import com.android.systemui.recents.events.activity.ExitRecentsWindowFirstAnimationFrameEvent;
 import com.android.systemui.recents.Recents;
 import com.android.systemui.recents.RecentsDebugFlags;
 import com.android.systemui.recents.events.EventBus;
 import com.android.systemui.recents.events.activity.CancelEnterRecentsWindowAnimationEvent;
+import com.android.systemui.recents.events.activity.ExitRecentsWindowFirstAnimationFrameEvent;
 import com.android.systemui.recents.events.activity.LaunchTaskFailedEvent;
 import com.android.systemui.recents.events.activity.LaunchTaskStartedEvent;
 import com.android.systemui.recents.events.activity.LaunchTaskSucceededEvent;
 import com.android.systemui.recents.events.component.ScreenPinningRequestEvent;
-import com.android.systemui.recents.events.ui.TaskViewDismissedEvent;
 import com.android.systemui.recents.misc.SystemServicesProxy;
 import com.android.systemui.recents.model.Task;
 import com.android.systemui.recents.model.TaskStack;
index f49d98e..e28e2b3 100644 (file)
@@ -19,7 +19,6 @@ package com.android.systemui.recents.views;
 import android.animation.Animator;
 import android.animation.AnimatorListenerAdapter;
 import android.content.Context;
-import android.content.res.Resources;
 import android.graphics.Canvas;
 import android.graphics.Rect;
 import android.graphics.drawable.Drawable;
@@ -34,8 +33,8 @@ import android.view.WindowInsets;
 import android.view.animation.AnimationUtils;
 import android.view.animation.Interpolator;
 import android.widget.FrameLayout;
-import com.android.internal.logging.MetricsLogger;
 import android.widget.TextView;
+import com.android.internal.logging.MetricsLogger;
 import com.android.systemui.R;
 import com.android.systemui.recents.Recents;
 import com.android.systemui.recents.RecentsActivity;
@@ -45,7 +44,6 @@ import com.android.systemui.recents.RecentsConfiguration;
 import com.android.systemui.recents.RecentsDebugFlags;
 import com.android.systemui.recents.events.EventBus;
 import com.android.systemui.recents.events.activity.CancelEnterRecentsWindowAnimationEvent;
-import com.android.systemui.recents.events.activity.DebugFlagsChangedEvent;
 import com.android.systemui.recents.events.activity.DismissRecentsToHomeAnimationStarted;
 import com.android.systemui.recents.events.activity.HideHistoryButtonEvent;
 import com.android.systemui.recents.events.activity.HideHistoryEvent;
@@ -61,13 +59,13 @@ import com.android.systemui.recents.events.ui.dragndrop.DragEndEvent;
 import com.android.systemui.recents.events.ui.dragndrop.DragStartEvent;
 import com.android.systemui.recents.misc.ReferenceCountedTrigger;
 import com.android.systemui.recents.misc.SystemServicesProxy;
-import com.android.systemui.recents.misc.Utilities;
 import com.android.systemui.recents.model.Task;
 import com.android.systemui.recents.model.TaskStack;
 import com.android.systemui.stackdivider.WindowManagerProxy;
 import com.android.systemui.statusbar.FlingAnimationUtils;
 
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 
 import static android.app.ActivityManager.StackId.INVALID_STACK_ID;
@@ -215,7 +213,6 @@ public class RecentsView extends FrameLayout {
     /** Launches the focused task from the first stack if possible */
     public boolean launchFocusedTask() {
         if (mTaskStackView != null) {
-            TaskStack stack = mTaskStackView.getStack();
             Task task = mTaskStackView.getFocusedTask();
             if (task != null) {
                 TaskView taskView = mTaskStackView.getChildViewForTask(task);
@@ -245,7 +242,6 @@ public class RecentsView extends FrameLayout {
     /** Launches a given task. */
     public boolean launchTask(Task task, Rect taskBounds, int destinationStack) {
         if (mTaskStackView != null) {
-            TaskStack stack = mTaskStackView.getStack();
             // Iterate the stack views and try and find the given task.
             List<TaskView> taskViews = mTaskStackView.getTaskViews();
             int taskViewCount = taskViews.size();
@@ -645,9 +641,7 @@ public class RecentsView extends FrameLayout {
     private void updateVisibleDockRegions(TaskStack.DockState[] newDockStates, int overrideAlpha) {
         ArraySet<TaskStack.DockState> newDockStatesSet = new ArraySet<>();
         if (newDockStates != null) {
-            for (TaskStack.DockState dockState : newDockStates) {
-                newDockStatesSet.add(dockState);
-            }
+            Collections.addAll(newDockStatesSet, newDockStates);
         }
         for (TaskStack.DockState dockState : mVisibleDockStates) {
             TaskStack.DockState.ViewState viewState = dockState.viewState;
index 5fbf421..473334b 100644 (file)
@@ -145,7 +145,6 @@ public class RecentsViewTouchHandler {
 
     /**
      * Handles dragging touch events
-     * @param ev
      */
     private void handleTouchEvent(MotionEvent ev) {
         int action = ev.getAction();
index f84eb53..9618f21 100644 (file)
@@ -22,9 +22,6 @@ import android.view.View;
 import android.view.animation.AnimationUtils;
 import android.view.animation.Interpolator;
 import com.android.systemui.R;
-import com.android.systemui.recents.Recents;
-import com.android.systemui.recents.RecentsActivityLaunchState;
-import com.android.systemui.recents.RecentsConfiguration;
 import com.android.systemui.recents.events.activity.DismissRecentsToHomeAnimationStarted;
 import com.android.systemui.recents.events.activity.EnterRecentsWindowAnimationCompletedEvent;
 
@@ -64,8 +61,6 @@ public class SystemBarScrimViews {
      */
     public void prepareEnterRecentsAnimation(boolean hasStatusBarScrim, boolean animateStatusBarScrim,
             boolean hasNavBarScrim, boolean animateNavBarScrim) {
-        RecentsConfiguration config = Recents.getConfiguration();
-        RecentsActivityLaunchState launchState = config.getLaunchState();
         mHasNavBarScrim = hasStatusBarScrim;
         mShouldAnimateStatusBarScrim = animateStatusBarScrim;
         mHasStatusBarScrim = hasNavBarScrim;
index 787e330..80a35de 100644 (file)
@@ -24,7 +24,6 @@ import android.graphics.RectF;
 import android.view.View;
 import android.view.animation.AnimationUtils;
 import android.view.animation.Interpolator;
-
 import com.android.systemui.R;
 import com.android.systemui.recents.Recents;
 import com.android.systemui.recents.RecentsActivityLaunchState;
index 33ceaa1..9568fac 100644 (file)
@@ -29,7 +29,6 @@ import android.os.Bundle;
 import android.os.Parcelable;
 import android.provider.Settings;
 import android.util.IntProperty;
-import android.util.Log;
 import android.util.Property;
 import android.view.LayoutInflater;
 import android.view.MotionEvent;
@@ -92,9 +91,6 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
         TaskView.TaskViewCallbacks, TaskStackViewScroller.TaskStackViewScrollerCallbacks,
         ViewPool.ViewPoolConsumer<TaskView, Task> {
 
-    private final static String TAG = "TaskStackView";
-    private final static boolean DEBUG = false;
-
     private final static String KEY_SAVED_STATE_SUPER = "saved_instance_state_super";
     private final static String KEY_SAVED_STATE_LAYOUT_FOCUSED_STATE =
             "saved_instance_state_layout_focused_state";
index 5852d07..c748efc 100644 (file)
@@ -33,8 +33,8 @@ import com.android.systemui.recents.Constants;
 import com.android.systemui.recents.Recents;
 import com.android.systemui.recents.events.EventBus;
 import com.android.systemui.recents.events.activity.HideRecentsEvent;
-import com.android.systemui.recents.events.ui.TaskViewDismissedEvent;
 import com.android.systemui.recents.events.ui.StackViewScrolledEvent;
+import com.android.systemui.recents.events.ui.TaskViewDismissedEvent;
 import com.android.systemui.recents.misc.SystemServicesProxy;
 import com.android.systemui.recents.misc.Utilities;
 import com.android.systemui.statusbar.FlingAnimationUtils;
index b9fefde..e8652f5 100644 (file)
@@ -41,7 +41,6 @@ import android.view.animation.AccelerateInterpolator;
 import android.view.animation.AnimationUtils;
 import android.view.animation.Interpolator;
 import android.widget.FrameLayout;
-
 import com.android.systemui.R;
 import com.android.systemui.recents.Recents;
 import com.android.systemui.recents.RecentsActivity;
index 0e7f677..363ad66 100644 (file)
@@ -24,7 +24,7 @@ import android.view.animation.LinearInterpolator;
 import java.util.List;
 
 /**
- * The animation properties to animate a {@link TaskView} to a given {@TaskViewTransform}.
+ * The animation properties to animate a {@link TaskView} to a given {@link TaskViewTransform}.
  */
 public class TaskViewAnimation {