OSDN Git Service

Disabling shadowing (until bugs are addressed) and refactoring some constants.
authorWinson Chung <winsonc@google.com>
Wed, 7 May 2014 22:01:14 +0000 (15:01 -0700)
committerWinson Chung <winsonc@google.com>
Wed, 7 May 2014 22:01:14 +0000 (15:01 -0700)
Change-Id: Iaf4c98bcb13441be3e66048687ea5b0673d2bce6

packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java
packages/SystemUI/src/com/android/systemui/recents/Constants.java
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/RecentsService.java
packages/SystemUI/src/com/android/systemui/recents/RecentsTaskLoader.java
packages/SystemUI/src/com/android/systemui/recents/SystemServicesProxy.java
packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java
packages/SystemUI/src/com/android/systemui/recents/views/SwipeHelper.java
packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java

index 396cb14..3ef8316 100644 (file)
@@ -64,7 +64,7 @@ public class AlternateRecentsComponent {
                 mSingleCountFirstTaskRect.offset(0, (int) statusBarHeight);
                 mMultipleCountFirstTaskRect = replyData.getParcelable(KEY_MULTIPLE_TASK_STACK_RECT);
                 mMultipleCountFirstTaskRect.offset(0, (int) statusBarHeight);
-                Console.log(Constants.DebugFlags.App.RecentsComponent,
+                Console.log(Constants.Log.App.RecentsComponent,
                         "[RecentsComponent|RecentsMessageHandler|handleMessage]",
                         "singleTaskRect: " + mSingleCountFirstTaskRect +
                         " multipleTaskRect: " + mMultipleCountFirstTaskRect);
@@ -83,7 +83,7 @@ public class AlternateRecentsComponent {
     class RecentsServiceConnection implements ServiceConnection {
         @Override
         public void onServiceConnected(ComponentName className, IBinder service) {
-            Console.log(Constants.DebugFlags.App.RecentsComponent,
+            Console.log(Constants.Log.App.RecentsComponent,
                     "[RecentsComponent|ServiceConnection|onServiceConnected]",
                     "toggleRecents: " + mToggleRecentsUponServiceBound);
             mService = new Messenger(service);
@@ -103,7 +103,7 @@ public class AlternateRecentsComponent {
 
         @Override
         public void onServiceDisconnected(ComponentName className) {
-            Console.log(Constants.DebugFlags.App.RecentsComponent,
+            Console.log(Constants.Log.App.RecentsComponent,
                     "[RecentsComponent|ServiceConnection|onServiceDisconnected]");
             mService = null;
             mServiceIsBound = false;
@@ -154,7 +154,7 @@ public class AlternateRecentsComponent {
     }
 
     public void onStart() {
-        Console.log(Constants.DebugFlags.App.RecentsComponent, "[RecentsComponent|start]");
+        Console.log(Constants.Log.App.RecentsComponent, "[RecentsComponent|start]");
 
         // Try to create a long-running connection to the recents service
         bindToRecentsService(false);
@@ -162,11 +162,11 @@ public class AlternateRecentsComponent {
 
     /** Toggles the alternate recents activity */
     public void onToggleRecents(Display display, int layoutDirection, View statusBarView) {
-        Console.logStartTracingTime(Constants.DebugFlags.App.TimeRecentsStartup,
-                Constants.DebugFlags.App.TimeRecentsStartupKey);
-        Console.logStartTracingTime(Constants.DebugFlags.App.TimeRecentsLaunchTask,
-                Constants.DebugFlags.App.TimeRecentsLaunchKey);
-        Console.log(Constants.DebugFlags.App.RecentsComponent, "[RecentsComponent|toggleRecents]",
+        Console.logStartTracingTime(Constants.Log.App.TimeRecentsStartup,
+                Constants.Log.App.TimeRecentsStartupKey);
+        Console.logStartTracingTime(Constants.Log.App.TimeRecentsLaunchTask,
+                Constants.Log.App.TimeRecentsLaunchKey);
+        Console.log(Constants.Log.App.RecentsComponent, "[RecentsComponent|toggleRecents]",
                 "serviceIsBound: " + mServiceIsBound);
         mStatusBarView = statusBarView;
         if (!mServiceIsBound) {
@@ -192,7 +192,7 @@ public class AlternateRecentsComponent {
     }
 
     public void onCloseRecents() {
-        Console.log(Constants.DebugFlags.App.RecentsComponent, "[RecentsComponent|closeRecents]");
+        Console.log(Constants.Log.App.RecentsComponent, "[RecentsComponent|closeRecents]");
         if (mServiceIsBound) {
             // Try and update the recents configuration
             try {
@@ -400,10 +400,10 @@ public class AlternateRecentsComponent {
                     mService.send(msg);
 
                     // Time this path
-                    Console.logTraceTime(Constants.DebugFlags.App.TimeRecentsStartup,
-                            Constants.DebugFlags.App.TimeRecentsStartupKey, "sendToggleRecents");
-                    Console.logTraceTime(Constants.DebugFlags.App.TimeRecentsLaunchTask,
-                            Constants.DebugFlags.App.TimeRecentsLaunchKey, "sendToggleRecents");
+                    Console.logTraceTime(Constants.Log.App.TimeRecentsStartup,
+                            Constants.Log.App.TimeRecentsStartupKey, "sendToggleRecents");
+                    Console.logTraceTime(Constants.Log.App.TimeRecentsLaunchTask,
+                            Constants.Log.App.TimeRecentsLaunchKey, "sendToggleRecents");
                 } catch (RemoteException re) {
                     re.printStackTrace();
                 }
@@ -450,8 +450,8 @@ public class AlternateRecentsComponent {
             startAlternateRecentsActivity(opts, false);
         }
 
-        Console.logTraceTime(Constants.DebugFlags.App.TimeRecentsStartup,
-                Constants.DebugFlags.App.TimeRecentsStartupKey, "startRecentsActivity");
+        Console.logTraceTime(Constants.Log.App.TimeRecentsStartup,
+                Constants.Log.App.TimeRecentsStartupKey, "startRecentsActivity");
         mLastToggleTime = System.currentTimeMillis();
     }
 
index 90ea873..1d6a76c 100644 (file)
@@ -18,7 +18,6 @@ package com.android.systemui.recents;
 
 /**
  * Constants
- * XXX: We are going to move almost all of these into a resource.
  */
 public class Constants {
     public static class DebugFlags {
@@ -26,12 +25,18 @@ public class Constants {
         public static final boolean Verbose = false;
 
         public static class App {
+            // Enables the filtering of tasks according to their grouping
             public static final boolean EnableTaskFiltering = false;
+            // Enables clipping of tasks against each other
             public static final boolean EnableTaskStackClipping = false;
+            // Enables the use of theme colors as the task bar background
             public static final boolean EnableTaskBarThemeColors = true;
+            // Enables the info pane on long-press
             public static final boolean EnableInfoPane = true;
-            public static final boolean EnableSearchButton = true;
-
+            // Enables the search bar layout
+            public static final boolean EnableSearchLayout = true;
+            // Enables the dynamic shadows behind each task
+            public static final boolean EnableShadows = false;
             // This disables the bitmap and icon caches
             public static final boolean DisableBackgroundCache = false;
             // For debugging, this enables us to create mock recents tasks
@@ -40,8 +45,11 @@ public class Constants {
             public static final int SystemServicesProxyMockPackageCount = 3;
             // For debugging, this defines the number of mock recents tasks to create
             public static final int SystemServicesProxyMockTaskCount = 75;
+        }
+    }
 
-            // Timing certain paths
+    public static class Log {
+        public static class App {
             public static final String TimeRecentsStartupKey = "startup";
             public static final String TimeRecentsLaunchKey = "launchTask";
             public static final boolean TimeRecentsStartup = false;
@@ -72,6 +80,7 @@ public class Constants {
         }
     }
 
+    /** XXX: We are going to move almost all of these into a resource once they are nailed down. */
     public static class Values {
         public static class App {
             public static int AppWidgetHostId = 1024;
@@ -102,10 +111,5 @@ public class Constants {
             // The number of cards we see in the peek space
             public static final int StackPeekNumCards = 3;
         }
-
-        public static class TaskView {
-            public static final boolean AnimateFrontTaskBarOnEnterRecents = true;
-            public static final boolean AnimateFrontTaskBarOnLeavingRecents = true;
-        }
     }
 }
\ No newline at end of file
index 110130b..3be6932 100644 (file)
@@ -25,7 +25,6 @@ import android.content.BroadcastReceiver;
 import android.content.Context;
 import android.content.Intent;
 import android.content.IntentFilter;
-import android.content.SharedPreferences;
 import android.os.Bundle;
 import android.util.Pair;
 import android.view.LayoutInflater;
@@ -78,7 +77,7 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
         @Override
         public void onReceive(Context context, Intent intent) {
             String action = intent.getAction();
-            Console.log(Constants.DebugFlags.App.SystemUIHandshake,
+            Console.log(Constants.Log.App.SystemUIHandshake,
                     "[RecentsActivity|serviceBroadcast]", action, Console.AnsiRed);
             if (action.equals(RecentsService.ACTION_TOGGLE_RECENTS_ACTIVITY)) {
                 // Try and unfilter and filtered stacks
@@ -134,7 +133,7 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
 
     /** Attempts to allocate and bind the search bar app widget */
     void bindSearchBarAppWidget() {
-        if (Constants.DebugFlags.App.EnableSearchButton) {
+        if (Constants.DebugFlags.App.EnableSearchLayout) {
             RecentsConfiguration config = RecentsConfiguration.getInstance();
             SystemServicesProxy ssp = RecentsTaskLoader.getInstance().getSystemServicesProxy();
 
@@ -152,7 +151,7 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
                     ssp.unbindSearchAppWidget(mAppWidgetHost, appWidgetId);
                     appWidgetId = -1;
                 }
-                Console.log(Constants.DebugFlags.App.SystemUIHandshake,
+                Console.log(Constants.Log.App.SystemUIHandshake,
                         "[RecentsActivity|onCreate|settings|appWidgetId]",
                         "Id: " + appWidgetId,
                         Console.AnsiBlue);
@@ -163,7 +162,7 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
                 Pair<Integer, AppWidgetProviderInfo> widgetInfo =
                         ssp.bindSearchAppWidget(mAppWidgetHost);
                 if (widgetInfo != null) {
-                    Console.log(Constants.DebugFlags.App.SystemUIHandshake,
+                    Console.log(Constants.Log.App.SystemUIHandshake,
                             "[RecentsActivity|onCreate|searchWidget]",
                             "Id: " + widgetInfo.first + " Info: " + widgetInfo.second,
                             Console.AnsiBlue);
@@ -178,11 +177,11 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
 
     /** Creates the search bar app widget view */
     void addSearchBarAppWidgetView() {
-        if (Constants.DebugFlags.App.EnableSearchButton) {
+        if (Constants.DebugFlags.App.EnableSearchLayout) {
             RecentsConfiguration config = RecentsConfiguration.getInstance();
             int appWidgetId = config.searchBarAppWidgetId;
             if (appWidgetId >= 0) {
-                Console.log(Constants.DebugFlags.App.SystemUIHandshake,
+                Console.log(Constants.Log.App.SystemUIHandshake,
                         "[RecentsActivity|onCreate|addSearchAppWidgetView]",
                         "Id: " + appWidgetId,
                         Console.AnsiBlue);
@@ -216,11 +215,11 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
     @Override
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
-        Console.logDivider(Constants.DebugFlags.App.SystemUIHandshake);
-        Console.log(Constants.DebugFlags.App.SystemUIHandshake, "[RecentsActivity|onCreate]",
+        Console.logDivider(Constants.Log.App.SystemUIHandshake);
+        Console.log(Constants.Log.App.SystemUIHandshake, "[RecentsActivity|onCreate]",
                 getIntent().getAction() + " visible: " + mVisible, Console.AnsiRed);
-        Console.logTraceTime(Constants.DebugFlags.App.TimeRecentsStartup,
-                Constants.DebugFlags.App.TimeRecentsStartupKey, "onCreate");
+        Console.logTraceTime(Constants.Log.App.TimeRecentsStartup,
+                Constants.Log.App.TimeRecentsStartupKey, "onCreate");
 
         // Initialize the loader and the configuration
         RecentsTaskLoader.initialize(this);
@@ -260,11 +259,11 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
         // Reset the task launched flag if we encounter an onNewIntent() before onStop()
         mTaskLaunched = false;
 
-        Console.logDivider(Constants.DebugFlags.App.SystemUIHandshake);
-        Console.log(Constants.DebugFlags.App.SystemUIHandshake, "[RecentsActivity|onNewIntent]",
+        Console.logDivider(Constants.Log.App.SystemUIHandshake);
+        Console.log(Constants.Log.App.SystemUIHandshake, "[RecentsActivity|onNewIntent]",
                 intent.getAction() + " visible: " + mVisible, Console.AnsiRed);
-        Console.logTraceTime(Constants.DebugFlags.App.TimeRecentsStartup,
-                Constants.DebugFlags.App.TimeRecentsStartupKey, "onNewIntent");
+        Console.logTraceTime(Constants.Log.App.TimeRecentsStartup,
+                Constants.Log.App.TimeRecentsStartupKey, "onNewIntent");
 
         // Initialize the loader and the configuration
         RecentsTaskLoader.initialize(this);
@@ -279,7 +278,7 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
 
     @Override
     protected void onStart() {
-        Console.log(Constants.DebugFlags.App.SystemUIHandshake, "[RecentsActivity|onStart]", "",
+        Console.log(Constants.Log.App.SystemUIHandshake, "[RecentsActivity|onStart]", "",
                 Console.AnsiRed);
         super.onStart();
         mAppWidgetHost.startListening();
@@ -288,14 +287,14 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
 
     @Override
     protected void onResume() {
-        Console.log(Constants.DebugFlags.App.SystemUIHandshake, "[RecentsActivity|onResume]", "",
+        Console.log(Constants.Log.App.SystemUIHandshake, "[RecentsActivity|onResume]", "",
                 Console.AnsiRed);
         super.onResume();
     }
 
     @Override
     public void onAttachedToWindow() {
-        Console.log(Constants.DebugFlags.App.SystemUIHandshake,
+        Console.log(Constants.Log.App.SystemUIHandshake,
                 "[RecentsActivity|onAttachedToWindow]", "",
                 Console.AnsiRed);
         super.onAttachedToWindow();
@@ -313,7 +312,7 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
 
     @Override
     public void onDetachedFromWindow() {
-        Console.log(Constants.DebugFlags.App.SystemUIHandshake,
+        Console.log(Constants.Log.App.SystemUIHandshake,
                 "[RecentsActivity|onDetachedFromWindow]", "",
                 Console.AnsiRed);
         super.onDetachedFromWindow();
@@ -325,14 +324,14 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
 
     @Override
     protected void onPause() {
-        Console.log(Constants.DebugFlags.App.SystemUIHandshake, "[RecentsActivity|onPause]", "",
+        Console.log(Constants.Log.App.SystemUIHandshake, "[RecentsActivity|onPause]", "",
                 Console.AnsiRed);
         super.onPause();
     }
 
     @Override
     protected void onStop() {
-        Console.log(Constants.DebugFlags.App.SystemUIHandshake, "[RecentsActivity|onStop]", "",
+        Console.log(Constants.Log.App.SystemUIHandshake, "[RecentsActivity|onStop]", "",
                 Console.AnsiRed);
         super.onStop();
 
@@ -343,7 +342,7 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
 
     @Override
     protected void onDestroy() {
-        Console.log(Constants.DebugFlags.App.SystemUIHandshake, "[RecentsActivity|onDestroy]", "",
+        Console.log(Constants.Log.App.SystemUIHandshake, "[RecentsActivity|onDestroy]", "",
                 Console.AnsiRed);
         super.onDestroy();
     }
index d1a3954..cb7e42a 100644 (file)
@@ -88,7 +88,7 @@ public class RecentsConfiguration {
                 Configuration.ORIENTATION_LANDSCAPE;
         transposeSearchLayoutWithOrientation =
                 res.getBoolean(R.bool.recents_transpose_search_layout_with_orientation);
-        Console.log(Constants.DebugFlags.UI.MeasureAndLayout,
+        Console.log(Constants.Log.UI.MeasureAndLayout,
                 "[RecentsConfiguration|orientation]", isLandscape ? "Landscape" : "Portrait",
                 Console.AnsiGreen);
 
@@ -174,7 +174,7 @@ public class RecentsConfiguration {
      */
     public void getSearchBarBounds(int width, int height, Rect searchBarSpaceBounds) {
         // Return empty rects if search is not enabled
-        if (!Constants.DebugFlags.App.EnableSearchButton) {
+        if (!Constants.DebugFlags.App.EnableSearchLayout) {
             searchBarSpaceBounds.set(0, 0, 0, 0);
             return;
         }
index 0c6ed84..837cb34 100644 (file)
@@ -45,7 +45,7 @@ class SystemUIMessageHandler extends Handler {
 
     @Override
     public void handleMessage(Message msg) {
-        Console.log(Constants.DebugFlags.App.SystemUIHandshake,
+        Console.log(Constants.Log.App.SystemUIHandshake,
                 "[RecentsService|handleMessage]", msg);
 
         Context context = mContext.get();
@@ -115,10 +115,10 @@ class SystemUIMessageHandler extends Handler {
             context.sendBroadcast(intent);
 
             // Time this path
-            Console.logTraceTime(Constants.DebugFlags.App.TimeRecentsStartup,
-                    Constants.DebugFlags.App.TimeRecentsStartupKey, "receivedToggleRecents");
-            Console.logTraceTime(Constants.DebugFlags.App.TimeRecentsLaunchTask,
-                    Constants.DebugFlags.App.TimeRecentsLaunchKey, "receivedToggleRecents");
+            Console.logTraceTime(Constants.Log.App.TimeRecentsStartup,
+                    Constants.Log.App.TimeRecentsStartupKey, "receivedToggleRecents");
+            Console.logTraceTime(Constants.Log.App.TimeRecentsLaunchTask,
+                    Constants.Log.App.TimeRecentsLaunchKey, "receivedToggleRecents");
         }
     }
 }
@@ -131,31 +131,31 @@ public class RecentsService extends Service {
 
     @Override
     public void onCreate() {
-        Console.log(Constants.DebugFlags.App.SystemUIHandshake, "[RecentsService|onCreate]");
+        Console.log(Constants.Log.App.SystemUIHandshake, "[RecentsService|onCreate]");
         super.onCreate();
     }
 
     @Override
     public IBinder onBind(Intent intent) {
-        Console.log(Constants.DebugFlags.App.SystemUIHandshake, "[RecentsService|onBind]");
+        Console.log(Constants.Log.App.SystemUIHandshake, "[RecentsService|onBind]");
         return mSystemUIMessenger.getBinder();
     }
 
     @Override
     public boolean onUnbind(Intent intent) {
-        Console.log(Constants.DebugFlags.App.SystemUIHandshake, "[RecentsService|onUnbind]");
+        Console.log(Constants.Log.App.SystemUIHandshake, "[RecentsService|onUnbind]");
         return super.onUnbind(intent);
     }
 
     @Override
     public void onRebind(Intent intent) {
-        Console.log(Constants.DebugFlags.App.SystemUIHandshake, "[RecentsService|onRebind]");
+        Console.log(Constants.Log.App.SystemUIHandshake, "[RecentsService|onRebind]");
         super.onRebind(intent);
     }
 
     @Override
     public void onDestroy() {
-        Console.log(Constants.DebugFlags.App.SystemUIHandshake, "[RecentsService|onDestroy]");
+        Console.log(Constants.Log.App.SystemUIHandshake, "[RecentsService|onDestroy]");
         super.onDestroy();
     }
 
index 4a19027..c9038ee 100644 (file)
@@ -51,7 +51,7 @@ class TaskResourceLoadQueue {
 
     /** Adds a new task to the load queue */
     void addTask(Task t, boolean forceLoad) {
-        Console.log(Constants.DebugFlags.App.TaskDataLoader, "  [TaskResourceLoadQueue|addTask]");
+        Console.log(Constants.Log.App.TaskDataLoader, "  [TaskResourceLoadQueue|addTask]");
         if (!mQueue.contains(t)) {
             mQueue.add(t);
         }
@@ -68,7 +68,7 @@ class TaskResourceLoadQueue {
      * force reloaded.
      */
     Pair<Task, Boolean> nextTask() {
-        Console.log(Constants.DebugFlags.App.TaskDataLoader, "  [TaskResourceLoadQueue|nextTask]");
+        Console.log(Constants.Log.App.TaskDataLoader, "  [TaskResourceLoadQueue|nextTask]");
         Task task = mQueue.poll();
         Boolean forceLoadTask = null;
         if (task != null) {
@@ -82,14 +82,14 @@ class TaskResourceLoadQueue {
 
     /** Removes a task from the load queue */
     void removeTask(Task t) {
-        Console.log(Constants.DebugFlags.App.TaskDataLoader, "  [TaskResourceLoadQueue|removeTask]");
+        Console.log(Constants.Log.App.TaskDataLoader, "  [TaskResourceLoadQueue|removeTask]");
         mQueue.remove(t);
         mForceLoadSet.remove(t.key);
     }
 
     /** Clears all the tasks from the load queue */
     void clearTasks() {
-        Console.log(Constants.DebugFlags.App.TaskDataLoader, "  [TaskResourceLoadQueue|clearTasks]");
+        Console.log(Constants.Log.App.TaskDataLoader, "  [TaskResourceLoadQueue|clearTasks]");
         mQueue.clear();
         mForceLoadSet.clear();
     }
@@ -132,7 +132,7 @@ class TaskResourceLoader implements Runnable {
 
     /** Restarts the loader thread */
     void start(Context context) {
-        Console.log(Constants.DebugFlags.App.TaskDataLoader, "[TaskResourceLoader|start]");
+        Console.log(Constants.Log.App.TaskDataLoader, "[TaskResourceLoader|start]");
         mContext = context;
         mCancelled = false;
         mSystemServicesProxy = new SystemServicesProxy(context);
@@ -144,7 +144,7 @@ class TaskResourceLoader implements Runnable {
 
     /** Requests the loader thread to stop after the current iteration */
     void stop() {
-        Console.log(Constants.DebugFlags.App.TaskDataLoader, "[TaskResourceLoader|stop]");
+        Console.log(Constants.Log.App.TaskDataLoader, "[TaskResourceLoader|stop]");
         // Mark as cancelled for the thread to pick up
         mCancelled = true;
         mSystemServicesProxy = null;
@@ -158,10 +158,10 @@ class TaskResourceLoader implements Runnable {
     @Override
     public void run() {
         while (true) {
-            Console.log(Constants.DebugFlags.App.TaskDataLoader,
+            Console.log(Constants.Log.App.TaskDataLoader,
                     "[TaskResourceLoader|run|" + Thread.currentThread().getId() + "]");
             if (mCancelled) {
-                Console.log(Constants.DebugFlags.App.TaskDataLoader,
+                Console.log(Constants.Log.App.TaskDataLoader,
                         "[TaskResourceLoader|cancel|" + Thread.currentThread().getId() + "]");
                 // We have to unset the context here, since the background thread may be using it
                 // when we call stop()
@@ -169,7 +169,7 @@ class TaskResourceLoader implements Runnable {
                 // If we are cancelled, then wait until we are started again
                 synchronized(mLoadThread) {
                     try {
-                        Console.log(Constants.DebugFlags.App.TaskDataLoader,
+                        Console.log(Constants.Log.App.TaskDataLoader,
                                 "[TaskResourceLoader|waitOnLoadThreadCancelled]");
                         mLoadThread.wait();
                     } catch (InterruptedException ie) {
@@ -186,7 +186,7 @@ class TaskResourceLoader implements Runnable {
                 if (t != null) {
                     Drawable loadIcon = mApplicationIconCache.get(t.key);
                     Bitmap loadThumbnail = mThumbnailCache.get(t.key);
-                    Console.log(Constants.DebugFlags.App.TaskDataLoader,
+                    Console.log(Constants.Log.App.TaskDataLoader,
                             "  [TaskResourceLoader|load]",
                             t + " icon: " + loadIcon + " thumbnail: " + loadThumbnail +
                                     " forceLoad: " + forceLoadTask);
@@ -197,7 +197,7 @@ class TaskResourceLoader implements Runnable {
                         Drawable icon = ssp.getActivityIcon(info, t.userId);
                         if (!mCancelled) {
                             if (icon != null) {
-                                Console.log(Constants.DebugFlags.App.TaskDataLoader,
+                                Console.log(Constants.Log.App.TaskDataLoader,
                                         "    [TaskResourceLoader|loadIcon]",
                                         icon);
                                 loadIcon = icon;
@@ -210,7 +210,7 @@ class TaskResourceLoader implements Runnable {
                         Bitmap thumbnail = ssp.getTaskThumbnail(t.key.id);
                         if (!mCancelled) {
                             if (thumbnail != null) {
-                                Console.log(Constants.DebugFlags.App.TaskDataLoader,
+                                Console.log(Constants.Log.App.TaskDataLoader,
                                         "    [TaskResourceLoader|loadThumbnail]",
                                         thumbnail);
                                 thumbnail.setHasAlpha(false);
@@ -240,7 +240,7 @@ class TaskResourceLoader implements Runnable {
                 if (!mCancelled && mLoadQueue.isEmpty()) {
                     synchronized(mLoadQueue) {
                         try {
-                            Console.log(Constants.DebugFlags.App.TaskDataLoader,
+                            Console.log(Constants.Log.App.TaskDataLoader,
                                     "[TaskResourceLoader|waitOnLoadQueue]");
                             mWaitingOnLoadQueue = true;
                             mLoadQueue.wait();
@@ -319,7 +319,7 @@ public class RecentsTaskLoader {
         int thumbnailCacheSize = Constants.DebugFlags.App.DisableBackgroundCache ? 1 :
                 mMaxThumbnailCacheSize;
 
-        Console.log(Constants.DebugFlags.App.TaskDataLoader,
+        Console.log(Constants.Log.App.TaskDataLoader,
                 "[RecentsTaskLoader|init]", "thumbnailCache: " + thumbnailCacheSize +
                 " iconCache: " + iconCacheSize);
 
@@ -336,7 +336,7 @@ public class RecentsTaskLoader {
         mDefaultThumbnail = Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888);
         mDefaultThumbnail.eraseColor(0x00000000);
         mDefaultApplicationIcon = new BitmapDrawable(context.getResources(), icon);
-        Console.log(Constants.DebugFlags.App.TaskDataLoader,
+        Console.log(Constants.Log.App.TaskDataLoader,
                 "[RecentsTaskLoader|defaultBitmaps]",
                 "icon: " + mDefaultApplicationIcon + " thumbnail: " + mDefaultThumbnail, Console.AnsiRed);
     }
@@ -366,10 +366,10 @@ public class RecentsTaskLoader {
         List<ActivityManager.RecentTaskInfo> tasks =
                 ssp.getRecentTasks(25, UserHandle.CURRENT.getIdentifier());
         Collections.reverse(tasks);
-        Console.log(Constants.DebugFlags.App.TimeSystemCalls,
+        Console.log(Constants.Log.App.TimeSystemCalls,
                 "[RecentsTaskLoader|getRecentTasks]",
                 "" + (System.currentTimeMillis() - t1) + "ms");
-        Console.log(Constants.DebugFlags.App.TaskDataLoader,
+        Console.log(Constants.Log.App.TaskDataLoader,
                 "[RecentsTaskLoader|tasks]", "" + tasks.size());
 
         // Remove home/recents tasks
@@ -396,7 +396,7 @@ public class RecentsTaskLoader {
     SpaceNode reload(Context context, int preloadCount) {
         long t1 = System.currentTimeMillis();
 
-        Console.log(Constants.DebugFlags.App.TaskDataLoader, "[RecentsTaskLoader|reload]");
+        Console.log(Constants.Log.App.TaskDataLoader, "[RecentsTaskLoader|reload]");
         Resources res = context.getResources();
         ArrayList<Task> tasksToForceLoad = new ArrayList<Task>();
         TaskStack stack = new TaskStack(context);
@@ -435,7 +435,7 @@ public class RecentsTaskLoader {
 
             // Preload the specified number of apps
             if (i >= (taskCount - preloadCount)) {
-                Console.log(Constants.DebugFlags.App.TaskDataLoader,
+                Console.log(Constants.Log.App.TaskDataLoader,
                         "[RecentsTaskLoader|preloadTask]",
                         "i: " + i + " task: " + t.baseIntent.getComponent().getPackageName());
 
@@ -467,7 +467,7 @@ public class RecentsTaskLoader {
                     }
                 }
                 if (task.thumbnail == null) {
-                    Console.log(Constants.DebugFlags.App.TaskDataLoader,
+                    Console.log(Constants.Log.App.TaskDataLoader,
                             "[RecentsTaskLoader|loadingTaskThumbnail]");
                     task.thumbnail = ssp.getTaskThumbnail(task.key.id);
                     if (task.thumbnail != null) {
@@ -480,11 +480,11 @@ public class RecentsTaskLoader {
             }
 
             // Add the task to the stack
-            Console.log(Constants.DebugFlags.App.TaskDataLoader,
+            Console.log(Constants.Log.App.TaskDataLoader,
                 "  [RecentsTaskLoader|task]", t.baseIntent.getComponent().getPackageName());
             stack.addTask(task);
         }
-        Console.log(Constants.DebugFlags.App.TimeSystemCalls,
+        Console.log(Constants.Log.App.TimeSystemCalls,
                 "[RecentsTaskLoader|getAllTaskTopThumbnail]",
                 "" + (System.currentTimeMillis() - t1) + "ms");
 
@@ -492,10 +492,10 @@ public class RecentsTaskLoader {
         // Get all the stacks
         t1 = System.currentTimeMillis();
         List<ActivityManager.StackInfo> stackInfos = ams.getAllStackInfos();
-        Console.log(Constants.DebugFlags.App.TimeSystemCalls, "[RecentsTaskLoader|getAllStackInfos]", "" + (System.currentTimeMillis() - t1) + "ms");
-        Console.log(Constants.DebugFlags.App.TaskDataLoader, "[RecentsTaskLoader|stacks]", "" + tasks.size());
+        Console.log(Constants.Log.App.TimeSystemCalls, "[RecentsTaskLoader|getAllStackInfos]", "" + (System.currentTimeMillis() - t1) + "ms");
+        Console.log(Constants.Log.App.TaskDataLoader, "[RecentsTaskLoader|stacks]", "" + tasks.size());
         for (ActivityManager.StackInfo s : stackInfos) {
-            Console.log(Constants.DebugFlags.App.TaskDataLoader, "  [RecentsTaskLoader|stack]", s.toString());
+            Console.log(Constants.Log.App.TaskDataLoader, "  [RecentsTaskLoader|stack]", s.toString());
             if (stacks.containsKey(s.stackId)) {
                 stacks.get(s.stackId).setRect(s.bounds);
             }
@@ -518,7 +518,7 @@ public class RecentsTaskLoader {
         Drawable applicationIcon = mApplicationIconCache.get(t.key);
         Bitmap thumbnail = mThumbnailCache.get(t.key);
 
-        Console.log(Constants.DebugFlags.App.TaskDataLoader, "[RecentsTaskLoader|loadTask]",
+        Console.log(Constants.Log.App.TaskDataLoader, "[RecentsTaskLoader|loadTask]",
                 t + " applicationIcon: " + applicationIcon + " thumbnail: " + thumbnail +
                         " thumbnailCacheSize: " + mThumbnailCache.size());
 
@@ -539,7 +539,7 @@ public class RecentsTaskLoader {
 
     /** Releases the task resource data back into the pool. */
     public void unloadTaskData(Task t) {
-        Console.log(Constants.DebugFlags.App.TaskDataLoader,
+        Console.log(Constants.Log.App.TaskDataLoader,
                 "[RecentsTaskLoader|unloadTask]", t +
                 " thumbnailCacheSize: " + mThumbnailCache.size());
 
@@ -549,7 +549,7 @@ public class RecentsTaskLoader {
 
     /** Completely removes the resource data from the pool. */
     public void deleteTaskData(Task t) {
-        Console.log(Constants.DebugFlags.App.TaskDataLoader,
+        Console.log(Constants.Log.App.TaskDataLoader,
                 "[RecentsTaskLoader|deleteTask]", t);
 
         mLoadQueue.removeTask(t);
@@ -560,13 +560,13 @@ public class RecentsTaskLoader {
 
     /** Stops the task loader and clears all pending tasks */
     void stopLoader() {
-        Console.log(Constants.DebugFlags.App.TaskDataLoader, "[RecentsTaskLoader|stopLoader]");
+        Console.log(Constants.Log.App.TaskDataLoader, "[RecentsTaskLoader|stopLoader]");
         mLoader.stop();
         mLoadQueue.clearTasks();
     }
 
     void onTrimMemory(int level) {
-        Console.log(Constants.DebugFlags.App.Memory, "[RecentsTaskLoader|onTrimMemory]",
+        Console.log(Constants.Log.App.Memory, "[RecentsTaskLoader|onTrimMemory]",
                 Console.trimMemoryLevelToString(level));
 
         switch (level) {
index c3b8a20..b41555f 100644 (file)
@@ -180,7 +180,7 @@ public class SystemServicesProxy {
      */
     public ActivityInfo getActivityInfo(ComponentName cn, int userId) {
         if (mIpm == null) return null;
-        if (Constants.DebugFlags.App.EnableSystemServicesProxy) return null;
+        if (Constants.DebugFlags.App.EnableSystemServicesProxy) return new ActivityInfo();
 
         try {
             return mIpm.getActivityInfo(cn, PackageManager.GET_META_DATA, userId);
@@ -197,7 +197,7 @@ public class SystemServicesProxy {
      */
     public ActivityInfo getActivityInfo(ComponentName cn) {
         if (mPm == null) return null;
-        if (Constants.DebugFlags.App.EnableSystemServicesProxy) return null;
+        if (Constants.DebugFlags.App.EnableSystemServicesProxy) return new ActivityInfo();
 
         try {
             return mPm.getActivityInfo(cn, PackageManager.GET_META_DATA);
index c2e8275..eb7b5c6 100644 (file)
@@ -124,7 +124,7 @@ public class RecentsView extends FrameLayout implements TaskStackView.TaskStackV
     /** Adds the search bar */
     public void setSearchBar(View searchBar) {
         // Create the search bar (and hide it if we have no recent tasks)
-        if (Constants.DebugFlags.App.EnableSearchButton) {
+        if (Constants.DebugFlags.App.EnableSearchLayout) {
             // Remove the previous search bar if one exists
             if (mSearchBar != null && indexOfChild(mSearchBar) > -1) {
                 removeView(mSearchBar);
@@ -135,7 +135,7 @@ public class RecentsView extends FrameLayout implements TaskStackView.TaskStackV
                 mSearchBar.setVisibility(mHasTasks ? View.VISIBLE : View.GONE);
                 addView(mSearchBar);
 
-                Console.log(Constants.DebugFlags.App.SystemUIHandshake, "[RecentsView|setSearchBar]",
+                Console.log(Constants.Log.App.SystemUIHandshake, "[RecentsView|setSearchBar]",
                         "" + (mSearchBar.getVisibility() == View.VISIBLE),
                         Console.AnsiBlue);
             }
@@ -152,10 +152,10 @@ public class RecentsView extends FrameLayout implements TaskStackView.TaskStackV
         int height = MeasureSpec.getSize(heightMeasureSpec);
         int heightMode = MeasureSpec.getMode(heightMeasureSpec);
 
-        Console.log(Constants.DebugFlags.UI.MeasureAndLayout, "[RecentsView|measure]",
+        Console.log(Constants.Log.UI.MeasureAndLayout, "[RecentsView|measure]",
                 "width: " + width + " height: " + height, Console.AnsiGreen);
-        Console.logTraceTime(Constants.DebugFlags.App.TimeRecentsStartup,
-                Constants.DebugFlags.App.TimeRecentsStartupKey, "RecentsView.onMeasure");
+        Console.logTraceTime(Constants.Log.App.TimeRecentsStartup,
+                Constants.Log.App.TimeRecentsStartupKey, "RecentsView.onMeasure");
 
         // Get the search bar bounds and measure the search bar layout
         RecentsConfiguration config = RecentsConfiguration.getInstance();
@@ -194,10 +194,10 @@ public class RecentsView extends FrameLayout implements TaskStackView.TaskStackV
      */
     @Override
     protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
-        Console.log(Constants.DebugFlags.UI.MeasureAndLayout, "[RecentsView|layout]",
+        Console.log(Constants.Log.UI.MeasureAndLayout, "[RecentsView|layout]",
                 new Rect(left, top, right, bottom) + " changed: " + changed, Console.AnsiGreen);
-        Console.logTraceTime(Constants.DebugFlags.App.TimeRecentsStartup,
-                Constants.DebugFlags.App.TimeRecentsStartupKey, "RecentsView.onLayout");
+        Console.logTraceTime(Constants.Log.App.TimeRecentsStartup,
+                Constants.Log.App.TimeRecentsStartupKey, "RecentsView.onLayout");
 
         // Get the search bar bounds so that we lay it out
         RecentsConfiguration config = RecentsConfiguration.getInstance();
@@ -232,14 +232,14 @@ public class RecentsView extends FrameLayout implements TaskStackView.TaskStackV
 
     @Override
     protected void dispatchDraw(Canvas canvas) {
-        Console.log(Constants.DebugFlags.UI.Draw, "[RecentsView|dispatchDraw]", "",
+        Console.log(Constants.Log.UI.Draw, "[RecentsView|dispatchDraw]", "",
                 Console.AnsiPurple);
         super.dispatchDraw(canvas);
     }
 
     @Override
     protected boolean fitSystemWindows(Rect insets) {
-        Console.log(Constants.DebugFlags.UI.MeasureAndLayout,
+        Console.log(Constants.Log.UI.MeasureAndLayout,
                 "[RecentsView|fitSystemWindows]", "insets: " + insets, Console.AnsiGreen);
 
         // Update the configuration with the latest system insets and trigger a relayout
@@ -359,16 +359,16 @@ public class RecentsView extends FrameLayout implements TaskStackView.TaskStackV
                     }
                 }
 
-                Console.logTraceTime(Constants.DebugFlags.App.TimeRecentsLaunchTask,
-                        Constants.DebugFlags.App.TimeRecentsLaunchKey, "startActivity");
+                Console.logTraceTime(Constants.Log.App.TimeRecentsLaunchTask,
+                        Constants.Log.App.TimeRecentsLaunchKey, "startActivity");
             }
         };
 
-        Console.logTraceTime(Constants.DebugFlags.App.TimeRecentsLaunchTask,
-                Constants.DebugFlags.App.TimeRecentsLaunchKey, "onTaskLaunched");
+        Console.logTraceTime(Constants.Log.App.TimeRecentsLaunchTask,
+                Constants.Log.App.TimeRecentsLaunchKey, "onTaskLaunched");
 
         // Launch the app right away if there is no task view, otherwise, animate the icon out first
-        if (tv == null || !Constants.Values.TaskView.AnimateFrontTaskBarOnLeavingRecents) {
+        if (tv == null) {
             post(launchRunnable);
         } else {
             tv.animateOnLeavingRecents(launchRunnable);
index 21ef9ff..c34300c 100644 (file)
@@ -178,7 +178,7 @@ public class SwipeHelper {
     }
 
     public boolean onInterceptTouchEvent(MotionEvent ev) {
-        Console.log(Constants.DebugFlags.UI.TouchEvents,
+        Console.log(Constants.Log.UI.TouchEvents,
                 "[SwipeHelper|interceptTouchEvent]",
                 Console.motionEventActionToString(ev.getAction()), Console.AnsiBlue);
         final int action = ev.getAction();
@@ -291,7 +291,7 @@ public class SwipeHelper {
     }
 
     public boolean onTouchEvent(MotionEvent ev) {
-        Console.log(Constants.DebugFlags.UI.TouchEvents,
+        Console.log(Constants.Log.UI.TouchEvents,
                 "[SwipeHelper|touchEvent]",
                 Console.motionEventActionToString(ev.getAction()), Console.AnsiBlue);
 
index ce43b5a..cfacd18 100644 (file)
@@ -18,7 +18,6 @@ package com.android.systemui.recents.views;
 
 import android.animation.Animator;
 import android.animation.AnimatorListenerAdapter;
-import android.animation.AnimatorSet;
 import android.animation.ObjectAnimator;
 import android.animation.ValueAnimator;
 import android.app.Activity;
@@ -110,7 +109,7 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
         requestSynchronizeStackViewsWithModel(0);
     }
     void requestSynchronizeStackViewsWithModel(int duration) {
-        Console.log(Constants.DebugFlags.TaskStack.SynchronizeViewsWithModel,
+        Console.log(Constants.Log.TaskStack.SynchronizeViewsWithModel,
                 "[TaskStackView|requestSynchronize]", "" + duration + "ms", Console.AnsiYellow);
         if (!mStackViewsDirty) {
             invalidate();
@@ -215,7 +214,7 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
 
     /** Synchronizes the views with the model */
     void synchronizeStackViewsWithModel() {
-        Console.log(Constants.DebugFlags.TaskStack.SynchronizeViewsWithModel,
+        Console.log(Constants.Log.TaskStack.SynchronizeViewsWithModel,
                 "[TaskStackView|synchronizeViewsWithModel]",
                 "mStackViewsDirty: " + mStackViewsDirty, Console.AnsiYellow);
         if (mStackViewsDirty) {
@@ -271,7 +270,7 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
                 }
             }
 
-            Console.log(Constants.DebugFlags.TaskStack.SynchronizeViewsWithModel,
+            Console.log(Constants.Log.TaskStack.SynchronizeViewsWithModel,
                     "  [TaskStackView|viewChildren]", "" + getChildCount());
 
             mStackViewsAnimationDuration = 0;
@@ -429,7 +428,7 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
         }
 
         // Debug logging
-        if (Constants.DebugFlags.UI.MeasureAndLayout) {
+        if (Constants.Log.UI.MeasureAndLayout) {
             Console.log("  [TaskStack|minScroll] " + mMinScroll);
             Console.log("  [TaskStack|maxScroll] " + mMaxScroll);
         }
@@ -456,7 +455,7 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
 
     /** Enables the hw layers and increments the hw layer requirement ref count */
     void addHwLayersRefCount(String reason) {
-        Console.log(Constants.DebugFlags.UI.HwLayers,
+        Console.log(Constants.Log.UI.HwLayers,
                 "[TaskStackView|addHwLayersRefCount] refCount: " +
                         mHwLayersRefCount + "->" + (mHwLayersRefCount + 1) + " " + reason);
         if (mHwLayersRefCount == 0) {
@@ -473,7 +472,7 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
     /** Decrements the hw layer requirement ref count and disables the hw layers when we don't
         need them anymore. */
     void decHwLayersRefCount(String reason) {
-        Console.log(Constants.DebugFlags.UI.HwLayers,
+        Console.log(Constants.Log.UI.HwLayers,
                 "[TaskStackView|decHwLayersRefCount] refCount: " +
                         mHwLayersRefCount + "->" + (mHwLayersRefCount - 1) + " " + reason);
         mHwLayersRefCount--;
@@ -515,7 +514,7 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
 
     @Override
     public void dispatchDraw(Canvas canvas) {
-        Console.log(Constants.DebugFlags.UI.Draw, "[TaskStackView|dispatchDraw]", "",
+        Console.log(Constants.Log.UI.Draw, "[TaskStackView|dispatchDraw]", "",
                 Console.AnsiPurple);
         synchronizeStackViewsWithModel();
         super.dispatchDraw(canvas);
@@ -568,7 +567,7 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
 
         int smallestDimension = Math.min(width, height);
         int padding = (int) (Constants.Values.TaskStackView.StackPaddingPct * smallestDimension / 2f);
-        if (Constants.DebugFlags.App.EnableSearchButton) {
+        if (Constants.DebugFlags.App.EnableSearchLayout) {
             mStackRect.top += padding;
             mStackRect.left += padding;
             mStackRect.right -= padding;
@@ -600,7 +599,7 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
     protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
         int width = MeasureSpec.getSize(widthMeasureSpec);
         int height = MeasureSpec.getSize(heightMeasureSpec);
-        Console.log(Constants.DebugFlags.UI.MeasureAndLayout, "[TaskStackView|measure]",
+        Console.log(Constants.Log.UI.MeasureAndLayout, "[TaskStackView|measure]",
                 "width: " + width + " height: " + height +
                 " awaitingFirstLayout: " + mAwaitingFirstLayout, Console.AnsiGreen);
 
@@ -611,7 +610,7 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
         computeRects(width, height, taskStackBounds.left, config.systemInsets.bottom);
 
         // Debug logging
-        if (Constants.DebugFlags.UI.MeasureAndLayout) {
+        if (Constants.Log.UI.MeasureAndLayout) {
             Console.log("  [TaskStack|fullRect] " + mRect);
             Console.log("  [TaskStack|stackRect] " + mStackRect);
             Console.log("  [TaskStack|stackRectSansPeek] " + mStackRectSansPeek);
@@ -626,8 +625,7 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
             synchronizeStackViewsWithModel();
 
             // Animate the task bar of the first task view
-            if (config.launchedWithThumbnailAnimation &&
-                    Constants.Values.TaskView.AnimateFrontTaskBarOnEnterRecents) {
+            if (config.launchedWithThumbnailAnimation) {
                 TaskView tv = (TaskView) getChildAt(getChildCount() - 1);
                 if (tv != null) {
                     tv.animateOnEnterRecents();
@@ -653,11 +651,11 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
      */
     @Override
     protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
-        Console.log(Constants.DebugFlags.UI.MeasureAndLayout, "[TaskStackView|layout]",
+        Console.log(Constants.Log.UI.MeasureAndLayout, "[TaskStackView|layout]",
                 "" + new Rect(left, top, right, bottom), Console.AnsiGreen);
 
         // Debug logging
-        if (Constants.DebugFlags.UI.MeasureAndLayout) {
+        if (Constants.Log.UI.MeasureAndLayout) {
             Console.log("  [TaskStack|fullRect] " + mRect);
             Console.log("  [TaskStack|stackRect] " + mStackRect);
             Console.log("  [TaskStack|stackRectSansPeek] " + mStackRectSansPeek);
@@ -911,7 +909,7 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
 
     @Override
     public TaskView createView(Context context) {
-        Console.log(Constants.DebugFlags.ViewPool.PoolCallbacks, "[TaskStackView|createPoolView]");
+        Console.log(Constants.Log.ViewPool.PoolCallbacks, "[TaskStackView|createPoolView]");
         return (TaskView) mInflater.inflate(R.layout.recents_task_view, this, false);
     }
 
@@ -919,7 +917,7 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
     public void prepareViewToEnterPool(TaskView tv) {
         Task task = tv.getTask();
         tv.resetViewProperties();
-        Console.log(Constants.DebugFlags.ViewPool.PoolCallbacks, "[TaskStackView|returnToPool]",
+        Console.log(Constants.Log.ViewPool.PoolCallbacks, "[TaskStackView|returnToPool]",
                 tv.getTask() + " tv: " + tv);
 
         // Report that this tasks's data is no longer being used
@@ -935,7 +933,7 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
 
     @Override
     public void prepareViewToLeavePool(TaskView tv, Task prepareData, boolean isNewView) {
-        Console.log(Constants.DebugFlags.ViewPool.PoolCallbacks, "[TaskStackView|leavePool]",
+        Console.log(Constants.Log.ViewPool.PoolCallbacks, "[TaskStackView|leavePool]",
                 "isNewView: " + isNewView);
 
         // Setup and attach the view to the window
@@ -958,7 +956,7 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
         }
 
         // Add/attach the view to the hierarchy
-        Console.log(Constants.DebugFlags.ViewPool.PoolCallbacks, "  [TaskStackView|insertIndex]",
+        Console.log(Constants.Log.ViewPool.PoolCallbacks, "  [TaskStackView|insertIndex]",
                 "" + insertIndex);
         if (isNewView) {
             addView(tv, insertIndex);
@@ -988,7 +986,7 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
 
     @Override
     public void onTaskIconClicked(TaskView tv) {
-        Console.log(Constants.DebugFlags.UI.ClickEvents, "[TaskStack|Clicked|Icon]",
+        Console.log(Constants.Log.UI.ClickEvents, "[TaskStack|Clicked|Icon]",
                 tv.getTask() + " is currently filtered: " + mStack.hasFilteredTasks(),
                 Console.AnsiCyan);
         if (Constants.DebugFlags.App.EnableTaskFiltering) {
@@ -1024,7 +1022,7 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
     public void onClick(View v) {
         TaskView tv = (TaskView) v;
         Task task = tv.getTask();
-        Console.log(Constants.DebugFlags.UI.ClickEvents, "[TaskStack|Clicked|Thumbnail]",
+        Console.log(Constants.Log.UI.ClickEvents, "[TaskStack|Clicked|Thumbnail]",
                 task + " cb: " + mCb);
 
         // Close any open info panes if the user taps on another task
@@ -1149,7 +1147,7 @@ class TaskStackViewTouchHandler implements SwipeHelper.Callback {
 
     /** Touch preprocessing for handling below */
     public boolean onInterceptTouchEvent(MotionEvent ev) {
-        Console.log(Constants.DebugFlags.UI.TouchEvents,
+        Console.log(Constants.Log.UI.TouchEvents,
                 "[TaskStackViewTouchHandler|interceptTouchEvent]",
                 Console.motionEventActionToString(ev.getAction()), Console.AnsiBlue);
 
@@ -1233,7 +1231,7 @@ class TaskStackViewTouchHandler implements SwipeHelper.Callback {
 
     /** Handles touch events once we have intercepted them */
     public boolean onTouchEvent(MotionEvent ev) {
-        Console.log(Constants.DebugFlags.UI.TouchEvents,
+        Console.log(Constants.Log.UI.TouchEvents,
                 "[TaskStackViewTouchHandler|touchEvent]",
                 Console.motionEventActionToString(ev.getAction()), Console.AnsiBlue);
 
@@ -1336,7 +1334,7 @@ class TaskStackViewTouchHandler implements SwipeHelper.Callback {
                             Math.abs((float) velocity / mMaximumVelocity)) *
                             Constants.Values.TaskStackView.TaskStackOverscrollRange);
 
-                    Console.log(Constants.DebugFlags.UI.TouchEvents,
+                    Console.log(Constants.Log.UI.TouchEvents,
                             "[TaskStackViewTouchHandler|fling]",
                             "scroll: " + mSv.getStackScroll() + " velocity: " + velocity +
                                     " maxVelocity: " + mMaximumVelocity +
index 801de24..45c2fae 100644 (file)
@@ -146,13 +146,17 @@ public class TaskView extends FrameLayout implements View.OnClickListener,
         if (duration > 0) {
             if (animateFromTransform != null) {
                 setTranslationY(animateFromTransform.translationY);
-                setTranslationZ(Math.max(minZ, minZ + (animateFromTransform.t * incZ)));
+                if (Constants.DebugFlags.App.EnableShadows) {
+                    setTranslationZ(Math.max(minZ, minZ + (animateFromTransform.t * incZ)));
+                }
                 setScaleX(animateFromTransform.scale);
                 setScaleY(animateFromTransform.scale);
                 setAlpha(animateFromTransform.alpha);
             }
+            if (Constants.DebugFlags.App.EnableShadows) {
+                animate().translationZ(Math.max(minZ, minZ + (toTransform.t * incZ)));
+            }
             animate().translationY(toTransform.translationY)
-                    .translationZ(Math.max(minZ, minZ + (toTransform.t * incZ)))
                     .scaleX(toTransform.scale)
                     .scaleY(toTransform.scale)
                     .alpha(toTransform.alpha)
@@ -168,7 +172,9 @@ public class TaskView extends FrameLayout implements View.OnClickListener,
                     .start();
         } else {
             setTranslationY(toTransform.translationY);
-            setTranslationZ(Math.max(minZ, minZ + (toTransform.t * incZ)));
+            if (Constants.DebugFlags.App.EnableShadows) {
+                setTranslationZ(Math.max(minZ, minZ + (toTransform.t * incZ)));
+            }
             setScaleX(toTransform.scale);
             setScaleY(toTransform.scale);
             setAlpha(toTransform.alpha);
@@ -181,7 +187,9 @@ public class TaskView extends FrameLayout implements View.OnClickListener,
     void resetViewProperties() {
         setTranslationX(0f);
         setTranslationY(0f);
-        setTranslationZ(0f);
+        if (Constants.DebugFlags.App.EnableShadows) {
+            setTranslationZ(0f);
+        }
         setScaleX(1f);
         setScaleY(1f);
         setAlpha(1f);