Loading core/java/android/content/res/Configuration.java +40 −23 Original line number Diff line number Diff line Loading @@ -1096,10 +1096,13 @@ public final class Configuration implements Parcelable, Comparable<Configuration * @param protoOutputStream Stream to write the Configuration object to. * @param fieldId Field Id of the Configuration as defined in the parent message * @param persisted Note if this proto will be persisted to disk * @param critical If true, reduce amount of data written. * @hide */ public void writeToProto(ProtoOutputStream protoOutputStream, long fieldId, boolean persisted) { public void writeToProto(ProtoOutputStream protoOutputStream, long fieldId, boolean persisted, boolean critical) { final long token = protoOutputStream.start(fieldId); if (!critical) { protoOutputStream.write(FONT_SCALE, fontScale); protoOutputStream.write(MCC, mcc); protoOutputStream.write(MNC, mnc); Loading @@ -1114,16 +1117,17 @@ public final class Configuration implements Parcelable, Comparable<Configuration protoOutputStream.write(HARD_KEYBOARD_HIDDEN, hardKeyboardHidden); protoOutputStream.write(NAVIGATION, navigation); protoOutputStream.write(NAVIGATION_HIDDEN, navigationHidden); protoOutputStream.write(ORIENTATION, orientation); protoOutputStream.write(UI_MODE, uiMode); protoOutputStream.write(SCREEN_WIDTH_DP, screenWidthDp); protoOutputStream.write(SCREEN_HEIGHT_DP, screenHeightDp); protoOutputStream.write(SMALLEST_SCREEN_WIDTH_DP, smallestScreenWidthDp); protoOutputStream.write(DENSITY_DPI, densityDpi); // For persistence, we do not care about window configuration if (!persisted && windowConfiguration != null) { windowConfiguration.writeToProto(protoOutputStream, WINDOW_CONFIGURATION); } } protoOutputStream.write(ORIENTATION, orientation); protoOutputStream.write(SCREEN_WIDTH_DP, screenWidthDp); protoOutputStream.write(SCREEN_HEIGHT_DP, screenHeightDp); protoOutputStream.end(token); } Loading @@ -1136,7 +1140,20 @@ public final class Configuration implements Parcelable, Comparable<Configuration * @hide */ public void writeToProto(ProtoOutputStream protoOutputStream, long fieldId) { writeToProto(protoOutputStream, fieldId, false); writeToProto(protoOutputStream, fieldId, false /* persisted */, false /* critical */); } /** * Write to a protocol buffer output stream. * Protocol buffer message definition at {@link android.content.ConfigurationProto} * * @param protoOutputStream Stream to write the Configuration object to. * @param fieldId Field Id of the Configuration as defined in the parent message * @param critical If true, reduce amount of data written. * @hide */ public void writeToProto(ProtoOutputStream protoOutputStream, long fieldId, boolean critical) { writeToProto(protoOutputStream, fieldId, false /* persisted */, critical); } /** Loading services/core/java/com/android/server/wm/ActivityDisplay.java +4 −3 Original line number Diff line number Diff line Loading @@ -1436,9 +1436,10 @@ class ActivityDisplay extends ConfigurationContainer<ActivityStack> } } public void writeToProto(ProtoOutputStream proto, long fieldId) { public void writeToProto(ProtoOutputStream proto, long fieldId, @WindowTraceLogLevel int logLevel) { final long token = proto.start(fieldId); super.writeToProto(proto, CONFIGURATION_CONTAINER, false /* trim */); super.writeToProto(proto, CONFIGURATION_CONTAINER, logLevel); proto.write(ID, mDisplayId); proto.write(SINGLE_TASK_INSTANCE, mSingleTaskInstance); final ActivityStack focusedStack = getFocusedStack(); Loading @@ -1453,7 +1454,7 @@ class ActivityDisplay extends ConfigurationContainer<ActivityStack> } for (int stackNdx = mStacks.size() - 1; stackNdx >= 0; --stackNdx) { final ActivityStack stack = mStacks.get(stackNdx); stack.writeToProto(proto, STACKS); stack.writeToProto(proto, STACKS, logLevel); } proto.end(token); } Loading services/core/java/com/android/server/wm/ActivityRecord.java +1 −1 Original line number Diff line number Diff line Loading @@ -3467,7 +3467,7 @@ final class ActivityRecord extends ConfigurationContainer { * {@code ActivityRecordProto} is the outer-most proto data. */ void writeToProto(ProtoOutputStream proto) { super.writeToProto(proto, CONFIGURATION_CONTAINER, false /* trim */); super.writeToProto(proto, CONFIGURATION_CONTAINER, WindowTraceLogLevel.ALL); writeIdentifierToProto(proto, IDENTIFIER); proto.write(STATE, mState.toString()); proto.write(VISIBLE, visible); Loading services/core/java/com/android/server/wm/ActivityStack.java +4 −3 Original line number Diff line number Diff line Loading @@ -5655,13 +5655,14 @@ class ActivityStack extends ConfigurationContainer { return shouldSleepActivities() || mService.mShuttingDown; } public void writeToProto(ProtoOutputStream proto, long fieldId) { public void writeToProto(ProtoOutputStream proto, long fieldId, @WindowTraceLogLevel int logLevel) { final long token = proto.start(fieldId); super.writeToProto(proto, CONFIGURATION_CONTAINER, false /* trim */); super.writeToProto(proto, CONFIGURATION_CONTAINER, logLevel); proto.write(ID, mStackId); for (int taskNdx = mTaskHistory.size() - 1; taskNdx >= 0; --taskNdx) { final TaskRecord task = mTaskHistory.get(taskNdx); task.writeToProto(proto, TASKS); task.writeToProto(proto, TASKS, logLevel); } if (mResumedActivity != null) { mResumedActivity.writeIdentifierToProto(proto, RESUMED_ACTIVITY); Loading services/core/java/com/android/server/wm/ActivityTaskManagerService.java +2 −1 Original line number Diff line number Diff line Loading @@ -6587,7 +6587,8 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { // The output proto of "activity --proto activities" // is ActivityManagerServiceDumpActivitiesProto mRootActivityContainer.writeToProto(proto, ActivityManagerServiceDumpActivitiesProto.ACTIVITY_STACK_SUPERVISOR); ActivityManagerServiceDumpActivitiesProto.ACTIVITY_STACK_SUPERVISOR, WindowTraceLogLevel.ALL); } } Loading Loading
core/java/android/content/res/Configuration.java +40 −23 Original line number Diff line number Diff line Loading @@ -1096,10 +1096,13 @@ public final class Configuration implements Parcelable, Comparable<Configuration * @param protoOutputStream Stream to write the Configuration object to. * @param fieldId Field Id of the Configuration as defined in the parent message * @param persisted Note if this proto will be persisted to disk * @param critical If true, reduce amount of data written. * @hide */ public void writeToProto(ProtoOutputStream protoOutputStream, long fieldId, boolean persisted) { public void writeToProto(ProtoOutputStream protoOutputStream, long fieldId, boolean persisted, boolean critical) { final long token = protoOutputStream.start(fieldId); if (!critical) { protoOutputStream.write(FONT_SCALE, fontScale); protoOutputStream.write(MCC, mcc); protoOutputStream.write(MNC, mnc); Loading @@ -1114,16 +1117,17 @@ public final class Configuration implements Parcelable, Comparable<Configuration protoOutputStream.write(HARD_KEYBOARD_HIDDEN, hardKeyboardHidden); protoOutputStream.write(NAVIGATION, navigation); protoOutputStream.write(NAVIGATION_HIDDEN, navigationHidden); protoOutputStream.write(ORIENTATION, orientation); protoOutputStream.write(UI_MODE, uiMode); protoOutputStream.write(SCREEN_WIDTH_DP, screenWidthDp); protoOutputStream.write(SCREEN_HEIGHT_DP, screenHeightDp); protoOutputStream.write(SMALLEST_SCREEN_WIDTH_DP, smallestScreenWidthDp); protoOutputStream.write(DENSITY_DPI, densityDpi); // For persistence, we do not care about window configuration if (!persisted && windowConfiguration != null) { windowConfiguration.writeToProto(protoOutputStream, WINDOW_CONFIGURATION); } } protoOutputStream.write(ORIENTATION, orientation); protoOutputStream.write(SCREEN_WIDTH_DP, screenWidthDp); protoOutputStream.write(SCREEN_HEIGHT_DP, screenHeightDp); protoOutputStream.end(token); } Loading @@ -1136,7 +1140,20 @@ public final class Configuration implements Parcelable, Comparable<Configuration * @hide */ public void writeToProto(ProtoOutputStream protoOutputStream, long fieldId) { writeToProto(protoOutputStream, fieldId, false); writeToProto(protoOutputStream, fieldId, false /* persisted */, false /* critical */); } /** * Write to a protocol buffer output stream. * Protocol buffer message definition at {@link android.content.ConfigurationProto} * * @param protoOutputStream Stream to write the Configuration object to. * @param fieldId Field Id of the Configuration as defined in the parent message * @param critical If true, reduce amount of data written. * @hide */ public void writeToProto(ProtoOutputStream protoOutputStream, long fieldId, boolean critical) { writeToProto(protoOutputStream, fieldId, false /* persisted */, critical); } /** Loading
services/core/java/com/android/server/wm/ActivityDisplay.java +4 −3 Original line number Diff line number Diff line Loading @@ -1436,9 +1436,10 @@ class ActivityDisplay extends ConfigurationContainer<ActivityStack> } } public void writeToProto(ProtoOutputStream proto, long fieldId) { public void writeToProto(ProtoOutputStream proto, long fieldId, @WindowTraceLogLevel int logLevel) { final long token = proto.start(fieldId); super.writeToProto(proto, CONFIGURATION_CONTAINER, false /* trim */); super.writeToProto(proto, CONFIGURATION_CONTAINER, logLevel); proto.write(ID, mDisplayId); proto.write(SINGLE_TASK_INSTANCE, mSingleTaskInstance); final ActivityStack focusedStack = getFocusedStack(); Loading @@ -1453,7 +1454,7 @@ class ActivityDisplay extends ConfigurationContainer<ActivityStack> } for (int stackNdx = mStacks.size() - 1; stackNdx >= 0; --stackNdx) { final ActivityStack stack = mStacks.get(stackNdx); stack.writeToProto(proto, STACKS); stack.writeToProto(proto, STACKS, logLevel); } proto.end(token); } Loading
services/core/java/com/android/server/wm/ActivityRecord.java +1 −1 Original line number Diff line number Diff line Loading @@ -3467,7 +3467,7 @@ final class ActivityRecord extends ConfigurationContainer { * {@code ActivityRecordProto} is the outer-most proto data. */ void writeToProto(ProtoOutputStream proto) { super.writeToProto(proto, CONFIGURATION_CONTAINER, false /* trim */); super.writeToProto(proto, CONFIGURATION_CONTAINER, WindowTraceLogLevel.ALL); writeIdentifierToProto(proto, IDENTIFIER); proto.write(STATE, mState.toString()); proto.write(VISIBLE, visible); Loading
services/core/java/com/android/server/wm/ActivityStack.java +4 −3 Original line number Diff line number Diff line Loading @@ -5655,13 +5655,14 @@ class ActivityStack extends ConfigurationContainer { return shouldSleepActivities() || mService.mShuttingDown; } public void writeToProto(ProtoOutputStream proto, long fieldId) { public void writeToProto(ProtoOutputStream proto, long fieldId, @WindowTraceLogLevel int logLevel) { final long token = proto.start(fieldId); super.writeToProto(proto, CONFIGURATION_CONTAINER, false /* trim */); super.writeToProto(proto, CONFIGURATION_CONTAINER, logLevel); proto.write(ID, mStackId); for (int taskNdx = mTaskHistory.size() - 1; taskNdx >= 0; --taskNdx) { final TaskRecord task = mTaskHistory.get(taskNdx); task.writeToProto(proto, TASKS); task.writeToProto(proto, TASKS, logLevel); } if (mResumedActivity != null) { mResumedActivity.writeIdentifierToProto(proto, RESUMED_ACTIVITY); Loading
services/core/java/com/android/server/wm/ActivityTaskManagerService.java +2 −1 Original line number Diff line number Diff line Loading @@ -6587,7 +6587,8 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { // The output proto of "activity --proto activities" // is ActivityManagerServiceDumpActivitiesProto mRootActivityContainer.writeToProto(proto, ActivityManagerServiceDumpActivitiesProto.ACTIVITY_STACK_SUPERVISOR); ActivityManagerServiceDumpActivitiesProto.ACTIVITY_STACK_SUPERVISOR, WindowTraceLogLevel.ALL); } } Loading