summaryrefslogtreecommitdiffstats
path: root/quickstep
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2018-05-16 19:57:05 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2018-05-16 19:57:05 +0000
commit9638caf6e467daaca9860b149c2d6ec04aee704e (patch)
tree0f726d537ba49e7dea48705155f65b8773088b57 /quickstep
parent0b1174ddbe3c179dd472c1503e036ecf2870cc0c (diff)
parent55eb556a4b9b028a6a0cbe28400ae0582eb4ae04 (diff)
downloadandroid_packages_apps_Trebuchet-9638caf6e467daaca9860b149c2d6ec04aee704e.tar.gz
android_packages_apps_Trebuchet-9638caf6e467daaca9860b149c2d6ec04aee704e.tar.bz2
android_packages_apps_Trebuchet-9638caf6e467daaca9860b149c2d6ec04aee704e.zip
Merge "Dumping the excoded view hierarchy instead of the default activity dump" into ub-launcher3-edmonton
Diffstat (limited to 'quickstep')
-rw-r--r--quickstep/libs/sysui_shared.jarbin128240 -> 128738 bytes
-rw-r--r--quickstep/src/com/android/launcher3/uioverrides/UiFactory.java34
2 files changed, 34 insertions, 0 deletions
diff --git a/quickstep/libs/sysui_shared.jar b/quickstep/libs/sysui_shared.jar
index 95bb8bbed..5e25fd8bf 100644
--- a/quickstep/libs/sysui_shared.jar
+++ b/quickstep/libs/sysui_shared.jar
Binary files differ
diff --git a/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java b/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java
index 06099b9fa..e6030d126 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/UiFactory.java
@@ -24,7 +24,9 @@ import static com.android.launcher3.LauncherState.OVERVIEW;
import static com.android.launcher3.allapps.DiscoveryBounce.HOME_BOUNCE_SEEN;
import static com.android.launcher3.allapps.DiscoveryBounce.SHELF_BOUNCE_SEEN;
+import android.app.Activity;
import android.content.Context;
+import android.util.Base64;
import com.android.launcher3.AbstractFloatingView;
import com.android.launcher3.DeviceProfile;
@@ -32,13 +34,19 @@ import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherState;
import com.android.launcher3.LauncherStateManager;
import com.android.launcher3.LauncherStateManager.StateHandler;
+import com.android.launcher3.Utilities;
import com.android.launcher3.anim.AnimatorPlaybackController;
import com.android.launcher3.util.TouchController;
import com.android.quickstep.OverviewInteractionState;
import com.android.quickstep.RecentsModel;
import com.android.quickstep.views.RecentsView;
+import com.android.systemui.shared.system.ActivityCompat;
import com.android.systemui.shared.system.WindowManagerWrapper;
+import java.io.ByteArrayOutputStream;
+import java.io.PrintWriter;
+import java.util.zip.Deflater;
+
public class UiFactory {
public static TouchController[] createTouchControllers(Launcher launcher) {
@@ -167,6 +175,32 @@ public class UiFactory {
}
}
+ public static boolean dumpActivity(Activity activity, PrintWriter writer) {
+ if (!Utilities.IS_DEBUG_DEVICE) {
+ return false;
+ }
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ if (!(new ActivityCompat(activity).encodeViewHierarchy(out))) {
+ return false;
+ }
+
+ Deflater deflater = new Deflater();
+ deflater.setInput(out.toByteArray());
+ deflater.finish();
+
+ out.reset();
+ byte[] buffer = new byte[1024];
+ while (!deflater.finished()) {
+ int count = deflater.deflate(buffer); // returns the generated code... index
+ out.write(buffer, 0, count);
+ }
+
+ writer.println("--encoded-view-dump-v0--");
+ writer.println(Base64.encodeToString(
+ out.toByteArray(), Base64.NO_WRAP | Base64.NO_PADDING));
+ return true;
+ }
+
private static class LauncherTaskViewController extends TaskViewTouchController<Launcher> {
public LauncherTaskViewController(Launcher activity) {