Skip to content

Commit 4977191

Browse files
committed
Remove unused experimental opt-ins
The following experimental APIs have been stabilized: - `ExperimentalComposeUiApi` for `testTag` and `semantics` - `ExperimentalMetricApi` for `FrameTimingMetric`
1 parent 8e3e3ad commit 4977191

6 files changed

Lines changed: 4 additions & 7 deletions

File tree

MacrobenchmarkSample/app/src/main/kotlin/com/example/macrobenchmark/target/activity/FullyDrawnStartupActivity.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import android.os.Bundle
2020
import androidx.activity.ComponentActivity
2121
import androidx.activity.compose.ReportDrawnWhen
2222
import androidx.activity.compose.setContent
23+
import androidx.activity.enableEdgeToEdge
2324
import androidx.activity.viewModels
2425
import androidx.compose.foundation.layout.Box
2526
import androidx.compose.foundation.layout.Column
@@ -39,6 +40,7 @@ class FullyDrawnStartupActivity : ComponentActivity() {
3940

4041
override fun onCreate(savedInstanceState: Bundle?) {
4142
super.onCreate(savedInstanceState)
43+
enableEdgeToEdge()
4244
setContent {
4345
MaterialTheme {
4446
Box {

MacrobenchmarkSample/app/src/main/kotlin/com/example/macrobenchmark/target/activity/MainActivity.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ import androidx.compose.material3.Text
3232
import androidx.compose.material3.TextButton
3333
import androidx.compose.material3.TopAppBar
3434
import androidx.compose.runtime.Composable
35-
import androidx.compose.ui.ExperimentalComposeUiApi
3635
import androidx.compose.ui.Modifier
3736
import androidx.compose.ui.platform.testTag
3837
import androidx.compose.ui.semantics.semantics
@@ -58,7 +57,7 @@ private const val TAG = "MainActivity"
5857

5958
class MainActivity : ComponentActivity() {
6059

61-
@OptIn(ExperimentalComposeUiApi::class, ExperimentalMaterial3Api::class)
60+
@OptIn(ExperimentalMaterial3Api::class)
6261
override fun onCreate(savedInstanceState: Bundle?) {
6362
super.onCreate(savedInstanceState)
6463
setContent {

MacrobenchmarkSample/app/src/main/kotlin/com/example/macrobenchmark/target/activity/clicklatency/ComposeActivity.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ import androidx.tracing.trace
5050
import com.example.macrobenchmark.target.recyclerview.Entry
5151
import com.example.macrobenchmark.target.util.ClickTrace
5252

53-
@OptIn(ExperimentalComposeUiApi::class)
5453
class ComposeActivity : ComponentActivity() {
5554
override fun onCreate(savedInstanceState: Bundle?) {
5655
super.onCreate(savedInstanceState)

MacrobenchmarkSample/app/src/main/kotlin/com/example/macrobenchmark/target/activity/login/LoginActivity.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ import com.example.macrobenchmark.target.activity.MainActivity
5555
import com.example.macrobenchmark.target.util.SampleViewModel
5656
import kotlinx.coroutines.launch
5757

58-
@OptIn(ExperimentalComposeUiApi::class)
5958
class LoginActivity : ComponentActivity() {
6059

6160
private val sampleViewModel by viewModels<SampleViewModel>()

MacrobenchmarkSample/macrobenchmark/src/main/kotlin/com/example/macrobenchmark/benchmark/frames/NestedRecyclerFrameTimingBenchmarks.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package com.example.macrobenchmark.benchmark.frames
1818

19-
import androidx.benchmark.macro.ExperimentalMetricApi
2019
import androidx.benchmark.macro.FrameTimingMetric
2120
import androidx.benchmark.macro.StartupMode
2221
import androidx.benchmark.macro.junit4.MacrobenchmarkRule
@@ -32,7 +31,6 @@ import org.junit.Rule
3231
import org.junit.Test
3332
import org.junit.runner.RunWith
3433

35-
@ExperimentalMetricApi
3634
@LargeTest
3735
@RunWith(AndroidJUnit4::class)
3836
class NestedRecyclerFrameTimingBenchmarks {

MacrobenchmarkSample/macrobenchmark/src/main/kotlin/com/example/macrobenchmark/benchmark/startup/FullyDrawnStartupBenchmark.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class FullyDrawnStartupBenchmark {
4747
startIntent(Intent("$TARGET_PACKAGE.FULLY_DRAWN_STARTUP_ACTIVITY"))
4848

4949
// Waits for an element that corresponds to fully drawn state
50-
onElement { textAsString() == "Fully Drawn" && isVisibleToUser }
50+
onElement { textAsString() == "Fully Drawn" }
5151
}
5252
}
5353
}

0 commit comments

Comments
 (0)