@@ -59,6 +59,7 @@ object SafeTrace {
5959 /* *
6060 * @see isShellProfileable
6161 */
62+ @Deprecated(" Call forceEnableAppTracing/enableMainThreadMessageTracing instead" )
6263 @JvmStatic
6364 fun forceShellProfileable () {
6465 androidx.tracing.Trace .forceEnableAppTracing()
@@ -93,6 +94,7 @@ object SafeTrace {
9394 * Writes a trace message to indicate that a given section of code has begun. This call must
9495 * be followed by a corresponding call to {@link #endSection()} on the same thread.
9596 */
97+ @Deprecated(" Call androidx.tracing.Trace.beginSection instead" , ReplaceWith (" beginSection" , " androidx.tracing.Trace.beginSection" ))
9698 @JvmStatic
9799 fun beginSection (label : String ) {
98100 if (! isCurrentlyTracing) {
@@ -101,6 +103,7 @@ object SafeTrace {
101103 androidx.tracing.Trace .beginSection(label.take(MAX_LABEL_LENGTH ))
102104 }
103105
106+ @Deprecated(" Call androidx.tracing.Trace.beginSection instead" , ReplaceWith (" beginSection" , " androidx.tracing.Trace.beginSection" ))
104107 @JvmStatic
105108 inline fun beginSection (crossinline labelLambda : () -> String ) {
106109 if (! isCurrentlyTracing) {
@@ -113,6 +116,7 @@ object SafeTrace {
113116 * Begins and ends a section immediately. Useful for reporting information in the trace.
114117 */
115118 @JvmStatic
119+ @Deprecated(" Call androidx.tracing.Trace.beginSection/endSection instead" )
116120 fun logSection (label : String ) {
117121 if (! isCurrentlyTracing) {
118122 return
@@ -124,6 +128,7 @@ object SafeTrace {
124128 /* *
125129 * @see [logSection]
126130 */
131+ @Deprecated(" Call androidx.tracing.Trace.beginSection/endSection instead" )
127132 @JvmStatic
128133 inline fun logSection (crossinline labelLambda : () -> String ) {
129134 if (! isCurrentlyTracing) {
@@ -141,6 +146,7 @@ object SafeTrace {
141146 * ensure that beginSection / endSection pairs are properly nested and called from the same
142147 * thread.
143148 */
149+ @Deprecated(" Call androidx.tracing.Trace.endSection instead" , ReplaceWith (" endSection" , " androidx.tracing.Trace.endSection" ))
144150 @JvmStatic
145151 fun endSection () {
146152 if (! isCurrentlyTracing) {
@@ -152,6 +158,7 @@ object SafeTrace {
152158 /* *
153159 * @see androidx.tracing.Trace.beginAsyncSection
154160 */
161+ @Deprecated(" Call androidx.tracing.Trace.beginAsyncSection instead" , ReplaceWith (" beginAsyncSection" , " androidx.tracing.Trace.beginAsyncSection" ))
155162 @JvmStatic
156163 inline fun beginAsyncSection (
157164 crossinline labelCookiePairLambda : () -> Pair <String , Int >
@@ -167,6 +174,7 @@ object SafeTrace {
167174 * [cookie] defaults to 0 (cookie is used for async traces that overlap)
168175 * @see androidx.tracing.Trace.beginAsyncSection
169176 */
177+ @Deprecated(" Call androidx.tracing.Trace.beginAsyncSection instead" , ReplaceWith (" beginAsyncSection" , " androidx.tracing.Trace.beginAsyncSection" ))
170178 @JvmStatic
171179 fun beginAsyncSection (
172180 label : String ,
@@ -182,6 +190,7 @@ object SafeTrace {
182190 * [cookie] defaults to 0 (cookie is used for async traces that overlap)
183191 * @see androidx.tracing.Trace.endAsyncSection
184192 */
193+ @Deprecated(" Call androidx.tracing.Trace.endAsyncSection instead" , ReplaceWith (" endAsyncSection" , " androidx.tracing.Trace.endAsyncSection" ))
185194 @JvmStatic
186195 fun endAsyncSection (
187196 label : String ,
@@ -196,6 +205,7 @@ object SafeTrace {
196205 /* *
197206 * @see androidx.tracing.Trace.beginAsyncSection
198207 */
208+ @Deprecated(" Call androidx.tracing.Trace.endAsyncSection instead" , ReplaceWith (" endAsyncSection" , " androidx.tracing.Trace.endAsyncSection" ))
199209 @JvmStatic
200210 inline fun endAsyncSection (
201211 crossinline labelCookiePairLambda : () -> Pair <String , Int >
0 commit comments