Allow QS tiles to open dialogs

Add a TYPE_QS_DIALOG window type, that is in the same layer as
apps and dialogs and such.  It is guarded by having a token
that is granted by SysUI after a click has occured.  If the
app shows a dialog before listening finishes (QS closes) then
the token will stay granted until the tile is removed by the
user, otherwise the token will be removed immediately to avoid
later dialogs.

Also fix a couple tiny TileService issues:
 - Stop/Start listening reversed
 - Fix javadoc referencing wrong action

Change-Id: Iedcdd5fd9a2af2b33eb7f6f17bb0e6c997879876
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java
index 639753a..9a7d153 100644
--- a/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -108,9 +108,6 @@
 import android.view.KeyCharacterMap.FallbackAction;
 import android.view.KeyEvent;
 import android.view.MotionEvent;
-
-import com.android.internal.logging.MetricsLogger;
-import com.android.internal.policy.PhoneWindow;
 import android.view.Surface;
 import android.view.View;
 import android.view.ViewConfiguration;
@@ -124,6 +121,8 @@
 import android.view.animation.AnimationSet;
 import android.view.animation.AnimationUtils;
 import com.android.internal.R;
+import com.android.internal.logging.MetricsLogger;
+import com.android.internal.policy.PhoneWindow;
 import com.android.internal.statusbar.IStatusBarService;
 import com.android.internal.util.ScreenShapeHelper;
 import com.android.internal.widget.PointerLocationView;
@@ -1915,6 +1914,7 @@
             case TYPE_PRIVATE_PRESENTATION:
             case TYPE_VOICE_INTERACTION:
             case TYPE_ACCESSIBILITY_OVERLAY:
+            case TYPE_QS_DIALOG:
                 // The window manager will check these.
                 break;
             case TYPE_PHONE:
@@ -2110,6 +2110,8 @@
             return 2;
         case TYPE_DOCK_DIVIDER:
             return 2;
+        case TYPE_QS_DIALOG:
+            return 2;
         case TYPE_PHONE:
             return 3;
         case TYPE_SEARCH_BAR: