Adding some activity state information in dump
Bug: 79216829 Change-Id: I3e1a5f5508f09b9ce2737c13d917fbab531c2572
This commit is contained in:
parent
7c86a1ad42
commit
e43d00db40
|
@ -59,6 +59,9 @@ import com.android.systemui.shared.system.RemoteAnimationAdapterCompat;
|
|||
import com.android.systemui.shared.system.RemoteAnimationRunnerCompat;
|
||||
import com.android.systemui.shared.system.RemoteAnimationTargetCompat;
|
||||
|
||||
import java.io.FileDescriptor;
|
||||
import java.io.PrintWriter;
|
||||
|
||||
/**
|
||||
* A simple activity to show the recently launched tasks
|
||||
*/
|
||||
|
@ -271,4 +274,11 @@ public class RecentsActivity extends BaseDraggingActivity {
|
|||
.addCategory(Intent.CATEGORY_HOME)
|
||||
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dump(String prefix, FileDescriptor fd, PrintWriter writer, String[] args) {
|
||||
super.dump(prefix, fd, writer, args);
|
||||
writer.println(prefix + "Misc:");
|
||||
dumpMisc(writer);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
package com.android.launcher3;
|
||||
|
||||
import static com.android.launcher3.util.SystemUiController.UI_STATE_OVERVIEW;
|
||||
|
||||
import static java.lang.annotation.RetentionPolicy.SOURCE;
|
||||
|
||||
import android.app.Activity;
|
||||
|
@ -24,15 +25,14 @@ import android.content.Context;
|
|||
import android.content.ContextWrapper;
|
||||
import android.content.Intent;
|
||||
import android.content.res.Configuration;
|
||||
import android.graphics.Point;
|
||||
import android.support.annotation.IntDef;
|
||||
import android.view.Display;
|
||||
import android.view.View.AccessibilityDelegate;
|
||||
|
||||
import com.android.launcher3.DeviceProfile.OnDeviceProfileChangeListener;
|
||||
import com.android.launcher3.logging.UserEventDispatcher;
|
||||
import com.android.launcher3.util.SystemUiController;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
@ -223,4 +223,12 @@ public abstract class BaseActivity extends Activity {
|
|||
public interface MultiWindowModeChangedListener {
|
||||
void onMultiWindowModeChanged(boolean isInMultiWindowMode);
|
||||
}
|
||||
|
||||
protected void dumpMisc(PrintWriter writer) {
|
||||
writer.println(" deviceProfile isTransposed=" + getDeviceProfile().isVerticalBarLayout());
|
||||
writer.println(" orientation=" + getResources().getConfiguration().orientation);
|
||||
writer.println(" mSystemUiController: " + mSystemUiController);
|
||||
writer.println(" mActivityFlags: " + mActivityFlags);
|
||||
writer.println(" mForceInvisible: " + mForceInvisible);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2279,8 +2279,8 @@ public class Launcher extends BaseDraggingActivity
|
|||
writer.print(prefix + "\tmWorkspaceLoading=" + mWorkspaceLoading);
|
||||
writer.print(" mPendingRequestArgs=" + mPendingRequestArgs);
|
||||
writer.println(" mPendingActivityResult=" + mPendingActivityResult);
|
||||
writer.println(" deviceProfile isTransposed=" + getDeviceProfile().isVerticalBarLayout());
|
||||
writer.println(" orientation=" + getResources().getConfiguration().orientation);
|
||||
writer.println(" mRotationHelper: " + mRotationHelper);
|
||||
dumpMisc(writer);
|
||||
|
||||
try {
|
||||
FileLog.flushAll(writer);
|
||||
|
|
|
@ -150,4 +150,12 @@ public class RotationHelper implements OnSharedPreferenceChangeListener {
|
|||
mActivity.setRequestedOrientation(activityFlags);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format("[mStateHandlerRequest=%d, mCurrentStateRequest=%d,"
|
||||
+ " mLastActivityFlags=%d, mIgnoreAutoRotateSettings=%b, mAutoRotateEnabled=%b]",
|
||||
mStateHandlerRequest, mCurrentStateRequest, mLastActivityFlags,
|
||||
mIgnoreAutoRotateSettings, mAutoRotateEnabled);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,11 +16,14 @@
|
|||
|
||||
package com.android.launcher3.util;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
|
||||
import com.android.launcher3.Utilities;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* Utility class to manage various window flags to control system UI.
|
||||
*/
|
||||
|
@ -78,4 +81,9 @@ public class SystemUiController {
|
|||
mWindow.getDecorView().setSystemUiVisibility(newFlags);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "mStates=" + Arrays.toString(mStates);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue