Loading core/java/com/android/internal/protolog/common/ProtoLog.java +28 −12 Original line number Diff line number Diff line Loading @@ -35,6 +35,10 @@ package com.android.internal.protolog.common; * during build. */ public class ProtoLog { // Needs to be set directly otherwise the protologtool tries to transform the method call public static boolean REQUIRE_PROTOLOGTOOL = true; /** * DEBUG level log. * Loading @@ -44,9 +48,11 @@ public class ProtoLog { */ public static void d(IProtoLogGroup group, String messageString, Object... args) { // Stub, replaced by the ProtoLogTool. if (REQUIRE_PROTOLOGTOOL) { throw new UnsupportedOperationException( "ProtoLog calls MUST be processed with ProtoLogTool"); } } /** * VERBOSE level log. Loading @@ -57,9 +63,11 @@ public class ProtoLog { */ public static void v(IProtoLogGroup group, String messageString, Object... args) { // Stub, replaced by the ProtoLogTool. if (REQUIRE_PROTOLOGTOOL) { throw new UnsupportedOperationException( "ProtoLog calls MUST be processed with ProtoLogTool"); } } /** * INFO level log. Loading @@ -70,9 +78,11 @@ public class ProtoLog { */ public static void i(IProtoLogGroup group, String messageString, Object... args) { // Stub, replaced by the ProtoLogTool. if (REQUIRE_PROTOLOGTOOL) { throw new UnsupportedOperationException( "ProtoLog calls MUST be processed with ProtoLogTool"); } } /** * WARNING level log. Loading @@ -83,9 +93,11 @@ public class ProtoLog { */ public static void w(IProtoLogGroup group, String messageString, Object... args) { // Stub, replaced by the ProtoLogTool. if (REQUIRE_PROTOLOGTOOL) { throw new UnsupportedOperationException( "ProtoLog calls MUST be processed with ProtoLogTool"); } } /** * ERROR level log. Loading @@ -96,9 +108,11 @@ public class ProtoLog { */ public static void e(IProtoLogGroup group, String messageString, Object... args) { // Stub, replaced by the ProtoLogTool. if (REQUIRE_PROTOLOGTOOL) { throw new UnsupportedOperationException( "ProtoLog calls MUST be processed with ProtoLogTool"); } } /** * WHAT A TERRIBLE FAILURE level log. Loading @@ -109,7 +123,9 @@ public class ProtoLog { */ public static void wtf(IProtoLogGroup group, String messageString, Object... args) { // Stub, replaced by the ProtoLogTool. if (REQUIRE_PROTOLOGTOOL) { throw new UnsupportedOperationException( "ProtoLog calls MUST be processed with ProtoLogTool"); } } } packages/SystemUI/src/com/android/systemui/SystemUIApplication.java +3 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ import android.provider.Settings; import android.util.Log; import android.util.TimingsTraceLog; import com.android.internal.protolog.common.ProtoLog; import com.android.systemui.dagger.ContextComponentHelper; import com.android.systemui.dagger.GlobalRootComponent; import com.android.systemui.dagger.SysUIComponent; Loading Loading @@ -69,6 +70,8 @@ public class SystemUIApplication extends Application implements public SystemUIApplication() { super(); Log.v(TAG, "SystemUIApplication constructed."); // SysUI may be building without protolog preprocessing in some cases ProtoLog.REQUIRE_PROTOLOGTOOL = false; } @Override Loading Loading
core/java/com/android/internal/protolog/common/ProtoLog.java +28 −12 Original line number Diff line number Diff line Loading @@ -35,6 +35,10 @@ package com.android.internal.protolog.common; * during build. */ public class ProtoLog { // Needs to be set directly otherwise the protologtool tries to transform the method call public static boolean REQUIRE_PROTOLOGTOOL = true; /** * DEBUG level log. * Loading @@ -44,9 +48,11 @@ public class ProtoLog { */ public static void d(IProtoLogGroup group, String messageString, Object... args) { // Stub, replaced by the ProtoLogTool. if (REQUIRE_PROTOLOGTOOL) { throw new UnsupportedOperationException( "ProtoLog calls MUST be processed with ProtoLogTool"); } } /** * VERBOSE level log. Loading @@ -57,9 +63,11 @@ public class ProtoLog { */ public static void v(IProtoLogGroup group, String messageString, Object... args) { // Stub, replaced by the ProtoLogTool. if (REQUIRE_PROTOLOGTOOL) { throw new UnsupportedOperationException( "ProtoLog calls MUST be processed with ProtoLogTool"); } } /** * INFO level log. Loading @@ -70,9 +78,11 @@ public class ProtoLog { */ public static void i(IProtoLogGroup group, String messageString, Object... args) { // Stub, replaced by the ProtoLogTool. if (REQUIRE_PROTOLOGTOOL) { throw new UnsupportedOperationException( "ProtoLog calls MUST be processed with ProtoLogTool"); } } /** * WARNING level log. Loading @@ -83,9 +93,11 @@ public class ProtoLog { */ public static void w(IProtoLogGroup group, String messageString, Object... args) { // Stub, replaced by the ProtoLogTool. if (REQUIRE_PROTOLOGTOOL) { throw new UnsupportedOperationException( "ProtoLog calls MUST be processed with ProtoLogTool"); } } /** * ERROR level log. Loading @@ -96,9 +108,11 @@ public class ProtoLog { */ public static void e(IProtoLogGroup group, String messageString, Object... args) { // Stub, replaced by the ProtoLogTool. if (REQUIRE_PROTOLOGTOOL) { throw new UnsupportedOperationException( "ProtoLog calls MUST be processed with ProtoLogTool"); } } /** * WHAT A TERRIBLE FAILURE level log. Loading @@ -109,7 +123,9 @@ public class ProtoLog { */ public static void wtf(IProtoLogGroup group, String messageString, Object... args) { // Stub, replaced by the ProtoLogTool. if (REQUIRE_PROTOLOGTOOL) { throw new UnsupportedOperationException( "ProtoLog calls MUST be processed with ProtoLogTool"); } } }
packages/SystemUI/src/com/android/systemui/SystemUIApplication.java +3 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ import android.provider.Settings; import android.util.Log; import android.util.TimingsTraceLog; import com.android.internal.protolog.common.ProtoLog; import com.android.systemui.dagger.ContextComponentHelper; import com.android.systemui.dagger.GlobalRootComponent; import com.android.systemui.dagger.SysUIComponent; Loading Loading @@ -69,6 +70,8 @@ public class SystemUIApplication extends Application implements public SystemUIApplication() { super(); Log.v(TAG, "SystemUIApplication constructed."); // SysUI may be building without protolog preprocessing in some cases ProtoLog.REQUIRE_PROTOLOGTOOL = false; } @Override Loading