From 55eb556a4b9b028a6a0cbe28400ae0582eb4ae04 Mon Sep 17 00:00:00 2001 From: Sunny Goyal Date: Tue, 15 May 2018 14:53:30 -0700 Subject: [PATCH] Dumping the excoded view hierarchy instead of the default activity dump > Encoded hierarchy is smaller is size and has a lot more information about the views Bug: 79861035 Change-Id: I84316b1b0031282b0579f3aaac22d8d8f00d8bcb --- quickstep/libs/sysui_shared.jar | Bin 128240 -> 128738 bytes .../launcher3/uioverrides/UiFactory.java | 34 ++++++++++++++++++ src/com/android/launcher3/BaseActivity.java | 9 +++++ .../launcher3/uioverrides/UiFactory.java | 8 +++++ 4 files changed, 51 insertions(+) diff --git a/quickstep/libs/sysui_shared.jar b/quickstep/libs/sysui_shared.jar index 95bb8bbed8d884f40a5bea787624a40537ff96d4..5e25fd8bf280b0370133ecfd6ebddf87cfa395c5 100644 GIT binary patch delta 4451 zcmZWsc_5W(7r)OH_qxcwi|ZprQDQ>Mhlv|37Cd0H=(VWyPK z)x51zQCT9S>=a=tA!f?*P2YLmS2w=#hvWU7bAHb`=Y8(^UEP0jUUhO5J=|o*Xt20k zE=xb>sG>a^elLt<>*Zt@nj$cwX!RM`s2Hi?ydtD1na^I&0Te4HB5ToARV_TR7%514 zd)#VfSxZI!Lj^&5+F)lX@~Dt zBOScH8qT=(*obb&H-<(HC6+~TWYAEq9iChR1Cgz?rJEm);7RsWU8I4|6gq{6qiPWk zkE=x-$*$@{|8l8HJnJqIlrBYL(^#lV>KyEPO&XBA`s+5E*wjzQiG>-jlOzqkAdQQn z#CABZ4jJLK4M<5+_W5_Z0aA!S5ou9nGAK-18jU2$A@|XUjXbKR52vq!%HK*@r3qsRg`GtpxKZxb_cl{9Oo927ntGOoGogLAr*tyQWKE=P|PT;Mb-#qeo=5A+k zd74X{xIlM6|BvDovr5gB#X6^hk7?+Mx8%G?$kWAey#R{=vSet-=~V&CJk83jMbO?VUG=Tl>y=<}MQ%v@YSU z$_=&SyVZZQ@LEyiF*wIVSMEmO(tFQ?b3ZYp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C)0{ipZHr!}yM^s}$SVv-ftVLnNpT8JgNyO#TbKe;~fPtL#jC#)uX z`VB~=xPQCB?Nu6BO6MaQj02@}9mErFQytIeMIFY2`b9U9kMhn<^ouh17C(!(xWA#d zxy-xG?YeLCycgerRpjsS9iC6(T`nKr#dy%qf_m={D99h_eNX;NEV#TgBfkHk4Z^%F6 z<;s$qz)J5cdo6CpM&IL>A@|VI*GUKY<{r?0OxRgME<5WW%KO~L^*$n-hUp+#h&a)0 z;=!$6b$T*cslH6+FVp?Aakvh@<1N2RKfu4-LMHS6SSFjOOP5uS(DF^$+y^kgiRu-a zRJ|q{{l}vJ3BCC80OE&J#2f!J3V21_dD@&4_#xM2HK^Zib=Mq+(M3 z8p@SjVK9)rX+t_9whs~68^#eFtF~Ei}b8^~nidj&E)Qp;B|9K!}$ zcOB#||8E?|xogA1{{urMcLANp+^?dWskoRv>*db=GcA7R z@fSyH`8F)-5javJOCRCQrPH*CHM{Z%1`twD$iL=t1PA{hZM2hG5J`#S$krAZA_Y2l z_aXmj*nqy+fZln#&Er&D6YnZ$_ZXc#iRZ}N$1sxa%q3-90$0+;V7M_XS@&aJb>k-p z*U#6&()Qr(ci5Qvk94ehzTx}r4^QHJ+$y$gMkQ}|19?&<_~^CUMKq7GMt%tLLwfNmGqij&wxSK3>C%EW zymVHU4zh1O4B!n#*rXldJ?l6e)ei2|iwshZ`id(*?7(TW^dVSCt};rfx!}@7F=1pL0iRo+GmNfDWR0jx!5GY$fE%_Z-0`>`KZQ zT*i9s$GDPKFvAsW$ { public LauncherTaskViewController(Launcher activity) { diff --git a/src/com/android/launcher3/BaseActivity.java b/src/com/android/launcher3/BaseActivity.java index 3e4589d1f5..4219667557 100644 --- a/src/com/android/launcher3/BaseActivity.java +++ b/src/com/android/launcher3/BaseActivity.java @@ -30,8 +30,10 @@ import android.view.View.AccessibilityDelegate; import com.android.launcher3.DeviceProfile.OnDeviceProfileChangeListener; import com.android.launcher3.logging.UserEventDispatcher; +import com.android.launcher3.uioverrides.UiFactory; import com.android.launcher3.util.SystemUiController; +import java.io.FileDescriptor; import java.io.PrintWriter; import java.lang.annotation.Retention; import java.util.ArrayList; @@ -224,6 +226,13 @@ public abstract class BaseActivity extends Activity { void onMultiWindowModeChanged(boolean isInMultiWindowMode); } + @Override + public void dump(String prefix, FileDescriptor fd, PrintWriter writer, String[] args) { + if (!UiFactory.dumpActivity(this, writer)) { + super.dump(prefix, fd, writer, args); + } + } + protected void dumpMisc(PrintWriter writer) { writer.println(" deviceProfile isTransposed=" + getDeviceProfile().isVerticalBarLayout()); writer.println(" orientation=" + getResources().getConfiguration().orientation); diff --git a/src_ui_overrides/com/android/launcher3/uioverrides/UiFactory.java b/src_ui_overrides/com/android/launcher3/uioverrides/UiFactory.java index b8cd0353e1..e9a47a77b8 100644 --- a/src_ui_overrides/com/android/launcher3/uioverrides/UiFactory.java +++ b/src_ui_overrides/com/android/launcher3/uioverrides/UiFactory.java @@ -16,12 +16,15 @@ package com.android.launcher3.uioverrides; +import android.app.Activity; import android.content.Context; import com.android.launcher3.Launcher; import com.android.launcher3.LauncherStateManager.StateHandler; import com.android.launcher3.util.TouchController; +import java.io.PrintWriter; + public class UiFactory { public static TouchController[] createTouchControllers(Launcher launcher) { @@ -47,4 +50,9 @@ public class UiFactory { public static void onLauncherStateOrResumeChanged(Launcher launcher) { } public static void onTrimMemory(Launcher launcher, int level) { } + + public static boolean dumpActivity(Activity activity, PrintWriter writer) { + return false; + } + }