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
This commit is contained in:
Sunny Goyal
2018-05-15 14:53:30 -07:00
parent d9a1337b40
commit 55eb556a4b
4 changed files with 51 additions and 0 deletions

View File

@@ -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);