@@ -54,11 +54,13 @@ object SafeTrace {
5454
5555 @Deprecated(" Use forceShellProfileable instead" , ReplaceWith (" forceShellProfileable()" ))
5656 @JvmStatic
57+ @Suppress(" DEPRECATION" )
5758 fun forceTraceable () = forceShellProfileable()
5859
5960 /* *
6061 * @see isShellProfileable
6162 */
63+ @Deprecated(" Call forceEnableAppTracing/enableMainThreadMessageTracing instead" )
6264 @JvmStatic
6365 fun forceShellProfileable () {
6466 androidx.tracing.Trace .forceEnableAppTracing()
@@ -93,6 +95,7 @@ object SafeTrace {
9395 * Writes a trace message to indicate that a given section of code has begun. This call must
9496 * be followed by a corresponding call to {@link #endSection()} on the same thread.
9597 */
98+ @Deprecated(" Call androidx.tracing.Trace.beginSection instead" , ReplaceWith (" beginSection" , " androidx.tracing.Trace.beginSection" ))
9699 @JvmStatic
97100 fun beginSection (label : String ) {
98101 if (! isCurrentlyTracing) {
@@ -101,6 +104,7 @@ object SafeTrace {
101104 androidx.tracing.Trace .beginSection(label.take(MAX_LABEL_LENGTH ))
102105 }
103106
107+ @Deprecated(" Call androidx.tracing.Trace.beginSection instead" , ReplaceWith (" beginSection" , " androidx.tracing.Trace.beginSection" ))
104108 @JvmStatic
105109 inline fun beginSection (crossinline labelLambda : () -> String ) {
106110 if (! isCurrentlyTracing) {
@@ -113,6 +117,7 @@ object SafeTrace {
113117 * Begins and ends a section immediately. Useful for reporting information in the trace.
114118 */
115119 @JvmStatic
120+ @Deprecated(" Call androidx.tracing.Trace.beginSection/endSection instead" )
116121 fun logSection (label : String ) {
117122 if (! isCurrentlyTracing) {
118123 return
@@ -124,6 +129,7 @@ object SafeTrace {
124129 /* *
125130 * @see [logSection]
126131 */
132+ @Deprecated(" Call androidx.tracing.Trace.beginSection/endSection instead" )
127133 @JvmStatic
128134 inline fun logSection (crossinline labelLambda : () -> String ) {
129135 if (! isCurrentlyTracing) {
@@ -141,6 +147,7 @@ object SafeTrace {
141147 * ensure that beginSection / endSection pairs are properly nested and called from the same
142148 * thread.
143149 */
150+ @Deprecated(" Call androidx.tracing.Trace.endSection instead" , ReplaceWith (" endSection" , " androidx.tracing.Trace.endSection" ))
144151 @JvmStatic
145152 fun endSection () {
146153 if (! isCurrentlyTracing) {
@@ -152,6 +159,7 @@ object SafeTrace {
152159 /* *
153160 * @see androidx.tracing.Trace.beginAsyncSection
154161 */
162+ @Deprecated(" Call androidx.tracing.Trace.beginAsyncSection instead" , ReplaceWith (" beginAsyncSection" , " androidx.tracing.Trace.beginAsyncSection" ))
155163 @JvmStatic
156164 inline fun beginAsyncSection (
157165 crossinline labelCookiePairLambda : () -> Pair <String , Int >
@@ -167,6 +175,7 @@ object SafeTrace {
167175 * [cookie] defaults to 0 (cookie is used for async traces that overlap)
168176 * @see androidx.tracing.Trace.beginAsyncSection
169177 */
178+ @Deprecated(" Call androidx.tracing.Trace.beginAsyncSection instead" , ReplaceWith (" beginAsyncSection" , " androidx.tracing.Trace.beginAsyncSection" ))
170179 @JvmStatic
171180 fun beginAsyncSection (
172181 label : String ,
@@ -182,6 +191,7 @@ object SafeTrace {
182191 * [cookie] defaults to 0 (cookie is used for async traces that overlap)
183192 * @see androidx.tracing.Trace.endAsyncSection
184193 */
194+ @Deprecated(" Call androidx.tracing.Trace.endAsyncSection instead" , ReplaceWith (" endAsyncSection" , " androidx.tracing.Trace.endAsyncSection" ))
185195 @JvmStatic
186196 fun endAsyncSection (
187197 label : String ,
@@ -196,6 +206,7 @@ object SafeTrace {
196206 /* *
197207 * @see androidx.tracing.Trace.beginAsyncSection
198208 */
209+ @Deprecated(" Call androidx.tracing.Trace.endAsyncSection instead" , ReplaceWith (" endAsyncSection" , " androidx.tracing.Trace.endAsyncSection" ))
199210 @JvmStatic
200211 inline fun endAsyncSection (
201212 crossinline labelCookiePairLambda : () -> Pair <String , Int >
0 commit comments