Merge "Add a new API to configure XProcessingEnv behavior" into androidx-main
diff --git a/benchmark/benchmark-common/api/1.1.0-beta01.txt b/benchmark/benchmark-common/api/1.1.0-beta01.txt
new file mode 100644
index 0000000..8fd1366
--- /dev/null
+++ b/benchmark/benchmark-common/api/1.1.0-beta01.txt
@@ -0,0 +1,52 @@
+// Signature format: 4.0
+package androidx.benchmark {
+
+ @RequiresApi(21) public final class Api21Kt {
+ }
+
+ @RequiresApi(24) public final class Api24Kt {
+ }
+
+ @RequiresApi(27) public final class Api27Kt {
+ }
+
+ @RequiresApi(29) public final class Api29Kt {
+ }
+
+ public final class ArgumentsKt {
+ }
+
+ public final class BenchmarkState {
+ method public boolean keepRunning();
+ method public void pauseTiming();
+ method public void resumeTiming();
+ field public static final androidx.benchmark.BenchmarkState.Companion Companion;
+ }
+
+ public static final class BenchmarkState.Companion {
+ }
+
+ public final class ConfigurationErrorKt {
+ }
+
+ public final class MetricNameUtilsKt {
+ }
+
+ public final class ProfilerKt {
+ }
+
+ public final class UserspaceTracingKt {
+ }
+
+}
+
+package androidx.benchmark.perfetto {
+
+ public final class PerfettoConfigKt {
+ }
+
+ public final class UiStateKt {
+ }
+
+}
+
diff --git a/benchmark/benchmark-common/api/1.1.0-beta02.txt b/benchmark/benchmark-common/api/1.1.0-beta02.txt
new file mode 100644
index 0000000..8fd1366
--- /dev/null
+++ b/benchmark/benchmark-common/api/1.1.0-beta02.txt
@@ -0,0 +1,52 @@
+// Signature format: 4.0
+package androidx.benchmark {
+
+ @RequiresApi(21) public final class Api21Kt {
+ }
+
+ @RequiresApi(24) public final class Api24Kt {
+ }
+
+ @RequiresApi(27) public final class Api27Kt {
+ }
+
+ @RequiresApi(29) public final class Api29Kt {
+ }
+
+ public final class ArgumentsKt {
+ }
+
+ public final class BenchmarkState {
+ method public boolean keepRunning();
+ method public void pauseTiming();
+ method public void resumeTiming();
+ field public static final androidx.benchmark.BenchmarkState.Companion Companion;
+ }
+
+ public static final class BenchmarkState.Companion {
+ }
+
+ public final class ConfigurationErrorKt {
+ }
+
+ public final class MetricNameUtilsKt {
+ }
+
+ public final class ProfilerKt {
+ }
+
+ public final class UserspaceTracingKt {
+ }
+
+}
+
+package androidx.benchmark.perfetto {
+
+ public final class PerfettoConfigKt {
+ }
+
+ public final class UiStateKt {
+ }
+
+}
+
diff --git a/benchmark/benchmark-common/api/public_plus_experimental_1.1.0-beta01.txt b/benchmark/benchmark-common/api/public_plus_experimental_1.1.0-beta01.txt
new file mode 100644
index 0000000..fd9ccb2
--- /dev/null
+++ b/benchmark/benchmark-common/api/public_plus_experimental_1.1.0-beta01.txt
@@ -0,0 +1,57 @@
+// Signature format: 4.0
+package androidx.benchmark {
+
+ @RequiresApi(21) public final class Api21Kt {
+ }
+
+ @RequiresApi(24) public final class Api24Kt {
+ }
+
+ @RequiresApi(27) public final class Api27Kt {
+ }
+
+ @RequiresApi(29) public final class Api29Kt {
+ }
+
+ public final class ArgumentsKt {
+ }
+
+ public final class BenchmarkState {
+ method public boolean keepRunning();
+ method public void pauseTiming();
+ method @androidx.benchmark.BenchmarkState.Companion.ExperimentalExternalReport public static void reportData(String className, String testName, @IntRange(from=0) long totalRunTimeNs, java.util.List<java.lang.Long> dataNs, @IntRange(from=0) int warmupIterations, @IntRange(from=0) long thermalThrottleSleepSeconds, @IntRange(from=1) int repeatIterations);
+ method public void resumeTiming();
+ field public static final androidx.benchmark.BenchmarkState.Companion Companion;
+ }
+
+ public static final class BenchmarkState.Companion {
+ method @androidx.benchmark.BenchmarkState.Companion.ExperimentalExternalReport public void reportData(String className, String testName, @IntRange(from=0) long totalRunTimeNs, java.util.List<java.lang.Long> dataNs, @IntRange(from=0) int warmupIterations, @IntRange(from=0) long thermalThrottleSleepSeconds, @IntRange(from=1) int repeatIterations);
+ }
+
+ @kotlin.Experimental @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.FUNCTION) public static @interface BenchmarkState.Companion.ExperimentalExternalReport {
+ }
+
+ public final class ConfigurationErrorKt {
+ }
+
+ public final class MetricNameUtilsKt {
+ }
+
+ public final class ProfilerKt {
+ }
+
+ public final class UserspaceTracingKt {
+ }
+
+}
+
+package androidx.benchmark.perfetto {
+
+ public final class PerfettoConfigKt {
+ }
+
+ public final class UiStateKt {
+ }
+
+}
+
diff --git a/benchmark/benchmark-common/api/public_plus_experimental_1.1.0-beta02.txt b/benchmark/benchmark-common/api/public_plus_experimental_1.1.0-beta02.txt
new file mode 100644
index 0000000..fd9ccb2
--- /dev/null
+++ b/benchmark/benchmark-common/api/public_plus_experimental_1.1.0-beta02.txt
@@ -0,0 +1,57 @@
+// Signature format: 4.0
+package androidx.benchmark {
+
+ @RequiresApi(21) public final class Api21Kt {
+ }
+
+ @RequiresApi(24) public final class Api24Kt {
+ }
+
+ @RequiresApi(27) public final class Api27Kt {
+ }
+
+ @RequiresApi(29) public final class Api29Kt {
+ }
+
+ public final class ArgumentsKt {
+ }
+
+ public final class BenchmarkState {
+ method public boolean keepRunning();
+ method public void pauseTiming();
+ method @androidx.benchmark.BenchmarkState.Companion.ExperimentalExternalReport public static void reportData(String className, String testName, @IntRange(from=0) long totalRunTimeNs, java.util.List<java.lang.Long> dataNs, @IntRange(from=0) int warmupIterations, @IntRange(from=0) long thermalThrottleSleepSeconds, @IntRange(from=1) int repeatIterations);
+ method public void resumeTiming();
+ field public static final androidx.benchmark.BenchmarkState.Companion Companion;
+ }
+
+ public static final class BenchmarkState.Companion {
+ method @androidx.benchmark.BenchmarkState.Companion.ExperimentalExternalReport public void reportData(String className, String testName, @IntRange(from=0) long totalRunTimeNs, java.util.List<java.lang.Long> dataNs, @IntRange(from=0) int warmupIterations, @IntRange(from=0) long thermalThrottleSleepSeconds, @IntRange(from=1) int repeatIterations);
+ }
+
+ @kotlin.Experimental @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets=kotlin.annotation.AnnotationTarget.FUNCTION) public static @interface BenchmarkState.Companion.ExperimentalExternalReport {
+ }
+
+ public final class ConfigurationErrorKt {
+ }
+
+ public final class MetricNameUtilsKt {
+ }
+
+ public final class ProfilerKt {
+ }
+
+ public final class UserspaceTracingKt {
+ }
+
+}
+
+package androidx.benchmark.perfetto {
+
+ public final class PerfettoConfigKt {
+ }
+
+ public final class UiStateKt {
+ }
+
+}
+
diff --git a/wear/watchface/watchface-complications-data-core/api/res-current.txt b/benchmark/benchmark-common/api/res-1.1.0-beta01.txt
similarity index 100%
copy from wear/watchface/watchface-complications-data-core/api/res-current.txt
copy to benchmark/benchmark-common/api/res-1.1.0-beta01.txt
diff --git a/wear/watchface/watchface-complications-data-core/api/res-current.txt b/benchmark/benchmark-common/api/res-1.1.0-beta02.txt
similarity index 100%
copy from wear/watchface/watchface-complications-data-core/api/res-current.txt
copy to benchmark/benchmark-common/api/res-1.1.0-beta02.txt
diff --git a/benchmark/benchmark-common/api/restricted_1.1.0-beta01.txt b/benchmark/benchmark-common/api/restricted_1.1.0-beta01.txt
new file mode 100644
index 0000000..fb74f25
--- /dev/null
+++ b/benchmark/benchmark-common/api/restricted_1.1.0-beta01.txt
@@ -0,0 +1,54 @@
+// Signature format: 4.0
+package androidx.benchmark {
+
+ @RequiresApi(21) public final class Api21Kt {
+ }
+
+ @RequiresApi(24) public final class Api24Kt {
+ }
+
+ @RequiresApi(27) public final class Api27Kt {
+ }
+
+ @RequiresApi(29) public final class Api29Kt {
+ }
+
+ public final class ArgumentsKt {
+ }
+
+ public final class BenchmarkState {
+ method public boolean keepRunning();
+ method @kotlin.PublishedApi internal boolean keepRunningInternal();
+ method public void pauseTiming();
+ method public void resumeTiming();
+ field public static final androidx.benchmark.BenchmarkState.Companion Companion;
+ field @kotlin.PublishedApi internal int iterationsRemaining;
+ }
+
+ public static final class BenchmarkState.Companion {
+ }
+
+ public final class ConfigurationErrorKt {
+ }
+
+ public final class MetricNameUtilsKt {
+ }
+
+ public final class ProfilerKt {
+ }
+
+ public final class UserspaceTracingKt {
+ }
+
+}
+
+package androidx.benchmark.perfetto {
+
+ public final class PerfettoConfigKt {
+ }
+
+ public final class UiStateKt {
+ }
+
+}
+
diff --git a/benchmark/benchmark-common/api/restricted_1.1.0-beta02.txt b/benchmark/benchmark-common/api/restricted_1.1.0-beta02.txt
new file mode 100644
index 0000000..fb74f25
--- /dev/null
+++ b/benchmark/benchmark-common/api/restricted_1.1.0-beta02.txt
@@ -0,0 +1,54 @@
+// Signature format: 4.0
+package androidx.benchmark {
+
+ @RequiresApi(21) public final class Api21Kt {
+ }
+
+ @RequiresApi(24) public final class Api24Kt {
+ }
+
+ @RequiresApi(27) public final class Api27Kt {
+ }
+
+ @RequiresApi(29) public final class Api29Kt {
+ }
+
+ public final class ArgumentsKt {
+ }
+
+ public final class BenchmarkState {
+ method public boolean keepRunning();
+ method @kotlin.PublishedApi internal boolean keepRunningInternal();
+ method public void pauseTiming();
+ method public void resumeTiming();
+ field public static final androidx.benchmark.BenchmarkState.Companion Companion;
+ field @kotlin.PublishedApi internal int iterationsRemaining;
+ }
+
+ public static final class BenchmarkState.Companion {
+ }
+
+ public final class ConfigurationErrorKt {
+ }
+
+ public final class MetricNameUtilsKt {
+ }
+
+ public final class ProfilerKt {
+ }
+
+ public final class UserspaceTracingKt {
+ }
+
+}
+
+package androidx.benchmark.perfetto {
+
+ public final class PerfettoConfigKt {
+ }
+
+ public final class UiStateKt {
+ }
+
+}
+
diff --git a/benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/BenchmarkStateTest.kt b/benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/BenchmarkStateTest.kt
index 6a5dc66..e7ce90a 100644
--- a/benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/BenchmarkStateTest.kt
+++ b/benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/BenchmarkStateTest.kt
@@ -34,6 +34,7 @@
import org.junit.runner.RunWith
import java.util.concurrent.TimeUnit
import kotlin.test.assertFailsWith
+import kotlin.test.assertTrue
@LargeTest
@RunWith(AndroidJUnit4::class)
@@ -284,4 +285,49 @@
)
assertEquals(expectedReport, ResultWriter.reports.last())
}
+
+ private fun validateProfilerUsage(simplifiedTimingOnlyMode: Boolean?) {
+ try {
+ profilerOverride = StackSamplingLegacy
+
+ val benchmarkState = if (simplifiedTimingOnlyMode != null) {
+ BenchmarkState(simplifiedTimingOnlyMode)
+ } else {
+ BenchmarkState()
+ }
+
+ // count iters with profiler enabled vs disabled
+ var profilerDisabledIterations = 0
+ var profilerEnabledIterations = 0
+ while (benchmarkState.keepRunning()) {
+ if (StackSamplingLegacy.isRunning) {
+ profilerEnabledIterations++
+ } else {
+ profilerDisabledIterations++
+
+ // after profiler has been enabled, no further disabled expected
+ assertTrue(
+ profilerEnabledIterations == 0,
+ "Profiler should not be reenabled after being disabled"
+ )
+ }
+ }
+
+ if (simplifiedTimingOnlyMode == true) {
+ // profiler should be always disabled
+ assertNotEquals(0, profilerDisabledIterations)
+ assertEquals(0, profilerEnabledIterations)
+ } else {
+ // first, profiler disabled, then enabled until end
+ assertNotEquals(0, profilerDisabledIterations)
+ assertNotEquals(0, profilerEnabledIterations)
+ }
+ } finally {
+ profilerOverride = null
+ }
+ }
+
+ @Test public fun profiler_default() = validateProfilerUsage(null)
+ @Test public fun profiler_false() = validateProfilerUsage(false)
+ @Test public fun profiler_true() = validateProfilerUsage(true)
}
diff --git a/benchmark/benchmark-common/src/main/java/androidx/benchmark/Arguments.kt b/benchmark/benchmark-common/src/main/java/androidx/benchmark/Arguments.kt
index c8fe215..307ed79 100644
--- a/benchmark/benchmark-common/src/main/java/androidx/benchmark/Arguments.kt
+++ b/benchmark/benchmark-common/src/main/java/androidx/benchmark/Arguments.kt
@@ -30,6 +30,12 @@
public var argumentSource: Bundle? = null
/**
+ * Allows tests to override profiler
+ */
+@RestrictTo(RestrictTo.Scope.TESTS)
+internal var profilerOverride: Profiler? = null
+
+/**
* @hide
*/
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
@@ -43,7 +49,9 @@
internal val startupMode: Boolean
internal val dryRunMode: Boolean
internal val iterations: Int?
+ private val _profiler: Profiler?
internal val profiler: Profiler?
+ get() = if (profilerOverride != null) profilerOverride else _profiler
internal val profilerSampleFrequency: Int
internal val profilerSampleDurationSeconds: Long
@@ -98,7 +106,7 @@
.filter { it.isNotEmpty() }
.toSet()
- profiler = arguments.getProfiler(outputEnable)
+ _profiler = arguments.getProfiler(outputEnable)
profilerSampleFrequency =
arguments.getBenchmarkArgument("profiling.sampleFrequency")?.ifBlank { null }
?.toInt()
@@ -107,11 +115,10 @@
arguments.getBenchmarkArgument("profiling.sampleDurationSeconds")?.ifBlank { null }
?.toLong()
?: 5
-
- if (profiler != null) {
+ if (_profiler != null) {
Log.d(
BenchmarkState.TAG,
- "Profiler ${profiler.javaClass.simpleName}, freq " +
+ "Profiler ${_profiler.javaClass.simpleName}, freq " +
"$profilerSampleFrequency, duration $profilerSampleDurationSeconds"
)
}
diff --git a/benchmark/benchmark-common/src/main/java/androidx/benchmark/BenchmarkState.kt b/benchmark/benchmark-common/src/main/java/androidx/benchmark/BenchmarkState.kt
index b8adf7a..3a10041 100644
--- a/benchmark/benchmark-common/src/main/java/androidx/benchmark/BenchmarkState.kt
+++ b/benchmark/benchmark-common/src/main/java/androidx/benchmark/BenchmarkState.kt
@@ -61,7 +61,7 @@
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
constructor() {
simplifiedTimingOnlyMode = false
- profiler = null
+ profiler = Arguments.profiler
}
private var stages = listOf(
diff --git a/benchmark/benchmark-common/src/main/java/androidx/benchmark/Errors.kt b/benchmark/benchmark-common/src/main/java/androidx/benchmark/Errors.kt
index 0814662..3743625 100644
--- a/benchmark/benchmark-common/src/main/java/androidx/benchmark/Errors.kt
+++ b/benchmark/benchmark-common/src/main/java/androidx/benchmark/Errors.kt
@@ -224,8 +224,8 @@
""".trimMarginWrapNewlines()
}
- if (Arguments.profiler != null) {
- val profilerName = Arguments.profiler.javaClass.simpleName
+ Arguments.profiler?.run {
+ val profilerName = javaClass.simpleName
warningPrefix += "PROFILED_"
warningString += """
|WARNING: Using profiler=$profilerName, results will be affected.
diff --git a/benchmark/benchmark-common/src/main/java/androidx/benchmark/Outputs.kt b/benchmark/benchmark-common/src/main/java/androidx/benchmark/Outputs.kt
index cfe4150..0faefee 100644
--- a/benchmark/benchmark-common/src/main/java/androidx/benchmark/Outputs.kt
+++ b/benchmark/benchmark-common/src/main/java/androidx/benchmark/Outputs.kt
@@ -52,7 +52,7 @@
@Suppress("DEPRECATION")
@SuppressLint("NewApi")
dirUsableByAppAndShell = when {
- Build.VERSION.SDK_INT in 29..31 -> {
+ Build.VERSION.SDK_INT in 29..32 -> {
// On Android Q, R and S we are using the media directory because that is
// the directory that the shell has access to. Context: b/181601156
InstrumentationRegistry.getInstrumentation().context.getFirstMountedMediaDir()
diff --git a/benchmark/benchmark-common/src/main/java/androidx/benchmark/Profiler.kt b/benchmark/benchmark-common/src/main/java/androidx/benchmark/Profiler.kt
index 93f7a28..6824def 100644
--- a/benchmark/benchmark-common/src/main/java/androidx/benchmark/Profiler.kt
+++ b/benchmark/benchmark-common/src/main/java/androidx/benchmark/Profiler.kt
@@ -20,6 +20,7 @@
import android.os.Debug
import android.util.Log
import androidx.annotation.RequiresApi
+import androidx.annotation.RestrictTo
import androidx.benchmark.BenchmarkState.Companion.TAG
import androidx.benchmark.simpleperf.ProfileSession
import androidx.benchmark.simpleperf.RecordOptions
@@ -113,15 +114,20 @@
}
internal object StackSamplingLegacy : Profiler() {
+ @RestrictTo(RestrictTo.Scope.TESTS)
+ var isRunning = false
+
override fun start(traceUniqueName: String) {
startRuntimeMethodTracing(
traceFileName = "$traceUniqueName-stackSamplingLegacy.trace",
sampled = true
)
+ isRunning = true
}
override fun stop() {
stopRuntimeMethodTracing()
+ isRunning = false
}
override val requiresExtraRuntime: Boolean = true
diff --git a/benchmark/benchmark-junit4/api/1.1.0-beta01.txt b/benchmark/benchmark-junit4/api/1.1.0-beta01.txt
new file mode 100644
index 0000000..873f105
--- /dev/null
+++ b/benchmark/benchmark-junit4/api/1.1.0-beta01.txt
@@ -0,0 +1,23 @@
+// Signature format: 4.0
+package androidx.benchmark.junit4 {
+
+ public class AndroidBenchmarkRunner extends androidx.test.runner.AndroidJUnitRunner {
+ ctor public AndroidBenchmarkRunner();
+ }
+
+ public final class BenchmarkRule implements org.junit.rules.TestRule {
+ ctor public BenchmarkRule();
+ method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description);
+ method public androidx.benchmark.BenchmarkState getState();
+ }
+
+ public final class BenchmarkRule.Scope {
+ method public inline <T> T! runWithTimingDisabled(kotlin.jvm.functions.Function0<? extends T> block);
+ }
+
+ public final class BenchmarkRuleKt {
+ method public static inline void measureRepeated(androidx.benchmark.junit4.BenchmarkRule, kotlin.jvm.functions.Function1<? super androidx.benchmark.junit4.BenchmarkRule.Scope,kotlin.Unit> block);
+ }
+
+}
+
diff --git a/benchmark/benchmark-junit4/api/1.1.0-beta02.txt b/benchmark/benchmark-junit4/api/1.1.0-beta02.txt
new file mode 100644
index 0000000..873f105
--- /dev/null
+++ b/benchmark/benchmark-junit4/api/1.1.0-beta02.txt
@@ -0,0 +1,23 @@
+// Signature format: 4.0
+package androidx.benchmark.junit4 {
+
+ public class AndroidBenchmarkRunner extends androidx.test.runner.AndroidJUnitRunner {
+ ctor public AndroidBenchmarkRunner();
+ }
+
+ public final class BenchmarkRule implements org.junit.rules.TestRule {
+ ctor public BenchmarkRule();
+ method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description);
+ method public androidx.benchmark.BenchmarkState getState();
+ }
+
+ public final class BenchmarkRule.Scope {
+ method public inline <T> T! runWithTimingDisabled(kotlin.jvm.functions.Function0<? extends T> block);
+ }
+
+ public final class BenchmarkRuleKt {
+ method public static inline void measureRepeated(androidx.benchmark.junit4.BenchmarkRule, kotlin.jvm.functions.Function1<? super androidx.benchmark.junit4.BenchmarkRule.Scope,kotlin.Unit> block);
+ }
+
+}
+
diff --git a/benchmark/benchmark-junit4/api/public_plus_experimental_1.1.0-beta01.txt b/benchmark/benchmark-junit4/api/public_plus_experimental_1.1.0-beta01.txt
new file mode 100644
index 0000000..873f105
--- /dev/null
+++ b/benchmark/benchmark-junit4/api/public_plus_experimental_1.1.0-beta01.txt
@@ -0,0 +1,23 @@
+// Signature format: 4.0
+package androidx.benchmark.junit4 {
+
+ public class AndroidBenchmarkRunner extends androidx.test.runner.AndroidJUnitRunner {
+ ctor public AndroidBenchmarkRunner();
+ }
+
+ public final class BenchmarkRule implements org.junit.rules.TestRule {
+ ctor public BenchmarkRule();
+ method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description);
+ method public androidx.benchmark.BenchmarkState getState();
+ }
+
+ public final class BenchmarkRule.Scope {
+ method public inline <T> T! runWithTimingDisabled(kotlin.jvm.functions.Function0<? extends T> block);
+ }
+
+ public final class BenchmarkRuleKt {
+ method public static inline void measureRepeated(androidx.benchmark.junit4.BenchmarkRule, kotlin.jvm.functions.Function1<? super androidx.benchmark.junit4.BenchmarkRule.Scope,kotlin.Unit> block);
+ }
+
+}
+
diff --git a/benchmark/benchmark-junit4/api/public_plus_experimental_1.1.0-beta02.txt b/benchmark/benchmark-junit4/api/public_plus_experimental_1.1.0-beta02.txt
new file mode 100644
index 0000000..873f105
--- /dev/null
+++ b/benchmark/benchmark-junit4/api/public_plus_experimental_1.1.0-beta02.txt
@@ -0,0 +1,23 @@
+// Signature format: 4.0
+package androidx.benchmark.junit4 {
+
+ public class AndroidBenchmarkRunner extends androidx.test.runner.AndroidJUnitRunner {
+ ctor public AndroidBenchmarkRunner();
+ }
+
+ public final class BenchmarkRule implements org.junit.rules.TestRule {
+ ctor public BenchmarkRule();
+ method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description);
+ method public androidx.benchmark.BenchmarkState getState();
+ }
+
+ public final class BenchmarkRule.Scope {
+ method public inline <T> T! runWithTimingDisabled(kotlin.jvm.functions.Function0<? extends T> block);
+ }
+
+ public final class BenchmarkRuleKt {
+ method public static inline void measureRepeated(androidx.benchmark.junit4.BenchmarkRule, kotlin.jvm.functions.Function1<? super androidx.benchmark.junit4.BenchmarkRule.Scope,kotlin.Unit> block);
+ }
+
+}
+
diff --git a/wear/watchface/watchface-complications-data-core/api/res-current.txt b/benchmark/benchmark-junit4/api/res-1.1.0-beta01.txt
similarity index 100%
copy from wear/watchface/watchface-complications-data-core/api/res-current.txt
copy to benchmark/benchmark-junit4/api/res-1.1.0-beta01.txt
diff --git a/wear/watchface/watchface-complications-data-core/api/res-current.txt b/benchmark/benchmark-junit4/api/res-1.1.0-beta02.txt
similarity index 100%
copy from wear/watchface/watchface-complications-data-core/api/res-current.txt
copy to benchmark/benchmark-junit4/api/res-1.1.0-beta02.txt
diff --git a/benchmark/benchmark-junit4/api/restricted_1.1.0-beta01.txt b/benchmark/benchmark-junit4/api/restricted_1.1.0-beta01.txt
new file mode 100644
index 0000000..d3bf38c
--- /dev/null
+++ b/benchmark/benchmark-junit4/api/restricted_1.1.0-beta01.txt
@@ -0,0 +1,29 @@
+// Signature format: 4.0
+package androidx.benchmark.junit4 {
+
+ public class AndroidBenchmarkRunner extends androidx.test.runner.AndroidJUnitRunner {
+ ctor public AndroidBenchmarkRunner();
+ }
+
+ public final class BenchmarkRule implements org.junit.rules.TestRule {
+ ctor public BenchmarkRule();
+ method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description);
+ method public androidx.benchmark.BenchmarkState getState();
+ }
+
+ public final class BenchmarkRule.Scope {
+ method @kotlin.PublishedApi internal androidx.benchmark.BenchmarkState getOuterState();
+ method public inline <T> T! runWithTimingDisabled(kotlin.jvm.functions.Function0<? extends T> block);
+ }
+
+ public final class BenchmarkRuleKt {
+ method public static inline void measureRepeated(androidx.benchmark.junit4.BenchmarkRule, kotlin.jvm.functions.Function1<? super androidx.benchmark.junit4.BenchmarkRule.Scope,kotlin.Unit> block);
+ }
+
+ @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) public final class PerfettoRule implements org.junit.rules.TestRule {
+ ctor public PerfettoRule();
+ method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description);
+ }
+
+}
+
diff --git a/benchmark/benchmark-junit4/api/restricted_1.1.0-beta02.txt b/benchmark/benchmark-junit4/api/restricted_1.1.0-beta02.txt
new file mode 100644
index 0000000..d3bf38c
--- /dev/null
+++ b/benchmark/benchmark-junit4/api/restricted_1.1.0-beta02.txt
@@ -0,0 +1,29 @@
+// Signature format: 4.0
+package androidx.benchmark.junit4 {
+
+ public class AndroidBenchmarkRunner extends androidx.test.runner.AndroidJUnitRunner {
+ ctor public AndroidBenchmarkRunner();
+ }
+
+ public final class BenchmarkRule implements org.junit.rules.TestRule {
+ ctor public BenchmarkRule();
+ method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description);
+ method public androidx.benchmark.BenchmarkState getState();
+ }
+
+ public final class BenchmarkRule.Scope {
+ method @kotlin.PublishedApi internal androidx.benchmark.BenchmarkState getOuterState();
+ method public inline <T> T! runWithTimingDisabled(kotlin.jvm.functions.Function0<? extends T> block);
+ }
+
+ public final class BenchmarkRuleKt {
+ method public static inline void measureRepeated(androidx.benchmark.junit4.BenchmarkRule, kotlin.jvm.functions.Function1<? super androidx.benchmark.junit4.BenchmarkRule.Scope,kotlin.Unit> block);
+ }
+
+ @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) public final class PerfettoRule implements org.junit.rules.TestRule {
+ ctor public PerfettoRule();
+ method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description);
+ }
+
+}
+
diff --git a/benchmark/benchmark-macro-junit4/api/1.1.0-beta01.txt b/benchmark/benchmark-macro-junit4/api/1.1.0-beta01.txt
new file mode 100644
index 0000000..4b1ab53
--- /dev/null
+++ b/benchmark/benchmark-macro-junit4/api/1.1.0-beta01.txt
@@ -0,0 +1,14 @@
+// Signature format: 4.0
+package androidx.benchmark.macro.junit4 {
+
+ public final class MacrobenchmarkRule implements org.junit.rules.TestRule {
+ ctor public MacrobenchmarkRule();
+ method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description);
+ method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, optional androidx.benchmark.macro.CompilationMode compilationMode, optional androidx.benchmark.macro.StartupMode? startupMode, @IntRange(from=1) int iterations, optional kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> setupBlock, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
+ method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, optional androidx.benchmark.macro.CompilationMode compilationMode, optional androidx.benchmark.macro.StartupMode? startupMode, @IntRange(from=1) int iterations, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
+ method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, optional androidx.benchmark.macro.CompilationMode compilationMode, @IntRange(from=1) int iterations, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
+ method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, @IntRange(from=1) int iterations, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
+ }
+
+}
+
diff --git a/benchmark/benchmark-macro-junit4/api/1.1.0-beta02.txt b/benchmark/benchmark-macro-junit4/api/1.1.0-beta02.txt
new file mode 100644
index 0000000..4b1ab53
--- /dev/null
+++ b/benchmark/benchmark-macro-junit4/api/1.1.0-beta02.txt
@@ -0,0 +1,14 @@
+// Signature format: 4.0
+package androidx.benchmark.macro.junit4 {
+
+ public final class MacrobenchmarkRule implements org.junit.rules.TestRule {
+ ctor public MacrobenchmarkRule();
+ method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description);
+ method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, optional androidx.benchmark.macro.CompilationMode compilationMode, optional androidx.benchmark.macro.StartupMode? startupMode, @IntRange(from=1) int iterations, optional kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> setupBlock, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
+ method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, optional androidx.benchmark.macro.CompilationMode compilationMode, optional androidx.benchmark.macro.StartupMode? startupMode, @IntRange(from=1) int iterations, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
+ method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, optional androidx.benchmark.macro.CompilationMode compilationMode, @IntRange(from=1) int iterations, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
+ method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, @IntRange(from=1) int iterations, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
+ }
+
+}
+
diff --git a/benchmark/benchmark-macro-junit4/api/public_plus_experimental_1.1.0-beta01.txt b/benchmark/benchmark-macro-junit4/api/public_plus_experimental_1.1.0-beta01.txt
new file mode 100644
index 0000000..fa47278
--- /dev/null
+++ b/benchmark/benchmark-macro-junit4/api/public_plus_experimental_1.1.0-beta01.txt
@@ -0,0 +1,21 @@
+// Signature format: 4.0
+package androidx.benchmark.macro.junit4 {
+
+ @RequiresApi(28) @androidx.benchmark.macro.ExperimentalBaselineProfilesApi public final class BaselineProfileRule implements org.junit.rules.TestRule {
+ ctor public BaselineProfileRule();
+ method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description);
+ method public void collectBaselineProfile(String packageName, optional kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> setupBlock, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> profileBlock);
+ method public void collectBaselineProfile(String packageName, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> profileBlock);
+ }
+
+ public final class MacrobenchmarkRule implements org.junit.rules.TestRule {
+ ctor public MacrobenchmarkRule();
+ method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description);
+ method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, optional androidx.benchmark.macro.CompilationMode compilationMode, optional androidx.benchmark.macro.StartupMode? startupMode, @IntRange(from=1) int iterations, optional kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> setupBlock, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
+ method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, optional androidx.benchmark.macro.CompilationMode compilationMode, optional androidx.benchmark.macro.StartupMode? startupMode, @IntRange(from=1) int iterations, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
+ method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, optional androidx.benchmark.macro.CompilationMode compilationMode, @IntRange(from=1) int iterations, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
+ method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, @IntRange(from=1) int iterations, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
+ }
+
+}
+
diff --git a/benchmark/benchmark-macro-junit4/api/public_plus_experimental_1.1.0-beta02.txt b/benchmark/benchmark-macro-junit4/api/public_plus_experimental_1.1.0-beta02.txt
new file mode 100644
index 0000000..fa47278
--- /dev/null
+++ b/benchmark/benchmark-macro-junit4/api/public_plus_experimental_1.1.0-beta02.txt
@@ -0,0 +1,21 @@
+// Signature format: 4.0
+package androidx.benchmark.macro.junit4 {
+
+ @RequiresApi(28) @androidx.benchmark.macro.ExperimentalBaselineProfilesApi public final class BaselineProfileRule implements org.junit.rules.TestRule {
+ ctor public BaselineProfileRule();
+ method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description);
+ method public void collectBaselineProfile(String packageName, optional kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> setupBlock, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> profileBlock);
+ method public void collectBaselineProfile(String packageName, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> profileBlock);
+ }
+
+ public final class MacrobenchmarkRule implements org.junit.rules.TestRule {
+ ctor public MacrobenchmarkRule();
+ method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description);
+ method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, optional androidx.benchmark.macro.CompilationMode compilationMode, optional androidx.benchmark.macro.StartupMode? startupMode, @IntRange(from=1) int iterations, optional kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> setupBlock, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
+ method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, optional androidx.benchmark.macro.CompilationMode compilationMode, optional androidx.benchmark.macro.StartupMode? startupMode, @IntRange(from=1) int iterations, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
+ method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, optional androidx.benchmark.macro.CompilationMode compilationMode, @IntRange(from=1) int iterations, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
+ method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, @IntRange(from=1) int iterations, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
+ }
+
+}
+
diff --git a/wear/watchface/watchface-complications-data-core/api/res-current.txt b/benchmark/benchmark-macro-junit4/api/res-1.1.0-beta01.txt
similarity index 100%
copy from wear/watchface/watchface-complications-data-core/api/res-current.txt
copy to benchmark/benchmark-macro-junit4/api/res-1.1.0-beta01.txt
diff --git a/wear/watchface/watchface-complications-data-core/api/res-current.txt b/benchmark/benchmark-macro-junit4/api/res-1.1.0-beta02.txt
similarity index 100%
copy from wear/watchface/watchface-complications-data-core/api/res-current.txt
copy to benchmark/benchmark-macro-junit4/api/res-1.1.0-beta02.txt
diff --git a/benchmark/benchmark-macro-junit4/api/restricted_1.1.0-beta01.txt b/benchmark/benchmark-macro-junit4/api/restricted_1.1.0-beta01.txt
new file mode 100644
index 0000000..4b1ab53
--- /dev/null
+++ b/benchmark/benchmark-macro-junit4/api/restricted_1.1.0-beta01.txt
@@ -0,0 +1,14 @@
+// Signature format: 4.0
+package androidx.benchmark.macro.junit4 {
+
+ public final class MacrobenchmarkRule implements org.junit.rules.TestRule {
+ ctor public MacrobenchmarkRule();
+ method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description);
+ method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, optional androidx.benchmark.macro.CompilationMode compilationMode, optional androidx.benchmark.macro.StartupMode? startupMode, @IntRange(from=1) int iterations, optional kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> setupBlock, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
+ method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, optional androidx.benchmark.macro.CompilationMode compilationMode, optional androidx.benchmark.macro.StartupMode? startupMode, @IntRange(from=1) int iterations, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
+ method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, optional androidx.benchmark.macro.CompilationMode compilationMode, @IntRange(from=1) int iterations, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
+ method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, @IntRange(from=1) int iterations, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
+ }
+
+}
+
diff --git a/benchmark/benchmark-macro-junit4/api/restricted_1.1.0-beta02.txt b/benchmark/benchmark-macro-junit4/api/restricted_1.1.0-beta02.txt
new file mode 100644
index 0000000..4b1ab53
--- /dev/null
+++ b/benchmark/benchmark-macro-junit4/api/restricted_1.1.0-beta02.txt
@@ -0,0 +1,14 @@
+// Signature format: 4.0
+package androidx.benchmark.macro.junit4 {
+
+ public final class MacrobenchmarkRule implements org.junit.rules.TestRule {
+ ctor public MacrobenchmarkRule();
+ method public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description);
+ method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, optional androidx.benchmark.macro.CompilationMode compilationMode, optional androidx.benchmark.macro.StartupMode? startupMode, @IntRange(from=1) int iterations, optional kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> setupBlock, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
+ method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, optional androidx.benchmark.macro.CompilationMode compilationMode, optional androidx.benchmark.macro.StartupMode? startupMode, @IntRange(from=1) int iterations, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
+ method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, optional androidx.benchmark.macro.CompilationMode compilationMode, @IntRange(from=1) int iterations, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
+ method public void measureRepeated(String packageName, java.util.List<? extends androidx.benchmark.macro.Metric> metrics, @IntRange(from=1) int iterations, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> measureBlock);
+ }
+
+}
+
diff --git a/benchmark/benchmark-macro/api/1.1.0-beta01.txt b/benchmark/benchmark-macro/api/1.1.0-beta01.txt
new file mode 100644
index 0000000..ad0beca
--- /dev/null
+++ b/benchmark/benchmark-macro/api/1.1.0-beta01.txt
@@ -0,0 +1,105 @@
+// Signature format: 4.0
+package androidx.benchmark.macro {
+
+ @RequiresApi(29) public final class Api29Kt {
+ }
+
+ public enum BaselineProfileMode {
+ enum_constant public static final androidx.benchmark.macro.BaselineProfileMode Disable;
+ enum_constant public static final androidx.benchmark.macro.BaselineProfileMode Require;
+ enum_constant public static final androidx.benchmark.macro.BaselineProfileMode UseIfAvailable;
+ }
+
+ public final class BaselineProfilesKt {
+ }
+
+ public abstract sealed class CompilationMode {
+ field public static final androidx.benchmark.macro.CompilationMode.Companion Companion;
+ field public static final androidx.benchmark.macro.CompilationMode DEFAULT;
+ }
+
+ public static final class CompilationMode.Companion {
+ }
+
+ public static final class CompilationMode.Full extends androidx.benchmark.macro.CompilationMode {
+ ctor public CompilationMode.Full();
+ }
+
+ @RequiresApi(24) public static final class CompilationMode.None extends androidx.benchmark.macro.CompilationMode {
+ ctor public CompilationMode.None();
+ }
+
+ @RequiresApi(24) public static final class CompilationMode.Partial extends androidx.benchmark.macro.CompilationMode {
+ ctor public CompilationMode.Partial(optional androidx.benchmark.macro.BaselineProfileMode baselineProfileMode, optional @IntRange(from=0) int warmupIterations);
+ ctor public CompilationMode.Partial(optional androidx.benchmark.macro.BaselineProfileMode baselineProfileMode);
+ ctor public CompilationMode.Partial();
+ method public androidx.benchmark.macro.BaselineProfileMode getBaselineProfileMode();
+ method public int getWarmupIterations();
+ property public final androidx.benchmark.macro.BaselineProfileMode baselineProfileMode;
+ property public final int warmupIterations;
+ }
+
+ public final class CompilationModeKt {
+ }
+
+ public final class FrameTimingMetric extends androidx.benchmark.macro.Metric {
+ ctor public FrameTimingMetric();
+ }
+
+ public final class IdeSummaryStringKt {
+ }
+
+ public final class IterationResultKt {
+ }
+
+ public final class MacrobenchmarkKt {
+ }
+
+ public final class MacrobenchmarkScope {
+ ctor public MacrobenchmarkScope(String packageName, boolean launchWithClearTask);
+ method public void dropKernelPageCache();
+ method public androidx.test.uiautomator.UiDevice getDevice();
+ method public Integer? getIteration();
+ method public String getPackageName();
+ method public void killProcess();
+ method public void pressHome(optional long delayDurationMs);
+ method public void pressHome();
+ method public void startActivityAndWait(optional kotlin.jvm.functions.Function1<? super android.content.Intent,kotlin.Unit> block);
+ method public void startActivityAndWait();
+ method public void startActivityAndWait(android.content.Intent intent);
+ property public final androidx.test.uiautomator.UiDevice device;
+ property public final Integer? iteration;
+ property public final String packageName;
+ }
+
+ public abstract sealed class Metric {
+ }
+
+ public final class MetricKt {
+ }
+
+ public final class MetricResultExtensionsKt {
+ }
+
+ public enum StartupMode {
+ enum_constant public static final androidx.benchmark.macro.StartupMode COLD;
+ enum_constant public static final androidx.benchmark.macro.StartupMode HOT;
+ enum_constant public static final androidx.benchmark.macro.StartupMode WARM;
+ }
+
+ public final class StartupTimingMetric extends androidx.benchmark.macro.Metric {
+ ctor public StartupTimingMetric();
+ }
+
+ public final class TagKt {
+ }
+
+}
+
+package androidx.benchmark.macro.perfetto {
+
+ public final class ForceTracingKt {
+ }
+
+}
+
diff --git a/benchmark/benchmark-macro/api/1.1.0-beta02.txt b/benchmark/benchmark-macro/api/1.1.0-beta02.txt
new file mode 100644
index 0000000..ad0beca
--- /dev/null
+++ b/benchmark/benchmark-macro/api/1.1.0-beta02.txt
@@ -0,0 +1,105 @@
+// Signature format: 4.0
+package androidx.benchmark.macro {
+
+ @RequiresApi(29) public final class Api29Kt {
+ }
+
+ public enum BaselineProfileMode {
+ enum_constant public static final androidx.benchmark.macro.BaselineProfileMode Disable;
+ enum_constant public static final androidx.benchmark.macro.BaselineProfileMode Require;
+ enum_constant public static final androidx.benchmark.macro.BaselineProfileMode UseIfAvailable;
+ }
+
+ public final class BaselineProfilesKt {
+ }
+
+ public abstract sealed class CompilationMode {
+ field public static final androidx.benchmark.macro.CompilationMode.Companion Companion;
+ field public static final androidx.benchmark.macro.CompilationMode DEFAULT;
+ }
+
+ public static final class CompilationMode.Companion {
+ }
+
+ public static final class CompilationMode.Full extends androidx.benchmark.macro.CompilationMode {
+ ctor public CompilationMode.Full();
+ }
+
+ @RequiresApi(24) public static final class CompilationMode.None extends androidx.benchmark.macro.CompilationMode {
+ ctor public CompilationMode.None();
+ }
+
+ @RequiresApi(24) public static final class CompilationMode.Partial extends androidx.benchmark.macro.CompilationMode {
+ ctor public CompilationMode.Partial(optional androidx.benchmark.macro.BaselineProfileMode baselineProfileMode, optional @IntRange(from=0) int warmupIterations);
+ ctor public CompilationMode.Partial(optional androidx.benchmark.macro.BaselineProfileMode baselineProfileMode);
+ ctor public CompilationMode.Partial();
+ method public androidx.benchmark.macro.BaselineProfileMode getBaselineProfileMode();
+ method public int getWarmupIterations();
+ property public final androidx.benchmark.macro.BaselineProfileMode baselineProfileMode;
+ property public final int warmupIterations;
+ }
+
+ public final class CompilationModeKt {
+ }
+
+ public final class FrameTimingMetric extends androidx.benchmark.macro.Metric {
+ ctor public FrameTimingMetric();
+ }
+
+ public final class IdeSummaryStringKt {
+ }
+
+ public final class IterationResultKt {
+ }
+
+ public final class MacrobenchmarkKt {
+ }
+
+ public final class MacrobenchmarkScope {
+ ctor public MacrobenchmarkScope(String packageName, boolean launchWithClearTask);
+ method public void dropKernelPageCache();
+ method public androidx.test.uiautomator.UiDevice getDevice();
+ method public Integer? getIteration();
+ method public String getPackageName();
+ method public void killProcess();
+ method public void pressHome(optional long delayDurationMs);
+ method public void pressHome();
+ method public void startActivityAndWait(optional kotlin.jvm.functions.Function1<? super android.content.Intent,kotlin.Unit> block);
+ method public void startActivityAndWait();
+ method public void startActivityAndWait(android.content.Intent intent);
+ property public final androidx.test.uiautomator.UiDevice device;
+ property public final Integer? iteration;
+ property public final String packageName;
+ }
+
+ public abstract sealed class Metric {
+ }
+
+ public final class MetricKt {
+ }
+
+ public final class MetricResultExtensionsKt {
+ }
+
+ public enum StartupMode {
+ enum_constant public static final androidx.benchmark.macro.StartupMode COLD;
+ enum_constant public static final androidx.benchmark.macro.StartupMode HOT;
+ enum_constant public static final androidx.benchmark.macro.StartupMode WARM;
+ }
+
+ public final class StartupTimingMetric extends androidx.benchmark.macro.Metric {
+ ctor public StartupTimingMetric();
+ }
+
+ public final class TagKt {
+ }
+
+}
+
+package androidx.benchmark.macro.perfetto {
+
+ public final class ForceTracingKt {
+ }
+
+}
+
diff --git a/benchmark/benchmark-macro/api/current.txt b/benchmark/benchmark-macro/api/current.txt
index 0d971ac..ad0beca 100644
--- a/benchmark/benchmark-macro/api/current.txt
+++ b/benchmark/benchmark-macro/api/current.txt
@@ -18,10 +18,6 @@
field public static final androidx.benchmark.macro.CompilationMode DEFAULT;
}
- @Deprecated public static final class CompilationMode.BaselineProfile extends androidx.benchmark.macro.CompilationMode {
- field @Deprecated public static final androidx.benchmark.macro.CompilationMode.BaselineProfile INSTANCE;
- }
-
public static final class CompilationMode.Companion {
}
@@ -43,16 +39,6 @@
property public final int warmupIterations;
}
- @Deprecated public static final class CompilationMode.Speed extends androidx.benchmark.macro.CompilationMode {
- field @Deprecated public static final androidx.benchmark.macro.CompilationMode.Speed INSTANCE;
- }
-
- @Deprecated public static final class CompilationMode.SpeedProfile extends androidx.benchmark.macro.CompilationMode {
- ctor @Deprecated public CompilationMode.SpeedProfile(optional int warmupIterations);
- method @Deprecated public int getWarmupIterations();
- property public final int warmupIterations;
- }
-
public final class CompilationModeKt {
}
diff --git a/benchmark/benchmark-macro/api/public_plus_experimental_1.1.0-beta01.txt b/benchmark/benchmark-macro/api/public_plus_experimental_1.1.0-beta01.txt
new file mode 100644
index 0000000..f010200
--- /dev/null
+++ b/benchmark/benchmark-macro/api/public_plus_experimental_1.1.0-beta01.txt
@@ -0,0 +1,115 @@
+// Signature format: 4.0
+package androidx.benchmark.macro {
+
+ @RequiresApi(29) public final class Api29Kt {
+ }
+
+ public enum BaselineProfileMode {
+ enum_constant public static final androidx.benchmark.macro.BaselineProfileMode Disable;
+ enum_constant public static final androidx.benchmark.macro.BaselineProfileMode Require;
+ enum_constant public static final androidx.benchmark.macro.BaselineProfileMode UseIfAvailable;
+ }
+
+ public final class BaselineProfilesKt {
+ }
+
+ public abstract sealed class CompilationMode {
+ field public static final androidx.benchmark.macro.CompilationMode.Companion Companion;
+ field public static final androidx.benchmark.macro.CompilationMode DEFAULT;
+ }
+
+ public static final class CompilationMode.Companion {
+ }
+
+ public static final class CompilationMode.Full extends androidx.benchmark.macro.CompilationMode {
+ ctor public CompilationMode.Full();
+ }
+
+ @RequiresApi(24) public static final class CompilationMode.None extends androidx.benchmark.macro.CompilationMode {
+ ctor public CompilationMode.None();
+ }
+
+ @RequiresApi(24) public static final class CompilationMode.Partial extends androidx.benchmark.macro.CompilationMode {
+ ctor public CompilationMode.Partial(optional androidx.benchmark.macro.BaselineProfileMode baselineProfileMode, optional @IntRange(from=0) int warmupIterations);
+ ctor public CompilationMode.Partial(optional androidx.benchmark.macro.BaselineProfileMode baselineProfileMode);
+ ctor public CompilationMode.Partial();
+ method public androidx.benchmark.macro.BaselineProfileMode getBaselineProfileMode();
+ method public int getWarmupIterations();
+ property public final androidx.benchmark.macro.BaselineProfileMode baselineProfileMode;
+ property public final int warmupIterations;
+ }
+
+ public final class CompilationModeKt {
+ }
+
+ @kotlin.RequiresOptIn(message="The Baseline profile generation API is experimental.") @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets={kotlin.annotation.AnnotationTarget.CLASS, kotlin.annotation.AnnotationTarget.FUNCTION}) public @interface ExperimentalBaselineProfilesApi {
+ }
+
+ @kotlin.RequiresOptIn(message="This Metric API is experimental.") @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets={kotlin.annotation.AnnotationTarget.CLASS, kotlin.annotation.AnnotationTarget.FUNCTION}) public @interface ExperimentalMetricApi {
+ }
+
+ public final class FrameTimingMetric extends androidx.benchmark.macro.Metric {
+ ctor public FrameTimingMetric();
+ }
+
+ public final class IdeSummaryStringKt {
+ }
+
+ public final class IterationResultKt {
+ }
+
+ public final class MacrobenchmarkKt {
+ }
+
+ public final class MacrobenchmarkScope {
+ ctor public MacrobenchmarkScope(String packageName, boolean launchWithClearTask);
+ method public void dropKernelPageCache();
+ method public androidx.test.uiautomator.UiDevice getDevice();
+ method public Integer? getIteration();
+ method public String getPackageName();
+ method public void killProcess();
+ method public void pressHome(optional long delayDurationMs);
+ method public void pressHome();
+ method public void startActivityAndWait(optional kotlin.jvm.functions.Function1<? super android.content.Intent,kotlin.Unit> block);
+ method public void startActivityAndWait();
+ method public void startActivityAndWait(android.content.Intent intent);
+ property public final androidx.test.uiautomator.UiDevice device;
+ property public final Integer? iteration;
+ property public final String packageName;
+ }
+
+ public abstract sealed class Metric {
+ }
+
+ public final class MetricKt {
+ }
+
+ public final class MetricResultExtensionsKt {
+ }
+
+ public enum StartupMode {
+ enum_constant public static final androidx.benchmark.macro.StartupMode COLD;
+ enum_constant public static final androidx.benchmark.macro.StartupMode HOT;
+ enum_constant public static final androidx.benchmark.macro.StartupMode WARM;
+ }
+
+ public final class StartupTimingMetric extends androidx.benchmark.macro.Metric {
+ ctor public StartupTimingMetric();
+ }
+
+ public final class TagKt {
+ }
+
+ @RequiresApi(29) @androidx.benchmark.macro.ExperimentalMetricApi public final class TraceSectionMetric extends androidx.benchmark.macro.Metric {
+ ctor public TraceSectionMetric(String sectionName);
+ }
+
+}
+
+package androidx.benchmark.macro.perfetto {
+
+ public final class ForceTracingKt {
+ }
+
+}
+
diff --git a/benchmark/benchmark-macro/api/public_plus_experimental_1.1.0-beta02.txt b/benchmark/benchmark-macro/api/public_plus_experimental_1.1.0-beta02.txt
new file mode 100644
index 0000000..f010200
--- /dev/null
+++ b/benchmark/benchmark-macro/api/public_plus_experimental_1.1.0-beta02.txt
@@ -0,0 +1,115 @@
+// Signature format: 4.0
+package androidx.benchmark.macro {
+
+ @RequiresApi(29) public final class Api29Kt {
+ }
+
+ public enum BaselineProfileMode {
+ enum_constant public static final androidx.benchmark.macro.BaselineProfileMode Disable;
+ enum_constant public static final androidx.benchmark.macro.BaselineProfileMode Require;
+ enum_constant public static final androidx.benchmark.macro.BaselineProfileMode UseIfAvailable;
+ }
+
+ public final class BaselineProfilesKt {
+ }
+
+ public abstract sealed class CompilationMode {
+ field public static final androidx.benchmark.macro.CompilationMode.Companion Companion;
+ field public static final androidx.benchmark.macro.CompilationMode DEFAULT;
+ }
+
+ public static final class CompilationMode.Companion {
+ }
+
+ public static final class CompilationMode.Full extends androidx.benchmark.macro.CompilationMode {
+ ctor public CompilationMode.Full();
+ }
+
+ @RequiresApi(24) public static final class CompilationMode.None extends androidx.benchmark.macro.CompilationMode {
+ ctor public CompilationMode.None();
+ }
+
+ @RequiresApi(24) public static final class CompilationMode.Partial extends androidx.benchmark.macro.CompilationMode {
+ ctor public CompilationMode.Partial(optional androidx.benchmark.macro.BaselineProfileMode baselineProfileMode, optional @IntRange(from=0) int warmupIterations);
+ ctor public CompilationMode.Partial(optional androidx.benchmark.macro.BaselineProfileMode baselineProfileMode);
+ ctor public CompilationMode.Partial();
+ method public androidx.benchmark.macro.BaselineProfileMode getBaselineProfileMode();
+ method public int getWarmupIterations();
+ property public final androidx.benchmark.macro.BaselineProfileMode baselineProfileMode;
+ property public final int warmupIterations;
+ }
+
+ public final class CompilationModeKt {
+ }
+
+ @kotlin.RequiresOptIn(message="The Baseline profile generation API is experimental.") @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets={kotlin.annotation.AnnotationTarget.CLASS, kotlin.annotation.AnnotationTarget.FUNCTION}) public @interface ExperimentalBaselineProfilesApi {
+ }
+
+ @kotlin.RequiresOptIn(message="This Metric API is experimental.") @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets={kotlin.annotation.AnnotationTarget.CLASS, kotlin.annotation.AnnotationTarget.FUNCTION}) public @interface ExperimentalMetricApi {
+ }
+
+ public final class FrameTimingMetric extends androidx.benchmark.macro.Metric {
+ ctor public FrameTimingMetric();
+ }
+
+ public final class IdeSummaryStringKt {
+ }
+
+ public final class IterationResultKt {
+ }
+
+ public final class MacrobenchmarkKt {
+ }
+
+ public final class MacrobenchmarkScope {
+ ctor public MacrobenchmarkScope(String packageName, boolean launchWithClearTask);
+ method public void dropKernelPageCache();
+ method public androidx.test.uiautomator.UiDevice getDevice();
+ method public Integer? getIteration();
+ method public String getPackageName();
+ method public void killProcess();
+ method public void pressHome(optional long delayDurationMs);
+ method public void pressHome();
+ method public void startActivityAndWait(optional kotlin.jvm.functions.Function1<? super android.content.Intent,kotlin.Unit> block);
+ method public void startActivityAndWait();
+ method public void startActivityAndWait(android.content.Intent intent);
+ property public final androidx.test.uiautomator.UiDevice device;
+ property public final Integer? iteration;
+ property public final String packageName;
+ }
+
+ public abstract sealed class Metric {
+ }
+
+ public final class MetricKt {
+ }
+
+ public final class MetricResultExtensionsKt {
+ }
+
+ public enum StartupMode {
+ enum_constant public static final androidx.benchmark.macro.StartupMode COLD;
+ enum_constant public static final androidx.benchmark.macro.StartupMode HOT;
+ enum_constant public static final androidx.benchmark.macro.StartupMode WARM;
+ }
+
+ public final class StartupTimingMetric extends androidx.benchmark.macro.Metric {
+ ctor public StartupTimingMetric();
+ }
+
+ public final class TagKt {
+ }
+
+ @RequiresApi(29) @androidx.benchmark.macro.ExperimentalMetricApi public final class TraceSectionMetric extends androidx.benchmark.macro.Metric {
+ ctor public TraceSectionMetric(String sectionName);
+ }
+
+}
+
+package androidx.benchmark.macro.perfetto {
+
+ public final class ForceTracingKt {
+ }
+
+}
+
diff --git a/benchmark/benchmark-macro/api/public_plus_experimental_current.txt b/benchmark/benchmark-macro/api/public_plus_experimental_current.txt
index 4e4fde3..f010200 100644
--- a/benchmark/benchmark-macro/api/public_plus_experimental_current.txt
+++ b/benchmark/benchmark-macro/api/public_plus_experimental_current.txt
@@ -18,10 +18,6 @@
field public static final androidx.benchmark.macro.CompilationMode DEFAULT;
}
- @Deprecated public static final class CompilationMode.BaselineProfile extends androidx.benchmark.macro.CompilationMode {
- field @Deprecated public static final androidx.benchmark.macro.CompilationMode.BaselineProfile INSTANCE;
- }
-
public static final class CompilationMode.Companion {
}
@@ -43,16 +39,6 @@
property public final int warmupIterations;
}
- @Deprecated public static final class CompilationMode.Speed extends androidx.benchmark.macro.CompilationMode {
- field @Deprecated public static final androidx.benchmark.macro.CompilationMode.Speed INSTANCE;
- }
-
- @Deprecated public static final class CompilationMode.SpeedProfile extends androidx.benchmark.macro.CompilationMode {
- ctor @Deprecated public CompilationMode.SpeedProfile(optional int warmupIterations);
- method @Deprecated public int getWarmupIterations();
- property public final int warmupIterations;
- }
-
public final class CompilationModeKt {
}
diff --git a/wear/watchface/watchface-complications-data-core/api/res-current.txt b/benchmark/benchmark-macro/api/res-1.1.0-beta01.txt
similarity index 100%
copy from wear/watchface/watchface-complications-data-core/api/res-current.txt
copy to benchmark/benchmark-macro/api/res-1.1.0-beta01.txt
diff --git a/wear/watchface/watchface-complications-data-core/api/res-current.txt b/benchmark/benchmark-macro/api/res-1.1.0-beta02.txt
similarity index 100%
copy from wear/watchface/watchface-complications-data-core/api/res-current.txt
copy to benchmark/benchmark-macro/api/res-1.1.0-beta02.txt
diff --git a/benchmark/benchmark-macro/api/restricted_1.1.0-beta01.txt b/benchmark/benchmark-macro/api/restricted_1.1.0-beta01.txt
new file mode 100644
index 0000000..d90e8af
--- /dev/null
+++ b/benchmark/benchmark-macro/api/restricted_1.1.0-beta01.txt
@@ -0,0 +1,122 @@
+// Signature format: 4.0
+package androidx.benchmark.macro {
+
+ @RequiresApi(29) public final class Api29Kt {
+ }
+
+ @RequiresApi(23) @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) public final class AudioUnderrunMetric extends androidx.benchmark.macro.Metric {
+ ctor public AudioUnderrunMetric();
+ }
+
+ public enum BaselineProfileMode {
+ enum_constant public static final androidx.benchmark.macro.BaselineProfileMode Disable;
+ enum_constant public static final androidx.benchmark.macro.BaselineProfileMode Require;
+ enum_constant public static final androidx.benchmark.macro.BaselineProfileMode UseIfAvailable;
+ }
+
+ public final class BaselineProfilesKt {
+ method @RequiresApi(28) @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) public static void collectBaselineProfile(String uniqueName, String packageName, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> setupBlock, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> profileBlock);
+ }
+
+ public abstract sealed class CompilationMode {
+ field public static final androidx.benchmark.macro.CompilationMode.Companion Companion;
+ field public static final androidx.benchmark.macro.CompilationMode DEFAULT;
+ }
+
+ public static final class CompilationMode.Companion {
+ }
+
+ public static final class CompilationMode.Full extends androidx.benchmark.macro.CompilationMode {
+ ctor public CompilationMode.Full();
+ }
+
+ @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) public static final class CompilationMode.Interpreted extends androidx.benchmark.macro.CompilationMode {
+ }
+
+ @RequiresApi(24) public static final class CompilationMode.None extends androidx.benchmark.macro.CompilationMode {
+ ctor public CompilationMode.None();
+ }
+
+ @RequiresApi(24) public static final class CompilationMode.Partial extends androidx.benchmark.macro.CompilationMode {
+ ctor public CompilationMode.Partial(optional androidx.benchmark.macro.BaselineProfileMode baselineProfileMode, optional @IntRange(from=0) int warmupIterations);
+ ctor public CompilationMode.Partial(optional androidx.benchmark.macro.BaselineProfileMode baselineProfileMode);
+ ctor public CompilationMode.Partial();
+ method public androidx.benchmark.macro.BaselineProfileMode getBaselineProfileMode();
+ method public int getWarmupIterations();
+ property public final androidx.benchmark.macro.BaselineProfileMode baselineProfileMode;
+ property public final int warmupIterations;
+ }
+
+ public final class CompilationModeKt {
+ method @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) public static boolean isSupportedWithVmSettings(androidx.benchmark.macro.CompilationMode);
+ }
+
+ @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) public final class FrameTimingGfxInfoMetric extends androidx.benchmark.macro.Metric {
+ ctor public FrameTimingGfxInfoMetric();
+ }
+
+ public final class FrameTimingMetric extends androidx.benchmark.macro.Metric {
+ ctor public FrameTimingMetric();
+ }
+
+ public final class IdeSummaryStringKt {
+ }
+
+ public final class IterationResultKt {
+ }
+
+ public final class MacrobenchmarkKt {
+ }
+
+ public final class MacrobenchmarkScope {
+ ctor public MacrobenchmarkScope(String packageName, boolean launchWithClearTask);
+ method public void dropKernelPageCache();
+ method public androidx.test.uiautomator.UiDevice getDevice();
+ method public Integer? getIteration();
+ method public String getPackageName();
+ method public void killProcess();
+ method public void pressHome(optional long delayDurationMs);
+ method public void pressHome();
+ method public void startActivityAndWait(optional kotlin.jvm.functions.Function1<? super android.content.Intent,kotlin.Unit> block);
+ method public void startActivityAndWait();
+ method public void startActivityAndWait(android.content.Intent intent);
+ property public final androidx.test.uiautomator.UiDevice device;
+ property public final Integer? iteration;
+ property public final String packageName;
+ }
+
+ public abstract sealed class Metric {
+ }
+
+ public final class MetricKt {
+ }
+
+ public final class MetricResultExtensionsKt {
+ }
+
+ public enum StartupMode {
+ enum_constant public static final androidx.benchmark.macro.StartupMode COLD;
+ enum_constant public static final androidx.benchmark.macro.StartupMode HOT;
+ enum_constant public static final androidx.benchmark.macro.StartupMode WARM;
+ }
+
+ @RequiresApi(29) @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) public final class StartupTimingLegacyMetric extends androidx.benchmark.macro.Metric {
+ ctor public StartupTimingLegacyMetric();
+ }
+
+ public final class StartupTimingMetric extends androidx.benchmark.macro.Metric {
+ ctor public StartupTimingMetric();
+ }
+
+ public final class TagKt {
+ }
+
+}
+
+package androidx.benchmark.macro.perfetto {
+
+ public final class ForceTracingKt {
+ }
+
+}
+
diff --git a/benchmark/benchmark-macro/api/restricted_1.1.0-beta02.txt b/benchmark/benchmark-macro/api/restricted_1.1.0-beta02.txt
new file mode 100644
index 0000000..d90e8af
--- /dev/null
+++ b/benchmark/benchmark-macro/api/restricted_1.1.0-beta02.txt
@@ -0,0 +1,122 @@
+// Signature format: 4.0
+package androidx.benchmark.macro {
+
+ @RequiresApi(29) public final class Api29Kt {
+ }
+
+ @RequiresApi(23) @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) public final class AudioUnderrunMetric extends androidx.benchmark.macro.Metric {
+ ctor public AudioUnderrunMetric();
+ }
+
+ public enum BaselineProfileMode {
+ enum_constant public static final androidx.benchmark.macro.BaselineProfileMode Disable;
+ enum_constant public static final androidx.benchmark.macro.BaselineProfileMode Require;
+ enum_constant public static final androidx.benchmark.macro.BaselineProfileMode UseIfAvailable;
+ }
+
+ public final class BaselineProfilesKt {
+ method @RequiresApi(28) @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) public static void collectBaselineProfile(String uniqueName, String packageName, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> setupBlock, kotlin.jvm.functions.Function1<? super androidx.benchmark.macro.MacrobenchmarkScope,kotlin.Unit> profileBlock);
+ }
+
+ public abstract sealed class CompilationMode {
+ field public static final androidx.benchmark.macro.CompilationMode.Companion Companion;
+ field public static final androidx.benchmark.macro.CompilationMode DEFAULT;
+ }
+
+ public static final class CompilationMode.Companion {
+ }
+
+ public static final class CompilationMode.Full extends androidx.benchmark.macro.CompilationMode {
+ ctor public CompilationMode.Full();
+ }
+
+ @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) public static final class CompilationMode.Interpreted extends androidx.benchmark.macro.CompilationMode {
+ }
+
+ @RequiresApi(24) public static final class CompilationMode.None extends androidx.benchmark.macro.CompilationMode {
+ ctor public CompilationMode.None();
+ }
+
+ @RequiresApi(24) public static final class CompilationMode.Partial extends androidx.benchmark.macro.CompilationMode {
+ ctor public CompilationMode.Partial(optional androidx.benchmark.macro.BaselineProfileMode baselineProfileMode, optional @IntRange(from=0) int warmupIterations);
+ ctor public CompilationMode.Partial(optional androidx.benchmark.macro.BaselineProfileMode baselineProfileMode);
+ ctor public CompilationMode.Partial();
+ method public androidx.benchmark.macro.BaselineProfileMode getBaselineProfileMode();
+ method public int getWarmupIterations();
+ property public final androidx.benchmark.macro.BaselineProfileMode baselineProfileMode;
+ property public final int warmupIterations;
+ }
+
+ public final class CompilationModeKt {
+ method @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) public static boolean isSupportedWithVmSettings(androidx.benchmark.macro.CompilationMode);
+ }
+
+ @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) public final class FrameTimingGfxInfoMetric extends androidx.benchmark.macro.Metric {
+ ctor public FrameTimingGfxInfoMetric();
+ }
+
+ public final class FrameTimingMetric extends androidx.benchmark.macro.Metric {
+ ctor public FrameTimingMetric();
+ }
+
+ public final class IdeSummaryStringKt {
+ }
+
+ public final class IterationResultKt {
+ }
+
+ public final class MacrobenchmarkKt {
+ }
+
+ public final class MacrobenchmarkScope {
+ ctor public MacrobenchmarkScope(String packageName, boolean launchWithClearTask);
+ method public void dropKernelPageCache();
+ method public androidx.test.uiautomator.UiDevice getDevice();
+ method public Integer? getIteration();
+ method public String getPackageName();
+ method public void killProcess();
+ method public void pressHome(optional long delayDurationMs);
+ method public void pressHome();
+ method public void startActivityAndWait(optional kotlin.jvm.functions.Function1<? super android.content.Intent,kotlin.Unit> block);
+ method public void startActivityAndWait();
+ method public void startActivityAndWait(android.content.Intent intent);
+ property public final androidx.test.uiautomator.UiDevice device;
+ property public final Integer? iteration;
+ property public final String packageName;
+ }
+
+ public abstract sealed class Metric {
+ }
+
+ public final class MetricKt {
+ }
+
+ public final class MetricResultExtensionsKt {
+ }
+
+ public enum StartupMode {
+ enum_constant public static final androidx.benchmark.macro.StartupMode COLD;
+ enum_constant public static final androidx.benchmark.macro.StartupMode HOT;
+ enum_constant public static final androidx.benchmark.macro.StartupMode WARM;
+ }
+
+ @RequiresApi(29) @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) public final class StartupTimingLegacyMetric extends androidx.benchmark.macro.Metric {
+ ctor public StartupTimingLegacyMetric();
+ }
+
+ public final class StartupTimingMetric extends androidx.benchmark.macro.Metric {
+ ctor public StartupTimingMetric();
+ }
+
+ public final class TagKt {
+ }
+
+}
+
+package androidx.benchmark.macro.perfetto {
+
+ public final class ForceTracingKt {
+ }
+
+}
+
diff --git a/benchmark/benchmark-macro/api/restricted_current.txt b/benchmark/benchmark-macro/api/restricted_current.txt
index 32672e61..d90e8af 100644
--- a/benchmark/benchmark-macro/api/restricted_current.txt
+++ b/benchmark/benchmark-macro/api/restricted_current.txt
@@ -23,10 +23,6 @@
field public static final androidx.benchmark.macro.CompilationMode DEFAULT;
}
- @Deprecated public static final class CompilationMode.BaselineProfile extends androidx.benchmark.macro.CompilationMode {
- field @Deprecated public static final androidx.benchmark.macro.CompilationMode.BaselineProfile INSTANCE;
- }
-
public static final class CompilationMode.Companion {
}
@@ -51,16 +47,6 @@
property public final int warmupIterations;
}
- @Deprecated public static final class CompilationMode.Speed extends androidx.benchmark.macro.CompilationMode {
- field @Deprecated public static final androidx.benchmark.macro.CompilationMode.Speed INSTANCE;
- }
-
- @Deprecated public static final class CompilationMode.SpeedProfile extends androidx.benchmark.macro.CompilationMode {
- ctor @Deprecated public CompilationMode.SpeedProfile(optional int warmupIterations);
- method @Deprecated public int getWarmupIterations();
- property public final int warmupIterations;
- }
-
public final class CompilationModeKt {
method @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) public static boolean isSupportedWithVmSettings(androidx.benchmark.macro.CompilationMode);
}
diff --git a/benchmark/benchmark-macro/src/androidTest/java/androidx/benchmark/macro/CompilationModeTest.kt b/benchmark/benchmark-macro/src/androidTest/java/androidx/benchmark/macro/CompilationModeTest.kt
index 4cafd89..e1f888a 100644
--- a/benchmark/benchmark-macro/src/androidTest/java/androidx/benchmark/macro/CompilationModeTest.kt
+++ b/benchmark/benchmark-macro/src/androidTest/java/androidx/benchmark/macro/CompilationModeTest.kt
@@ -73,13 +73,6 @@
assertEquals("Full", CompilationMode.Full().toString())
}
assertEquals("Interpreted", CompilationMode.Interpreted.toString())
-
- // deprecated
- assertEquals(
- "SpeedProfile(iterations=123)",
- CompilationMode.SpeedProfile(123).toString()
- )
- assertEquals("Speed", CompilationMode.Speed.toString())
}
@Test
@@ -92,10 +85,6 @@
assertTrue(CompilationMode.Full().isSupportedWithVmSettings())
}
assertFalse(CompilationMode.Interpreted.isSupportedWithVmSettings())
-
- // deprecated
- assertTrue(CompilationMode.SpeedProfile().isSupportedWithVmSettings())
- assertTrue(CompilationMode.Speed.isSupportedWithVmSettings())
}
@Test
@@ -108,9 +97,5 @@
assertFalse(CompilationMode.Full().isSupportedWithVmSettings())
}
assertTrue(CompilationMode.Interpreted.isSupportedWithVmSettings())
-
- // deprecated
- assertFalse(CompilationMode.SpeedProfile().isSupportedWithVmSettings())
- assertFalse(CompilationMode.Speed.isSupportedWithVmSettings())
}
}
diff --git a/benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/CompilationMode.kt b/benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/CompilationMode.kt
index bca9891..c5dc779 100644
--- a/benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/CompilationMode.kt
+++ b/benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/CompilationMode.kt
@@ -256,78 +256,6 @@
}
/**
- * Partial pre-compilation, based on configurable number of profiling iterations.
- *
- * The compilation itself is performed with `cmd package compile -f -m speed-profile <package>`
- */
- @Deprecated(
- message = "Use CompilationMode.Partial to partially pre-compile the target app",
- replaceWith = ReplaceWith(
- expression = "CompilationMode.Partial(baselineProfileMode=" +
- "BaselineProfileMode.Ignore, warmupIterations=warmupIterations)",
- imports = ["androidx.benchmark.macro.BaselineProfileMode"]
- )
- )
- class SpeedProfile(
- val warmupIterations: Int = 3
- ) : CompilationMode() {
- override fun toString(): String = "SpeedProfile(iterations=$warmupIterations)"
-
- override fun compileImpl(packageName: String, warmupBlock: () -> Unit) {
- if (Build.VERSION.SDK_INT >= 24) {
- Partial(BaselineProfileMode.Disable, warmupIterations).compileImpl(
- packageName,
- warmupBlock
- )
- }
- // Noop on older versions: this is compat behavior with previous library releases
- }
- }
-
- /**
- * Partial pre-compilation based on bundled baseline profile.
- *
- * Note: this mode is only supported for APKs that have the profileinstaller library
- * included, and have been built by AGP 7.0+ to package the baseline profile in the APK.
- *
- * The compilation itself is performed with `cmd package compile -f -m speed-profile <package>`
- */
- @Deprecated(
- message = "Use CompilationMode.Partial to partially pre-compile the target app",
- replaceWith = ReplaceWith("CompilationMode.Partial()")
- )
- object BaselineProfile : CompilationMode() {
- override fun toString(): String = "BaselineProfile"
-
- override fun compileImpl(packageName: String, warmupBlock: () -> Unit) {
- if (Build.VERSION.SDK_INT >= 24) {
- Partial(BaselineProfileMode.Require, 0).compileImpl(
- packageName,
- warmupBlock
- )
- }
- // Noop on older versions: this is compat behavior with previous library releases
- }
- }
-
- /**
- * Full ahead-of-time compilation.
- *
- * Equates to `cmd package compile -f -m speed <package>`
- */
- @Deprecated(
- message = "Use CompilationMode.Full to fully compile the target app",
- replaceWith = ReplaceWith("CompilationMode.Full")
- )
- object Speed : CompilationMode() {
- override fun toString(): String = "Speed"
-
- override fun compileImpl(packageName: String, warmupBlock: () -> Unit) {
- Full().compileImpl(packageName, warmupBlock)
- }
- }
-
- /**
* No JIT / pre-compilation, all app code runs on the interpreter.
*
* Note: this mode will only be supported on rooted devices with jit disabled. For this reason,
diff --git a/benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/Macrobenchmark.kt b/benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/Macrobenchmark.kt
index c603bad..9265979 100644
--- a/benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/Macrobenchmark.kt
+++ b/benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/Macrobenchmark.kt
@@ -258,8 +258,7 @@
}
}
- val warmupIterations = @Suppress("DEPRECATION") when (compilationMode) {
- is CompilationMode.SpeedProfile -> compilationMode.warmupIterations
+ val warmupIterations = when (compilationMode) {
is CompilationMode.Partial -> compilationMode.warmupIterations
else -> 0
}
diff --git a/buildSrc-tests/build.gradle b/buildSrc-tests/build.gradle
index bcab956..b767d97 100644
--- a/buildSrc-tests/build.gradle
+++ b/buildSrc-tests/build.gradle
@@ -31,35 +31,18 @@
implementation(project.files(new File(BuildServerConfigurationKt.getRootOutDirectory(project), "buildSrc/public/build/libs/public.jar")))
}
-// Also do style checking of the buildSrc project from within this project too
+// Also do style checking of the buildSrc project from within this project
// We run that from this project so that it doesn't block other projects while it runs
-def ktlintDir = "../buildSrc"
+def ktlintDir = file("../buildSrc")
def subdirs = ["plugins", "private", "public"]
-for (d : subdirs) {
- def f = file("$ktlintDir/$d")
- if (!f.exists()) {
- throw new GradleException("Source dir does not exist: $f")
- }
-}
-def ktlintInputs = project.fileTree(ktlintDir) {
- for (d : subdirs) {
- include("$d/src/**/*.kt")
- }
-}
-def sourceArgs = []
-for (d : subdirs) {
- sourceArgs = sourceArgs + "$d/src/**/*.kt"
-}
tasks["ktlint"].configure({ t ->
- t.inputs.files(ktlintInputs)
- t.workingDir = ktlintDir
- t.args = t.args + sourceArgs
+ t.overrideDirectory = ktlintDir
+ t.overrideSubdirectories = subdirs
})
tasks["ktlintFormat"].configure({ t ->
- t.inputs.files(ktlintInputs)
- t.workingDir = ktlintDir
- t.args = t.args + sourceArgs
+ t.overrideDirectory = ktlintDir
+ t.overrideSubdirectories = subdirs
})
// Broken in AGP 7.0-alpha15 due to b/180408027
diff --git a/buildSrc/private/src/main/kotlin/androidx/build/Ktlint.kt b/buildSrc/private/src/main/kotlin/androidx/build/Ktlint.kt
index 1f02d67..6e5597e 100644
--- a/buildSrc/private/src/main/kotlin/androidx/build/Ktlint.kt
+++ b/buildSrc/private/src/main/kotlin/androidx/build/Ktlint.kt
@@ -16,21 +16,28 @@
package androidx.build
+import androidx.build.logging.TERMINAL_RED
+import androidx.build.logging.TERMINAL_RESET
+import org.gradle.api.DefaultTask
import org.gradle.api.Project
-import org.gradle.api.artifacts.Configuration
import org.gradle.api.artifacts.VersionCatalogsExtension
import org.gradle.api.attributes.Attribute
+import org.gradle.api.file.ConfigurableFileCollection
import org.gradle.api.file.FileTree
import org.gradle.api.tasks.CacheableTask
+import org.gradle.api.tasks.Classpath
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.InputFiles
-import org.gradle.api.tasks.JavaExec
+import org.gradle.api.tasks.Internal
import org.gradle.api.tasks.OutputFile
import org.gradle.api.tasks.PathSensitive
import org.gradle.api.tasks.PathSensitivity
import org.gradle.api.tasks.StopExecutionException
+import org.gradle.api.tasks.TaskAction
import org.gradle.api.tasks.options.Option
+import org.gradle.process.ExecOperations
import java.io.File
+import javax.inject.Inject
val bundlingAttribute: Attribute<String> =
Attribute.of(
@@ -38,15 +45,17 @@
String::class.java
)
-private fun Project.getKtlintConfiguration(): Configuration {
- return configurations.findByName("ktlint") ?: configurations.create("ktlint") {
- val version = project.extensions.getByType(
- VersionCatalogsExtension::class.java
- ).find("libs").get().findVersion("ktlint").get().requiredVersion
- val dependency = dependencies.create("com.pinterest:ktlint:$version")
- it.dependencies.add(dependency)
- it.attributes.attribute(bundlingAttribute, "external")
- }
+private fun Project.getKtlintConfiguration(): ConfigurableFileCollection {
+ return files(
+ configurations.findByName("ktlint") ?: configurations.create("ktlint") {
+ val version = project.extensions.getByType(
+ VersionCatalogsExtension::class.java
+ ).find("libs").get().findVersion("ktlint").get().requiredVersion
+ val dependency = dependencies.create("com.pinterest:ktlint:$version")
+ it.dependencies.add(dependency)
+ it.attributes.attribute(bundlingAttribute, "external")
+ }
+ )
}
private val DisabledRules = listOf(
@@ -58,35 +67,17 @@
"indent",
).joinToString(",")
-private const val excludeTestDataFiles = "**/test-data/**/*.kt"
-private const val excludeExternalFiles = "**/external/**/*.kt"
+private const val ExcludeTestDataFiles = "**/test-data/**/*.kt"
+private const val ExcludeExternalFiles = "**/external/**/*.kt"
+private const val MainClass = "com.pinterest.ktlint.Main"
+private const val InputDir = "src"
+private const val IncludedFiles = "**/*.kt"
fun Project.configureKtlint() {
val outputDir = "${buildDir.relativeTo(projectDir)}/reports/ktlint/"
- val inputDir = "src"
- val includeFiles = "**/*.kt"
- val inputFiles = project.fileTree(
- mutableMapOf(
- "dir" to inputDir, "include" to includeFiles,
- "exclude" to listOf(excludeTestDataFiles, excludeExternalFiles)
- )
- )
- val outputFile = "${outputDir}ktlint-checkstyle-report.xml"
-
val lintProvider = tasks.register("ktlint", KtlintCheckTask::class.java) { task ->
- task.inputFiles = inputFiles
- task.report = File(outputFile)
- task.classpath = getKtlintConfiguration()
- task.args = listOf(
- "--android",
- "--disabled_rules",
- DisabledRules,
- "--reporter=plain",
- "--reporter=checkstyle,output=$outputFile",
- "$inputDir/$includeFiles",
- "!$inputDir/$excludeTestDataFiles",
- "!$inputDir/$excludeExternalFiles"
- )
+ task.report = File("${outputDir}ktlint-checkstyle-report.xml")
+ task.ktlintClasspath.from(getKtlintConfiguration())
}
// afterEvaluate because Gradle's default "check" task doesn't exist yet
@@ -95,48 +86,132 @@
}
addToBuildOnServer(lintProvider)
- val outputFileFormat = "${outputDir}ktlint-format-checkstyle-report.xml"
- tasks.register("ktlintFormat", JavaExec::class.java) { task ->
- task.inputs.files(
- inputFiles.apply {
- setExcludes(listOf(excludeTestDataFiles, excludeExternalFiles))
+ tasks.register("ktlintFormat", KtlintFormatTask::class.java) { task ->
+ task.report = File("${outputDir}ktlint-format-checkstyle-report.xml")
+ task.ktlintClasspath.from(getKtlintConfiguration())
+ }
+}
+
+abstract class BaseKtlintTask : DefaultTask() {
+ @get:Inject
+ abstract val execOperations: ExecOperations
+
+ @get:Classpath
+ abstract val ktlintClasspath: ConfigurableFileCollection
+
+ @[InputFiles PathSensitive(PathSensitivity.RELATIVE)]
+ fun getInputFiles(): FileTree? {
+ val projectDirectory = overrideDirectory
+ val subdirectories = overrideSubdirectories
+ if (projectDirectory == null || subdirectories == null || subdirectories.isEmpty()) {
+ // If we have a valid override, use that as the default fileTree
+ return project.fileTree(
+ mutableMapOf(
+ "dir" to InputDir, "include" to IncludedFiles,
+ "exclude" to listOf(ExcludeTestDataFiles, ExcludeExternalFiles)
+ )
+ )
+ }
+ return project.fileTree(projectDirectory) { tree ->
+ subdirectories.forEach {
+ tree.include("$it/src/**/*.kt")
}
- )
- task.outputs.file(outputFileFormat)
- task.description = "Fix Kotlin code style deviations."
- task.group = "formatting"
- task.classpath = getKtlintConfiguration()
- task.mainClass.set("com.pinterest.ktlint.Main")
- task.args = listOf(
- "--android",
- "-F",
- "--disabled_rules",
- DisabledRules,
- "--reporter=plain",
- "--reporter=checkstyle,output=$outputFileFormat",
- "$inputDir/$includeFiles",
- "!$inputDir/$excludeTestDataFiles",
- "!$inputDir/$excludeExternalFiles"
- )
+ }
+ }
+
+ /**
+ * Allows overriding to use a custom directory instead of default [Project.getProjectDir].
+ */
+ @get:Internal
+ var overrideDirectory: File? = null
+
+ /**
+ * Used together with [overrideDirectory] to specify which specific subdirectories should
+ * be analyzed.
+ */
+ @get:Internal
+ var overrideSubdirectories: List<String>? = null
+
+ @get:OutputFile
+ lateinit var report: File
+
+ protected fun getArgsList(shouldFormat: Boolean): List<String> {
+ val arguments = mutableListOf("--android")
+ if (shouldFormat) arguments.add("-F")
+ arguments.add("--disabled_rules")
+ arguments.add(DisabledRules)
+ arguments.add("--reporter=plain")
+ arguments.add("--reporter=checkstyle,output=$report")
+
+ overrideDirectory?.let {
+ val subdirectories = overrideSubdirectories
+ if (subdirectories == null || subdirectories.isEmpty()) return@let
+ subdirectories.map { arguments.add("$it/$InputDir/$IncludedFiles") }
+ } ?: arguments.add("$InputDir/$IncludedFiles")
+
+ arguments.add("!$InputDir/$ExcludeTestDataFiles")
+ arguments.add("!$InputDir/$ExcludeExternalFiles")
+ return arguments
}
}
@CacheableTask
-open class KtlintCheckTask : JavaExec() {
+abstract class KtlintCheckTask : BaseKtlintTask() {
init {
description = "Check Kotlin code style."
group = "Verification"
- mainClass.set("com.pinterest.ktlint.Main")
}
- @get:[InputFiles PathSensitive(PathSensitivity.RELATIVE)]
- lateinit var inputFiles: FileTree
+ @get:Internal
+ val projectPath: String = project.path
- @get:OutputFile
- lateinit var report: File
+ @TaskAction
+ fun runCheck() {
+ val result = execOperations.javaexec { javaExecSpec ->
+ javaExecSpec.mainClass.set(MainClass)
+ javaExecSpec.classpath = ktlintClasspath
+ javaExecSpec.args = getArgsList(shouldFormat = false)
+ overrideDirectory?.let { javaExecSpec.workingDir = it }
+ javaExecSpec.isIgnoreExitValue = true
+ }
+ if (result.exitValue != 0) {
+ println("""
+
+ ********************************************************************************
+ ${TERMINAL_RED}You can attempt to automatically fix these issues with:
+ ./gradlew $projectPath:ktlintFormat$TERMINAL_RESET
+ ********************************************************************************
+ """.trimIndent()
+ )
+ result.assertNormalExitValue()
+ }
+ }
}
-open class KtlintCheckFileTask : JavaExec() {
+@CacheableTask
+abstract class KtlintFormatTask : BaseKtlintTask() {
+ init {
+ description = "Fix Kotlin code style deviations."
+ group = "formatting"
+ }
+
+ @TaskAction
+ fun runFormat() {
+ execOperations.javaexec { javaExecSpec ->
+ javaExecSpec.mainClass.set(MainClass)
+ javaExecSpec.classpath = ktlintClasspath
+ javaExecSpec.args = getArgsList(shouldFormat = true)
+ overrideDirectory?.let { javaExecSpec.workingDir = it }
+ }
+ }
+}
+
+abstract class KtlintCheckFileTask : DefaultTask() {
+ init {
+ description = "Check Kotlin code style."
+ group = "Verification"
+ }
+
@get:Input
@set:Option(
option = "file",
@@ -152,40 +227,54 @@
"fixed automatically they will be printed to stderr)"
)
var format = false
-}
-fun Project.configureKtlintCheckFile() {
- tasks.register("ktlintCheckFile", KtlintCheckFileTask::class.java) { task ->
- task.description = "Check Kotlin code style."
- task.group = "Verification"
- task.classpath = getKtlintConfiguration()
- task.mainClass.set("com.pinterest.ktlint.Main")
+ @get:Inject
+ abstract val execOperations: ExecOperations
- task.doFirst {
- if (task.files.isEmpty()) {
- throw StopExecutionException()
- }
- val kotlinFiles = task.files.filter { file ->
- file.endsWith(".kt") || file.endsWith(".ktx")
- }
- if (kotlinFiles.isNullOrEmpty()) {
- throw StopExecutionException()
- }
+ @get:Classpath
+ abstract val ktlintClasspath: ConfigurableFileCollection
+
+ @TaskAction
+ fun runKtlint() {
+ if (files.isEmpty()) throw StopExecutionException()
+ val kotlinFiles = files.filter { file ->
+ file.endsWith(".kt") || file.endsWith(".ktx")
+ }
+ if (kotlinFiles.isEmpty()) throw StopExecutionException()
+ val result = execOperations.javaexec { javaExecSpec ->
+ javaExecSpec.mainClass.set(MainClass)
+ javaExecSpec.classpath = ktlintClasspath
val args = mutableListOf(
"--android",
"--disabled_rules",
DisabledRules
)
args.addAll(kotlinFiles)
- if (task.format) {
- args.add("-F")
- }
+ if (format) args.add("-F")
// Note: These exclusions must come after the inputs.
- args.add("!$excludeTestDataFiles")
- args.add("!$excludeExternalFiles")
+ args.add("!$ExcludeTestDataFiles")
+ args.add("!$ExcludeExternalFiles")
- task.args = args
+ javaExecSpec.args = args
+ javaExecSpec.isIgnoreExitValue = true
}
+ if (result.exitValue != 0) {
+ println("""
+
+ ********************************************************************************
+ ${TERMINAL_RED}You can attempt to automatically fix these issues with:
+ ./gradlew :ktlintCheckFile --format ${kotlinFiles.joinToString { "--file $it" }}$TERMINAL_RESET
+ ********************************************************************************
+ """.trimIndent()
+ )
+ result.assertNormalExitValue()
+ }
+ }
+}
+
+fun Project.configureKtlintCheckFile() {
+ tasks.register("ktlintCheckFile", KtlintCheckFileTask::class.java) { task ->
+ task.ktlintClasspath.from(getKtlintConfiguration())
}
}
diff --git a/buildSrc/public/src/main/kotlin/androidx/build/LibraryVersions.kt b/buildSrc/public/src/main/kotlin/androidx/build/LibraryVersions.kt
index bf911bf..9d451b8 100644
--- a/buildSrc/public/src/main/kotlin/androidx/build/LibraryVersions.kt
+++ b/buildSrc/public/src/main/kotlin/androidx/build/LibraryVersions.kt
@@ -29,21 +29,19 @@
val ARCH_CORE = Version("2.2.0-alpha01")
val ASYNCLAYOUTINFLATER = Version("1.1.0-alpha01")
val AUTOFILL = Version("1.2.0-beta02")
- val BENCHMARK = Version("1.1.0-alpha14")
+ val BENCHMARK = Version("1.1.0-beta02")
val BIOMETRIC = Version("1.2.0-alpha05")
val BROWSER = Version("1.5.0-alpha01")
val BUILDSRC_TESTS = Version("1.0.0-alpha01")
- val CAMERA = Version("1.1.0-alpha13")
- val CAMERA_EXTENSIONS = Version("1.0.0-alpha33")
+ val CAMERA = Version("1.1.0-beta01")
val CAMERA_PIPE = Version("1.0.0-alpha01")
- val CAMERA_VIEW = Version("1.0.0-alpha33")
val CARDVIEW = Version("1.1.0-alpha01")
- val CAR_APP = Version("1.2.0-alpha03")
+ val CAR_APP = Version("1.2.0-beta02")
val COLLECTION = Version("1.3.0-alpha01")
val COLLECTION2 = Version("1.3.0-alpha01")
val CONTENTPAGER = Version("1.1.0-alpha01")
- val COMPOSE_MATERIAL3 = Version(System.getenv("COMPOSE_CUSTOM_VERSION") ?: "1.0.0-alpha03")
- val COMPOSE = Version(System.getenv("COMPOSE_CUSTOM_VERSION") ?: "1.2.0-alpha01")
+ val COMPOSE_MATERIAL3 = Version(System.getenv("COMPOSE_CUSTOM_VERSION") ?: "1.0.0-alpha04")
+ val COMPOSE = Version(System.getenv("COMPOSE_CUSTOM_VERSION") ?: "1.2.0-alpha02")
val COORDINATORLAYOUT = Version("1.3.0-alpha01")
val CORE = Version("1.8.0-alpha03")
val CORE_ANIMATION = Version("1.0.0-alpha03")
@@ -53,7 +51,7 @@
val CORE_PERFORMANCE = Version("1.0.0-alpha02")
val CORE_REMOTEVIEWS = Version("1.0.0-alpha02")
val CORE_ROLE = Version("1.2.0-alpha01")
- val CORE_SPLASHSCREEN = Version("1.0.0-alpha03")
+ val CORE_SPLASHSCREEN = Version("1.0.0-beta01")
val CURSORADAPTER = Version("1.1.0-alpha01")
val CUSTOMVIEW = Version("1.2.0-alpha01")
val DATASTORE = Version("1.1.0-alpha01")
@@ -136,17 +134,17 @@
val VIEWPAGER = Version("1.1.0-alpha02")
val VIEWPAGER2 = Version("1.1.0-beta02")
val WEAR = Version("1.3.0-alpha02")
- val WEAR_COMPOSE = Version("1.0.0-alpha14")
+ val WEAR_COMPOSE = Version("1.0.0-alpha15")
val WEAR_INPUT = Version("1.2.0-alpha03")
val WEAR_INPUT_TESTING = WEAR_INPUT
val WEAR_ONGOING = Version("1.1.0-alpha01")
val WEAR_PHONE_INTERACTIONS = Version("1.1.0-alpha03")
val WEAR_REMOTE_INTERACTIONS = Version("1.1.0-alpha01")
val WEAR_TILES = Version("1.1.0-alpha01")
- val WEAR_WATCHFACE = Version("1.1.0-alpha02")
+ val WEAR_WATCHFACE = Version("1.1.0-alpha03")
val WEBKIT = Version("1.5.0-alpha01")
val WINDOW = Version("1.1.0-alpha01")
val WINDOW_EXTENSIONS = Version("1.1.0-alpha01")
val WINDOW_SIDECAR = Version("1.0.0-rc01")
- val WORK = Version("2.8.0-alpha01")
+ val WORK = Version("2.8.0-alpha02")
}
diff --git a/camera/camera-camera2-pipe-integration/src/main/java/androidx/camera/camera2/pipe/integration/impl/UseCaseCameraRequestControl.kt b/camera/camera-camera2-pipe-integration/src/main/java/androidx/camera/camera2/pipe/integration/impl/UseCaseCameraRequestControl.kt
index db1c197..7cc4354 100644
--- a/camera/camera-camera2-pipe-integration/src/main/java/androidx/camera/camera2/pipe/integration/impl/UseCaseCameraRequestControl.kt
+++ b/camera/camera-camera2-pipe-integration/src/main/java/androidx/camera/camera2/pipe/integration/impl/UseCaseCameraRequestControl.kt
@@ -356,7 +356,7 @@
if (aeMode != null || afMode != null || awbMode != null) {
graph.acquireSession().use {
it.update3A(aeMode = aeMode, afMode = afMode, awbMode = awbMode)
- }.join()
+ }
}
}
diff --git a/camera/camera-camera2/api/1.1.0-beta01.txt b/camera/camera-camera2/api/1.1.0-beta01.txt
new file mode 100644
index 0000000..1459b2c
--- /dev/null
+++ b/camera/camera-camera2/api/1.1.0-beta01.txt
@@ -0,0 +1,9 @@
+// Signature format: 4.0
+package androidx.camera.camera2 {
+
+ @RequiresApi(21) public final class Camera2Config {
+ method public static androidx.camera.core.CameraXConfig defaultConfig();
+ }
+
+}
+
diff --git a/camera/camera-camera2/api/public_plus_experimental_1.1.0-beta01.txt b/camera/camera-camera2/api/public_plus_experimental_1.1.0-beta01.txt
new file mode 100644
index 0000000..583ba10
--- /dev/null
+++ b/camera/camera-camera2/api/public_plus_experimental_1.1.0-beta01.txt
@@ -0,0 +1,53 @@
+// Signature format: 4.0
+package androidx.camera.camera2 {
+
+ @RequiresApi(21) public final class Camera2Config {
+ method public static androidx.camera.core.CameraXConfig defaultConfig();
+ }
+
+}
+
+package androidx.camera.camera2.interop {
+
+ @RequiresApi(21) @androidx.camera.camera2.interop.ExperimentalCamera2Interop public final class Camera2CameraControl {
+ method public com.google.common.util.concurrent.ListenableFuture<java.lang.Void!> addCaptureRequestOptions(androidx.camera.camera2.interop.CaptureRequestOptions);
+ method public com.google.common.util.concurrent.ListenableFuture<java.lang.Void!> clearCaptureRequestOptions();
+ method public static androidx.camera.camera2.interop.Camera2CameraControl from(androidx.camera.core.CameraControl);
+ method public androidx.camera.camera2.interop.CaptureRequestOptions getCaptureRequestOptions();
+ method public com.google.common.util.concurrent.ListenableFuture<java.lang.Void!> setCaptureRequestOptions(androidx.camera.camera2.interop.CaptureRequestOptions);
+ }
+
+ @RequiresApi(21) @androidx.camera.camera2.interop.ExperimentalCamera2Interop public final class Camera2CameraInfo {
+ method public static androidx.camera.camera2.interop.Camera2CameraInfo from(androidx.camera.core.CameraInfo);
+ method public <T> T? getCameraCharacteristic(android.hardware.camera2.CameraCharacteristics.Key<T!>);
+ method public String getCameraId();
+ }
+
+ @RequiresApi(21) @androidx.camera.camera2.interop.ExperimentalCamera2Interop public final class Camera2Interop {
+ }
+
+ @RequiresApi(21) public static final class Camera2Interop.Extender<T> {
+ ctor public Camera2Interop.Extender(androidx.camera.core.ExtendableBuilder<T!>);
+ method public <ValueT> androidx.camera.camera2.interop.Camera2Interop.Extender<T!> setCaptureRequestOption(android.hardware.camera2.CaptureRequest.Key<ValueT!>, ValueT);
+ method public androidx.camera.camera2.interop.Camera2Interop.Extender<T!> setDeviceStateCallback(android.hardware.camera2.CameraDevice.StateCallback);
+ method public androidx.camera.camera2.interop.Camera2Interop.Extender<T!> setSessionCaptureCallback(android.hardware.camera2.CameraCaptureSession.CaptureCallback);
+ method public androidx.camera.camera2.interop.Camera2Interop.Extender<T!> setSessionStateCallback(android.hardware.camera2.CameraCaptureSession.StateCallback);
+ }
+
+ @RequiresApi(21) @androidx.camera.camera2.interop.ExperimentalCamera2Interop public class CaptureRequestOptions {
+ ctor public CaptureRequestOptions(androidx.camera.core.impl.Config);
+ method public <ValueT> ValueT? getCaptureRequestOption(android.hardware.camera2.CaptureRequest.Key<ValueT!>);
+ }
+
+ @RequiresApi(21) public static final class CaptureRequestOptions.Builder implements androidx.camera.core.ExtendableBuilder<androidx.camera.camera2.interop.CaptureRequestOptions> {
+ ctor public CaptureRequestOptions.Builder();
+ method public androidx.camera.camera2.interop.CaptureRequestOptions build();
+ method public <ValueT> androidx.camera.camera2.interop.CaptureRequestOptions.Builder clearCaptureRequestOption(android.hardware.camera2.CaptureRequest.Key<ValueT!>);
+ method public <ValueT> androidx.camera.camera2.interop.CaptureRequestOptions.Builder setCaptureRequestOption(android.hardware.camera2.CaptureRequest.Key<ValueT!>, ValueT);
+ }
+
+ @RequiresOptIn @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) public @interface ExperimentalCamera2Interop {
+ }
+
+}
+
diff --git a/wear/watchface/watchface-complications-data-core/api/res-current.txt b/camera/camera-camera2/api/res-1.1.0-beta01.txt
similarity index 100%
copy from wear/watchface/watchface-complications-data-core/api/res-current.txt
copy to camera/camera-camera2/api/res-1.1.0-beta01.txt
diff --git a/camera/camera-camera2/api/restricted_1.1.0-beta01.txt b/camera/camera-camera2/api/restricted_1.1.0-beta01.txt
new file mode 100644
index 0000000..1459b2c
--- /dev/null
+++ b/camera/camera-camera2/api/restricted_1.1.0-beta01.txt
@@ -0,0 +1,9 @@
+// Signature format: 4.0
+package androidx.camera.camera2 {
+
+ @RequiresApi(21) public final class Camera2Config {
+ method public static androidx.camera.core.CameraXConfig defaultConfig();
+ }
+
+}
+
diff --git a/camera/camera-camera2/src/androidTest/java/androidx/camera/camera2/internal/Camera2CameraImplCameraReopenTest.java b/camera/camera-camera2/src/androidTest/java/androidx/camera/camera2/internal/Camera2CameraImplCameraReopenTest.java
index fd9488c..ebdbda0 100644
--- a/camera/camera-camera2/src/androidTest/java/androidx/camera/camera2/internal/Camera2CameraImplCameraReopenTest.java
+++ b/camera/camera-camera2/src/androidTest/java/androidx/camera/camera2/internal/Camera2CameraImplCameraReopenTest.java
@@ -386,11 +386,10 @@
.notifyOnError(CameraDevice.StateCallback.ERROR_CAMERA_DEVICE);
});
- // Override camera availability to false so that we can verify if camera is not opened
- // again. We must override after camera closed otherwise camera will change availability
- // to true.
- cameraManagerImpl.getDeviceStateCallback().runWhenOnClosed(
- () -> mCamera2CameraImpl.getCameraAvailability().onCameraUnavailable(mCameraId));
+ // Make camera unavailable after onClosed so that we can verify if camera is not opened
+ // again. For ERROR_CAMERA_DEVICE, it should not reopen the camera if the camera is
+ // not available.
+ cameraManagerImpl.getDeviceStateCallback().runWhenOnClosed(() -> openAnotherCamera());
// 2nd camera open should not happen
assertThat(cameraOpenSemaphore.tryAcquire(1, WAIT_FOR_CAMERA_OPEN_TIMEOUT_MS,
diff --git a/camera/camera-core/api/1.1.0-beta01.txt b/camera/camera-core/api/1.1.0-beta01.txt
new file mode 100644
index 0000000..75e46de
--- /dev/null
+++ b/camera/camera-core/api/1.1.0-beta01.txt
@@ -0,0 +1,433 @@
+// Signature format: 4.0
+package androidx.camera.core {
+
+ @RequiresApi(21) public class AspectRatio {
+ field public static final int RATIO_16_9 = 1; // 0x1
+ field public static final int RATIO_4_3 = 0; // 0x0
+ }
+
+ @RequiresApi(21) public interface Camera {
+ method public androidx.camera.core.CameraControl getCameraControl();
+ method public androidx.camera.core.CameraInfo getCameraInfo();
+ }
+
+ @RequiresApi(21) public interface CameraControl {
+ method public com.google.common.util.concurrent.ListenableFuture<java.lang.Void!> cancelFocusAndMetering();
+ method public com.google.common.util.concurrent.ListenableFuture<java.lang.Void!> enableTorch(boolean);
+ method public com.google.common.util.concurrent.ListenableFuture<java.lang.Integer!> setExposureCompensationIndex(int);
+ method public com.google.common.util.concurrent.ListenableFuture<java.lang.Void!> setLinearZoom(@FloatRange(from=0.0f, to=1.0f) float);
+ method public com.google.common.util.concurrent.ListenableFuture<java.lang.Void!> setZoomRatio(float);
+ method public com.google.common.util.concurrent.ListenableFuture<androidx.camera.core.FocusMeteringResult!> startFocusAndMetering(androidx.camera.core.FocusMeteringAction);
+ }
+
+ public static final class CameraControl.OperationCanceledException extends java.lang.Exception {
+ }
+
+ @RequiresApi(21) public interface CameraFilter {
+ method public java.util.List<androidx.camera.core.CameraInfo!> filter(java.util.List<androidx.camera.core.CameraInfo!>);
+ }
+
+ @RequiresApi(21) public interface CameraInfo {
+ method public androidx.camera.core.CameraSelector getCameraSelector();
+ method public androidx.lifecycle.LiveData<androidx.camera.core.CameraState!> getCameraState();
+ method public androidx.camera.core.ExposureState getExposureState();
+ method public int getSensorRotationDegrees();
+ method public int getSensorRotationDegrees(int);
+ method public androidx.lifecycle.LiveData<java.lang.Integer!> getTorchState();
+ method public androidx.lifecycle.LiveData<androidx.camera.core.ZoomState!> getZoomState();
+ method public boolean hasFlashUnit();
+ method public default boolean isFocusMeteringSupported(androidx.camera.core.FocusMeteringAction);
+ }
+
+ @RequiresApi(21) public final class CameraInfoUnavailableException extends java.lang.Exception {
+ }
+
+ @RequiresApi(21) public interface CameraProvider {
+ method public java.util.List<androidx.camera.core.CameraInfo!> getAvailableCameraInfos();
+ method public boolean hasCamera(androidx.camera.core.CameraSelector) throws androidx.camera.core.CameraInfoUnavailableException;
+ }
+
+ @RequiresApi(21) public final class CameraSelector {
+ method public java.util.List<androidx.camera.core.CameraInfo!> filter(java.util.List<androidx.camera.core.CameraInfo!>);
+ field public static final androidx.camera.core.CameraSelector DEFAULT_BACK_CAMERA;
+ field public static final androidx.camera.core.CameraSelector DEFAULT_FRONT_CAMERA;
+ field public static final int LENS_FACING_BACK = 1; // 0x1
+ field public static final int LENS_FACING_FRONT = 0; // 0x0
+ }
+
+ public static final class CameraSelector.Builder {
+ ctor public CameraSelector.Builder();
+ method public androidx.camera.core.CameraSelector.Builder addCameraFilter(androidx.camera.core.CameraFilter);
+ method public androidx.camera.core.CameraSelector build();
+ method public androidx.camera.core.CameraSelector.Builder requireLensFacing(int);
+ }
+
+ @RequiresApi(21) @com.google.auto.value.AutoValue public abstract class CameraState {
+ ctor public CameraState();
+ method public static androidx.camera.core.CameraState create(androidx.camera.core.CameraState.Type);
+ method public static androidx.camera.core.CameraState create(androidx.camera.core.CameraState.Type, androidx.camera.core.CameraState.StateError?);
+ method public abstract androidx.camera.core.CameraState.StateError? getError();
+ method public abstract androidx.camera.core.CameraState.Type getType();
+ field public static final int ERROR_CAMERA_DISABLED = 5; // 0x5
+ field public static final int ERROR_CAMERA_FATAL_ERROR = 6; // 0x6
+ field public static final int ERROR_CAMERA_IN_USE = 2; // 0x2
+ field public static final int ERROR_DO_NOT_DISTURB_MODE_ENABLED = 7; // 0x7
+ field public static final int ERROR_MAX_CAMERAS_IN_USE = 1; // 0x1
+ field public static final int ERROR_OTHER_RECOVERABLE_ERROR = 3; // 0x3
+ field public static final int ERROR_STREAM_CONFIG = 4; // 0x4
+ }
+
+ public enum CameraState.ErrorType {
+ enum_constant public static final androidx.camera.core.CameraState.ErrorType CRITICAL;
+ enum_constant public static final androidx.camera.core.CameraState.ErrorType RECOVERABLE;
+ }
+
+ @com.google.auto.value.AutoValue public abstract static class CameraState.StateError {
+ ctor public CameraState.StateError();
+ method public static androidx.camera.core.CameraState.StateError create(int);
+ method public static androidx.camera.core.CameraState.StateError create(int, Throwable?);
+ method public abstract Throwable? getCause();
+ method public abstract int getCode();
+ method public androidx.camera.core.CameraState.ErrorType getType();
+ }
+
+ public enum CameraState.Type {
+ enum_constant public static final androidx.camera.core.CameraState.Type CLOSED;
+ enum_constant public static final androidx.camera.core.CameraState.Type CLOSING;
+ enum_constant public static final androidx.camera.core.CameraState.Type OPEN;
+ enum_constant public static final androidx.camera.core.CameraState.Type OPENING;
+ enum_constant public static final androidx.camera.core.CameraState.Type PENDING_OPEN;
+ }
+
+ @RequiresApi(21) public class CameraUnavailableException extends java.lang.Exception {
+ ctor public CameraUnavailableException(int);
+ ctor public CameraUnavailableException(int, String?);
+ ctor public CameraUnavailableException(int, String?, Throwable?);
+ ctor public CameraUnavailableException(int, Throwable?);
+ method public int getReason();
+ field public static final int CAMERA_DISABLED = 1; // 0x1
+ field public static final int CAMERA_DISCONNECTED = 2; // 0x2
+ field public static final int CAMERA_ERROR = 3; // 0x3
+ field public static final int CAMERA_IN_USE = 4; // 0x4
+ field public static final int CAMERA_MAX_IN_USE = 5; // 0x5
+ field public static final int CAMERA_UNAVAILABLE_DO_NOT_DISTURB = 6; // 0x6
+ field public static final int CAMERA_UNKNOWN_ERROR = 0; // 0x0
+ }
+
+ @RequiresApi(21) public final class CameraXConfig {
+ method public androidx.camera.core.CameraSelector? getAvailableCamerasLimiter(androidx.camera.core.CameraSelector?);
+ method public java.util.concurrent.Executor? getCameraExecutor(java.util.concurrent.Executor?);
+ method public int getMinimumLoggingLevel();
+ method public android.os.Handler? getSchedulerHandler(android.os.Handler?);
+ }
+
+ public static final class CameraXConfig.Builder {
+ method public androidx.camera.core.CameraXConfig build();
+ method public static androidx.camera.core.CameraXConfig.Builder fromConfig(androidx.camera.core.CameraXConfig);
+ method public androidx.camera.core.CameraXConfig.Builder setAvailableCamerasLimiter(androidx.camera.core.CameraSelector);
+ method public androidx.camera.core.CameraXConfig.Builder setCameraExecutor(java.util.concurrent.Executor);
+ method public androidx.camera.core.CameraXConfig.Builder setMinimumLoggingLevel(@IntRange(from=android.util.Log.DEBUG, to=android.util.Log.ERROR) int);
+ method public androidx.camera.core.CameraXConfig.Builder setSchedulerHandler(android.os.Handler);
+ }
+
+ public static interface CameraXConfig.Provider {
+ method public androidx.camera.core.CameraXConfig getCameraXConfig();
+ }
+
+ @RequiresApi(21) public final class DisplayOrientedMeteringPointFactory extends androidx.camera.core.MeteringPointFactory {
+ ctor public DisplayOrientedMeteringPointFactory(android.view.Display, androidx.camera.core.CameraInfo, float, float);
+ }
+
+ @RequiresApi(21) public interface ExposureState {
+ method public int getExposureCompensationIndex();
+ method public android.util.Range<java.lang.Integer!> getExposureCompensationRange();
+ method public android.util.Rational getExposureCompensationStep();
+ method public boolean isExposureCompensationSupported();
+ }
+
+ @RequiresApi(21) public interface ExtendableBuilder<T> {
+ method public T build();
+ }
+
+ @RequiresApi(21) public final class FocusMeteringAction {
+ method public long getAutoCancelDurationInMillis();
+ method public java.util.List<androidx.camera.core.MeteringPoint!> getMeteringPointsAe();
+ method public java.util.List<androidx.camera.core.MeteringPoint!> getMeteringPointsAf();
+ method public java.util.List<androidx.camera.core.MeteringPoint!> getMeteringPointsAwb();
+ method public boolean isAutoCancelEnabled();
+ field public static final int FLAG_AE = 2; // 0x2
+ field public static final int FLAG_AF = 1; // 0x1
+ field public static final int FLAG_AWB = 4; // 0x4
+ }
+
+ public static class FocusMeteringAction.Builder {
+ ctor public FocusMeteringAction.Builder(androidx.camera.core.MeteringPoint);
+ ctor public FocusMeteringAction.Builder(androidx.camera.core.MeteringPoint, int);
+ method public androidx.camera.core.FocusMeteringAction.Builder addPoint(androidx.camera.core.MeteringPoint);
+ method public androidx.camera.core.FocusMeteringAction.Builder addPoint(androidx.camera.core.MeteringPoint, int);
+ method public androidx.camera.core.FocusMeteringAction build();
+ method public androidx.camera.core.FocusMeteringAction.Builder disableAutoCancel();
+ method public androidx.camera.core.FocusMeteringAction.Builder setAutoCancelDuration(@IntRange(from=1) long, java.util.concurrent.TimeUnit);
+ }
+
+ @RequiresApi(21) public final class FocusMeteringResult {
+ method public boolean isFocusSuccessful();
+ }
+
+ @RequiresApi(21) public final class ImageAnalysis extends androidx.camera.core.UseCase {
+ method public void clearAnalyzer();
+ method public int getBackpressureStrategy();
+ method public int getImageQueueDepth();
+ method public int getOutputImageFormat();
+ method public androidx.camera.core.ResolutionInfo? getResolutionInfo();
+ method public int getTargetRotation();
+ method public boolean isOutputImageRotationEnabled();
+ method public void setAnalyzer(java.util.concurrent.Executor, androidx.camera.core.ImageAnalysis.Analyzer);
+ method public void setTargetRotation(int);
+ field public static final int OUTPUT_IMAGE_FORMAT_RGBA_8888 = 2; // 0x2
+ field public static final int OUTPUT_IMAGE_FORMAT_YUV_420_888 = 1; // 0x1
+ field public static final int STRATEGY_BLOCK_PRODUCER = 1; // 0x1
+ field public static final int STRATEGY_KEEP_ONLY_LATEST = 0; // 0x0
+ }
+
+ public static interface ImageAnalysis.Analyzer {
+ method public void analyze(androidx.camera.core.ImageProxy);
+ }
+
+ public static final class ImageAnalysis.Builder implements androidx.camera.core.ExtendableBuilder<androidx.camera.core.ImageAnalysis> {
+ ctor public ImageAnalysis.Builder();
+ method public androidx.camera.core.ImageAnalysis build();
+ method public androidx.camera.core.ImageAnalysis.Builder setBackgroundExecutor(java.util.concurrent.Executor);
+ method public androidx.camera.core.ImageAnalysis.Builder setBackpressureStrategy(int);
+ method public androidx.camera.core.ImageAnalysis.Builder setImageQueueDepth(int);
+ method public androidx.camera.core.ImageAnalysis.Builder setOutputImageFormat(int);
+ method public androidx.camera.core.ImageAnalysis.Builder setOutputImageRotationEnabled(boolean);
+ method public androidx.camera.core.ImageAnalysis.Builder setTargetAspectRatio(int);
+ method public androidx.camera.core.ImageAnalysis.Builder setTargetName(String);
+ method public androidx.camera.core.ImageAnalysis.Builder setTargetResolution(android.util.Size);
+ method public androidx.camera.core.ImageAnalysis.Builder setTargetRotation(int);
+ }
+
+ @RequiresApi(21) public final class ImageCapture extends androidx.camera.core.UseCase {
+ method public int getCaptureMode();
+ method public int getFlashMode();
+ method @IntRange(from=1, to=100) public int getJpegQuality();
+ method public androidx.camera.core.ResolutionInfo? getResolutionInfo();
+ method public int getTargetRotation();
+ method public void setCropAspectRatio(android.util.Rational);
+ method public void setFlashMode(int);
+ method public void setTargetRotation(int);
+ method public void takePicture(java.util.concurrent.Executor, androidx.camera.core.ImageCapture.OnImageCapturedCallback);
+ method public void takePicture(androidx.camera.core.ImageCapture.OutputFileOptions, java.util.concurrent.Executor, androidx.camera.core.ImageCapture.OnImageSavedCallback);
+ field public static final int CAPTURE_MODE_MAXIMIZE_QUALITY = 0; // 0x0
+ field public static final int CAPTURE_MODE_MINIMIZE_LATENCY = 1; // 0x1
+ field public static final int ERROR_CAMERA_CLOSED = 3; // 0x3
+ field public static final int ERROR_CAPTURE_FAILED = 2; // 0x2
+ field public static final int ERROR_FILE_IO = 1; // 0x1
+ field public static final int ERROR_INVALID_CAMERA = 4; // 0x4
+ field public static final int ERROR_UNKNOWN = 0; // 0x0
+ field public static final int FLASH_MODE_AUTO = 0; // 0x0
+ field public static final int FLASH_MODE_OFF = 2; // 0x2
+ field public static final int FLASH_MODE_ON = 1; // 0x1
+ }
+
+ public static final class ImageCapture.Builder implements androidx.camera.core.ExtendableBuilder<androidx.camera.core.ImageCapture> {
+ ctor public ImageCapture.Builder();
+ method public androidx.camera.core.ImageCapture build();
+ method public androidx.camera.core.ImageCapture.Builder setCaptureMode(int);
+ method public androidx.camera.core.ImageCapture.Builder setFlashMode(int);
+ method public androidx.camera.core.ImageCapture.Builder setIoExecutor(java.util.concurrent.Executor);
+ method public androidx.camera.core.ImageCapture.Builder setJpegQuality(@IntRange(from=1, to=100) int);
+ method public androidx.camera.core.ImageCapture.Builder setTargetAspectRatio(int);
+ method public androidx.camera.core.ImageCapture.Builder setTargetName(String);
+ method public androidx.camera.core.ImageCapture.Builder setTargetResolution(android.util.Size);
+ method public androidx.camera.core.ImageCapture.Builder setTargetRotation(int);
+ }
+
+ public static final class ImageCapture.Metadata {
+ ctor public ImageCapture.Metadata();
+ method public android.location.Location? getLocation();
+ method public boolean isReversedHorizontal();
+ method public boolean isReversedVertical();
+ method public void setLocation(android.location.Location?);
+ method public void setReversedHorizontal(boolean);
+ method public void setReversedVertical(boolean);
+ }
+
+ public abstract static class ImageCapture.OnImageCapturedCallback {
+ ctor public ImageCapture.OnImageCapturedCallback();
+ method public void onCaptureSuccess(androidx.camera.core.ImageProxy);
+ method public void onError(androidx.camera.core.ImageCaptureException);
+ }
+
+ public static interface ImageCapture.OnImageSavedCallback {
+ method public void onError(androidx.camera.core.ImageCaptureException);
+ method public void onImageSaved(androidx.camera.core.ImageCapture.OutputFileResults);
+ }
+
+ public static final class ImageCapture.OutputFileOptions {
+ }
+
+ public static final class ImageCapture.OutputFileOptions.Builder {
+ ctor public ImageCapture.OutputFileOptions.Builder(java.io.File);
+ ctor public ImageCapture.OutputFileOptions.Builder(android.content.ContentResolver, android.net.Uri, android.content.ContentValues);
+ ctor public ImageCapture.OutputFileOptions.Builder(java.io.OutputStream);
+ method public androidx.camera.core.ImageCapture.OutputFileOptions build();
+ method public androidx.camera.core.ImageCapture.OutputFileOptions.Builder setMetadata(androidx.camera.core.ImageCapture.Metadata);
+ }
+
+ public static class ImageCapture.OutputFileResults {
+ method public android.net.Uri? getSavedUri();
+ }
+
+ @RequiresApi(21) public class ImageCaptureException extends java.lang.Exception {
+ ctor public ImageCaptureException(int, String, Throwable?);
+ method public int getImageCaptureError();
+ }
+
+ @RequiresApi(21) public interface ImageInfo {
+ method public int getRotationDegrees();
+ method public default android.graphics.Matrix getSensorToBufferTransformMatrix();
+ method public long getTimestamp();
+ }
+
+ @RequiresApi(21) public interface ImageProxy extends java.lang.AutoCloseable {
+ method public void close();
+ method public android.graphics.Rect getCropRect();
+ method public int getFormat();
+ method public int getHeight();
+ method public androidx.camera.core.ImageInfo getImageInfo();
+ method public androidx.camera.core.ImageProxy.PlaneProxy![] getPlanes();
+ method public int getWidth();
+ method public void setCropRect(android.graphics.Rect?);
+ }
+
+ public static interface ImageProxy.PlaneProxy {
+ method public java.nio.ByteBuffer getBuffer();
+ method public int getPixelStride();
+ method public int getRowStride();
+ }
+
+ @RequiresApi(21) public class InitializationException extends java.lang.Exception {
+ ctor public InitializationException(String?);
+ ctor public InitializationException(String?, Throwable?);
+ ctor public InitializationException(Throwable?);
+ }
+
+ @RequiresApi(21) public class MeteringPoint {
+ method public float getSize();
+ }
+
+ @RequiresApi(21) public abstract class MeteringPointFactory {
+ method public final androidx.camera.core.MeteringPoint createPoint(float, float);
+ method public final androidx.camera.core.MeteringPoint createPoint(float, float, float);
+ method public static float getDefaultPointSize();
+ }
+
+ @RequiresApi(21) public final class Preview extends androidx.camera.core.UseCase {
+ method public androidx.camera.core.ResolutionInfo? getResolutionInfo();
+ method public int getTargetRotation();
+ method @UiThread public void setSurfaceProvider(java.util.concurrent.Executor, androidx.camera.core.Preview.SurfaceProvider?);
+ method @UiThread public void setSurfaceProvider(androidx.camera.core.Preview.SurfaceProvider?);
+ method public void setTargetRotation(int);
+ }
+
+ public static final class Preview.Builder implements androidx.camera.core.ExtendableBuilder<androidx.camera.core.Preview> {
+ ctor public Preview.Builder();
+ method public androidx.camera.core.Preview build();
+ method public androidx.camera.core.Preview.Builder setTargetAspectRatio(int);
+ method public androidx.camera.core.Preview.Builder setTargetName(String);
+ method public androidx.camera.core.Preview.Builder setTargetResolution(android.util.Size);
+ method public androidx.camera.core.Preview.Builder setTargetRotation(int);
+ }
+
+ public static interface Preview.SurfaceProvider {
+ method public void onSurfaceRequested(androidx.camera.core.SurfaceRequest);
+ }
+
+ @RequiresApi(21) @com.google.auto.value.AutoValue public abstract class ResolutionInfo {
+ method public abstract android.graphics.Rect getCropRect();
+ method public abstract android.util.Size getResolution();
+ method public abstract int getRotationDegrees();
+ }
+
+ @RequiresApi(21) public class SurfaceOrientedMeteringPointFactory extends androidx.camera.core.MeteringPointFactory {
+ ctor public SurfaceOrientedMeteringPointFactory(float, float);
+ ctor public SurfaceOrientedMeteringPointFactory(float, float, androidx.camera.core.UseCase);
+ }
+
+ @RequiresApi(21) public final class SurfaceRequest {
+ method public void addRequestCancellationListener(java.util.concurrent.Executor, Runnable);
+ method public void clearTransformationInfoListener();
+ method public android.util.Size getResolution();
+ method public void provideSurface(android.view.Surface, java.util.concurrent.Executor, androidx.core.util.Consumer<androidx.camera.core.SurfaceRequest.Result!>);
+ method public void setTransformationInfoListener(java.util.concurrent.Executor, androidx.camera.core.SurfaceRequest.TransformationInfoListener);
+ method public boolean willNotProvideSurface();
+ }
+
+ @com.google.auto.value.AutoValue public abstract static class SurfaceRequest.Result {
+ method public abstract int getResultCode();
+ method public abstract android.view.Surface getSurface();
+ field public static final int RESULT_INVALID_SURFACE = 2; // 0x2
+ field public static final int RESULT_REQUEST_CANCELLED = 1; // 0x1
+ field public static final int RESULT_SURFACE_ALREADY_PROVIDED = 3; // 0x3
+ field public static final int RESULT_SURFACE_USED_SUCCESSFULLY = 0; // 0x0
+ field public static final int RESULT_WILL_NOT_PROVIDE_SURFACE = 4; // 0x4
+ }
+
+ @com.google.auto.value.AutoValue public abstract static class SurfaceRequest.TransformationInfo {
+ method public abstract android.graphics.Rect getCropRect();
+ method public abstract int getRotationDegrees();
+ }
+
+ public static interface SurfaceRequest.TransformationInfoListener {
+ method public void onTransformationInfoUpdate(androidx.camera.core.SurfaceRequest.TransformationInfo);
+ }
+
+ @RequiresApi(21) public class TorchState {
+ field public static final int OFF = 0; // 0x0
+ field public static final int ON = 1; // 0x1
+ }
+
+ @RequiresApi(21) public abstract class UseCase {
+ }
+
+ @RequiresApi(21) public final class UseCaseGroup {
+ method public java.util.List<androidx.camera.core.UseCase!> getUseCases();
+ method public androidx.camera.core.ViewPort? getViewPort();
+ }
+
+ public static final class UseCaseGroup.Builder {
+ ctor public UseCaseGroup.Builder();
+ method public androidx.camera.core.UseCaseGroup.Builder addUseCase(androidx.camera.core.UseCase);
+ method public androidx.camera.core.UseCaseGroup build();
+ method public androidx.camera.core.UseCaseGroup.Builder setViewPort(androidx.camera.core.ViewPort);
+ }
+
+ @RequiresApi(21) public final class ViewPort {
+ method public android.util.Rational getAspectRatio();
+ method public int getLayoutDirection();
+ method public int getRotation();
+ method public int getScaleType();
+ field public static final int FILL_CENTER = 1; // 0x1
+ field public static final int FILL_END = 2; // 0x2
+ field public static final int FILL_START = 0; // 0x0
+ field public static final int FIT = 3; // 0x3
+ }
+
+ public static final class ViewPort.Builder {
+ ctor public ViewPort.Builder(android.util.Rational, int);
+ method public androidx.camera.core.ViewPort build();
+ method public androidx.camera.core.ViewPort.Builder setLayoutDirection(int);
+ method public androidx.camera.core.ViewPort.Builder setScaleType(int);
+ }
+
+ @RequiresApi(21) public interface ZoomState {
+ method public float getLinearZoom();
+ method public float getMaxZoomRatio();
+ method public float getMinZoomRatio();
+ method public float getZoomRatio();
+ }
+
+}
+
diff --git a/camera/camera-core/api/public_plus_experimental_1.1.0-beta01.txt b/camera/camera-core/api/public_plus_experimental_1.1.0-beta01.txt
new file mode 100644
index 0000000..58ca9b7
--- /dev/null
+++ b/camera/camera-core/api/public_plus_experimental_1.1.0-beta01.txt
@@ -0,0 +1,437 @@
+// Signature format: 4.0
+package androidx.camera.core {
+
+ @RequiresApi(21) public class AspectRatio {
+ field public static final int RATIO_16_9 = 1; // 0x1
+ field public static final int RATIO_4_3 = 0; // 0x0
+ }
+
+ @RequiresApi(21) public interface Camera {
+ method public androidx.camera.core.CameraControl getCameraControl();
+ method public androidx.camera.core.CameraInfo getCameraInfo();
+ }
+
+ @RequiresApi(21) public interface CameraControl {
+ method public com.google.common.util.concurrent.ListenableFuture<java.lang.Void!> cancelFocusAndMetering();
+ method public com.google.common.util.concurrent.ListenableFuture<java.lang.Void!> enableTorch(boolean);
+ method public com.google.common.util.concurrent.ListenableFuture<java.lang.Integer!> setExposureCompensationIndex(int);
+ method public com.google.common.util.concurrent.ListenableFuture<java.lang.Void!> setLinearZoom(@FloatRange(from=0.0f, to=1.0f) float);
+ method public com.google.common.util.concurrent.ListenableFuture<java.lang.Void!> setZoomRatio(float);
+ method public com.google.common.util.concurrent.ListenableFuture<androidx.camera.core.FocusMeteringResult!> startFocusAndMetering(androidx.camera.core.FocusMeteringAction);
+ }
+
+ public static final class CameraControl.OperationCanceledException extends java.lang.Exception {
+ }
+
+ @RequiresApi(21) public interface CameraFilter {
+ method public java.util.List<androidx.camera.core.CameraInfo!> filter(java.util.List<androidx.camera.core.CameraInfo!>);
+ }
+
+ @RequiresApi(21) public interface CameraInfo {
+ method public androidx.camera.core.CameraSelector getCameraSelector();
+ method public androidx.lifecycle.LiveData<androidx.camera.core.CameraState!> getCameraState();
+ method public androidx.camera.core.ExposureState getExposureState();
+ method public int getSensorRotationDegrees();
+ method public int getSensorRotationDegrees(int);
+ method public androidx.lifecycle.LiveData<java.lang.Integer!> getTorchState();
+ method public androidx.lifecycle.LiveData<androidx.camera.core.ZoomState!> getZoomState();
+ method public boolean hasFlashUnit();
+ method public default boolean isFocusMeteringSupported(androidx.camera.core.FocusMeteringAction);
+ }
+
+ @RequiresApi(21) public final class CameraInfoUnavailableException extends java.lang.Exception {
+ }
+
+ @RequiresApi(21) public interface CameraProvider {
+ method public java.util.List<androidx.camera.core.CameraInfo!> getAvailableCameraInfos();
+ method public boolean hasCamera(androidx.camera.core.CameraSelector) throws androidx.camera.core.CameraInfoUnavailableException;
+ }
+
+ @RequiresApi(21) public final class CameraSelector {
+ method public java.util.List<androidx.camera.core.CameraInfo!> filter(java.util.List<androidx.camera.core.CameraInfo!>);
+ field public static final androidx.camera.core.CameraSelector DEFAULT_BACK_CAMERA;
+ field public static final androidx.camera.core.CameraSelector DEFAULT_FRONT_CAMERA;
+ field public static final int LENS_FACING_BACK = 1; // 0x1
+ field public static final int LENS_FACING_FRONT = 0; // 0x0
+ }
+
+ public static final class CameraSelector.Builder {
+ ctor public CameraSelector.Builder();
+ method public androidx.camera.core.CameraSelector.Builder addCameraFilter(androidx.camera.core.CameraFilter);
+ method public androidx.camera.core.CameraSelector build();
+ method public androidx.camera.core.CameraSelector.Builder requireLensFacing(int);
+ }
+
+ @RequiresApi(21) @com.google.auto.value.AutoValue public abstract class CameraState {
+ ctor public CameraState();
+ method public static androidx.camera.core.CameraState create(androidx.camera.core.CameraState.Type);
+ method public static androidx.camera.core.CameraState create(androidx.camera.core.CameraState.Type, androidx.camera.core.CameraState.StateError?);
+ method public abstract androidx.camera.core.CameraState.StateError? getError();
+ method public abstract androidx.camera.core.CameraState.Type getType();
+ field public static final int ERROR_CAMERA_DISABLED = 5; // 0x5
+ field public static final int ERROR_CAMERA_FATAL_ERROR = 6; // 0x6
+ field public static final int ERROR_CAMERA_IN_USE = 2; // 0x2
+ field public static final int ERROR_DO_NOT_DISTURB_MODE_ENABLED = 7; // 0x7
+ field public static final int ERROR_MAX_CAMERAS_IN_USE = 1; // 0x1
+ field public static final int ERROR_OTHER_RECOVERABLE_ERROR = 3; // 0x3
+ field public static final int ERROR_STREAM_CONFIG = 4; // 0x4
+ }
+
+ public enum CameraState.ErrorType {
+ enum_constant public static final androidx.camera.core.CameraState.ErrorType CRITICAL;
+ enum_constant public static final androidx.camera.core.CameraState.ErrorType RECOVERABLE;
+ }
+
+ @com.google.auto.value.AutoValue public abstract static class CameraState.StateError {
+ ctor public CameraState.StateError();
+ method public static androidx.camera.core.CameraState.StateError create(int);
+ method public static androidx.camera.core.CameraState.StateError create(int, Throwable?);
+ method public abstract Throwable? getCause();
+ method public abstract int getCode();
+ method public androidx.camera.core.CameraState.ErrorType getType();
+ }
+
+ public enum CameraState.Type {
+ enum_constant public static final androidx.camera.core.CameraState.Type CLOSED;
+ enum_constant public static final androidx.camera.core.CameraState.Type CLOSING;
+ enum_constant public static final androidx.camera.core.CameraState.Type OPEN;
+ enum_constant public static final androidx.camera.core.CameraState.Type OPENING;
+ enum_constant public static final androidx.camera.core.CameraState.Type PENDING_OPEN;
+ }
+
+ @RequiresApi(21) public class CameraUnavailableException extends java.lang.Exception {
+ ctor public CameraUnavailableException(int);
+ ctor public CameraUnavailableException(int, String?);
+ ctor public CameraUnavailableException(int, String?, Throwable?);
+ ctor public CameraUnavailableException(int, Throwable?);
+ method public int getReason();
+ field public static final int CAMERA_DISABLED = 1; // 0x1
+ field public static final int CAMERA_DISCONNECTED = 2; // 0x2
+ field public static final int CAMERA_ERROR = 3; // 0x3
+ field public static final int CAMERA_IN_USE = 4; // 0x4
+ field public static final int CAMERA_MAX_IN_USE = 5; // 0x5
+ field public static final int CAMERA_UNAVAILABLE_DO_NOT_DISTURB = 6; // 0x6
+ field public static final int CAMERA_UNKNOWN_ERROR = 0; // 0x0
+ }
+
+ @RequiresApi(21) public final class CameraXConfig {
+ method public androidx.camera.core.CameraSelector? getAvailableCamerasLimiter(androidx.camera.core.CameraSelector?);
+ method public java.util.concurrent.Executor? getCameraExecutor(java.util.concurrent.Executor?);
+ method public int getMinimumLoggingLevel();
+ method public android.os.Handler? getSchedulerHandler(android.os.Handler?);
+ }
+
+ public static final class CameraXConfig.Builder {
+ method public androidx.camera.core.CameraXConfig build();
+ method public static androidx.camera.core.CameraXConfig.Builder fromConfig(androidx.camera.core.CameraXConfig);
+ method public androidx.camera.core.CameraXConfig.Builder setAvailableCamerasLimiter(androidx.camera.core.CameraSelector);
+ method public androidx.camera.core.CameraXConfig.Builder setCameraExecutor(java.util.concurrent.Executor);
+ method public androidx.camera.core.CameraXConfig.Builder setMinimumLoggingLevel(@IntRange(from=android.util.Log.DEBUG, to=android.util.Log.ERROR) int);
+ method public androidx.camera.core.CameraXConfig.Builder setSchedulerHandler(android.os.Handler);
+ }
+
+ public static interface CameraXConfig.Provider {
+ method public androidx.camera.core.CameraXConfig getCameraXConfig();
+ }
+
+ @RequiresApi(21) public final class DisplayOrientedMeteringPointFactory extends androidx.camera.core.MeteringPointFactory {
+ ctor public DisplayOrientedMeteringPointFactory(android.view.Display, androidx.camera.core.CameraInfo, float, float);
+ }
+
+ @RequiresApi(21) @RequiresOptIn @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) public @interface ExperimentalGetImage {
+ }
+
+ @RequiresApi(21) public interface ExposureState {
+ method public int getExposureCompensationIndex();
+ method public android.util.Range<java.lang.Integer!> getExposureCompensationRange();
+ method public android.util.Rational getExposureCompensationStep();
+ method public boolean isExposureCompensationSupported();
+ }
+
+ @RequiresApi(21) public interface ExtendableBuilder<T> {
+ method public T build();
+ }
+
+ @RequiresApi(21) public final class FocusMeteringAction {
+ method public long getAutoCancelDurationInMillis();
+ method public java.util.List<androidx.camera.core.MeteringPoint!> getMeteringPointsAe();
+ method public java.util.List<androidx.camera.core.MeteringPoint!> getMeteringPointsAf();
+ method public java.util.List<androidx.camera.core.MeteringPoint!> getMeteringPointsAwb();
+ method public boolean isAutoCancelEnabled();
+ field public static final int FLAG_AE = 2; // 0x2
+ field public static final int FLAG_AF = 1; // 0x1
+ field public static final int FLAG_AWB = 4; // 0x4
+ }
+
+ public static class FocusMeteringAction.Builder {
+ ctor public FocusMeteringAction.Builder(androidx.camera.core.MeteringPoint);
+ ctor public FocusMeteringAction.Builder(androidx.camera.core.MeteringPoint, int);
+ method public androidx.camera.core.FocusMeteringAction.Builder addPoint(androidx.camera.core.MeteringPoint);
+ method public androidx.camera.core.FocusMeteringAction.Builder addPoint(androidx.camera.core.MeteringPoint, int);
+ method public androidx.camera.core.FocusMeteringAction build();
+ method public androidx.camera.core.FocusMeteringAction.Builder disableAutoCancel();
+ method public androidx.camera.core.FocusMeteringAction.Builder setAutoCancelDuration(@IntRange(from=1) long, java.util.concurrent.TimeUnit);
+ }
+
+ @RequiresApi(21) public final class FocusMeteringResult {
+ method public boolean isFocusSuccessful();
+ }
+
+ @RequiresApi(21) public final class ImageAnalysis extends androidx.camera.core.UseCase {
+ method public void clearAnalyzer();
+ method public int getBackpressureStrategy();
+ method public int getImageQueueDepth();
+ method public int getOutputImageFormat();
+ method public androidx.camera.core.ResolutionInfo? getResolutionInfo();
+ method public int getTargetRotation();
+ method public boolean isOutputImageRotationEnabled();
+ method public void setAnalyzer(java.util.concurrent.Executor, androidx.camera.core.ImageAnalysis.Analyzer);
+ method public void setTargetRotation(int);
+ field public static final int OUTPUT_IMAGE_FORMAT_RGBA_8888 = 2; // 0x2
+ field public static final int OUTPUT_IMAGE_FORMAT_YUV_420_888 = 1; // 0x1
+ field public static final int STRATEGY_BLOCK_PRODUCER = 1; // 0x1
+ field public static final int STRATEGY_KEEP_ONLY_LATEST = 0; // 0x0
+ }
+
+ public static interface ImageAnalysis.Analyzer {
+ method public void analyze(androidx.camera.core.ImageProxy);
+ }
+
+ public static final class ImageAnalysis.Builder implements androidx.camera.core.ExtendableBuilder<androidx.camera.core.ImageAnalysis> {
+ ctor public ImageAnalysis.Builder();
+ method public androidx.camera.core.ImageAnalysis build();
+ method public androidx.camera.core.ImageAnalysis.Builder setBackgroundExecutor(java.util.concurrent.Executor);
+ method public androidx.camera.core.ImageAnalysis.Builder setBackpressureStrategy(int);
+ method public androidx.camera.core.ImageAnalysis.Builder setImageQueueDepth(int);
+ method public androidx.camera.core.ImageAnalysis.Builder setOutputImageFormat(int);
+ method public androidx.camera.core.ImageAnalysis.Builder setOutputImageRotationEnabled(boolean);
+ method public androidx.camera.core.ImageAnalysis.Builder setTargetAspectRatio(int);
+ method public androidx.camera.core.ImageAnalysis.Builder setTargetName(String);
+ method public androidx.camera.core.ImageAnalysis.Builder setTargetResolution(android.util.Size);
+ method public androidx.camera.core.ImageAnalysis.Builder setTargetRotation(int);
+ }
+
+ @RequiresApi(21) public final class ImageCapture extends androidx.camera.core.UseCase {
+ method public int getCaptureMode();
+ method public int getFlashMode();
+ method @IntRange(from=1, to=100) public int getJpegQuality();
+ method public androidx.camera.core.ResolutionInfo? getResolutionInfo();
+ method public int getTargetRotation();
+ method public void setCropAspectRatio(android.util.Rational);
+ method public void setFlashMode(int);
+ method public void setTargetRotation(int);
+ method public void takePicture(java.util.concurrent.Executor, androidx.camera.core.ImageCapture.OnImageCapturedCallback);
+ method public void takePicture(androidx.camera.core.ImageCapture.OutputFileOptions, java.util.concurrent.Executor, androidx.camera.core.ImageCapture.OnImageSavedCallback);
+ field public static final int CAPTURE_MODE_MAXIMIZE_QUALITY = 0; // 0x0
+ field public static final int CAPTURE_MODE_MINIMIZE_LATENCY = 1; // 0x1
+ field public static final int ERROR_CAMERA_CLOSED = 3; // 0x3
+ field public static final int ERROR_CAPTURE_FAILED = 2; // 0x2
+ field public static final int ERROR_FILE_IO = 1; // 0x1
+ field public static final int ERROR_INVALID_CAMERA = 4; // 0x4
+ field public static final int ERROR_UNKNOWN = 0; // 0x0
+ field public static final int FLASH_MODE_AUTO = 0; // 0x0
+ field public static final int FLASH_MODE_OFF = 2; // 0x2
+ field public static final int FLASH_MODE_ON = 1; // 0x1
+ }
+
+ public static final class ImageCapture.Builder implements androidx.camera.core.ExtendableBuilder<androidx.camera.core.ImageCapture> {
+ ctor public ImageCapture.Builder();
+ method public androidx.camera.core.ImageCapture build();
+ method public androidx.camera.core.ImageCapture.Builder setCaptureMode(int);
+ method public androidx.camera.core.ImageCapture.Builder setFlashMode(int);
+ method public androidx.camera.core.ImageCapture.Builder setIoExecutor(java.util.concurrent.Executor);
+ method public androidx.camera.core.ImageCapture.Builder setJpegQuality(@IntRange(from=1, to=100) int);
+ method public androidx.camera.core.ImageCapture.Builder setTargetAspectRatio(int);
+ method public androidx.camera.core.ImageCapture.Builder setTargetName(String);
+ method public androidx.camera.core.ImageCapture.Builder setTargetResolution(android.util.Size);
+ method public androidx.camera.core.ImageCapture.Builder setTargetRotation(int);
+ }
+
+ public static final class ImageCapture.Metadata {
+ ctor public ImageCapture.Metadata();
+ method public android.location.Location? getLocation();
+ method public boolean isReversedHorizontal();
+ method public boolean isReversedVertical();
+ method public void setLocation(android.location.Location?);
+ method public void setReversedHorizontal(boolean);
+ method public void setReversedVertical(boolean);
+ }
+
+ public abstract static class ImageCapture.OnImageCapturedCallback {
+ ctor public ImageCapture.OnImageCapturedCallback();
+ method public void onCaptureSuccess(androidx.camera.core.ImageProxy);
+ method public void onError(androidx.camera.core.ImageCaptureException);
+ }
+
+ public static interface ImageCapture.OnImageSavedCallback {
+ method public void onError(androidx.camera.core.ImageCaptureException);
+ method public void onImageSaved(androidx.camera.core.ImageCapture.OutputFileResults);
+ }
+
+ public static final class ImageCapture.OutputFileOptions {
+ }
+
+ public static final class ImageCapture.OutputFileOptions.Builder {
+ ctor public ImageCapture.OutputFileOptions.Builder(java.io.File);
+ ctor public ImageCapture.OutputFileOptions.Builder(android.content.ContentResolver, android.net.Uri, android.content.ContentValues);
+ ctor public ImageCapture.OutputFileOptions.Builder(java.io.OutputStream);
+ method public androidx.camera.core.ImageCapture.OutputFileOptions build();
+ method public androidx.camera.core.ImageCapture.OutputFileOptions.Builder setMetadata(androidx.camera.core.ImageCapture.Metadata);
+ }
+
+ public static class ImageCapture.OutputFileResults {
+ method public android.net.Uri? getSavedUri();
+ }
+
+ @RequiresApi(21) public class ImageCaptureException extends java.lang.Exception {
+ ctor public ImageCaptureException(int, String, Throwable?);
+ method public int getImageCaptureError();
+ }
+
+ @RequiresApi(21) public interface ImageInfo {
+ method public int getRotationDegrees();
+ method public default android.graphics.Matrix getSensorToBufferTransformMatrix();
+ method public long getTimestamp();
+ }
+
+ @RequiresApi(21) public interface ImageProxy extends java.lang.AutoCloseable {
+ method public void close();
+ method public android.graphics.Rect getCropRect();
+ method public int getFormat();
+ method public int getHeight();
+ method @androidx.camera.core.ExperimentalGetImage public android.media.Image? getImage();
+ method public androidx.camera.core.ImageInfo getImageInfo();
+ method public androidx.camera.core.ImageProxy.PlaneProxy![] getPlanes();
+ method public int getWidth();
+ method public void setCropRect(android.graphics.Rect?);
+ }
+
+ public static interface ImageProxy.PlaneProxy {
+ method public java.nio.ByteBuffer getBuffer();
+ method public int getPixelStride();
+ method public int getRowStride();
+ }
+
+ @RequiresApi(21) public class InitializationException extends java.lang.Exception {
+ ctor public InitializationException(String?);
+ ctor public InitializationException(String?, Throwable?);
+ ctor public InitializationException(Throwable?);
+ }
+
+ @RequiresApi(21) public class MeteringPoint {
+ method public float getSize();
+ }
+
+ @RequiresApi(21) public abstract class MeteringPointFactory {
+ method public final androidx.camera.core.MeteringPoint createPoint(float, float);
+ method public final androidx.camera.core.MeteringPoint createPoint(float, float, float);
+ method public static float getDefaultPointSize();
+ }
+
+ @RequiresApi(21) public final class Preview extends androidx.camera.core.UseCase {
+ method public androidx.camera.core.ResolutionInfo? getResolutionInfo();
+ method public int getTargetRotation();
+ method @UiThread public void setSurfaceProvider(java.util.concurrent.Executor, androidx.camera.core.Preview.SurfaceProvider?);
+ method @UiThread public void setSurfaceProvider(androidx.camera.core.Preview.SurfaceProvider?);
+ method public void setTargetRotation(int);
+ }
+
+ public static final class Preview.Builder implements androidx.camera.core.ExtendableBuilder<androidx.camera.core.Preview> {
+ ctor public Preview.Builder();
+ method public androidx.camera.core.Preview build();
+ method public androidx.camera.core.Preview.Builder setTargetAspectRatio(int);
+ method public androidx.camera.core.Preview.Builder setTargetName(String);
+ method public androidx.camera.core.Preview.Builder setTargetResolution(android.util.Size);
+ method public androidx.camera.core.Preview.Builder setTargetRotation(int);
+ }
+
+ public static interface Preview.SurfaceProvider {
+ method public void onSurfaceRequested(androidx.camera.core.SurfaceRequest);
+ }
+
+ @RequiresApi(21) @com.google.auto.value.AutoValue public abstract class ResolutionInfo {
+ method public abstract android.graphics.Rect getCropRect();
+ method public abstract android.util.Size getResolution();
+ method public abstract int getRotationDegrees();
+ }
+
+ @RequiresApi(21) public class SurfaceOrientedMeteringPointFactory extends androidx.camera.core.MeteringPointFactory {
+ ctor public SurfaceOrientedMeteringPointFactory(float, float);
+ ctor public SurfaceOrientedMeteringPointFactory(float, float, androidx.camera.core.UseCase);
+ }
+
+ @RequiresApi(21) public final class SurfaceRequest {
+ method public void addRequestCancellationListener(java.util.concurrent.Executor, Runnable);
+ method public void clearTransformationInfoListener();
+ method public android.util.Size getResolution();
+ method public void provideSurface(android.view.Surface, java.util.concurrent.Executor, androidx.core.util.Consumer<androidx.camera.core.SurfaceRequest.Result!>);
+ method public void setTransformationInfoListener(java.util.concurrent.Executor, androidx.camera.core.SurfaceRequest.TransformationInfoListener);
+ method public boolean willNotProvideSurface();
+ }
+
+ @com.google.auto.value.AutoValue public abstract static class SurfaceRequest.Result {
+ method public abstract int getResultCode();
+ method public abstract android.view.Surface getSurface();
+ field public static final int RESULT_INVALID_SURFACE = 2; // 0x2
+ field public static final int RESULT_REQUEST_CANCELLED = 1; // 0x1
+ field public static final int RESULT_SURFACE_ALREADY_PROVIDED = 3; // 0x3
+ field public static final int RESULT_SURFACE_USED_SUCCESSFULLY = 0; // 0x0
+ field public static final int RESULT_WILL_NOT_PROVIDE_SURFACE = 4; // 0x4
+ }
+
+ @com.google.auto.value.AutoValue public abstract static class SurfaceRequest.TransformationInfo {
+ method public abstract android.graphics.Rect getCropRect();
+ method public abstract int getRotationDegrees();
+ }
+
+ public static interface SurfaceRequest.TransformationInfoListener {
+ method public void onTransformationInfoUpdate(androidx.camera.core.SurfaceRequest.TransformationInfo);
+ }
+
+ @RequiresApi(21) public class TorchState {
+ field public static final int OFF = 0; // 0x0
+ field public static final int ON = 1; // 0x1
+ }
+
+ @RequiresApi(21) public abstract class UseCase {
+ }
+
+ @RequiresApi(21) public final class UseCaseGroup {
+ method public java.util.List<androidx.camera.core.UseCase!> getUseCases();
+ method public androidx.camera.core.ViewPort? getViewPort();
+ }
+
+ public static final class UseCaseGroup.Builder {
+ ctor public UseCaseGroup.Builder();
+ method public androidx.camera.core.UseCaseGroup.Builder addUseCase(androidx.camera.core.UseCase);
+ method public androidx.camera.core.UseCaseGroup build();
+ method public androidx.camera.core.UseCaseGroup.Builder setViewPort(androidx.camera.core.ViewPort);
+ }
+
+ @RequiresApi(21) public final class ViewPort {
+ method public android.util.Rational getAspectRatio();
+ method public int getLayoutDirection();
+ method public int getRotation();
+ method public int getScaleType();
+ field public static final int FILL_CENTER = 1; // 0x1
+ field public static final int FILL_END = 2; // 0x2
+ field public static final int FILL_START = 0; // 0x0
+ field public static final int FIT = 3; // 0x3
+ }
+
+ public static final class ViewPort.Builder {
+ ctor public ViewPort.Builder(android.util.Rational, int);
+ method public androidx.camera.core.ViewPort build();
+ method public androidx.camera.core.ViewPort.Builder setLayoutDirection(int);
+ method public androidx.camera.core.ViewPort.Builder setScaleType(int);
+ }
+
+ @RequiresApi(21) public interface ZoomState {
+ method public float getLinearZoom();
+ method public float getMaxZoomRatio();
+ method public float getMinZoomRatio();
+ method public float getZoomRatio();
+ }
+
+}
+
diff --git a/wear/watchface/watchface-complications-data-core/api/res-current.txt b/camera/camera-core/api/res-1.1.0-beta01.txt
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/api/res-current.txt
rename to camera/camera-core/api/res-1.1.0-beta01.txt
diff --git a/camera/camera-core/api/restricted_1.1.0-beta01.txt b/camera/camera-core/api/restricted_1.1.0-beta01.txt
new file mode 100644
index 0000000..75e46de
--- /dev/null
+++ b/camera/camera-core/api/restricted_1.1.0-beta01.txt
@@ -0,0 +1,433 @@
+// Signature format: 4.0
+package androidx.camera.core {
+
+ @RequiresApi(21) public class AspectRatio {
+ field public static final int RATIO_16_9 = 1; // 0x1
+ field public static final int RATIO_4_3 = 0; // 0x0
+ }
+
+ @RequiresApi(21) public interface Camera {
+ method public androidx.camera.core.CameraControl getCameraControl();
+ method public androidx.camera.core.CameraInfo getCameraInfo();
+ }
+
+ @RequiresApi(21) public interface CameraControl {
+ method public com.google.common.util.concurrent.ListenableFuture<java.lang.Void!> cancelFocusAndMetering();
+ method public com.google.common.util.concurrent.ListenableFuture<java.lang.Void!> enableTorch(boolean);
+ method public com.google.common.util.concurrent.ListenableFuture<java.lang.Integer!> setExposureCompensationIndex(int);
+ method public com.google.common.util.concurrent.ListenableFuture<java.lang.Void!> setLinearZoom(@FloatRange(from=0.0f, to=1.0f) float);
+ method public com.google.common.util.concurrent.ListenableFuture<java.lang.Void!> setZoomRatio(float);
+ method public com.google.common.util.concurrent.ListenableFuture<androidx.camera.core.FocusMeteringResult!> startFocusAndMetering(androidx.camera.core.FocusMeteringAction);
+ }
+
+ public static final class CameraControl.OperationCanceledException extends java.lang.Exception {
+ }
+
+ @RequiresApi(21) public interface CameraFilter {
+ method public java.util.List<androidx.camera.core.CameraInfo!> filter(java.util.List<androidx.camera.core.CameraInfo!>);
+ }
+
+ @RequiresApi(21) public interface CameraInfo {
+ method public androidx.camera.core.CameraSelector getCameraSelector();
+ method public androidx.lifecycle.LiveData<androidx.camera.core.CameraState!> getCameraState();
+ method public androidx.camera.core.ExposureState getExposureState();
+ method public int getSensorRotationDegrees();
+ method public int getSensorRotationDegrees(int);
+ method public androidx.lifecycle.LiveData<java.lang.Integer!> getTorchState();
+ method public androidx.lifecycle.LiveData<androidx.camera.core.ZoomState!> getZoomState();
+ method public boolean hasFlashUnit();
+ method public default boolean isFocusMeteringSupported(androidx.camera.core.FocusMeteringAction);
+ }
+
+ @RequiresApi(21) public final class CameraInfoUnavailableException extends java.lang.Exception {
+ }
+
+ @RequiresApi(21) public interface CameraProvider {
+ method public java.util.List<androidx.camera.core.CameraInfo!> getAvailableCameraInfos();
+ method public boolean hasCamera(androidx.camera.core.CameraSelector) throws androidx.camera.core.CameraInfoUnavailableException;
+ }
+
+ @RequiresApi(21) public final class CameraSelector {
+ method public java.util.List<androidx.camera.core.CameraInfo!> filter(java.util.List<androidx.camera.core.CameraInfo!>);
+ field public static final androidx.camera.core.CameraSelector DEFAULT_BACK_CAMERA;
+ field public static final androidx.camera.core.CameraSelector DEFAULT_FRONT_CAMERA;
+ field public static final int LENS_FACING_BACK = 1; // 0x1
+ field public static final int LENS_FACING_FRONT = 0; // 0x0
+ }
+
+ public static final class CameraSelector.Builder {
+ ctor public CameraSelector.Builder();
+ method public androidx.camera.core.CameraSelector.Builder addCameraFilter(androidx.camera.core.CameraFilter);
+ method public androidx.camera.core.CameraSelector build();
+ method public androidx.camera.core.CameraSelector.Builder requireLensFacing(int);
+ }
+
+ @RequiresApi(21) @com.google.auto.value.AutoValue public abstract class CameraState {
+ ctor public CameraState();
+ method public static androidx.camera.core.CameraState create(androidx.camera.core.CameraState.Type);
+ method public static androidx.camera.core.CameraState create(androidx.camera.core.CameraState.Type, androidx.camera.core.CameraState.StateError?);
+ method public abstract androidx.camera.core.CameraState.StateError? getError();
+ method public abstract androidx.camera.core.CameraState.Type getType();
+ field public static final int ERROR_CAMERA_DISABLED = 5; // 0x5
+ field public static final int ERROR_CAMERA_FATAL_ERROR = 6; // 0x6
+ field public static final int ERROR_CAMERA_IN_USE = 2; // 0x2
+ field public static final int ERROR_DO_NOT_DISTURB_MODE_ENABLED = 7; // 0x7
+ field public static final int ERROR_MAX_CAMERAS_IN_USE = 1; // 0x1
+ field public static final int ERROR_OTHER_RECOVERABLE_ERROR = 3; // 0x3
+ field public static final int ERROR_STREAM_CONFIG = 4; // 0x4
+ }
+
+ public enum CameraState.ErrorType {
+ enum_constant public static final androidx.camera.core.CameraState.ErrorType CRITICAL;
+ enum_constant public static final androidx.camera.core.CameraState.ErrorType RECOVERABLE;
+ }
+
+ @com.google.auto.value.AutoValue public abstract static class CameraState.StateError {
+ ctor public CameraState.StateError();
+ method public static androidx.camera.core.CameraState.StateError create(int);
+ method public static androidx.camera.core.CameraState.StateError create(int, Throwable?);
+ method public abstract Throwable? getCause();
+ method public abstract int getCode();
+ method public androidx.camera.core.CameraState.ErrorType getType();
+ }
+
+ public enum CameraState.Type {
+ enum_constant public static final androidx.camera.core.CameraState.Type CLOSED;
+ enum_constant public static final androidx.camera.core.CameraState.Type CLOSING;
+ enum_constant public static final androidx.camera.core.CameraState.Type OPEN;
+ enum_constant public static final androidx.camera.core.CameraState.Type OPENING;
+ enum_constant public static final androidx.camera.core.CameraState.Type PENDING_OPEN;
+ }
+
+ @RequiresApi(21) public class CameraUnavailableException extends java.lang.Exception {
+ ctor public CameraUnavailableException(int);
+ ctor public CameraUnavailableException(int, String?);
+ ctor public CameraUnavailableException(int, String?, Throwable?);
+ ctor public CameraUnavailableException(int, Throwable?);
+ method public int getReason();
+ field public static final int CAMERA_DISABLED = 1; // 0x1
+ field public static final int CAMERA_DISCONNECTED = 2; // 0x2
+ field public static final int CAMERA_ERROR = 3; // 0x3
+ field public static final int CAMERA_IN_USE = 4; // 0x4
+ field public static final int CAMERA_MAX_IN_USE = 5; // 0x5
+ field public static final int CAMERA_UNAVAILABLE_DO_NOT_DISTURB = 6; // 0x6
+ field public static final int CAMERA_UNKNOWN_ERROR = 0; // 0x0
+ }
+
+ @RequiresApi(21) public final class CameraXConfig {
+ method public androidx.camera.core.CameraSelector? getAvailableCamerasLimiter(androidx.camera.core.CameraSelector?);
+ method public java.util.concurrent.Executor? getCameraExecutor(java.util.concurrent.Executor?);
+ method public int getMinimumLoggingLevel();
+ method public android.os.Handler? getSchedulerHandler(android.os.Handler?);
+ }
+
+ public static final class CameraXConfig.Builder {
+ method public androidx.camera.core.CameraXConfig build();
+ method public static androidx.camera.core.CameraXConfig.Builder fromConfig(androidx.camera.core.CameraXConfig);
+ method public androidx.camera.core.CameraXConfig.Builder setAvailableCamerasLimiter(androidx.camera.core.CameraSelector);
+ method public androidx.camera.core.CameraXConfig.Builder setCameraExecutor(java.util.concurrent.Executor);
+ method public androidx.camera.core.CameraXConfig.Builder setMinimumLoggingLevel(@IntRange(from=android.util.Log.DEBUG, to=android.util.Log.ERROR) int);
+ method public androidx.camera.core.CameraXConfig.Builder setSchedulerHandler(android.os.Handler);
+ }
+
+ public static interface CameraXConfig.Provider {
+ method public androidx.camera.core.CameraXConfig getCameraXConfig();
+ }
+
+ @RequiresApi(21) public final class DisplayOrientedMeteringPointFactory extends androidx.camera.core.MeteringPointFactory {
+ ctor public DisplayOrientedMeteringPointFactory(android.view.Display, androidx.camera.core.CameraInfo, float, float);
+ }
+
+ @RequiresApi(21) public interface ExposureState {
+ method public int getExposureCompensationIndex();
+ method public android.util.Range<java.lang.Integer!> getExposureCompensationRange();
+ method public android.util.Rational getExposureCompensationStep();
+ method public boolean isExposureCompensationSupported();
+ }
+
+ @RequiresApi(21) public interface ExtendableBuilder<T> {
+ method public T build();
+ }
+
+ @RequiresApi(21) public final class FocusMeteringAction {
+ method public long getAutoCancelDurationInMillis();
+ method public java.util.List<androidx.camera.core.MeteringPoint!> getMeteringPointsAe();
+ method public java.util.List<androidx.camera.core.MeteringPoint!> getMeteringPointsAf();
+ method public java.util.List<androidx.camera.core.MeteringPoint!> getMeteringPointsAwb();
+ method public boolean isAutoCancelEnabled();
+ field public static final int FLAG_AE = 2; // 0x2
+ field public static final int FLAG_AF = 1; // 0x1
+ field public static final int FLAG_AWB = 4; // 0x4
+ }
+
+ public static class FocusMeteringAction.Builder {
+ ctor public FocusMeteringAction.Builder(androidx.camera.core.MeteringPoint);
+ ctor public FocusMeteringAction.Builder(androidx.camera.core.MeteringPoint, int);
+ method public androidx.camera.core.FocusMeteringAction.Builder addPoint(androidx.camera.core.MeteringPoint);
+ method public androidx.camera.core.FocusMeteringAction.Builder addPoint(androidx.camera.core.MeteringPoint, int);
+ method public androidx.camera.core.FocusMeteringAction build();
+ method public androidx.camera.core.FocusMeteringAction.Builder disableAutoCancel();
+ method public androidx.camera.core.FocusMeteringAction.Builder setAutoCancelDuration(@IntRange(from=1) long, java.util.concurrent.TimeUnit);
+ }
+
+ @RequiresApi(21) public final class FocusMeteringResult {
+ method public boolean isFocusSuccessful();
+ }
+
+ @RequiresApi(21) public final class ImageAnalysis extends androidx.camera.core.UseCase {
+ method public void clearAnalyzer();
+ method public int getBackpressureStrategy();
+ method public int getImageQueueDepth();
+ method public int getOutputImageFormat();
+ method public androidx.camera.core.ResolutionInfo? getResolutionInfo();
+ method public int getTargetRotation();
+ method public boolean isOutputImageRotationEnabled();
+ method public void setAnalyzer(java.util.concurrent.Executor, androidx.camera.core.ImageAnalysis.Analyzer);
+ method public void setTargetRotation(int);
+ field public static final int OUTPUT_IMAGE_FORMAT_RGBA_8888 = 2; // 0x2
+ field public static final int OUTPUT_IMAGE_FORMAT_YUV_420_888 = 1; // 0x1
+ field public static final int STRATEGY_BLOCK_PRODUCER = 1; // 0x1
+ field public static final int STRATEGY_KEEP_ONLY_LATEST = 0; // 0x0
+ }
+
+ public static interface ImageAnalysis.Analyzer {
+ method public void analyze(androidx.camera.core.ImageProxy);
+ }
+
+ public static final class ImageAnalysis.Builder implements androidx.camera.core.ExtendableBuilder<androidx.camera.core.ImageAnalysis> {
+ ctor public ImageAnalysis.Builder();
+ method public androidx.camera.core.ImageAnalysis build();
+ method public androidx.camera.core.ImageAnalysis.Builder setBackgroundExecutor(java.util.concurrent.Executor);
+ method public androidx.camera.core.ImageAnalysis.Builder setBackpressureStrategy(int);
+ method public androidx.camera.core.ImageAnalysis.Builder setImageQueueDepth(int);
+ method public androidx.camera.core.ImageAnalysis.Builder setOutputImageFormat(int);
+ method public androidx.camera.core.ImageAnalysis.Builder setOutputImageRotationEnabled(boolean);
+ method public androidx.camera.core.ImageAnalysis.Builder setTargetAspectRatio(int);
+ method public androidx.camera.core.ImageAnalysis.Builder setTargetName(String);
+ method public androidx.camera.core.ImageAnalysis.Builder setTargetResolution(android.util.Size);
+ method public androidx.camera.core.ImageAnalysis.Builder setTargetRotation(int);
+ }
+
+ @RequiresApi(21) public final class ImageCapture extends androidx.camera.core.UseCase {
+ method public int getCaptureMode();
+ method public int getFlashMode();
+ method @IntRange(from=1, to=100) public int getJpegQuality();
+ method public androidx.camera.core.ResolutionInfo? getResolutionInfo();
+ method public int getTargetRotation();
+ method public void setCropAspectRatio(android.util.Rational);
+ method public void setFlashMode(int);
+ method public void setTargetRotation(int);
+ method public void takePicture(java.util.concurrent.Executor, androidx.camera.core.ImageCapture.OnImageCapturedCallback);
+ method public void takePicture(androidx.camera.core.ImageCapture.OutputFileOptions, java.util.concurrent.Executor, androidx.camera.core.ImageCapture.OnImageSavedCallback);
+ field public static final int CAPTURE_MODE_MAXIMIZE_QUALITY = 0; // 0x0
+ field public static final int CAPTURE_MODE_MINIMIZE_LATENCY = 1; // 0x1
+ field public static final int ERROR_CAMERA_CLOSED = 3; // 0x3
+ field public static final int ERROR_CAPTURE_FAILED = 2; // 0x2
+ field public static final int ERROR_FILE_IO = 1; // 0x1
+ field public static final int ERROR_INVALID_CAMERA = 4; // 0x4
+ field public static final int ERROR_UNKNOWN = 0; // 0x0
+ field public static final int FLASH_MODE_AUTO = 0; // 0x0
+ field public static final int FLASH_MODE_OFF = 2; // 0x2
+ field public static final int FLASH_MODE_ON = 1; // 0x1
+ }
+
+ public static final class ImageCapture.Builder implements androidx.camera.core.ExtendableBuilder<androidx.camera.core.ImageCapture> {
+ ctor public ImageCapture.Builder();
+ method public androidx.camera.core.ImageCapture build();
+ method public androidx.camera.core.ImageCapture.Builder setCaptureMode(int);
+ method public androidx.camera.core.ImageCapture.Builder setFlashMode(int);
+ method public androidx.camera.core.ImageCapture.Builder setIoExecutor(java.util.concurrent.Executor);
+ method public androidx.camera.core.ImageCapture.Builder setJpegQuality(@IntRange(from=1, to=100) int);
+ method public androidx.camera.core.ImageCapture.Builder setTargetAspectRatio(int);
+ method public androidx.camera.core.ImageCapture.Builder setTargetName(String);
+ method public androidx.camera.core.ImageCapture.Builder setTargetResolution(android.util.Size);
+ method public androidx.camera.core.ImageCapture.Builder setTargetRotation(int);
+ }
+
+ public static final class ImageCapture.Metadata {
+ ctor public ImageCapture.Metadata();
+ method public android.location.Location? getLocation();
+ method public boolean isReversedHorizontal();
+ method public boolean isReversedVertical();
+ method public void setLocation(android.location.Location?);
+ method public void setReversedHorizontal(boolean);
+ method public void setReversedVertical(boolean);
+ }
+
+ public abstract static class ImageCapture.OnImageCapturedCallback {
+ ctor public ImageCapture.OnImageCapturedCallback();
+ method public void onCaptureSuccess(androidx.camera.core.ImageProxy);
+ method public void onError(androidx.camera.core.ImageCaptureException);
+ }
+
+ public static interface ImageCapture.OnImageSavedCallback {
+ method public void onError(androidx.camera.core.ImageCaptureException);
+ method public void onImageSaved(androidx.camera.core.ImageCapture.OutputFileResults);
+ }
+
+ public static final class ImageCapture.OutputFileOptions {
+ }
+
+ public static final class ImageCapture.OutputFileOptions.Builder {
+ ctor public ImageCapture.OutputFileOptions.Builder(java.io.File);
+ ctor public ImageCapture.OutputFileOptions.Builder(android.content.ContentResolver, android.net.Uri, android.content.ContentValues);
+ ctor public ImageCapture.OutputFileOptions.Builder(java.io.OutputStream);
+ method public androidx.camera.core.ImageCapture.OutputFileOptions build();
+ method public androidx.camera.core.ImageCapture.OutputFileOptions.Builder setMetadata(androidx.camera.core.ImageCapture.Metadata);
+ }
+
+ public static class ImageCapture.OutputFileResults {
+ method public android.net.Uri? getSavedUri();
+ }
+
+ @RequiresApi(21) public class ImageCaptureException extends java.lang.Exception {
+ ctor public ImageCaptureException(int, String, Throwable?);
+ method public int getImageCaptureError();
+ }
+
+ @RequiresApi(21) public interface ImageInfo {
+ method public int getRotationDegrees();
+ method public default android.graphics.Matrix getSensorToBufferTransformMatrix();
+ method public long getTimestamp();
+ }
+
+ @RequiresApi(21) public interface ImageProxy extends java.lang.AutoCloseable {
+ method public void close();
+ method public android.graphics.Rect getCropRect();
+ method public int getFormat();
+ method public int getHeight();
+ method public androidx.camera.core.ImageInfo getImageInfo();
+ method public androidx.camera.core.ImageProxy.PlaneProxy![] getPlanes();
+ method public int getWidth();
+ method public void setCropRect(android.graphics.Rect?);
+ }
+
+ public static interface ImageProxy.PlaneProxy {
+ method public java.nio.ByteBuffer getBuffer();
+ method public int getPixelStride();
+ method public int getRowStride();
+ }
+
+ @RequiresApi(21) public class InitializationException extends java.lang.Exception {
+ ctor public InitializationException(String?);
+ ctor public InitializationException(String?, Throwable?);
+ ctor public InitializationException(Throwable?);
+ }
+
+ @RequiresApi(21) public class MeteringPoint {
+ method public float getSize();
+ }
+
+ @RequiresApi(21) public abstract class MeteringPointFactory {
+ method public final androidx.camera.core.MeteringPoint createPoint(float, float);
+ method public final androidx.camera.core.MeteringPoint createPoint(float, float, float);
+ method public static float getDefaultPointSize();
+ }
+
+ @RequiresApi(21) public final class Preview extends androidx.camera.core.UseCase {
+ method public androidx.camera.core.ResolutionInfo? getResolutionInfo();
+ method public int getTargetRotation();
+ method @UiThread public void setSurfaceProvider(java.util.concurrent.Executor, androidx.camera.core.Preview.SurfaceProvider?);
+ method @UiThread public void setSurfaceProvider(androidx.camera.core.Preview.SurfaceProvider?);
+ method public void setTargetRotation(int);
+ }
+
+ public static final class Preview.Builder implements androidx.camera.core.ExtendableBuilder<androidx.camera.core.Preview> {
+ ctor public Preview.Builder();
+ method public androidx.camera.core.Preview build();
+ method public androidx.camera.core.Preview.Builder setTargetAspectRatio(int);
+ method public androidx.camera.core.Preview.Builder setTargetName(String);
+ method public androidx.camera.core.Preview.Builder setTargetResolution(android.util.Size);
+ method public androidx.camera.core.Preview.Builder setTargetRotation(int);
+ }
+
+ public static interface Preview.SurfaceProvider {
+ method public void onSurfaceRequested(androidx.camera.core.SurfaceRequest);
+ }
+
+ @RequiresApi(21) @com.google.auto.value.AutoValue public abstract class ResolutionInfo {
+ method public abstract android.graphics.Rect getCropRect();
+ method public abstract android.util.Size getResolution();
+ method public abstract int getRotationDegrees();
+ }
+
+ @RequiresApi(21) public class SurfaceOrientedMeteringPointFactory extends androidx.camera.core.MeteringPointFactory {
+ ctor public SurfaceOrientedMeteringPointFactory(float, float);
+ ctor public SurfaceOrientedMeteringPointFactory(float, float, androidx.camera.core.UseCase);
+ }
+
+ @RequiresApi(21) public final class SurfaceRequest {
+ method public void addRequestCancellationListener(java.util.concurrent.Executor, Runnable);
+ method public void clearTransformationInfoListener();
+ method public android.util.Size getResolution();
+ method public void provideSurface(android.view.Surface, java.util.concurrent.Executor, androidx.core.util.Consumer<androidx.camera.core.SurfaceRequest.Result!>);
+ method public void setTransformationInfoListener(java.util.concurrent.Executor, androidx.camera.core.SurfaceRequest.TransformationInfoListener);
+ method public boolean willNotProvideSurface();
+ }
+
+ @com.google.auto.value.AutoValue public abstract static class SurfaceRequest.Result {
+ method public abstract int getResultCode();
+ method public abstract android.view.Surface getSurface();
+ field public static final int RESULT_INVALID_SURFACE = 2; // 0x2
+ field public static final int RESULT_REQUEST_CANCELLED = 1; // 0x1
+ field public static final int RESULT_SURFACE_ALREADY_PROVIDED = 3; // 0x3
+ field public static final int RESULT_SURFACE_USED_SUCCESSFULLY = 0; // 0x0
+ field public static final int RESULT_WILL_NOT_PROVIDE_SURFACE = 4; // 0x4
+ }
+
+ @com.google.auto.value.AutoValue public abstract static class SurfaceRequest.TransformationInfo {
+ method public abstract android.graphics.Rect getCropRect();
+ method public abstract int getRotationDegrees();
+ }
+
+ public static interface SurfaceRequest.TransformationInfoListener {
+ method public void onTransformationInfoUpdate(androidx.camera.core.SurfaceRequest.TransformationInfo);
+ }
+
+ @RequiresApi(21) public class TorchState {
+ field public static final int OFF = 0; // 0x0
+ field public static final int ON = 1; // 0x1
+ }
+
+ @RequiresApi(21) public abstract class UseCase {
+ }
+
+ @RequiresApi(21) public final class UseCaseGroup {
+ method public java.util.List<androidx.camera.core.UseCase!> getUseCases();
+ method public androidx.camera.core.ViewPort? getViewPort();
+ }
+
+ public static final class UseCaseGroup.Builder {
+ ctor public UseCaseGroup.Builder();
+ method public androidx.camera.core.UseCaseGroup.Builder addUseCase(androidx.camera.core.UseCase);
+ method public androidx.camera.core.UseCaseGroup build();
+ method public androidx.camera.core.UseCaseGroup.Builder setViewPort(androidx.camera.core.ViewPort);
+ }
+
+ @RequiresApi(21) public final class ViewPort {
+ method public android.util.Rational getAspectRatio();
+ method public int getLayoutDirection();
+ method public int getRotation();
+ method public int getScaleType();
+ field public static final int FILL_CENTER = 1; // 0x1
+ field public static final int FILL_END = 2; // 0x2
+ field public static final int FILL_START = 0; // 0x0
+ field public static final int FIT = 3; // 0x3
+ }
+
+ public static final class ViewPort.Builder {
+ ctor public ViewPort.Builder(android.util.Rational, int);
+ method public androidx.camera.core.ViewPort build();
+ method public androidx.camera.core.ViewPort.Builder setLayoutDirection(int);
+ method public androidx.camera.core.ViewPort.Builder setScaleType(int);
+ }
+
+ @RequiresApi(21) public interface ZoomState {
+ method public float getLinearZoom();
+ method public float getMaxZoomRatio();
+ method public float getMinZoomRatio();
+ method public float getZoomRatio();
+ }
+
+}
+
diff --git a/camera/camera-extensions-stub/build.gradle b/camera/camera-extensions-stub/build.gradle
index 2ed55c3..0b20c9c 100644
--- a/camera/camera-extensions-stub/build.gradle
+++ b/camera/camera-extensions-stub/build.gradle
@@ -30,7 +30,7 @@
name = "Jetpack Camera Library OEM Extensions Stub"
publish = Publish.NONE
mavenGroup = LibraryGroups.CAMERA
- mavenVersion = LibraryVersions.CAMERA_EXTENSIONS
+
inceptionYear = "2019"
description = "OEM Extensions stub implementation for the Jetpack Camera Library, a library providing interfaces" +
" to integrate with OEM specific camera features."
diff --git a/camera/camera-extensions/api/1.1.0-beta01.txt b/camera/camera-extensions/api/1.1.0-beta01.txt
new file mode 100644
index 0000000..0db7e93
--- /dev/null
+++ b/camera/camera-extensions/api/1.1.0-beta01.txt
@@ -0,0 +1,21 @@
+// Signature format: 4.0
+package androidx.camera.extensions {
+
+ @RequiresApi(21) public final class ExtensionMode {
+ field public static final int AUTO = 5; // 0x5
+ field public static final int BOKEH = 1; // 0x1
+ field public static final int FACE_RETOUCH = 4; // 0x4
+ field public static final int HDR = 2; // 0x2
+ field public static final int NIGHT = 3; // 0x3
+ field public static final int NONE = 0; // 0x0
+ }
+
+ @RequiresApi(21) public final class ExtensionsManager {
+ method public android.util.Range<java.lang.Long!>? getEstimatedCaptureLatencyRange(androidx.camera.core.CameraSelector, int);
+ method public androidx.camera.core.CameraSelector getExtensionEnabledCameraSelector(androidx.camera.core.CameraSelector, int);
+ method public static com.google.common.util.concurrent.ListenableFuture<androidx.camera.extensions.ExtensionsManager!> getInstanceAsync(android.content.Context, androidx.camera.core.CameraProvider);
+ method public boolean isExtensionAvailable(androidx.camera.core.CameraSelector, int);
+ }
+
+}
+
diff --git a/camera/camera-extensions/api/public_plus_experimental_1.1.0-beta01.txt b/camera/camera-extensions/api/public_plus_experimental_1.1.0-beta01.txt
new file mode 100644
index 0000000..0db7e93
--- /dev/null
+++ b/camera/camera-extensions/api/public_plus_experimental_1.1.0-beta01.txt
@@ -0,0 +1,21 @@
+// Signature format: 4.0
+package androidx.camera.extensions {
+
+ @RequiresApi(21) public final class ExtensionMode {
+ field public static final int AUTO = 5; // 0x5
+ field public static final int BOKEH = 1; // 0x1
+ field public static final int FACE_RETOUCH = 4; // 0x4
+ field public static final int HDR = 2; // 0x2
+ field public static final int NIGHT = 3; // 0x3
+ field public static final int NONE = 0; // 0x0
+ }
+
+ @RequiresApi(21) public final class ExtensionsManager {
+ method public android.util.Range<java.lang.Long!>? getEstimatedCaptureLatencyRange(androidx.camera.core.CameraSelector, int);
+ method public androidx.camera.core.CameraSelector getExtensionEnabledCameraSelector(androidx.camera.core.CameraSelector, int);
+ method public static com.google.common.util.concurrent.ListenableFuture<androidx.camera.extensions.ExtensionsManager!> getInstanceAsync(android.content.Context, androidx.camera.core.CameraProvider);
+ method public boolean isExtensionAvailable(androidx.camera.core.CameraSelector, int);
+ }
+
+}
+
diff --git a/wear/watchface/watchface-complications-data-core/api/res-current.txt b/camera/camera-extensions/api/res-1.1.0-beta01.txt
similarity index 100%
copy from wear/watchface/watchface-complications-data-core/api/res-current.txt
copy to camera/camera-extensions/api/res-1.1.0-beta01.txt
diff --git a/camera/camera-extensions/api/restricted_1.1.0-beta01.txt b/camera/camera-extensions/api/restricted_1.1.0-beta01.txt
new file mode 100644
index 0000000..0db7e93
--- /dev/null
+++ b/camera/camera-extensions/api/restricted_1.1.0-beta01.txt
@@ -0,0 +1,21 @@
+// Signature format: 4.0
+package androidx.camera.extensions {
+
+ @RequiresApi(21) public final class ExtensionMode {
+ field public static final int AUTO = 5; // 0x5
+ field public static final int BOKEH = 1; // 0x1
+ field public static final int FACE_RETOUCH = 4; // 0x4
+ field public static final int HDR = 2; // 0x2
+ field public static final int NIGHT = 3; // 0x3
+ field public static final int NONE = 0; // 0x0
+ }
+
+ @RequiresApi(21) public final class ExtensionsManager {
+ method public android.util.Range<java.lang.Long!>? getEstimatedCaptureLatencyRange(androidx.camera.core.CameraSelector, int);
+ method public androidx.camera.core.CameraSelector getExtensionEnabledCameraSelector(androidx.camera.core.CameraSelector, int);
+ method public static com.google.common.util.concurrent.ListenableFuture<androidx.camera.extensions.ExtensionsManager!> getInstanceAsync(android.content.Context, androidx.camera.core.CameraProvider);
+ method public boolean isExtensionAvailable(androidx.camera.core.CameraSelector, int);
+ }
+
+}
+
diff --git a/camera/camera-extensions/build.gradle b/camera/camera-extensions/build.gradle
index d16ef32..73b8508 100644
--- a/camera/camera-extensions/build.gradle
+++ b/camera/camera-extensions/build.gradle
@@ -78,7 +78,7 @@
androidx {
name = "Jetpack Camera Library OEM Extensions"
publish = Publish.SNAPSHOT_AND_RELEASE
- mavenVersion = LibraryVersions.CAMERA_EXTENSIONS
+
mavenGroup = LibraryGroups.CAMERA
inceptionYear = "2019"
description = "OEM Extensions for the Jetpack Camera Library, a library providing interfaces" +
diff --git a/camera/camera-lifecycle/api/1.1.0-beta01.txt b/camera/camera-lifecycle/api/1.1.0-beta01.txt
new file mode 100644
index 0000000..7077f67
--- /dev/null
+++ b/camera/camera-lifecycle/api/1.1.0-beta01.txt
@@ -0,0 +1,16 @@
+// Signature format: 4.0
+package androidx.camera.lifecycle {
+
+ @RequiresApi(21) public final class ProcessCameraProvider implements androidx.camera.core.CameraProvider {
+ method @MainThread public androidx.camera.core.Camera bindToLifecycle(androidx.lifecycle.LifecycleOwner, androidx.camera.core.CameraSelector, androidx.camera.core.UseCase!...);
+ method @MainThread public androidx.camera.core.Camera bindToLifecycle(androidx.lifecycle.LifecycleOwner, androidx.camera.core.CameraSelector, androidx.camera.core.UseCaseGroup);
+ method public java.util.List<androidx.camera.core.CameraInfo!> getAvailableCameraInfos();
+ method public static com.google.common.util.concurrent.ListenableFuture<androidx.camera.lifecycle.ProcessCameraProvider!> getInstance(android.content.Context);
+ method public boolean hasCamera(androidx.camera.core.CameraSelector) throws androidx.camera.core.CameraInfoUnavailableException;
+ method public boolean isBound(androidx.camera.core.UseCase);
+ method @MainThread public void unbind(androidx.camera.core.UseCase!...);
+ method @MainThread public void unbindAll();
+ }
+
+}
+
diff --git a/camera/camera-lifecycle/api/public_plus_experimental_1.1.0-beta01.txt b/camera/camera-lifecycle/api/public_plus_experimental_1.1.0-beta01.txt
new file mode 100644
index 0000000..c9ff443
--- /dev/null
+++ b/camera/camera-lifecycle/api/public_plus_experimental_1.1.0-beta01.txt
@@ -0,0 +1,20 @@
+// Signature format: 4.0
+package androidx.camera.lifecycle {
+
+ @RequiresOptIn @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) public @interface ExperimentalCameraProviderConfiguration {
+ }
+
+ @RequiresApi(21) public final class ProcessCameraProvider implements androidx.camera.core.CameraProvider {
+ method @MainThread public androidx.camera.core.Camera bindToLifecycle(androidx.lifecycle.LifecycleOwner, androidx.camera.core.CameraSelector, androidx.camera.core.UseCase!...);
+ method @MainThread public androidx.camera.core.Camera bindToLifecycle(androidx.lifecycle.LifecycleOwner, androidx.camera.core.CameraSelector, androidx.camera.core.UseCaseGroup);
+ method @androidx.camera.lifecycle.ExperimentalCameraProviderConfiguration public static void configureInstance(androidx.camera.core.CameraXConfig);
+ method public java.util.List<androidx.camera.core.CameraInfo!> getAvailableCameraInfos();
+ method public static com.google.common.util.concurrent.ListenableFuture<androidx.camera.lifecycle.ProcessCameraProvider!> getInstance(android.content.Context);
+ method public boolean hasCamera(androidx.camera.core.CameraSelector) throws androidx.camera.core.CameraInfoUnavailableException;
+ method public boolean isBound(androidx.camera.core.UseCase);
+ method @MainThread public void unbind(androidx.camera.core.UseCase!...);
+ method @MainThread public void unbindAll();
+ }
+
+}
+
diff --git a/wear/watchface/watchface-complications-data-core/api/res-current.txt b/camera/camera-lifecycle/api/res-1.1.0-beta01.txt
similarity index 100%
copy from wear/watchface/watchface-complications-data-core/api/res-current.txt
copy to camera/camera-lifecycle/api/res-1.1.0-beta01.txt
diff --git a/camera/camera-lifecycle/api/restricted_1.1.0-beta01.txt b/camera/camera-lifecycle/api/restricted_1.1.0-beta01.txt
new file mode 100644
index 0000000..7077f67
--- /dev/null
+++ b/camera/camera-lifecycle/api/restricted_1.1.0-beta01.txt
@@ -0,0 +1,16 @@
+// Signature format: 4.0
+package androidx.camera.lifecycle {
+
+ @RequiresApi(21) public final class ProcessCameraProvider implements androidx.camera.core.CameraProvider {
+ method @MainThread public androidx.camera.core.Camera bindToLifecycle(androidx.lifecycle.LifecycleOwner, androidx.camera.core.CameraSelector, androidx.camera.core.UseCase!...);
+ method @MainThread public androidx.camera.core.Camera bindToLifecycle(androidx.lifecycle.LifecycleOwner, androidx.camera.core.CameraSelector, androidx.camera.core.UseCaseGroup);
+ method public java.util.List<androidx.camera.core.CameraInfo!> getAvailableCameraInfos();
+ method public static com.google.common.util.concurrent.ListenableFuture<androidx.camera.lifecycle.ProcessCameraProvider!> getInstance(android.content.Context);
+ method public boolean hasCamera(androidx.camera.core.CameraSelector) throws androidx.camera.core.CameraInfoUnavailableException;
+ method public boolean isBound(androidx.camera.core.UseCase);
+ method @MainThread public void unbind(androidx.camera.core.UseCase!...);
+ method @MainThread public void unbindAll();
+ }
+
+}
+
diff --git a/camera/camera-video/api/1.1.0-beta01.txt b/camera/camera-video/api/1.1.0-beta01.txt
new file mode 100644
index 0000000..94e5745
--- /dev/null
+++ b/camera/camera-video/api/1.1.0-beta01.txt
@@ -0,0 +1,166 @@
+// Signature format: 4.0
+package androidx.camera.video {
+
+ @RequiresApi(21) @com.google.auto.value.AutoValue public abstract class AudioStats {
+ method public abstract int getAudioState();
+ method public abstract Throwable? getErrorCause();
+ method public boolean hasAudio();
+ method public boolean hasError();
+ field public static final int AUDIO_STATE_ACTIVE = 0; // 0x0
+ field public static final int AUDIO_STATE_DISABLED = 1; // 0x1
+ field public static final int AUDIO_STATE_ENCODER_ERROR = 3; // 0x3
+ field public static final int AUDIO_STATE_SOURCE_SILENCED = 2; // 0x2
+ }
+
+ @RequiresApi(21) public class FallbackStrategy {
+ method public static androidx.camera.video.FallbackStrategy higherQualityOrLowerThan(androidx.camera.video.Quality);
+ method public static androidx.camera.video.FallbackStrategy higherQualityThan(androidx.camera.video.Quality);
+ method public static androidx.camera.video.FallbackStrategy lowerQualityOrHigherThan(androidx.camera.video.Quality);
+ method public static androidx.camera.video.FallbackStrategy lowerQualityThan(androidx.camera.video.Quality);
+ }
+
+ @RequiresApi(21) public final class FileDescriptorOutputOptions extends androidx.camera.video.OutputOptions {
+ method public long getFileSizeLimit();
+ method public android.os.ParcelFileDescriptor getParcelFileDescriptor();
+ }
+
+ @RequiresApi(21) public static final class FileDescriptorOutputOptions.Builder {
+ ctor public FileDescriptorOutputOptions.Builder(android.os.ParcelFileDescriptor);
+ method public androidx.camera.video.FileDescriptorOutputOptions build();
+ method public androidx.camera.video.FileDescriptorOutputOptions.Builder setFileSizeLimit(long);
+ }
+
+ @RequiresApi(21) public final class FileOutputOptions extends androidx.camera.video.OutputOptions {
+ method public java.io.File getFile();
+ method public long getFileSizeLimit();
+ }
+
+ @RequiresApi(21) public static final class FileOutputOptions.Builder {
+ ctor public FileOutputOptions.Builder(java.io.File);
+ method public androidx.camera.video.FileOutputOptions build();
+ method public androidx.camera.video.FileOutputOptions.Builder setFileSizeLimit(long);
+ }
+
+ @RequiresApi(21) public final class MediaStoreOutputOptions extends androidx.camera.video.OutputOptions {
+ method public android.net.Uri getCollectionUri();
+ method public android.content.ContentResolver getContentResolver();
+ method public android.content.ContentValues getContentValues();
+ method public long getFileSizeLimit();
+ field public static final android.content.ContentValues EMPTY_CONTENT_VALUES;
+ }
+
+ public static final class MediaStoreOutputOptions.Builder {
+ ctor public MediaStoreOutputOptions.Builder(android.content.ContentResolver, android.net.Uri);
+ method public androidx.camera.video.MediaStoreOutputOptions build();
+ method public androidx.camera.video.MediaStoreOutputOptions.Builder setContentValues(android.content.ContentValues);
+ method public androidx.camera.video.MediaStoreOutputOptions.Builder setFileSizeLimit(long);
+ }
+
+ @RequiresApi(21) public abstract class OutputOptions {
+ method public abstract long getFileSizeLimit();
+ field public static final int FILE_SIZE_UNLIMITED = 0; // 0x0
+ }
+
+ @RequiresApi(21) @com.google.auto.value.AutoValue public abstract class OutputResults {
+ ctor public OutputResults();
+ method public abstract android.net.Uri getOutputUri();
+ }
+
+ @RequiresApi(21) public final class PendingRecording {
+ method @CheckResult public androidx.camera.video.Recording start(java.util.concurrent.Executor, androidx.core.util.Consumer<androidx.camera.video.VideoRecordEvent!>);
+ method @RequiresPermission(android.Manifest.permission.RECORD_AUDIO) public androidx.camera.video.PendingRecording withAudioEnabled();
+ }
+
+ @RequiresApi(21) public class Quality {
+ field public static final androidx.camera.video.Quality FHD;
+ field public static final androidx.camera.video.Quality HD;
+ field public static final androidx.camera.video.Quality HIGHEST;
+ field public static final androidx.camera.video.Quality LOWEST;
+ field public static final androidx.camera.video.Quality SD;
+ field public static final androidx.camera.video.Quality UHD;
+ }
+
+ @RequiresApi(21) public final class QualitySelector {
+ method public static androidx.camera.video.QualitySelector from(androidx.camera.video.Quality);
+ method public static androidx.camera.video.QualitySelector from(androidx.camera.video.Quality, androidx.camera.video.FallbackStrategy);
+ method public static androidx.camera.video.QualitySelector fromOrderedList(java.util.List<androidx.camera.video.Quality!>);
+ method public static androidx.camera.video.QualitySelector fromOrderedList(java.util.List<androidx.camera.video.Quality!>, androidx.camera.video.FallbackStrategy);
+ method public static android.util.Size? getResolution(androidx.camera.core.CameraInfo, androidx.camera.video.Quality);
+ method public static java.util.List<androidx.camera.video.Quality!> getSupportedQualities(androidx.camera.core.CameraInfo);
+ method public static boolean isQualitySupported(androidx.camera.core.CameraInfo, androidx.camera.video.Quality);
+ }
+
+ @RequiresApi(21) public final class Recorder implements androidx.camera.video.VideoOutput {
+ method public java.util.concurrent.Executor? getExecutor();
+ method public androidx.camera.video.QualitySelector getQualitySelector();
+ method public void onSurfaceRequested(androidx.camera.core.SurfaceRequest);
+ method public androidx.camera.video.PendingRecording prepareRecording(android.content.Context, androidx.camera.video.FileOutputOptions);
+ method @RequiresApi(26) public androidx.camera.video.PendingRecording prepareRecording(android.content.Context, androidx.camera.video.FileDescriptorOutputOptions);
+ method public androidx.camera.video.PendingRecording prepareRecording(android.content.Context, androidx.camera.video.MediaStoreOutputOptions);
+ field public static final androidx.camera.video.QualitySelector DEFAULT_QUALITY_SELECTOR;
+ }
+
+ @RequiresApi(21) public static final class Recorder.Builder {
+ ctor public Recorder.Builder();
+ method public androidx.camera.video.Recorder build();
+ method public androidx.camera.video.Recorder.Builder setExecutor(java.util.concurrent.Executor);
+ method public androidx.camera.video.Recorder.Builder setQualitySelector(androidx.camera.video.QualitySelector);
+ }
+
+ @RequiresApi(21) public final class Recording implements java.lang.AutoCloseable {
+ method public void close();
+ method public void pause();
+ method public void resume();
+ method public void stop();
+ }
+
+ @RequiresApi(21) @com.google.auto.value.AutoValue public abstract class RecordingStats {
+ method public abstract androidx.camera.video.AudioStats getAudioStats();
+ method public abstract long getNumBytesRecorded();
+ method public abstract long getRecordedDurationNanos();
+ }
+
+ @RequiresApi(21) public final class VideoCapture<T extends androidx.camera.video.VideoOutput> extends androidx.camera.core.UseCase {
+ method public T getOutput();
+ method public static <T extends androidx.camera.video.VideoOutput> androidx.camera.video.VideoCapture<T!> withOutput(T);
+ }
+
+ @RequiresApi(21) public interface VideoOutput {
+ method public void onSurfaceRequested(androidx.camera.core.SurfaceRequest);
+ }
+
+ @RequiresApi(21) public abstract class VideoRecordEvent {
+ method public androidx.camera.video.OutputOptions getOutputOptions();
+ method public androidx.camera.video.RecordingStats getRecordingStats();
+ }
+
+ @RequiresApi(21) public static final class VideoRecordEvent.Finalize extends androidx.camera.video.VideoRecordEvent {
+ method public Throwable? getCause();
+ method public int getError();
+ method public androidx.camera.video.OutputResults getOutputResults();
+ method public boolean hasError();
+ field public static final int ERROR_ENCODING_FAILED = 6; // 0x6
+ field public static final int ERROR_FILE_SIZE_LIMIT_REACHED = 2; // 0x2
+ field public static final int ERROR_INSUFFICIENT_STORAGE = 3; // 0x3
+ field public static final int ERROR_INVALID_OUTPUT_OPTIONS = 5; // 0x5
+ field public static final int ERROR_NONE = 0; // 0x0
+ field public static final int ERROR_NO_VALID_DATA = 8; // 0x8
+ field public static final int ERROR_RECORDER_ERROR = 7; // 0x7
+ field public static final int ERROR_SOURCE_INACTIVE = 4; // 0x4
+ field public static final int ERROR_UNKNOWN = 1; // 0x1
+ }
+
+ @RequiresApi(21) public static final class VideoRecordEvent.Pause extends androidx.camera.video.VideoRecordEvent {
+ }
+
+ @RequiresApi(21) public static final class VideoRecordEvent.Resume extends androidx.camera.video.VideoRecordEvent {
+ }
+
+ @RequiresApi(21) public static final class VideoRecordEvent.Start extends androidx.camera.video.VideoRecordEvent {
+ }
+
+ @RequiresApi(21) public static final class VideoRecordEvent.Status extends androidx.camera.video.VideoRecordEvent {
+ }
+
+}
+
diff --git a/camera/camera-video/api/public_plus_experimental_1.1.0-beta01.txt b/camera/camera-video/api/public_plus_experimental_1.1.0-beta01.txt
new file mode 100644
index 0000000..94e5745
--- /dev/null
+++ b/camera/camera-video/api/public_plus_experimental_1.1.0-beta01.txt
@@ -0,0 +1,166 @@
+// Signature format: 4.0
+package androidx.camera.video {
+
+ @RequiresApi(21) @com.google.auto.value.AutoValue public abstract class AudioStats {
+ method public abstract int getAudioState();
+ method public abstract Throwable? getErrorCause();
+ method public boolean hasAudio();
+ method public boolean hasError();
+ field public static final int AUDIO_STATE_ACTIVE = 0; // 0x0
+ field public static final int AUDIO_STATE_DISABLED = 1; // 0x1
+ field public static final int AUDIO_STATE_ENCODER_ERROR = 3; // 0x3
+ field public static final int AUDIO_STATE_SOURCE_SILENCED = 2; // 0x2
+ }
+
+ @RequiresApi(21) public class FallbackStrategy {
+ method public static androidx.camera.video.FallbackStrategy higherQualityOrLowerThan(androidx.camera.video.Quality);
+ method public static androidx.camera.video.FallbackStrategy higherQualityThan(androidx.camera.video.Quality);
+ method public static androidx.camera.video.FallbackStrategy lowerQualityOrHigherThan(androidx.camera.video.Quality);
+ method public static androidx.camera.video.FallbackStrategy lowerQualityThan(androidx.camera.video.Quality);
+ }
+
+ @RequiresApi(21) public final class FileDescriptorOutputOptions extends androidx.camera.video.OutputOptions {
+ method public long getFileSizeLimit();
+ method public android.os.ParcelFileDescriptor getParcelFileDescriptor();
+ }
+
+ @RequiresApi(21) public static final class FileDescriptorOutputOptions.Builder {
+ ctor public FileDescriptorOutputOptions.Builder(android.os.ParcelFileDescriptor);
+ method public androidx.camera.video.FileDescriptorOutputOptions build();
+ method public androidx.camera.video.FileDescriptorOutputOptions.Builder setFileSizeLimit(long);
+ }
+
+ @RequiresApi(21) public final class FileOutputOptions extends androidx.camera.video.OutputOptions {
+ method public java.io.File getFile();
+ method public long getFileSizeLimit();
+ }
+
+ @RequiresApi(21) public static final class FileOutputOptions.Builder {
+ ctor public FileOutputOptions.Builder(java.io.File);
+ method public androidx.camera.video.FileOutputOptions build();
+ method public androidx.camera.video.FileOutputOptions.Builder setFileSizeLimit(long);
+ }
+
+ @RequiresApi(21) public final class MediaStoreOutputOptions extends androidx.camera.video.OutputOptions {
+ method public android.net.Uri getCollectionUri();
+ method public android.content.ContentResolver getContentResolver();
+ method public android.content.ContentValues getContentValues();
+ method public long getFileSizeLimit();
+ field public static final android.content.ContentValues EMPTY_CONTENT_VALUES;
+ }
+
+ public static final class MediaStoreOutputOptions.Builder {
+ ctor public MediaStoreOutputOptions.Builder(android.content.ContentResolver, android.net.Uri);
+ method public androidx.camera.video.MediaStoreOutputOptions build();
+ method public androidx.camera.video.MediaStoreOutputOptions.Builder setContentValues(android.content.ContentValues);
+ method public androidx.camera.video.MediaStoreOutputOptions.Builder setFileSizeLimit(long);
+ }
+
+ @RequiresApi(21) public abstract class OutputOptions {
+ method public abstract long getFileSizeLimit();
+ field public static final int FILE_SIZE_UNLIMITED = 0; // 0x0
+ }
+
+ @RequiresApi(21) @com.google.auto.value.AutoValue public abstract class OutputResults {
+ ctor public OutputResults();
+ method public abstract android.net.Uri getOutputUri();
+ }
+
+ @RequiresApi(21) public final class PendingRecording {
+ method @CheckResult public androidx.camera.video.Recording start(java.util.concurrent.Executor, androidx.core.util.Consumer<androidx.camera.video.VideoRecordEvent!>);
+ method @RequiresPermission(android.Manifest.permission.RECORD_AUDIO) public androidx.camera.video.PendingRecording withAudioEnabled();
+ }
+
+ @RequiresApi(21) public class Quality {
+ field public static final androidx.camera.video.Quality FHD;
+ field public static final androidx.camera.video.Quality HD;
+ field public static final androidx.camera.video.Quality HIGHEST;
+ field public static final androidx.camera.video.Quality LOWEST;
+ field public static final androidx.camera.video.Quality SD;
+ field public static final androidx.camera.video.Quality UHD;
+ }
+
+ @RequiresApi(21) public final class QualitySelector {
+ method public static androidx.camera.video.QualitySelector from(androidx.camera.video.Quality);
+ method public static androidx.camera.video.QualitySelector from(androidx.camera.video.Quality, androidx.camera.video.FallbackStrategy);
+ method public static androidx.camera.video.QualitySelector fromOrderedList(java.util.List<androidx.camera.video.Quality!>);
+ method public static androidx.camera.video.QualitySelector fromOrderedList(java.util.List<androidx.camera.video.Quality!>, androidx.camera.video.FallbackStrategy);
+ method public static android.util.Size? getResolution(androidx.camera.core.CameraInfo, androidx.camera.video.Quality);
+ method public static java.util.List<androidx.camera.video.Quality!> getSupportedQualities(androidx.camera.core.CameraInfo);
+ method public static boolean isQualitySupported(androidx.camera.core.CameraInfo, androidx.camera.video.Quality);
+ }
+
+ @RequiresApi(21) public final class Recorder implements androidx.camera.video.VideoOutput {
+ method public java.util.concurrent.Executor? getExecutor();
+ method public androidx.camera.video.QualitySelector getQualitySelector();
+ method public void onSurfaceRequested(androidx.camera.core.SurfaceRequest);
+ method public androidx.camera.video.PendingRecording prepareRecording(android.content.Context, androidx.camera.video.FileOutputOptions);
+ method @RequiresApi(26) public androidx.camera.video.PendingRecording prepareRecording(android.content.Context, androidx.camera.video.FileDescriptorOutputOptions);
+ method public androidx.camera.video.PendingRecording prepareRecording(android.content.Context, androidx.camera.video.MediaStoreOutputOptions);
+ field public static final androidx.camera.video.QualitySelector DEFAULT_QUALITY_SELECTOR;
+ }
+
+ @RequiresApi(21) public static final class Recorder.Builder {
+ ctor public Recorder.Builder();
+ method public androidx.camera.video.Recorder build();
+ method public androidx.camera.video.Recorder.Builder setExecutor(java.util.concurrent.Executor);
+ method public androidx.camera.video.Recorder.Builder setQualitySelector(androidx.camera.video.QualitySelector);
+ }
+
+ @RequiresApi(21) public final class Recording implements java.lang.AutoCloseable {
+ method public void close();
+ method public void pause();
+ method public void resume();
+ method public void stop();
+ }
+
+ @RequiresApi(21) @com.google.auto.value.AutoValue public abstract class RecordingStats {
+ method public abstract androidx.camera.video.AudioStats getAudioStats();
+ method public abstract long getNumBytesRecorded();
+ method public abstract long getRecordedDurationNanos();
+ }
+
+ @RequiresApi(21) public final class VideoCapture<T extends androidx.camera.video.VideoOutput> extends androidx.camera.core.UseCase {
+ method public T getOutput();
+ method public static <T extends androidx.camera.video.VideoOutput> androidx.camera.video.VideoCapture<T!> withOutput(T);
+ }
+
+ @RequiresApi(21) public interface VideoOutput {
+ method public void onSurfaceRequested(androidx.camera.core.SurfaceRequest);
+ }
+
+ @RequiresApi(21) public abstract class VideoRecordEvent {
+ method public androidx.camera.video.OutputOptions getOutputOptions();
+ method public androidx.camera.video.RecordingStats getRecordingStats();
+ }
+
+ @RequiresApi(21) public static final class VideoRecordEvent.Finalize extends androidx.camera.video.VideoRecordEvent {
+ method public Throwable? getCause();
+ method public int getError();
+ method public androidx.camera.video.OutputResults getOutputResults();
+ method public boolean hasError();
+ field public static final int ERROR_ENCODING_FAILED = 6; // 0x6
+ field public static final int ERROR_FILE_SIZE_LIMIT_REACHED = 2; // 0x2
+ field public static final int ERROR_INSUFFICIENT_STORAGE = 3; // 0x3
+ field public static final int ERROR_INVALID_OUTPUT_OPTIONS = 5; // 0x5
+ field public static final int ERROR_NONE = 0; // 0x0
+ field public static final int ERROR_NO_VALID_DATA = 8; // 0x8
+ field public static final int ERROR_RECORDER_ERROR = 7; // 0x7
+ field public static final int ERROR_SOURCE_INACTIVE = 4; // 0x4
+ field public static final int ERROR_UNKNOWN = 1; // 0x1
+ }
+
+ @RequiresApi(21) public static final class VideoRecordEvent.Pause extends androidx.camera.video.VideoRecordEvent {
+ }
+
+ @RequiresApi(21) public static final class VideoRecordEvent.Resume extends androidx.camera.video.VideoRecordEvent {
+ }
+
+ @RequiresApi(21) public static final class VideoRecordEvent.Start extends androidx.camera.video.VideoRecordEvent {
+ }
+
+ @RequiresApi(21) public static final class VideoRecordEvent.Status extends androidx.camera.video.VideoRecordEvent {
+ }
+
+}
+
diff --git a/wear/watchface/watchface-complications-data-core/api/res-current.txt b/camera/camera-video/api/res-1.1.0-beta01.txt
similarity index 100%
copy from wear/watchface/watchface-complications-data-core/api/res-current.txt
copy to camera/camera-video/api/res-1.1.0-beta01.txt
diff --git a/camera/camera-video/api/restricted_1.1.0-beta01.txt b/camera/camera-video/api/restricted_1.1.0-beta01.txt
new file mode 100644
index 0000000..83ddacd
--- /dev/null
+++ b/camera/camera-video/api/restricted_1.1.0-beta01.txt
@@ -0,0 +1,169 @@
+// Signature format: 4.0
+package androidx.camera.video {
+
+ @RequiresApi(21) @com.google.auto.value.AutoValue public abstract class AudioStats {
+ method public abstract int getAudioState();
+ method public abstract Throwable? getErrorCause();
+ method public boolean hasAudio();
+ method public boolean hasError();
+ field public static final int AUDIO_STATE_ACTIVE = 0; // 0x0
+ field public static final int AUDIO_STATE_DISABLED = 1; // 0x1
+ field public static final int AUDIO_STATE_ENCODER_ERROR = 3; // 0x3
+ field public static final int AUDIO_STATE_SOURCE_SILENCED = 2; // 0x2
+ }
+
+ @RequiresApi(21) public class FallbackStrategy {
+ method public static androidx.camera.video.FallbackStrategy higherQualityOrLowerThan(androidx.camera.video.Quality);
+ method public static androidx.camera.video.FallbackStrategy higherQualityThan(androidx.camera.video.Quality);
+ method public static androidx.camera.video.FallbackStrategy lowerQualityOrHigherThan(androidx.camera.video.Quality);
+ method public static androidx.camera.video.FallbackStrategy lowerQualityThan(androidx.camera.video.Quality);
+ }
+
+ @RequiresApi(21) public final class FileDescriptorOutputOptions extends androidx.camera.video.OutputOptions {
+ method public long getFileSizeLimit();
+ method public android.os.ParcelFileDescriptor getParcelFileDescriptor();
+ }
+
+ @RequiresApi(21) public static final class FileDescriptorOutputOptions.Builder {
+ ctor public FileDescriptorOutputOptions.Builder(android.os.ParcelFileDescriptor);
+ method public androidx.camera.video.FileDescriptorOutputOptions build();
+ method public androidx.camera.video.FileDescriptorOutputOptions.Builder setFileSizeLimit(long);
+ }
+
+ @RequiresApi(21) public final class FileOutputOptions extends androidx.camera.video.OutputOptions {
+ method public java.io.File getFile();
+ method public long getFileSizeLimit();
+ }
+
+ @RequiresApi(21) public static final class FileOutputOptions.Builder {
+ ctor public FileOutputOptions.Builder(java.io.File);
+ method public androidx.camera.video.FileOutputOptions build();
+ method public androidx.camera.video.FileOutputOptions.Builder setFileSizeLimit(long);
+ }
+
+ @RequiresApi(21) public final class MediaStoreOutputOptions extends androidx.camera.video.OutputOptions {
+ method public android.net.Uri getCollectionUri();
+ method public android.content.ContentResolver getContentResolver();
+ method public android.content.ContentValues getContentValues();
+ method public long getFileSizeLimit();
+ field public static final android.content.ContentValues EMPTY_CONTENT_VALUES;
+ }
+
+ public static final class MediaStoreOutputOptions.Builder {
+ ctor public MediaStoreOutputOptions.Builder(android.content.ContentResolver, android.net.Uri);
+ method public androidx.camera.video.MediaStoreOutputOptions build();
+ method public androidx.camera.video.MediaStoreOutputOptions.Builder setContentValues(android.content.ContentValues);
+ method public androidx.camera.video.MediaStoreOutputOptions.Builder setFileSizeLimit(long);
+ }
+
+ @RequiresApi(21) public abstract class OutputOptions {
+ method public abstract long getFileSizeLimit();
+ field public static final int FILE_SIZE_UNLIMITED = 0; // 0x0
+ }
+
+ @RequiresApi(21) @com.google.auto.value.AutoValue public abstract class OutputResults {
+ ctor public OutputResults();
+ method public abstract android.net.Uri getOutputUri();
+ }
+
+ @RequiresApi(21) public final class PendingRecording {
+ method @CheckResult public androidx.camera.video.Recording start(java.util.concurrent.Executor, androidx.core.util.Consumer<androidx.camera.video.VideoRecordEvent!>);
+ method @RequiresPermission(android.Manifest.permission.RECORD_AUDIO) public androidx.camera.video.PendingRecording withAudioEnabled();
+ }
+
+ @RequiresApi(21) public class Quality {
+ field public static final androidx.camera.video.Quality FHD;
+ field public static final androidx.camera.video.Quality HD;
+ field public static final androidx.camera.video.Quality HIGHEST;
+ field public static final androidx.camera.video.Quality LOWEST;
+ field public static final androidx.camera.video.Quality SD;
+ field public static final androidx.camera.video.Quality UHD;
+ }
+
+ @RequiresApi(21) public final class QualitySelector {
+ method public static androidx.camera.video.QualitySelector from(androidx.camera.video.Quality);
+ method public static androidx.camera.video.QualitySelector from(androidx.camera.video.Quality, androidx.camera.video.FallbackStrategy);
+ method public static androidx.camera.video.QualitySelector fromOrderedList(java.util.List<androidx.camera.video.Quality!>);
+ method public static androidx.camera.video.QualitySelector fromOrderedList(java.util.List<androidx.camera.video.Quality!>, androidx.camera.video.FallbackStrategy);
+ method public static android.util.Size? getResolution(androidx.camera.core.CameraInfo, androidx.camera.video.Quality);
+ method public static java.util.List<androidx.camera.video.Quality!> getSupportedQualities(androidx.camera.core.CameraInfo);
+ method public static boolean isQualitySupported(androidx.camera.core.CameraInfo, androidx.camera.video.Quality);
+ }
+
+ @RequiresApi(21) public final class Recorder implements androidx.camera.video.VideoOutput {
+ method public java.util.concurrent.Executor? getExecutor();
+ method public androidx.camera.video.QualitySelector getQualitySelector();
+ method public void onSurfaceRequested(androidx.camera.core.SurfaceRequest);
+ method public androidx.camera.video.PendingRecording prepareRecording(android.content.Context, androidx.camera.video.FileOutputOptions);
+ method @RequiresApi(26) public androidx.camera.video.PendingRecording prepareRecording(android.content.Context, androidx.camera.video.FileDescriptorOutputOptions);
+ method public androidx.camera.video.PendingRecording prepareRecording(android.content.Context, androidx.camera.video.MediaStoreOutputOptions);
+ field public static final androidx.camera.video.QualitySelector DEFAULT_QUALITY_SELECTOR;
+ }
+
+ @RequiresApi(21) public static final class Recorder.Builder {
+ ctor public Recorder.Builder();
+ method public androidx.camera.video.Recorder build();
+ method public androidx.camera.video.Recorder.Builder setExecutor(java.util.concurrent.Executor);
+ method public androidx.camera.video.Recorder.Builder setQualitySelector(androidx.camera.video.QualitySelector);
+ }
+
+ @RequiresApi(21) public final class Recording implements java.lang.AutoCloseable {
+ method public void close();
+ method public void pause();
+ method public void resume();
+ method public void stop();
+ }
+
+ @RequiresApi(21) @com.google.auto.value.AutoValue public abstract class RecordingStats {
+ method public abstract androidx.camera.video.AudioStats getAudioStats();
+ method public abstract long getNumBytesRecorded();
+ method public abstract long getRecordedDurationNanos();
+ }
+
+ @RequiresApi(21) public final class VideoCapture<T extends androidx.camera.video.VideoOutput> extends androidx.camera.core.UseCase {
+ method @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP) public androidx.camera.core.impl.UseCaseConfig<?>? getDefaultConfig(boolean, androidx.camera.core.impl.UseCaseConfigFactory);
+ method public T getOutput();
+ method @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP) public androidx.camera.core.impl.UseCaseConfig.Builder<?,?,?> getUseCaseConfigBuilder(androidx.camera.core.impl.Config);
+ method @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP) protected android.util.Size onSuggestedResolutionUpdated(android.util.Size);
+ method public static <T extends androidx.camera.video.VideoOutput> androidx.camera.video.VideoCapture<T!> withOutput(T);
+ }
+
+ @RequiresApi(21) public interface VideoOutput {
+ method public void onSurfaceRequested(androidx.camera.core.SurfaceRequest);
+ }
+
+ @RequiresApi(21) public abstract class VideoRecordEvent {
+ method public androidx.camera.video.OutputOptions getOutputOptions();
+ method public androidx.camera.video.RecordingStats getRecordingStats();
+ }
+
+ @RequiresApi(21) public static final class VideoRecordEvent.Finalize extends androidx.camera.video.VideoRecordEvent {
+ method public Throwable? getCause();
+ method public int getError();
+ method public androidx.camera.video.OutputResults getOutputResults();
+ method public boolean hasError();
+ field public static final int ERROR_ENCODING_FAILED = 6; // 0x6
+ field public static final int ERROR_FILE_SIZE_LIMIT_REACHED = 2; // 0x2
+ field public static final int ERROR_INSUFFICIENT_STORAGE = 3; // 0x3
+ field public static final int ERROR_INVALID_OUTPUT_OPTIONS = 5; // 0x5
+ field public static final int ERROR_NONE = 0; // 0x0
+ field public static final int ERROR_NO_VALID_DATA = 8; // 0x8
+ field public static final int ERROR_RECORDER_ERROR = 7; // 0x7
+ field public static final int ERROR_SOURCE_INACTIVE = 4; // 0x4
+ field public static final int ERROR_UNKNOWN = 1; // 0x1
+ }
+
+ @RequiresApi(21) public static final class VideoRecordEvent.Pause extends androidx.camera.video.VideoRecordEvent {
+ }
+
+ @RequiresApi(21) public static final class VideoRecordEvent.Resume extends androidx.camera.video.VideoRecordEvent {
+ }
+
+ @RequiresApi(21) public static final class VideoRecordEvent.Start extends androidx.camera.video.VideoRecordEvent {
+ }
+
+ @RequiresApi(21) public static final class VideoRecordEvent.Status extends androidx.camera.video.VideoRecordEvent {
+ }
+
+}
+
diff --git a/camera/camera-view/api/1.1.0-beta01.txt b/camera/camera-view/api/1.1.0-beta01.txt
new file mode 100644
index 0000000..847583ea
--- /dev/null
+++ b/camera/camera-view/api/1.1.0-beta01.txt
@@ -0,0 +1,118 @@
+// Signature format: 4.0
+package androidx.camera.view {
+
+ @RequiresApi(21) public abstract class CameraController {
+ method @MainThread public void clearImageAnalysisAnalyzer();
+ method @MainThread public com.google.common.util.concurrent.ListenableFuture<java.lang.Void!> enableTorch(boolean);
+ method @MainThread public androidx.camera.core.CameraControl? getCameraControl();
+ method @MainThread public androidx.camera.core.CameraInfo? getCameraInfo();
+ method @MainThread public androidx.camera.core.CameraSelector getCameraSelector();
+ method @MainThread public java.util.concurrent.Executor? getImageAnalysisBackgroundExecutor();
+ method @MainThread public int getImageAnalysisBackpressureStrategy();
+ method @MainThread public int getImageAnalysisImageQueueDepth();
+ method @MainThread public androidx.camera.view.CameraController.OutputSize? getImageAnalysisTargetSize();
+ method @MainThread public int getImageCaptureFlashMode();
+ method @MainThread public java.util.concurrent.Executor? getImageCaptureIoExecutor();
+ method @MainThread public int getImageCaptureMode();
+ method @MainThread public androidx.camera.view.CameraController.OutputSize? getImageCaptureTargetSize();
+ method public com.google.common.util.concurrent.ListenableFuture<java.lang.Void!> getInitializationFuture();
+ method @MainThread public androidx.camera.view.CameraController.OutputSize? getPreviewTargetSize();
+ method @MainThread public androidx.lifecycle.LiveData<java.lang.Integer!> getTapToFocusState();
+ method @MainThread public androidx.lifecycle.LiveData<java.lang.Integer!> getTorchState();
+ method @MainThread public androidx.lifecycle.LiveData<androidx.camera.core.ZoomState!> getZoomState();
+ method @MainThread public boolean hasCamera(androidx.camera.core.CameraSelector);
+ method @MainThread public boolean isImageAnalysisEnabled();
+ method @MainThread public boolean isImageCaptureEnabled();
+ method @MainThread public boolean isPinchToZoomEnabled();
+ method @MainThread public boolean isTapToFocusEnabled();
+ method @MainThread public void setCameraSelector(androidx.camera.core.CameraSelector);
+ method @MainThread public void setEnabledUseCases(int);
+ method @MainThread public void setImageAnalysisAnalyzer(java.util.concurrent.Executor, androidx.camera.core.ImageAnalysis.Analyzer);
+ method @MainThread public void setImageAnalysisBackgroundExecutor(java.util.concurrent.Executor?);
+ method @MainThread public void setImageAnalysisBackpressureStrategy(int);
+ method @MainThread public void setImageAnalysisImageQueueDepth(int);
+ method @MainThread public void setImageAnalysisTargetSize(androidx.camera.view.CameraController.OutputSize?);
+ method @MainThread public void setImageCaptureFlashMode(int);
+ method @MainThread public void setImageCaptureIoExecutor(java.util.concurrent.Executor?);
+ method @MainThread public void setImageCaptureMode(int);
+ method @MainThread public void setImageCaptureTargetSize(androidx.camera.view.CameraController.OutputSize?);
+ method @MainThread public com.google.common.util.concurrent.ListenableFuture<java.lang.Void!> setLinearZoom(@FloatRange(from=0.0f, to=1.0f) float);
+ method @MainThread public void setPinchToZoomEnabled(boolean);
+ method @MainThread public void setPreviewTargetSize(androidx.camera.view.CameraController.OutputSize?);
+ method @MainThread public void setTapToFocusEnabled(boolean);
+ method @MainThread public com.google.common.util.concurrent.ListenableFuture<java.lang.Void!> setZoomRatio(float);
+ method @MainThread public void takePicture(androidx.camera.core.ImageCapture.OutputFileOptions, java.util.concurrent.Executor, androidx.camera.core.ImageCapture.OnImageSavedCallback);
+ method @MainThread public void takePicture(java.util.concurrent.Executor, androidx.camera.core.ImageCapture.OnImageCapturedCallback);
+ field public static final int IMAGE_ANALYSIS = 2; // 0x2
+ field public static final int IMAGE_CAPTURE = 1; // 0x1
+ field public static final int TAP_TO_FOCUS_FAILED = 4; // 0x4
+ field public static final int TAP_TO_FOCUS_FOCUSED = 2; // 0x2
+ field public static final int TAP_TO_FOCUS_NOT_FOCUSED = 3; // 0x3
+ field public static final int TAP_TO_FOCUS_NOT_STARTED = 0; // 0x0
+ field public static final int TAP_TO_FOCUS_STARTED = 1; // 0x1
+ }
+
+ @RequiresApi(21) public static final class CameraController.OutputSize {
+ ctor public CameraController.OutputSize(int);
+ ctor public CameraController.OutputSize(android.util.Size);
+ method public int getAspectRatio();
+ method public android.util.Size? getResolution();
+ field public static final int UNASSIGNED_ASPECT_RATIO = -1; // 0xffffffff
+ }
+
+ @RequiresApi(21) public final class LifecycleCameraController extends androidx.camera.view.CameraController {
+ ctor public LifecycleCameraController(android.content.Context);
+ method @MainThread public void bindToLifecycle(androidx.lifecycle.LifecycleOwner);
+ method @MainThread public void unbind();
+ }
+
+ @RequiresApi(21) public final class PreviewView extends android.widget.FrameLayout {
+ ctor @UiThread public PreviewView(android.content.Context);
+ ctor @UiThread public PreviewView(android.content.Context, android.util.AttributeSet?);
+ ctor @UiThread public PreviewView(android.content.Context, android.util.AttributeSet?, int);
+ ctor @UiThread public PreviewView(android.content.Context, android.util.AttributeSet?, int, int);
+ method @UiThread public android.graphics.Bitmap? getBitmap();
+ method @UiThread public androidx.camera.view.CameraController? getController();
+ method @UiThread public androidx.camera.view.PreviewView.ImplementationMode getImplementationMode();
+ method @UiThread public androidx.camera.core.MeteringPointFactory getMeteringPointFactory();
+ method public androidx.lifecycle.LiveData<androidx.camera.view.PreviewView.StreamState!> getPreviewStreamState();
+ method @UiThread public androidx.camera.view.PreviewView.ScaleType getScaleType();
+ method @UiThread public androidx.camera.core.Preview.SurfaceProvider getSurfaceProvider();
+ method @UiThread public androidx.camera.core.ViewPort? getViewPort();
+ method @UiThread public androidx.camera.core.ViewPort? getViewPort(int);
+ method @UiThread public void setController(androidx.camera.view.CameraController?);
+ method @UiThread public void setImplementationMode(androidx.camera.view.PreviewView.ImplementationMode);
+ method @UiThread public void setScaleType(androidx.camera.view.PreviewView.ScaleType);
+ }
+
+ @RequiresApi(21) public enum PreviewView.ImplementationMode {
+ enum_constant public static final androidx.camera.view.PreviewView.ImplementationMode COMPATIBLE;
+ enum_constant public static final androidx.camera.view.PreviewView.ImplementationMode PERFORMANCE;
+ }
+
+ @RequiresApi(21) public enum PreviewView.ScaleType {
+ enum_constant public static final androidx.camera.view.PreviewView.ScaleType FILL_CENTER;
+ enum_constant public static final androidx.camera.view.PreviewView.ScaleType FILL_END;
+ enum_constant public static final androidx.camera.view.PreviewView.ScaleType FILL_START;
+ enum_constant public static final androidx.camera.view.PreviewView.ScaleType FIT_CENTER;
+ enum_constant public static final androidx.camera.view.PreviewView.ScaleType FIT_END;
+ enum_constant public static final androidx.camera.view.PreviewView.ScaleType FIT_START;
+ }
+
+ public enum PreviewView.StreamState {
+ enum_constant public static final androidx.camera.view.PreviewView.StreamState IDLE;
+ enum_constant public static final androidx.camera.view.PreviewView.StreamState STREAMING;
+ }
+
+ @RequiresApi(21) public final class RotationProvider {
+ ctor public RotationProvider(android.content.Context);
+ method @CheckResult public boolean addListener(java.util.concurrent.Executor, androidx.camera.view.RotationProvider.Listener);
+ method public void removeListener(androidx.camera.view.RotationProvider.Listener);
+ }
+
+ public static interface RotationProvider.Listener {
+ method public void onRotationChanged(int);
+ }
+
+}
+
diff --git a/camera/camera-view/api/public_plus_experimental_1.1.0-beta01.txt b/camera/camera-view/api/public_plus_experimental_1.1.0-beta01.txt
new file mode 100644
index 0000000..51c1a93
--- /dev/null
+++ b/camera/camera-view/api/public_plus_experimental_1.1.0-beta01.txt
@@ -0,0 +1,203 @@
+// Signature format: 4.0
+package androidx.camera.view {
+
+ @RequiresApi(21) public abstract class CameraController {
+ method @MainThread public void clearImageAnalysisAnalyzer();
+ method @MainThread public com.google.common.util.concurrent.ListenableFuture<java.lang.Void!> enableTorch(boolean);
+ method @MainThread public androidx.camera.core.CameraControl? getCameraControl();
+ method @MainThread public androidx.camera.core.CameraInfo? getCameraInfo();
+ method @MainThread public androidx.camera.core.CameraSelector getCameraSelector();
+ method @MainThread public java.util.concurrent.Executor? getImageAnalysisBackgroundExecutor();
+ method @MainThread public int getImageAnalysisBackpressureStrategy();
+ method @MainThread public int getImageAnalysisImageQueueDepth();
+ method @MainThread public androidx.camera.view.CameraController.OutputSize? getImageAnalysisTargetSize();
+ method @MainThread public int getImageCaptureFlashMode();
+ method @MainThread public java.util.concurrent.Executor? getImageCaptureIoExecutor();
+ method @MainThread public int getImageCaptureMode();
+ method @MainThread public androidx.camera.view.CameraController.OutputSize? getImageCaptureTargetSize();
+ method public com.google.common.util.concurrent.ListenableFuture<java.lang.Void!> getInitializationFuture();
+ method @MainThread public androidx.camera.view.CameraController.OutputSize? getPreviewTargetSize();
+ method @MainThread public androidx.lifecycle.LiveData<java.lang.Integer!> getTapToFocusState();
+ method @MainThread public androidx.lifecycle.LiveData<java.lang.Integer!> getTorchState();
+ method @MainThread @androidx.camera.view.video.ExperimentalVideo public androidx.camera.view.CameraController.OutputSize? getVideoCaptureTargetSize();
+ method @MainThread public androidx.lifecycle.LiveData<androidx.camera.core.ZoomState!> getZoomState();
+ method @MainThread public boolean hasCamera(androidx.camera.core.CameraSelector);
+ method @MainThread public boolean isImageAnalysisEnabled();
+ method @MainThread public boolean isImageCaptureEnabled();
+ method @MainThread public boolean isPinchToZoomEnabled();
+ method @MainThread @androidx.camera.view.video.ExperimentalVideo public boolean isRecording();
+ method @MainThread public boolean isTapToFocusEnabled();
+ method @MainThread @androidx.camera.view.video.ExperimentalVideo public boolean isVideoCaptureEnabled();
+ method @MainThread public void setCameraSelector(androidx.camera.core.CameraSelector);
+ method @MainThread public void setEnabledUseCases(int);
+ method @MainThread public void setImageAnalysisAnalyzer(java.util.concurrent.Executor, androidx.camera.core.ImageAnalysis.Analyzer);
+ method @MainThread public void setImageAnalysisBackgroundExecutor(java.util.concurrent.Executor?);
+ method @MainThread public void setImageAnalysisBackpressureStrategy(int);
+ method @MainThread public void setImageAnalysisImageQueueDepth(int);
+ method @MainThread public void setImageAnalysisTargetSize(androidx.camera.view.CameraController.OutputSize?);
+ method @MainThread public void setImageCaptureFlashMode(int);
+ method @MainThread public void setImageCaptureIoExecutor(java.util.concurrent.Executor?);
+ method @MainThread public void setImageCaptureMode(int);
+ method @MainThread public void setImageCaptureTargetSize(androidx.camera.view.CameraController.OutputSize?);
+ method @MainThread public com.google.common.util.concurrent.ListenableFuture<java.lang.Void!> setLinearZoom(@FloatRange(from=0.0f, to=1.0f) float);
+ method @MainThread public void setPinchToZoomEnabled(boolean);
+ method @MainThread public void setPreviewTargetSize(androidx.camera.view.CameraController.OutputSize?);
+ method @MainThread public void setTapToFocusEnabled(boolean);
+ method @MainThread @androidx.camera.view.video.ExperimentalVideo public void setVideoCaptureTargetSize(androidx.camera.view.CameraController.OutputSize?);
+ method @MainThread public com.google.common.util.concurrent.ListenableFuture<java.lang.Void!> setZoomRatio(float);
+ method @MainThread @androidx.camera.view.video.ExperimentalVideo public void startRecording(androidx.camera.view.video.OutputFileOptions, java.util.concurrent.Executor, androidx.camera.view.video.OnVideoSavedCallback);
+ method @MainThread @androidx.camera.view.video.ExperimentalVideo public void stopRecording();
+ method @MainThread public void takePicture(androidx.camera.core.ImageCapture.OutputFileOptions, java.util.concurrent.Executor, androidx.camera.core.ImageCapture.OnImageSavedCallback);
+ method @MainThread public void takePicture(java.util.concurrent.Executor, androidx.camera.core.ImageCapture.OnImageCapturedCallback);
+ field public static final int IMAGE_ANALYSIS = 2; // 0x2
+ field public static final int IMAGE_CAPTURE = 1; // 0x1
+ field public static final int TAP_TO_FOCUS_FAILED = 4; // 0x4
+ field public static final int TAP_TO_FOCUS_FOCUSED = 2; // 0x2
+ field public static final int TAP_TO_FOCUS_NOT_FOCUSED = 3; // 0x3
+ field public static final int TAP_TO_FOCUS_NOT_STARTED = 0; // 0x0
+ field public static final int TAP_TO_FOCUS_STARTED = 1; // 0x1
+ field @androidx.camera.view.video.ExperimentalVideo public static final int VIDEO_CAPTURE = 4; // 0x4
+ }
+
+ @RequiresApi(21) public static final class CameraController.OutputSize {
+ ctor public CameraController.OutputSize(int);
+ ctor public CameraController.OutputSize(android.util.Size);
+ method public int getAspectRatio();
+ method public android.util.Size? getResolution();
+ field public static final int UNASSIGNED_ASPECT_RATIO = -1; // 0xffffffff
+ }
+
+ @RequiresApi(21) public final class LifecycleCameraController extends androidx.camera.view.CameraController {
+ ctor public LifecycleCameraController(android.content.Context);
+ method @MainThread public void bindToLifecycle(androidx.lifecycle.LifecycleOwner);
+ method @MainThread public void unbind();
+ }
+
+ @RequiresApi(21) public final class PreviewView extends android.widget.FrameLayout {
+ ctor @UiThread public PreviewView(android.content.Context);
+ ctor @UiThread public PreviewView(android.content.Context, android.util.AttributeSet?);
+ ctor @UiThread public PreviewView(android.content.Context, android.util.AttributeSet?, int);
+ ctor @UiThread public PreviewView(android.content.Context, android.util.AttributeSet?, int, int);
+ method @UiThread public android.graphics.Bitmap? getBitmap();
+ method @UiThread public androidx.camera.view.CameraController? getController();
+ method @UiThread public androidx.camera.view.PreviewView.ImplementationMode getImplementationMode();
+ method @UiThread public androidx.camera.core.MeteringPointFactory getMeteringPointFactory();
+ method public androidx.camera.view.transform.OutputTransform? getOutputTransform();
+ method public androidx.lifecycle.LiveData<androidx.camera.view.PreviewView.StreamState!> getPreviewStreamState();
+ method @UiThread public androidx.camera.view.PreviewView.ScaleType getScaleType();
+ method @UiThread public androidx.camera.core.Preview.SurfaceProvider getSurfaceProvider();
+ method @UiThread public androidx.camera.core.ViewPort? getViewPort();
+ method @UiThread public androidx.camera.core.ViewPort? getViewPort(int);
+ method @UiThread public void setController(androidx.camera.view.CameraController?);
+ method @UiThread public void setImplementationMode(androidx.camera.view.PreviewView.ImplementationMode);
+ method @UiThread public void setScaleType(androidx.camera.view.PreviewView.ScaleType);
+ }
+
+ @RequiresApi(21) public enum PreviewView.ImplementationMode {
+ enum_constant public static final androidx.camera.view.PreviewView.ImplementationMode COMPATIBLE;
+ enum_constant public static final androidx.camera.view.PreviewView.ImplementationMode PERFORMANCE;
+ }
+
+ @RequiresApi(21) public enum PreviewView.ScaleType {
+ enum_constant public static final androidx.camera.view.PreviewView.ScaleType FILL_CENTER;
+ enum_constant public static final androidx.camera.view.PreviewView.ScaleType FILL_END;
+ enum_constant public static final androidx.camera.view.PreviewView.ScaleType FILL_START;
+ enum_constant public static final androidx.camera.view.PreviewView.ScaleType FIT_CENTER;
+ enum_constant public static final androidx.camera.view.PreviewView.ScaleType FIT_END;
+ enum_constant public static final androidx.camera.view.PreviewView.ScaleType FIT_START;
+ }
+
+ public enum PreviewView.StreamState {
+ enum_constant public static final androidx.camera.view.PreviewView.StreamState IDLE;
+ enum_constant public static final androidx.camera.view.PreviewView.StreamState STREAMING;
+ }
+
+ @RequiresApi(21) public final class RotationProvider {
+ ctor public RotationProvider(android.content.Context);
+ method @CheckResult public boolean addListener(java.util.concurrent.Executor, androidx.camera.view.RotationProvider.Listener);
+ method public void removeListener(androidx.camera.view.RotationProvider.Listener);
+ }
+
+ public static interface RotationProvider.Listener {
+ method public void onRotationChanged(int);
+ }
+
+}
+
+package androidx.camera.view.transform {
+
+ @RequiresApi(21) public final class CoordinateTransform {
+ ctor public CoordinateTransform(androidx.camera.view.transform.OutputTransform, androidx.camera.view.transform.OutputTransform);
+ method public void mapPoint(android.graphics.PointF);
+ method public void mapPoints(float[]);
+ method public void mapRect(android.graphics.RectF);
+ method public void transform(android.graphics.Matrix);
+ }
+
+ @RequiresApi(21) public final class FileTransformFactory {
+ ctor public FileTransformFactory();
+ method public androidx.camera.view.transform.OutputTransform getOutputTransform(android.content.ContentResolver, android.net.Uri) throws java.io.IOException;
+ method public androidx.camera.view.transform.OutputTransform getOutputTransform(java.io.File) throws java.io.IOException;
+ method public androidx.camera.view.transform.OutputTransform getOutputTransform(java.io.InputStream) throws java.io.IOException;
+ method public boolean isUsingExifOrientation();
+ method public void setUsingExifOrientation(boolean);
+ }
+
+ @RequiresApi(21) public final class ImageProxyTransformFactory {
+ ctor public ImageProxyTransformFactory();
+ method public androidx.camera.view.transform.OutputTransform getOutputTransform(androidx.camera.core.ImageProxy);
+ method public boolean isUsingCropRect();
+ method public boolean isUsingRotationDegrees();
+ method public void setUsingCropRect(boolean);
+ method public void setUsingRotationDegrees(boolean);
+ }
+
+ @RequiresApi(21) public final class OutputTransform {
+ }
+
+}
+
+package androidx.camera.view.video {
+
+ @RequiresOptIn @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) public @interface ExperimentalVideo {
+ }
+
+ @RequiresApi(21) @androidx.camera.view.video.ExperimentalVideo @com.google.auto.value.AutoValue public abstract class Metadata {
+ method public static androidx.camera.view.video.Metadata.Builder builder();
+ method public abstract android.location.Location? getLocation();
+ }
+
+ @com.google.auto.value.AutoValue.Builder public abstract static class Metadata.Builder {
+ method public abstract androidx.camera.view.video.Metadata build();
+ method public abstract androidx.camera.view.video.Metadata.Builder setLocation(android.location.Location?);
+ }
+
+ @RequiresApi(21) @androidx.camera.view.video.ExperimentalVideo public interface OnVideoSavedCallback {
+ method public void onError(int, String, Throwable?);
+ method public void onVideoSaved(androidx.camera.view.video.OutputFileResults);
+ field public static final int ERROR_ENCODER = 1; // 0x1
+ field public static final int ERROR_FILE_IO = 4; // 0x4
+ field public static final int ERROR_INVALID_CAMERA = 5; // 0x5
+ field public static final int ERROR_MUXER = 2; // 0x2
+ field public static final int ERROR_RECORDING_IN_PROGRESS = 3; // 0x3
+ field public static final int ERROR_UNKNOWN = 0; // 0x0
+ }
+
+ @RequiresApi(21) @androidx.camera.view.video.ExperimentalVideo @com.google.auto.value.AutoValue public abstract class OutputFileOptions {
+ method public static androidx.camera.view.video.OutputFileOptions.Builder builder(java.io.File);
+ method public static androidx.camera.view.video.OutputFileOptions.Builder builder(android.os.ParcelFileDescriptor);
+ method public static androidx.camera.view.video.OutputFileOptions.Builder builder(android.content.ContentResolver, android.net.Uri, android.content.ContentValues);
+ method public abstract androidx.camera.view.video.Metadata getMetadata();
+ }
+
+ @com.google.auto.value.AutoValue.Builder public abstract static class OutputFileOptions.Builder {
+ method public abstract androidx.camera.view.video.OutputFileOptions build();
+ method public abstract androidx.camera.view.video.OutputFileOptions.Builder setMetadata(androidx.camera.view.video.Metadata);
+ }
+
+ @RequiresApi(21) @androidx.camera.view.video.ExperimentalVideo @com.google.auto.value.AutoValue public abstract class OutputFileResults {
+ method public abstract android.net.Uri? getSavedUri();
+ }
+
+}
+
diff --git a/wear/watchface/watchface-complications-data-core/api/res-current.txt b/camera/camera-view/api/res-1.1.0-beta01.txt
similarity index 100%
copy from wear/watchface/watchface-complications-data-core/api/res-current.txt
copy to camera/camera-view/api/res-1.1.0-beta01.txt
diff --git a/camera/camera-view/api/restricted_1.1.0-beta01.txt b/camera/camera-view/api/restricted_1.1.0-beta01.txt
new file mode 100644
index 0000000..8a2fa5e
--- /dev/null
+++ b/camera/camera-view/api/restricted_1.1.0-beta01.txt
@@ -0,0 +1,118 @@
+// Signature format: 4.0
+package androidx.camera.view {
+
+ @RequiresApi(21) public abstract class CameraController {
+ method @MainThread public void clearImageAnalysisAnalyzer();
+ method @MainThread public com.google.common.util.concurrent.ListenableFuture<java.lang.Void!> enableTorch(boolean);
+ method @MainThread public androidx.camera.core.CameraControl? getCameraControl();
+ method @MainThread public androidx.camera.core.CameraInfo? getCameraInfo();
+ method @MainThread public androidx.camera.core.CameraSelector getCameraSelector();
+ method @MainThread public java.util.concurrent.Executor? getImageAnalysisBackgroundExecutor();
+ method @MainThread @androidx.camera.core.ImageAnalysis.BackpressureStrategy public int getImageAnalysisBackpressureStrategy();
+ method @MainThread public int getImageAnalysisImageQueueDepth();
+ method @MainThread public androidx.camera.view.CameraController.OutputSize? getImageAnalysisTargetSize();
+ method @MainThread @androidx.camera.core.ImageCapture.FlashMode public int getImageCaptureFlashMode();
+ method @MainThread public java.util.concurrent.Executor? getImageCaptureIoExecutor();
+ method @MainThread public int getImageCaptureMode();
+ method @MainThread public androidx.camera.view.CameraController.OutputSize? getImageCaptureTargetSize();
+ method public com.google.common.util.concurrent.ListenableFuture<java.lang.Void!> getInitializationFuture();
+ method @MainThread public androidx.camera.view.CameraController.OutputSize? getPreviewTargetSize();
+ method @MainThread public androidx.lifecycle.LiveData<java.lang.Integer!> getTapToFocusState();
+ method @MainThread public androidx.lifecycle.LiveData<java.lang.Integer!> getTorchState();
+ method @MainThread public androidx.lifecycle.LiveData<androidx.camera.core.ZoomState!> getZoomState();
+ method @MainThread public boolean hasCamera(androidx.camera.core.CameraSelector);
+ method @MainThread public boolean isImageAnalysisEnabled();
+ method @MainThread public boolean isImageCaptureEnabled();
+ method @MainThread public boolean isPinchToZoomEnabled();
+ method @MainThread public boolean isTapToFocusEnabled();
+ method @MainThread public void setCameraSelector(androidx.camera.core.CameraSelector);
+ method @MainThread public void setEnabledUseCases(int);
+ method @MainThread public void setImageAnalysisAnalyzer(java.util.concurrent.Executor, androidx.camera.core.ImageAnalysis.Analyzer);
+ method @MainThread public void setImageAnalysisBackgroundExecutor(java.util.concurrent.Executor?);
+ method @MainThread public void setImageAnalysisBackpressureStrategy(@androidx.camera.core.ImageAnalysis.BackpressureStrategy int);
+ method @MainThread public void setImageAnalysisImageQueueDepth(int);
+ method @MainThread public void setImageAnalysisTargetSize(androidx.camera.view.CameraController.OutputSize?);
+ method @MainThread public void setImageCaptureFlashMode(@androidx.camera.core.ImageCapture.FlashMode int);
+ method @MainThread public void setImageCaptureIoExecutor(java.util.concurrent.Executor?);
+ method @MainThread public void setImageCaptureMode(@androidx.camera.core.ImageCapture.CaptureMode int);
+ method @MainThread public void setImageCaptureTargetSize(androidx.camera.view.CameraController.OutputSize?);
+ method @MainThread public com.google.common.util.concurrent.ListenableFuture<java.lang.Void!> setLinearZoom(@FloatRange(from=0.0f, to=1.0f) float);
+ method @MainThread public void setPinchToZoomEnabled(boolean);
+ method @MainThread public void setPreviewTargetSize(androidx.camera.view.CameraController.OutputSize?);
+ method @MainThread public void setTapToFocusEnabled(boolean);
+ method @MainThread public com.google.common.util.concurrent.ListenableFuture<java.lang.Void!> setZoomRatio(float);
+ method @MainThread public void takePicture(androidx.camera.core.ImageCapture.OutputFileOptions, java.util.concurrent.Executor, androidx.camera.core.ImageCapture.OnImageSavedCallback);
+ method @MainThread public void takePicture(java.util.concurrent.Executor, androidx.camera.core.ImageCapture.OnImageCapturedCallback);
+ field public static final int IMAGE_ANALYSIS = 2; // 0x2
+ field public static final int IMAGE_CAPTURE = 1; // 0x1
+ field public static final int TAP_TO_FOCUS_FAILED = 4; // 0x4
+ field public static final int TAP_TO_FOCUS_FOCUSED = 2; // 0x2
+ field public static final int TAP_TO_FOCUS_NOT_FOCUSED = 3; // 0x3
+ field public static final int TAP_TO_FOCUS_NOT_STARTED = 0; // 0x0
+ field public static final int TAP_TO_FOCUS_STARTED = 1; // 0x1
+ }
+
+ @RequiresApi(21) public static final class CameraController.OutputSize {
+ ctor public CameraController.OutputSize(@androidx.camera.core.AspectRatio.Ratio int);
+ ctor public CameraController.OutputSize(android.util.Size);
+ method public int getAspectRatio();
+ method public android.util.Size? getResolution();
+ field public static final int UNASSIGNED_ASPECT_RATIO = -1; // 0xffffffff
+ }
+
+ @RequiresApi(21) public final class LifecycleCameraController extends androidx.camera.view.CameraController {
+ ctor public LifecycleCameraController(android.content.Context);
+ method @MainThread public void bindToLifecycle(androidx.lifecycle.LifecycleOwner);
+ method @MainThread public void unbind();
+ }
+
+ @RequiresApi(21) public final class PreviewView extends android.widget.FrameLayout {
+ ctor @UiThread public PreviewView(android.content.Context);
+ ctor @UiThread public PreviewView(android.content.Context, android.util.AttributeSet?);
+ ctor @UiThread public PreviewView(android.content.Context, android.util.AttributeSet?, int);
+ ctor @UiThread public PreviewView(android.content.Context, android.util.AttributeSet?, int, int);
+ method @UiThread public android.graphics.Bitmap? getBitmap();
+ method @UiThread public androidx.camera.view.CameraController? getController();
+ method @UiThread public androidx.camera.view.PreviewView.ImplementationMode getImplementationMode();
+ method @UiThread public androidx.camera.core.MeteringPointFactory getMeteringPointFactory();
+ method public androidx.lifecycle.LiveData<androidx.camera.view.PreviewView.StreamState!> getPreviewStreamState();
+ method @UiThread public androidx.camera.view.PreviewView.ScaleType getScaleType();
+ method @UiThread public androidx.camera.core.Preview.SurfaceProvider getSurfaceProvider();
+ method @UiThread public androidx.camera.core.ViewPort? getViewPort();
+ method @UiThread public androidx.camera.core.ViewPort? getViewPort(@androidx.camera.core.impl.ImageOutputConfig.RotationValue int);
+ method @UiThread public void setController(androidx.camera.view.CameraController?);
+ method @UiThread public void setImplementationMode(androidx.camera.view.PreviewView.ImplementationMode);
+ method @UiThread public void setScaleType(androidx.camera.view.PreviewView.ScaleType);
+ }
+
+ @RequiresApi(21) public enum PreviewView.ImplementationMode {
+ enum_constant public static final androidx.camera.view.PreviewView.ImplementationMode COMPATIBLE;
+ enum_constant public static final androidx.camera.view.PreviewView.ImplementationMode PERFORMANCE;
+ }
+
+ @RequiresApi(21) public enum PreviewView.ScaleType {
+ enum_constant public static final androidx.camera.view.PreviewView.ScaleType FILL_CENTER;
+ enum_constant public static final androidx.camera.view.PreviewView.ScaleType FILL_END;
+ enum_constant public static final androidx.camera.view.PreviewView.ScaleType FILL_START;
+ enum_constant public static final androidx.camera.view.PreviewView.ScaleType FIT_CENTER;
+ enum_constant public static final androidx.camera.view.PreviewView.ScaleType FIT_END;
+ enum_constant public static final androidx.camera.view.PreviewView.ScaleType FIT_START;
+ }
+
+ public enum PreviewView.StreamState {
+ enum_constant public static final androidx.camera.view.PreviewView.StreamState IDLE;
+ enum_constant public static final androidx.camera.view.PreviewView.StreamState STREAMING;
+ }
+
+ @RequiresApi(21) public final class RotationProvider {
+ ctor public RotationProvider(android.content.Context);
+ method @CheckResult public boolean addListener(java.util.concurrent.Executor, androidx.camera.view.RotationProvider.Listener);
+ method public void removeListener(androidx.camera.view.RotationProvider.Listener);
+ }
+
+ public static interface RotationProvider.Listener {
+ method public void onRotationChanged(@androidx.camera.core.impl.ImageOutputConfig.RotationValue int);
+ }
+
+}
+
diff --git a/camera/camera-view/build.gradle b/camera/camera-view/build.gradle
index f9cac5f..0bd381a4 100644
--- a/camera/camera-view/build.gradle
+++ b/camera/camera-view/build.gradle
@@ -25,13 +25,11 @@
id("kotlin-android")
}
-apply(from: "dependencies.gradle")
-
dependencies {
api("androidx.lifecycle:lifecycle-common:2.0.0")
api("androidx.annotation:annotation:1.2.0")
- api("androidx.camera:camera-core:${VIEW_ATOMIC_GROUP_PINNED_VER}")
- implementation("androidx.camera:camera-lifecycle:${VIEW_ATOMIC_GROUP_PINNED_VER}")
+ api(project(":camera:camera-core"))
+ implementation(project(":camera:camera-lifecycle"))
implementation("androidx.annotation:annotation-experimental:1.1.0-rc01")
implementation(libs.guavaListenableFuture)
implementation("androidx.core:core:1.3.2")
@@ -50,18 +48,9 @@
testImplementation(libs.truth)
testImplementation(libs.testRules)
testImplementation(libs.testCore)
- testImplementation(project(":camera:camera-testing")) {
- // Ensure camera-testing does not pull in camera-core project dependency which will
- // override pinned dependency.
- exclude(group:"androidx.camera", module:"camera-core")
- }
- testImplementation("androidx.camera:camera-camera2:${VIEW_ATOMIC_GROUP_PINNED_VER}")
+ testImplementation(project(":camera:camera-camera2"))
+ testImplementation(project(":camera:camera-testing"))
- androidTestImplementation(project(":camera:camera-testing")) {
- // Ensure camera-testing does not pull in camera-core project dependency which will
- // override pinned dependency.
- exclude(group:"androidx.camera", module:"camera-core")
- }
androidTestImplementation(libs.multidex)
androidTestImplementation(libs.mockitoCore)
androidTestImplementation(libs.espressoCore)
@@ -72,7 +61,8 @@
androidTestImplementation(libs.testUiautomator)
androidTestImplementation(libs.kotlinStdlib)
androidTestImplementation(libs.truth)
- androidTestImplementation("androidx.camera:camera-camera2:${VIEW_ATOMIC_GROUP_PINNED_VER}")
+ androidTestImplementation(project(":camera:camera-camera2"))
+ androidTestImplementation(project(":camera:camera-testing"))
androidTestImplementation(libs.mockitoCore, excludes.bytebuddy) // DexMaker has it's own MockMaker
androidTestImplementation(libs.dexmakerMockito, excludes.bytebuddy) // DexMaker has it's own MockMaker
}
@@ -86,7 +76,7 @@
androidx {
name = "Jetpack Camera View Library"
publish = Publish.SNAPSHOT_AND_RELEASE
- mavenVersion = LibraryVersions.CAMERA_VIEW
+
mavenGroup = LibraryGroups.CAMERA
inceptionYear = "2019"
description = "UI tools for the Jetpack Camera Library, a library providing a consistent and " +
diff --git a/camera/camera-view/src/main/java/androidx/camera/view/CameraController.java b/camera/camera-view/src/main/java/androidx/camera/view/CameraController.java
index 9f8dcdc..d811f05 100644
--- a/camera/camera-view/src/main/java/androidx/camera/view/CameraController.java
+++ b/camera/camera-view/src/main/java/androidx/camera/view/CameraController.java
@@ -1070,6 +1070,7 @@
* @param executor The executor in which the callback methods will be run.
* @param callback Callback which will receive success or failure.
*/
+ @SuppressLint("MissingPermission")
@ExperimentalVideo
@MainThread
public void startRecording(@NonNull OutputFileOptions outputFileOptions,
diff --git a/camera/integration-tests/viewtestapp/build.gradle b/camera/integration-tests/viewtestapp/build.gradle
index afbcf46..af70c26 100644
--- a/camera/integration-tests/viewtestapp/build.gradle
+++ b/camera/integration-tests/viewtestapp/build.gradle
@@ -24,8 +24,6 @@
id("AndroidXComposePlugin")
}
-apply(from: "../../camera-view/dependencies.gradle")
-
android {
defaultConfig {
applicationId "androidx.camera.integration.view"
@@ -58,8 +56,8 @@
dependencies {
// Internal library
- implementation("androidx.camera:camera-camera2:${VIEW_ATOMIC_GROUP_PINNED_VER}")
- implementation("androidx.camera:camera-lifecycle:${VIEW_ATOMIC_GROUP_PINNED_VER}")
+ implementation(project(":camera:camera-camera2"))
+ implementation(project(":camera:camera-lifecycle"))
implementation("androidx.lifecycle:lifecycle-runtime:2.3.1")
implementation(project(":camera:camera-view"))
implementation(libs.guavaAndroid)
@@ -99,9 +97,5 @@
debugImplementation(libs.testCore)
debugImplementation("androidx.fragment:fragment-testing:1.2.3")
// camera-testing added as 'implementation' dependency to include camera-testing activity in APK
- debugImplementation(project(":camera:camera-testing")) {
- // Ensure camera-testing does not pull in camera-core project dependency which will
- // override pinned dependency.
- exclude(group:"androidx.camera", module:"camera-core")
- }
+ debugImplementation(project(":camera:camera-testing"))
}
diff --git a/car/app/app-automotive/api/1.2.0-beta01.txt b/car/app/app-automotive/api/1.2.0-beta01.txt
new file mode 100644
index 0000000..e44b1f5
--- /dev/null
+++ b/car/app/app-automotive/api/1.2.0-beta01.txt
@@ -0,0 +1,35 @@
+// Signature format: 4.0
+package androidx.car.app.activity {
+
+ public final class CarAppActivity extends androidx.fragment.app.FragmentActivity implements androidx.lifecycle.LifecycleOwner {
+ ctor public CarAppActivity();
+ }
+
+}
+
+package androidx.car.app.activity.renderer.surface {
+
+ public final class LegacySurfacePackage {
+ ctor public LegacySurfacePackage(androidx.car.app.activity.renderer.surface.SurfaceControlCallback);
+ }
+
+ public interface SurfaceControlCallback {
+ method public default void onError(String, Throwable);
+ method public void onKeyEvent(android.view.KeyEvent);
+ method public void onTouchEvent(android.view.MotionEvent);
+ method public void onWindowFocusChanged(boolean, boolean);
+ method public void setSurfaceWrapper(androidx.car.app.activity.renderer.surface.SurfaceWrapper);
+ }
+
+ public final class SurfaceWrapper {
+ ctor public SurfaceWrapper(android.os.IBinder?, @Dimension int, @Dimension int, int, int, android.view.Surface);
+ method public int getDensityDpi();
+ method public int getDisplayId();
+ method @Dimension public int getHeight();
+ method public android.os.IBinder? getHostToken();
+ method public android.view.Surface getSurface();
+ method @Dimension public int getWidth();
+ }
+
+}
+
diff --git a/car/app/app-automotive/api/1.2.0-beta02.txt b/car/app/app-automotive/api/1.2.0-beta02.txt
new file mode 100644
index 0000000..e44b1f5
--- /dev/null
+++ b/car/app/app-automotive/api/1.2.0-beta02.txt
@@ -0,0 +1,35 @@
+// Signature format: 4.0
+package androidx.car.app.activity {
+
+ public final class CarAppActivity extends androidx.fragment.app.FragmentActivity implements androidx.lifecycle.LifecycleOwner {
+ ctor public CarAppActivity();
+ }
+
+}
+
+package androidx.car.app.activity.renderer.surface {
+
+ public final class LegacySurfacePackage {
+ ctor public LegacySurfacePackage(androidx.car.app.activity.renderer.surface.SurfaceControlCallback);
+ }
+
+ public interface SurfaceControlCallback {
+ method public default void onError(String, Throwable);
+ method public void onKeyEvent(android.view.KeyEvent);
+ method public void onTouchEvent(android.view.MotionEvent);
+ method public void onWindowFocusChanged(boolean, boolean);
+ method public void setSurfaceWrapper(androidx.car.app.activity.renderer.surface.SurfaceWrapper);
+ }
+
+ public final class SurfaceWrapper {
+ ctor public SurfaceWrapper(android.os.IBinder?, @Dimension int, @Dimension int, int, int, android.view.Surface);
+ method public int getDensityDpi();
+ method public int getDisplayId();
+ method @Dimension public int getHeight();
+ method public android.os.IBinder? getHostToken();
+ method public android.view.Surface getSurface();
+ method @Dimension public int getWidth();
+ }
+
+}
+
diff --git a/car/app/app-automotive/api/public_plus_experimental_1.2.0-beta01.txt b/car/app/app-automotive/api/public_plus_experimental_1.2.0-beta01.txt
new file mode 100644
index 0000000..10d773e
--- /dev/null
+++ b/car/app/app-automotive/api/public_plus_experimental_1.2.0-beta01.txt
@@ -0,0 +1,43 @@
+// Signature format: 4.0
+package androidx.car.app.activity {
+
+ public final class CarAppActivity extends androidx.fragment.app.FragmentActivity implements androidx.lifecycle.LifecycleOwner {
+ ctor public CarAppActivity();
+ }
+
+}
+
+package androidx.car.app.activity.renderer.surface {
+
+ public final class LegacySurfacePackage {
+ ctor public LegacySurfacePackage(androidx.car.app.activity.renderer.surface.SurfaceControlCallback);
+ }
+
+ public interface SurfaceControlCallback {
+ method public default void onError(String, Throwable);
+ method public void onKeyEvent(android.view.KeyEvent);
+ method public void onTouchEvent(android.view.MotionEvent);
+ method public void onWindowFocusChanged(boolean, boolean);
+ method public void setSurfaceWrapper(androidx.car.app.activity.renderer.surface.SurfaceWrapper);
+ }
+
+ public final class SurfaceWrapper {
+ ctor public SurfaceWrapper(android.os.IBinder?, @Dimension int, @Dimension int, int, int, android.view.Surface);
+ method public int getDensityDpi();
+ method public int getDisplayId();
+ method @Dimension public int getHeight();
+ method public android.os.IBinder? getHostToken();
+ method public android.view.Surface getSurface();
+ method @Dimension public int getWidth();
+ }
+
+}
+
+package androidx.car.app.hardware {
+
+ @androidx.car.app.annotations.ExperimentalCarApi public final class AutomotiveCarHardwareManager implements androidx.car.app.hardware.CarHardwareManager {
+ ctor public AutomotiveCarHardwareManager(android.content.Context);
+ }
+
+}
+
diff --git a/car/app/app-automotive/api/public_plus_experimental_1.2.0-beta02.txt b/car/app/app-automotive/api/public_plus_experimental_1.2.0-beta02.txt
new file mode 100644
index 0000000..10d773e
--- /dev/null
+++ b/car/app/app-automotive/api/public_plus_experimental_1.2.0-beta02.txt
@@ -0,0 +1,43 @@
+// Signature format: 4.0
+package androidx.car.app.activity {
+
+ public final class CarAppActivity extends androidx.fragment.app.FragmentActivity implements androidx.lifecycle.LifecycleOwner {
+ ctor public CarAppActivity();
+ }
+
+}
+
+package androidx.car.app.activity.renderer.surface {
+
+ public final class LegacySurfacePackage {
+ ctor public LegacySurfacePackage(androidx.car.app.activity.renderer.surface.SurfaceControlCallback);
+ }
+
+ public interface SurfaceControlCallback {
+ method public default void onError(String, Throwable);
+ method public void onKeyEvent(android.view.KeyEvent);
+ method public void onTouchEvent(android.view.MotionEvent);
+ method public void onWindowFocusChanged(boolean, boolean);
+ method public void setSurfaceWrapper(androidx.car.app.activity.renderer.surface.SurfaceWrapper);
+ }
+
+ public final class SurfaceWrapper {
+ ctor public SurfaceWrapper(android.os.IBinder?, @Dimension int, @Dimension int, int, int, android.view.Surface);
+ method public int getDensityDpi();
+ method public int getDisplayId();
+ method @Dimension public int getHeight();
+ method public android.os.IBinder? getHostToken();
+ method public android.view.Surface getSurface();
+ method @Dimension public int getWidth();
+ }
+
+}
+
+package androidx.car.app.hardware {
+
+ @androidx.car.app.annotations.ExperimentalCarApi public final class AutomotiveCarHardwareManager implements androidx.car.app.hardware.CarHardwareManager {
+ ctor public AutomotiveCarHardwareManager(android.content.Context);
+ }
+
+}
+
diff --git a/wear/watchface/watchface-complications-data-core/api/res-current.txt b/car/app/app-automotive/api/res-1.2.0-beta01.txt
similarity index 100%
copy from wear/watchface/watchface-complications-data-core/api/res-current.txt
copy to car/app/app-automotive/api/res-1.2.0-beta01.txt
diff --git a/wear/watchface/watchface-complications-data-core/api/res-current.txt b/car/app/app-automotive/api/res-1.2.0-beta02.txt
similarity index 100%
copy from wear/watchface/watchface-complications-data-core/api/res-current.txt
copy to car/app/app-automotive/api/res-1.2.0-beta02.txt
diff --git a/car/app/app-automotive/api/restricted_1.2.0-beta01.txt b/car/app/app-automotive/api/restricted_1.2.0-beta01.txt
new file mode 100644
index 0000000..e18fd4c
--- /dev/null
+++ b/car/app/app-automotive/api/restricted_1.2.0-beta01.txt
@@ -0,0 +1,35 @@
+// Signature format: 4.0
+package androidx.car.app.activity {
+
+ public final class CarAppActivity extends androidx.fragment.app.FragmentActivity {
+ ctor public CarAppActivity();
+ }
+
+}
+
+package androidx.car.app.activity.renderer.surface {
+
+ public final class LegacySurfacePackage {
+ ctor public LegacySurfacePackage(androidx.car.app.activity.renderer.surface.SurfaceControlCallback);
+ }
+
+ public interface SurfaceControlCallback {
+ method public default void onError(String, Throwable);
+ method public void onKeyEvent(android.view.KeyEvent);
+ method public void onTouchEvent(android.view.MotionEvent);
+ method public void onWindowFocusChanged(boolean, boolean);
+ method public void setSurfaceWrapper(androidx.car.app.activity.renderer.surface.SurfaceWrapper);
+ }
+
+ public final class SurfaceWrapper {
+ ctor public SurfaceWrapper(android.os.IBinder?, @Dimension int, @Dimension int, int, int, android.view.Surface);
+ method public int getDensityDpi();
+ method public int getDisplayId();
+ method @Dimension public int getHeight();
+ method public android.os.IBinder? getHostToken();
+ method public android.view.Surface getSurface();
+ method @Dimension public int getWidth();
+ }
+
+}
+
diff --git a/car/app/app-automotive/api/restricted_1.2.0-beta02.txt b/car/app/app-automotive/api/restricted_1.2.0-beta02.txt
new file mode 100644
index 0000000..e18fd4c
--- /dev/null
+++ b/car/app/app-automotive/api/restricted_1.2.0-beta02.txt
@@ -0,0 +1,35 @@
+// Signature format: 4.0
+package androidx.car.app.activity {
+
+ public final class CarAppActivity extends androidx.fragment.app.FragmentActivity {
+ ctor public CarAppActivity();
+ }
+
+}
+
+package androidx.car.app.activity.renderer.surface {
+
+ public final class LegacySurfacePackage {
+ ctor public LegacySurfacePackage(androidx.car.app.activity.renderer.surface.SurfaceControlCallback);
+ }
+
+ public interface SurfaceControlCallback {
+ method public default void onError(String, Throwable);
+ method public void onKeyEvent(android.view.KeyEvent);
+ method public void onTouchEvent(android.view.MotionEvent);
+ method public void onWindowFocusChanged(boolean, boolean);
+ method public void setSurfaceWrapper(androidx.car.app.activity.renderer.surface.SurfaceWrapper);
+ }
+
+ public final class SurfaceWrapper {
+ ctor public SurfaceWrapper(android.os.IBinder?, @Dimension int, @Dimension int, int, int, android.view.Surface);
+ method public int getDensityDpi();
+ method public int getDisplayId();
+ method @Dimension public int getHeight();
+ method public android.os.IBinder? getHostToken();
+ method public android.view.Surface getSurface();
+ method @Dimension public int getWidth();
+ }
+
+}
+
diff --git a/wear/watchface/watchface-complications-data-core/api/current.txt b/car/app/app-projected/api/1.2.0-beta01.txt
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/api/current.txt
rename to car/app/app-projected/api/1.2.0-beta01.txt
diff --git a/wear/watchface/watchface-complications-data-core/api/current.txt b/car/app/app-projected/api/1.2.0-beta02.txt
similarity index 100%
copy from wear/watchface/watchface-complications-data-core/api/current.txt
copy to car/app/app-projected/api/1.2.0-beta02.txt
diff --git a/wear/watchface/watchface-complications-data-core/api/current.txt b/car/app/app-projected/api/public_plus_experimental_1.2.0-beta01.txt
similarity index 100%
copy from wear/watchface/watchface-complications-data-core/api/current.txt
copy to car/app/app-projected/api/public_plus_experimental_1.2.0-beta01.txt
diff --git a/wear/watchface/watchface-complications-data-core/api/current.txt b/car/app/app-projected/api/public_plus_experimental_1.2.0-beta02.txt
similarity index 100%
copy from wear/watchface/watchface-complications-data-core/api/current.txt
copy to car/app/app-projected/api/public_plus_experimental_1.2.0-beta02.txt
diff --git a/wear/watchface/watchface-complications-data-core/api/res-current.txt b/car/app/app-projected/api/res-1.2.0-beta01.txt
similarity index 100%
copy from wear/watchface/watchface-complications-data-core/api/res-current.txt
copy to car/app/app-projected/api/res-1.2.0-beta01.txt
diff --git a/wear/watchface/watchface-complications-data-core/api/res-current.txt b/car/app/app-projected/api/res-1.2.0-beta02.txt
similarity index 100%
copy from wear/watchface/watchface-complications-data-core/api/res-current.txt
copy to car/app/app-projected/api/res-1.2.0-beta02.txt
diff --git a/wear/watchface/watchface-complications-data-core/api/current.txt b/car/app/app-projected/api/restricted_1.2.0-beta01.txt
similarity index 100%
copy from wear/watchface/watchface-complications-data-core/api/current.txt
copy to car/app/app-projected/api/restricted_1.2.0-beta01.txt
diff --git a/wear/watchface/watchface-complications-data-core/api/current.txt b/car/app/app-projected/api/restricted_1.2.0-beta02.txt
similarity index 100%
copy from wear/watchface/watchface-complications-data-core/api/current.txt
copy to car/app/app-projected/api/restricted_1.2.0-beta02.txt
diff --git a/car/app/app-samples/showcase/common/build.gradle b/car/app/app-samples/showcase/common/build.gradle
index 3bd3d2c..ac18636 100644
--- a/car/app/app-samples/showcase/common/build.gradle
+++ b/car/app/app-samples/showcase/common/build.gradle
@@ -27,6 +27,7 @@
dependencies {
implementation(project(":car:app:app"))
+ implementation("com.squareup.leakcanary:leakcanary-android:2.7")
implementation("androidx.core:core:1.7.0")
implementation(project(":annotation:annotation-experimental"))
diff --git a/car/app/app-testing/api/1.2.0-beta01.txt b/car/app/app-testing/api/1.2.0-beta01.txt
new file mode 100644
index 0000000..d148064
--- /dev/null
+++ b/car/app/app-testing/api/1.2.0-beta01.txt
@@ -0,0 +1,65 @@
+// Signature format: 4.0
+package androidx.car.app.testing {
+
+ public class FakeHost {
+ method public void performNotificationActionClick(android.app.PendingIntent);
+ }
+
+ public class ScreenController {
+ ctor public ScreenController(androidx.car.app.Screen);
+ method public androidx.car.app.Screen getScreen();
+ method public Object? getScreenResult();
+ method public java.util.List<androidx.car.app.model.Template!> getTemplatesReturned();
+ method public androidx.car.app.testing.ScreenController moveToState(androidx.lifecycle.Lifecycle.State);
+ method public void reset();
+ }
+
+ public class SessionController {
+ ctor public SessionController(androidx.car.app.Session, androidx.car.app.testing.TestCarContext, android.content.Intent);
+ method public androidx.car.app.Session getSession();
+ method public androidx.car.app.testing.SessionController moveToState(androidx.lifecycle.Lifecycle.State);
+ }
+
+ public class TestAppManager extends androidx.car.app.AppManager {
+ method public androidx.car.app.SurfaceCallback? getSurfaceCallback();
+ method public java.util.List<android.util.Pair<androidx.car.app.Screen!,androidx.car.app.model.Template!>!> getTemplatesReturned();
+ method public java.util.List<java.lang.CharSequence!> getToastsShown();
+ method public void reset();
+ }
+
+ public class TestCarContext extends androidx.car.app.CarContext {
+ method public static androidx.car.app.testing.TestCarContext createCarContext(android.content.Context);
+ method public androidx.car.app.testing.FakeHost getFakeHost();
+ method public androidx.car.app.testing.TestCarContext.PermissionRequestInfo? getLastPermissionRequestInfo();
+ method public java.util.List<android.content.Intent!> getStartCarAppIntents();
+ method public boolean hasCalledFinishCarApp();
+ method public void reset();
+ }
+
+ public static class TestCarContext.PermissionRequestInfo {
+ method public androidx.car.app.OnRequestPermissionsListener getListener();
+ method public java.util.List<java.lang.String!> getPermissionsRequested();
+ }
+
+ public class TestScreenManager extends androidx.car.app.ScreenManager {
+ method public java.util.List<androidx.car.app.Screen!> getScreensPushed();
+ method public java.util.List<androidx.car.app.Screen!> getScreensRemoved();
+ method public boolean hasScreens();
+ method public void reset();
+ }
+
+}
+
+package androidx.car.app.testing.navigation {
+
+ public class TestNavigationManager extends androidx.car.app.navigation.NavigationManager {
+ ctor public TestNavigationManager(androidx.car.app.testing.TestCarContext, androidx.car.app.HostDispatcher);
+ method public int getNavigationEndedCount();
+ method public androidx.car.app.navigation.NavigationManagerCallback? getNavigationManagerCallback();
+ method public int getNavigationStartedCount();
+ method public java.util.List<androidx.car.app.navigation.model.Trip!> getTripsSent();
+ method public void reset();
+ }
+
+}
+
diff --git a/car/app/app-testing/api/1.2.0-beta02.txt b/car/app/app-testing/api/1.2.0-beta02.txt
new file mode 100644
index 0000000..d148064
--- /dev/null
+++ b/car/app/app-testing/api/1.2.0-beta02.txt
@@ -0,0 +1,65 @@
+// Signature format: 4.0
+package androidx.car.app.testing {
+
+ public class FakeHost {
+ method public void performNotificationActionClick(android.app.PendingIntent);
+ }
+
+ public class ScreenController {
+ ctor public ScreenController(androidx.car.app.Screen);
+ method public androidx.car.app.Screen getScreen();
+ method public Object? getScreenResult();
+ method public java.util.List<androidx.car.app.model.Template!> getTemplatesReturned();
+ method public androidx.car.app.testing.ScreenController moveToState(androidx.lifecycle.Lifecycle.State);
+ method public void reset();
+ }
+
+ public class SessionController {
+ ctor public SessionController(androidx.car.app.Session, androidx.car.app.testing.TestCarContext, android.content.Intent);
+ method public androidx.car.app.Session getSession();
+ method public androidx.car.app.testing.SessionController moveToState(androidx.lifecycle.Lifecycle.State);
+ }
+
+ public class TestAppManager extends androidx.car.app.AppManager {
+ method public androidx.car.app.SurfaceCallback? getSurfaceCallback();
+ method public java.util.List<android.util.Pair<androidx.car.app.Screen!,androidx.car.app.model.Template!>!> getTemplatesReturned();
+ method public java.util.List<java.lang.CharSequence!> getToastsShown();
+ method public void reset();
+ }
+
+ public class TestCarContext extends androidx.car.app.CarContext {
+ method public static androidx.car.app.testing.TestCarContext createCarContext(android.content.Context);
+ method public androidx.car.app.testing.FakeHost getFakeHost();
+ method public androidx.car.app.testing.TestCarContext.PermissionRequestInfo? getLastPermissionRequestInfo();
+ method public java.util.List<android.content.Intent!> getStartCarAppIntents();
+ method public boolean hasCalledFinishCarApp();
+ method public void reset();
+ }
+
+ public static class TestCarContext.PermissionRequestInfo {
+ method public androidx.car.app.OnRequestPermissionsListener getListener();
+ method public java.util.List<java.lang.String!> getPermissionsRequested();
+ }
+
+ public class TestScreenManager extends androidx.car.app.ScreenManager {
+ method public java.util.List<androidx.car.app.Screen!> getScreensPushed();
+ method public java.util.List<androidx.car.app.Screen!> getScreensRemoved();
+ method public boolean hasScreens();
+ method public void reset();
+ }
+
+}
+
+package androidx.car.app.testing.navigation {
+
+ public class TestNavigationManager extends androidx.car.app.navigation.NavigationManager {
+ ctor public TestNavigationManager(androidx.car.app.testing.TestCarContext, androidx.car.app.HostDispatcher);
+ method public int getNavigationEndedCount();
+ method public androidx.car.app.navigation.NavigationManagerCallback? getNavigationManagerCallback();
+ method public int getNavigationStartedCount();
+ method public java.util.List<androidx.car.app.navigation.model.Trip!> getTripsSent();
+ method public void reset();
+ }
+
+}
+
diff --git a/car/app/app-testing/api/public_plus_experimental_1.2.0-beta01.txt b/car/app/app-testing/api/public_plus_experimental_1.2.0-beta01.txt
new file mode 100644
index 0000000..d148064
--- /dev/null
+++ b/car/app/app-testing/api/public_plus_experimental_1.2.0-beta01.txt
@@ -0,0 +1,65 @@
+// Signature format: 4.0
+package androidx.car.app.testing {
+
+ public class FakeHost {
+ method public void performNotificationActionClick(android.app.PendingIntent);
+ }
+
+ public class ScreenController {
+ ctor public ScreenController(androidx.car.app.Screen);
+ method public androidx.car.app.Screen getScreen();
+ method public Object? getScreenResult();
+ method public java.util.List<androidx.car.app.model.Template!> getTemplatesReturned();
+ method public androidx.car.app.testing.ScreenController moveToState(androidx.lifecycle.Lifecycle.State);
+ method public void reset();
+ }
+
+ public class SessionController {
+ ctor public SessionController(androidx.car.app.Session, androidx.car.app.testing.TestCarContext, android.content.Intent);
+ method public androidx.car.app.Session getSession();
+ method public androidx.car.app.testing.SessionController moveToState(androidx.lifecycle.Lifecycle.State);
+ }
+
+ public class TestAppManager extends androidx.car.app.AppManager {
+ method public androidx.car.app.SurfaceCallback? getSurfaceCallback();
+ method public java.util.List<android.util.Pair<androidx.car.app.Screen!,androidx.car.app.model.Template!>!> getTemplatesReturned();
+ method public java.util.List<java.lang.CharSequence!> getToastsShown();
+ method public void reset();
+ }
+
+ public class TestCarContext extends androidx.car.app.CarContext {
+ method public static androidx.car.app.testing.TestCarContext createCarContext(android.content.Context);
+ method public androidx.car.app.testing.FakeHost getFakeHost();
+ method public androidx.car.app.testing.TestCarContext.PermissionRequestInfo? getLastPermissionRequestInfo();
+ method public java.util.List<android.content.Intent!> getStartCarAppIntents();
+ method public boolean hasCalledFinishCarApp();
+ method public void reset();
+ }
+
+ public static class TestCarContext.PermissionRequestInfo {
+ method public androidx.car.app.OnRequestPermissionsListener getListener();
+ method public java.util.List<java.lang.String!> getPermissionsRequested();
+ }
+
+ public class TestScreenManager extends androidx.car.app.ScreenManager {
+ method public java.util.List<androidx.car.app.Screen!> getScreensPushed();
+ method public java.util.List<androidx.car.app.Screen!> getScreensRemoved();
+ method public boolean hasScreens();
+ method public void reset();
+ }
+
+}
+
+package androidx.car.app.testing.navigation {
+
+ public class TestNavigationManager extends androidx.car.app.navigation.NavigationManager {
+ ctor public TestNavigationManager(androidx.car.app.testing.TestCarContext, androidx.car.app.HostDispatcher);
+ method public int getNavigationEndedCount();
+ method public androidx.car.app.navigation.NavigationManagerCallback? getNavigationManagerCallback();
+ method public int getNavigationStartedCount();
+ method public java.util.List<androidx.car.app.navigation.model.Trip!> getTripsSent();
+ method public void reset();
+ }
+
+}
+
diff --git a/car/app/app-testing/api/public_plus_experimental_1.2.0-beta02.txt b/car/app/app-testing/api/public_plus_experimental_1.2.0-beta02.txt
new file mode 100644
index 0000000..d148064
--- /dev/null
+++ b/car/app/app-testing/api/public_plus_experimental_1.2.0-beta02.txt
@@ -0,0 +1,65 @@
+// Signature format: 4.0
+package androidx.car.app.testing {
+
+ public class FakeHost {
+ method public void performNotificationActionClick(android.app.PendingIntent);
+ }
+
+ public class ScreenController {
+ ctor public ScreenController(androidx.car.app.Screen);
+ method public androidx.car.app.Screen getScreen();
+ method public Object? getScreenResult();
+ method public java.util.List<androidx.car.app.model.Template!> getTemplatesReturned();
+ method public androidx.car.app.testing.ScreenController moveToState(androidx.lifecycle.Lifecycle.State);
+ method public void reset();
+ }
+
+ public class SessionController {
+ ctor public SessionController(androidx.car.app.Session, androidx.car.app.testing.TestCarContext, android.content.Intent);
+ method public androidx.car.app.Session getSession();
+ method public androidx.car.app.testing.SessionController moveToState(androidx.lifecycle.Lifecycle.State);
+ }
+
+ public class TestAppManager extends androidx.car.app.AppManager {
+ method public androidx.car.app.SurfaceCallback? getSurfaceCallback();
+ method public java.util.List<android.util.Pair<androidx.car.app.Screen!,androidx.car.app.model.Template!>!> getTemplatesReturned();
+ method public java.util.List<java.lang.CharSequence!> getToastsShown();
+ method public void reset();
+ }
+
+ public class TestCarContext extends androidx.car.app.CarContext {
+ method public static androidx.car.app.testing.TestCarContext createCarContext(android.content.Context);
+ method public androidx.car.app.testing.FakeHost getFakeHost();
+ method public androidx.car.app.testing.TestCarContext.PermissionRequestInfo? getLastPermissionRequestInfo();
+ method public java.util.List<android.content.Intent!> getStartCarAppIntents();
+ method public boolean hasCalledFinishCarApp();
+ method public void reset();
+ }
+
+ public static class TestCarContext.PermissionRequestInfo {
+ method public androidx.car.app.OnRequestPermissionsListener getListener();
+ method public java.util.List<java.lang.String!> getPermissionsRequested();
+ }
+
+ public class TestScreenManager extends androidx.car.app.ScreenManager {
+ method public java.util.List<androidx.car.app.Screen!> getScreensPushed();
+ method public java.util.List<androidx.car.app.Screen!> getScreensRemoved();
+ method public boolean hasScreens();
+ method public void reset();
+ }
+
+}
+
+package androidx.car.app.testing.navigation {
+
+ public class TestNavigationManager extends androidx.car.app.navigation.NavigationManager {
+ ctor public TestNavigationManager(androidx.car.app.testing.TestCarContext, androidx.car.app.HostDispatcher);
+ method public int getNavigationEndedCount();
+ method public androidx.car.app.navigation.NavigationManagerCallback? getNavigationManagerCallback();
+ method public int getNavigationStartedCount();
+ method public java.util.List<androidx.car.app.navigation.model.Trip!> getTripsSent();
+ method public void reset();
+ }
+
+}
+
diff --git a/wear/watchface/watchface-complications-data-core/api/res-current.txt b/car/app/app-testing/api/res-1.2.0-beta01.txt
similarity index 100%
copy from wear/watchface/watchface-complications-data-core/api/res-current.txt
copy to car/app/app-testing/api/res-1.2.0-beta01.txt
diff --git a/wear/watchface/watchface-complications-data-core/api/res-current.txt b/car/app/app-testing/api/res-1.2.0-beta02.txt
similarity index 100%
copy from wear/watchface/watchface-complications-data-core/api/res-current.txt
copy to car/app/app-testing/api/res-1.2.0-beta02.txt
diff --git a/car/app/app-testing/api/restricted_1.2.0-beta01.txt b/car/app/app-testing/api/restricted_1.2.0-beta01.txt
new file mode 100644
index 0000000..d148064
--- /dev/null
+++ b/car/app/app-testing/api/restricted_1.2.0-beta01.txt
@@ -0,0 +1,65 @@
+// Signature format: 4.0
+package androidx.car.app.testing {
+
+ public class FakeHost {
+ method public void performNotificationActionClick(android.app.PendingIntent);
+ }
+
+ public class ScreenController {
+ ctor public ScreenController(androidx.car.app.Screen);
+ method public androidx.car.app.Screen getScreen();
+ method public Object? getScreenResult();
+ method public java.util.List<androidx.car.app.model.Template!> getTemplatesReturned();
+ method public androidx.car.app.testing.ScreenController moveToState(androidx.lifecycle.Lifecycle.State);
+ method public void reset();
+ }
+
+ public class SessionController {
+ ctor public SessionController(androidx.car.app.Session, androidx.car.app.testing.TestCarContext, android.content.Intent);
+ method public androidx.car.app.Session getSession();
+ method public androidx.car.app.testing.SessionController moveToState(androidx.lifecycle.Lifecycle.State);
+ }
+
+ public class TestAppManager extends androidx.car.app.AppManager {
+ method public androidx.car.app.SurfaceCallback? getSurfaceCallback();
+ method public java.util.List<android.util.Pair<androidx.car.app.Screen!,androidx.car.app.model.Template!>!> getTemplatesReturned();
+ method public java.util.List<java.lang.CharSequence!> getToastsShown();
+ method public void reset();
+ }
+
+ public class TestCarContext extends androidx.car.app.CarContext {
+ method public static androidx.car.app.testing.TestCarContext createCarContext(android.content.Context);
+ method public androidx.car.app.testing.FakeHost getFakeHost();
+ method public androidx.car.app.testing.TestCarContext.PermissionRequestInfo? getLastPermissionRequestInfo();
+ method public java.util.List<android.content.Intent!> getStartCarAppIntents();
+ method public boolean hasCalledFinishCarApp();
+ method public void reset();
+ }
+
+ public static class TestCarContext.PermissionRequestInfo {
+ method public androidx.car.app.OnRequestPermissionsListener getListener();
+ method public java.util.List<java.lang.String!> getPermissionsRequested();
+ }
+
+ public class TestScreenManager extends androidx.car.app.ScreenManager {
+ method public java.util.List<androidx.car.app.Screen!> getScreensPushed();
+ method public java.util.List<androidx.car.app.Screen!> getScreensRemoved();
+ method public boolean hasScreens();
+ method public void reset();
+ }
+
+}
+
+package androidx.car.app.testing.navigation {
+
+ public class TestNavigationManager extends androidx.car.app.navigation.NavigationManager {
+ ctor public TestNavigationManager(androidx.car.app.testing.TestCarContext, androidx.car.app.HostDispatcher);
+ method public int getNavigationEndedCount();
+ method public androidx.car.app.navigation.NavigationManagerCallback? getNavigationManagerCallback();
+ method public int getNavigationStartedCount();
+ method public java.util.List<androidx.car.app.navigation.model.Trip!> getTripsSent();
+ method public void reset();
+ }
+
+}
+
diff --git a/car/app/app-testing/api/restricted_1.2.0-beta02.txt b/car/app/app-testing/api/restricted_1.2.0-beta02.txt
new file mode 100644
index 0000000..d148064
--- /dev/null
+++ b/car/app/app-testing/api/restricted_1.2.0-beta02.txt
@@ -0,0 +1,65 @@
+// Signature format: 4.0
+package androidx.car.app.testing {
+
+ public class FakeHost {
+ method public void performNotificationActionClick(android.app.PendingIntent);
+ }
+
+ public class ScreenController {
+ ctor public ScreenController(androidx.car.app.Screen);
+ method public androidx.car.app.Screen getScreen();
+ method public Object? getScreenResult();
+ method public java.util.List<androidx.car.app.model.Template!> getTemplatesReturned();
+ method public androidx.car.app.testing.ScreenController moveToState(androidx.lifecycle.Lifecycle.State);
+ method public void reset();
+ }
+
+ public class SessionController {
+ ctor public SessionController(androidx.car.app.Session, androidx.car.app.testing.TestCarContext, android.content.Intent);
+ method public androidx.car.app.Session getSession();
+ method public androidx.car.app.testing.SessionController moveToState(androidx.lifecycle.Lifecycle.State);
+ }
+
+ public class TestAppManager extends androidx.car.app.AppManager {
+ method public androidx.car.app.SurfaceCallback? getSurfaceCallback();
+ method public java.util.List<android.util.Pair<androidx.car.app.Screen!,androidx.car.app.model.Template!>!> getTemplatesReturned();
+ method public java.util.List<java.lang.CharSequence!> getToastsShown();
+ method public void reset();
+ }
+
+ public class TestCarContext extends androidx.car.app.CarContext {
+ method public static androidx.car.app.testing.TestCarContext createCarContext(android.content.Context);
+ method public androidx.car.app.testing.FakeHost getFakeHost();
+ method public androidx.car.app.testing.TestCarContext.PermissionRequestInfo? getLastPermissionRequestInfo();
+ method public java.util.List<android.content.Intent!> getStartCarAppIntents();
+ method public boolean hasCalledFinishCarApp();
+ method public void reset();
+ }
+
+ public static class TestCarContext.PermissionRequestInfo {
+ method public androidx.car.app.OnRequestPermissionsListener getListener();
+ method public java.util.List<java.lang.String!> getPermissionsRequested();
+ }
+
+ public class TestScreenManager extends androidx.car.app.ScreenManager {
+ method public java.util.List<androidx.car.app.Screen!> getScreensPushed();
+ method public java.util.List<androidx.car.app.Screen!> getScreensRemoved();
+ method public boolean hasScreens();
+ method public void reset();
+ }
+
+}
+
+package androidx.car.app.testing.navigation {
+
+ public class TestNavigationManager extends androidx.car.app.navigation.NavigationManager {
+ ctor public TestNavigationManager(androidx.car.app.testing.TestCarContext, androidx.car.app.HostDispatcher);
+ method public int getNavigationEndedCount();
+ method public androidx.car.app.navigation.NavigationManagerCallback? getNavigationManagerCallback();
+ method public int getNavigationStartedCount();
+ method public java.util.List<androidx.car.app.navigation.model.Trip!> getTripsSent();
+ method public void reset();
+ }
+
+}
+
diff --git a/car/app/app/api/1.2.0-beta01.txt b/car/app/app/api/1.2.0-beta01.txt
new file mode 100644
index 0000000..a6a92f8
--- /dev/null
+++ b/car/app/app/api/1.2.0-beta01.txt
@@ -0,0 +1,1441 @@
+// Signature format: 4.0
+package androidx.car.app {
+
+ @androidx.car.app.annotations.CarProtocol public final class AppInfo {
+ ctor @VisibleForTesting public AppInfo(int, int, String);
+ method public int getLatestCarAppApiLevel();
+ method public String getLibraryDisplayVersion();
+ method public int getMinCarAppApiLevel();
+ field public static final String MIN_API_LEVEL_METADATA_KEY = "androidx.car.app.minCarApiLevel";
+ }
+
+ public class AppManager implements androidx.car.app.managers.Manager {
+ method public void invalidate();
+ method public void setSurfaceCallback(androidx.car.app.SurfaceCallback?);
+ method public void showToast(CharSequence, int);
+ }
+
+ public final class CarAppPermission {
+ method public static void checkHasLibraryPermission(android.content.Context, String);
+ method public static void checkHasPermission(android.content.Context, String);
+ field public static final String ACCESS_SURFACE = "androidx.car.app.ACCESS_SURFACE";
+ field public static final String MAP_TEMPLATES = "androidx.car.app.MAP_TEMPLATES";
+ field public static final String NAVIGATION_TEMPLATES = "androidx.car.app.NAVIGATION_TEMPLATES";
+ }
+
+ public abstract class CarAppService extends android.app.Service {
+ ctor public CarAppService();
+ method public abstract androidx.car.app.validation.HostValidator createHostValidator();
+ method @CallSuper public final void dump(java.io.FileDescriptor, java.io.PrintWriter, String![]?);
+ method public final androidx.car.app.Session? getCurrentSession();
+ method public final androidx.car.app.HostInfo? getHostInfo();
+ method @CallSuper public final android.os.IBinder onBind(android.content.Intent);
+ method public abstract androidx.car.app.Session onCreateSession();
+ method public final boolean onUnbind(android.content.Intent);
+ field public static final String CATEGORY_CHARGING_APP = "androidx.car.app.category.CHARGING";
+ field public static final String CATEGORY_NAVIGATION_APP = "androidx.car.app.category.NAVIGATION";
+ field public static final String CATEGORY_PARKING_APP = "androidx.car.app.category.PARKING";
+ field public static final String SERVICE_INTERFACE = "androidx.car.app.CarAppService";
+ }
+
+ public class CarContext extends android.content.ContextWrapper {
+ method public void finishCarApp();
+ method @androidx.car.app.annotations.RequiresCarApi(2) public android.content.ComponentName? getCallingComponent();
+ method public int getCarAppApiLevel();
+ method public Object getCarService(String);
+ method public <T> T getCarService(Class<T!>);
+ method public String getCarServiceName(Class<?>);
+ method public androidx.car.app.HostInfo? getHostInfo();
+ method public androidx.activity.OnBackPressedDispatcher getOnBackPressedDispatcher();
+ method public boolean isDarkMode();
+ method public void requestPermissions(java.util.List<java.lang.String!>, androidx.car.app.OnRequestPermissionsListener);
+ method public void requestPermissions(java.util.List<java.lang.String!>, java.util.concurrent.Executor, androidx.car.app.OnRequestPermissionsListener);
+ method @androidx.car.app.annotations.RequiresCarApi(2) public void setCarAppResult(int, android.content.Intent?);
+ method public void startCarApp(android.content.Intent);
+ method @Deprecated public static void startCarApp(android.content.Intent, android.content.Intent);
+ field public static final String ACTION_NAVIGATE = "androidx.car.app.action.NAVIGATE";
+ field public static final String APP_SERVICE = "app";
+ field public static final String CAR_SERVICE = "car";
+ field @androidx.car.app.annotations.RequiresCarApi(2) public static final String CONSTRAINT_SERVICE = "constraints";
+ field public static final String EXTRA_START_CAR_APP_BINDER_KEY = "androidx.car.app.extra.START_CAR_APP_BINDER_KEY";
+ field @androidx.car.app.annotations.RequiresCarApi(3) public static final String HARDWARE_SERVICE = "hardware";
+ field public static final String NAVIGATION_SERVICE = "navigation";
+ field public static final String SCREEN_SERVICE = "screen";
+ }
+
+ public final class CarToast {
+ method public static androidx.car.app.CarToast makeText(androidx.car.app.CarContext, @StringRes int, int);
+ method public static androidx.car.app.CarToast makeText(androidx.car.app.CarContext, CharSequence, int);
+ method public void setDuration(int);
+ method public void setText(@StringRes int);
+ method public void setText(CharSequence);
+ method public void show();
+ field public static final int LENGTH_LONG = 1; // 0x1
+ field public static final int LENGTH_SHORT = 0; // 0x0
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class FailureResponse {
+ ctor public FailureResponse(Throwable);
+ method public int getErrorType();
+ method public String getStackTrace();
+ field public static final int BUNDLER_EXCEPTION = 1; // 0x1
+ field public static final int ILLEGAL_STATE_EXCEPTION = 2; // 0x2
+ field public static final int INVALID_PARAMETER_EXCEPTION = 3; // 0x3
+ field public static final int REMOTE_EXCEPTION = 6; // 0x6
+ field public static final int RUNTIME_EXCEPTION = 5; // 0x5
+ field public static final int SECURITY_EXCEPTION = 4; // 0x4
+ field public static final int UNKNOWN_ERROR = 0; // 0x0
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class HandshakeInfo {
+ ctor public HandshakeInfo(String, int);
+ method public int getHostCarAppApiLevel();
+ method public String getHostPackageName();
+ }
+
+ public final class HostException extends java.lang.RuntimeException {
+ ctor public HostException(String);
+ ctor public HostException(String, Throwable);
+ ctor public HostException(Throwable);
+ }
+
+ public final class HostInfo {
+ ctor public HostInfo(String, int);
+ method public String getPackageName();
+ method public int getUid();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface OnDoneCallback {
+ method public default void onFailure(androidx.car.app.serialization.Bundleable);
+ method public default void onSuccess(androidx.car.app.serialization.Bundleable?);
+ }
+
+ public interface OnRequestPermissionsListener {
+ method public void onRequestPermissionsResult(java.util.List<java.lang.String!>, java.util.List<java.lang.String!>);
+ }
+
+ public interface OnScreenResultListener {
+ method public void onScreenResult(Object?);
+ }
+
+ public abstract class Screen implements androidx.lifecycle.LifecycleOwner {
+ ctor protected Screen(androidx.car.app.CarContext);
+ method public final void finish();
+ method public final androidx.car.app.CarContext getCarContext();
+ method public final androidx.lifecycle.Lifecycle getLifecycle();
+ method public String? getMarker();
+ method public final androidx.car.app.ScreenManager getScreenManager();
+ method public final void invalidate();
+ method public abstract androidx.car.app.model.Template onGetTemplate();
+ method public void setMarker(String?);
+ method public void setResult(Object?);
+ }
+
+ @MainThread public class ScreenManager implements androidx.car.app.managers.Manager {
+ method public int getStackSize();
+ method public androidx.car.app.Screen getTop();
+ method public void pop();
+ method public void popTo(String);
+ method public void popToRoot();
+ method public void push(androidx.car.app.Screen);
+ method public void pushForResult(androidx.car.app.Screen, androidx.car.app.OnScreenResultListener);
+ method public void remove(androidx.car.app.Screen);
+ }
+
+ public abstract class Session implements androidx.lifecycle.LifecycleOwner {
+ ctor public Session();
+ method public final androidx.car.app.CarContext getCarContext();
+ method public androidx.lifecycle.Lifecycle getLifecycle();
+ method public void onCarConfigurationChanged(android.content.res.Configuration);
+ method public abstract androidx.car.app.Screen onCreateScreen(android.content.Intent);
+ method public void onNewIntent(android.content.Intent);
+ }
+
+ public interface SurfaceCallback {
+ method @androidx.car.app.annotations.RequiresCarApi(2) public default void onFling(float, float);
+ method @androidx.car.app.annotations.RequiresCarApi(2) public default void onScale(float, float, float);
+ method @androidx.car.app.annotations.RequiresCarApi(2) public default void onScroll(float, float);
+ method public default void onStableAreaChanged(android.graphics.Rect);
+ method public default void onSurfaceAvailable(androidx.car.app.SurfaceContainer);
+ method public default void onSurfaceDestroyed(androidx.car.app.SurfaceContainer);
+ method public default void onVisibleAreaChanged(android.graphics.Rect);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class SurfaceContainer {
+ ctor public SurfaceContainer(android.view.Surface?, int, int, int);
+ method public int getDpi();
+ method public int getHeight();
+ method public android.view.Surface? getSurface();
+ method public int getWidth();
+ }
+
+}
+
+package androidx.car.app.annotations {
+
+ @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) @java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE, java.lang.annotation.ElementType.PARAMETER}) public @interface CarProtocol {
+ }
+
+ @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE, java.lang.annotation.ElementType.CONSTRUCTOR, java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.METHOD}) public @interface RequiresCarApi {
+ method public abstract int value();
+ }
+
+}
+
+package androidx.car.app.connection {
+
+ public final class CarConnection {
+ ctor public CarConnection(android.content.Context);
+ method public androidx.lifecycle.LiveData<java.lang.Integer!> getType();
+ field public static final String ACTION_CAR_CONNECTION_UPDATED = "androidx.car.app.connection.action.CAR_CONNECTION_UPDATED";
+ field public static final String CAR_CONNECTION_STATE = "CarConnectionState";
+ field public static final int CONNECTION_TYPE_NATIVE = 1; // 0x1
+ field public static final int CONNECTION_TYPE_NOT_CONNECTED = 0; // 0x0
+ field public static final int CONNECTION_TYPE_PROJECTION = 2; // 0x2
+ }
+
+}
+
+package androidx.car.app.constraints {
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public class ConstraintManager implements androidx.car.app.managers.Manager {
+ method public int getContentLimit(int);
+ field public static final int CONTENT_LIMIT_TYPE_GRID = 1; // 0x1
+ field public static final int CONTENT_LIMIT_TYPE_LIST = 0; // 0x0
+ field public static final int CONTENT_LIMIT_TYPE_PANE = 4; // 0x4
+ field public static final int CONTENT_LIMIT_TYPE_PLACE_LIST = 2; // 0x2
+ field public static final int CONTENT_LIMIT_TYPE_ROUTE_LIST = 3; // 0x3
+ }
+
+}
+
+package androidx.car.app.hardware {
+
+ @MainThread @androidx.car.app.annotations.RequiresCarApi(3) public interface CarHardwareManager extends androidx.car.app.managers.Manager {
+ method public default androidx.car.app.hardware.info.CarInfo getCarInfo();
+ method public default androidx.car.app.hardware.info.CarSensors getCarSensors();
+ }
+
+}
+
+package androidx.car.app.hardware.common {
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class CarUnit {
+ method public static String toString(int);
+ field public static final int KILOMETER = 3; // 0x3
+ field public static final int KILOMETERS_PER_HOUR = 102; // 0x66
+ field public static final int METER = 2; // 0x2
+ field public static final int METERS_PER_SEC = 101; // 0x65
+ field public static final int MILE = 4; // 0x4
+ field public static final int MILES_PER_HOUR = 103; // 0x67
+ field public static final int MILLIMETER = 1; // 0x1
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class CarValue<T> {
+ ctor public CarValue(T?, long, int);
+ method public int getStatus();
+ method public long getTimestampMillis();
+ method public T? getValue();
+ field public static final int STATUS_SUCCESS = 1; // 0x1
+ field public static final int STATUS_UNAVAILABLE = 3; // 0x3
+ field public static final int STATUS_UNIMPLEMENTED = 2; // 0x2
+ field public static final int STATUS_UNKNOWN = 0; // 0x0
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public interface OnCarDataAvailableListener<T> {
+ method public void onCarDataAvailable(T);
+ }
+
+}
+
+package androidx.car.app.hardware.info {
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class Accelerometer {
+ ctor public Accelerometer(androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Float!>!>);
+ method public androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Float!>!> getForces();
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class CarHardwareLocation {
+ ctor public CarHardwareLocation(androidx.car.app.hardware.common.CarValue<android.location.Location!>);
+ method public androidx.car.app.hardware.common.CarValue<android.location.Location!> getLocation();
+ }
+
+ @MainThread @androidx.car.app.annotations.RequiresCarApi(3) public interface CarInfo {
+ method public void addEnergyLevelListener(java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.EnergyLevel!>);
+ method public void addMileageListener(java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Mileage!>);
+ method public void addSpeedListener(java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Speed!>);
+ method public void addTollListener(java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.TollCard!>);
+ method public void fetchEnergyProfile(java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.EnergyProfile!>);
+ method public void fetchModel(java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Model!>);
+ method public void removeEnergyLevelListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.EnergyLevel!>);
+ method public void removeMileageListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Mileage!>);
+ method public void removeSpeedListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Speed!>);
+ method public void removeTollListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.TollCard!>);
+ }
+
+ @MainThread @androidx.car.app.annotations.RequiresCarApi(3) public interface CarSensors {
+ method public void addAccelerometerListener(int, java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Accelerometer!>);
+ method public void addCarHardwareLocationListener(int, java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.CarHardwareLocation!>);
+ method public void addCompassListener(int, java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Compass!>);
+ method public void addGyroscopeListener(int, java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Gyroscope!>);
+ method public void removeAccelerometerListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Accelerometer!>);
+ method public void removeCarHardwareLocationListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.CarHardwareLocation!>);
+ method public void removeCompassListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Compass!>);
+ method public void removeGyroscopeListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Gyroscope!>);
+ field public static final int UPDATE_RATE_FASTEST = 3; // 0x3
+ field public static final int UPDATE_RATE_NORMAL = 1; // 0x1
+ field public static final int UPDATE_RATE_UI = 2; // 0x2
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class Compass {
+ ctor public Compass(androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Float!>!>);
+ method public androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Float!>!> getOrientations();
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class EnergyLevel {
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Float!> getBatteryPercent();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Integer!> getDistanceDisplayUnit();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Boolean!> getEnergyIsLow();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Float!> getFuelPercent();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Float!> getRangeRemainingMeters();
+ }
+
+ public static final class EnergyLevel.Builder {
+ ctor public EnergyLevel.Builder();
+ method public androidx.car.app.hardware.info.EnergyLevel build();
+ method public androidx.car.app.hardware.info.EnergyLevel.Builder setBatteryPercent(androidx.car.app.hardware.common.CarValue<java.lang.Float!>);
+ method public androidx.car.app.hardware.info.EnergyLevel.Builder setDistanceDisplayUnit(androidx.car.app.hardware.common.CarValue<java.lang.Integer!>);
+ method public androidx.car.app.hardware.info.EnergyLevel.Builder setEnergyIsLow(androidx.car.app.hardware.common.CarValue<java.lang.Boolean!>);
+ method public androidx.car.app.hardware.info.EnergyLevel.Builder setFuelPercent(androidx.car.app.hardware.common.CarValue<java.lang.Float!>);
+ method public androidx.car.app.hardware.info.EnergyLevel.Builder setRangeRemainingMeters(androidx.car.app.hardware.common.CarValue<java.lang.Float!>);
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class EnergyProfile {
+ method public androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Integer!>!> getEvConnectorTypes();
+ method public androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Integer!>!> getFuelTypes();
+ field public static final int EVCONNECTOR_TYPE_CHADEMO = 3; // 0x3
+ field public static final int EVCONNECTOR_TYPE_COMBO_1 = 4; // 0x4
+ field public static final int EVCONNECTOR_TYPE_COMBO_2 = 5; // 0x5
+ field public static final int EVCONNECTOR_TYPE_GBT = 9; // 0x9
+ field public static final int EVCONNECTOR_TYPE_GBT_DC = 10; // 0xa
+ field public static final int EVCONNECTOR_TYPE_J1772 = 1; // 0x1
+ field public static final int EVCONNECTOR_TYPE_MENNEKES = 2; // 0x2
+ field public static final int EVCONNECTOR_TYPE_OTHER = 101; // 0x65
+ field public static final int EVCONNECTOR_TYPE_SCAME = 11; // 0xb
+ field public static final int EVCONNECTOR_TYPE_TESLA_HPWC = 7; // 0x7
+ field public static final int EVCONNECTOR_TYPE_TESLA_ROADSTER = 6; // 0x6
+ field public static final int EVCONNECTOR_TYPE_TESLA_SUPERCHARGER = 8; // 0x8
+ field public static final int EVCONNECTOR_TYPE_UNKNOWN = 0; // 0x0
+ field public static final int FUEL_TYPE_BIODIESEL = 5; // 0x5
+ field public static final int FUEL_TYPE_CNG = 8; // 0x8
+ field public static final int FUEL_TYPE_DIESEL_1 = 3; // 0x3
+ field public static final int FUEL_TYPE_DIESEL_2 = 4; // 0x4
+ field public static final int FUEL_TYPE_E85 = 6; // 0x6
+ field public static final int FUEL_TYPE_ELECTRIC = 10; // 0xa
+ field public static final int FUEL_TYPE_HYDROGEN = 11; // 0xb
+ field public static final int FUEL_TYPE_LEADED = 2; // 0x2
+ field public static final int FUEL_TYPE_LNG = 9; // 0x9
+ field public static final int FUEL_TYPE_LPG = 7; // 0x7
+ field public static final int FUEL_TYPE_OTHER = 12; // 0xc
+ field public static final int FUEL_TYPE_UNKNOWN = 0; // 0x0
+ field public static final int FUEL_TYPE_UNLEADED = 1; // 0x1
+ }
+
+ public static final class EnergyProfile.Builder {
+ ctor public EnergyProfile.Builder();
+ method public androidx.car.app.hardware.info.EnergyProfile build();
+ method public androidx.car.app.hardware.info.EnergyProfile.Builder setEvConnectorTypes(androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Integer!>!>);
+ method public androidx.car.app.hardware.info.EnergyProfile.Builder setFuelTypes(androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Integer!>!>);
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class Gyroscope {
+ ctor public Gyroscope(androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Float!>!>);
+ method public androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Float!>!> getRotations();
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class Mileage {
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Integer!> getDistanceDisplayUnit();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Float!> getOdometerMeters();
+ }
+
+ public static final class Mileage.Builder {
+ ctor public Mileage.Builder();
+ method public androidx.car.app.hardware.info.Mileage build();
+ method public androidx.car.app.hardware.info.Mileage.Builder setDistanceDisplayUnit(androidx.car.app.hardware.common.CarValue<java.lang.Integer!>);
+ method public androidx.car.app.hardware.info.Mileage.Builder setOdometerMeters(androidx.car.app.hardware.common.CarValue<java.lang.Float!>);
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class Model {
+ method public androidx.car.app.hardware.common.CarValue<java.lang.String!> getManufacturer();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.String!> getName();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Integer!> getYear();
+ }
+
+ public static final class Model.Builder {
+ ctor public Model.Builder();
+ method public androidx.car.app.hardware.info.Model build();
+ method public androidx.car.app.hardware.info.Model.Builder setManufacturer(androidx.car.app.hardware.common.CarValue<java.lang.String!>);
+ method public androidx.car.app.hardware.info.Model.Builder setName(androidx.car.app.hardware.common.CarValue<java.lang.String!>);
+ method public androidx.car.app.hardware.info.Model.Builder setYear(androidx.car.app.hardware.common.CarValue<java.lang.Integer!>);
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class Speed {
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Float!> getDisplaySpeedMetersPerSecond();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Float!> getRawSpeedMetersPerSecond();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Integer!> getSpeedDisplayUnit();
+ }
+
+ public static final class Speed.Builder {
+ ctor public Speed.Builder();
+ method public androidx.car.app.hardware.info.Speed build();
+ method public androidx.car.app.hardware.info.Speed.Builder setDisplaySpeedMetersPerSecond(androidx.car.app.hardware.common.CarValue<java.lang.Float!>);
+ method public androidx.car.app.hardware.info.Speed.Builder setRawSpeedMetersPerSecond(androidx.car.app.hardware.common.CarValue<java.lang.Float!>);
+ method public androidx.car.app.hardware.info.Speed.Builder setSpeedDisplayUnit(androidx.car.app.hardware.common.CarValue<java.lang.Integer!>);
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class TollCard {
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Integer!> getCardState();
+ field public static final int TOLLCARD_STATE_INVALID = 2; // 0x2
+ field public static final int TOLLCARD_STATE_NOT_INSERTED = 3; // 0x3
+ field public static final int TOLLCARD_STATE_UNKNOWN = 0; // 0x0
+ field public static final int TOLLCARD_STATE_VALID = 1; // 0x1
+ }
+
+ public static final class TollCard.Builder {
+ ctor public TollCard.Builder();
+ method public androidx.car.app.hardware.info.TollCard build();
+ method public androidx.car.app.hardware.info.TollCard.Builder setCardState(androidx.car.app.hardware.common.CarValue<java.lang.Integer!>);
+ }
+
+}
+
+package androidx.car.app.managers {
+
+ public interface Manager {
+ }
+
+}
+
+package androidx.car.app.model {
+
+ @androidx.car.app.annotations.CarProtocol public final class Action {
+ method public androidx.car.app.model.CarColor? getBackgroundColor();
+ method @androidx.car.app.annotations.RequiresCarApi(4) public int getFlags();
+ method public androidx.car.app.model.CarIcon? getIcon();
+ method public androidx.car.app.model.OnClickDelegate? getOnClickDelegate();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public int getType();
+ method public boolean isStandard();
+ method public static String typeToString(int);
+ field public static final androidx.car.app.model.Action APP_ICON;
+ field public static final androidx.car.app.model.Action BACK;
+ field @androidx.car.app.annotations.RequiresCarApi(4) public static final int FLAG_PRIMARY = 1; // 0x1
+ field public static final androidx.car.app.model.Action PAN;
+ field public static final int TYPE_APP_ICON = 65538; // 0x10002
+ field public static final int TYPE_BACK = 65539; // 0x10003
+ field public static final int TYPE_CUSTOM = 1; // 0x1
+ field public static final int TYPE_PAN = 65540; // 0x10004
+ }
+
+ public static final class Action.Builder {
+ ctor public Action.Builder();
+ ctor @androidx.car.app.annotations.RequiresCarApi(2) public Action.Builder(androidx.car.app.model.Action);
+ method public androidx.car.app.model.Action build();
+ method public androidx.car.app.model.Action.Builder setBackgroundColor(androidx.car.app.model.CarColor);
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.model.Action.Builder setFlags(int);
+ method public androidx.car.app.model.Action.Builder setIcon(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.model.Action.Builder setOnClickListener(androidx.car.app.model.OnClickListener);
+ method public androidx.car.app.model.Action.Builder setTitle(CharSequence);
+ method public androidx.car.app.model.Action.Builder setTitle(androidx.car.app.model.CarText);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class ActionStrip {
+ method public java.util.List<androidx.car.app.model.Action!> getActions();
+ method public androidx.car.app.model.Action? getFirstActionOfType(int);
+ }
+
+ public static final class ActionStrip.Builder {
+ ctor public ActionStrip.Builder();
+ method public androidx.car.app.model.ActionStrip.Builder addAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.ActionStrip build();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class CarColor {
+ method public static androidx.car.app.model.CarColor createCustom(@ColorInt int, @ColorInt int);
+ method @ColorInt public int getColor();
+ method @ColorInt public int getColorDark();
+ method public int getType();
+ field public static final androidx.car.app.model.CarColor BLUE;
+ field public static final androidx.car.app.model.CarColor DEFAULT;
+ field public static final androidx.car.app.model.CarColor GREEN;
+ field public static final androidx.car.app.model.CarColor PRIMARY;
+ field public static final androidx.car.app.model.CarColor RED;
+ field public static final androidx.car.app.model.CarColor SECONDARY;
+ field public static final int TYPE_BLUE = 6; // 0x6
+ field public static final int TYPE_CUSTOM = 0; // 0x0
+ field public static final int TYPE_DEFAULT = 1; // 0x1
+ field public static final int TYPE_GREEN = 5; // 0x5
+ field public static final int TYPE_PRIMARY = 2; // 0x2
+ field public static final int TYPE_RED = 4; // 0x4
+ field public static final int TYPE_SECONDARY = 3; // 0x3
+ field public static final int TYPE_YELLOW = 7; // 0x7
+ field public static final androidx.car.app.model.CarColor YELLOW;
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class CarIcon {
+ method public androidx.core.graphics.drawable.IconCompat? getIcon();
+ method public androidx.car.app.model.CarColor? getTint();
+ method public int getType();
+ field public static final androidx.car.app.model.CarIcon ALERT;
+ field public static final androidx.car.app.model.CarIcon APP_ICON;
+ field public static final androidx.car.app.model.CarIcon BACK;
+ field public static final androidx.car.app.model.CarIcon ERROR;
+ field @androidx.car.app.annotations.RequiresCarApi(2) public static final androidx.car.app.model.CarIcon PAN;
+ field public static final int TYPE_ALERT = 4; // 0x4
+ field public static final int TYPE_APP_ICON = 5; // 0x5
+ field public static final int TYPE_BACK = 3; // 0x3
+ field public static final int TYPE_CUSTOM = 1; // 0x1
+ field public static final int TYPE_ERROR = 6; // 0x6
+ field public static final int TYPE_PAN = 7; // 0x7
+ }
+
+ public static final class CarIcon.Builder {
+ ctor public CarIcon.Builder(androidx.core.graphics.drawable.IconCompat);
+ ctor public CarIcon.Builder(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.model.CarIcon build();
+ method public androidx.car.app.model.CarIcon.Builder setTint(androidx.car.app.model.CarColor);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class CarIconSpan extends androidx.car.app.model.CarSpan {
+ method public static androidx.car.app.model.CarIconSpan create(androidx.car.app.model.CarIcon);
+ method public static androidx.car.app.model.CarIconSpan create(androidx.car.app.model.CarIcon, int);
+ method public int getAlignment();
+ method public androidx.car.app.model.CarIcon getIcon();
+ field public static final int ALIGN_BASELINE = 1; // 0x1
+ field public static final int ALIGN_BOTTOM = 0; // 0x0
+ field public static final int ALIGN_CENTER = 2; // 0x2
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class CarLocation {
+ method public static androidx.car.app.model.CarLocation create(double, double);
+ method public static androidx.car.app.model.CarLocation create(android.location.Location);
+ method public double getLatitude();
+ method public double getLongitude();
+ }
+
+ @Keep @androidx.car.app.annotations.CarProtocol public class CarSpan extends android.text.style.CharacterStyle {
+ ctor public CarSpan();
+ method public void updateDrawState(android.text.TextPaint);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class CarText {
+ method public static androidx.car.app.model.CarText create(CharSequence);
+ method public java.util.List<java.lang.CharSequence!> getVariants();
+ method public boolean isEmpty();
+ method public static boolean isNullOrEmpty(androidx.car.app.model.CarText?);
+ method public CharSequence toCharSequence();
+ }
+
+ public static final class CarText.Builder {
+ ctor public CarText.Builder(CharSequence);
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.model.CarText.Builder addVariant(CharSequence);
+ method public androidx.car.app.model.CarText build();
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(2) public final class ClickableSpan extends androidx.car.app.model.CarSpan {
+ method public static androidx.car.app.model.ClickableSpan create(androidx.car.app.model.OnClickListener);
+ method public androidx.car.app.model.OnClickDelegate getOnClickDelegate();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class DateTimeWithZone {
+ method public static androidx.car.app.model.DateTimeWithZone create(long, @IntRange(from=0xffff02e0, to=64800) int, String);
+ method public static androidx.car.app.model.DateTimeWithZone create(long, java.util.TimeZone);
+ method @RequiresApi(26) public static androidx.car.app.model.DateTimeWithZone create(java.time.ZonedDateTime);
+ method public long getTimeSinceEpochMillis();
+ method public int getZoneOffsetSeconds();
+ method public String? getZoneShortName();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Distance {
+ method public static androidx.car.app.model.Distance create(double, int);
+ method public double getDisplayDistance();
+ method public int getDisplayUnit();
+ field public static final int UNIT_FEET = 6; // 0x6
+ field public static final int UNIT_KILOMETERS = 2; // 0x2
+ field public static final int UNIT_KILOMETERS_P1 = 3; // 0x3
+ field public static final int UNIT_METERS = 1; // 0x1
+ field public static final int UNIT_MILES = 4; // 0x4
+ field public static final int UNIT_MILES_P1 = 5; // 0x5
+ field public static final int UNIT_YARDS = 7; // 0x7
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class DistanceSpan extends androidx.car.app.model.CarSpan {
+ method public static androidx.car.app.model.DistanceSpan create(androidx.car.app.model.Distance);
+ method public androidx.car.app.model.Distance getDistance();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class DurationSpan extends androidx.car.app.model.CarSpan {
+ method public static androidx.car.app.model.DurationSpan create(long);
+ method @RequiresApi(26) public static androidx.car.app.model.DurationSpan create(java.time.Duration);
+ method public long getDurationSeconds();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class ForegroundCarColorSpan extends androidx.car.app.model.CarSpan {
+ method public static androidx.car.app.model.ForegroundCarColorSpan create(androidx.car.app.model.CarColor);
+ method public androidx.car.app.model.CarColor getColor();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class GridItem implements androidx.car.app.model.Item {
+ method public androidx.car.app.model.CarIcon? getImage();
+ method public int getImageType();
+ method public androidx.car.app.model.OnClickDelegate? getOnClickDelegate();
+ method public androidx.car.app.model.CarText? getText();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public boolean isLoading();
+ field public static final int IMAGE_TYPE_ICON = 1; // 0x1
+ field public static final int IMAGE_TYPE_LARGE = 2; // 0x2
+ }
+
+ public static final class GridItem.Builder {
+ ctor public GridItem.Builder();
+ method public androidx.car.app.model.GridItem build();
+ method public androidx.car.app.model.GridItem.Builder setImage(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.model.GridItem.Builder setImage(androidx.car.app.model.CarIcon, int);
+ method public androidx.car.app.model.GridItem.Builder setLoading(boolean);
+ method public androidx.car.app.model.GridItem.Builder setOnClickListener(androidx.car.app.model.OnClickListener);
+ method public androidx.car.app.model.GridItem.Builder setText(CharSequence);
+ method public androidx.car.app.model.GridItem.Builder setText(androidx.car.app.model.CarText);
+ method public androidx.car.app.model.GridItem.Builder setTitle(CharSequence);
+ method public androidx.car.app.model.GridItem.Builder setTitle(androidx.car.app.model.CarText);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class GridTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.ItemList? getSingleList();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public boolean isLoading();
+ }
+
+ public static final class GridTemplate.Builder {
+ ctor public GridTemplate.Builder();
+ method public androidx.car.app.model.GridTemplate build();
+ method public androidx.car.app.model.GridTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.GridTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.GridTemplate.Builder setLoading(boolean);
+ method public androidx.car.app.model.GridTemplate.Builder setSingleList(androidx.car.app.model.ItemList);
+ method public androidx.car.app.model.GridTemplate.Builder setTitle(CharSequence);
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public interface InputCallback {
+ method public default void onInputSubmitted(String);
+ method public default void onInputTextChanged(String);
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public interface InputCallbackDelegate {
+ method public void sendInputSubmitted(String, androidx.car.app.OnDoneCallback);
+ method public void sendInputTextChanged(String, androidx.car.app.OnDoneCallback);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface Item {
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class ItemList {
+ method public java.util.List<androidx.car.app.model.Item!> getItems();
+ method public androidx.car.app.model.CarText? getNoItemsMessage();
+ method public androidx.car.app.model.OnItemVisibilityChangedDelegate? getOnItemVisibilityChangedDelegate();
+ method public androidx.car.app.model.OnSelectedDelegate? getOnSelectedDelegate();
+ method public int getSelectedIndex();
+ }
+
+ public static final class ItemList.Builder {
+ ctor public ItemList.Builder();
+ method public androidx.car.app.model.ItemList.Builder addItem(androidx.car.app.model.Item);
+ method public androidx.car.app.model.ItemList build();
+ method public androidx.car.app.model.ItemList.Builder setNoItemsMessage(CharSequence);
+ method public androidx.car.app.model.ItemList.Builder setOnItemsVisibilityChangedListener(androidx.car.app.model.ItemList.OnItemVisibilityChangedListener);
+ method public androidx.car.app.model.ItemList.Builder setOnSelectedListener(androidx.car.app.model.ItemList.OnSelectedListener);
+ method public androidx.car.app.model.ItemList.Builder setSelectedIndex(@IntRange(from=0) int);
+ }
+
+ public static interface ItemList.OnItemVisibilityChangedListener {
+ method public void onItemVisibilityChanged(int, int);
+ }
+
+ public static interface ItemList.OnSelectedListener {
+ method public void onSelected(int);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class ListTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public java.util.List<androidx.car.app.model.SectionedItemList!> getSectionedLists();
+ method public androidx.car.app.model.ItemList? getSingleList();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public boolean isLoading();
+ }
+
+ public static final class ListTemplate.Builder {
+ ctor public ListTemplate.Builder();
+ method public androidx.car.app.model.ListTemplate.Builder addSectionedList(androidx.car.app.model.SectionedItemList);
+ method public androidx.car.app.model.ListTemplate build();
+ method public androidx.car.app.model.ListTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.ListTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.ListTemplate.Builder setLoading(boolean);
+ method public androidx.car.app.model.ListTemplate.Builder setSingleList(androidx.car.app.model.ItemList);
+ method public androidx.car.app.model.ListTemplate.Builder setTitle(CharSequence);
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public final class LongMessageTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public java.util.List<androidx.car.app.model.Action!> getActions();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.CarText getMessage();
+ method public androidx.car.app.model.CarText? getTitle();
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public static final class LongMessageTemplate.Builder {
+ ctor public LongMessageTemplate.Builder(CharSequence);
+ method public androidx.car.app.model.LongMessageTemplate.Builder addAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.LongMessageTemplate build();
+ method public androidx.car.app.model.LongMessageTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.LongMessageTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.LongMessageTemplate.Builder setTitle(CharSequence);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class MessageTemplate implements androidx.car.app.model.Template {
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public java.util.List<androidx.car.app.model.Action!> getActions();
+ method public androidx.car.app.model.CarText? getDebugMessage();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.CarIcon? getIcon();
+ method public androidx.car.app.model.CarText getMessage();
+ method public androidx.car.app.model.CarText? getTitle();
+ method @androidx.car.app.annotations.RequiresCarApi(2) public boolean isLoading();
+ }
+
+ public static final class MessageTemplate.Builder {
+ ctor public MessageTemplate.Builder(CharSequence);
+ ctor public MessageTemplate.Builder(androidx.car.app.model.CarText);
+ method public androidx.car.app.model.MessageTemplate.Builder addAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.MessageTemplate build();
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.model.MessageTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.MessageTemplate.Builder setDebugMessage(Throwable);
+ method public androidx.car.app.model.MessageTemplate.Builder setDebugMessage(String);
+ method public androidx.car.app.model.MessageTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.MessageTemplate.Builder setIcon(androidx.car.app.model.CarIcon);
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.model.MessageTemplate.Builder setLoading(boolean);
+ method public androidx.car.app.model.MessageTemplate.Builder setTitle(CharSequence);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Metadata {
+ method public androidx.car.app.model.Place? getPlace();
+ field public static final androidx.car.app.model.Metadata EMPTY_METADATA;
+ }
+
+ public static final class Metadata.Builder {
+ ctor public Metadata.Builder();
+ ctor public Metadata.Builder(androidx.car.app.model.Metadata);
+ method public androidx.car.app.model.Metadata build();
+ method public androidx.car.app.model.Metadata.Builder setPlace(androidx.car.app.model.Place);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface OnCheckedChangeDelegate {
+ method public void sendCheckedChange(boolean, androidx.car.app.OnDoneCallback);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface OnClickDelegate {
+ method public boolean isParkedOnly();
+ method public void sendClick(androidx.car.app.OnDoneCallback);
+ }
+
+ public interface OnClickListener {
+ method public void onClick();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface OnItemVisibilityChangedDelegate {
+ method public void sendItemVisibilityChanged(int, int, androidx.car.app.OnDoneCallback);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface OnSelectedDelegate {
+ method public void sendSelected(int, androidx.car.app.OnDoneCallback);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Pane {
+ method public java.util.List<androidx.car.app.model.Action!> getActions();
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.model.CarIcon? getImage();
+ method public java.util.List<androidx.car.app.model.Row!> getRows();
+ method public boolean isLoading();
+ }
+
+ public static final class Pane.Builder {
+ ctor public Pane.Builder();
+ method public androidx.car.app.model.Pane.Builder addAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.Pane.Builder addRow(androidx.car.app.model.Row);
+ method public androidx.car.app.model.Pane build();
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.model.Pane.Builder setImage(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.model.Pane.Builder setLoading(boolean);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class PaneTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.Pane getPane();
+ method public androidx.car.app.model.CarText? getTitle();
+ }
+
+ public static final class PaneTemplate.Builder {
+ ctor public PaneTemplate.Builder(androidx.car.app.model.Pane);
+ method public androidx.car.app.model.PaneTemplate build();
+ method public androidx.car.app.model.PaneTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.PaneTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.PaneTemplate.Builder setTitle(CharSequence);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class ParkedOnlyOnClickListener implements androidx.car.app.model.OnClickListener {
+ method public static androidx.car.app.model.ParkedOnlyOnClickListener create(androidx.car.app.model.OnClickListener);
+ method public void onClick();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Place {
+ method public androidx.car.app.model.CarLocation getLocation();
+ method public androidx.car.app.model.PlaceMarker? getMarker();
+ }
+
+ public static final class Place.Builder {
+ ctor public Place.Builder(androidx.car.app.model.CarLocation);
+ ctor public Place.Builder(androidx.car.app.model.Place);
+ method public androidx.car.app.model.Place build();
+ method public androidx.car.app.model.Place.Builder setMarker(androidx.car.app.model.PlaceMarker);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class PlaceListMapTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.Place? getAnchor();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.ItemList? getItemList();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public boolean isCurrentLocationEnabled();
+ method public boolean isLoading();
+ }
+
+ public static final class PlaceListMapTemplate.Builder {
+ ctor public PlaceListMapTemplate.Builder();
+ method public androidx.car.app.model.PlaceListMapTemplate build();
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setAnchor(androidx.car.app.model.Place);
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setCurrentLocationEnabled(boolean);
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setItemList(androidx.car.app.model.ItemList);
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setLoading(boolean);
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setTitle(CharSequence);
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setTitle(androidx.car.app.model.CarText);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class PlaceMarker {
+ method public androidx.car.app.model.CarColor? getColor();
+ method public androidx.car.app.model.CarIcon? getIcon();
+ method public int getIconType();
+ method public androidx.car.app.model.CarText? getLabel();
+ field public static final int TYPE_ICON = 0; // 0x0
+ field public static final int TYPE_IMAGE = 1; // 0x1
+ }
+
+ public static final class PlaceMarker.Builder {
+ ctor public PlaceMarker.Builder();
+ method public androidx.car.app.model.PlaceMarker build();
+ method public androidx.car.app.model.PlaceMarker.Builder setColor(androidx.car.app.model.CarColor);
+ method public androidx.car.app.model.PlaceMarker.Builder setIcon(androidx.car.app.model.CarIcon, int);
+ method public androidx.car.app.model.PlaceMarker.Builder setLabel(CharSequence);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Row implements androidx.car.app.model.Item {
+ method public androidx.car.app.model.CarIcon? getImage();
+ method public androidx.car.app.model.Metadata? getMetadata();
+ method public androidx.car.app.model.OnClickDelegate? getOnClickDelegate();
+ method public int getRowImageType();
+ method public java.util.List<androidx.car.app.model.CarText!> getTexts();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public androidx.car.app.model.Toggle? getToggle();
+ method public boolean isBrowsable();
+ method public androidx.car.app.model.Row row();
+ method public CharSequence yourBoat();
+ field public static final int IMAGE_TYPE_ICON = 4; // 0x4
+ field public static final int IMAGE_TYPE_LARGE = 2; // 0x2
+ field public static final int IMAGE_TYPE_SMALL = 1; // 0x1
+ }
+
+ public static final class Row.Builder {
+ ctor public Row.Builder();
+ method public androidx.car.app.model.Row.Builder addText(CharSequence);
+ method public androidx.car.app.model.Row.Builder addText(androidx.car.app.model.CarText);
+ method public androidx.car.app.model.Row build();
+ method public androidx.car.app.model.Row.Builder setBrowsable(boolean);
+ method public androidx.car.app.model.Row.Builder setImage(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.model.Row.Builder setImage(androidx.car.app.model.CarIcon, int);
+ method public androidx.car.app.model.Row.Builder setMetadata(androidx.car.app.model.Metadata);
+ method public androidx.car.app.model.Row.Builder setOnClickListener(androidx.car.app.model.OnClickListener);
+ method public androidx.car.app.model.Row.Builder setTitle(CharSequence);
+ method public androidx.car.app.model.Row.Builder setTitle(androidx.car.app.model.CarText);
+ method public androidx.car.app.model.Row.Builder setToggle(androidx.car.app.model.Toggle);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface SearchCallbackDelegate {
+ method public void sendSearchSubmitted(String, androidx.car.app.OnDoneCallback);
+ method public void sendSearchTextChanged(String, androidx.car.app.OnDoneCallback);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class SearchTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public String? getInitialSearchText();
+ method public androidx.car.app.model.ItemList? getItemList();
+ method public androidx.car.app.model.SearchCallbackDelegate getSearchCallbackDelegate();
+ method public String? getSearchHint();
+ method public boolean isLoading();
+ method public boolean isShowKeyboardByDefault();
+ }
+
+ public static final class SearchTemplate.Builder {
+ ctor public SearchTemplate.Builder(androidx.car.app.model.SearchTemplate.SearchCallback);
+ method public androidx.car.app.model.SearchTemplate build();
+ method public androidx.car.app.model.SearchTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.SearchTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.SearchTemplate.Builder setInitialSearchText(String);
+ method public androidx.car.app.model.SearchTemplate.Builder setItemList(androidx.car.app.model.ItemList);
+ method public androidx.car.app.model.SearchTemplate.Builder setLoading(boolean);
+ method public androidx.car.app.model.SearchTemplate.Builder setSearchHint(String);
+ method public androidx.car.app.model.SearchTemplate.Builder setShowKeyboardByDefault(boolean);
+ }
+
+ public static interface SearchTemplate.SearchCallback {
+ method public default void onSearchSubmitted(String);
+ method public default void onSearchTextChanged(String);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class SectionedItemList {
+ method public static androidx.car.app.model.SectionedItemList create(androidx.car.app.model.ItemList, CharSequence);
+ method public androidx.car.app.model.CarText getHeader();
+ method public androidx.car.app.model.ItemList getItemList();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface Template {
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class TemplateInfo {
+ ctor public TemplateInfo(Class<? extends androidx.car.app.model.Template>, String);
+ method public Class<? extends androidx.car.app.model.Template> getTemplateClass();
+ method public String getTemplateId();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class TemplateWrapper {
+ method public static androidx.car.app.model.TemplateWrapper copyOf(androidx.car.app.model.TemplateWrapper);
+ method public int getCurrentTaskStep();
+ method public String getId();
+ method public androidx.car.app.model.Template getTemplate();
+ method public java.util.List<androidx.car.app.model.TemplateInfo!> getTemplateInfosForScreenStack();
+ method public boolean isRefresh();
+ method public void setCurrentTaskStep(int);
+ method public void setId(String);
+ method public void setRefresh(boolean);
+ method public void setTemplate(androidx.car.app.model.Template);
+ method public static androidx.car.app.model.TemplateWrapper wrap(androidx.car.app.model.Template);
+ method public static androidx.car.app.model.TemplateWrapper wrap(androidx.car.app.model.Template, String);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Toggle {
+ method public androidx.car.app.model.OnCheckedChangeDelegate getOnCheckedChangeDelegate();
+ method public boolean isChecked();
+ }
+
+ public static final class Toggle.Builder {
+ ctor public Toggle.Builder(androidx.car.app.model.Toggle.OnCheckedChangeListener);
+ method public androidx.car.app.model.Toggle build();
+ method public androidx.car.app.model.Toggle.Builder setChecked(boolean);
+ }
+
+ public static interface Toggle.OnCheckedChangeListener {
+ method public void onCheckedChange(boolean);
+ }
+
+}
+
+package androidx.car.app.model.signin {
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public final class InputSignInMethod implements androidx.car.app.model.signin.SignInTemplate.SignInMethod {
+ method public androidx.car.app.model.CarText? getDefaultValue();
+ method public androidx.car.app.model.CarText? getErrorMessage();
+ method public androidx.car.app.model.CarText? getHint();
+ method public androidx.car.app.model.InputCallbackDelegate getInputCallbackDelegate();
+ method public int getInputType();
+ method public int getKeyboardType();
+ method public boolean isShowKeyboardByDefault();
+ field public static final int INPUT_TYPE_DEFAULT = 1; // 0x1
+ field public static final int INPUT_TYPE_PASSWORD = 2; // 0x2
+ field public static final int KEYBOARD_DEFAULT = 1; // 0x1
+ field public static final int KEYBOARD_EMAIL = 2; // 0x2
+ field public static final int KEYBOARD_NUMBER = 4; // 0x4
+ field public static final int KEYBOARD_PHONE = 3; // 0x3
+ }
+
+ public static final class InputSignInMethod.Builder {
+ ctor public InputSignInMethod.Builder(androidx.car.app.model.InputCallback);
+ method public androidx.car.app.model.signin.InputSignInMethod build();
+ method public androidx.car.app.model.signin.InputSignInMethod.Builder setDefaultValue(String);
+ method public androidx.car.app.model.signin.InputSignInMethod.Builder setErrorMessage(CharSequence);
+ method public androidx.car.app.model.signin.InputSignInMethod.Builder setHint(CharSequence);
+ method public androidx.car.app.model.signin.InputSignInMethod.Builder setInputType(int);
+ method public androidx.car.app.model.signin.InputSignInMethod.Builder setKeyboardType(int);
+ method public androidx.car.app.model.signin.InputSignInMethod.Builder setShowKeyboardByDefault(boolean);
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public final class PinSignInMethod implements androidx.car.app.model.signin.SignInTemplate.SignInMethod {
+ ctor public PinSignInMethod(CharSequence);
+ method public androidx.car.app.model.CarText getPinCode();
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public final class ProviderSignInMethod implements androidx.car.app.model.signin.SignInTemplate.SignInMethod {
+ ctor public ProviderSignInMethod(androidx.car.app.model.Action);
+ method public androidx.car.app.model.Action getAction();
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(4) public final class QRCodeSignInMethod implements androidx.car.app.model.signin.SignInTemplate.SignInMethod {
+ ctor public QRCodeSignInMethod(android.net.Uri);
+ method public android.net.Uri getUri();
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public final class SignInTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public java.util.List<androidx.car.app.model.Action!> getActions();
+ method public androidx.car.app.model.CarText? getAdditionalText();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.CarText? getInstructions();
+ method public androidx.car.app.model.signin.SignInTemplate.SignInMethod getSignInMethod();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public boolean isLoading();
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public static final class SignInTemplate.Builder {
+ ctor public SignInTemplate.Builder(androidx.car.app.model.signin.SignInTemplate.SignInMethod);
+ method public androidx.car.app.model.signin.SignInTemplate.Builder addAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.signin.SignInTemplate build();
+ method public androidx.car.app.model.signin.SignInTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.signin.SignInTemplate.Builder setAdditionalText(CharSequence);
+ method public androidx.car.app.model.signin.SignInTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.signin.SignInTemplate.Builder setInstructions(CharSequence);
+ method public androidx.car.app.model.signin.SignInTemplate.Builder setLoading(boolean);
+ method public androidx.car.app.model.signin.SignInTemplate.Builder setTitle(CharSequence);
+ }
+
+ public static interface SignInTemplate.SignInMethod {
+ }
+
+}
+
+package androidx.car.app.navigation {
+
+ public class NavigationManager implements androidx.car.app.managers.Manager {
+ method @MainThread public void clearNavigationManagerCallback();
+ method @MainThread public void navigationEnded();
+ method @MainThread public void navigationStarted();
+ method @MainThread public void setNavigationManagerCallback(androidx.car.app.navigation.NavigationManagerCallback);
+ method @MainThread public void setNavigationManagerCallback(java.util.concurrent.Executor, androidx.car.app.navigation.NavigationManagerCallback);
+ method @MainThread public void updateTrip(androidx.car.app.navigation.model.Trip);
+ }
+
+ public interface NavigationManagerCallback {
+ method public default void onAutoDriveEnabled();
+ method public default void onStopNavigation();
+ }
+
+}
+
+package androidx.car.app.navigation.model {
+
+ @androidx.car.app.annotations.CarProtocol public final class Destination {
+ method public androidx.car.app.model.CarText? getAddress();
+ method public androidx.car.app.model.CarIcon? getImage();
+ method public androidx.car.app.model.CarText? getName();
+ }
+
+ public static final class Destination.Builder {
+ ctor public Destination.Builder();
+ method public androidx.car.app.navigation.model.Destination build();
+ method public androidx.car.app.navigation.model.Destination.Builder setAddress(CharSequence);
+ method public androidx.car.app.navigation.model.Destination.Builder setImage(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.navigation.model.Destination.Builder setName(CharSequence);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Lane {
+ method public java.util.List<androidx.car.app.navigation.model.LaneDirection!> getDirections();
+ }
+
+ public static final class Lane.Builder {
+ ctor public Lane.Builder();
+ method public androidx.car.app.navigation.model.Lane.Builder addDirection(androidx.car.app.navigation.model.LaneDirection);
+ method public androidx.car.app.navigation.model.Lane build();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class LaneDirection {
+ method public static androidx.car.app.navigation.model.LaneDirection create(int, boolean);
+ method public int getShape();
+ method public boolean isRecommended();
+ field public static final int SHAPE_NORMAL_LEFT = 5; // 0x5
+ field public static final int SHAPE_NORMAL_RIGHT = 6; // 0x6
+ field public static final int SHAPE_SHARP_LEFT = 7; // 0x7
+ field public static final int SHAPE_SHARP_RIGHT = 8; // 0x8
+ field public static final int SHAPE_SLIGHT_LEFT = 3; // 0x3
+ field public static final int SHAPE_SLIGHT_RIGHT = 4; // 0x4
+ field public static final int SHAPE_STRAIGHT = 2; // 0x2
+ field public static final int SHAPE_UNKNOWN = 1; // 0x1
+ field public static final int SHAPE_U_TURN_LEFT = 9; // 0x9
+ field public static final int SHAPE_U_TURN_RIGHT = 10; // 0xa
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Maneuver {
+ method public androidx.car.app.model.CarIcon? getIcon();
+ method public int getRoundaboutExitAngle();
+ method public int getRoundaboutExitNumber();
+ method public int getType();
+ field public static final int TYPE_DEPART = 1; // 0x1
+ field public static final int TYPE_DESTINATION = 39; // 0x27
+ field public static final int TYPE_DESTINATION_LEFT = 41; // 0x29
+ field public static final int TYPE_DESTINATION_RIGHT = 42; // 0x2a
+ field public static final int TYPE_DESTINATION_STRAIGHT = 40; // 0x28
+ field public static final int TYPE_FERRY_BOAT = 37; // 0x25
+ field public static final int TYPE_FERRY_BOAT_LEFT = 47; // 0x2f
+ field public static final int TYPE_FERRY_BOAT_RIGHT = 48; // 0x30
+ field public static final int TYPE_FERRY_TRAIN = 38; // 0x26
+ field public static final int TYPE_FERRY_TRAIN_LEFT = 49; // 0x31
+ field public static final int TYPE_FERRY_TRAIN_RIGHT = 50; // 0x32
+ field public static final int TYPE_FORK_LEFT = 25; // 0x19
+ field public static final int TYPE_FORK_RIGHT = 26; // 0x1a
+ field public static final int TYPE_KEEP_LEFT = 3; // 0x3
+ field public static final int TYPE_KEEP_RIGHT = 4; // 0x4
+ field public static final int TYPE_MERGE_LEFT = 27; // 0x1b
+ field public static final int TYPE_MERGE_RIGHT = 28; // 0x1c
+ field public static final int TYPE_MERGE_SIDE_UNSPECIFIED = 29; // 0x1d
+ field public static final int TYPE_NAME_CHANGE = 2; // 0x2
+ field public static final int TYPE_OFF_RAMP_NORMAL_LEFT = 23; // 0x17
+ field public static final int TYPE_OFF_RAMP_NORMAL_RIGHT = 24; // 0x18
+ field public static final int TYPE_OFF_RAMP_SLIGHT_LEFT = 21; // 0x15
+ field public static final int TYPE_OFF_RAMP_SLIGHT_RIGHT = 22; // 0x16
+ field public static final int TYPE_ON_RAMP_NORMAL_LEFT = 15; // 0xf
+ field public static final int TYPE_ON_RAMP_NORMAL_RIGHT = 16; // 0x10
+ field public static final int TYPE_ON_RAMP_SHARP_LEFT = 17; // 0x11
+ field public static final int TYPE_ON_RAMP_SHARP_RIGHT = 18; // 0x12
+ field public static final int TYPE_ON_RAMP_SLIGHT_LEFT = 13; // 0xd
+ field public static final int TYPE_ON_RAMP_SLIGHT_RIGHT = 14; // 0xe
+ field public static final int TYPE_ON_RAMP_U_TURN_LEFT = 19; // 0x13
+ field public static final int TYPE_ON_RAMP_U_TURN_RIGHT = 20; // 0x14
+ field public static final int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CCW = 34; // 0x22
+ field public static final int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CCW_WITH_ANGLE = 35; // 0x23
+ field public static final int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CW = 32; // 0x20
+ field public static final int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CW_WITH_ANGLE = 33; // 0x21
+ field public static final int TYPE_ROUNDABOUT_ENTER_CCW = 45; // 0x2d
+ field public static final int TYPE_ROUNDABOUT_ENTER_CW = 43; // 0x2b
+ field public static final int TYPE_ROUNDABOUT_EXIT_CCW = 46; // 0x2e
+ field public static final int TYPE_ROUNDABOUT_EXIT_CW = 44; // 0x2c
+ field public static final int TYPE_STRAIGHT = 36; // 0x24
+ field public static final int TYPE_TURN_NORMAL_LEFT = 7; // 0x7
+ field public static final int TYPE_TURN_NORMAL_RIGHT = 8; // 0x8
+ field public static final int TYPE_TURN_SHARP_LEFT = 9; // 0x9
+ field public static final int TYPE_TURN_SHARP_RIGHT = 10; // 0xa
+ field public static final int TYPE_TURN_SLIGHT_LEFT = 5; // 0x5
+ field public static final int TYPE_TURN_SLIGHT_RIGHT = 6; // 0x6
+ field public static final int TYPE_UNKNOWN = 0; // 0x0
+ field public static final int TYPE_U_TURN_LEFT = 11; // 0xb
+ field public static final int TYPE_U_TURN_RIGHT = 12; // 0xc
+ }
+
+ public static final class Maneuver.Builder {
+ ctor public Maneuver.Builder(int);
+ method public androidx.car.app.navigation.model.Maneuver build();
+ method public androidx.car.app.navigation.model.Maneuver.Builder setIcon(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.navigation.model.Maneuver.Builder setRoundaboutExitAngle(@IntRange(from=1, to=360) int);
+ method public androidx.car.app.navigation.model.Maneuver.Builder setRoundaboutExitNumber(@IntRange(from=1) int);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class MessageInfo implements androidx.car.app.navigation.model.NavigationTemplate.NavigationInfo {
+ method public androidx.car.app.model.CarIcon? getImage();
+ method public androidx.car.app.model.CarText? getText();
+ method public androidx.car.app.model.CarText? getTitle();
+ }
+
+ public static final class MessageInfo.Builder {
+ ctor public MessageInfo.Builder(CharSequence);
+ ctor public MessageInfo.Builder(androidx.car.app.model.CarText);
+ method public androidx.car.app.navigation.model.MessageInfo build();
+ method public androidx.car.app.navigation.model.MessageInfo.Builder setImage(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.navigation.model.MessageInfo.Builder setText(CharSequence);
+ method public androidx.car.app.navigation.model.MessageInfo.Builder setText(androidx.car.app.model.CarText);
+ method public androidx.car.app.navigation.model.MessageInfo.Builder setTitle(CharSequence);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class NavigationTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.CarColor? getBackgroundColor();
+ method public androidx.car.app.navigation.model.TravelEstimate? getDestinationTravelEstimate();
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.model.ActionStrip? getMapActionStrip();
+ method public androidx.car.app.navigation.model.NavigationTemplate.NavigationInfo? getNavigationInfo();
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.navigation.model.PanModeDelegate? getPanModeDelegate();
+ method @Deprecated @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.model.Toggle? getPanModeToggle();
+ }
+
+ public static final class NavigationTemplate.Builder {
+ ctor public NavigationTemplate.Builder();
+ method public androidx.car.app.navigation.model.NavigationTemplate build();
+ method public androidx.car.app.navigation.model.NavigationTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.navigation.model.NavigationTemplate.Builder setBackgroundColor(androidx.car.app.model.CarColor);
+ method public androidx.car.app.navigation.model.NavigationTemplate.Builder setDestinationTravelEstimate(androidx.car.app.navigation.model.TravelEstimate);
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.navigation.model.NavigationTemplate.Builder setMapActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.navigation.model.NavigationTemplate.Builder setNavigationInfo(androidx.car.app.navigation.model.NavigationTemplate.NavigationInfo);
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.navigation.model.NavigationTemplate.Builder setPanModeListener(androidx.car.app.navigation.model.PanModeListener);
+ }
+
+ public static interface NavigationTemplate.NavigationInfo {
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(2) public interface PanModeDelegate {
+ method public void sendPanModeChanged(boolean, androidx.car.app.OnDoneCallback);
+ }
+
+ public interface PanModeListener {
+ method public void onPanModeChanged(boolean);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class PlaceListNavigationTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.ItemList? getItemList();
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.model.ActionStrip? getMapActionStrip();
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.navigation.model.PanModeDelegate? getPanModeDelegate();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public boolean isLoading();
+ }
+
+ public static final class PlaceListNavigationTemplate.Builder {
+ ctor public PlaceListNavigationTemplate.Builder();
+ method public androidx.car.app.navigation.model.PlaceListNavigationTemplate build();
+ method public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setItemList(androidx.car.app.model.ItemList);
+ method public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setLoading(boolean);
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setMapActionStrip(androidx.car.app.model.ActionStrip);
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setPanModeListener(androidx.car.app.navigation.model.PanModeListener);
+ method public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setTitle(CharSequence);
+ method public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setTitle(androidx.car.app.model.CarText);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class RoutePreviewNavigationTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.ItemList? getItemList();
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.model.ActionStrip? getMapActionStrip();
+ method public androidx.car.app.model.Action? getNavigateAction();
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.navigation.model.PanModeDelegate? getPanModeDelegate();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public boolean isLoading();
+ }
+
+ public static final class RoutePreviewNavigationTemplate.Builder {
+ ctor public RoutePreviewNavigationTemplate.Builder();
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate build();
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setItemList(androidx.car.app.model.ItemList);
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setLoading(boolean);
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setMapActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setNavigateAction(androidx.car.app.model.Action);
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setPanModeListener(androidx.car.app.navigation.model.PanModeListener);
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setTitle(CharSequence);
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setTitle(androidx.car.app.model.CarText);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class RoutingInfo implements androidx.car.app.navigation.model.NavigationTemplate.NavigationInfo {
+ method public androidx.car.app.model.Distance? getCurrentDistance();
+ method public androidx.car.app.navigation.model.Step? getCurrentStep();
+ method public androidx.car.app.model.CarIcon? getJunctionImage();
+ method public androidx.car.app.navigation.model.Step? getNextStep();
+ method public boolean isLoading();
+ }
+
+ public static final class RoutingInfo.Builder {
+ ctor public RoutingInfo.Builder();
+ method public androidx.car.app.navigation.model.RoutingInfo build();
+ method public androidx.car.app.navigation.model.RoutingInfo.Builder setCurrentStep(androidx.car.app.navigation.model.Step, androidx.car.app.model.Distance);
+ method public androidx.car.app.navigation.model.RoutingInfo.Builder setJunctionImage(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.navigation.model.RoutingInfo.Builder setLoading(boolean);
+ method public androidx.car.app.navigation.model.RoutingInfo.Builder setNextStep(androidx.car.app.navigation.model.Step);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Step {
+ method public androidx.car.app.model.CarText? getCue();
+ method public java.util.List<androidx.car.app.navigation.model.Lane!> getLanes();
+ method public androidx.car.app.model.CarIcon? getLanesImage();
+ method public androidx.car.app.navigation.model.Maneuver? getManeuver();
+ method public androidx.car.app.model.CarText? getRoad();
+ }
+
+ public static final class Step.Builder {
+ ctor public Step.Builder();
+ ctor public Step.Builder(CharSequence);
+ ctor public Step.Builder(androidx.car.app.model.CarText);
+ method public androidx.car.app.navigation.model.Step.Builder addLane(androidx.car.app.navigation.model.Lane);
+ method public androidx.car.app.navigation.model.Step build();
+ method public androidx.car.app.navigation.model.Step.Builder setCue(CharSequence);
+ method public androidx.car.app.navigation.model.Step.Builder setLanesImage(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.navigation.model.Step.Builder setManeuver(androidx.car.app.navigation.model.Maneuver);
+ method public androidx.car.app.navigation.model.Step.Builder setRoad(CharSequence);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class TravelEstimate {
+ method public androidx.car.app.model.DateTimeWithZone? getArrivalTimeAtDestination();
+ method public androidx.car.app.model.Distance? getRemainingDistance();
+ method public androidx.car.app.model.CarColor? getRemainingDistanceColor();
+ method public androidx.car.app.model.CarColor? getRemainingTimeColor();
+ method public long getRemainingTimeSeconds();
+ field public static final long REMAINING_TIME_UNKNOWN = -1L; // 0xffffffffffffffffL
+ }
+
+ public static final class TravelEstimate.Builder {
+ ctor public TravelEstimate.Builder(androidx.car.app.model.Distance, androidx.car.app.model.DateTimeWithZone);
+ ctor @RequiresApi(26) public TravelEstimate.Builder(androidx.car.app.model.Distance, java.time.ZonedDateTime);
+ method public androidx.car.app.navigation.model.TravelEstimate build();
+ method public androidx.car.app.navigation.model.TravelEstimate.Builder setRemainingDistanceColor(androidx.car.app.model.CarColor);
+ method @RequiresApi(26) public androidx.car.app.navigation.model.TravelEstimate.Builder setRemainingTime(java.time.Duration);
+ method public androidx.car.app.navigation.model.TravelEstimate.Builder setRemainingTimeColor(androidx.car.app.model.CarColor);
+ method public androidx.car.app.navigation.model.TravelEstimate.Builder setRemainingTimeSeconds(@IntRange(from=0xffffffff) long);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Trip {
+ method public androidx.car.app.model.CarText? getCurrentRoad();
+ method public java.util.List<androidx.car.app.navigation.model.TravelEstimate!> getDestinationTravelEstimates();
+ method public java.util.List<androidx.car.app.navigation.model.Destination!> getDestinations();
+ method public java.util.List<androidx.car.app.navigation.model.TravelEstimate!> getStepTravelEstimates();
+ method public java.util.List<androidx.car.app.navigation.model.Step!> getSteps();
+ method public boolean isLoading();
+ }
+
+ public static final class Trip.Builder {
+ ctor public Trip.Builder();
+ method public androidx.car.app.navigation.model.Trip.Builder addDestination(androidx.car.app.navigation.model.Destination, androidx.car.app.navigation.model.TravelEstimate);
+ method public androidx.car.app.navigation.model.Trip.Builder addStep(androidx.car.app.navigation.model.Step, androidx.car.app.navigation.model.TravelEstimate);
+ method public androidx.car.app.navigation.model.Trip build();
+ method public androidx.car.app.navigation.model.Trip.Builder setCurrentRoad(CharSequence);
+ method public androidx.car.app.navigation.model.Trip.Builder setLoading(boolean);
+ }
+
+}
+
+package androidx.car.app.notification {
+
+ public final class CarAppExtender implements androidx.core.app.NotificationCompat.Extender {
+ ctor public CarAppExtender(android.app.Notification);
+ method public androidx.core.app.NotificationCompat.Builder extend(androidx.core.app.NotificationCompat.Builder);
+ method public java.util.List<android.app.Notification.Action!> getActions();
+ method public String? getChannelId();
+ method public androidx.car.app.model.CarColor? getColor();
+ method public android.app.PendingIntent? getContentIntent();
+ method public CharSequence? getContentText();
+ method public CharSequence? getContentTitle();
+ method public android.app.PendingIntent? getDeleteIntent();
+ method public int getImportance();
+ method public android.graphics.Bitmap? getLargeIcon();
+ method @DrawableRes public int getSmallIcon();
+ method public static boolean isExtended(android.app.Notification);
+ }
+
+ public static final class CarAppExtender.Builder {
+ ctor public CarAppExtender.Builder();
+ method public androidx.car.app.notification.CarAppExtender.Builder addAction(@DrawableRes int, CharSequence, android.app.PendingIntent);
+ method public androidx.car.app.notification.CarAppExtender build();
+ method public androidx.car.app.notification.CarAppExtender.Builder setChannelId(String);
+ method public androidx.car.app.notification.CarAppExtender.Builder setColor(androidx.car.app.model.CarColor);
+ method public androidx.car.app.notification.CarAppExtender.Builder setContentIntent(android.app.PendingIntent);
+ method public androidx.car.app.notification.CarAppExtender.Builder setContentText(CharSequence);
+ method public androidx.car.app.notification.CarAppExtender.Builder setContentTitle(CharSequence);
+ method public androidx.car.app.notification.CarAppExtender.Builder setDeleteIntent(android.app.PendingIntent);
+ method public androidx.car.app.notification.CarAppExtender.Builder setImportance(int);
+ method public androidx.car.app.notification.CarAppExtender.Builder setLargeIcon(android.graphics.Bitmap);
+ method public androidx.car.app.notification.CarAppExtender.Builder setSmallIcon(int);
+ }
+
+ public final class CarNotificationManager {
+ method public boolean areNotificationsEnabled();
+ method public void cancel(int);
+ method public void cancel(String?, int);
+ method public void cancelAll();
+ method public void createNotificationChannel(androidx.core.app.NotificationChannelCompat);
+ method public void createNotificationChannelGroup(androidx.core.app.NotificationChannelGroupCompat);
+ method public void createNotificationChannelGroups(java.util.List<androidx.core.app.NotificationChannelGroupCompat!>);
+ method public void createNotificationChannels(java.util.List<androidx.core.app.NotificationChannelCompat!>);
+ method public void deleteNotificationChannel(String);
+ method public void deleteNotificationChannelGroup(String);
+ method public void deleteUnlistedNotificationChannels(java.util.Collection<java.lang.String!>);
+ method public static androidx.car.app.notification.CarNotificationManager from(android.content.Context);
+ method public static java.util.Set<java.lang.String!> getEnabledListenerPackages(android.content.Context);
+ method public int getImportance();
+ method public androidx.core.app.NotificationChannelCompat? getNotificationChannel(String);
+ method public androidx.core.app.NotificationChannelCompat? getNotificationChannel(String, String);
+ method public androidx.core.app.NotificationChannelGroupCompat? getNotificationChannelGroup(String);
+ method public java.util.List<androidx.core.app.NotificationChannelGroupCompat!> getNotificationChannelGroups();
+ method public java.util.List<androidx.core.app.NotificationChannelCompat!> getNotificationChannels();
+ method public void notify(int, androidx.core.app.NotificationCompat.Builder);
+ method public void notify(String?, int, androidx.core.app.NotificationCompat.Builder);
+ }
+
+ public final class CarPendingIntent {
+ method public static android.app.PendingIntent getCarApp(android.content.Context, int, android.content.Intent, int);
+ }
+
+}
+
+package androidx.car.app.serialization {
+
+ public final class Bundleable implements android.os.Parcelable {
+ method public static androidx.car.app.serialization.Bundleable create(Object) throws androidx.car.app.serialization.BundlerException;
+ method public int describeContents();
+ method public Object get() throws androidx.car.app.serialization.BundlerException;
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<androidx.car.app.serialization.Bundleable!> CREATOR;
+ }
+
+ public class BundlerException extends java.lang.Exception {
+ ctor public BundlerException(String?, Throwable);
+ ctor public BundlerException(String?);
+ }
+
+}
+
+package androidx.car.app.validation {
+
+ public final class HostValidator {
+ method public java.util.Map<java.lang.String!,java.util.List<java.lang.String!>!> getAllowedHosts();
+ method public boolean isValidHost(androidx.car.app.HostInfo);
+ field public static final androidx.car.app.validation.HostValidator ALLOW_ALL_HOSTS_VALIDATOR;
+ field public static final String TEMPLATE_RENDERER_PERMISSION = "android.car.permission.TEMPLATE_RENDERER";
+ }
+
+ public static final class HostValidator.Builder {
+ ctor public HostValidator.Builder(android.content.Context);
+ method public androidx.car.app.validation.HostValidator.Builder addAllowedHost(String, String);
+ method public androidx.car.app.validation.HostValidator.Builder addAllowedHosts(@ArrayRes int);
+ method public androidx.car.app.validation.HostValidator build();
+ }
+
+}
+
+package androidx.car.app.versioning {
+
+ public final class CarAppApiLevels {
+ method public static int getLatest();
+ method public static int getOldest();
+ field public static final int LEVEL_1 = 1; // 0x1
+ field public static final int LEVEL_2 = 2; // 0x2
+ field public static final int LEVEL_3 = 3; // 0x3
+ field public static final int LEVEL_4 = 4; // 0x4
+ }
+
+}
+
diff --git a/car/app/app/api/1.2.0-beta02.txt b/car/app/app/api/1.2.0-beta02.txt
new file mode 100644
index 0000000..a6a92f8
--- /dev/null
+++ b/car/app/app/api/1.2.0-beta02.txt
@@ -0,0 +1,1441 @@
+// Signature format: 4.0
+package androidx.car.app {
+
+ @androidx.car.app.annotations.CarProtocol public final class AppInfo {
+ ctor @VisibleForTesting public AppInfo(int, int, String);
+ method public int getLatestCarAppApiLevel();
+ method public String getLibraryDisplayVersion();
+ method public int getMinCarAppApiLevel();
+ field public static final String MIN_API_LEVEL_METADATA_KEY = "androidx.car.app.minCarApiLevel";
+ }
+
+ public class AppManager implements androidx.car.app.managers.Manager {
+ method public void invalidate();
+ method public void setSurfaceCallback(androidx.car.app.SurfaceCallback?);
+ method public void showToast(CharSequence, int);
+ }
+
+ public final class CarAppPermission {
+ method public static void checkHasLibraryPermission(android.content.Context, String);
+ method public static void checkHasPermission(android.content.Context, String);
+ field public static final String ACCESS_SURFACE = "androidx.car.app.ACCESS_SURFACE";
+ field public static final String MAP_TEMPLATES = "androidx.car.app.MAP_TEMPLATES";
+ field public static final String NAVIGATION_TEMPLATES = "androidx.car.app.NAVIGATION_TEMPLATES";
+ }
+
+ public abstract class CarAppService extends android.app.Service {
+ ctor public CarAppService();
+ method public abstract androidx.car.app.validation.HostValidator createHostValidator();
+ method @CallSuper public final void dump(java.io.FileDescriptor, java.io.PrintWriter, String![]?);
+ method public final androidx.car.app.Session? getCurrentSession();
+ method public final androidx.car.app.HostInfo? getHostInfo();
+ method @CallSuper public final android.os.IBinder onBind(android.content.Intent);
+ method public abstract androidx.car.app.Session onCreateSession();
+ method public final boolean onUnbind(android.content.Intent);
+ field public static final String CATEGORY_CHARGING_APP = "androidx.car.app.category.CHARGING";
+ field public static final String CATEGORY_NAVIGATION_APP = "androidx.car.app.category.NAVIGATION";
+ field public static final String CATEGORY_PARKING_APP = "androidx.car.app.category.PARKING";
+ field public static final String SERVICE_INTERFACE = "androidx.car.app.CarAppService";
+ }
+
+ public class CarContext extends android.content.ContextWrapper {
+ method public void finishCarApp();
+ method @androidx.car.app.annotations.RequiresCarApi(2) public android.content.ComponentName? getCallingComponent();
+ method public int getCarAppApiLevel();
+ method public Object getCarService(String);
+ method public <T> T getCarService(Class<T!>);
+ method public String getCarServiceName(Class<?>);
+ method public androidx.car.app.HostInfo? getHostInfo();
+ method public androidx.activity.OnBackPressedDispatcher getOnBackPressedDispatcher();
+ method public boolean isDarkMode();
+ method public void requestPermissions(java.util.List<java.lang.String!>, androidx.car.app.OnRequestPermissionsListener);
+ method public void requestPermissions(java.util.List<java.lang.String!>, java.util.concurrent.Executor, androidx.car.app.OnRequestPermissionsListener);
+ method @androidx.car.app.annotations.RequiresCarApi(2) public void setCarAppResult(int, android.content.Intent?);
+ method public void startCarApp(android.content.Intent);
+ method @Deprecated public static void startCarApp(android.content.Intent, android.content.Intent);
+ field public static final String ACTION_NAVIGATE = "androidx.car.app.action.NAVIGATE";
+ field public static final String APP_SERVICE = "app";
+ field public static final String CAR_SERVICE = "car";
+ field @androidx.car.app.annotations.RequiresCarApi(2) public static final String CONSTRAINT_SERVICE = "constraints";
+ field public static final String EXTRA_START_CAR_APP_BINDER_KEY = "androidx.car.app.extra.START_CAR_APP_BINDER_KEY";
+ field @androidx.car.app.annotations.RequiresCarApi(3) public static final String HARDWARE_SERVICE = "hardware";
+ field public static final String NAVIGATION_SERVICE = "navigation";
+ field public static final String SCREEN_SERVICE = "screen";
+ }
+
+ public final class CarToast {
+ method public static androidx.car.app.CarToast makeText(androidx.car.app.CarContext, @StringRes int, int);
+ method public static androidx.car.app.CarToast makeText(androidx.car.app.CarContext, CharSequence, int);
+ method public void setDuration(int);
+ method public void setText(@StringRes int);
+ method public void setText(CharSequence);
+ method public void show();
+ field public static final int LENGTH_LONG = 1; // 0x1
+ field public static final int LENGTH_SHORT = 0; // 0x0
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class FailureResponse {
+ ctor public FailureResponse(Throwable);
+ method public int getErrorType();
+ method public String getStackTrace();
+ field public static final int BUNDLER_EXCEPTION = 1; // 0x1
+ field public static final int ILLEGAL_STATE_EXCEPTION = 2; // 0x2
+ field public static final int INVALID_PARAMETER_EXCEPTION = 3; // 0x3
+ field public static final int REMOTE_EXCEPTION = 6; // 0x6
+ field public static final int RUNTIME_EXCEPTION = 5; // 0x5
+ field public static final int SECURITY_EXCEPTION = 4; // 0x4
+ field public static final int UNKNOWN_ERROR = 0; // 0x0
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class HandshakeInfo {
+ ctor public HandshakeInfo(String, int);
+ method public int getHostCarAppApiLevel();
+ method public String getHostPackageName();
+ }
+
+ public final class HostException extends java.lang.RuntimeException {
+ ctor public HostException(String);
+ ctor public HostException(String, Throwable);
+ ctor public HostException(Throwable);
+ }
+
+ public final class HostInfo {
+ ctor public HostInfo(String, int);
+ method public String getPackageName();
+ method public int getUid();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface OnDoneCallback {
+ method public default void onFailure(androidx.car.app.serialization.Bundleable);
+ method public default void onSuccess(androidx.car.app.serialization.Bundleable?);
+ }
+
+ public interface OnRequestPermissionsListener {
+ method public void onRequestPermissionsResult(java.util.List<java.lang.String!>, java.util.List<java.lang.String!>);
+ }
+
+ public interface OnScreenResultListener {
+ method public void onScreenResult(Object?);
+ }
+
+ public abstract class Screen implements androidx.lifecycle.LifecycleOwner {
+ ctor protected Screen(androidx.car.app.CarContext);
+ method public final void finish();
+ method public final androidx.car.app.CarContext getCarContext();
+ method public final androidx.lifecycle.Lifecycle getLifecycle();
+ method public String? getMarker();
+ method public final androidx.car.app.ScreenManager getScreenManager();
+ method public final void invalidate();
+ method public abstract androidx.car.app.model.Template onGetTemplate();
+ method public void setMarker(String?);
+ method public void setResult(Object?);
+ }
+
+ @MainThread public class ScreenManager implements androidx.car.app.managers.Manager {
+ method public int getStackSize();
+ method public androidx.car.app.Screen getTop();
+ method public void pop();
+ method public void popTo(String);
+ method public void popToRoot();
+ method public void push(androidx.car.app.Screen);
+ method public void pushForResult(androidx.car.app.Screen, androidx.car.app.OnScreenResultListener);
+ method public void remove(androidx.car.app.Screen);
+ }
+
+ public abstract class Session implements androidx.lifecycle.LifecycleOwner {
+ ctor public Session();
+ method public final androidx.car.app.CarContext getCarContext();
+ method public androidx.lifecycle.Lifecycle getLifecycle();
+ method public void onCarConfigurationChanged(android.content.res.Configuration);
+ method public abstract androidx.car.app.Screen onCreateScreen(android.content.Intent);
+ method public void onNewIntent(android.content.Intent);
+ }
+
+ public interface SurfaceCallback {
+ method @androidx.car.app.annotations.RequiresCarApi(2) public default void onFling(float, float);
+ method @androidx.car.app.annotations.RequiresCarApi(2) public default void onScale(float, float, float);
+ method @androidx.car.app.annotations.RequiresCarApi(2) public default void onScroll(float, float);
+ method public default void onStableAreaChanged(android.graphics.Rect);
+ method public default void onSurfaceAvailable(androidx.car.app.SurfaceContainer);
+ method public default void onSurfaceDestroyed(androidx.car.app.SurfaceContainer);
+ method public default void onVisibleAreaChanged(android.graphics.Rect);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class SurfaceContainer {
+ ctor public SurfaceContainer(android.view.Surface?, int, int, int);
+ method public int getDpi();
+ method public int getHeight();
+ method public android.view.Surface? getSurface();
+ method public int getWidth();
+ }
+
+}
+
+package androidx.car.app.annotations {
+
+ @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) @java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE, java.lang.annotation.ElementType.PARAMETER}) public @interface CarProtocol {
+ }
+
+ @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE, java.lang.annotation.ElementType.CONSTRUCTOR, java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.METHOD}) public @interface RequiresCarApi {
+ method public abstract int value();
+ }
+
+}
+
+package androidx.car.app.connection {
+
+ public final class CarConnection {
+ ctor public CarConnection(android.content.Context);
+ method public androidx.lifecycle.LiveData<java.lang.Integer!> getType();
+ field public static final String ACTION_CAR_CONNECTION_UPDATED = "androidx.car.app.connection.action.CAR_CONNECTION_UPDATED";
+ field public static final String CAR_CONNECTION_STATE = "CarConnectionState";
+ field public static final int CONNECTION_TYPE_NATIVE = 1; // 0x1
+ field public static final int CONNECTION_TYPE_NOT_CONNECTED = 0; // 0x0
+ field public static final int CONNECTION_TYPE_PROJECTION = 2; // 0x2
+ }
+
+}
+
+package androidx.car.app.constraints {
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public class ConstraintManager implements androidx.car.app.managers.Manager {
+ method public int getContentLimit(int);
+ field public static final int CONTENT_LIMIT_TYPE_GRID = 1; // 0x1
+ field public static final int CONTENT_LIMIT_TYPE_LIST = 0; // 0x0
+ field public static final int CONTENT_LIMIT_TYPE_PANE = 4; // 0x4
+ field public static final int CONTENT_LIMIT_TYPE_PLACE_LIST = 2; // 0x2
+ field public static final int CONTENT_LIMIT_TYPE_ROUTE_LIST = 3; // 0x3
+ }
+
+}
+
+package androidx.car.app.hardware {
+
+ @MainThread @androidx.car.app.annotations.RequiresCarApi(3) public interface CarHardwareManager extends androidx.car.app.managers.Manager {
+ method public default androidx.car.app.hardware.info.CarInfo getCarInfo();
+ method public default androidx.car.app.hardware.info.CarSensors getCarSensors();
+ }
+
+}
+
+package androidx.car.app.hardware.common {
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class CarUnit {
+ method public static String toString(int);
+ field public static final int KILOMETER = 3; // 0x3
+ field public static final int KILOMETERS_PER_HOUR = 102; // 0x66
+ field public static final int METER = 2; // 0x2
+ field public static final int METERS_PER_SEC = 101; // 0x65
+ field public static final int MILE = 4; // 0x4
+ field public static final int MILES_PER_HOUR = 103; // 0x67
+ field public static final int MILLIMETER = 1; // 0x1
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class CarValue<T> {
+ ctor public CarValue(T?, long, int);
+ method public int getStatus();
+ method public long getTimestampMillis();
+ method public T? getValue();
+ field public static final int STATUS_SUCCESS = 1; // 0x1
+ field public static final int STATUS_UNAVAILABLE = 3; // 0x3
+ field public static final int STATUS_UNIMPLEMENTED = 2; // 0x2
+ field public static final int STATUS_UNKNOWN = 0; // 0x0
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public interface OnCarDataAvailableListener<T> {
+ method public void onCarDataAvailable(T);
+ }
+
+}
+
+package androidx.car.app.hardware.info {
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class Accelerometer {
+ ctor public Accelerometer(androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Float!>!>);
+ method public androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Float!>!> getForces();
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class CarHardwareLocation {
+ ctor public CarHardwareLocation(androidx.car.app.hardware.common.CarValue<android.location.Location!>);
+ method public androidx.car.app.hardware.common.CarValue<android.location.Location!> getLocation();
+ }
+
+ @MainThread @androidx.car.app.annotations.RequiresCarApi(3) public interface CarInfo {
+ method public void addEnergyLevelListener(java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.EnergyLevel!>);
+ method public void addMileageListener(java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Mileage!>);
+ method public void addSpeedListener(java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Speed!>);
+ method public void addTollListener(java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.TollCard!>);
+ method public void fetchEnergyProfile(java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.EnergyProfile!>);
+ method public void fetchModel(java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Model!>);
+ method public void removeEnergyLevelListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.EnergyLevel!>);
+ method public void removeMileageListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Mileage!>);
+ method public void removeSpeedListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Speed!>);
+ method public void removeTollListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.TollCard!>);
+ }
+
+ @MainThread @androidx.car.app.annotations.RequiresCarApi(3) public interface CarSensors {
+ method public void addAccelerometerListener(int, java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Accelerometer!>);
+ method public void addCarHardwareLocationListener(int, java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.CarHardwareLocation!>);
+ method public void addCompassListener(int, java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Compass!>);
+ method public void addGyroscopeListener(int, java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Gyroscope!>);
+ method public void removeAccelerometerListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Accelerometer!>);
+ method public void removeCarHardwareLocationListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.CarHardwareLocation!>);
+ method public void removeCompassListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Compass!>);
+ method public void removeGyroscopeListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Gyroscope!>);
+ field public static final int UPDATE_RATE_FASTEST = 3; // 0x3
+ field public static final int UPDATE_RATE_NORMAL = 1; // 0x1
+ field public static final int UPDATE_RATE_UI = 2; // 0x2
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class Compass {
+ ctor public Compass(androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Float!>!>);
+ method public androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Float!>!> getOrientations();
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class EnergyLevel {
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Float!> getBatteryPercent();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Integer!> getDistanceDisplayUnit();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Boolean!> getEnergyIsLow();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Float!> getFuelPercent();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Float!> getRangeRemainingMeters();
+ }
+
+ public static final class EnergyLevel.Builder {
+ ctor public EnergyLevel.Builder();
+ method public androidx.car.app.hardware.info.EnergyLevel build();
+ method public androidx.car.app.hardware.info.EnergyLevel.Builder setBatteryPercent(androidx.car.app.hardware.common.CarValue<java.lang.Float!>);
+ method public androidx.car.app.hardware.info.EnergyLevel.Builder setDistanceDisplayUnit(androidx.car.app.hardware.common.CarValue<java.lang.Integer!>);
+ method public androidx.car.app.hardware.info.EnergyLevel.Builder setEnergyIsLow(androidx.car.app.hardware.common.CarValue<java.lang.Boolean!>);
+ method public androidx.car.app.hardware.info.EnergyLevel.Builder setFuelPercent(androidx.car.app.hardware.common.CarValue<java.lang.Float!>);
+ method public androidx.car.app.hardware.info.EnergyLevel.Builder setRangeRemainingMeters(androidx.car.app.hardware.common.CarValue<java.lang.Float!>);
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class EnergyProfile {
+ method public androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Integer!>!> getEvConnectorTypes();
+ method public androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Integer!>!> getFuelTypes();
+ field public static final int EVCONNECTOR_TYPE_CHADEMO = 3; // 0x3
+ field public static final int EVCONNECTOR_TYPE_COMBO_1 = 4; // 0x4
+ field public static final int EVCONNECTOR_TYPE_COMBO_2 = 5; // 0x5
+ field public static final int EVCONNECTOR_TYPE_GBT = 9; // 0x9
+ field public static final int EVCONNECTOR_TYPE_GBT_DC = 10; // 0xa
+ field public static final int EVCONNECTOR_TYPE_J1772 = 1; // 0x1
+ field public static final int EVCONNECTOR_TYPE_MENNEKES = 2; // 0x2
+ field public static final int EVCONNECTOR_TYPE_OTHER = 101; // 0x65
+ field public static final int EVCONNECTOR_TYPE_SCAME = 11; // 0xb
+ field public static final int EVCONNECTOR_TYPE_TESLA_HPWC = 7; // 0x7
+ field public static final int EVCONNECTOR_TYPE_TESLA_ROADSTER = 6; // 0x6
+ field public static final int EVCONNECTOR_TYPE_TESLA_SUPERCHARGER = 8; // 0x8
+ field public static final int EVCONNECTOR_TYPE_UNKNOWN = 0; // 0x0
+ field public static final int FUEL_TYPE_BIODIESEL = 5; // 0x5
+ field public static final int FUEL_TYPE_CNG = 8; // 0x8
+ field public static final int FUEL_TYPE_DIESEL_1 = 3; // 0x3
+ field public static final int FUEL_TYPE_DIESEL_2 = 4; // 0x4
+ field public static final int FUEL_TYPE_E85 = 6; // 0x6
+ field public static final int FUEL_TYPE_ELECTRIC = 10; // 0xa
+ field public static final int FUEL_TYPE_HYDROGEN = 11; // 0xb
+ field public static final int FUEL_TYPE_LEADED = 2; // 0x2
+ field public static final int FUEL_TYPE_LNG = 9; // 0x9
+ field public static final int FUEL_TYPE_LPG = 7; // 0x7
+ field public static final int FUEL_TYPE_OTHER = 12; // 0xc
+ field public static final int FUEL_TYPE_UNKNOWN = 0; // 0x0
+ field public static final int FUEL_TYPE_UNLEADED = 1; // 0x1
+ }
+
+ public static final class EnergyProfile.Builder {
+ ctor public EnergyProfile.Builder();
+ method public androidx.car.app.hardware.info.EnergyProfile build();
+ method public androidx.car.app.hardware.info.EnergyProfile.Builder setEvConnectorTypes(androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Integer!>!>);
+ method public androidx.car.app.hardware.info.EnergyProfile.Builder setFuelTypes(androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Integer!>!>);
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class Gyroscope {
+ ctor public Gyroscope(androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Float!>!>);
+ method public androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Float!>!> getRotations();
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class Mileage {
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Integer!> getDistanceDisplayUnit();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Float!> getOdometerMeters();
+ }
+
+ public static final class Mileage.Builder {
+ ctor public Mileage.Builder();
+ method public androidx.car.app.hardware.info.Mileage build();
+ method public androidx.car.app.hardware.info.Mileage.Builder setDistanceDisplayUnit(androidx.car.app.hardware.common.CarValue<java.lang.Integer!>);
+ method public androidx.car.app.hardware.info.Mileage.Builder setOdometerMeters(androidx.car.app.hardware.common.CarValue<java.lang.Float!>);
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class Model {
+ method public androidx.car.app.hardware.common.CarValue<java.lang.String!> getManufacturer();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.String!> getName();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Integer!> getYear();
+ }
+
+ public static final class Model.Builder {
+ ctor public Model.Builder();
+ method public androidx.car.app.hardware.info.Model build();
+ method public androidx.car.app.hardware.info.Model.Builder setManufacturer(androidx.car.app.hardware.common.CarValue<java.lang.String!>);
+ method public androidx.car.app.hardware.info.Model.Builder setName(androidx.car.app.hardware.common.CarValue<java.lang.String!>);
+ method public androidx.car.app.hardware.info.Model.Builder setYear(androidx.car.app.hardware.common.CarValue<java.lang.Integer!>);
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class Speed {
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Float!> getDisplaySpeedMetersPerSecond();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Float!> getRawSpeedMetersPerSecond();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Integer!> getSpeedDisplayUnit();
+ }
+
+ public static final class Speed.Builder {
+ ctor public Speed.Builder();
+ method public androidx.car.app.hardware.info.Speed build();
+ method public androidx.car.app.hardware.info.Speed.Builder setDisplaySpeedMetersPerSecond(androidx.car.app.hardware.common.CarValue<java.lang.Float!>);
+ method public androidx.car.app.hardware.info.Speed.Builder setRawSpeedMetersPerSecond(androidx.car.app.hardware.common.CarValue<java.lang.Float!>);
+ method public androidx.car.app.hardware.info.Speed.Builder setSpeedDisplayUnit(androidx.car.app.hardware.common.CarValue<java.lang.Integer!>);
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class TollCard {
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Integer!> getCardState();
+ field public static final int TOLLCARD_STATE_INVALID = 2; // 0x2
+ field public static final int TOLLCARD_STATE_NOT_INSERTED = 3; // 0x3
+ field public static final int TOLLCARD_STATE_UNKNOWN = 0; // 0x0
+ field public static final int TOLLCARD_STATE_VALID = 1; // 0x1
+ }
+
+ public static final class TollCard.Builder {
+ ctor public TollCard.Builder();
+ method public androidx.car.app.hardware.info.TollCard build();
+ method public androidx.car.app.hardware.info.TollCard.Builder setCardState(androidx.car.app.hardware.common.CarValue<java.lang.Integer!>);
+ }
+
+}
+
+package androidx.car.app.managers {
+
+ public interface Manager {
+ }
+
+}
+
+package androidx.car.app.model {
+
+ @androidx.car.app.annotations.CarProtocol public final class Action {
+ method public androidx.car.app.model.CarColor? getBackgroundColor();
+ method @androidx.car.app.annotations.RequiresCarApi(4) public int getFlags();
+ method public androidx.car.app.model.CarIcon? getIcon();
+ method public androidx.car.app.model.OnClickDelegate? getOnClickDelegate();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public int getType();
+ method public boolean isStandard();
+ method public static String typeToString(int);
+ field public static final androidx.car.app.model.Action APP_ICON;
+ field public static final androidx.car.app.model.Action BACK;
+ field @androidx.car.app.annotations.RequiresCarApi(4) public static final int FLAG_PRIMARY = 1; // 0x1
+ field public static final androidx.car.app.model.Action PAN;
+ field public static final int TYPE_APP_ICON = 65538; // 0x10002
+ field public static final int TYPE_BACK = 65539; // 0x10003
+ field public static final int TYPE_CUSTOM = 1; // 0x1
+ field public static final int TYPE_PAN = 65540; // 0x10004
+ }
+
+ public static final class Action.Builder {
+ ctor public Action.Builder();
+ ctor @androidx.car.app.annotations.RequiresCarApi(2) public Action.Builder(androidx.car.app.model.Action);
+ method public androidx.car.app.model.Action build();
+ method public androidx.car.app.model.Action.Builder setBackgroundColor(androidx.car.app.model.CarColor);
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.model.Action.Builder setFlags(int);
+ method public androidx.car.app.model.Action.Builder setIcon(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.model.Action.Builder setOnClickListener(androidx.car.app.model.OnClickListener);
+ method public androidx.car.app.model.Action.Builder setTitle(CharSequence);
+ method public androidx.car.app.model.Action.Builder setTitle(androidx.car.app.model.CarText);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class ActionStrip {
+ method public java.util.List<androidx.car.app.model.Action!> getActions();
+ method public androidx.car.app.model.Action? getFirstActionOfType(int);
+ }
+
+ public static final class ActionStrip.Builder {
+ ctor public ActionStrip.Builder();
+ method public androidx.car.app.model.ActionStrip.Builder addAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.ActionStrip build();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class CarColor {
+ method public static androidx.car.app.model.CarColor createCustom(@ColorInt int, @ColorInt int);
+ method @ColorInt public int getColor();
+ method @ColorInt public int getColorDark();
+ method public int getType();
+ field public static final androidx.car.app.model.CarColor BLUE;
+ field public static final androidx.car.app.model.CarColor DEFAULT;
+ field public static final androidx.car.app.model.CarColor GREEN;
+ field public static final androidx.car.app.model.CarColor PRIMARY;
+ field public static final androidx.car.app.model.CarColor RED;
+ field public static final androidx.car.app.model.CarColor SECONDARY;
+ field public static final int TYPE_BLUE = 6; // 0x6
+ field public static final int TYPE_CUSTOM = 0; // 0x0
+ field public static final int TYPE_DEFAULT = 1; // 0x1
+ field public static final int TYPE_GREEN = 5; // 0x5
+ field public static final int TYPE_PRIMARY = 2; // 0x2
+ field public static final int TYPE_RED = 4; // 0x4
+ field public static final int TYPE_SECONDARY = 3; // 0x3
+ field public static final int TYPE_YELLOW = 7; // 0x7
+ field public static final androidx.car.app.model.CarColor YELLOW;
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class CarIcon {
+ method public androidx.core.graphics.drawable.IconCompat? getIcon();
+ method public androidx.car.app.model.CarColor? getTint();
+ method public int getType();
+ field public static final androidx.car.app.model.CarIcon ALERT;
+ field public static final androidx.car.app.model.CarIcon APP_ICON;
+ field public static final androidx.car.app.model.CarIcon BACK;
+ field public static final androidx.car.app.model.CarIcon ERROR;
+ field @androidx.car.app.annotations.RequiresCarApi(2) public static final androidx.car.app.model.CarIcon PAN;
+ field public static final int TYPE_ALERT = 4; // 0x4
+ field public static final int TYPE_APP_ICON = 5; // 0x5
+ field public static final int TYPE_BACK = 3; // 0x3
+ field public static final int TYPE_CUSTOM = 1; // 0x1
+ field public static final int TYPE_ERROR = 6; // 0x6
+ field public static final int TYPE_PAN = 7; // 0x7
+ }
+
+ public static final class CarIcon.Builder {
+ ctor public CarIcon.Builder(androidx.core.graphics.drawable.IconCompat);
+ ctor public CarIcon.Builder(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.model.CarIcon build();
+ method public androidx.car.app.model.CarIcon.Builder setTint(androidx.car.app.model.CarColor);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class CarIconSpan extends androidx.car.app.model.CarSpan {
+ method public static androidx.car.app.model.CarIconSpan create(androidx.car.app.model.CarIcon);
+ method public static androidx.car.app.model.CarIconSpan create(androidx.car.app.model.CarIcon, int);
+ method public int getAlignment();
+ method public androidx.car.app.model.CarIcon getIcon();
+ field public static final int ALIGN_BASELINE = 1; // 0x1
+ field public static final int ALIGN_BOTTOM = 0; // 0x0
+ field public static final int ALIGN_CENTER = 2; // 0x2
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class CarLocation {
+ method public static androidx.car.app.model.CarLocation create(double, double);
+ method public static androidx.car.app.model.CarLocation create(android.location.Location);
+ method public double getLatitude();
+ method public double getLongitude();
+ }
+
+ @Keep @androidx.car.app.annotations.CarProtocol public class CarSpan extends android.text.style.CharacterStyle {
+ ctor public CarSpan();
+ method public void updateDrawState(android.text.TextPaint);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class CarText {
+ method public static androidx.car.app.model.CarText create(CharSequence);
+ method public java.util.List<java.lang.CharSequence!> getVariants();
+ method public boolean isEmpty();
+ method public static boolean isNullOrEmpty(androidx.car.app.model.CarText?);
+ method public CharSequence toCharSequence();
+ }
+
+ public static final class CarText.Builder {
+ ctor public CarText.Builder(CharSequence);
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.model.CarText.Builder addVariant(CharSequence);
+ method public androidx.car.app.model.CarText build();
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(2) public final class ClickableSpan extends androidx.car.app.model.CarSpan {
+ method public static androidx.car.app.model.ClickableSpan create(androidx.car.app.model.OnClickListener);
+ method public androidx.car.app.model.OnClickDelegate getOnClickDelegate();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class DateTimeWithZone {
+ method public static androidx.car.app.model.DateTimeWithZone create(long, @IntRange(from=0xffff02e0, to=64800) int, String);
+ method public static androidx.car.app.model.DateTimeWithZone create(long, java.util.TimeZone);
+ method @RequiresApi(26) public static androidx.car.app.model.DateTimeWithZone create(java.time.ZonedDateTime);
+ method public long getTimeSinceEpochMillis();
+ method public int getZoneOffsetSeconds();
+ method public String? getZoneShortName();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Distance {
+ method public static androidx.car.app.model.Distance create(double, int);
+ method public double getDisplayDistance();
+ method public int getDisplayUnit();
+ field public static final int UNIT_FEET = 6; // 0x6
+ field public static final int UNIT_KILOMETERS = 2; // 0x2
+ field public static final int UNIT_KILOMETERS_P1 = 3; // 0x3
+ field public static final int UNIT_METERS = 1; // 0x1
+ field public static final int UNIT_MILES = 4; // 0x4
+ field public static final int UNIT_MILES_P1 = 5; // 0x5
+ field public static final int UNIT_YARDS = 7; // 0x7
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class DistanceSpan extends androidx.car.app.model.CarSpan {
+ method public static androidx.car.app.model.DistanceSpan create(androidx.car.app.model.Distance);
+ method public androidx.car.app.model.Distance getDistance();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class DurationSpan extends androidx.car.app.model.CarSpan {
+ method public static androidx.car.app.model.DurationSpan create(long);
+ method @RequiresApi(26) public static androidx.car.app.model.DurationSpan create(java.time.Duration);
+ method public long getDurationSeconds();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class ForegroundCarColorSpan extends androidx.car.app.model.CarSpan {
+ method public static androidx.car.app.model.ForegroundCarColorSpan create(androidx.car.app.model.CarColor);
+ method public androidx.car.app.model.CarColor getColor();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class GridItem implements androidx.car.app.model.Item {
+ method public androidx.car.app.model.CarIcon? getImage();
+ method public int getImageType();
+ method public androidx.car.app.model.OnClickDelegate? getOnClickDelegate();
+ method public androidx.car.app.model.CarText? getText();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public boolean isLoading();
+ field public static final int IMAGE_TYPE_ICON = 1; // 0x1
+ field public static final int IMAGE_TYPE_LARGE = 2; // 0x2
+ }
+
+ public static final class GridItem.Builder {
+ ctor public GridItem.Builder();
+ method public androidx.car.app.model.GridItem build();
+ method public androidx.car.app.model.GridItem.Builder setImage(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.model.GridItem.Builder setImage(androidx.car.app.model.CarIcon, int);
+ method public androidx.car.app.model.GridItem.Builder setLoading(boolean);
+ method public androidx.car.app.model.GridItem.Builder setOnClickListener(androidx.car.app.model.OnClickListener);
+ method public androidx.car.app.model.GridItem.Builder setText(CharSequence);
+ method public androidx.car.app.model.GridItem.Builder setText(androidx.car.app.model.CarText);
+ method public androidx.car.app.model.GridItem.Builder setTitle(CharSequence);
+ method public androidx.car.app.model.GridItem.Builder setTitle(androidx.car.app.model.CarText);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class GridTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.ItemList? getSingleList();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public boolean isLoading();
+ }
+
+ public static final class GridTemplate.Builder {
+ ctor public GridTemplate.Builder();
+ method public androidx.car.app.model.GridTemplate build();
+ method public androidx.car.app.model.GridTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.GridTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.GridTemplate.Builder setLoading(boolean);
+ method public androidx.car.app.model.GridTemplate.Builder setSingleList(androidx.car.app.model.ItemList);
+ method public androidx.car.app.model.GridTemplate.Builder setTitle(CharSequence);
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public interface InputCallback {
+ method public default void onInputSubmitted(String);
+ method public default void onInputTextChanged(String);
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public interface InputCallbackDelegate {
+ method public void sendInputSubmitted(String, androidx.car.app.OnDoneCallback);
+ method public void sendInputTextChanged(String, androidx.car.app.OnDoneCallback);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface Item {
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class ItemList {
+ method public java.util.List<androidx.car.app.model.Item!> getItems();
+ method public androidx.car.app.model.CarText? getNoItemsMessage();
+ method public androidx.car.app.model.OnItemVisibilityChangedDelegate? getOnItemVisibilityChangedDelegate();
+ method public androidx.car.app.model.OnSelectedDelegate? getOnSelectedDelegate();
+ method public int getSelectedIndex();
+ }
+
+ public static final class ItemList.Builder {
+ ctor public ItemList.Builder();
+ method public androidx.car.app.model.ItemList.Builder addItem(androidx.car.app.model.Item);
+ method public androidx.car.app.model.ItemList build();
+ method public androidx.car.app.model.ItemList.Builder setNoItemsMessage(CharSequence);
+ method public androidx.car.app.model.ItemList.Builder setOnItemsVisibilityChangedListener(androidx.car.app.model.ItemList.OnItemVisibilityChangedListener);
+ method public androidx.car.app.model.ItemList.Builder setOnSelectedListener(androidx.car.app.model.ItemList.OnSelectedListener);
+ method public androidx.car.app.model.ItemList.Builder setSelectedIndex(@IntRange(from=0) int);
+ }
+
+ public static interface ItemList.OnItemVisibilityChangedListener {
+ method public void onItemVisibilityChanged(int, int);
+ }
+
+ public static interface ItemList.OnSelectedListener {
+ method public void onSelected(int);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class ListTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public java.util.List<androidx.car.app.model.SectionedItemList!> getSectionedLists();
+ method public androidx.car.app.model.ItemList? getSingleList();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public boolean isLoading();
+ }
+
+ public static final class ListTemplate.Builder {
+ ctor public ListTemplate.Builder();
+ method public androidx.car.app.model.ListTemplate.Builder addSectionedList(androidx.car.app.model.SectionedItemList);
+ method public androidx.car.app.model.ListTemplate build();
+ method public androidx.car.app.model.ListTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.ListTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.ListTemplate.Builder setLoading(boolean);
+ method public androidx.car.app.model.ListTemplate.Builder setSingleList(androidx.car.app.model.ItemList);
+ method public androidx.car.app.model.ListTemplate.Builder setTitle(CharSequence);
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public final class LongMessageTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public java.util.List<androidx.car.app.model.Action!> getActions();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.CarText getMessage();
+ method public androidx.car.app.model.CarText? getTitle();
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public static final class LongMessageTemplate.Builder {
+ ctor public LongMessageTemplate.Builder(CharSequence);
+ method public androidx.car.app.model.LongMessageTemplate.Builder addAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.LongMessageTemplate build();
+ method public androidx.car.app.model.LongMessageTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.LongMessageTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.LongMessageTemplate.Builder setTitle(CharSequence);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class MessageTemplate implements androidx.car.app.model.Template {
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public java.util.List<androidx.car.app.model.Action!> getActions();
+ method public androidx.car.app.model.CarText? getDebugMessage();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.CarIcon? getIcon();
+ method public androidx.car.app.model.CarText getMessage();
+ method public androidx.car.app.model.CarText? getTitle();
+ method @androidx.car.app.annotations.RequiresCarApi(2) public boolean isLoading();
+ }
+
+ public static final class MessageTemplate.Builder {
+ ctor public MessageTemplate.Builder(CharSequence);
+ ctor public MessageTemplate.Builder(androidx.car.app.model.CarText);
+ method public androidx.car.app.model.MessageTemplate.Builder addAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.MessageTemplate build();
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.model.MessageTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.MessageTemplate.Builder setDebugMessage(Throwable);
+ method public androidx.car.app.model.MessageTemplate.Builder setDebugMessage(String);
+ method public androidx.car.app.model.MessageTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.MessageTemplate.Builder setIcon(androidx.car.app.model.CarIcon);
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.model.MessageTemplate.Builder setLoading(boolean);
+ method public androidx.car.app.model.MessageTemplate.Builder setTitle(CharSequence);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Metadata {
+ method public androidx.car.app.model.Place? getPlace();
+ field public static final androidx.car.app.model.Metadata EMPTY_METADATA;
+ }
+
+ public static final class Metadata.Builder {
+ ctor public Metadata.Builder();
+ ctor public Metadata.Builder(androidx.car.app.model.Metadata);
+ method public androidx.car.app.model.Metadata build();
+ method public androidx.car.app.model.Metadata.Builder setPlace(androidx.car.app.model.Place);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface OnCheckedChangeDelegate {
+ method public void sendCheckedChange(boolean, androidx.car.app.OnDoneCallback);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface OnClickDelegate {
+ method public boolean isParkedOnly();
+ method public void sendClick(androidx.car.app.OnDoneCallback);
+ }
+
+ public interface OnClickListener {
+ method public void onClick();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface OnItemVisibilityChangedDelegate {
+ method public void sendItemVisibilityChanged(int, int, androidx.car.app.OnDoneCallback);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface OnSelectedDelegate {
+ method public void sendSelected(int, androidx.car.app.OnDoneCallback);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Pane {
+ method public java.util.List<androidx.car.app.model.Action!> getActions();
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.model.CarIcon? getImage();
+ method public java.util.List<androidx.car.app.model.Row!> getRows();
+ method public boolean isLoading();
+ }
+
+ public static final class Pane.Builder {
+ ctor public Pane.Builder();
+ method public androidx.car.app.model.Pane.Builder addAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.Pane.Builder addRow(androidx.car.app.model.Row);
+ method public androidx.car.app.model.Pane build();
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.model.Pane.Builder setImage(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.model.Pane.Builder setLoading(boolean);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class PaneTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.Pane getPane();
+ method public androidx.car.app.model.CarText? getTitle();
+ }
+
+ public static final class PaneTemplate.Builder {
+ ctor public PaneTemplate.Builder(androidx.car.app.model.Pane);
+ method public androidx.car.app.model.PaneTemplate build();
+ method public androidx.car.app.model.PaneTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.PaneTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.PaneTemplate.Builder setTitle(CharSequence);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class ParkedOnlyOnClickListener implements androidx.car.app.model.OnClickListener {
+ method public static androidx.car.app.model.ParkedOnlyOnClickListener create(androidx.car.app.model.OnClickListener);
+ method public void onClick();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Place {
+ method public androidx.car.app.model.CarLocation getLocation();
+ method public androidx.car.app.model.PlaceMarker? getMarker();
+ }
+
+ public static final class Place.Builder {
+ ctor public Place.Builder(androidx.car.app.model.CarLocation);
+ ctor public Place.Builder(androidx.car.app.model.Place);
+ method public androidx.car.app.model.Place build();
+ method public androidx.car.app.model.Place.Builder setMarker(androidx.car.app.model.PlaceMarker);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class PlaceListMapTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.Place? getAnchor();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.ItemList? getItemList();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public boolean isCurrentLocationEnabled();
+ method public boolean isLoading();
+ }
+
+ public static final class PlaceListMapTemplate.Builder {
+ ctor public PlaceListMapTemplate.Builder();
+ method public androidx.car.app.model.PlaceListMapTemplate build();
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setAnchor(androidx.car.app.model.Place);
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setCurrentLocationEnabled(boolean);
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setItemList(androidx.car.app.model.ItemList);
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setLoading(boolean);
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setTitle(CharSequence);
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setTitle(androidx.car.app.model.CarText);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class PlaceMarker {
+ method public androidx.car.app.model.CarColor? getColor();
+ method public androidx.car.app.model.CarIcon? getIcon();
+ method public int getIconType();
+ method public androidx.car.app.model.CarText? getLabel();
+ field public static final int TYPE_ICON = 0; // 0x0
+ field public static final int TYPE_IMAGE = 1; // 0x1
+ }
+
+ public static final class PlaceMarker.Builder {
+ ctor public PlaceMarker.Builder();
+ method public androidx.car.app.model.PlaceMarker build();
+ method public androidx.car.app.model.PlaceMarker.Builder setColor(androidx.car.app.model.CarColor);
+ method public androidx.car.app.model.PlaceMarker.Builder setIcon(androidx.car.app.model.CarIcon, int);
+ method public androidx.car.app.model.PlaceMarker.Builder setLabel(CharSequence);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Row implements androidx.car.app.model.Item {
+ method public androidx.car.app.model.CarIcon? getImage();
+ method public androidx.car.app.model.Metadata? getMetadata();
+ method public androidx.car.app.model.OnClickDelegate? getOnClickDelegate();
+ method public int getRowImageType();
+ method public java.util.List<androidx.car.app.model.CarText!> getTexts();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public androidx.car.app.model.Toggle? getToggle();
+ method public boolean isBrowsable();
+ method public androidx.car.app.model.Row row();
+ method public CharSequence yourBoat();
+ field public static final int IMAGE_TYPE_ICON = 4; // 0x4
+ field public static final int IMAGE_TYPE_LARGE = 2; // 0x2
+ field public static final int IMAGE_TYPE_SMALL = 1; // 0x1
+ }
+
+ public static final class Row.Builder {
+ ctor public Row.Builder();
+ method public androidx.car.app.model.Row.Builder addText(CharSequence);
+ method public androidx.car.app.model.Row.Builder addText(androidx.car.app.model.CarText);
+ method public androidx.car.app.model.Row build();
+ method public androidx.car.app.model.Row.Builder setBrowsable(boolean);
+ method public androidx.car.app.model.Row.Builder setImage(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.model.Row.Builder setImage(androidx.car.app.model.CarIcon, int);
+ method public androidx.car.app.model.Row.Builder setMetadata(androidx.car.app.model.Metadata);
+ method public androidx.car.app.model.Row.Builder setOnClickListener(androidx.car.app.model.OnClickListener);
+ method public androidx.car.app.model.Row.Builder setTitle(CharSequence);
+ method public androidx.car.app.model.Row.Builder setTitle(androidx.car.app.model.CarText);
+ method public androidx.car.app.model.Row.Builder setToggle(androidx.car.app.model.Toggle);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface SearchCallbackDelegate {
+ method public void sendSearchSubmitted(String, androidx.car.app.OnDoneCallback);
+ method public void sendSearchTextChanged(String, androidx.car.app.OnDoneCallback);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class SearchTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public String? getInitialSearchText();
+ method public androidx.car.app.model.ItemList? getItemList();
+ method public androidx.car.app.model.SearchCallbackDelegate getSearchCallbackDelegate();
+ method public String? getSearchHint();
+ method public boolean isLoading();
+ method public boolean isShowKeyboardByDefault();
+ }
+
+ public static final class SearchTemplate.Builder {
+ ctor public SearchTemplate.Builder(androidx.car.app.model.SearchTemplate.SearchCallback);
+ method public androidx.car.app.model.SearchTemplate build();
+ method public androidx.car.app.model.SearchTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.SearchTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.SearchTemplate.Builder setInitialSearchText(String);
+ method public androidx.car.app.model.SearchTemplate.Builder setItemList(androidx.car.app.model.ItemList);
+ method public androidx.car.app.model.SearchTemplate.Builder setLoading(boolean);
+ method public androidx.car.app.model.SearchTemplate.Builder setSearchHint(String);
+ method public androidx.car.app.model.SearchTemplate.Builder setShowKeyboardByDefault(boolean);
+ }
+
+ public static interface SearchTemplate.SearchCallback {
+ method public default void onSearchSubmitted(String);
+ method public default void onSearchTextChanged(String);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class SectionedItemList {
+ method public static androidx.car.app.model.SectionedItemList create(androidx.car.app.model.ItemList, CharSequence);
+ method public androidx.car.app.model.CarText getHeader();
+ method public androidx.car.app.model.ItemList getItemList();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface Template {
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class TemplateInfo {
+ ctor public TemplateInfo(Class<? extends androidx.car.app.model.Template>, String);
+ method public Class<? extends androidx.car.app.model.Template> getTemplateClass();
+ method public String getTemplateId();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class TemplateWrapper {
+ method public static androidx.car.app.model.TemplateWrapper copyOf(androidx.car.app.model.TemplateWrapper);
+ method public int getCurrentTaskStep();
+ method public String getId();
+ method public androidx.car.app.model.Template getTemplate();
+ method public java.util.List<androidx.car.app.model.TemplateInfo!> getTemplateInfosForScreenStack();
+ method public boolean isRefresh();
+ method public void setCurrentTaskStep(int);
+ method public void setId(String);
+ method public void setRefresh(boolean);
+ method public void setTemplate(androidx.car.app.model.Template);
+ method public static androidx.car.app.model.TemplateWrapper wrap(androidx.car.app.model.Template);
+ method public static androidx.car.app.model.TemplateWrapper wrap(androidx.car.app.model.Template, String);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Toggle {
+ method public androidx.car.app.model.OnCheckedChangeDelegate getOnCheckedChangeDelegate();
+ method public boolean isChecked();
+ }
+
+ public static final class Toggle.Builder {
+ ctor public Toggle.Builder(androidx.car.app.model.Toggle.OnCheckedChangeListener);
+ method public androidx.car.app.model.Toggle build();
+ method public androidx.car.app.model.Toggle.Builder setChecked(boolean);
+ }
+
+ public static interface Toggle.OnCheckedChangeListener {
+ method public void onCheckedChange(boolean);
+ }
+
+}
+
+package androidx.car.app.model.signin {
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public final class InputSignInMethod implements androidx.car.app.model.signin.SignInTemplate.SignInMethod {
+ method public androidx.car.app.model.CarText? getDefaultValue();
+ method public androidx.car.app.model.CarText? getErrorMessage();
+ method public androidx.car.app.model.CarText? getHint();
+ method public androidx.car.app.model.InputCallbackDelegate getInputCallbackDelegate();
+ method public int getInputType();
+ method public int getKeyboardType();
+ method public boolean isShowKeyboardByDefault();
+ field public static final int INPUT_TYPE_DEFAULT = 1; // 0x1
+ field public static final int INPUT_TYPE_PASSWORD = 2; // 0x2
+ field public static final int KEYBOARD_DEFAULT = 1; // 0x1
+ field public static final int KEYBOARD_EMAIL = 2; // 0x2
+ field public static final int KEYBOARD_NUMBER = 4; // 0x4
+ field public static final int KEYBOARD_PHONE = 3; // 0x3
+ }
+
+ public static final class InputSignInMethod.Builder {
+ ctor public InputSignInMethod.Builder(androidx.car.app.model.InputCallback);
+ method public androidx.car.app.model.signin.InputSignInMethod build();
+ method public androidx.car.app.model.signin.InputSignInMethod.Builder setDefaultValue(String);
+ method public androidx.car.app.model.signin.InputSignInMethod.Builder setErrorMessage(CharSequence);
+ method public androidx.car.app.model.signin.InputSignInMethod.Builder setHint(CharSequence);
+ method public androidx.car.app.model.signin.InputSignInMethod.Builder setInputType(int);
+ method public androidx.car.app.model.signin.InputSignInMethod.Builder setKeyboardType(int);
+ method public androidx.car.app.model.signin.InputSignInMethod.Builder setShowKeyboardByDefault(boolean);
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public final class PinSignInMethod implements androidx.car.app.model.signin.SignInTemplate.SignInMethod {
+ ctor public PinSignInMethod(CharSequence);
+ method public androidx.car.app.model.CarText getPinCode();
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public final class ProviderSignInMethod implements androidx.car.app.model.signin.SignInTemplate.SignInMethod {
+ ctor public ProviderSignInMethod(androidx.car.app.model.Action);
+ method public androidx.car.app.model.Action getAction();
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(4) public final class QRCodeSignInMethod implements androidx.car.app.model.signin.SignInTemplate.SignInMethod {
+ ctor public QRCodeSignInMethod(android.net.Uri);
+ method public android.net.Uri getUri();
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public final class SignInTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public java.util.List<androidx.car.app.model.Action!> getActions();
+ method public androidx.car.app.model.CarText? getAdditionalText();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.CarText? getInstructions();
+ method public androidx.car.app.model.signin.SignInTemplate.SignInMethod getSignInMethod();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public boolean isLoading();
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public static final class SignInTemplate.Builder {
+ ctor public SignInTemplate.Builder(androidx.car.app.model.signin.SignInTemplate.SignInMethod);
+ method public androidx.car.app.model.signin.SignInTemplate.Builder addAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.signin.SignInTemplate build();
+ method public androidx.car.app.model.signin.SignInTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.signin.SignInTemplate.Builder setAdditionalText(CharSequence);
+ method public androidx.car.app.model.signin.SignInTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.signin.SignInTemplate.Builder setInstructions(CharSequence);
+ method public androidx.car.app.model.signin.SignInTemplate.Builder setLoading(boolean);
+ method public androidx.car.app.model.signin.SignInTemplate.Builder setTitle(CharSequence);
+ }
+
+ public static interface SignInTemplate.SignInMethod {
+ }
+
+}
+
+package androidx.car.app.navigation {
+
+ public class NavigationManager implements androidx.car.app.managers.Manager {
+ method @MainThread public void clearNavigationManagerCallback();
+ method @MainThread public void navigationEnded();
+ method @MainThread public void navigationStarted();
+ method @MainThread public void setNavigationManagerCallback(androidx.car.app.navigation.NavigationManagerCallback);
+ method @MainThread public void setNavigationManagerCallback(java.util.concurrent.Executor, androidx.car.app.navigation.NavigationManagerCallback);
+ method @MainThread public void updateTrip(androidx.car.app.navigation.model.Trip);
+ }
+
+ public interface NavigationManagerCallback {
+ method public default void onAutoDriveEnabled();
+ method public default void onStopNavigation();
+ }
+
+}
+
+package androidx.car.app.navigation.model {
+
+ @androidx.car.app.annotations.CarProtocol public final class Destination {
+ method public androidx.car.app.model.CarText? getAddress();
+ method public androidx.car.app.model.CarIcon? getImage();
+ method public androidx.car.app.model.CarText? getName();
+ }
+
+ public static final class Destination.Builder {
+ ctor public Destination.Builder();
+ method public androidx.car.app.navigation.model.Destination build();
+ method public androidx.car.app.navigation.model.Destination.Builder setAddress(CharSequence);
+ method public androidx.car.app.navigation.model.Destination.Builder setImage(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.navigation.model.Destination.Builder setName(CharSequence);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Lane {
+ method public java.util.List<androidx.car.app.navigation.model.LaneDirection!> getDirections();
+ }
+
+ public static final class Lane.Builder {
+ ctor public Lane.Builder();
+ method public androidx.car.app.navigation.model.Lane.Builder addDirection(androidx.car.app.navigation.model.LaneDirection);
+ method public androidx.car.app.navigation.model.Lane build();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class LaneDirection {
+ method public static androidx.car.app.navigation.model.LaneDirection create(int, boolean);
+ method public int getShape();
+ method public boolean isRecommended();
+ field public static final int SHAPE_NORMAL_LEFT = 5; // 0x5
+ field public static final int SHAPE_NORMAL_RIGHT = 6; // 0x6
+ field public static final int SHAPE_SHARP_LEFT = 7; // 0x7
+ field public static final int SHAPE_SHARP_RIGHT = 8; // 0x8
+ field public static final int SHAPE_SLIGHT_LEFT = 3; // 0x3
+ field public static final int SHAPE_SLIGHT_RIGHT = 4; // 0x4
+ field public static final int SHAPE_STRAIGHT = 2; // 0x2
+ field public static final int SHAPE_UNKNOWN = 1; // 0x1
+ field public static final int SHAPE_U_TURN_LEFT = 9; // 0x9
+ field public static final int SHAPE_U_TURN_RIGHT = 10; // 0xa
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Maneuver {
+ method public androidx.car.app.model.CarIcon? getIcon();
+ method public int getRoundaboutExitAngle();
+ method public int getRoundaboutExitNumber();
+ method public int getType();
+ field public static final int TYPE_DEPART = 1; // 0x1
+ field public static final int TYPE_DESTINATION = 39; // 0x27
+ field public static final int TYPE_DESTINATION_LEFT = 41; // 0x29
+ field public static final int TYPE_DESTINATION_RIGHT = 42; // 0x2a
+ field public static final int TYPE_DESTINATION_STRAIGHT = 40; // 0x28
+ field public static final int TYPE_FERRY_BOAT = 37; // 0x25
+ field public static final int TYPE_FERRY_BOAT_LEFT = 47; // 0x2f
+ field public static final int TYPE_FERRY_BOAT_RIGHT = 48; // 0x30
+ field public static final int TYPE_FERRY_TRAIN = 38; // 0x26
+ field public static final int TYPE_FERRY_TRAIN_LEFT = 49; // 0x31
+ field public static final int TYPE_FERRY_TRAIN_RIGHT = 50; // 0x32
+ field public static final int TYPE_FORK_LEFT = 25; // 0x19
+ field public static final int TYPE_FORK_RIGHT = 26; // 0x1a
+ field public static final int TYPE_KEEP_LEFT = 3; // 0x3
+ field public static final int TYPE_KEEP_RIGHT = 4; // 0x4
+ field public static final int TYPE_MERGE_LEFT = 27; // 0x1b
+ field public static final int TYPE_MERGE_RIGHT = 28; // 0x1c
+ field public static final int TYPE_MERGE_SIDE_UNSPECIFIED = 29; // 0x1d
+ field public static final int TYPE_NAME_CHANGE = 2; // 0x2
+ field public static final int TYPE_OFF_RAMP_NORMAL_LEFT = 23; // 0x17
+ field public static final int TYPE_OFF_RAMP_NORMAL_RIGHT = 24; // 0x18
+ field public static final int TYPE_OFF_RAMP_SLIGHT_LEFT = 21; // 0x15
+ field public static final int TYPE_OFF_RAMP_SLIGHT_RIGHT = 22; // 0x16
+ field public static final int TYPE_ON_RAMP_NORMAL_LEFT = 15; // 0xf
+ field public static final int TYPE_ON_RAMP_NORMAL_RIGHT = 16; // 0x10
+ field public static final int TYPE_ON_RAMP_SHARP_LEFT = 17; // 0x11
+ field public static final int TYPE_ON_RAMP_SHARP_RIGHT = 18; // 0x12
+ field public static final int TYPE_ON_RAMP_SLIGHT_LEFT = 13; // 0xd
+ field public static final int TYPE_ON_RAMP_SLIGHT_RIGHT = 14; // 0xe
+ field public static final int TYPE_ON_RAMP_U_TURN_LEFT = 19; // 0x13
+ field public static final int TYPE_ON_RAMP_U_TURN_RIGHT = 20; // 0x14
+ field public static final int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CCW = 34; // 0x22
+ field public static final int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CCW_WITH_ANGLE = 35; // 0x23
+ field public static final int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CW = 32; // 0x20
+ field public static final int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CW_WITH_ANGLE = 33; // 0x21
+ field public static final int TYPE_ROUNDABOUT_ENTER_CCW = 45; // 0x2d
+ field public static final int TYPE_ROUNDABOUT_ENTER_CW = 43; // 0x2b
+ field public static final int TYPE_ROUNDABOUT_EXIT_CCW = 46; // 0x2e
+ field public static final int TYPE_ROUNDABOUT_EXIT_CW = 44; // 0x2c
+ field public static final int TYPE_STRAIGHT = 36; // 0x24
+ field public static final int TYPE_TURN_NORMAL_LEFT = 7; // 0x7
+ field public static final int TYPE_TURN_NORMAL_RIGHT = 8; // 0x8
+ field public static final int TYPE_TURN_SHARP_LEFT = 9; // 0x9
+ field public static final int TYPE_TURN_SHARP_RIGHT = 10; // 0xa
+ field public static final int TYPE_TURN_SLIGHT_LEFT = 5; // 0x5
+ field public static final int TYPE_TURN_SLIGHT_RIGHT = 6; // 0x6
+ field public static final int TYPE_UNKNOWN = 0; // 0x0
+ field public static final int TYPE_U_TURN_LEFT = 11; // 0xb
+ field public static final int TYPE_U_TURN_RIGHT = 12; // 0xc
+ }
+
+ public static final class Maneuver.Builder {
+ ctor public Maneuver.Builder(int);
+ method public androidx.car.app.navigation.model.Maneuver build();
+ method public androidx.car.app.navigation.model.Maneuver.Builder setIcon(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.navigation.model.Maneuver.Builder setRoundaboutExitAngle(@IntRange(from=1, to=360) int);
+ method public androidx.car.app.navigation.model.Maneuver.Builder setRoundaboutExitNumber(@IntRange(from=1) int);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class MessageInfo implements androidx.car.app.navigation.model.NavigationTemplate.NavigationInfo {
+ method public androidx.car.app.model.CarIcon? getImage();
+ method public androidx.car.app.model.CarText? getText();
+ method public androidx.car.app.model.CarText? getTitle();
+ }
+
+ public static final class MessageInfo.Builder {
+ ctor public MessageInfo.Builder(CharSequence);
+ ctor public MessageInfo.Builder(androidx.car.app.model.CarText);
+ method public androidx.car.app.navigation.model.MessageInfo build();
+ method public androidx.car.app.navigation.model.MessageInfo.Builder setImage(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.navigation.model.MessageInfo.Builder setText(CharSequence);
+ method public androidx.car.app.navigation.model.MessageInfo.Builder setText(androidx.car.app.model.CarText);
+ method public androidx.car.app.navigation.model.MessageInfo.Builder setTitle(CharSequence);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class NavigationTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.CarColor? getBackgroundColor();
+ method public androidx.car.app.navigation.model.TravelEstimate? getDestinationTravelEstimate();
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.model.ActionStrip? getMapActionStrip();
+ method public androidx.car.app.navigation.model.NavigationTemplate.NavigationInfo? getNavigationInfo();
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.navigation.model.PanModeDelegate? getPanModeDelegate();
+ method @Deprecated @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.model.Toggle? getPanModeToggle();
+ }
+
+ public static final class NavigationTemplate.Builder {
+ ctor public NavigationTemplate.Builder();
+ method public androidx.car.app.navigation.model.NavigationTemplate build();
+ method public androidx.car.app.navigation.model.NavigationTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.navigation.model.NavigationTemplate.Builder setBackgroundColor(androidx.car.app.model.CarColor);
+ method public androidx.car.app.navigation.model.NavigationTemplate.Builder setDestinationTravelEstimate(androidx.car.app.navigation.model.TravelEstimate);
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.navigation.model.NavigationTemplate.Builder setMapActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.navigation.model.NavigationTemplate.Builder setNavigationInfo(androidx.car.app.navigation.model.NavigationTemplate.NavigationInfo);
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.navigation.model.NavigationTemplate.Builder setPanModeListener(androidx.car.app.navigation.model.PanModeListener);
+ }
+
+ public static interface NavigationTemplate.NavigationInfo {
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(2) public interface PanModeDelegate {
+ method public void sendPanModeChanged(boolean, androidx.car.app.OnDoneCallback);
+ }
+
+ public interface PanModeListener {
+ method public void onPanModeChanged(boolean);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class PlaceListNavigationTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.ItemList? getItemList();
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.model.ActionStrip? getMapActionStrip();
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.navigation.model.PanModeDelegate? getPanModeDelegate();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public boolean isLoading();
+ }
+
+ public static final class PlaceListNavigationTemplate.Builder {
+ ctor public PlaceListNavigationTemplate.Builder();
+ method public androidx.car.app.navigation.model.PlaceListNavigationTemplate build();
+ method public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setItemList(androidx.car.app.model.ItemList);
+ method public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setLoading(boolean);
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setMapActionStrip(androidx.car.app.model.ActionStrip);
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setPanModeListener(androidx.car.app.navigation.model.PanModeListener);
+ method public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setTitle(CharSequence);
+ method public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setTitle(androidx.car.app.model.CarText);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class RoutePreviewNavigationTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.ItemList? getItemList();
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.model.ActionStrip? getMapActionStrip();
+ method public androidx.car.app.model.Action? getNavigateAction();
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.navigation.model.PanModeDelegate? getPanModeDelegate();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public boolean isLoading();
+ }
+
+ public static final class RoutePreviewNavigationTemplate.Builder {
+ ctor public RoutePreviewNavigationTemplate.Builder();
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate build();
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setItemList(androidx.car.app.model.ItemList);
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setLoading(boolean);
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setMapActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setNavigateAction(androidx.car.app.model.Action);
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setPanModeListener(androidx.car.app.navigation.model.PanModeListener);
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setTitle(CharSequence);
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setTitle(androidx.car.app.model.CarText);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class RoutingInfo implements androidx.car.app.navigation.model.NavigationTemplate.NavigationInfo {
+ method public androidx.car.app.model.Distance? getCurrentDistance();
+ method public androidx.car.app.navigation.model.Step? getCurrentStep();
+ method public androidx.car.app.model.CarIcon? getJunctionImage();
+ method public androidx.car.app.navigation.model.Step? getNextStep();
+ method public boolean isLoading();
+ }
+
+ public static final class RoutingInfo.Builder {
+ ctor public RoutingInfo.Builder();
+ method public androidx.car.app.navigation.model.RoutingInfo build();
+ method public androidx.car.app.navigation.model.RoutingInfo.Builder setCurrentStep(androidx.car.app.navigation.model.Step, androidx.car.app.model.Distance);
+ method public androidx.car.app.navigation.model.RoutingInfo.Builder setJunctionImage(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.navigation.model.RoutingInfo.Builder setLoading(boolean);
+ method public androidx.car.app.navigation.model.RoutingInfo.Builder setNextStep(androidx.car.app.navigation.model.Step);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Step {
+ method public androidx.car.app.model.CarText? getCue();
+ method public java.util.List<androidx.car.app.navigation.model.Lane!> getLanes();
+ method public androidx.car.app.model.CarIcon? getLanesImage();
+ method public androidx.car.app.navigation.model.Maneuver? getManeuver();
+ method public androidx.car.app.model.CarText? getRoad();
+ }
+
+ public static final class Step.Builder {
+ ctor public Step.Builder();
+ ctor public Step.Builder(CharSequence);
+ ctor public Step.Builder(androidx.car.app.model.CarText);
+ method public androidx.car.app.navigation.model.Step.Builder addLane(androidx.car.app.navigation.model.Lane);
+ method public androidx.car.app.navigation.model.Step build();
+ method public androidx.car.app.navigation.model.Step.Builder setCue(CharSequence);
+ method public androidx.car.app.navigation.model.Step.Builder setLanesImage(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.navigation.model.Step.Builder setManeuver(androidx.car.app.navigation.model.Maneuver);
+ method public androidx.car.app.navigation.model.Step.Builder setRoad(CharSequence);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class TravelEstimate {
+ method public androidx.car.app.model.DateTimeWithZone? getArrivalTimeAtDestination();
+ method public androidx.car.app.model.Distance? getRemainingDistance();
+ method public androidx.car.app.model.CarColor? getRemainingDistanceColor();
+ method public androidx.car.app.model.CarColor? getRemainingTimeColor();
+ method public long getRemainingTimeSeconds();
+ field public static final long REMAINING_TIME_UNKNOWN = -1L; // 0xffffffffffffffffL
+ }
+
+ public static final class TravelEstimate.Builder {
+ ctor public TravelEstimate.Builder(androidx.car.app.model.Distance, androidx.car.app.model.DateTimeWithZone);
+ ctor @RequiresApi(26) public TravelEstimate.Builder(androidx.car.app.model.Distance, java.time.ZonedDateTime);
+ method public androidx.car.app.navigation.model.TravelEstimate build();
+ method public androidx.car.app.navigation.model.TravelEstimate.Builder setRemainingDistanceColor(androidx.car.app.model.CarColor);
+ method @RequiresApi(26) public androidx.car.app.navigation.model.TravelEstimate.Builder setRemainingTime(java.time.Duration);
+ method public androidx.car.app.navigation.model.TravelEstimate.Builder setRemainingTimeColor(androidx.car.app.model.CarColor);
+ method public androidx.car.app.navigation.model.TravelEstimate.Builder setRemainingTimeSeconds(@IntRange(from=0xffffffff) long);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Trip {
+ method public androidx.car.app.model.CarText? getCurrentRoad();
+ method public java.util.List<androidx.car.app.navigation.model.TravelEstimate!> getDestinationTravelEstimates();
+ method public java.util.List<androidx.car.app.navigation.model.Destination!> getDestinations();
+ method public java.util.List<androidx.car.app.navigation.model.TravelEstimate!> getStepTravelEstimates();
+ method public java.util.List<androidx.car.app.navigation.model.Step!> getSteps();
+ method public boolean isLoading();
+ }
+
+ public static final class Trip.Builder {
+ ctor public Trip.Builder();
+ method public androidx.car.app.navigation.model.Trip.Builder addDestination(androidx.car.app.navigation.model.Destination, androidx.car.app.navigation.model.TravelEstimate);
+ method public androidx.car.app.navigation.model.Trip.Builder addStep(androidx.car.app.navigation.model.Step, androidx.car.app.navigation.model.TravelEstimate);
+ method public androidx.car.app.navigation.model.Trip build();
+ method public androidx.car.app.navigation.model.Trip.Builder setCurrentRoad(CharSequence);
+ method public androidx.car.app.navigation.model.Trip.Builder setLoading(boolean);
+ }
+
+}
+
+package androidx.car.app.notification {
+
+ public final class CarAppExtender implements androidx.core.app.NotificationCompat.Extender {
+ ctor public CarAppExtender(android.app.Notification);
+ method public androidx.core.app.NotificationCompat.Builder extend(androidx.core.app.NotificationCompat.Builder);
+ method public java.util.List<android.app.Notification.Action!> getActions();
+ method public String? getChannelId();
+ method public androidx.car.app.model.CarColor? getColor();
+ method public android.app.PendingIntent? getContentIntent();
+ method public CharSequence? getContentText();
+ method public CharSequence? getContentTitle();
+ method public android.app.PendingIntent? getDeleteIntent();
+ method public int getImportance();
+ method public android.graphics.Bitmap? getLargeIcon();
+ method @DrawableRes public int getSmallIcon();
+ method public static boolean isExtended(android.app.Notification);
+ }
+
+ public static final class CarAppExtender.Builder {
+ ctor public CarAppExtender.Builder();
+ method public androidx.car.app.notification.CarAppExtender.Builder addAction(@DrawableRes int, CharSequence, android.app.PendingIntent);
+ method public androidx.car.app.notification.CarAppExtender build();
+ method public androidx.car.app.notification.CarAppExtender.Builder setChannelId(String);
+ method public androidx.car.app.notification.CarAppExtender.Builder setColor(androidx.car.app.model.CarColor);
+ method public androidx.car.app.notification.CarAppExtender.Builder setContentIntent(android.app.PendingIntent);
+ method public androidx.car.app.notification.CarAppExtender.Builder setContentText(CharSequence);
+ method public androidx.car.app.notification.CarAppExtender.Builder setContentTitle(CharSequence);
+ method public androidx.car.app.notification.CarAppExtender.Builder setDeleteIntent(android.app.PendingIntent);
+ method public androidx.car.app.notification.CarAppExtender.Builder setImportance(int);
+ method public androidx.car.app.notification.CarAppExtender.Builder setLargeIcon(android.graphics.Bitmap);
+ method public androidx.car.app.notification.CarAppExtender.Builder setSmallIcon(int);
+ }
+
+ public final class CarNotificationManager {
+ method public boolean areNotificationsEnabled();
+ method public void cancel(int);
+ method public void cancel(String?, int);
+ method public void cancelAll();
+ method public void createNotificationChannel(androidx.core.app.NotificationChannelCompat);
+ method public void createNotificationChannelGroup(androidx.core.app.NotificationChannelGroupCompat);
+ method public void createNotificationChannelGroups(java.util.List<androidx.core.app.NotificationChannelGroupCompat!>);
+ method public void createNotificationChannels(java.util.List<androidx.core.app.NotificationChannelCompat!>);
+ method public void deleteNotificationChannel(String);
+ method public void deleteNotificationChannelGroup(String);
+ method public void deleteUnlistedNotificationChannels(java.util.Collection<java.lang.String!>);
+ method public static androidx.car.app.notification.CarNotificationManager from(android.content.Context);
+ method public static java.util.Set<java.lang.String!> getEnabledListenerPackages(android.content.Context);
+ method public int getImportance();
+ method public androidx.core.app.NotificationChannelCompat? getNotificationChannel(String);
+ method public androidx.core.app.NotificationChannelCompat? getNotificationChannel(String, String);
+ method public androidx.core.app.NotificationChannelGroupCompat? getNotificationChannelGroup(String);
+ method public java.util.List<androidx.core.app.NotificationChannelGroupCompat!> getNotificationChannelGroups();
+ method public java.util.List<androidx.core.app.NotificationChannelCompat!> getNotificationChannels();
+ method public void notify(int, androidx.core.app.NotificationCompat.Builder);
+ method public void notify(String?, int, androidx.core.app.NotificationCompat.Builder);
+ }
+
+ public final class CarPendingIntent {
+ method public static android.app.PendingIntent getCarApp(android.content.Context, int, android.content.Intent, int);
+ }
+
+}
+
+package androidx.car.app.serialization {
+
+ public final class Bundleable implements android.os.Parcelable {
+ method public static androidx.car.app.serialization.Bundleable create(Object) throws androidx.car.app.serialization.BundlerException;
+ method public int describeContents();
+ method public Object get() throws androidx.car.app.serialization.BundlerException;
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<androidx.car.app.serialization.Bundleable!> CREATOR;
+ }
+
+ public class BundlerException extends java.lang.Exception {
+ ctor public BundlerException(String?, Throwable);
+ ctor public BundlerException(String?);
+ }
+
+}
+
+package androidx.car.app.validation {
+
+ public final class HostValidator {
+ method public java.util.Map<java.lang.String!,java.util.List<java.lang.String!>!> getAllowedHosts();
+ method public boolean isValidHost(androidx.car.app.HostInfo);
+ field public static final androidx.car.app.validation.HostValidator ALLOW_ALL_HOSTS_VALIDATOR;
+ field public static final String TEMPLATE_RENDERER_PERMISSION = "android.car.permission.TEMPLATE_RENDERER";
+ }
+
+ public static final class HostValidator.Builder {
+ ctor public HostValidator.Builder(android.content.Context);
+ method public androidx.car.app.validation.HostValidator.Builder addAllowedHost(String, String);
+ method public androidx.car.app.validation.HostValidator.Builder addAllowedHosts(@ArrayRes int);
+ method public androidx.car.app.validation.HostValidator build();
+ }
+
+}
+
+package androidx.car.app.versioning {
+
+ public final class CarAppApiLevels {
+ method public static int getLatest();
+ method public static int getOldest();
+ field public static final int LEVEL_1 = 1; // 0x1
+ field public static final int LEVEL_2 = 2; // 0x2
+ field public static final int LEVEL_3 = 3; // 0x3
+ field public static final int LEVEL_4 = 4; // 0x4
+ }
+
+}
+
diff --git a/car/app/app/api/public_plus_experimental_1.2.0-beta01.txt b/car/app/app/api/public_plus_experimental_1.2.0-beta01.txt
new file mode 100644
index 0000000..f0bcdbc
--- /dev/null
+++ b/car/app/app/api/public_plus_experimental_1.2.0-beta01.txt
@@ -0,0 +1,1462 @@
+// Signature format: 4.0
+package androidx.car.app {
+
+ @androidx.car.app.annotations.CarProtocol public final class AppInfo {
+ ctor @VisibleForTesting public AppInfo(int, int, String);
+ method public int getLatestCarAppApiLevel();
+ method public String getLibraryDisplayVersion();
+ method public int getMinCarAppApiLevel();
+ field public static final String MIN_API_LEVEL_METADATA_KEY = "androidx.car.app.minCarApiLevel";
+ }
+
+ public class AppManager implements androidx.car.app.managers.Manager {
+ method public void invalidate();
+ method public void setSurfaceCallback(androidx.car.app.SurfaceCallback?);
+ method public void showToast(CharSequence, int);
+ }
+
+ public final class CarAppPermission {
+ method public static void checkHasLibraryPermission(android.content.Context, String);
+ method public static void checkHasPermission(android.content.Context, String);
+ field public static final String ACCESS_SURFACE = "androidx.car.app.ACCESS_SURFACE";
+ field public static final String MAP_TEMPLATES = "androidx.car.app.MAP_TEMPLATES";
+ field public static final String NAVIGATION_TEMPLATES = "androidx.car.app.NAVIGATION_TEMPLATES";
+ }
+
+ public abstract class CarAppService extends android.app.Service {
+ ctor public CarAppService();
+ method public abstract androidx.car.app.validation.HostValidator createHostValidator();
+ method @CallSuper public final void dump(java.io.FileDescriptor, java.io.PrintWriter, String![]?);
+ method public final androidx.car.app.Session? getCurrentSession();
+ method public final androidx.car.app.HostInfo? getHostInfo();
+ method @CallSuper public final android.os.IBinder onBind(android.content.Intent);
+ method public abstract androidx.car.app.Session onCreateSession();
+ method public final boolean onUnbind(android.content.Intent);
+ field public static final String CATEGORY_CHARGING_APP = "androidx.car.app.category.CHARGING";
+ field public static final String CATEGORY_NAVIGATION_APP = "androidx.car.app.category.NAVIGATION";
+ field public static final String CATEGORY_PARKING_APP = "androidx.car.app.category.PARKING";
+ field public static final String SERVICE_INTERFACE = "androidx.car.app.CarAppService";
+ }
+
+ public class CarContext extends android.content.ContextWrapper {
+ method public void finishCarApp();
+ method @androidx.car.app.annotations.RequiresCarApi(2) public android.content.ComponentName? getCallingComponent();
+ method public int getCarAppApiLevel();
+ method public Object getCarService(String);
+ method public <T> T getCarService(Class<T!>);
+ method public String getCarServiceName(Class<?>);
+ method public androidx.car.app.HostInfo? getHostInfo();
+ method public androidx.activity.OnBackPressedDispatcher getOnBackPressedDispatcher();
+ method public boolean isDarkMode();
+ method public void requestPermissions(java.util.List<java.lang.String!>, androidx.car.app.OnRequestPermissionsListener);
+ method public void requestPermissions(java.util.List<java.lang.String!>, java.util.concurrent.Executor, androidx.car.app.OnRequestPermissionsListener);
+ method @androidx.car.app.annotations.RequiresCarApi(2) public void setCarAppResult(int, android.content.Intent?);
+ method public void startCarApp(android.content.Intent);
+ method @Deprecated public static void startCarApp(android.content.Intent, android.content.Intent);
+ field public static final String ACTION_NAVIGATE = "androidx.car.app.action.NAVIGATE";
+ field public static final String APP_SERVICE = "app";
+ field public static final String CAR_SERVICE = "car";
+ field @androidx.car.app.annotations.RequiresCarApi(2) public static final String CONSTRAINT_SERVICE = "constraints";
+ field public static final String EXTRA_START_CAR_APP_BINDER_KEY = "androidx.car.app.extra.START_CAR_APP_BINDER_KEY";
+ field @androidx.car.app.annotations.RequiresCarApi(3) public static final String HARDWARE_SERVICE = "hardware";
+ field public static final String NAVIGATION_SERVICE = "navigation";
+ field public static final String SCREEN_SERVICE = "screen";
+ }
+
+ public final class CarToast {
+ method public static androidx.car.app.CarToast makeText(androidx.car.app.CarContext, @StringRes int, int);
+ method public static androidx.car.app.CarToast makeText(androidx.car.app.CarContext, CharSequence, int);
+ method public void setDuration(int);
+ method public void setText(@StringRes int);
+ method public void setText(CharSequence);
+ method public void show();
+ field public static final int LENGTH_LONG = 1; // 0x1
+ field public static final int LENGTH_SHORT = 0; // 0x0
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class FailureResponse {
+ ctor public FailureResponse(Throwable);
+ method public int getErrorType();
+ method public String getStackTrace();
+ field public static final int BUNDLER_EXCEPTION = 1; // 0x1
+ field public static final int ILLEGAL_STATE_EXCEPTION = 2; // 0x2
+ field public static final int INVALID_PARAMETER_EXCEPTION = 3; // 0x3
+ field public static final int REMOTE_EXCEPTION = 6; // 0x6
+ field public static final int RUNTIME_EXCEPTION = 5; // 0x5
+ field public static final int SECURITY_EXCEPTION = 4; // 0x4
+ field public static final int UNKNOWN_ERROR = 0; // 0x0
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class HandshakeInfo {
+ ctor public HandshakeInfo(String, int);
+ method public int getHostCarAppApiLevel();
+ method public String getHostPackageName();
+ }
+
+ public final class HostException extends java.lang.RuntimeException {
+ ctor public HostException(String);
+ ctor public HostException(String, Throwable);
+ ctor public HostException(Throwable);
+ }
+
+ public final class HostInfo {
+ ctor public HostInfo(String, int);
+ method public String getPackageName();
+ method public int getUid();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface OnDoneCallback {
+ method public default void onFailure(androidx.car.app.serialization.Bundleable);
+ method public default void onSuccess(androidx.car.app.serialization.Bundleable?);
+ }
+
+ public interface OnRequestPermissionsListener {
+ method public void onRequestPermissionsResult(java.util.List<java.lang.String!>, java.util.List<java.lang.String!>);
+ }
+
+ public interface OnScreenResultListener {
+ method public void onScreenResult(Object?);
+ }
+
+ public abstract class Screen implements androidx.lifecycle.LifecycleOwner {
+ ctor protected Screen(androidx.car.app.CarContext);
+ method public final void finish();
+ method public final androidx.car.app.CarContext getCarContext();
+ method public final androidx.lifecycle.Lifecycle getLifecycle();
+ method public String? getMarker();
+ method public final androidx.car.app.ScreenManager getScreenManager();
+ method public final void invalidate();
+ method public abstract androidx.car.app.model.Template onGetTemplate();
+ method public void setMarker(String?);
+ method public void setResult(Object?);
+ }
+
+ @MainThread public class ScreenManager implements androidx.car.app.managers.Manager {
+ method public int getStackSize();
+ method public androidx.car.app.Screen getTop();
+ method public void pop();
+ method public void popTo(String);
+ method public void popToRoot();
+ method public void push(androidx.car.app.Screen);
+ method public void pushForResult(androidx.car.app.Screen, androidx.car.app.OnScreenResultListener);
+ method public void remove(androidx.car.app.Screen);
+ }
+
+ public abstract class Session implements androidx.lifecycle.LifecycleOwner {
+ ctor public Session();
+ method public final androidx.car.app.CarContext getCarContext();
+ method public androidx.lifecycle.Lifecycle getLifecycle();
+ method public void onCarConfigurationChanged(android.content.res.Configuration);
+ method public abstract androidx.car.app.Screen onCreateScreen(android.content.Intent);
+ method public void onNewIntent(android.content.Intent);
+ }
+
+ public interface SurfaceCallback {
+ method @androidx.car.app.annotations.RequiresCarApi(2) public default void onFling(float, float);
+ method @androidx.car.app.annotations.RequiresCarApi(2) public default void onScale(float, float, float);
+ method @androidx.car.app.annotations.RequiresCarApi(2) public default void onScroll(float, float);
+ method public default void onStableAreaChanged(android.graphics.Rect);
+ method public default void onSurfaceAvailable(androidx.car.app.SurfaceContainer);
+ method public default void onSurfaceDestroyed(androidx.car.app.SurfaceContainer);
+ method public default void onVisibleAreaChanged(android.graphics.Rect);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class SurfaceContainer {
+ ctor public SurfaceContainer(android.view.Surface?, int, int, int);
+ method public int getDpi();
+ method public int getHeight();
+ method public android.view.Surface? getSurface();
+ method public int getWidth();
+ }
+
+}
+
+package androidx.car.app.annotations {
+
+ @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) @java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE, java.lang.annotation.ElementType.PARAMETER}) public @interface CarProtocol {
+ }
+
+ @RequiresOptIn @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) @java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE, java.lang.annotation.ElementType.CONSTRUCTOR, java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.METHOD}) public @interface ExperimentalCarApi {
+ }
+
+ @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE, java.lang.annotation.ElementType.CONSTRUCTOR, java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.METHOD}) public @interface RequiresCarApi {
+ method public abstract int value();
+ }
+
+}
+
+package androidx.car.app.connection {
+
+ public final class CarConnection {
+ ctor public CarConnection(android.content.Context);
+ method public androidx.lifecycle.LiveData<java.lang.Integer!> getType();
+ field public static final String ACTION_CAR_CONNECTION_UPDATED = "androidx.car.app.connection.action.CAR_CONNECTION_UPDATED";
+ field public static final String CAR_CONNECTION_STATE = "CarConnectionState";
+ field public static final int CONNECTION_TYPE_NATIVE = 1; // 0x1
+ field public static final int CONNECTION_TYPE_NOT_CONNECTED = 0; // 0x0
+ field public static final int CONNECTION_TYPE_PROJECTION = 2; // 0x2
+ }
+
+}
+
+package androidx.car.app.constraints {
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public class ConstraintManager implements androidx.car.app.managers.Manager {
+ method public int getContentLimit(int);
+ field public static final int CONTENT_LIMIT_TYPE_GRID = 1; // 0x1
+ field public static final int CONTENT_LIMIT_TYPE_LIST = 0; // 0x0
+ field public static final int CONTENT_LIMIT_TYPE_PANE = 4; // 0x4
+ field public static final int CONTENT_LIMIT_TYPE_PLACE_LIST = 2; // 0x2
+ field public static final int CONTENT_LIMIT_TYPE_ROUTE_LIST = 3; // 0x3
+ }
+
+}
+
+package androidx.car.app.hardware {
+
+ @MainThread @androidx.car.app.annotations.RequiresCarApi(3) public interface CarHardwareManager extends androidx.car.app.managers.Manager {
+ method public default androidx.car.app.hardware.info.CarInfo getCarInfo();
+ method public default androidx.car.app.hardware.info.CarSensors getCarSensors();
+ }
+
+}
+
+package androidx.car.app.hardware.common {
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class CarUnit {
+ method public static String toString(int);
+ field @androidx.car.app.annotations.ExperimentalCarApi public static final int IMPERIAL_GALLON = 204; // 0xcc
+ field public static final int KILOMETER = 3; // 0x3
+ field public static final int KILOMETERS_PER_HOUR = 102; // 0x66
+ field @androidx.car.app.annotations.ExperimentalCarApi public static final int LITER = 202; // 0xca
+ field public static final int METER = 2; // 0x2
+ field public static final int METERS_PER_SEC = 101; // 0x65
+ field public static final int MILE = 4; // 0x4
+ field public static final int MILES_PER_HOUR = 103; // 0x67
+ field @androidx.car.app.annotations.ExperimentalCarApi public static final int MILLILITER = 201; // 0xc9
+ field public static final int MILLIMETER = 1; // 0x1
+ field @androidx.car.app.annotations.ExperimentalCarApi public static final int US_GALLON = 203; // 0xcb
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class CarValue<T> {
+ ctor public CarValue(T?, long, int);
+ method public int getStatus();
+ method public long getTimestampMillis();
+ method public T? getValue();
+ field public static final int STATUS_SUCCESS = 1; // 0x1
+ field public static final int STATUS_UNAVAILABLE = 3; // 0x3
+ field public static final int STATUS_UNIMPLEMENTED = 2; // 0x2
+ field public static final int STATUS_UNKNOWN = 0; // 0x0
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public interface OnCarDataAvailableListener<T> {
+ method public void onCarDataAvailable(T);
+ }
+
+}
+
+package androidx.car.app.hardware.info {
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class Accelerometer {
+ ctor public Accelerometer(androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Float!>!>);
+ method public androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Float!>!> getForces();
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class CarHardwareLocation {
+ ctor public CarHardwareLocation(androidx.car.app.hardware.common.CarValue<android.location.Location!>);
+ method public androidx.car.app.hardware.common.CarValue<android.location.Location!> getLocation();
+ }
+
+ @MainThread @androidx.car.app.annotations.RequiresCarApi(3) public interface CarInfo {
+ method public void addEnergyLevelListener(java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.EnergyLevel!>);
+ method public void addMileageListener(java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Mileage!>);
+ method public void addSpeedListener(java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Speed!>);
+ method public void addTollListener(java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.TollCard!>);
+ method public void fetchEnergyProfile(java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.EnergyProfile!>);
+ method public void fetchModel(java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Model!>);
+ method public void removeEnergyLevelListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.EnergyLevel!>);
+ method public void removeMileageListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Mileage!>);
+ method public void removeSpeedListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Speed!>);
+ method public void removeTollListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.TollCard!>);
+ }
+
+ @MainThread @androidx.car.app.annotations.RequiresCarApi(3) public interface CarSensors {
+ method public void addAccelerometerListener(int, java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Accelerometer!>);
+ method public void addCarHardwareLocationListener(int, java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.CarHardwareLocation!>);
+ method public void addCompassListener(int, java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Compass!>);
+ method public void addGyroscopeListener(int, java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Gyroscope!>);
+ method public void removeAccelerometerListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Accelerometer!>);
+ method public void removeCarHardwareLocationListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.CarHardwareLocation!>);
+ method public void removeCompassListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Compass!>);
+ method public void removeGyroscopeListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Gyroscope!>);
+ field public static final int UPDATE_RATE_FASTEST = 3; // 0x3
+ field public static final int UPDATE_RATE_NORMAL = 1; // 0x1
+ field public static final int UPDATE_RATE_UI = 2; // 0x2
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class Compass {
+ ctor public Compass(androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Float!>!>);
+ method public androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Float!>!> getOrientations();
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class EnergyLevel {
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Float!> getBatteryPercent();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Integer!> getDistanceDisplayUnit();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Boolean!> getEnergyIsLow();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Float!> getFuelPercent();
+ method @androidx.car.app.annotations.ExperimentalCarApi public androidx.car.app.hardware.common.CarValue<java.lang.Integer!> getFuelVolumeDisplayUnit();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Float!> getRangeRemainingMeters();
+ }
+
+ public static final class EnergyLevel.Builder {
+ ctor public EnergyLevel.Builder();
+ method public androidx.car.app.hardware.info.EnergyLevel build();
+ method public androidx.car.app.hardware.info.EnergyLevel.Builder setBatteryPercent(androidx.car.app.hardware.common.CarValue<java.lang.Float!>);
+ method public androidx.car.app.hardware.info.EnergyLevel.Builder setDistanceDisplayUnit(androidx.car.app.hardware.common.CarValue<java.lang.Integer!>);
+ method public androidx.car.app.hardware.info.EnergyLevel.Builder setEnergyIsLow(androidx.car.app.hardware.common.CarValue<java.lang.Boolean!>);
+ method public androidx.car.app.hardware.info.EnergyLevel.Builder setFuelPercent(androidx.car.app.hardware.common.CarValue<java.lang.Float!>);
+ method @androidx.car.app.annotations.ExperimentalCarApi public androidx.car.app.hardware.info.EnergyLevel.Builder setFuelVolumeDisplayUnit(androidx.car.app.hardware.common.CarValue<java.lang.Integer!>);
+ method public androidx.car.app.hardware.info.EnergyLevel.Builder setRangeRemainingMeters(androidx.car.app.hardware.common.CarValue<java.lang.Float!>);
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class EnergyProfile {
+ method public androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Integer!>!> getEvConnectorTypes();
+ method public androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Integer!>!> getFuelTypes();
+ field public static final int EVCONNECTOR_TYPE_CHADEMO = 3; // 0x3
+ field public static final int EVCONNECTOR_TYPE_COMBO_1 = 4; // 0x4
+ field public static final int EVCONNECTOR_TYPE_COMBO_2 = 5; // 0x5
+ field public static final int EVCONNECTOR_TYPE_GBT = 9; // 0x9
+ field public static final int EVCONNECTOR_TYPE_GBT_DC = 10; // 0xa
+ field public static final int EVCONNECTOR_TYPE_J1772 = 1; // 0x1
+ field public static final int EVCONNECTOR_TYPE_MENNEKES = 2; // 0x2
+ field public static final int EVCONNECTOR_TYPE_OTHER = 101; // 0x65
+ field public static final int EVCONNECTOR_TYPE_SCAME = 11; // 0xb
+ field public static final int EVCONNECTOR_TYPE_TESLA_HPWC = 7; // 0x7
+ field public static final int EVCONNECTOR_TYPE_TESLA_ROADSTER = 6; // 0x6
+ field public static final int EVCONNECTOR_TYPE_TESLA_SUPERCHARGER = 8; // 0x8
+ field public static final int EVCONNECTOR_TYPE_UNKNOWN = 0; // 0x0
+ field public static final int FUEL_TYPE_BIODIESEL = 5; // 0x5
+ field public static final int FUEL_TYPE_CNG = 8; // 0x8
+ field public static final int FUEL_TYPE_DIESEL_1 = 3; // 0x3
+ field public static final int FUEL_TYPE_DIESEL_2 = 4; // 0x4
+ field public static final int FUEL_TYPE_E85 = 6; // 0x6
+ field public static final int FUEL_TYPE_ELECTRIC = 10; // 0xa
+ field public static final int FUEL_TYPE_HYDROGEN = 11; // 0xb
+ field public static final int FUEL_TYPE_LEADED = 2; // 0x2
+ field public static final int FUEL_TYPE_LNG = 9; // 0x9
+ field public static final int FUEL_TYPE_LPG = 7; // 0x7
+ field public static final int FUEL_TYPE_OTHER = 12; // 0xc
+ field public static final int FUEL_TYPE_UNKNOWN = 0; // 0x0
+ field public static final int FUEL_TYPE_UNLEADED = 1; // 0x1
+ }
+
+ public static final class EnergyProfile.Builder {
+ ctor public EnergyProfile.Builder();
+ method public androidx.car.app.hardware.info.EnergyProfile build();
+ method public androidx.car.app.hardware.info.EnergyProfile.Builder setEvConnectorTypes(androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Integer!>!>);
+ method public androidx.car.app.hardware.info.EnergyProfile.Builder setFuelTypes(androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Integer!>!>);
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class Gyroscope {
+ ctor public Gyroscope(androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Float!>!>);
+ method public androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Float!>!> getRotations();
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class Mileage {
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Integer!> getDistanceDisplayUnit();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Float!> getOdometerMeters();
+ }
+
+ public static final class Mileage.Builder {
+ ctor public Mileage.Builder();
+ method public androidx.car.app.hardware.info.Mileage build();
+ method public androidx.car.app.hardware.info.Mileage.Builder setDistanceDisplayUnit(androidx.car.app.hardware.common.CarValue<java.lang.Integer!>);
+ method public androidx.car.app.hardware.info.Mileage.Builder setOdometerMeters(androidx.car.app.hardware.common.CarValue<java.lang.Float!>);
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class Model {
+ method public androidx.car.app.hardware.common.CarValue<java.lang.String!> getManufacturer();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.String!> getName();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Integer!> getYear();
+ }
+
+ public static final class Model.Builder {
+ ctor public Model.Builder();
+ method public androidx.car.app.hardware.info.Model build();
+ method public androidx.car.app.hardware.info.Model.Builder setManufacturer(androidx.car.app.hardware.common.CarValue<java.lang.String!>);
+ method public androidx.car.app.hardware.info.Model.Builder setName(androidx.car.app.hardware.common.CarValue<java.lang.String!>);
+ method public androidx.car.app.hardware.info.Model.Builder setYear(androidx.car.app.hardware.common.CarValue<java.lang.Integer!>);
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class Speed {
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Float!> getDisplaySpeedMetersPerSecond();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Float!> getRawSpeedMetersPerSecond();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Integer!> getSpeedDisplayUnit();
+ }
+
+ public static final class Speed.Builder {
+ ctor public Speed.Builder();
+ method public androidx.car.app.hardware.info.Speed build();
+ method public androidx.car.app.hardware.info.Speed.Builder setDisplaySpeedMetersPerSecond(androidx.car.app.hardware.common.CarValue<java.lang.Float!>);
+ method public androidx.car.app.hardware.info.Speed.Builder setRawSpeedMetersPerSecond(androidx.car.app.hardware.common.CarValue<java.lang.Float!>);
+ method public androidx.car.app.hardware.info.Speed.Builder setSpeedDisplayUnit(androidx.car.app.hardware.common.CarValue<java.lang.Integer!>);
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class TollCard {
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Integer!> getCardState();
+ field public static final int TOLLCARD_STATE_INVALID = 2; // 0x2
+ field public static final int TOLLCARD_STATE_NOT_INSERTED = 3; // 0x3
+ field public static final int TOLLCARD_STATE_UNKNOWN = 0; // 0x0
+ field public static final int TOLLCARD_STATE_VALID = 1; // 0x1
+ }
+
+ public static final class TollCard.Builder {
+ ctor public TollCard.Builder();
+ method public androidx.car.app.hardware.info.TollCard build();
+ method public androidx.car.app.hardware.info.TollCard.Builder setCardState(androidx.car.app.hardware.common.CarValue<java.lang.Integer!>);
+ }
+
+}
+
+package androidx.car.app.managers {
+
+ public interface Manager {
+ }
+
+}
+
+package androidx.car.app.model {
+
+ @androidx.car.app.annotations.CarProtocol public final class Action {
+ method public androidx.car.app.model.CarColor? getBackgroundColor();
+ method @androidx.car.app.annotations.RequiresCarApi(4) public int getFlags();
+ method public androidx.car.app.model.CarIcon? getIcon();
+ method public androidx.car.app.model.OnClickDelegate? getOnClickDelegate();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public int getType();
+ method public boolean isStandard();
+ method public static String typeToString(int);
+ field public static final androidx.car.app.model.Action APP_ICON;
+ field public static final androidx.car.app.model.Action BACK;
+ field @androidx.car.app.annotations.RequiresCarApi(4) public static final int FLAG_PRIMARY = 1; // 0x1
+ field public static final androidx.car.app.model.Action PAN;
+ field public static final int TYPE_APP_ICON = 65538; // 0x10002
+ field public static final int TYPE_BACK = 65539; // 0x10003
+ field public static final int TYPE_CUSTOM = 1; // 0x1
+ field public static final int TYPE_PAN = 65540; // 0x10004
+ }
+
+ public static final class Action.Builder {
+ ctor public Action.Builder();
+ ctor @androidx.car.app.annotations.RequiresCarApi(2) public Action.Builder(androidx.car.app.model.Action);
+ method public androidx.car.app.model.Action build();
+ method public androidx.car.app.model.Action.Builder setBackgroundColor(androidx.car.app.model.CarColor);
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.model.Action.Builder setFlags(int);
+ method public androidx.car.app.model.Action.Builder setIcon(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.model.Action.Builder setOnClickListener(androidx.car.app.model.OnClickListener);
+ method public androidx.car.app.model.Action.Builder setTitle(CharSequence);
+ method public androidx.car.app.model.Action.Builder setTitle(androidx.car.app.model.CarText);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class ActionStrip {
+ method public java.util.List<androidx.car.app.model.Action!> getActions();
+ method public androidx.car.app.model.Action? getFirstActionOfType(int);
+ }
+
+ public static final class ActionStrip.Builder {
+ ctor public ActionStrip.Builder();
+ method public androidx.car.app.model.ActionStrip.Builder addAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.ActionStrip build();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class CarColor {
+ method public static androidx.car.app.model.CarColor createCustom(@ColorInt int, @ColorInt int);
+ method @ColorInt public int getColor();
+ method @ColorInt public int getColorDark();
+ method public int getType();
+ field public static final androidx.car.app.model.CarColor BLUE;
+ field public static final androidx.car.app.model.CarColor DEFAULT;
+ field public static final androidx.car.app.model.CarColor GREEN;
+ field public static final androidx.car.app.model.CarColor PRIMARY;
+ field public static final androidx.car.app.model.CarColor RED;
+ field public static final androidx.car.app.model.CarColor SECONDARY;
+ field public static final int TYPE_BLUE = 6; // 0x6
+ field public static final int TYPE_CUSTOM = 0; // 0x0
+ field public static final int TYPE_DEFAULT = 1; // 0x1
+ field public static final int TYPE_GREEN = 5; // 0x5
+ field public static final int TYPE_PRIMARY = 2; // 0x2
+ field public static final int TYPE_RED = 4; // 0x4
+ field public static final int TYPE_SECONDARY = 3; // 0x3
+ field public static final int TYPE_YELLOW = 7; // 0x7
+ field public static final androidx.car.app.model.CarColor YELLOW;
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class CarIcon {
+ method public androidx.core.graphics.drawable.IconCompat? getIcon();
+ method public androidx.car.app.model.CarColor? getTint();
+ method public int getType();
+ field public static final androidx.car.app.model.CarIcon ALERT;
+ field public static final androidx.car.app.model.CarIcon APP_ICON;
+ field public static final androidx.car.app.model.CarIcon BACK;
+ field public static final androidx.car.app.model.CarIcon ERROR;
+ field @androidx.car.app.annotations.RequiresCarApi(2) public static final androidx.car.app.model.CarIcon PAN;
+ field public static final int TYPE_ALERT = 4; // 0x4
+ field public static final int TYPE_APP_ICON = 5; // 0x5
+ field public static final int TYPE_BACK = 3; // 0x3
+ field public static final int TYPE_CUSTOM = 1; // 0x1
+ field public static final int TYPE_ERROR = 6; // 0x6
+ field public static final int TYPE_PAN = 7; // 0x7
+ }
+
+ public static final class CarIcon.Builder {
+ ctor public CarIcon.Builder(androidx.core.graphics.drawable.IconCompat);
+ ctor public CarIcon.Builder(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.model.CarIcon build();
+ method public androidx.car.app.model.CarIcon.Builder setTint(androidx.car.app.model.CarColor);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class CarIconSpan extends androidx.car.app.model.CarSpan {
+ method public static androidx.car.app.model.CarIconSpan create(androidx.car.app.model.CarIcon);
+ method public static androidx.car.app.model.CarIconSpan create(androidx.car.app.model.CarIcon, int);
+ method public int getAlignment();
+ method public androidx.car.app.model.CarIcon getIcon();
+ field public static final int ALIGN_BASELINE = 1; // 0x1
+ field public static final int ALIGN_BOTTOM = 0; // 0x0
+ field public static final int ALIGN_CENTER = 2; // 0x2
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class CarLocation {
+ method public static androidx.car.app.model.CarLocation create(double, double);
+ method public static androidx.car.app.model.CarLocation create(android.location.Location);
+ method public double getLatitude();
+ method public double getLongitude();
+ }
+
+ @Keep @androidx.car.app.annotations.CarProtocol public class CarSpan extends android.text.style.CharacterStyle {
+ ctor public CarSpan();
+ method public void updateDrawState(android.text.TextPaint);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class CarText {
+ method public static androidx.car.app.model.CarText create(CharSequence);
+ method public java.util.List<java.lang.CharSequence!> getVariants();
+ method public boolean isEmpty();
+ method public static boolean isNullOrEmpty(androidx.car.app.model.CarText?);
+ method public CharSequence toCharSequence();
+ }
+
+ public static final class CarText.Builder {
+ ctor public CarText.Builder(CharSequence);
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.model.CarText.Builder addVariant(CharSequence);
+ method public androidx.car.app.model.CarText build();
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(2) public final class ClickableSpan extends androidx.car.app.model.CarSpan {
+ method public static androidx.car.app.model.ClickableSpan create(androidx.car.app.model.OnClickListener);
+ method public androidx.car.app.model.OnClickDelegate getOnClickDelegate();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class DateTimeWithZone {
+ method public static androidx.car.app.model.DateTimeWithZone create(long, @IntRange(from=0xffff02e0, to=64800) int, String);
+ method public static androidx.car.app.model.DateTimeWithZone create(long, java.util.TimeZone);
+ method @RequiresApi(26) public static androidx.car.app.model.DateTimeWithZone create(java.time.ZonedDateTime);
+ method public long getTimeSinceEpochMillis();
+ method public int getZoneOffsetSeconds();
+ method public String? getZoneShortName();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Distance {
+ method public static androidx.car.app.model.Distance create(double, int);
+ method public double getDisplayDistance();
+ method public int getDisplayUnit();
+ field public static final int UNIT_FEET = 6; // 0x6
+ field public static final int UNIT_KILOMETERS = 2; // 0x2
+ field public static final int UNIT_KILOMETERS_P1 = 3; // 0x3
+ field public static final int UNIT_METERS = 1; // 0x1
+ field public static final int UNIT_MILES = 4; // 0x4
+ field public static final int UNIT_MILES_P1 = 5; // 0x5
+ field public static final int UNIT_YARDS = 7; // 0x7
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class DistanceSpan extends androidx.car.app.model.CarSpan {
+ method public static androidx.car.app.model.DistanceSpan create(androidx.car.app.model.Distance);
+ method public androidx.car.app.model.Distance getDistance();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class DurationSpan extends androidx.car.app.model.CarSpan {
+ method public static androidx.car.app.model.DurationSpan create(long);
+ method @RequiresApi(26) public static androidx.car.app.model.DurationSpan create(java.time.Duration);
+ method public long getDurationSeconds();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class ForegroundCarColorSpan extends androidx.car.app.model.CarSpan {
+ method public static androidx.car.app.model.ForegroundCarColorSpan create(androidx.car.app.model.CarColor);
+ method public androidx.car.app.model.CarColor getColor();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class GridItem implements androidx.car.app.model.Item {
+ method public androidx.car.app.model.CarIcon? getImage();
+ method public int getImageType();
+ method public androidx.car.app.model.OnClickDelegate? getOnClickDelegate();
+ method public androidx.car.app.model.CarText? getText();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public boolean isLoading();
+ field public static final int IMAGE_TYPE_ICON = 1; // 0x1
+ field public static final int IMAGE_TYPE_LARGE = 2; // 0x2
+ }
+
+ public static final class GridItem.Builder {
+ ctor public GridItem.Builder();
+ method public androidx.car.app.model.GridItem build();
+ method public androidx.car.app.model.GridItem.Builder setImage(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.model.GridItem.Builder setImage(androidx.car.app.model.CarIcon, int);
+ method public androidx.car.app.model.GridItem.Builder setLoading(boolean);
+ method public androidx.car.app.model.GridItem.Builder setOnClickListener(androidx.car.app.model.OnClickListener);
+ method public androidx.car.app.model.GridItem.Builder setText(CharSequence);
+ method public androidx.car.app.model.GridItem.Builder setText(androidx.car.app.model.CarText);
+ method public androidx.car.app.model.GridItem.Builder setTitle(CharSequence);
+ method public androidx.car.app.model.GridItem.Builder setTitle(androidx.car.app.model.CarText);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class GridTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.ItemList? getSingleList();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public boolean isLoading();
+ }
+
+ public static final class GridTemplate.Builder {
+ ctor public GridTemplate.Builder();
+ method public androidx.car.app.model.GridTemplate build();
+ method public androidx.car.app.model.GridTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.GridTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.GridTemplate.Builder setLoading(boolean);
+ method public androidx.car.app.model.GridTemplate.Builder setSingleList(androidx.car.app.model.ItemList);
+ method public androidx.car.app.model.GridTemplate.Builder setTitle(CharSequence);
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public interface InputCallback {
+ method public default void onInputSubmitted(String);
+ method public default void onInputTextChanged(String);
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public interface InputCallbackDelegate {
+ method public void sendInputSubmitted(String, androidx.car.app.OnDoneCallback);
+ method public void sendInputTextChanged(String, androidx.car.app.OnDoneCallback);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface Item {
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class ItemList {
+ method public java.util.List<androidx.car.app.model.Item!> getItems();
+ method public androidx.car.app.model.CarText? getNoItemsMessage();
+ method public androidx.car.app.model.OnItemVisibilityChangedDelegate? getOnItemVisibilityChangedDelegate();
+ method public androidx.car.app.model.OnSelectedDelegate? getOnSelectedDelegate();
+ method public int getSelectedIndex();
+ }
+
+ public static final class ItemList.Builder {
+ ctor public ItemList.Builder();
+ method public androidx.car.app.model.ItemList.Builder addItem(androidx.car.app.model.Item);
+ method public androidx.car.app.model.ItemList build();
+ method public androidx.car.app.model.ItemList.Builder setNoItemsMessage(CharSequence);
+ method public androidx.car.app.model.ItemList.Builder setOnItemsVisibilityChangedListener(androidx.car.app.model.ItemList.OnItemVisibilityChangedListener);
+ method public androidx.car.app.model.ItemList.Builder setOnSelectedListener(androidx.car.app.model.ItemList.OnSelectedListener);
+ method public androidx.car.app.model.ItemList.Builder setSelectedIndex(@IntRange(from=0) int);
+ }
+
+ public static interface ItemList.OnItemVisibilityChangedListener {
+ method public void onItemVisibilityChanged(int, int);
+ }
+
+ public static interface ItemList.OnSelectedListener {
+ method public void onSelected(int);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class ListTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public java.util.List<androidx.car.app.model.SectionedItemList!> getSectionedLists();
+ method public androidx.car.app.model.ItemList? getSingleList();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public boolean isLoading();
+ }
+
+ public static final class ListTemplate.Builder {
+ ctor public ListTemplate.Builder();
+ method public androidx.car.app.model.ListTemplate.Builder addSectionedList(androidx.car.app.model.SectionedItemList);
+ method public androidx.car.app.model.ListTemplate build();
+ method public androidx.car.app.model.ListTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.ListTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.ListTemplate.Builder setLoading(boolean);
+ method public androidx.car.app.model.ListTemplate.Builder setSingleList(androidx.car.app.model.ItemList);
+ method public androidx.car.app.model.ListTemplate.Builder setTitle(CharSequence);
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public final class LongMessageTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public java.util.List<androidx.car.app.model.Action!> getActions();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.CarText getMessage();
+ method public androidx.car.app.model.CarText? getTitle();
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public static final class LongMessageTemplate.Builder {
+ ctor public LongMessageTemplate.Builder(CharSequence);
+ method public androidx.car.app.model.LongMessageTemplate.Builder addAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.LongMessageTemplate build();
+ method public androidx.car.app.model.LongMessageTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.LongMessageTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.LongMessageTemplate.Builder setTitle(CharSequence);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class MessageTemplate implements androidx.car.app.model.Template {
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public java.util.List<androidx.car.app.model.Action!> getActions();
+ method public androidx.car.app.model.CarText? getDebugMessage();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.CarIcon? getIcon();
+ method public androidx.car.app.model.CarText getMessage();
+ method public androidx.car.app.model.CarText? getTitle();
+ method @androidx.car.app.annotations.RequiresCarApi(2) public boolean isLoading();
+ }
+
+ public static final class MessageTemplate.Builder {
+ ctor public MessageTemplate.Builder(CharSequence);
+ ctor public MessageTemplate.Builder(androidx.car.app.model.CarText);
+ method public androidx.car.app.model.MessageTemplate.Builder addAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.MessageTemplate build();
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.model.MessageTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.MessageTemplate.Builder setDebugMessage(Throwable);
+ method public androidx.car.app.model.MessageTemplate.Builder setDebugMessage(String);
+ method public androidx.car.app.model.MessageTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.MessageTemplate.Builder setIcon(androidx.car.app.model.CarIcon);
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.model.MessageTemplate.Builder setLoading(boolean);
+ method public androidx.car.app.model.MessageTemplate.Builder setTitle(CharSequence);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Metadata {
+ method public androidx.car.app.model.Place? getPlace();
+ field public static final androidx.car.app.model.Metadata EMPTY_METADATA;
+ }
+
+ public static final class Metadata.Builder {
+ ctor public Metadata.Builder();
+ ctor public Metadata.Builder(androidx.car.app.model.Metadata);
+ method public androidx.car.app.model.Metadata build();
+ method public androidx.car.app.model.Metadata.Builder setPlace(androidx.car.app.model.Place);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface OnCheckedChangeDelegate {
+ method public void sendCheckedChange(boolean, androidx.car.app.OnDoneCallback);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface OnClickDelegate {
+ method public boolean isParkedOnly();
+ method public void sendClick(androidx.car.app.OnDoneCallback);
+ }
+
+ public interface OnClickListener {
+ method public void onClick();
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.ExperimentalCarApi public interface OnContentRefreshDelegate {
+ method public void sendContentRefreshRequested(androidx.car.app.OnDoneCallback);
+ }
+
+ @androidx.car.app.annotations.ExperimentalCarApi public interface OnContentRefreshListener {
+ method public void onContentRefreshRequested();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface OnItemVisibilityChangedDelegate {
+ method public void sendItemVisibilityChanged(int, int, androidx.car.app.OnDoneCallback);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface OnSelectedDelegate {
+ method public void sendSelected(int, androidx.car.app.OnDoneCallback);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Pane {
+ method public java.util.List<androidx.car.app.model.Action!> getActions();
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.model.CarIcon? getImage();
+ method public java.util.List<androidx.car.app.model.Row!> getRows();
+ method public boolean isLoading();
+ }
+
+ public static final class Pane.Builder {
+ ctor public Pane.Builder();
+ method public androidx.car.app.model.Pane.Builder addAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.Pane.Builder addRow(androidx.car.app.model.Row);
+ method public androidx.car.app.model.Pane build();
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.model.Pane.Builder setImage(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.model.Pane.Builder setLoading(boolean);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class PaneTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.Pane getPane();
+ method public androidx.car.app.model.CarText? getTitle();
+ }
+
+ public static final class PaneTemplate.Builder {
+ ctor public PaneTemplate.Builder(androidx.car.app.model.Pane);
+ method public androidx.car.app.model.PaneTemplate build();
+ method public androidx.car.app.model.PaneTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.PaneTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.PaneTemplate.Builder setTitle(CharSequence);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class ParkedOnlyOnClickListener implements androidx.car.app.model.OnClickListener {
+ method public static androidx.car.app.model.ParkedOnlyOnClickListener create(androidx.car.app.model.OnClickListener);
+ method public void onClick();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Place {
+ method public androidx.car.app.model.CarLocation getLocation();
+ method public androidx.car.app.model.PlaceMarker? getMarker();
+ }
+
+ public static final class Place.Builder {
+ ctor public Place.Builder(androidx.car.app.model.CarLocation);
+ ctor public Place.Builder(androidx.car.app.model.Place);
+ method public androidx.car.app.model.Place build();
+ method public androidx.car.app.model.Place.Builder setMarker(androidx.car.app.model.PlaceMarker);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class PlaceListMapTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.Place? getAnchor();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.ItemList? getItemList();
+ method @androidx.car.app.annotations.ExperimentalCarApi public androidx.car.app.model.OnContentRefreshDelegate? getOnContentRefreshDelegate();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public boolean isCurrentLocationEnabled();
+ method public boolean isLoading();
+ }
+
+ public static final class PlaceListMapTemplate.Builder {
+ ctor public PlaceListMapTemplate.Builder();
+ method public androidx.car.app.model.PlaceListMapTemplate build();
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setAnchor(androidx.car.app.model.Place);
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setCurrentLocationEnabled(boolean);
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setItemList(androidx.car.app.model.ItemList);
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setLoading(boolean);
+ method @androidx.car.app.annotations.ExperimentalCarApi public androidx.car.app.model.PlaceListMapTemplate.Builder setOnContentRefreshListener(androidx.car.app.model.OnContentRefreshListener);
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setTitle(CharSequence);
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setTitle(androidx.car.app.model.CarText);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class PlaceMarker {
+ method public androidx.car.app.model.CarColor? getColor();
+ method public androidx.car.app.model.CarIcon? getIcon();
+ method public int getIconType();
+ method public androidx.car.app.model.CarText? getLabel();
+ field public static final int TYPE_ICON = 0; // 0x0
+ field public static final int TYPE_IMAGE = 1; // 0x1
+ }
+
+ public static final class PlaceMarker.Builder {
+ ctor public PlaceMarker.Builder();
+ method public androidx.car.app.model.PlaceMarker build();
+ method public androidx.car.app.model.PlaceMarker.Builder setColor(androidx.car.app.model.CarColor);
+ method public androidx.car.app.model.PlaceMarker.Builder setIcon(androidx.car.app.model.CarIcon, int);
+ method public androidx.car.app.model.PlaceMarker.Builder setLabel(CharSequence);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Row implements androidx.car.app.model.Item {
+ method public androidx.car.app.model.CarIcon? getImage();
+ method public androidx.car.app.model.Metadata? getMetadata();
+ method public androidx.car.app.model.OnClickDelegate? getOnClickDelegate();
+ method public int getRowImageType();
+ method public java.util.List<androidx.car.app.model.CarText!> getTexts();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public androidx.car.app.model.Toggle? getToggle();
+ method public boolean isBrowsable();
+ method public androidx.car.app.model.Row row();
+ method public CharSequence yourBoat();
+ field public static final int IMAGE_TYPE_ICON = 4; // 0x4
+ field public static final int IMAGE_TYPE_LARGE = 2; // 0x2
+ field public static final int IMAGE_TYPE_SMALL = 1; // 0x1
+ }
+
+ public static final class Row.Builder {
+ ctor public Row.Builder();
+ method public androidx.car.app.model.Row.Builder addText(CharSequence);
+ method public androidx.car.app.model.Row.Builder addText(androidx.car.app.model.CarText);
+ method public androidx.car.app.model.Row build();
+ method public androidx.car.app.model.Row.Builder setBrowsable(boolean);
+ method public androidx.car.app.model.Row.Builder setImage(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.model.Row.Builder setImage(androidx.car.app.model.CarIcon, int);
+ method public androidx.car.app.model.Row.Builder setMetadata(androidx.car.app.model.Metadata);
+ method public androidx.car.app.model.Row.Builder setOnClickListener(androidx.car.app.model.OnClickListener);
+ method public androidx.car.app.model.Row.Builder setTitle(CharSequence);
+ method public androidx.car.app.model.Row.Builder setTitle(androidx.car.app.model.CarText);
+ method public androidx.car.app.model.Row.Builder setToggle(androidx.car.app.model.Toggle);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface SearchCallbackDelegate {
+ method public void sendSearchSubmitted(String, androidx.car.app.OnDoneCallback);
+ method public void sendSearchTextChanged(String, androidx.car.app.OnDoneCallback);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class SearchTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public String? getInitialSearchText();
+ method public androidx.car.app.model.ItemList? getItemList();
+ method public androidx.car.app.model.SearchCallbackDelegate getSearchCallbackDelegate();
+ method public String? getSearchHint();
+ method public boolean isLoading();
+ method public boolean isShowKeyboardByDefault();
+ }
+
+ public static final class SearchTemplate.Builder {
+ ctor public SearchTemplate.Builder(androidx.car.app.model.SearchTemplate.SearchCallback);
+ method public androidx.car.app.model.SearchTemplate build();
+ method public androidx.car.app.model.SearchTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.SearchTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.SearchTemplate.Builder setInitialSearchText(String);
+ method public androidx.car.app.model.SearchTemplate.Builder setItemList(androidx.car.app.model.ItemList);
+ method public androidx.car.app.model.SearchTemplate.Builder setLoading(boolean);
+ method public androidx.car.app.model.SearchTemplate.Builder setSearchHint(String);
+ method public androidx.car.app.model.SearchTemplate.Builder setShowKeyboardByDefault(boolean);
+ }
+
+ public static interface SearchTemplate.SearchCallback {
+ method public default void onSearchSubmitted(String);
+ method public default void onSearchTextChanged(String);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class SectionedItemList {
+ method public static androidx.car.app.model.SectionedItemList create(androidx.car.app.model.ItemList, CharSequence);
+ method public androidx.car.app.model.CarText getHeader();
+ method public androidx.car.app.model.ItemList getItemList();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface Template {
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class TemplateInfo {
+ ctor public TemplateInfo(Class<? extends androidx.car.app.model.Template>, String);
+ method public Class<? extends androidx.car.app.model.Template> getTemplateClass();
+ method public String getTemplateId();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class TemplateWrapper {
+ method public static androidx.car.app.model.TemplateWrapper copyOf(androidx.car.app.model.TemplateWrapper);
+ method public int getCurrentTaskStep();
+ method public String getId();
+ method public androidx.car.app.model.Template getTemplate();
+ method public java.util.List<androidx.car.app.model.TemplateInfo!> getTemplateInfosForScreenStack();
+ method public boolean isRefresh();
+ method public void setCurrentTaskStep(int);
+ method public void setId(String);
+ method public void setRefresh(boolean);
+ method public void setTemplate(androidx.car.app.model.Template);
+ method public static androidx.car.app.model.TemplateWrapper wrap(androidx.car.app.model.Template);
+ method public static androidx.car.app.model.TemplateWrapper wrap(androidx.car.app.model.Template, String);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Toggle {
+ method public androidx.car.app.model.OnCheckedChangeDelegate getOnCheckedChangeDelegate();
+ method public boolean isChecked();
+ }
+
+ public static final class Toggle.Builder {
+ ctor public Toggle.Builder(androidx.car.app.model.Toggle.OnCheckedChangeListener);
+ method public androidx.car.app.model.Toggle build();
+ method public androidx.car.app.model.Toggle.Builder setChecked(boolean);
+ }
+
+ public static interface Toggle.OnCheckedChangeListener {
+ method public void onCheckedChange(boolean);
+ }
+
+}
+
+package androidx.car.app.model.signin {
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public final class InputSignInMethod implements androidx.car.app.model.signin.SignInTemplate.SignInMethod {
+ method public androidx.car.app.model.CarText? getDefaultValue();
+ method public androidx.car.app.model.CarText? getErrorMessage();
+ method public androidx.car.app.model.CarText? getHint();
+ method public androidx.car.app.model.InputCallbackDelegate getInputCallbackDelegate();
+ method public int getInputType();
+ method public int getKeyboardType();
+ method public boolean isShowKeyboardByDefault();
+ field public static final int INPUT_TYPE_DEFAULT = 1; // 0x1
+ field public static final int INPUT_TYPE_PASSWORD = 2; // 0x2
+ field public static final int KEYBOARD_DEFAULT = 1; // 0x1
+ field public static final int KEYBOARD_EMAIL = 2; // 0x2
+ field public static final int KEYBOARD_NUMBER = 4; // 0x4
+ field public static final int KEYBOARD_PHONE = 3; // 0x3
+ }
+
+ public static final class InputSignInMethod.Builder {
+ ctor public InputSignInMethod.Builder(androidx.car.app.model.InputCallback);
+ method public androidx.car.app.model.signin.InputSignInMethod build();
+ method public androidx.car.app.model.signin.InputSignInMethod.Builder setDefaultValue(String);
+ method public androidx.car.app.model.signin.InputSignInMethod.Builder setErrorMessage(CharSequence);
+ method public androidx.car.app.model.signin.InputSignInMethod.Builder setHint(CharSequence);
+ method public androidx.car.app.model.signin.InputSignInMethod.Builder setInputType(int);
+ method public androidx.car.app.model.signin.InputSignInMethod.Builder setKeyboardType(int);
+ method public androidx.car.app.model.signin.InputSignInMethod.Builder setShowKeyboardByDefault(boolean);
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public final class PinSignInMethod implements androidx.car.app.model.signin.SignInTemplate.SignInMethod {
+ ctor public PinSignInMethod(CharSequence);
+ method public androidx.car.app.model.CarText getPinCode();
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public final class ProviderSignInMethod implements androidx.car.app.model.signin.SignInTemplate.SignInMethod {
+ ctor public ProviderSignInMethod(androidx.car.app.model.Action);
+ method public androidx.car.app.model.Action getAction();
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(4) public final class QRCodeSignInMethod implements androidx.car.app.model.signin.SignInTemplate.SignInMethod {
+ ctor public QRCodeSignInMethod(android.net.Uri);
+ method public android.net.Uri getUri();
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public final class SignInTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public java.util.List<androidx.car.app.model.Action!> getActions();
+ method public androidx.car.app.model.CarText? getAdditionalText();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.CarText? getInstructions();
+ method public androidx.car.app.model.signin.SignInTemplate.SignInMethod getSignInMethod();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public boolean isLoading();
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public static final class SignInTemplate.Builder {
+ ctor public SignInTemplate.Builder(androidx.car.app.model.signin.SignInTemplate.SignInMethod);
+ method public androidx.car.app.model.signin.SignInTemplate.Builder addAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.signin.SignInTemplate build();
+ method public androidx.car.app.model.signin.SignInTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.signin.SignInTemplate.Builder setAdditionalText(CharSequence);
+ method public androidx.car.app.model.signin.SignInTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.signin.SignInTemplate.Builder setInstructions(CharSequence);
+ method public androidx.car.app.model.signin.SignInTemplate.Builder setLoading(boolean);
+ method public androidx.car.app.model.signin.SignInTemplate.Builder setTitle(CharSequence);
+ }
+
+ public static interface SignInTemplate.SignInMethod {
+ }
+
+}
+
+package androidx.car.app.navigation {
+
+ public class NavigationManager implements androidx.car.app.managers.Manager {
+ method @MainThread public void clearNavigationManagerCallback();
+ method @MainThread public void navigationEnded();
+ method @MainThread public void navigationStarted();
+ method @MainThread public void setNavigationManagerCallback(androidx.car.app.navigation.NavigationManagerCallback);
+ method @MainThread public void setNavigationManagerCallback(java.util.concurrent.Executor, androidx.car.app.navigation.NavigationManagerCallback);
+ method @MainThread public void updateTrip(androidx.car.app.navigation.model.Trip);
+ }
+
+ public interface NavigationManagerCallback {
+ method public default void onAutoDriveEnabled();
+ method public default void onStopNavigation();
+ }
+
+}
+
+package androidx.car.app.navigation.model {
+
+ @androidx.car.app.annotations.CarProtocol public final class Destination {
+ method public androidx.car.app.model.CarText? getAddress();
+ method public androidx.car.app.model.CarIcon? getImage();
+ method public androidx.car.app.model.CarText? getName();
+ }
+
+ public static final class Destination.Builder {
+ ctor public Destination.Builder();
+ method public androidx.car.app.navigation.model.Destination build();
+ method public androidx.car.app.navigation.model.Destination.Builder setAddress(CharSequence);
+ method public androidx.car.app.navigation.model.Destination.Builder setImage(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.navigation.model.Destination.Builder setName(CharSequence);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Lane {
+ method public java.util.List<androidx.car.app.navigation.model.LaneDirection!> getDirections();
+ }
+
+ public static final class Lane.Builder {
+ ctor public Lane.Builder();
+ method public androidx.car.app.navigation.model.Lane.Builder addDirection(androidx.car.app.navigation.model.LaneDirection);
+ method public androidx.car.app.navigation.model.Lane build();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class LaneDirection {
+ method public static androidx.car.app.navigation.model.LaneDirection create(int, boolean);
+ method public int getShape();
+ method public boolean isRecommended();
+ field public static final int SHAPE_NORMAL_LEFT = 5; // 0x5
+ field public static final int SHAPE_NORMAL_RIGHT = 6; // 0x6
+ field public static final int SHAPE_SHARP_LEFT = 7; // 0x7
+ field public static final int SHAPE_SHARP_RIGHT = 8; // 0x8
+ field public static final int SHAPE_SLIGHT_LEFT = 3; // 0x3
+ field public static final int SHAPE_SLIGHT_RIGHT = 4; // 0x4
+ field public static final int SHAPE_STRAIGHT = 2; // 0x2
+ field public static final int SHAPE_UNKNOWN = 1; // 0x1
+ field public static final int SHAPE_U_TURN_LEFT = 9; // 0x9
+ field public static final int SHAPE_U_TURN_RIGHT = 10; // 0xa
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Maneuver {
+ method public androidx.car.app.model.CarIcon? getIcon();
+ method public int getRoundaboutExitAngle();
+ method public int getRoundaboutExitNumber();
+ method public int getType();
+ field public static final int TYPE_DEPART = 1; // 0x1
+ field public static final int TYPE_DESTINATION = 39; // 0x27
+ field public static final int TYPE_DESTINATION_LEFT = 41; // 0x29
+ field public static final int TYPE_DESTINATION_RIGHT = 42; // 0x2a
+ field public static final int TYPE_DESTINATION_STRAIGHT = 40; // 0x28
+ field public static final int TYPE_FERRY_BOAT = 37; // 0x25
+ field public static final int TYPE_FERRY_BOAT_LEFT = 47; // 0x2f
+ field public static final int TYPE_FERRY_BOAT_RIGHT = 48; // 0x30
+ field public static final int TYPE_FERRY_TRAIN = 38; // 0x26
+ field public static final int TYPE_FERRY_TRAIN_LEFT = 49; // 0x31
+ field public static final int TYPE_FERRY_TRAIN_RIGHT = 50; // 0x32
+ field public static final int TYPE_FORK_LEFT = 25; // 0x19
+ field public static final int TYPE_FORK_RIGHT = 26; // 0x1a
+ field public static final int TYPE_KEEP_LEFT = 3; // 0x3
+ field public static final int TYPE_KEEP_RIGHT = 4; // 0x4
+ field public static final int TYPE_MERGE_LEFT = 27; // 0x1b
+ field public static final int TYPE_MERGE_RIGHT = 28; // 0x1c
+ field public static final int TYPE_MERGE_SIDE_UNSPECIFIED = 29; // 0x1d
+ field public static final int TYPE_NAME_CHANGE = 2; // 0x2
+ field public static final int TYPE_OFF_RAMP_NORMAL_LEFT = 23; // 0x17
+ field public static final int TYPE_OFF_RAMP_NORMAL_RIGHT = 24; // 0x18
+ field public static final int TYPE_OFF_RAMP_SLIGHT_LEFT = 21; // 0x15
+ field public static final int TYPE_OFF_RAMP_SLIGHT_RIGHT = 22; // 0x16
+ field public static final int TYPE_ON_RAMP_NORMAL_LEFT = 15; // 0xf
+ field public static final int TYPE_ON_RAMP_NORMAL_RIGHT = 16; // 0x10
+ field public static final int TYPE_ON_RAMP_SHARP_LEFT = 17; // 0x11
+ field public static final int TYPE_ON_RAMP_SHARP_RIGHT = 18; // 0x12
+ field public static final int TYPE_ON_RAMP_SLIGHT_LEFT = 13; // 0xd
+ field public static final int TYPE_ON_RAMP_SLIGHT_RIGHT = 14; // 0xe
+ field public static final int TYPE_ON_RAMP_U_TURN_LEFT = 19; // 0x13
+ field public static final int TYPE_ON_RAMP_U_TURN_RIGHT = 20; // 0x14
+ field public static final int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CCW = 34; // 0x22
+ field public static final int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CCW_WITH_ANGLE = 35; // 0x23
+ field public static final int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CW = 32; // 0x20
+ field public static final int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CW_WITH_ANGLE = 33; // 0x21
+ field public static final int TYPE_ROUNDABOUT_ENTER_CCW = 45; // 0x2d
+ field public static final int TYPE_ROUNDABOUT_ENTER_CW = 43; // 0x2b
+ field public static final int TYPE_ROUNDABOUT_EXIT_CCW = 46; // 0x2e
+ field public static final int TYPE_ROUNDABOUT_EXIT_CW = 44; // 0x2c
+ field public static final int TYPE_STRAIGHT = 36; // 0x24
+ field public static final int TYPE_TURN_NORMAL_LEFT = 7; // 0x7
+ field public static final int TYPE_TURN_NORMAL_RIGHT = 8; // 0x8
+ field public static final int TYPE_TURN_SHARP_LEFT = 9; // 0x9
+ field public static final int TYPE_TURN_SHARP_RIGHT = 10; // 0xa
+ field public static final int TYPE_TURN_SLIGHT_LEFT = 5; // 0x5
+ field public static final int TYPE_TURN_SLIGHT_RIGHT = 6; // 0x6
+ field public static final int TYPE_UNKNOWN = 0; // 0x0
+ field public static final int TYPE_U_TURN_LEFT = 11; // 0xb
+ field public static final int TYPE_U_TURN_RIGHT = 12; // 0xc
+ }
+
+ public static final class Maneuver.Builder {
+ ctor public Maneuver.Builder(int);
+ method public androidx.car.app.navigation.model.Maneuver build();
+ method public androidx.car.app.navigation.model.Maneuver.Builder setIcon(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.navigation.model.Maneuver.Builder setRoundaboutExitAngle(@IntRange(from=1, to=360) int);
+ method public androidx.car.app.navigation.model.Maneuver.Builder setRoundaboutExitNumber(@IntRange(from=1) int);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class MessageInfo implements androidx.car.app.navigation.model.NavigationTemplate.NavigationInfo {
+ method public androidx.car.app.model.CarIcon? getImage();
+ method public androidx.car.app.model.CarText? getText();
+ method public androidx.car.app.model.CarText? getTitle();
+ }
+
+ public static final class MessageInfo.Builder {
+ ctor public MessageInfo.Builder(CharSequence);
+ ctor public MessageInfo.Builder(androidx.car.app.model.CarText);
+ method public androidx.car.app.navigation.model.MessageInfo build();
+ method public androidx.car.app.navigation.model.MessageInfo.Builder setImage(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.navigation.model.MessageInfo.Builder setText(CharSequence);
+ method public androidx.car.app.navigation.model.MessageInfo.Builder setText(androidx.car.app.model.CarText);
+ method public androidx.car.app.navigation.model.MessageInfo.Builder setTitle(CharSequence);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class NavigationTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.CarColor? getBackgroundColor();
+ method public androidx.car.app.navigation.model.TravelEstimate? getDestinationTravelEstimate();
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.model.ActionStrip? getMapActionStrip();
+ method public androidx.car.app.navigation.model.NavigationTemplate.NavigationInfo? getNavigationInfo();
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.navigation.model.PanModeDelegate? getPanModeDelegate();
+ method @Deprecated @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.model.Toggle? getPanModeToggle();
+ }
+
+ public static final class NavigationTemplate.Builder {
+ ctor public NavigationTemplate.Builder();
+ method public androidx.car.app.navigation.model.NavigationTemplate build();
+ method public androidx.car.app.navigation.model.NavigationTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.navigation.model.NavigationTemplate.Builder setBackgroundColor(androidx.car.app.model.CarColor);
+ method public androidx.car.app.navigation.model.NavigationTemplate.Builder setDestinationTravelEstimate(androidx.car.app.navigation.model.TravelEstimate);
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.navigation.model.NavigationTemplate.Builder setMapActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.navigation.model.NavigationTemplate.Builder setNavigationInfo(androidx.car.app.navigation.model.NavigationTemplate.NavigationInfo);
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.navigation.model.NavigationTemplate.Builder setPanModeListener(androidx.car.app.navigation.model.PanModeListener);
+ }
+
+ public static interface NavigationTemplate.NavigationInfo {
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(2) public interface PanModeDelegate {
+ method public void sendPanModeChanged(boolean, androidx.car.app.OnDoneCallback);
+ }
+
+ public interface PanModeListener {
+ method public void onPanModeChanged(boolean);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class PlaceListNavigationTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.ItemList? getItemList();
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.model.ActionStrip? getMapActionStrip();
+ method @androidx.car.app.annotations.ExperimentalCarApi public androidx.car.app.model.OnContentRefreshDelegate? getOnContentRefreshDelegate();
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.navigation.model.PanModeDelegate? getPanModeDelegate();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public boolean isLoading();
+ }
+
+ public static final class PlaceListNavigationTemplate.Builder {
+ ctor public PlaceListNavigationTemplate.Builder();
+ method public androidx.car.app.navigation.model.PlaceListNavigationTemplate build();
+ method public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setItemList(androidx.car.app.model.ItemList);
+ method public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setLoading(boolean);
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setMapActionStrip(androidx.car.app.model.ActionStrip);
+ method @androidx.car.app.annotations.ExperimentalCarApi public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setOnContentRefreshListener(androidx.car.app.model.OnContentRefreshListener);
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setPanModeListener(androidx.car.app.navigation.model.PanModeListener);
+ method public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setTitle(CharSequence);
+ method public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setTitle(androidx.car.app.model.CarText);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class RoutePreviewNavigationTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.ItemList? getItemList();
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.model.ActionStrip? getMapActionStrip();
+ method public androidx.car.app.model.Action? getNavigateAction();
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.navigation.model.PanModeDelegate? getPanModeDelegate();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public boolean isLoading();
+ }
+
+ public static final class RoutePreviewNavigationTemplate.Builder {
+ ctor public RoutePreviewNavigationTemplate.Builder();
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate build();
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setItemList(androidx.car.app.model.ItemList);
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setLoading(boolean);
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setMapActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setNavigateAction(androidx.car.app.model.Action);
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setPanModeListener(androidx.car.app.navigation.model.PanModeListener);
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setTitle(CharSequence);
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setTitle(androidx.car.app.model.CarText);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class RoutingInfo implements androidx.car.app.navigation.model.NavigationTemplate.NavigationInfo {
+ method public androidx.car.app.model.Distance? getCurrentDistance();
+ method public androidx.car.app.navigation.model.Step? getCurrentStep();
+ method public androidx.car.app.model.CarIcon? getJunctionImage();
+ method public androidx.car.app.navigation.model.Step? getNextStep();
+ method public boolean isLoading();
+ }
+
+ public static final class RoutingInfo.Builder {
+ ctor public RoutingInfo.Builder();
+ method public androidx.car.app.navigation.model.RoutingInfo build();
+ method public androidx.car.app.navigation.model.RoutingInfo.Builder setCurrentStep(androidx.car.app.navigation.model.Step, androidx.car.app.model.Distance);
+ method public androidx.car.app.navigation.model.RoutingInfo.Builder setJunctionImage(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.navigation.model.RoutingInfo.Builder setLoading(boolean);
+ method public androidx.car.app.navigation.model.RoutingInfo.Builder setNextStep(androidx.car.app.navigation.model.Step);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Step {
+ method public androidx.car.app.model.CarText? getCue();
+ method public java.util.List<androidx.car.app.navigation.model.Lane!> getLanes();
+ method public androidx.car.app.model.CarIcon? getLanesImage();
+ method public androidx.car.app.navigation.model.Maneuver? getManeuver();
+ method public androidx.car.app.model.CarText? getRoad();
+ }
+
+ public static final class Step.Builder {
+ ctor public Step.Builder();
+ ctor public Step.Builder(CharSequence);
+ ctor public Step.Builder(androidx.car.app.model.CarText);
+ method public androidx.car.app.navigation.model.Step.Builder addLane(androidx.car.app.navigation.model.Lane);
+ method public androidx.car.app.navigation.model.Step build();
+ method public androidx.car.app.navigation.model.Step.Builder setCue(CharSequence);
+ method public androidx.car.app.navigation.model.Step.Builder setLanesImage(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.navigation.model.Step.Builder setManeuver(androidx.car.app.navigation.model.Maneuver);
+ method public androidx.car.app.navigation.model.Step.Builder setRoad(CharSequence);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class TravelEstimate {
+ method public androidx.car.app.model.DateTimeWithZone? getArrivalTimeAtDestination();
+ method public androidx.car.app.model.Distance? getRemainingDistance();
+ method public androidx.car.app.model.CarColor? getRemainingDistanceColor();
+ method public androidx.car.app.model.CarColor? getRemainingTimeColor();
+ method public long getRemainingTimeSeconds();
+ field public static final long REMAINING_TIME_UNKNOWN = -1L; // 0xffffffffffffffffL
+ }
+
+ public static final class TravelEstimate.Builder {
+ ctor public TravelEstimate.Builder(androidx.car.app.model.Distance, androidx.car.app.model.DateTimeWithZone);
+ ctor @RequiresApi(26) public TravelEstimate.Builder(androidx.car.app.model.Distance, java.time.ZonedDateTime);
+ method public androidx.car.app.navigation.model.TravelEstimate build();
+ method public androidx.car.app.navigation.model.TravelEstimate.Builder setRemainingDistanceColor(androidx.car.app.model.CarColor);
+ method @RequiresApi(26) public androidx.car.app.navigation.model.TravelEstimate.Builder setRemainingTime(java.time.Duration);
+ method public androidx.car.app.navigation.model.TravelEstimate.Builder setRemainingTimeColor(androidx.car.app.model.CarColor);
+ method public androidx.car.app.navigation.model.TravelEstimate.Builder setRemainingTimeSeconds(@IntRange(from=0xffffffff) long);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Trip {
+ method public androidx.car.app.model.CarText? getCurrentRoad();
+ method public java.util.List<androidx.car.app.navigation.model.TravelEstimate!> getDestinationTravelEstimates();
+ method public java.util.List<androidx.car.app.navigation.model.Destination!> getDestinations();
+ method public java.util.List<androidx.car.app.navigation.model.TravelEstimate!> getStepTravelEstimates();
+ method public java.util.List<androidx.car.app.navigation.model.Step!> getSteps();
+ method public boolean isLoading();
+ }
+
+ public static final class Trip.Builder {
+ ctor public Trip.Builder();
+ method public androidx.car.app.navigation.model.Trip.Builder addDestination(androidx.car.app.navigation.model.Destination, androidx.car.app.navigation.model.TravelEstimate);
+ method public androidx.car.app.navigation.model.Trip.Builder addStep(androidx.car.app.navigation.model.Step, androidx.car.app.navigation.model.TravelEstimate);
+ method public androidx.car.app.navigation.model.Trip build();
+ method public androidx.car.app.navigation.model.Trip.Builder setCurrentRoad(CharSequence);
+ method public androidx.car.app.navigation.model.Trip.Builder setLoading(boolean);
+ }
+
+}
+
+package androidx.car.app.notification {
+
+ public final class CarAppExtender implements androidx.core.app.NotificationCompat.Extender {
+ ctor public CarAppExtender(android.app.Notification);
+ method public androidx.core.app.NotificationCompat.Builder extend(androidx.core.app.NotificationCompat.Builder);
+ method public java.util.List<android.app.Notification.Action!> getActions();
+ method public String? getChannelId();
+ method public androidx.car.app.model.CarColor? getColor();
+ method public android.app.PendingIntent? getContentIntent();
+ method public CharSequence? getContentText();
+ method public CharSequence? getContentTitle();
+ method public android.app.PendingIntent? getDeleteIntent();
+ method public int getImportance();
+ method public android.graphics.Bitmap? getLargeIcon();
+ method @DrawableRes public int getSmallIcon();
+ method public static boolean isExtended(android.app.Notification);
+ }
+
+ public static final class CarAppExtender.Builder {
+ ctor public CarAppExtender.Builder();
+ method public androidx.car.app.notification.CarAppExtender.Builder addAction(@DrawableRes int, CharSequence, android.app.PendingIntent);
+ method public androidx.car.app.notification.CarAppExtender build();
+ method public androidx.car.app.notification.CarAppExtender.Builder setChannelId(String);
+ method public androidx.car.app.notification.CarAppExtender.Builder setColor(androidx.car.app.model.CarColor);
+ method public androidx.car.app.notification.CarAppExtender.Builder setContentIntent(android.app.PendingIntent);
+ method public androidx.car.app.notification.CarAppExtender.Builder setContentText(CharSequence);
+ method public androidx.car.app.notification.CarAppExtender.Builder setContentTitle(CharSequence);
+ method public androidx.car.app.notification.CarAppExtender.Builder setDeleteIntent(android.app.PendingIntent);
+ method public androidx.car.app.notification.CarAppExtender.Builder setImportance(int);
+ method public androidx.car.app.notification.CarAppExtender.Builder setLargeIcon(android.graphics.Bitmap);
+ method public androidx.car.app.notification.CarAppExtender.Builder setSmallIcon(int);
+ }
+
+ public final class CarNotificationManager {
+ method public boolean areNotificationsEnabled();
+ method public void cancel(int);
+ method public void cancel(String?, int);
+ method public void cancelAll();
+ method public void createNotificationChannel(androidx.core.app.NotificationChannelCompat);
+ method public void createNotificationChannelGroup(androidx.core.app.NotificationChannelGroupCompat);
+ method public void createNotificationChannelGroups(java.util.List<androidx.core.app.NotificationChannelGroupCompat!>);
+ method public void createNotificationChannels(java.util.List<androidx.core.app.NotificationChannelCompat!>);
+ method public void deleteNotificationChannel(String);
+ method public void deleteNotificationChannelGroup(String);
+ method public void deleteUnlistedNotificationChannels(java.util.Collection<java.lang.String!>);
+ method public static androidx.car.app.notification.CarNotificationManager from(android.content.Context);
+ method public static java.util.Set<java.lang.String!> getEnabledListenerPackages(android.content.Context);
+ method public int getImportance();
+ method public androidx.core.app.NotificationChannelCompat? getNotificationChannel(String);
+ method public androidx.core.app.NotificationChannelCompat? getNotificationChannel(String, String);
+ method public androidx.core.app.NotificationChannelGroupCompat? getNotificationChannelGroup(String);
+ method public java.util.List<androidx.core.app.NotificationChannelGroupCompat!> getNotificationChannelGroups();
+ method public java.util.List<androidx.core.app.NotificationChannelCompat!> getNotificationChannels();
+ method public void notify(int, androidx.core.app.NotificationCompat.Builder);
+ method public void notify(String?, int, androidx.core.app.NotificationCompat.Builder);
+ }
+
+ public final class CarPendingIntent {
+ method public static android.app.PendingIntent getCarApp(android.content.Context, int, android.content.Intent, int);
+ }
+
+}
+
+package androidx.car.app.serialization {
+
+ public final class Bundleable implements android.os.Parcelable {
+ method public static androidx.car.app.serialization.Bundleable create(Object) throws androidx.car.app.serialization.BundlerException;
+ method public int describeContents();
+ method public Object get() throws androidx.car.app.serialization.BundlerException;
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<androidx.car.app.serialization.Bundleable!> CREATOR;
+ }
+
+ public class BundlerException extends java.lang.Exception {
+ ctor public BundlerException(String?, Throwable);
+ ctor public BundlerException(String?);
+ }
+
+}
+
+package androidx.car.app.validation {
+
+ public final class HostValidator {
+ method public java.util.Map<java.lang.String!,java.util.List<java.lang.String!>!> getAllowedHosts();
+ method public boolean isValidHost(androidx.car.app.HostInfo);
+ field public static final androidx.car.app.validation.HostValidator ALLOW_ALL_HOSTS_VALIDATOR;
+ field public static final String TEMPLATE_RENDERER_PERMISSION = "android.car.permission.TEMPLATE_RENDERER";
+ }
+
+ public static final class HostValidator.Builder {
+ ctor public HostValidator.Builder(android.content.Context);
+ method public androidx.car.app.validation.HostValidator.Builder addAllowedHost(String, String);
+ method public androidx.car.app.validation.HostValidator.Builder addAllowedHosts(@ArrayRes int);
+ method public androidx.car.app.validation.HostValidator build();
+ }
+
+}
+
+package androidx.car.app.versioning {
+
+ public final class CarAppApiLevels {
+ method public static int getLatest();
+ method public static int getOldest();
+ field public static final int LEVEL_1 = 1; // 0x1
+ field public static final int LEVEL_2 = 2; // 0x2
+ field public static final int LEVEL_3 = 3; // 0x3
+ field public static final int LEVEL_4 = 4; // 0x4
+ }
+
+}
+
diff --git a/car/app/app/api/public_plus_experimental_1.2.0-beta02.txt b/car/app/app/api/public_plus_experimental_1.2.0-beta02.txt
new file mode 100644
index 0000000..f0bcdbc
--- /dev/null
+++ b/car/app/app/api/public_plus_experimental_1.2.0-beta02.txt
@@ -0,0 +1,1462 @@
+// Signature format: 4.0
+package androidx.car.app {
+
+ @androidx.car.app.annotations.CarProtocol public final class AppInfo {
+ ctor @VisibleForTesting public AppInfo(int, int, String);
+ method public int getLatestCarAppApiLevel();
+ method public String getLibraryDisplayVersion();
+ method public int getMinCarAppApiLevel();
+ field public static final String MIN_API_LEVEL_METADATA_KEY = "androidx.car.app.minCarApiLevel";
+ }
+
+ public class AppManager implements androidx.car.app.managers.Manager {
+ method public void invalidate();
+ method public void setSurfaceCallback(androidx.car.app.SurfaceCallback?);
+ method public void showToast(CharSequence, int);
+ }
+
+ public final class CarAppPermission {
+ method public static void checkHasLibraryPermission(android.content.Context, String);
+ method public static void checkHasPermission(android.content.Context, String);
+ field public static final String ACCESS_SURFACE = "androidx.car.app.ACCESS_SURFACE";
+ field public static final String MAP_TEMPLATES = "androidx.car.app.MAP_TEMPLATES";
+ field public static final String NAVIGATION_TEMPLATES = "androidx.car.app.NAVIGATION_TEMPLATES";
+ }
+
+ public abstract class CarAppService extends android.app.Service {
+ ctor public CarAppService();
+ method public abstract androidx.car.app.validation.HostValidator createHostValidator();
+ method @CallSuper public final void dump(java.io.FileDescriptor, java.io.PrintWriter, String![]?);
+ method public final androidx.car.app.Session? getCurrentSession();
+ method public final androidx.car.app.HostInfo? getHostInfo();
+ method @CallSuper public final android.os.IBinder onBind(android.content.Intent);
+ method public abstract androidx.car.app.Session onCreateSession();
+ method public final boolean onUnbind(android.content.Intent);
+ field public static final String CATEGORY_CHARGING_APP = "androidx.car.app.category.CHARGING";
+ field public static final String CATEGORY_NAVIGATION_APP = "androidx.car.app.category.NAVIGATION";
+ field public static final String CATEGORY_PARKING_APP = "androidx.car.app.category.PARKING";
+ field public static final String SERVICE_INTERFACE = "androidx.car.app.CarAppService";
+ }
+
+ public class CarContext extends android.content.ContextWrapper {
+ method public void finishCarApp();
+ method @androidx.car.app.annotations.RequiresCarApi(2) public android.content.ComponentName? getCallingComponent();
+ method public int getCarAppApiLevel();
+ method public Object getCarService(String);
+ method public <T> T getCarService(Class<T!>);
+ method public String getCarServiceName(Class<?>);
+ method public androidx.car.app.HostInfo? getHostInfo();
+ method public androidx.activity.OnBackPressedDispatcher getOnBackPressedDispatcher();
+ method public boolean isDarkMode();
+ method public void requestPermissions(java.util.List<java.lang.String!>, androidx.car.app.OnRequestPermissionsListener);
+ method public void requestPermissions(java.util.List<java.lang.String!>, java.util.concurrent.Executor, androidx.car.app.OnRequestPermissionsListener);
+ method @androidx.car.app.annotations.RequiresCarApi(2) public void setCarAppResult(int, android.content.Intent?);
+ method public void startCarApp(android.content.Intent);
+ method @Deprecated public static void startCarApp(android.content.Intent, android.content.Intent);
+ field public static final String ACTION_NAVIGATE = "androidx.car.app.action.NAVIGATE";
+ field public static final String APP_SERVICE = "app";
+ field public static final String CAR_SERVICE = "car";
+ field @androidx.car.app.annotations.RequiresCarApi(2) public static final String CONSTRAINT_SERVICE = "constraints";
+ field public static final String EXTRA_START_CAR_APP_BINDER_KEY = "androidx.car.app.extra.START_CAR_APP_BINDER_KEY";
+ field @androidx.car.app.annotations.RequiresCarApi(3) public static final String HARDWARE_SERVICE = "hardware";
+ field public static final String NAVIGATION_SERVICE = "navigation";
+ field public static final String SCREEN_SERVICE = "screen";
+ }
+
+ public final class CarToast {
+ method public static androidx.car.app.CarToast makeText(androidx.car.app.CarContext, @StringRes int, int);
+ method public static androidx.car.app.CarToast makeText(androidx.car.app.CarContext, CharSequence, int);
+ method public void setDuration(int);
+ method public void setText(@StringRes int);
+ method public void setText(CharSequence);
+ method public void show();
+ field public static final int LENGTH_LONG = 1; // 0x1
+ field public static final int LENGTH_SHORT = 0; // 0x0
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class FailureResponse {
+ ctor public FailureResponse(Throwable);
+ method public int getErrorType();
+ method public String getStackTrace();
+ field public static final int BUNDLER_EXCEPTION = 1; // 0x1
+ field public static final int ILLEGAL_STATE_EXCEPTION = 2; // 0x2
+ field public static final int INVALID_PARAMETER_EXCEPTION = 3; // 0x3
+ field public static final int REMOTE_EXCEPTION = 6; // 0x6
+ field public static final int RUNTIME_EXCEPTION = 5; // 0x5
+ field public static final int SECURITY_EXCEPTION = 4; // 0x4
+ field public static final int UNKNOWN_ERROR = 0; // 0x0
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class HandshakeInfo {
+ ctor public HandshakeInfo(String, int);
+ method public int getHostCarAppApiLevel();
+ method public String getHostPackageName();
+ }
+
+ public final class HostException extends java.lang.RuntimeException {
+ ctor public HostException(String);
+ ctor public HostException(String, Throwable);
+ ctor public HostException(Throwable);
+ }
+
+ public final class HostInfo {
+ ctor public HostInfo(String, int);
+ method public String getPackageName();
+ method public int getUid();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface OnDoneCallback {
+ method public default void onFailure(androidx.car.app.serialization.Bundleable);
+ method public default void onSuccess(androidx.car.app.serialization.Bundleable?);
+ }
+
+ public interface OnRequestPermissionsListener {
+ method public void onRequestPermissionsResult(java.util.List<java.lang.String!>, java.util.List<java.lang.String!>);
+ }
+
+ public interface OnScreenResultListener {
+ method public void onScreenResult(Object?);
+ }
+
+ public abstract class Screen implements androidx.lifecycle.LifecycleOwner {
+ ctor protected Screen(androidx.car.app.CarContext);
+ method public final void finish();
+ method public final androidx.car.app.CarContext getCarContext();
+ method public final androidx.lifecycle.Lifecycle getLifecycle();
+ method public String? getMarker();
+ method public final androidx.car.app.ScreenManager getScreenManager();
+ method public final void invalidate();
+ method public abstract androidx.car.app.model.Template onGetTemplate();
+ method public void setMarker(String?);
+ method public void setResult(Object?);
+ }
+
+ @MainThread public class ScreenManager implements androidx.car.app.managers.Manager {
+ method public int getStackSize();
+ method public androidx.car.app.Screen getTop();
+ method public void pop();
+ method public void popTo(String);
+ method public void popToRoot();
+ method public void push(androidx.car.app.Screen);
+ method public void pushForResult(androidx.car.app.Screen, androidx.car.app.OnScreenResultListener);
+ method public void remove(androidx.car.app.Screen);
+ }
+
+ public abstract class Session implements androidx.lifecycle.LifecycleOwner {
+ ctor public Session();
+ method public final androidx.car.app.CarContext getCarContext();
+ method public androidx.lifecycle.Lifecycle getLifecycle();
+ method public void onCarConfigurationChanged(android.content.res.Configuration);
+ method public abstract androidx.car.app.Screen onCreateScreen(android.content.Intent);
+ method public void onNewIntent(android.content.Intent);
+ }
+
+ public interface SurfaceCallback {
+ method @androidx.car.app.annotations.RequiresCarApi(2) public default void onFling(float, float);
+ method @androidx.car.app.annotations.RequiresCarApi(2) public default void onScale(float, float, float);
+ method @androidx.car.app.annotations.RequiresCarApi(2) public default void onScroll(float, float);
+ method public default void onStableAreaChanged(android.graphics.Rect);
+ method public default void onSurfaceAvailable(androidx.car.app.SurfaceContainer);
+ method public default void onSurfaceDestroyed(androidx.car.app.SurfaceContainer);
+ method public default void onVisibleAreaChanged(android.graphics.Rect);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class SurfaceContainer {
+ ctor public SurfaceContainer(android.view.Surface?, int, int, int);
+ method public int getDpi();
+ method public int getHeight();
+ method public android.view.Surface? getSurface();
+ method public int getWidth();
+ }
+
+}
+
+package androidx.car.app.annotations {
+
+ @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) @java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE, java.lang.annotation.ElementType.PARAMETER}) public @interface CarProtocol {
+ }
+
+ @RequiresOptIn @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) @java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE, java.lang.annotation.ElementType.CONSTRUCTOR, java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.METHOD}) public @interface ExperimentalCarApi {
+ }
+
+ @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE, java.lang.annotation.ElementType.CONSTRUCTOR, java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.METHOD}) public @interface RequiresCarApi {
+ method public abstract int value();
+ }
+
+}
+
+package androidx.car.app.connection {
+
+ public final class CarConnection {
+ ctor public CarConnection(android.content.Context);
+ method public androidx.lifecycle.LiveData<java.lang.Integer!> getType();
+ field public static final String ACTION_CAR_CONNECTION_UPDATED = "androidx.car.app.connection.action.CAR_CONNECTION_UPDATED";
+ field public static final String CAR_CONNECTION_STATE = "CarConnectionState";
+ field public static final int CONNECTION_TYPE_NATIVE = 1; // 0x1
+ field public static final int CONNECTION_TYPE_NOT_CONNECTED = 0; // 0x0
+ field public static final int CONNECTION_TYPE_PROJECTION = 2; // 0x2
+ }
+
+}
+
+package androidx.car.app.constraints {
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public class ConstraintManager implements androidx.car.app.managers.Manager {
+ method public int getContentLimit(int);
+ field public static final int CONTENT_LIMIT_TYPE_GRID = 1; // 0x1
+ field public static final int CONTENT_LIMIT_TYPE_LIST = 0; // 0x0
+ field public static final int CONTENT_LIMIT_TYPE_PANE = 4; // 0x4
+ field public static final int CONTENT_LIMIT_TYPE_PLACE_LIST = 2; // 0x2
+ field public static final int CONTENT_LIMIT_TYPE_ROUTE_LIST = 3; // 0x3
+ }
+
+}
+
+package androidx.car.app.hardware {
+
+ @MainThread @androidx.car.app.annotations.RequiresCarApi(3) public interface CarHardwareManager extends androidx.car.app.managers.Manager {
+ method public default androidx.car.app.hardware.info.CarInfo getCarInfo();
+ method public default androidx.car.app.hardware.info.CarSensors getCarSensors();
+ }
+
+}
+
+package androidx.car.app.hardware.common {
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class CarUnit {
+ method public static String toString(int);
+ field @androidx.car.app.annotations.ExperimentalCarApi public static final int IMPERIAL_GALLON = 204; // 0xcc
+ field public static final int KILOMETER = 3; // 0x3
+ field public static final int KILOMETERS_PER_HOUR = 102; // 0x66
+ field @androidx.car.app.annotations.ExperimentalCarApi public static final int LITER = 202; // 0xca
+ field public static final int METER = 2; // 0x2
+ field public static final int METERS_PER_SEC = 101; // 0x65
+ field public static final int MILE = 4; // 0x4
+ field public static final int MILES_PER_HOUR = 103; // 0x67
+ field @androidx.car.app.annotations.ExperimentalCarApi public static final int MILLILITER = 201; // 0xc9
+ field public static final int MILLIMETER = 1; // 0x1
+ field @androidx.car.app.annotations.ExperimentalCarApi public static final int US_GALLON = 203; // 0xcb
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class CarValue<T> {
+ ctor public CarValue(T?, long, int);
+ method public int getStatus();
+ method public long getTimestampMillis();
+ method public T? getValue();
+ field public static final int STATUS_SUCCESS = 1; // 0x1
+ field public static final int STATUS_UNAVAILABLE = 3; // 0x3
+ field public static final int STATUS_UNIMPLEMENTED = 2; // 0x2
+ field public static final int STATUS_UNKNOWN = 0; // 0x0
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public interface OnCarDataAvailableListener<T> {
+ method public void onCarDataAvailable(T);
+ }
+
+}
+
+package androidx.car.app.hardware.info {
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class Accelerometer {
+ ctor public Accelerometer(androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Float!>!>);
+ method public androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Float!>!> getForces();
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class CarHardwareLocation {
+ ctor public CarHardwareLocation(androidx.car.app.hardware.common.CarValue<android.location.Location!>);
+ method public androidx.car.app.hardware.common.CarValue<android.location.Location!> getLocation();
+ }
+
+ @MainThread @androidx.car.app.annotations.RequiresCarApi(3) public interface CarInfo {
+ method public void addEnergyLevelListener(java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.EnergyLevel!>);
+ method public void addMileageListener(java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Mileage!>);
+ method public void addSpeedListener(java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Speed!>);
+ method public void addTollListener(java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.TollCard!>);
+ method public void fetchEnergyProfile(java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.EnergyProfile!>);
+ method public void fetchModel(java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Model!>);
+ method public void removeEnergyLevelListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.EnergyLevel!>);
+ method public void removeMileageListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Mileage!>);
+ method public void removeSpeedListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Speed!>);
+ method public void removeTollListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.TollCard!>);
+ }
+
+ @MainThread @androidx.car.app.annotations.RequiresCarApi(3) public interface CarSensors {
+ method public void addAccelerometerListener(int, java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Accelerometer!>);
+ method public void addCarHardwareLocationListener(int, java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.CarHardwareLocation!>);
+ method public void addCompassListener(int, java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Compass!>);
+ method public void addGyroscopeListener(int, java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Gyroscope!>);
+ method public void removeAccelerometerListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Accelerometer!>);
+ method public void removeCarHardwareLocationListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.CarHardwareLocation!>);
+ method public void removeCompassListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Compass!>);
+ method public void removeGyroscopeListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Gyroscope!>);
+ field public static final int UPDATE_RATE_FASTEST = 3; // 0x3
+ field public static final int UPDATE_RATE_NORMAL = 1; // 0x1
+ field public static final int UPDATE_RATE_UI = 2; // 0x2
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class Compass {
+ ctor public Compass(androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Float!>!>);
+ method public androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Float!>!> getOrientations();
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class EnergyLevel {
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Float!> getBatteryPercent();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Integer!> getDistanceDisplayUnit();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Boolean!> getEnergyIsLow();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Float!> getFuelPercent();
+ method @androidx.car.app.annotations.ExperimentalCarApi public androidx.car.app.hardware.common.CarValue<java.lang.Integer!> getFuelVolumeDisplayUnit();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Float!> getRangeRemainingMeters();
+ }
+
+ public static final class EnergyLevel.Builder {
+ ctor public EnergyLevel.Builder();
+ method public androidx.car.app.hardware.info.EnergyLevel build();
+ method public androidx.car.app.hardware.info.EnergyLevel.Builder setBatteryPercent(androidx.car.app.hardware.common.CarValue<java.lang.Float!>);
+ method public androidx.car.app.hardware.info.EnergyLevel.Builder setDistanceDisplayUnit(androidx.car.app.hardware.common.CarValue<java.lang.Integer!>);
+ method public androidx.car.app.hardware.info.EnergyLevel.Builder setEnergyIsLow(androidx.car.app.hardware.common.CarValue<java.lang.Boolean!>);
+ method public androidx.car.app.hardware.info.EnergyLevel.Builder setFuelPercent(androidx.car.app.hardware.common.CarValue<java.lang.Float!>);
+ method @androidx.car.app.annotations.ExperimentalCarApi public androidx.car.app.hardware.info.EnergyLevel.Builder setFuelVolumeDisplayUnit(androidx.car.app.hardware.common.CarValue<java.lang.Integer!>);
+ method public androidx.car.app.hardware.info.EnergyLevel.Builder setRangeRemainingMeters(androidx.car.app.hardware.common.CarValue<java.lang.Float!>);
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class EnergyProfile {
+ method public androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Integer!>!> getEvConnectorTypes();
+ method public androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Integer!>!> getFuelTypes();
+ field public static final int EVCONNECTOR_TYPE_CHADEMO = 3; // 0x3
+ field public static final int EVCONNECTOR_TYPE_COMBO_1 = 4; // 0x4
+ field public static final int EVCONNECTOR_TYPE_COMBO_2 = 5; // 0x5
+ field public static final int EVCONNECTOR_TYPE_GBT = 9; // 0x9
+ field public static final int EVCONNECTOR_TYPE_GBT_DC = 10; // 0xa
+ field public static final int EVCONNECTOR_TYPE_J1772 = 1; // 0x1
+ field public static final int EVCONNECTOR_TYPE_MENNEKES = 2; // 0x2
+ field public static final int EVCONNECTOR_TYPE_OTHER = 101; // 0x65
+ field public static final int EVCONNECTOR_TYPE_SCAME = 11; // 0xb
+ field public static final int EVCONNECTOR_TYPE_TESLA_HPWC = 7; // 0x7
+ field public static final int EVCONNECTOR_TYPE_TESLA_ROADSTER = 6; // 0x6
+ field public static final int EVCONNECTOR_TYPE_TESLA_SUPERCHARGER = 8; // 0x8
+ field public static final int EVCONNECTOR_TYPE_UNKNOWN = 0; // 0x0
+ field public static final int FUEL_TYPE_BIODIESEL = 5; // 0x5
+ field public static final int FUEL_TYPE_CNG = 8; // 0x8
+ field public static final int FUEL_TYPE_DIESEL_1 = 3; // 0x3
+ field public static final int FUEL_TYPE_DIESEL_2 = 4; // 0x4
+ field public static final int FUEL_TYPE_E85 = 6; // 0x6
+ field public static final int FUEL_TYPE_ELECTRIC = 10; // 0xa
+ field public static final int FUEL_TYPE_HYDROGEN = 11; // 0xb
+ field public static final int FUEL_TYPE_LEADED = 2; // 0x2
+ field public static final int FUEL_TYPE_LNG = 9; // 0x9
+ field public static final int FUEL_TYPE_LPG = 7; // 0x7
+ field public static final int FUEL_TYPE_OTHER = 12; // 0xc
+ field public static final int FUEL_TYPE_UNKNOWN = 0; // 0x0
+ field public static final int FUEL_TYPE_UNLEADED = 1; // 0x1
+ }
+
+ public static final class EnergyProfile.Builder {
+ ctor public EnergyProfile.Builder();
+ method public androidx.car.app.hardware.info.EnergyProfile build();
+ method public androidx.car.app.hardware.info.EnergyProfile.Builder setEvConnectorTypes(androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Integer!>!>);
+ method public androidx.car.app.hardware.info.EnergyProfile.Builder setFuelTypes(androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Integer!>!>);
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class Gyroscope {
+ ctor public Gyroscope(androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Float!>!>);
+ method public androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Float!>!> getRotations();
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class Mileage {
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Integer!> getDistanceDisplayUnit();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Float!> getOdometerMeters();
+ }
+
+ public static final class Mileage.Builder {
+ ctor public Mileage.Builder();
+ method public androidx.car.app.hardware.info.Mileage build();
+ method public androidx.car.app.hardware.info.Mileage.Builder setDistanceDisplayUnit(androidx.car.app.hardware.common.CarValue<java.lang.Integer!>);
+ method public androidx.car.app.hardware.info.Mileage.Builder setOdometerMeters(androidx.car.app.hardware.common.CarValue<java.lang.Float!>);
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class Model {
+ method public androidx.car.app.hardware.common.CarValue<java.lang.String!> getManufacturer();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.String!> getName();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Integer!> getYear();
+ }
+
+ public static final class Model.Builder {
+ ctor public Model.Builder();
+ method public androidx.car.app.hardware.info.Model build();
+ method public androidx.car.app.hardware.info.Model.Builder setManufacturer(androidx.car.app.hardware.common.CarValue<java.lang.String!>);
+ method public androidx.car.app.hardware.info.Model.Builder setName(androidx.car.app.hardware.common.CarValue<java.lang.String!>);
+ method public androidx.car.app.hardware.info.Model.Builder setYear(androidx.car.app.hardware.common.CarValue<java.lang.Integer!>);
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class Speed {
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Float!> getDisplaySpeedMetersPerSecond();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Float!> getRawSpeedMetersPerSecond();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Integer!> getSpeedDisplayUnit();
+ }
+
+ public static final class Speed.Builder {
+ ctor public Speed.Builder();
+ method public androidx.car.app.hardware.info.Speed build();
+ method public androidx.car.app.hardware.info.Speed.Builder setDisplaySpeedMetersPerSecond(androidx.car.app.hardware.common.CarValue<java.lang.Float!>);
+ method public androidx.car.app.hardware.info.Speed.Builder setRawSpeedMetersPerSecond(androidx.car.app.hardware.common.CarValue<java.lang.Float!>);
+ method public androidx.car.app.hardware.info.Speed.Builder setSpeedDisplayUnit(androidx.car.app.hardware.common.CarValue<java.lang.Integer!>);
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class TollCard {
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Integer!> getCardState();
+ field public static final int TOLLCARD_STATE_INVALID = 2; // 0x2
+ field public static final int TOLLCARD_STATE_NOT_INSERTED = 3; // 0x3
+ field public static final int TOLLCARD_STATE_UNKNOWN = 0; // 0x0
+ field public static final int TOLLCARD_STATE_VALID = 1; // 0x1
+ }
+
+ public static final class TollCard.Builder {
+ ctor public TollCard.Builder();
+ method public androidx.car.app.hardware.info.TollCard build();
+ method public androidx.car.app.hardware.info.TollCard.Builder setCardState(androidx.car.app.hardware.common.CarValue<java.lang.Integer!>);
+ }
+
+}
+
+package androidx.car.app.managers {
+
+ public interface Manager {
+ }
+
+}
+
+package androidx.car.app.model {
+
+ @androidx.car.app.annotations.CarProtocol public final class Action {
+ method public androidx.car.app.model.CarColor? getBackgroundColor();
+ method @androidx.car.app.annotations.RequiresCarApi(4) public int getFlags();
+ method public androidx.car.app.model.CarIcon? getIcon();
+ method public androidx.car.app.model.OnClickDelegate? getOnClickDelegate();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public int getType();
+ method public boolean isStandard();
+ method public static String typeToString(int);
+ field public static final androidx.car.app.model.Action APP_ICON;
+ field public static final androidx.car.app.model.Action BACK;
+ field @androidx.car.app.annotations.RequiresCarApi(4) public static final int FLAG_PRIMARY = 1; // 0x1
+ field public static final androidx.car.app.model.Action PAN;
+ field public static final int TYPE_APP_ICON = 65538; // 0x10002
+ field public static final int TYPE_BACK = 65539; // 0x10003
+ field public static final int TYPE_CUSTOM = 1; // 0x1
+ field public static final int TYPE_PAN = 65540; // 0x10004
+ }
+
+ public static final class Action.Builder {
+ ctor public Action.Builder();
+ ctor @androidx.car.app.annotations.RequiresCarApi(2) public Action.Builder(androidx.car.app.model.Action);
+ method public androidx.car.app.model.Action build();
+ method public androidx.car.app.model.Action.Builder setBackgroundColor(androidx.car.app.model.CarColor);
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.model.Action.Builder setFlags(int);
+ method public androidx.car.app.model.Action.Builder setIcon(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.model.Action.Builder setOnClickListener(androidx.car.app.model.OnClickListener);
+ method public androidx.car.app.model.Action.Builder setTitle(CharSequence);
+ method public androidx.car.app.model.Action.Builder setTitle(androidx.car.app.model.CarText);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class ActionStrip {
+ method public java.util.List<androidx.car.app.model.Action!> getActions();
+ method public androidx.car.app.model.Action? getFirstActionOfType(int);
+ }
+
+ public static final class ActionStrip.Builder {
+ ctor public ActionStrip.Builder();
+ method public androidx.car.app.model.ActionStrip.Builder addAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.ActionStrip build();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class CarColor {
+ method public static androidx.car.app.model.CarColor createCustom(@ColorInt int, @ColorInt int);
+ method @ColorInt public int getColor();
+ method @ColorInt public int getColorDark();
+ method public int getType();
+ field public static final androidx.car.app.model.CarColor BLUE;
+ field public static final androidx.car.app.model.CarColor DEFAULT;
+ field public static final androidx.car.app.model.CarColor GREEN;
+ field public static final androidx.car.app.model.CarColor PRIMARY;
+ field public static final androidx.car.app.model.CarColor RED;
+ field public static final androidx.car.app.model.CarColor SECONDARY;
+ field public static final int TYPE_BLUE = 6; // 0x6
+ field public static final int TYPE_CUSTOM = 0; // 0x0
+ field public static final int TYPE_DEFAULT = 1; // 0x1
+ field public static final int TYPE_GREEN = 5; // 0x5
+ field public static final int TYPE_PRIMARY = 2; // 0x2
+ field public static final int TYPE_RED = 4; // 0x4
+ field public static final int TYPE_SECONDARY = 3; // 0x3
+ field public static final int TYPE_YELLOW = 7; // 0x7
+ field public static final androidx.car.app.model.CarColor YELLOW;
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class CarIcon {
+ method public androidx.core.graphics.drawable.IconCompat? getIcon();
+ method public androidx.car.app.model.CarColor? getTint();
+ method public int getType();
+ field public static final androidx.car.app.model.CarIcon ALERT;
+ field public static final androidx.car.app.model.CarIcon APP_ICON;
+ field public static final androidx.car.app.model.CarIcon BACK;
+ field public static final androidx.car.app.model.CarIcon ERROR;
+ field @androidx.car.app.annotations.RequiresCarApi(2) public static final androidx.car.app.model.CarIcon PAN;
+ field public static final int TYPE_ALERT = 4; // 0x4
+ field public static final int TYPE_APP_ICON = 5; // 0x5
+ field public static final int TYPE_BACK = 3; // 0x3
+ field public static final int TYPE_CUSTOM = 1; // 0x1
+ field public static final int TYPE_ERROR = 6; // 0x6
+ field public static final int TYPE_PAN = 7; // 0x7
+ }
+
+ public static final class CarIcon.Builder {
+ ctor public CarIcon.Builder(androidx.core.graphics.drawable.IconCompat);
+ ctor public CarIcon.Builder(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.model.CarIcon build();
+ method public androidx.car.app.model.CarIcon.Builder setTint(androidx.car.app.model.CarColor);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class CarIconSpan extends androidx.car.app.model.CarSpan {
+ method public static androidx.car.app.model.CarIconSpan create(androidx.car.app.model.CarIcon);
+ method public static androidx.car.app.model.CarIconSpan create(androidx.car.app.model.CarIcon, int);
+ method public int getAlignment();
+ method public androidx.car.app.model.CarIcon getIcon();
+ field public static final int ALIGN_BASELINE = 1; // 0x1
+ field public static final int ALIGN_BOTTOM = 0; // 0x0
+ field public static final int ALIGN_CENTER = 2; // 0x2
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class CarLocation {
+ method public static androidx.car.app.model.CarLocation create(double, double);
+ method public static androidx.car.app.model.CarLocation create(android.location.Location);
+ method public double getLatitude();
+ method public double getLongitude();
+ }
+
+ @Keep @androidx.car.app.annotations.CarProtocol public class CarSpan extends android.text.style.CharacterStyle {
+ ctor public CarSpan();
+ method public void updateDrawState(android.text.TextPaint);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class CarText {
+ method public static androidx.car.app.model.CarText create(CharSequence);
+ method public java.util.List<java.lang.CharSequence!> getVariants();
+ method public boolean isEmpty();
+ method public static boolean isNullOrEmpty(androidx.car.app.model.CarText?);
+ method public CharSequence toCharSequence();
+ }
+
+ public static final class CarText.Builder {
+ ctor public CarText.Builder(CharSequence);
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.model.CarText.Builder addVariant(CharSequence);
+ method public androidx.car.app.model.CarText build();
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(2) public final class ClickableSpan extends androidx.car.app.model.CarSpan {
+ method public static androidx.car.app.model.ClickableSpan create(androidx.car.app.model.OnClickListener);
+ method public androidx.car.app.model.OnClickDelegate getOnClickDelegate();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class DateTimeWithZone {
+ method public static androidx.car.app.model.DateTimeWithZone create(long, @IntRange(from=0xffff02e0, to=64800) int, String);
+ method public static androidx.car.app.model.DateTimeWithZone create(long, java.util.TimeZone);
+ method @RequiresApi(26) public static androidx.car.app.model.DateTimeWithZone create(java.time.ZonedDateTime);
+ method public long getTimeSinceEpochMillis();
+ method public int getZoneOffsetSeconds();
+ method public String? getZoneShortName();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Distance {
+ method public static androidx.car.app.model.Distance create(double, int);
+ method public double getDisplayDistance();
+ method public int getDisplayUnit();
+ field public static final int UNIT_FEET = 6; // 0x6
+ field public static final int UNIT_KILOMETERS = 2; // 0x2
+ field public static final int UNIT_KILOMETERS_P1 = 3; // 0x3
+ field public static final int UNIT_METERS = 1; // 0x1
+ field public static final int UNIT_MILES = 4; // 0x4
+ field public static final int UNIT_MILES_P1 = 5; // 0x5
+ field public static final int UNIT_YARDS = 7; // 0x7
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class DistanceSpan extends androidx.car.app.model.CarSpan {
+ method public static androidx.car.app.model.DistanceSpan create(androidx.car.app.model.Distance);
+ method public androidx.car.app.model.Distance getDistance();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class DurationSpan extends androidx.car.app.model.CarSpan {
+ method public static androidx.car.app.model.DurationSpan create(long);
+ method @RequiresApi(26) public static androidx.car.app.model.DurationSpan create(java.time.Duration);
+ method public long getDurationSeconds();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class ForegroundCarColorSpan extends androidx.car.app.model.CarSpan {
+ method public static androidx.car.app.model.ForegroundCarColorSpan create(androidx.car.app.model.CarColor);
+ method public androidx.car.app.model.CarColor getColor();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class GridItem implements androidx.car.app.model.Item {
+ method public androidx.car.app.model.CarIcon? getImage();
+ method public int getImageType();
+ method public androidx.car.app.model.OnClickDelegate? getOnClickDelegate();
+ method public androidx.car.app.model.CarText? getText();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public boolean isLoading();
+ field public static final int IMAGE_TYPE_ICON = 1; // 0x1
+ field public static final int IMAGE_TYPE_LARGE = 2; // 0x2
+ }
+
+ public static final class GridItem.Builder {
+ ctor public GridItem.Builder();
+ method public androidx.car.app.model.GridItem build();
+ method public androidx.car.app.model.GridItem.Builder setImage(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.model.GridItem.Builder setImage(androidx.car.app.model.CarIcon, int);
+ method public androidx.car.app.model.GridItem.Builder setLoading(boolean);
+ method public androidx.car.app.model.GridItem.Builder setOnClickListener(androidx.car.app.model.OnClickListener);
+ method public androidx.car.app.model.GridItem.Builder setText(CharSequence);
+ method public androidx.car.app.model.GridItem.Builder setText(androidx.car.app.model.CarText);
+ method public androidx.car.app.model.GridItem.Builder setTitle(CharSequence);
+ method public androidx.car.app.model.GridItem.Builder setTitle(androidx.car.app.model.CarText);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class GridTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.ItemList? getSingleList();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public boolean isLoading();
+ }
+
+ public static final class GridTemplate.Builder {
+ ctor public GridTemplate.Builder();
+ method public androidx.car.app.model.GridTemplate build();
+ method public androidx.car.app.model.GridTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.GridTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.GridTemplate.Builder setLoading(boolean);
+ method public androidx.car.app.model.GridTemplate.Builder setSingleList(androidx.car.app.model.ItemList);
+ method public androidx.car.app.model.GridTemplate.Builder setTitle(CharSequence);
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public interface InputCallback {
+ method public default void onInputSubmitted(String);
+ method public default void onInputTextChanged(String);
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public interface InputCallbackDelegate {
+ method public void sendInputSubmitted(String, androidx.car.app.OnDoneCallback);
+ method public void sendInputTextChanged(String, androidx.car.app.OnDoneCallback);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface Item {
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class ItemList {
+ method public java.util.List<androidx.car.app.model.Item!> getItems();
+ method public androidx.car.app.model.CarText? getNoItemsMessage();
+ method public androidx.car.app.model.OnItemVisibilityChangedDelegate? getOnItemVisibilityChangedDelegate();
+ method public androidx.car.app.model.OnSelectedDelegate? getOnSelectedDelegate();
+ method public int getSelectedIndex();
+ }
+
+ public static final class ItemList.Builder {
+ ctor public ItemList.Builder();
+ method public androidx.car.app.model.ItemList.Builder addItem(androidx.car.app.model.Item);
+ method public androidx.car.app.model.ItemList build();
+ method public androidx.car.app.model.ItemList.Builder setNoItemsMessage(CharSequence);
+ method public androidx.car.app.model.ItemList.Builder setOnItemsVisibilityChangedListener(androidx.car.app.model.ItemList.OnItemVisibilityChangedListener);
+ method public androidx.car.app.model.ItemList.Builder setOnSelectedListener(androidx.car.app.model.ItemList.OnSelectedListener);
+ method public androidx.car.app.model.ItemList.Builder setSelectedIndex(@IntRange(from=0) int);
+ }
+
+ public static interface ItemList.OnItemVisibilityChangedListener {
+ method public void onItemVisibilityChanged(int, int);
+ }
+
+ public static interface ItemList.OnSelectedListener {
+ method public void onSelected(int);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class ListTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public java.util.List<androidx.car.app.model.SectionedItemList!> getSectionedLists();
+ method public androidx.car.app.model.ItemList? getSingleList();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public boolean isLoading();
+ }
+
+ public static final class ListTemplate.Builder {
+ ctor public ListTemplate.Builder();
+ method public androidx.car.app.model.ListTemplate.Builder addSectionedList(androidx.car.app.model.SectionedItemList);
+ method public androidx.car.app.model.ListTemplate build();
+ method public androidx.car.app.model.ListTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.ListTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.ListTemplate.Builder setLoading(boolean);
+ method public androidx.car.app.model.ListTemplate.Builder setSingleList(androidx.car.app.model.ItemList);
+ method public androidx.car.app.model.ListTemplate.Builder setTitle(CharSequence);
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public final class LongMessageTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public java.util.List<androidx.car.app.model.Action!> getActions();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.CarText getMessage();
+ method public androidx.car.app.model.CarText? getTitle();
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public static final class LongMessageTemplate.Builder {
+ ctor public LongMessageTemplate.Builder(CharSequence);
+ method public androidx.car.app.model.LongMessageTemplate.Builder addAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.LongMessageTemplate build();
+ method public androidx.car.app.model.LongMessageTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.LongMessageTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.LongMessageTemplate.Builder setTitle(CharSequence);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class MessageTemplate implements androidx.car.app.model.Template {
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public java.util.List<androidx.car.app.model.Action!> getActions();
+ method public androidx.car.app.model.CarText? getDebugMessage();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.CarIcon? getIcon();
+ method public androidx.car.app.model.CarText getMessage();
+ method public androidx.car.app.model.CarText? getTitle();
+ method @androidx.car.app.annotations.RequiresCarApi(2) public boolean isLoading();
+ }
+
+ public static final class MessageTemplate.Builder {
+ ctor public MessageTemplate.Builder(CharSequence);
+ ctor public MessageTemplate.Builder(androidx.car.app.model.CarText);
+ method public androidx.car.app.model.MessageTemplate.Builder addAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.MessageTemplate build();
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.model.MessageTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.MessageTemplate.Builder setDebugMessage(Throwable);
+ method public androidx.car.app.model.MessageTemplate.Builder setDebugMessage(String);
+ method public androidx.car.app.model.MessageTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.MessageTemplate.Builder setIcon(androidx.car.app.model.CarIcon);
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.model.MessageTemplate.Builder setLoading(boolean);
+ method public androidx.car.app.model.MessageTemplate.Builder setTitle(CharSequence);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Metadata {
+ method public androidx.car.app.model.Place? getPlace();
+ field public static final androidx.car.app.model.Metadata EMPTY_METADATA;
+ }
+
+ public static final class Metadata.Builder {
+ ctor public Metadata.Builder();
+ ctor public Metadata.Builder(androidx.car.app.model.Metadata);
+ method public androidx.car.app.model.Metadata build();
+ method public androidx.car.app.model.Metadata.Builder setPlace(androidx.car.app.model.Place);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface OnCheckedChangeDelegate {
+ method public void sendCheckedChange(boolean, androidx.car.app.OnDoneCallback);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface OnClickDelegate {
+ method public boolean isParkedOnly();
+ method public void sendClick(androidx.car.app.OnDoneCallback);
+ }
+
+ public interface OnClickListener {
+ method public void onClick();
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.ExperimentalCarApi public interface OnContentRefreshDelegate {
+ method public void sendContentRefreshRequested(androidx.car.app.OnDoneCallback);
+ }
+
+ @androidx.car.app.annotations.ExperimentalCarApi public interface OnContentRefreshListener {
+ method public void onContentRefreshRequested();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface OnItemVisibilityChangedDelegate {
+ method public void sendItemVisibilityChanged(int, int, androidx.car.app.OnDoneCallback);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface OnSelectedDelegate {
+ method public void sendSelected(int, androidx.car.app.OnDoneCallback);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Pane {
+ method public java.util.List<androidx.car.app.model.Action!> getActions();
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.model.CarIcon? getImage();
+ method public java.util.List<androidx.car.app.model.Row!> getRows();
+ method public boolean isLoading();
+ }
+
+ public static final class Pane.Builder {
+ ctor public Pane.Builder();
+ method public androidx.car.app.model.Pane.Builder addAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.Pane.Builder addRow(androidx.car.app.model.Row);
+ method public androidx.car.app.model.Pane build();
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.model.Pane.Builder setImage(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.model.Pane.Builder setLoading(boolean);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class PaneTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.Pane getPane();
+ method public androidx.car.app.model.CarText? getTitle();
+ }
+
+ public static final class PaneTemplate.Builder {
+ ctor public PaneTemplate.Builder(androidx.car.app.model.Pane);
+ method public androidx.car.app.model.PaneTemplate build();
+ method public androidx.car.app.model.PaneTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.PaneTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.PaneTemplate.Builder setTitle(CharSequence);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class ParkedOnlyOnClickListener implements androidx.car.app.model.OnClickListener {
+ method public static androidx.car.app.model.ParkedOnlyOnClickListener create(androidx.car.app.model.OnClickListener);
+ method public void onClick();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Place {
+ method public androidx.car.app.model.CarLocation getLocation();
+ method public androidx.car.app.model.PlaceMarker? getMarker();
+ }
+
+ public static final class Place.Builder {
+ ctor public Place.Builder(androidx.car.app.model.CarLocation);
+ ctor public Place.Builder(androidx.car.app.model.Place);
+ method public androidx.car.app.model.Place build();
+ method public androidx.car.app.model.Place.Builder setMarker(androidx.car.app.model.PlaceMarker);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class PlaceListMapTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.Place? getAnchor();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.ItemList? getItemList();
+ method @androidx.car.app.annotations.ExperimentalCarApi public androidx.car.app.model.OnContentRefreshDelegate? getOnContentRefreshDelegate();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public boolean isCurrentLocationEnabled();
+ method public boolean isLoading();
+ }
+
+ public static final class PlaceListMapTemplate.Builder {
+ ctor public PlaceListMapTemplate.Builder();
+ method public androidx.car.app.model.PlaceListMapTemplate build();
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setAnchor(androidx.car.app.model.Place);
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setCurrentLocationEnabled(boolean);
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setItemList(androidx.car.app.model.ItemList);
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setLoading(boolean);
+ method @androidx.car.app.annotations.ExperimentalCarApi public androidx.car.app.model.PlaceListMapTemplate.Builder setOnContentRefreshListener(androidx.car.app.model.OnContentRefreshListener);
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setTitle(CharSequence);
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setTitle(androidx.car.app.model.CarText);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class PlaceMarker {
+ method public androidx.car.app.model.CarColor? getColor();
+ method public androidx.car.app.model.CarIcon? getIcon();
+ method public int getIconType();
+ method public androidx.car.app.model.CarText? getLabel();
+ field public static final int TYPE_ICON = 0; // 0x0
+ field public static final int TYPE_IMAGE = 1; // 0x1
+ }
+
+ public static final class PlaceMarker.Builder {
+ ctor public PlaceMarker.Builder();
+ method public androidx.car.app.model.PlaceMarker build();
+ method public androidx.car.app.model.PlaceMarker.Builder setColor(androidx.car.app.model.CarColor);
+ method public androidx.car.app.model.PlaceMarker.Builder setIcon(androidx.car.app.model.CarIcon, int);
+ method public androidx.car.app.model.PlaceMarker.Builder setLabel(CharSequence);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Row implements androidx.car.app.model.Item {
+ method public androidx.car.app.model.CarIcon? getImage();
+ method public androidx.car.app.model.Metadata? getMetadata();
+ method public androidx.car.app.model.OnClickDelegate? getOnClickDelegate();
+ method public int getRowImageType();
+ method public java.util.List<androidx.car.app.model.CarText!> getTexts();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public androidx.car.app.model.Toggle? getToggle();
+ method public boolean isBrowsable();
+ method public androidx.car.app.model.Row row();
+ method public CharSequence yourBoat();
+ field public static final int IMAGE_TYPE_ICON = 4; // 0x4
+ field public static final int IMAGE_TYPE_LARGE = 2; // 0x2
+ field public static final int IMAGE_TYPE_SMALL = 1; // 0x1
+ }
+
+ public static final class Row.Builder {
+ ctor public Row.Builder();
+ method public androidx.car.app.model.Row.Builder addText(CharSequence);
+ method public androidx.car.app.model.Row.Builder addText(androidx.car.app.model.CarText);
+ method public androidx.car.app.model.Row build();
+ method public androidx.car.app.model.Row.Builder setBrowsable(boolean);
+ method public androidx.car.app.model.Row.Builder setImage(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.model.Row.Builder setImage(androidx.car.app.model.CarIcon, int);
+ method public androidx.car.app.model.Row.Builder setMetadata(androidx.car.app.model.Metadata);
+ method public androidx.car.app.model.Row.Builder setOnClickListener(androidx.car.app.model.OnClickListener);
+ method public androidx.car.app.model.Row.Builder setTitle(CharSequence);
+ method public androidx.car.app.model.Row.Builder setTitle(androidx.car.app.model.CarText);
+ method public androidx.car.app.model.Row.Builder setToggle(androidx.car.app.model.Toggle);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface SearchCallbackDelegate {
+ method public void sendSearchSubmitted(String, androidx.car.app.OnDoneCallback);
+ method public void sendSearchTextChanged(String, androidx.car.app.OnDoneCallback);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class SearchTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public String? getInitialSearchText();
+ method public androidx.car.app.model.ItemList? getItemList();
+ method public androidx.car.app.model.SearchCallbackDelegate getSearchCallbackDelegate();
+ method public String? getSearchHint();
+ method public boolean isLoading();
+ method public boolean isShowKeyboardByDefault();
+ }
+
+ public static final class SearchTemplate.Builder {
+ ctor public SearchTemplate.Builder(androidx.car.app.model.SearchTemplate.SearchCallback);
+ method public androidx.car.app.model.SearchTemplate build();
+ method public androidx.car.app.model.SearchTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.SearchTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.SearchTemplate.Builder setInitialSearchText(String);
+ method public androidx.car.app.model.SearchTemplate.Builder setItemList(androidx.car.app.model.ItemList);
+ method public androidx.car.app.model.SearchTemplate.Builder setLoading(boolean);
+ method public androidx.car.app.model.SearchTemplate.Builder setSearchHint(String);
+ method public androidx.car.app.model.SearchTemplate.Builder setShowKeyboardByDefault(boolean);
+ }
+
+ public static interface SearchTemplate.SearchCallback {
+ method public default void onSearchSubmitted(String);
+ method public default void onSearchTextChanged(String);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class SectionedItemList {
+ method public static androidx.car.app.model.SectionedItemList create(androidx.car.app.model.ItemList, CharSequence);
+ method public androidx.car.app.model.CarText getHeader();
+ method public androidx.car.app.model.ItemList getItemList();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface Template {
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class TemplateInfo {
+ ctor public TemplateInfo(Class<? extends androidx.car.app.model.Template>, String);
+ method public Class<? extends androidx.car.app.model.Template> getTemplateClass();
+ method public String getTemplateId();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class TemplateWrapper {
+ method public static androidx.car.app.model.TemplateWrapper copyOf(androidx.car.app.model.TemplateWrapper);
+ method public int getCurrentTaskStep();
+ method public String getId();
+ method public androidx.car.app.model.Template getTemplate();
+ method public java.util.List<androidx.car.app.model.TemplateInfo!> getTemplateInfosForScreenStack();
+ method public boolean isRefresh();
+ method public void setCurrentTaskStep(int);
+ method public void setId(String);
+ method public void setRefresh(boolean);
+ method public void setTemplate(androidx.car.app.model.Template);
+ method public static androidx.car.app.model.TemplateWrapper wrap(androidx.car.app.model.Template);
+ method public static androidx.car.app.model.TemplateWrapper wrap(androidx.car.app.model.Template, String);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Toggle {
+ method public androidx.car.app.model.OnCheckedChangeDelegate getOnCheckedChangeDelegate();
+ method public boolean isChecked();
+ }
+
+ public static final class Toggle.Builder {
+ ctor public Toggle.Builder(androidx.car.app.model.Toggle.OnCheckedChangeListener);
+ method public androidx.car.app.model.Toggle build();
+ method public androidx.car.app.model.Toggle.Builder setChecked(boolean);
+ }
+
+ public static interface Toggle.OnCheckedChangeListener {
+ method public void onCheckedChange(boolean);
+ }
+
+}
+
+package androidx.car.app.model.signin {
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public final class InputSignInMethod implements androidx.car.app.model.signin.SignInTemplate.SignInMethod {
+ method public androidx.car.app.model.CarText? getDefaultValue();
+ method public androidx.car.app.model.CarText? getErrorMessage();
+ method public androidx.car.app.model.CarText? getHint();
+ method public androidx.car.app.model.InputCallbackDelegate getInputCallbackDelegate();
+ method public int getInputType();
+ method public int getKeyboardType();
+ method public boolean isShowKeyboardByDefault();
+ field public static final int INPUT_TYPE_DEFAULT = 1; // 0x1
+ field public static final int INPUT_TYPE_PASSWORD = 2; // 0x2
+ field public static final int KEYBOARD_DEFAULT = 1; // 0x1
+ field public static final int KEYBOARD_EMAIL = 2; // 0x2
+ field public static final int KEYBOARD_NUMBER = 4; // 0x4
+ field public static final int KEYBOARD_PHONE = 3; // 0x3
+ }
+
+ public static final class InputSignInMethod.Builder {
+ ctor public InputSignInMethod.Builder(androidx.car.app.model.InputCallback);
+ method public androidx.car.app.model.signin.InputSignInMethod build();
+ method public androidx.car.app.model.signin.InputSignInMethod.Builder setDefaultValue(String);
+ method public androidx.car.app.model.signin.InputSignInMethod.Builder setErrorMessage(CharSequence);
+ method public androidx.car.app.model.signin.InputSignInMethod.Builder setHint(CharSequence);
+ method public androidx.car.app.model.signin.InputSignInMethod.Builder setInputType(int);
+ method public androidx.car.app.model.signin.InputSignInMethod.Builder setKeyboardType(int);
+ method public androidx.car.app.model.signin.InputSignInMethod.Builder setShowKeyboardByDefault(boolean);
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public final class PinSignInMethod implements androidx.car.app.model.signin.SignInTemplate.SignInMethod {
+ ctor public PinSignInMethod(CharSequence);
+ method public androidx.car.app.model.CarText getPinCode();
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public final class ProviderSignInMethod implements androidx.car.app.model.signin.SignInTemplate.SignInMethod {
+ ctor public ProviderSignInMethod(androidx.car.app.model.Action);
+ method public androidx.car.app.model.Action getAction();
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(4) public final class QRCodeSignInMethod implements androidx.car.app.model.signin.SignInTemplate.SignInMethod {
+ ctor public QRCodeSignInMethod(android.net.Uri);
+ method public android.net.Uri getUri();
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public final class SignInTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public java.util.List<androidx.car.app.model.Action!> getActions();
+ method public androidx.car.app.model.CarText? getAdditionalText();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.CarText? getInstructions();
+ method public androidx.car.app.model.signin.SignInTemplate.SignInMethod getSignInMethod();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public boolean isLoading();
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public static final class SignInTemplate.Builder {
+ ctor public SignInTemplate.Builder(androidx.car.app.model.signin.SignInTemplate.SignInMethod);
+ method public androidx.car.app.model.signin.SignInTemplate.Builder addAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.signin.SignInTemplate build();
+ method public androidx.car.app.model.signin.SignInTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.signin.SignInTemplate.Builder setAdditionalText(CharSequence);
+ method public androidx.car.app.model.signin.SignInTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.signin.SignInTemplate.Builder setInstructions(CharSequence);
+ method public androidx.car.app.model.signin.SignInTemplate.Builder setLoading(boolean);
+ method public androidx.car.app.model.signin.SignInTemplate.Builder setTitle(CharSequence);
+ }
+
+ public static interface SignInTemplate.SignInMethod {
+ }
+
+}
+
+package androidx.car.app.navigation {
+
+ public class NavigationManager implements androidx.car.app.managers.Manager {
+ method @MainThread public void clearNavigationManagerCallback();
+ method @MainThread public void navigationEnded();
+ method @MainThread public void navigationStarted();
+ method @MainThread public void setNavigationManagerCallback(androidx.car.app.navigation.NavigationManagerCallback);
+ method @MainThread public void setNavigationManagerCallback(java.util.concurrent.Executor, androidx.car.app.navigation.NavigationManagerCallback);
+ method @MainThread public void updateTrip(androidx.car.app.navigation.model.Trip);
+ }
+
+ public interface NavigationManagerCallback {
+ method public default void onAutoDriveEnabled();
+ method public default void onStopNavigation();
+ }
+
+}
+
+package androidx.car.app.navigation.model {
+
+ @androidx.car.app.annotations.CarProtocol public final class Destination {
+ method public androidx.car.app.model.CarText? getAddress();
+ method public androidx.car.app.model.CarIcon? getImage();
+ method public androidx.car.app.model.CarText? getName();
+ }
+
+ public static final class Destination.Builder {
+ ctor public Destination.Builder();
+ method public androidx.car.app.navigation.model.Destination build();
+ method public androidx.car.app.navigation.model.Destination.Builder setAddress(CharSequence);
+ method public androidx.car.app.navigation.model.Destination.Builder setImage(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.navigation.model.Destination.Builder setName(CharSequence);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Lane {
+ method public java.util.List<androidx.car.app.navigation.model.LaneDirection!> getDirections();
+ }
+
+ public static final class Lane.Builder {
+ ctor public Lane.Builder();
+ method public androidx.car.app.navigation.model.Lane.Builder addDirection(androidx.car.app.navigation.model.LaneDirection);
+ method public androidx.car.app.navigation.model.Lane build();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class LaneDirection {
+ method public static androidx.car.app.navigation.model.LaneDirection create(int, boolean);
+ method public int getShape();
+ method public boolean isRecommended();
+ field public static final int SHAPE_NORMAL_LEFT = 5; // 0x5
+ field public static final int SHAPE_NORMAL_RIGHT = 6; // 0x6
+ field public static final int SHAPE_SHARP_LEFT = 7; // 0x7
+ field public static final int SHAPE_SHARP_RIGHT = 8; // 0x8
+ field public static final int SHAPE_SLIGHT_LEFT = 3; // 0x3
+ field public static final int SHAPE_SLIGHT_RIGHT = 4; // 0x4
+ field public static final int SHAPE_STRAIGHT = 2; // 0x2
+ field public static final int SHAPE_UNKNOWN = 1; // 0x1
+ field public static final int SHAPE_U_TURN_LEFT = 9; // 0x9
+ field public static final int SHAPE_U_TURN_RIGHT = 10; // 0xa
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Maneuver {
+ method public androidx.car.app.model.CarIcon? getIcon();
+ method public int getRoundaboutExitAngle();
+ method public int getRoundaboutExitNumber();
+ method public int getType();
+ field public static final int TYPE_DEPART = 1; // 0x1
+ field public static final int TYPE_DESTINATION = 39; // 0x27
+ field public static final int TYPE_DESTINATION_LEFT = 41; // 0x29
+ field public static final int TYPE_DESTINATION_RIGHT = 42; // 0x2a
+ field public static final int TYPE_DESTINATION_STRAIGHT = 40; // 0x28
+ field public static final int TYPE_FERRY_BOAT = 37; // 0x25
+ field public static final int TYPE_FERRY_BOAT_LEFT = 47; // 0x2f
+ field public static final int TYPE_FERRY_BOAT_RIGHT = 48; // 0x30
+ field public static final int TYPE_FERRY_TRAIN = 38; // 0x26
+ field public static final int TYPE_FERRY_TRAIN_LEFT = 49; // 0x31
+ field public static final int TYPE_FERRY_TRAIN_RIGHT = 50; // 0x32
+ field public static final int TYPE_FORK_LEFT = 25; // 0x19
+ field public static final int TYPE_FORK_RIGHT = 26; // 0x1a
+ field public static final int TYPE_KEEP_LEFT = 3; // 0x3
+ field public static final int TYPE_KEEP_RIGHT = 4; // 0x4
+ field public static final int TYPE_MERGE_LEFT = 27; // 0x1b
+ field public static final int TYPE_MERGE_RIGHT = 28; // 0x1c
+ field public static final int TYPE_MERGE_SIDE_UNSPECIFIED = 29; // 0x1d
+ field public static final int TYPE_NAME_CHANGE = 2; // 0x2
+ field public static final int TYPE_OFF_RAMP_NORMAL_LEFT = 23; // 0x17
+ field public static final int TYPE_OFF_RAMP_NORMAL_RIGHT = 24; // 0x18
+ field public static final int TYPE_OFF_RAMP_SLIGHT_LEFT = 21; // 0x15
+ field public static final int TYPE_OFF_RAMP_SLIGHT_RIGHT = 22; // 0x16
+ field public static final int TYPE_ON_RAMP_NORMAL_LEFT = 15; // 0xf
+ field public static final int TYPE_ON_RAMP_NORMAL_RIGHT = 16; // 0x10
+ field public static final int TYPE_ON_RAMP_SHARP_LEFT = 17; // 0x11
+ field public static final int TYPE_ON_RAMP_SHARP_RIGHT = 18; // 0x12
+ field public static final int TYPE_ON_RAMP_SLIGHT_LEFT = 13; // 0xd
+ field public static final int TYPE_ON_RAMP_SLIGHT_RIGHT = 14; // 0xe
+ field public static final int TYPE_ON_RAMP_U_TURN_LEFT = 19; // 0x13
+ field public static final int TYPE_ON_RAMP_U_TURN_RIGHT = 20; // 0x14
+ field public static final int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CCW = 34; // 0x22
+ field public static final int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CCW_WITH_ANGLE = 35; // 0x23
+ field public static final int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CW = 32; // 0x20
+ field public static final int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CW_WITH_ANGLE = 33; // 0x21
+ field public static final int TYPE_ROUNDABOUT_ENTER_CCW = 45; // 0x2d
+ field public static final int TYPE_ROUNDABOUT_ENTER_CW = 43; // 0x2b
+ field public static final int TYPE_ROUNDABOUT_EXIT_CCW = 46; // 0x2e
+ field public static final int TYPE_ROUNDABOUT_EXIT_CW = 44; // 0x2c
+ field public static final int TYPE_STRAIGHT = 36; // 0x24
+ field public static final int TYPE_TURN_NORMAL_LEFT = 7; // 0x7
+ field public static final int TYPE_TURN_NORMAL_RIGHT = 8; // 0x8
+ field public static final int TYPE_TURN_SHARP_LEFT = 9; // 0x9
+ field public static final int TYPE_TURN_SHARP_RIGHT = 10; // 0xa
+ field public static final int TYPE_TURN_SLIGHT_LEFT = 5; // 0x5
+ field public static final int TYPE_TURN_SLIGHT_RIGHT = 6; // 0x6
+ field public static final int TYPE_UNKNOWN = 0; // 0x0
+ field public static final int TYPE_U_TURN_LEFT = 11; // 0xb
+ field public static final int TYPE_U_TURN_RIGHT = 12; // 0xc
+ }
+
+ public static final class Maneuver.Builder {
+ ctor public Maneuver.Builder(int);
+ method public androidx.car.app.navigation.model.Maneuver build();
+ method public androidx.car.app.navigation.model.Maneuver.Builder setIcon(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.navigation.model.Maneuver.Builder setRoundaboutExitAngle(@IntRange(from=1, to=360) int);
+ method public androidx.car.app.navigation.model.Maneuver.Builder setRoundaboutExitNumber(@IntRange(from=1) int);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class MessageInfo implements androidx.car.app.navigation.model.NavigationTemplate.NavigationInfo {
+ method public androidx.car.app.model.CarIcon? getImage();
+ method public androidx.car.app.model.CarText? getText();
+ method public androidx.car.app.model.CarText? getTitle();
+ }
+
+ public static final class MessageInfo.Builder {
+ ctor public MessageInfo.Builder(CharSequence);
+ ctor public MessageInfo.Builder(androidx.car.app.model.CarText);
+ method public androidx.car.app.navigation.model.MessageInfo build();
+ method public androidx.car.app.navigation.model.MessageInfo.Builder setImage(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.navigation.model.MessageInfo.Builder setText(CharSequence);
+ method public androidx.car.app.navigation.model.MessageInfo.Builder setText(androidx.car.app.model.CarText);
+ method public androidx.car.app.navigation.model.MessageInfo.Builder setTitle(CharSequence);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class NavigationTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.CarColor? getBackgroundColor();
+ method public androidx.car.app.navigation.model.TravelEstimate? getDestinationTravelEstimate();
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.model.ActionStrip? getMapActionStrip();
+ method public androidx.car.app.navigation.model.NavigationTemplate.NavigationInfo? getNavigationInfo();
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.navigation.model.PanModeDelegate? getPanModeDelegate();
+ method @Deprecated @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.model.Toggle? getPanModeToggle();
+ }
+
+ public static final class NavigationTemplate.Builder {
+ ctor public NavigationTemplate.Builder();
+ method public androidx.car.app.navigation.model.NavigationTemplate build();
+ method public androidx.car.app.navigation.model.NavigationTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.navigation.model.NavigationTemplate.Builder setBackgroundColor(androidx.car.app.model.CarColor);
+ method public androidx.car.app.navigation.model.NavigationTemplate.Builder setDestinationTravelEstimate(androidx.car.app.navigation.model.TravelEstimate);
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.navigation.model.NavigationTemplate.Builder setMapActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.navigation.model.NavigationTemplate.Builder setNavigationInfo(androidx.car.app.navigation.model.NavigationTemplate.NavigationInfo);
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.navigation.model.NavigationTemplate.Builder setPanModeListener(androidx.car.app.navigation.model.PanModeListener);
+ }
+
+ public static interface NavigationTemplate.NavigationInfo {
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(2) public interface PanModeDelegate {
+ method public void sendPanModeChanged(boolean, androidx.car.app.OnDoneCallback);
+ }
+
+ public interface PanModeListener {
+ method public void onPanModeChanged(boolean);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class PlaceListNavigationTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.ItemList? getItemList();
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.model.ActionStrip? getMapActionStrip();
+ method @androidx.car.app.annotations.ExperimentalCarApi public androidx.car.app.model.OnContentRefreshDelegate? getOnContentRefreshDelegate();
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.navigation.model.PanModeDelegate? getPanModeDelegate();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public boolean isLoading();
+ }
+
+ public static final class PlaceListNavigationTemplate.Builder {
+ ctor public PlaceListNavigationTemplate.Builder();
+ method public androidx.car.app.navigation.model.PlaceListNavigationTemplate build();
+ method public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setItemList(androidx.car.app.model.ItemList);
+ method public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setLoading(boolean);
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setMapActionStrip(androidx.car.app.model.ActionStrip);
+ method @androidx.car.app.annotations.ExperimentalCarApi public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setOnContentRefreshListener(androidx.car.app.model.OnContentRefreshListener);
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setPanModeListener(androidx.car.app.navigation.model.PanModeListener);
+ method public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setTitle(CharSequence);
+ method public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setTitle(androidx.car.app.model.CarText);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class RoutePreviewNavigationTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.ItemList? getItemList();
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.model.ActionStrip? getMapActionStrip();
+ method public androidx.car.app.model.Action? getNavigateAction();
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.navigation.model.PanModeDelegate? getPanModeDelegate();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public boolean isLoading();
+ }
+
+ public static final class RoutePreviewNavigationTemplate.Builder {
+ ctor public RoutePreviewNavigationTemplate.Builder();
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate build();
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setItemList(androidx.car.app.model.ItemList);
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setLoading(boolean);
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setMapActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setNavigateAction(androidx.car.app.model.Action);
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setPanModeListener(androidx.car.app.navigation.model.PanModeListener);
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setTitle(CharSequence);
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setTitle(androidx.car.app.model.CarText);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class RoutingInfo implements androidx.car.app.navigation.model.NavigationTemplate.NavigationInfo {
+ method public androidx.car.app.model.Distance? getCurrentDistance();
+ method public androidx.car.app.navigation.model.Step? getCurrentStep();
+ method public androidx.car.app.model.CarIcon? getJunctionImage();
+ method public androidx.car.app.navigation.model.Step? getNextStep();
+ method public boolean isLoading();
+ }
+
+ public static final class RoutingInfo.Builder {
+ ctor public RoutingInfo.Builder();
+ method public androidx.car.app.navigation.model.RoutingInfo build();
+ method public androidx.car.app.navigation.model.RoutingInfo.Builder setCurrentStep(androidx.car.app.navigation.model.Step, androidx.car.app.model.Distance);
+ method public androidx.car.app.navigation.model.RoutingInfo.Builder setJunctionImage(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.navigation.model.RoutingInfo.Builder setLoading(boolean);
+ method public androidx.car.app.navigation.model.RoutingInfo.Builder setNextStep(androidx.car.app.navigation.model.Step);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Step {
+ method public androidx.car.app.model.CarText? getCue();
+ method public java.util.List<androidx.car.app.navigation.model.Lane!> getLanes();
+ method public androidx.car.app.model.CarIcon? getLanesImage();
+ method public androidx.car.app.navigation.model.Maneuver? getManeuver();
+ method public androidx.car.app.model.CarText? getRoad();
+ }
+
+ public static final class Step.Builder {
+ ctor public Step.Builder();
+ ctor public Step.Builder(CharSequence);
+ ctor public Step.Builder(androidx.car.app.model.CarText);
+ method public androidx.car.app.navigation.model.Step.Builder addLane(androidx.car.app.navigation.model.Lane);
+ method public androidx.car.app.navigation.model.Step build();
+ method public androidx.car.app.navigation.model.Step.Builder setCue(CharSequence);
+ method public androidx.car.app.navigation.model.Step.Builder setLanesImage(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.navigation.model.Step.Builder setManeuver(androidx.car.app.navigation.model.Maneuver);
+ method public androidx.car.app.navigation.model.Step.Builder setRoad(CharSequence);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class TravelEstimate {
+ method public androidx.car.app.model.DateTimeWithZone? getArrivalTimeAtDestination();
+ method public androidx.car.app.model.Distance? getRemainingDistance();
+ method public androidx.car.app.model.CarColor? getRemainingDistanceColor();
+ method public androidx.car.app.model.CarColor? getRemainingTimeColor();
+ method public long getRemainingTimeSeconds();
+ field public static final long REMAINING_TIME_UNKNOWN = -1L; // 0xffffffffffffffffL
+ }
+
+ public static final class TravelEstimate.Builder {
+ ctor public TravelEstimate.Builder(androidx.car.app.model.Distance, androidx.car.app.model.DateTimeWithZone);
+ ctor @RequiresApi(26) public TravelEstimate.Builder(androidx.car.app.model.Distance, java.time.ZonedDateTime);
+ method public androidx.car.app.navigation.model.TravelEstimate build();
+ method public androidx.car.app.navigation.model.TravelEstimate.Builder setRemainingDistanceColor(androidx.car.app.model.CarColor);
+ method @RequiresApi(26) public androidx.car.app.navigation.model.TravelEstimate.Builder setRemainingTime(java.time.Duration);
+ method public androidx.car.app.navigation.model.TravelEstimate.Builder setRemainingTimeColor(androidx.car.app.model.CarColor);
+ method public androidx.car.app.navigation.model.TravelEstimate.Builder setRemainingTimeSeconds(@IntRange(from=0xffffffff) long);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Trip {
+ method public androidx.car.app.model.CarText? getCurrentRoad();
+ method public java.util.List<androidx.car.app.navigation.model.TravelEstimate!> getDestinationTravelEstimates();
+ method public java.util.List<androidx.car.app.navigation.model.Destination!> getDestinations();
+ method public java.util.List<androidx.car.app.navigation.model.TravelEstimate!> getStepTravelEstimates();
+ method public java.util.List<androidx.car.app.navigation.model.Step!> getSteps();
+ method public boolean isLoading();
+ }
+
+ public static final class Trip.Builder {
+ ctor public Trip.Builder();
+ method public androidx.car.app.navigation.model.Trip.Builder addDestination(androidx.car.app.navigation.model.Destination, androidx.car.app.navigation.model.TravelEstimate);
+ method public androidx.car.app.navigation.model.Trip.Builder addStep(androidx.car.app.navigation.model.Step, androidx.car.app.navigation.model.TravelEstimate);
+ method public androidx.car.app.navigation.model.Trip build();
+ method public androidx.car.app.navigation.model.Trip.Builder setCurrentRoad(CharSequence);
+ method public androidx.car.app.navigation.model.Trip.Builder setLoading(boolean);
+ }
+
+}
+
+package androidx.car.app.notification {
+
+ public final class CarAppExtender implements androidx.core.app.NotificationCompat.Extender {
+ ctor public CarAppExtender(android.app.Notification);
+ method public androidx.core.app.NotificationCompat.Builder extend(androidx.core.app.NotificationCompat.Builder);
+ method public java.util.List<android.app.Notification.Action!> getActions();
+ method public String? getChannelId();
+ method public androidx.car.app.model.CarColor? getColor();
+ method public android.app.PendingIntent? getContentIntent();
+ method public CharSequence? getContentText();
+ method public CharSequence? getContentTitle();
+ method public android.app.PendingIntent? getDeleteIntent();
+ method public int getImportance();
+ method public android.graphics.Bitmap? getLargeIcon();
+ method @DrawableRes public int getSmallIcon();
+ method public static boolean isExtended(android.app.Notification);
+ }
+
+ public static final class CarAppExtender.Builder {
+ ctor public CarAppExtender.Builder();
+ method public androidx.car.app.notification.CarAppExtender.Builder addAction(@DrawableRes int, CharSequence, android.app.PendingIntent);
+ method public androidx.car.app.notification.CarAppExtender build();
+ method public androidx.car.app.notification.CarAppExtender.Builder setChannelId(String);
+ method public androidx.car.app.notification.CarAppExtender.Builder setColor(androidx.car.app.model.CarColor);
+ method public androidx.car.app.notification.CarAppExtender.Builder setContentIntent(android.app.PendingIntent);
+ method public androidx.car.app.notification.CarAppExtender.Builder setContentText(CharSequence);
+ method public androidx.car.app.notification.CarAppExtender.Builder setContentTitle(CharSequence);
+ method public androidx.car.app.notification.CarAppExtender.Builder setDeleteIntent(android.app.PendingIntent);
+ method public androidx.car.app.notification.CarAppExtender.Builder setImportance(int);
+ method public androidx.car.app.notification.CarAppExtender.Builder setLargeIcon(android.graphics.Bitmap);
+ method public androidx.car.app.notification.CarAppExtender.Builder setSmallIcon(int);
+ }
+
+ public final class CarNotificationManager {
+ method public boolean areNotificationsEnabled();
+ method public void cancel(int);
+ method public void cancel(String?, int);
+ method public void cancelAll();
+ method public void createNotificationChannel(androidx.core.app.NotificationChannelCompat);
+ method public void createNotificationChannelGroup(androidx.core.app.NotificationChannelGroupCompat);
+ method public void createNotificationChannelGroups(java.util.List<androidx.core.app.NotificationChannelGroupCompat!>);
+ method public void createNotificationChannels(java.util.List<androidx.core.app.NotificationChannelCompat!>);
+ method public void deleteNotificationChannel(String);
+ method public void deleteNotificationChannelGroup(String);
+ method public void deleteUnlistedNotificationChannels(java.util.Collection<java.lang.String!>);
+ method public static androidx.car.app.notification.CarNotificationManager from(android.content.Context);
+ method public static java.util.Set<java.lang.String!> getEnabledListenerPackages(android.content.Context);
+ method public int getImportance();
+ method public androidx.core.app.NotificationChannelCompat? getNotificationChannel(String);
+ method public androidx.core.app.NotificationChannelCompat? getNotificationChannel(String, String);
+ method public androidx.core.app.NotificationChannelGroupCompat? getNotificationChannelGroup(String);
+ method public java.util.List<androidx.core.app.NotificationChannelGroupCompat!> getNotificationChannelGroups();
+ method public java.util.List<androidx.core.app.NotificationChannelCompat!> getNotificationChannels();
+ method public void notify(int, androidx.core.app.NotificationCompat.Builder);
+ method public void notify(String?, int, androidx.core.app.NotificationCompat.Builder);
+ }
+
+ public final class CarPendingIntent {
+ method public static android.app.PendingIntent getCarApp(android.content.Context, int, android.content.Intent, int);
+ }
+
+}
+
+package androidx.car.app.serialization {
+
+ public final class Bundleable implements android.os.Parcelable {
+ method public static androidx.car.app.serialization.Bundleable create(Object) throws androidx.car.app.serialization.BundlerException;
+ method public int describeContents();
+ method public Object get() throws androidx.car.app.serialization.BundlerException;
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<androidx.car.app.serialization.Bundleable!> CREATOR;
+ }
+
+ public class BundlerException extends java.lang.Exception {
+ ctor public BundlerException(String?, Throwable);
+ ctor public BundlerException(String?);
+ }
+
+}
+
+package androidx.car.app.validation {
+
+ public final class HostValidator {
+ method public java.util.Map<java.lang.String!,java.util.List<java.lang.String!>!> getAllowedHosts();
+ method public boolean isValidHost(androidx.car.app.HostInfo);
+ field public static final androidx.car.app.validation.HostValidator ALLOW_ALL_HOSTS_VALIDATOR;
+ field public static final String TEMPLATE_RENDERER_PERMISSION = "android.car.permission.TEMPLATE_RENDERER";
+ }
+
+ public static final class HostValidator.Builder {
+ ctor public HostValidator.Builder(android.content.Context);
+ method public androidx.car.app.validation.HostValidator.Builder addAllowedHost(String, String);
+ method public androidx.car.app.validation.HostValidator.Builder addAllowedHosts(@ArrayRes int);
+ method public androidx.car.app.validation.HostValidator build();
+ }
+
+}
+
+package androidx.car.app.versioning {
+
+ public final class CarAppApiLevels {
+ method public static int getLatest();
+ method public static int getOldest();
+ field public static final int LEVEL_1 = 1; // 0x1
+ field public static final int LEVEL_2 = 2; // 0x2
+ field public static final int LEVEL_3 = 3; // 0x3
+ field public static final int LEVEL_4 = 4; // 0x4
+ }
+
+}
+
diff --git a/car/app/app/api/public_plus_experimental_current.txt b/car/app/app/api/public_plus_experimental_current.txt
index cc663f6..f0bcdbc 100644
--- a/car/app/app/api/public_plus_experimental_current.txt
+++ b/car/app/app/api/public_plus_experimental_current.txt
@@ -762,6 +762,14 @@
method public void onClick();
}
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.ExperimentalCarApi public interface OnContentRefreshDelegate {
+ method public void sendContentRefreshRequested(androidx.car.app.OnDoneCallback);
+ }
+
+ @androidx.car.app.annotations.ExperimentalCarApi public interface OnContentRefreshListener {
+ method public void onContentRefreshRequested();
+ }
+
@androidx.car.app.annotations.CarProtocol public interface OnItemVisibilityChangedDelegate {
method public void sendItemVisibilityChanged(int, int, androidx.car.app.OnDoneCallback);
}
@@ -823,6 +831,7 @@
method public androidx.car.app.model.Place? getAnchor();
method public androidx.car.app.model.Action? getHeaderAction();
method public androidx.car.app.model.ItemList? getItemList();
+ method @androidx.car.app.annotations.ExperimentalCarApi public androidx.car.app.model.OnContentRefreshDelegate? getOnContentRefreshDelegate();
method public androidx.car.app.model.CarText? getTitle();
method public boolean isCurrentLocationEnabled();
method public boolean isLoading();
@@ -837,6 +846,7 @@
method public androidx.car.app.model.PlaceListMapTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
method public androidx.car.app.model.PlaceListMapTemplate.Builder setItemList(androidx.car.app.model.ItemList);
method public androidx.car.app.model.PlaceListMapTemplate.Builder setLoading(boolean);
+ method @androidx.car.app.annotations.ExperimentalCarApi public androidx.car.app.model.PlaceListMapTemplate.Builder setOnContentRefreshListener(androidx.car.app.model.OnContentRefreshListener);
method public androidx.car.app.model.PlaceListMapTemplate.Builder setTitle(CharSequence);
method public androidx.car.app.model.PlaceListMapTemplate.Builder setTitle(androidx.car.app.model.CarText);
}
@@ -1218,6 +1228,7 @@
method public androidx.car.app.model.Action? getHeaderAction();
method public androidx.car.app.model.ItemList? getItemList();
method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.model.ActionStrip? getMapActionStrip();
+ method @androidx.car.app.annotations.ExperimentalCarApi public androidx.car.app.model.OnContentRefreshDelegate? getOnContentRefreshDelegate();
method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.navigation.model.PanModeDelegate? getPanModeDelegate();
method public androidx.car.app.model.CarText? getTitle();
method public boolean isLoading();
@@ -1231,6 +1242,7 @@
method public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setItemList(androidx.car.app.model.ItemList);
method public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setLoading(boolean);
method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setMapActionStrip(androidx.car.app.model.ActionStrip);
+ method @androidx.car.app.annotations.ExperimentalCarApi public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setOnContentRefreshListener(androidx.car.app.model.OnContentRefreshListener);
method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setPanModeListener(androidx.car.app.navigation.model.PanModeListener);
method public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setTitle(CharSequence);
method public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setTitle(androidx.car.app.model.CarText);
diff --git a/car/app/app/api/res-1.2.0-beta01.txt b/car/app/app/api/res-1.2.0-beta01.txt
new file mode 100644
index 0000000..686fc80
--- /dev/null
+++ b/car/app/app/api/res-1.2.0-beta01.txt
@@ -0,0 +1,5 @@
+attr carColorPrimary
+attr carColorPrimaryDark
+attr carColorSecondary
+attr carColorSecondaryDark
+attr carPermissionActivityLayout
diff --git a/car/app/app/api/res-1.2.0-beta02.txt b/car/app/app/api/res-1.2.0-beta02.txt
new file mode 100644
index 0000000..686fc80
--- /dev/null
+++ b/car/app/app/api/res-1.2.0-beta02.txt
@@ -0,0 +1,5 @@
+attr carColorPrimary
+attr carColorPrimaryDark
+attr carColorSecondary
+attr carColorSecondaryDark
+attr carPermissionActivityLayout
diff --git a/car/app/app/api/restricted_1.2.0-beta01.txt b/car/app/app/api/restricted_1.2.0-beta01.txt
new file mode 100644
index 0000000..a6a92f8
--- /dev/null
+++ b/car/app/app/api/restricted_1.2.0-beta01.txt
@@ -0,0 +1,1441 @@
+// Signature format: 4.0
+package androidx.car.app {
+
+ @androidx.car.app.annotations.CarProtocol public final class AppInfo {
+ ctor @VisibleForTesting public AppInfo(int, int, String);
+ method public int getLatestCarAppApiLevel();
+ method public String getLibraryDisplayVersion();
+ method public int getMinCarAppApiLevel();
+ field public static final String MIN_API_LEVEL_METADATA_KEY = "androidx.car.app.minCarApiLevel";
+ }
+
+ public class AppManager implements androidx.car.app.managers.Manager {
+ method public void invalidate();
+ method public void setSurfaceCallback(androidx.car.app.SurfaceCallback?);
+ method public void showToast(CharSequence, int);
+ }
+
+ public final class CarAppPermission {
+ method public static void checkHasLibraryPermission(android.content.Context, String);
+ method public static void checkHasPermission(android.content.Context, String);
+ field public static final String ACCESS_SURFACE = "androidx.car.app.ACCESS_SURFACE";
+ field public static final String MAP_TEMPLATES = "androidx.car.app.MAP_TEMPLATES";
+ field public static final String NAVIGATION_TEMPLATES = "androidx.car.app.NAVIGATION_TEMPLATES";
+ }
+
+ public abstract class CarAppService extends android.app.Service {
+ ctor public CarAppService();
+ method public abstract androidx.car.app.validation.HostValidator createHostValidator();
+ method @CallSuper public final void dump(java.io.FileDescriptor, java.io.PrintWriter, String![]?);
+ method public final androidx.car.app.Session? getCurrentSession();
+ method public final androidx.car.app.HostInfo? getHostInfo();
+ method @CallSuper public final android.os.IBinder onBind(android.content.Intent);
+ method public abstract androidx.car.app.Session onCreateSession();
+ method public final boolean onUnbind(android.content.Intent);
+ field public static final String CATEGORY_CHARGING_APP = "androidx.car.app.category.CHARGING";
+ field public static final String CATEGORY_NAVIGATION_APP = "androidx.car.app.category.NAVIGATION";
+ field public static final String CATEGORY_PARKING_APP = "androidx.car.app.category.PARKING";
+ field public static final String SERVICE_INTERFACE = "androidx.car.app.CarAppService";
+ }
+
+ public class CarContext extends android.content.ContextWrapper {
+ method public void finishCarApp();
+ method @androidx.car.app.annotations.RequiresCarApi(2) public android.content.ComponentName? getCallingComponent();
+ method public int getCarAppApiLevel();
+ method public Object getCarService(String);
+ method public <T> T getCarService(Class<T!>);
+ method public String getCarServiceName(Class<?>);
+ method public androidx.car.app.HostInfo? getHostInfo();
+ method public androidx.activity.OnBackPressedDispatcher getOnBackPressedDispatcher();
+ method public boolean isDarkMode();
+ method public void requestPermissions(java.util.List<java.lang.String!>, androidx.car.app.OnRequestPermissionsListener);
+ method public void requestPermissions(java.util.List<java.lang.String!>, java.util.concurrent.Executor, androidx.car.app.OnRequestPermissionsListener);
+ method @androidx.car.app.annotations.RequiresCarApi(2) public void setCarAppResult(int, android.content.Intent?);
+ method public void startCarApp(android.content.Intent);
+ method @Deprecated public static void startCarApp(android.content.Intent, android.content.Intent);
+ field public static final String ACTION_NAVIGATE = "androidx.car.app.action.NAVIGATE";
+ field public static final String APP_SERVICE = "app";
+ field public static final String CAR_SERVICE = "car";
+ field @androidx.car.app.annotations.RequiresCarApi(2) public static final String CONSTRAINT_SERVICE = "constraints";
+ field public static final String EXTRA_START_CAR_APP_BINDER_KEY = "androidx.car.app.extra.START_CAR_APP_BINDER_KEY";
+ field @androidx.car.app.annotations.RequiresCarApi(3) public static final String HARDWARE_SERVICE = "hardware";
+ field public static final String NAVIGATION_SERVICE = "navigation";
+ field public static final String SCREEN_SERVICE = "screen";
+ }
+
+ public final class CarToast {
+ method public static androidx.car.app.CarToast makeText(androidx.car.app.CarContext, @StringRes int, int);
+ method public static androidx.car.app.CarToast makeText(androidx.car.app.CarContext, CharSequence, int);
+ method public void setDuration(int);
+ method public void setText(@StringRes int);
+ method public void setText(CharSequence);
+ method public void show();
+ field public static final int LENGTH_LONG = 1; // 0x1
+ field public static final int LENGTH_SHORT = 0; // 0x0
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class FailureResponse {
+ ctor public FailureResponse(Throwable);
+ method public int getErrorType();
+ method public String getStackTrace();
+ field public static final int BUNDLER_EXCEPTION = 1; // 0x1
+ field public static final int ILLEGAL_STATE_EXCEPTION = 2; // 0x2
+ field public static final int INVALID_PARAMETER_EXCEPTION = 3; // 0x3
+ field public static final int REMOTE_EXCEPTION = 6; // 0x6
+ field public static final int RUNTIME_EXCEPTION = 5; // 0x5
+ field public static final int SECURITY_EXCEPTION = 4; // 0x4
+ field public static final int UNKNOWN_ERROR = 0; // 0x0
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class HandshakeInfo {
+ ctor public HandshakeInfo(String, int);
+ method public int getHostCarAppApiLevel();
+ method public String getHostPackageName();
+ }
+
+ public final class HostException extends java.lang.RuntimeException {
+ ctor public HostException(String);
+ ctor public HostException(String, Throwable);
+ ctor public HostException(Throwable);
+ }
+
+ public final class HostInfo {
+ ctor public HostInfo(String, int);
+ method public String getPackageName();
+ method public int getUid();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface OnDoneCallback {
+ method public default void onFailure(androidx.car.app.serialization.Bundleable);
+ method public default void onSuccess(androidx.car.app.serialization.Bundleable?);
+ }
+
+ public interface OnRequestPermissionsListener {
+ method public void onRequestPermissionsResult(java.util.List<java.lang.String!>, java.util.List<java.lang.String!>);
+ }
+
+ public interface OnScreenResultListener {
+ method public void onScreenResult(Object?);
+ }
+
+ public abstract class Screen implements androidx.lifecycle.LifecycleOwner {
+ ctor protected Screen(androidx.car.app.CarContext);
+ method public final void finish();
+ method public final androidx.car.app.CarContext getCarContext();
+ method public final androidx.lifecycle.Lifecycle getLifecycle();
+ method public String? getMarker();
+ method public final androidx.car.app.ScreenManager getScreenManager();
+ method public final void invalidate();
+ method public abstract androidx.car.app.model.Template onGetTemplate();
+ method public void setMarker(String?);
+ method public void setResult(Object?);
+ }
+
+ @MainThread public class ScreenManager implements androidx.car.app.managers.Manager {
+ method public int getStackSize();
+ method public androidx.car.app.Screen getTop();
+ method public void pop();
+ method public void popTo(String);
+ method public void popToRoot();
+ method public void push(androidx.car.app.Screen);
+ method public void pushForResult(androidx.car.app.Screen, androidx.car.app.OnScreenResultListener);
+ method public void remove(androidx.car.app.Screen);
+ }
+
+ public abstract class Session implements androidx.lifecycle.LifecycleOwner {
+ ctor public Session();
+ method public final androidx.car.app.CarContext getCarContext();
+ method public androidx.lifecycle.Lifecycle getLifecycle();
+ method public void onCarConfigurationChanged(android.content.res.Configuration);
+ method public abstract androidx.car.app.Screen onCreateScreen(android.content.Intent);
+ method public void onNewIntent(android.content.Intent);
+ }
+
+ public interface SurfaceCallback {
+ method @androidx.car.app.annotations.RequiresCarApi(2) public default void onFling(float, float);
+ method @androidx.car.app.annotations.RequiresCarApi(2) public default void onScale(float, float, float);
+ method @androidx.car.app.annotations.RequiresCarApi(2) public default void onScroll(float, float);
+ method public default void onStableAreaChanged(android.graphics.Rect);
+ method public default void onSurfaceAvailable(androidx.car.app.SurfaceContainer);
+ method public default void onSurfaceDestroyed(androidx.car.app.SurfaceContainer);
+ method public default void onVisibleAreaChanged(android.graphics.Rect);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class SurfaceContainer {
+ ctor public SurfaceContainer(android.view.Surface?, int, int, int);
+ method public int getDpi();
+ method public int getHeight();
+ method public android.view.Surface? getSurface();
+ method public int getWidth();
+ }
+
+}
+
+package androidx.car.app.annotations {
+
+ @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) @java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE, java.lang.annotation.ElementType.PARAMETER}) public @interface CarProtocol {
+ }
+
+ @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE, java.lang.annotation.ElementType.CONSTRUCTOR, java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.METHOD}) public @interface RequiresCarApi {
+ method public abstract int value();
+ }
+
+}
+
+package androidx.car.app.connection {
+
+ public final class CarConnection {
+ ctor public CarConnection(android.content.Context);
+ method public androidx.lifecycle.LiveData<java.lang.Integer!> getType();
+ field public static final String ACTION_CAR_CONNECTION_UPDATED = "androidx.car.app.connection.action.CAR_CONNECTION_UPDATED";
+ field public static final String CAR_CONNECTION_STATE = "CarConnectionState";
+ field public static final int CONNECTION_TYPE_NATIVE = 1; // 0x1
+ field public static final int CONNECTION_TYPE_NOT_CONNECTED = 0; // 0x0
+ field public static final int CONNECTION_TYPE_PROJECTION = 2; // 0x2
+ }
+
+}
+
+package androidx.car.app.constraints {
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public class ConstraintManager implements androidx.car.app.managers.Manager {
+ method public int getContentLimit(int);
+ field public static final int CONTENT_LIMIT_TYPE_GRID = 1; // 0x1
+ field public static final int CONTENT_LIMIT_TYPE_LIST = 0; // 0x0
+ field public static final int CONTENT_LIMIT_TYPE_PANE = 4; // 0x4
+ field public static final int CONTENT_LIMIT_TYPE_PLACE_LIST = 2; // 0x2
+ field public static final int CONTENT_LIMIT_TYPE_ROUTE_LIST = 3; // 0x3
+ }
+
+}
+
+package androidx.car.app.hardware {
+
+ @MainThread @androidx.car.app.annotations.RequiresCarApi(3) public interface CarHardwareManager extends androidx.car.app.managers.Manager {
+ method public default androidx.car.app.hardware.info.CarInfo getCarInfo();
+ method public default androidx.car.app.hardware.info.CarSensors getCarSensors();
+ }
+
+}
+
+package androidx.car.app.hardware.common {
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class CarUnit {
+ method public static String toString(int);
+ field public static final int KILOMETER = 3; // 0x3
+ field public static final int KILOMETERS_PER_HOUR = 102; // 0x66
+ field public static final int METER = 2; // 0x2
+ field public static final int METERS_PER_SEC = 101; // 0x65
+ field public static final int MILE = 4; // 0x4
+ field public static final int MILES_PER_HOUR = 103; // 0x67
+ field public static final int MILLIMETER = 1; // 0x1
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class CarValue<T> {
+ ctor public CarValue(T?, long, int);
+ method public int getStatus();
+ method public long getTimestampMillis();
+ method public T? getValue();
+ field public static final int STATUS_SUCCESS = 1; // 0x1
+ field public static final int STATUS_UNAVAILABLE = 3; // 0x3
+ field public static final int STATUS_UNIMPLEMENTED = 2; // 0x2
+ field public static final int STATUS_UNKNOWN = 0; // 0x0
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public interface OnCarDataAvailableListener<T> {
+ method public void onCarDataAvailable(T);
+ }
+
+}
+
+package androidx.car.app.hardware.info {
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class Accelerometer {
+ ctor public Accelerometer(androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Float!>!>);
+ method public androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Float!>!> getForces();
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class CarHardwareLocation {
+ ctor public CarHardwareLocation(androidx.car.app.hardware.common.CarValue<android.location.Location!>);
+ method public androidx.car.app.hardware.common.CarValue<android.location.Location!> getLocation();
+ }
+
+ @MainThread @androidx.car.app.annotations.RequiresCarApi(3) public interface CarInfo {
+ method public void addEnergyLevelListener(java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.EnergyLevel!>);
+ method public void addMileageListener(java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Mileage!>);
+ method public void addSpeedListener(java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Speed!>);
+ method public void addTollListener(java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.TollCard!>);
+ method public void fetchEnergyProfile(java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.EnergyProfile!>);
+ method public void fetchModel(java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Model!>);
+ method public void removeEnergyLevelListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.EnergyLevel!>);
+ method public void removeMileageListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Mileage!>);
+ method public void removeSpeedListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Speed!>);
+ method public void removeTollListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.TollCard!>);
+ }
+
+ @MainThread @androidx.car.app.annotations.RequiresCarApi(3) public interface CarSensors {
+ method public void addAccelerometerListener(int, java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Accelerometer!>);
+ method public void addCarHardwareLocationListener(int, java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.CarHardwareLocation!>);
+ method public void addCompassListener(int, java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Compass!>);
+ method public void addGyroscopeListener(int, java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Gyroscope!>);
+ method public void removeAccelerometerListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Accelerometer!>);
+ method public void removeCarHardwareLocationListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.CarHardwareLocation!>);
+ method public void removeCompassListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Compass!>);
+ method public void removeGyroscopeListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Gyroscope!>);
+ field public static final int UPDATE_RATE_FASTEST = 3; // 0x3
+ field public static final int UPDATE_RATE_NORMAL = 1; // 0x1
+ field public static final int UPDATE_RATE_UI = 2; // 0x2
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class Compass {
+ ctor public Compass(androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Float!>!>);
+ method public androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Float!>!> getOrientations();
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class EnergyLevel {
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Float!> getBatteryPercent();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Integer!> getDistanceDisplayUnit();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Boolean!> getEnergyIsLow();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Float!> getFuelPercent();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Float!> getRangeRemainingMeters();
+ }
+
+ public static final class EnergyLevel.Builder {
+ ctor public EnergyLevel.Builder();
+ method public androidx.car.app.hardware.info.EnergyLevel build();
+ method public androidx.car.app.hardware.info.EnergyLevel.Builder setBatteryPercent(androidx.car.app.hardware.common.CarValue<java.lang.Float!>);
+ method public androidx.car.app.hardware.info.EnergyLevel.Builder setDistanceDisplayUnit(androidx.car.app.hardware.common.CarValue<java.lang.Integer!>);
+ method public androidx.car.app.hardware.info.EnergyLevel.Builder setEnergyIsLow(androidx.car.app.hardware.common.CarValue<java.lang.Boolean!>);
+ method public androidx.car.app.hardware.info.EnergyLevel.Builder setFuelPercent(androidx.car.app.hardware.common.CarValue<java.lang.Float!>);
+ method public androidx.car.app.hardware.info.EnergyLevel.Builder setRangeRemainingMeters(androidx.car.app.hardware.common.CarValue<java.lang.Float!>);
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class EnergyProfile {
+ method public androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Integer!>!> getEvConnectorTypes();
+ method public androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Integer!>!> getFuelTypes();
+ field public static final int EVCONNECTOR_TYPE_CHADEMO = 3; // 0x3
+ field public static final int EVCONNECTOR_TYPE_COMBO_1 = 4; // 0x4
+ field public static final int EVCONNECTOR_TYPE_COMBO_2 = 5; // 0x5
+ field public static final int EVCONNECTOR_TYPE_GBT = 9; // 0x9
+ field public static final int EVCONNECTOR_TYPE_GBT_DC = 10; // 0xa
+ field public static final int EVCONNECTOR_TYPE_J1772 = 1; // 0x1
+ field public static final int EVCONNECTOR_TYPE_MENNEKES = 2; // 0x2
+ field public static final int EVCONNECTOR_TYPE_OTHER = 101; // 0x65
+ field public static final int EVCONNECTOR_TYPE_SCAME = 11; // 0xb
+ field public static final int EVCONNECTOR_TYPE_TESLA_HPWC = 7; // 0x7
+ field public static final int EVCONNECTOR_TYPE_TESLA_ROADSTER = 6; // 0x6
+ field public static final int EVCONNECTOR_TYPE_TESLA_SUPERCHARGER = 8; // 0x8
+ field public static final int EVCONNECTOR_TYPE_UNKNOWN = 0; // 0x0
+ field public static final int FUEL_TYPE_BIODIESEL = 5; // 0x5
+ field public static final int FUEL_TYPE_CNG = 8; // 0x8
+ field public static final int FUEL_TYPE_DIESEL_1 = 3; // 0x3
+ field public static final int FUEL_TYPE_DIESEL_2 = 4; // 0x4
+ field public static final int FUEL_TYPE_E85 = 6; // 0x6
+ field public static final int FUEL_TYPE_ELECTRIC = 10; // 0xa
+ field public static final int FUEL_TYPE_HYDROGEN = 11; // 0xb
+ field public static final int FUEL_TYPE_LEADED = 2; // 0x2
+ field public static final int FUEL_TYPE_LNG = 9; // 0x9
+ field public static final int FUEL_TYPE_LPG = 7; // 0x7
+ field public static final int FUEL_TYPE_OTHER = 12; // 0xc
+ field public static final int FUEL_TYPE_UNKNOWN = 0; // 0x0
+ field public static final int FUEL_TYPE_UNLEADED = 1; // 0x1
+ }
+
+ public static final class EnergyProfile.Builder {
+ ctor public EnergyProfile.Builder();
+ method public androidx.car.app.hardware.info.EnergyProfile build();
+ method public androidx.car.app.hardware.info.EnergyProfile.Builder setEvConnectorTypes(androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Integer!>!>);
+ method public androidx.car.app.hardware.info.EnergyProfile.Builder setFuelTypes(androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Integer!>!>);
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class Gyroscope {
+ ctor public Gyroscope(androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Float!>!>);
+ method public androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Float!>!> getRotations();
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class Mileage {
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Integer!> getDistanceDisplayUnit();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Float!> getOdometerMeters();
+ }
+
+ public static final class Mileage.Builder {
+ ctor public Mileage.Builder();
+ method public androidx.car.app.hardware.info.Mileage build();
+ method public androidx.car.app.hardware.info.Mileage.Builder setDistanceDisplayUnit(androidx.car.app.hardware.common.CarValue<java.lang.Integer!>);
+ method public androidx.car.app.hardware.info.Mileage.Builder setOdometerMeters(androidx.car.app.hardware.common.CarValue<java.lang.Float!>);
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class Model {
+ method public androidx.car.app.hardware.common.CarValue<java.lang.String!> getManufacturer();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.String!> getName();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Integer!> getYear();
+ }
+
+ public static final class Model.Builder {
+ ctor public Model.Builder();
+ method public androidx.car.app.hardware.info.Model build();
+ method public androidx.car.app.hardware.info.Model.Builder setManufacturer(androidx.car.app.hardware.common.CarValue<java.lang.String!>);
+ method public androidx.car.app.hardware.info.Model.Builder setName(androidx.car.app.hardware.common.CarValue<java.lang.String!>);
+ method public androidx.car.app.hardware.info.Model.Builder setYear(androidx.car.app.hardware.common.CarValue<java.lang.Integer!>);
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class Speed {
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Float!> getDisplaySpeedMetersPerSecond();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Float!> getRawSpeedMetersPerSecond();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Integer!> getSpeedDisplayUnit();
+ }
+
+ public static final class Speed.Builder {
+ ctor public Speed.Builder();
+ method public androidx.car.app.hardware.info.Speed build();
+ method public androidx.car.app.hardware.info.Speed.Builder setDisplaySpeedMetersPerSecond(androidx.car.app.hardware.common.CarValue<java.lang.Float!>);
+ method public androidx.car.app.hardware.info.Speed.Builder setRawSpeedMetersPerSecond(androidx.car.app.hardware.common.CarValue<java.lang.Float!>);
+ method public androidx.car.app.hardware.info.Speed.Builder setSpeedDisplayUnit(androidx.car.app.hardware.common.CarValue<java.lang.Integer!>);
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class TollCard {
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Integer!> getCardState();
+ field public static final int TOLLCARD_STATE_INVALID = 2; // 0x2
+ field public static final int TOLLCARD_STATE_NOT_INSERTED = 3; // 0x3
+ field public static final int TOLLCARD_STATE_UNKNOWN = 0; // 0x0
+ field public static final int TOLLCARD_STATE_VALID = 1; // 0x1
+ }
+
+ public static final class TollCard.Builder {
+ ctor public TollCard.Builder();
+ method public androidx.car.app.hardware.info.TollCard build();
+ method public androidx.car.app.hardware.info.TollCard.Builder setCardState(androidx.car.app.hardware.common.CarValue<java.lang.Integer!>);
+ }
+
+}
+
+package androidx.car.app.managers {
+
+ public interface Manager {
+ }
+
+}
+
+package androidx.car.app.model {
+
+ @androidx.car.app.annotations.CarProtocol public final class Action {
+ method public androidx.car.app.model.CarColor? getBackgroundColor();
+ method @androidx.car.app.annotations.RequiresCarApi(4) public int getFlags();
+ method public androidx.car.app.model.CarIcon? getIcon();
+ method public androidx.car.app.model.OnClickDelegate? getOnClickDelegate();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public int getType();
+ method public boolean isStandard();
+ method public static String typeToString(int);
+ field public static final androidx.car.app.model.Action APP_ICON;
+ field public static final androidx.car.app.model.Action BACK;
+ field @androidx.car.app.annotations.RequiresCarApi(4) public static final int FLAG_PRIMARY = 1; // 0x1
+ field public static final androidx.car.app.model.Action PAN;
+ field public static final int TYPE_APP_ICON = 65538; // 0x10002
+ field public static final int TYPE_BACK = 65539; // 0x10003
+ field public static final int TYPE_CUSTOM = 1; // 0x1
+ field public static final int TYPE_PAN = 65540; // 0x10004
+ }
+
+ public static final class Action.Builder {
+ ctor public Action.Builder();
+ ctor @androidx.car.app.annotations.RequiresCarApi(2) public Action.Builder(androidx.car.app.model.Action);
+ method public androidx.car.app.model.Action build();
+ method public androidx.car.app.model.Action.Builder setBackgroundColor(androidx.car.app.model.CarColor);
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.model.Action.Builder setFlags(int);
+ method public androidx.car.app.model.Action.Builder setIcon(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.model.Action.Builder setOnClickListener(androidx.car.app.model.OnClickListener);
+ method public androidx.car.app.model.Action.Builder setTitle(CharSequence);
+ method public androidx.car.app.model.Action.Builder setTitle(androidx.car.app.model.CarText);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class ActionStrip {
+ method public java.util.List<androidx.car.app.model.Action!> getActions();
+ method public androidx.car.app.model.Action? getFirstActionOfType(int);
+ }
+
+ public static final class ActionStrip.Builder {
+ ctor public ActionStrip.Builder();
+ method public androidx.car.app.model.ActionStrip.Builder addAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.ActionStrip build();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class CarColor {
+ method public static androidx.car.app.model.CarColor createCustom(@ColorInt int, @ColorInt int);
+ method @ColorInt public int getColor();
+ method @ColorInt public int getColorDark();
+ method public int getType();
+ field public static final androidx.car.app.model.CarColor BLUE;
+ field public static final androidx.car.app.model.CarColor DEFAULT;
+ field public static final androidx.car.app.model.CarColor GREEN;
+ field public static final androidx.car.app.model.CarColor PRIMARY;
+ field public static final androidx.car.app.model.CarColor RED;
+ field public static final androidx.car.app.model.CarColor SECONDARY;
+ field public static final int TYPE_BLUE = 6; // 0x6
+ field public static final int TYPE_CUSTOM = 0; // 0x0
+ field public static final int TYPE_DEFAULT = 1; // 0x1
+ field public static final int TYPE_GREEN = 5; // 0x5
+ field public static final int TYPE_PRIMARY = 2; // 0x2
+ field public static final int TYPE_RED = 4; // 0x4
+ field public static final int TYPE_SECONDARY = 3; // 0x3
+ field public static final int TYPE_YELLOW = 7; // 0x7
+ field public static final androidx.car.app.model.CarColor YELLOW;
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class CarIcon {
+ method public androidx.core.graphics.drawable.IconCompat? getIcon();
+ method public androidx.car.app.model.CarColor? getTint();
+ method public int getType();
+ field public static final androidx.car.app.model.CarIcon ALERT;
+ field public static final androidx.car.app.model.CarIcon APP_ICON;
+ field public static final androidx.car.app.model.CarIcon BACK;
+ field public static final androidx.car.app.model.CarIcon ERROR;
+ field @androidx.car.app.annotations.RequiresCarApi(2) public static final androidx.car.app.model.CarIcon PAN;
+ field public static final int TYPE_ALERT = 4; // 0x4
+ field public static final int TYPE_APP_ICON = 5; // 0x5
+ field public static final int TYPE_BACK = 3; // 0x3
+ field public static final int TYPE_CUSTOM = 1; // 0x1
+ field public static final int TYPE_ERROR = 6; // 0x6
+ field public static final int TYPE_PAN = 7; // 0x7
+ }
+
+ public static final class CarIcon.Builder {
+ ctor public CarIcon.Builder(androidx.core.graphics.drawable.IconCompat);
+ ctor public CarIcon.Builder(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.model.CarIcon build();
+ method public androidx.car.app.model.CarIcon.Builder setTint(androidx.car.app.model.CarColor);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class CarIconSpan extends androidx.car.app.model.CarSpan {
+ method public static androidx.car.app.model.CarIconSpan create(androidx.car.app.model.CarIcon);
+ method public static androidx.car.app.model.CarIconSpan create(androidx.car.app.model.CarIcon, int);
+ method public int getAlignment();
+ method public androidx.car.app.model.CarIcon getIcon();
+ field public static final int ALIGN_BASELINE = 1; // 0x1
+ field public static final int ALIGN_BOTTOM = 0; // 0x0
+ field public static final int ALIGN_CENTER = 2; // 0x2
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class CarLocation {
+ method public static androidx.car.app.model.CarLocation create(double, double);
+ method public static androidx.car.app.model.CarLocation create(android.location.Location);
+ method public double getLatitude();
+ method public double getLongitude();
+ }
+
+ @Keep @androidx.car.app.annotations.CarProtocol public class CarSpan extends android.text.style.CharacterStyle {
+ ctor public CarSpan();
+ method public void updateDrawState(android.text.TextPaint);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class CarText {
+ method public static androidx.car.app.model.CarText create(CharSequence);
+ method public java.util.List<java.lang.CharSequence!> getVariants();
+ method public boolean isEmpty();
+ method public static boolean isNullOrEmpty(androidx.car.app.model.CarText?);
+ method public CharSequence toCharSequence();
+ }
+
+ public static final class CarText.Builder {
+ ctor public CarText.Builder(CharSequence);
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.model.CarText.Builder addVariant(CharSequence);
+ method public androidx.car.app.model.CarText build();
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(2) public final class ClickableSpan extends androidx.car.app.model.CarSpan {
+ method public static androidx.car.app.model.ClickableSpan create(androidx.car.app.model.OnClickListener);
+ method public androidx.car.app.model.OnClickDelegate getOnClickDelegate();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class DateTimeWithZone {
+ method public static androidx.car.app.model.DateTimeWithZone create(long, @IntRange(from=0xffff02e0, to=64800) int, String);
+ method public static androidx.car.app.model.DateTimeWithZone create(long, java.util.TimeZone);
+ method @RequiresApi(26) public static androidx.car.app.model.DateTimeWithZone create(java.time.ZonedDateTime);
+ method public long getTimeSinceEpochMillis();
+ method public int getZoneOffsetSeconds();
+ method public String? getZoneShortName();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Distance {
+ method public static androidx.car.app.model.Distance create(double, int);
+ method public double getDisplayDistance();
+ method public int getDisplayUnit();
+ field public static final int UNIT_FEET = 6; // 0x6
+ field public static final int UNIT_KILOMETERS = 2; // 0x2
+ field public static final int UNIT_KILOMETERS_P1 = 3; // 0x3
+ field public static final int UNIT_METERS = 1; // 0x1
+ field public static final int UNIT_MILES = 4; // 0x4
+ field public static final int UNIT_MILES_P1 = 5; // 0x5
+ field public static final int UNIT_YARDS = 7; // 0x7
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class DistanceSpan extends androidx.car.app.model.CarSpan {
+ method public static androidx.car.app.model.DistanceSpan create(androidx.car.app.model.Distance);
+ method public androidx.car.app.model.Distance getDistance();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class DurationSpan extends androidx.car.app.model.CarSpan {
+ method public static androidx.car.app.model.DurationSpan create(long);
+ method @RequiresApi(26) public static androidx.car.app.model.DurationSpan create(java.time.Duration);
+ method public long getDurationSeconds();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class ForegroundCarColorSpan extends androidx.car.app.model.CarSpan {
+ method public static androidx.car.app.model.ForegroundCarColorSpan create(androidx.car.app.model.CarColor);
+ method public androidx.car.app.model.CarColor getColor();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class GridItem implements androidx.car.app.model.Item {
+ method public androidx.car.app.model.CarIcon? getImage();
+ method public int getImageType();
+ method public androidx.car.app.model.OnClickDelegate? getOnClickDelegate();
+ method public androidx.car.app.model.CarText? getText();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public boolean isLoading();
+ field public static final int IMAGE_TYPE_ICON = 1; // 0x1
+ field public static final int IMAGE_TYPE_LARGE = 2; // 0x2
+ }
+
+ public static final class GridItem.Builder {
+ ctor public GridItem.Builder();
+ method public androidx.car.app.model.GridItem build();
+ method public androidx.car.app.model.GridItem.Builder setImage(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.model.GridItem.Builder setImage(androidx.car.app.model.CarIcon, int);
+ method public androidx.car.app.model.GridItem.Builder setLoading(boolean);
+ method public androidx.car.app.model.GridItem.Builder setOnClickListener(androidx.car.app.model.OnClickListener);
+ method public androidx.car.app.model.GridItem.Builder setText(CharSequence);
+ method public androidx.car.app.model.GridItem.Builder setText(androidx.car.app.model.CarText);
+ method public androidx.car.app.model.GridItem.Builder setTitle(CharSequence);
+ method public androidx.car.app.model.GridItem.Builder setTitle(androidx.car.app.model.CarText);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class GridTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.ItemList? getSingleList();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public boolean isLoading();
+ }
+
+ public static final class GridTemplate.Builder {
+ ctor public GridTemplate.Builder();
+ method public androidx.car.app.model.GridTemplate build();
+ method public androidx.car.app.model.GridTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.GridTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.GridTemplate.Builder setLoading(boolean);
+ method public androidx.car.app.model.GridTemplate.Builder setSingleList(androidx.car.app.model.ItemList);
+ method public androidx.car.app.model.GridTemplate.Builder setTitle(CharSequence);
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public interface InputCallback {
+ method public default void onInputSubmitted(String);
+ method public default void onInputTextChanged(String);
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public interface InputCallbackDelegate {
+ method public void sendInputSubmitted(String, androidx.car.app.OnDoneCallback);
+ method public void sendInputTextChanged(String, androidx.car.app.OnDoneCallback);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface Item {
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class ItemList {
+ method public java.util.List<androidx.car.app.model.Item!> getItems();
+ method public androidx.car.app.model.CarText? getNoItemsMessage();
+ method public androidx.car.app.model.OnItemVisibilityChangedDelegate? getOnItemVisibilityChangedDelegate();
+ method public androidx.car.app.model.OnSelectedDelegate? getOnSelectedDelegate();
+ method public int getSelectedIndex();
+ }
+
+ public static final class ItemList.Builder {
+ ctor public ItemList.Builder();
+ method public androidx.car.app.model.ItemList.Builder addItem(androidx.car.app.model.Item);
+ method public androidx.car.app.model.ItemList build();
+ method public androidx.car.app.model.ItemList.Builder setNoItemsMessage(CharSequence);
+ method public androidx.car.app.model.ItemList.Builder setOnItemsVisibilityChangedListener(androidx.car.app.model.ItemList.OnItemVisibilityChangedListener);
+ method public androidx.car.app.model.ItemList.Builder setOnSelectedListener(androidx.car.app.model.ItemList.OnSelectedListener);
+ method public androidx.car.app.model.ItemList.Builder setSelectedIndex(@IntRange(from=0) int);
+ }
+
+ public static interface ItemList.OnItemVisibilityChangedListener {
+ method public void onItemVisibilityChanged(int, int);
+ }
+
+ public static interface ItemList.OnSelectedListener {
+ method public void onSelected(int);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class ListTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public java.util.List<androidx.car.app.model.SectionedItemList!> getSectionedLists();
+ method public androidx.car.app.model.ItemList? getSingleList();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public boolean isLoading();
+ }
+
+ public static final class ListTemplate.Builder {
+ ctor public ListTemplate.Builder();
+ method public androidx.car.app.model.ListTemplate.Builder addSectionedList(androidx.car.app.model.SectionedItemList);
+ method public androidx.car.app.model.ListTemplate build();
+ method public androidx.car.app.model.ListTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.ListTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.ListTemplate.Builder setLoading(boolean);
+ method public androidx.car.app.model.ListTemplate.Builder setSingleList(androidx.car.app.model.ItemList);
+ method public androidx.car.app.model.ListTemplate.Builder setTitle(CharSequence);
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public final class LongMessageTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public java.util.List<androidx.car.app.model.Action!> getActions();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.CarText getMessage();
+ method public androidx.car.app.model.CarText? getTitle();
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public static final class LongMessageTemplate.Builder {
+ ctor public LongMessageTemplate.Builder(CharSequence);
+ method public androidx.car.app.model.LongMessageTemplate.Builder addAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.LongMessageTemplate build();
+ method public androidx.car.app.model.LongMessageTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.LongMessageTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.LongMessageTemplate.Builder setTitle(CharSequence);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class MessageTemplate implements androidx.car.app.model.Template {
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public java.util.List<androidx.car.app.model.Action!> getActions();
+ method public androidx.car.app.model.CarText? getDebugMessage();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.CarIcon? getIcon();
+ method public androidx.car.app.model.CarText getMessage();
+ method public androidx.car.app.model.CarText? getTitle();
+ method @androidx.car.app.annotations.RequiresCarApi(2) public boolean isLoading();
+ }
+
+ public static final class MessageTemplate.Builder {
+ ctor public MessageTemplate.Builder(CharSequence);
+ ctor public MessageTemplate.Builder(androidx.car.app.model.CarText);
+ method public androidx.car.app.model.MessageTemplate.Builder addAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.MessageTemplate build();
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.model.MessageTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.MessageTemplate.Builder setDebugMessage(Throwable);
+ method public androidx.car.app.model.MessageTemplate.Builder setDebugMessage(String);
+ method public androidx.car.app.model.MessageTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.MessageTemplate.Builder setIcon(androidx.car.app.model.CarIcon);
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.model.MessageTemplate.Builder setLoading(boolean);
+ method public androidx.car.app.model.MessageTemplate.Builder setTitle(CharSequence);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Metadata {
+ method public androidx.car.app.model.Place? getPlace();
+ field public static final androidx.car.app.model.Metadata EMPTY_METADATA;
+ }
+
+ public static final class Metadata.Builder {
+ ctor public Metadata.Builder();
+ ctor public Metadata.Builder(androidx.car.app.model.Metadata);
+ method public androidx.car.app.model.Metadata build();
+ method public androidx.car.app.model.Metadata.Builder setPlace(androidx.car.app.model.Place);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface OnCheckedChangeDelegate {
+ method public void sendCheckedChange(boolean, androidx.car.app.OnDoneCallback);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface OnClickDelegate {
+ method public boolean isParkedOnly();
+ method public void sendClick(androidx.car.app.OnDoneCallback);
+ }
+
+ public interface OnClickListener {
+ method public void onClick();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface OnItemVisibilityChangedDelegate {
+ method public void sendItemVisibilityChanged(int, int, androidx.car.app.OnDoneCallback);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface OnSelectedDelegate {
+ method public void sendSelected(int, androidx.car.app.OnDoneCallback);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Pane {
+ method public java.util.List<androidx.car.app.model.Action!> getActions();
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.model.CarIcon? getImage();
+ method public java.util.List<androidx.car.app.model.Row!> getRows();
+ method public boolean isLoading();
+ }
+
+ public static final class Pane.Builder {
+ ctor public Pane.Builder();
+ method public androidx.car.app.model.Pane.Builder addAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.Pane.Builder addRow(androidx.car.app.model.Row);
+ method public androidx.car.app.model.Pane build();
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.model.Pane.Builder setImage(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.model.Pane.Builder setLoading(boolean);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class PaneTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.Pane getPane();
+ method public androidx.car.app.model.CarText? getTitle();
+ }
+
+ public static final class PaneTemplate.Builder {
+ ctor public PaneTemplate.Builder(androidx.car.app.model.Pane);
+ method public androidx.car.app.model.PaneTemplate build();
+ method public androidx.car.app.model.PaneTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.PaneTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.PaneTemplate.Builder setTitle(CharSequence);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class ParkedOnlyOnClickListener implements androidx.car.app.model.OnClickListener {
+ method public static androidx.car.app.model.ParkedOnlyOnClickListener create(androidx.car.app.model.OnClickListener);
+ method public void onClick();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Place {
+ method public androidx.car.app.model.CarLocation getLocation();
+ method public androidx.car.app.model.PlaceMarker? getMarker();
+ }
+
+ public static final class Place.Builder {
+ ctor public Place.Builder(androidx.car.app.model.CarLocation);
+ ctor public Place.Builder(androidx.car.app.model.Place);
+ method public androidx.car.app.model.Place build();
+ method public androidx.car.app.model.Place.Builder setMarker(androidx.car.app.model.PlaceMarker);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class PlaceListMapTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.Place? getAnchor();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.ItemList? getItemList();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public boolean isCurrentLocationEnabled();
+ method public boolean isLoading();
+ }
+
+ public static final class PlaceListMapTemplate.Builder {
+ ctor public PlaceListMapTemplate.Builder();
+ method public androidx.car.app.model.PlaceListMapTemplate build();
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setAnchor(androidx.car.app.model.Place);
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setCurrentLocationEnabled(boolean);
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setItemList(androidx.car.app.model.ItemList);
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setLoading(boolean);
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setTitle(CharSequence);
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setTitle(androidx.car.app.model.CarText);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class PlaceMarker {
+ method public androidx.car.app.model.CarColor? getColor();
+ method public androidx.car.app.model.CarIcon? getIcon();
+ method public int getIconType();
+ method public androidx.car.app.model.CarText? getLabel();
+ field public static final int TYPE_ICON = 0; // 0x0
+ field public static final int TYPE_IMAGE = 1; // 0x1
+ }
+
+ public static final class PlaceMarker.Builder {
+ ctor public PlaceMarker.Builder();
+ method public androidx.car.app.model.PlaceMarker build();
+ method public androidx.car.app.model.PlaceMarker.Builder setColor(androidx.car.app.model.CarColor);
+ method public androidx.car.app.model.PlaceMarker.Builder setIcon(androidx.car.app.model.CarIcon, int);
+ method public androidx.car.app.model.PlaceMarker.Builder setLabel(CharSequence);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Row implements androidx.car.app.model.Item {
+ method public androidx.car.app.model.CarIcon? getImage();
+ method public androidx.car.app.model.Metadata? getMetadata();
+ method public androidx.car.app.model.OnClickDelegate? getOnClickDelegate();
+ method public int getRowImageType();
+ method public java.util.List<androidx.car.app.model.CarText!> getTexts();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public androidx.car.app.model.Toggle? getToggle();
+ method public boolean isBrowsable();
+ method public androidx.car.app.model.Row row();
+ method public CharSequence yourBoat();
+ field public static final int IMAGE_TYPE_ICON = 4; // 0x4
+ field public static final int IMAGE_TYPE_LARGE = 2; // 0x2
+ field public static final int IMAGE_TYPE_SMALL = 1; // 0x1
+ }
+
+ public static final class Row.Builder {
+ ctor public Row.Builder();
+ method public androidx.car.app.model.Row.Builder addText(CharSequence);
+ method public androidx.car.app.model.Row.Builder addText(androidx.car.app.model.CarText);
+ method public androidx.car.app.model.Row build();
+ method public androidx.car.app.model.Row.Builder setBrowsable(boolean);
+ method public androidx.car.app.model.Row.Builder setImage(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.model.Row.Builder setImage(androidx.car.app.model.CarIcon, int);
+ method public androidx.car.app.model.Row.Builder setMetadata(androidx.car.app.model.Metadata);
+ method public androidx.car.app.model.Row.Builder setOnClickListener(androidx.car.app.model.OnClickListener);
+ method public androidx.car.app.model.Row.Builder setTitle(CharSequence);
+ method public androidx.car.app.model.Row.Builder setTitle(androidx.car.app.model.CarText);
+ method public androidx.car.app.model.Row.Builder setToggle(androidx.car.app.model.Toggle);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface SearchCallbackDelegate {
+ method public void sendSearchSubmitted(String, androidx.car.app.OnDoneCallback);
+ method public void sendSearchTextChanged(String, androidx.car.app.OnDoneCallback);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class SearchTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public String? getInitialSearchText();
+ method public androidx.car.app.model.ItemList? getItemList();
+ method public androidx.car.app.model.SearchCallbackDelegate getSearchCallbackDelegate();
+ method public String? getSearchHint();
+ method public boolean isLoading();
+ method public boolean isShowKeyboardByDefault();
+ }
+
+ public static final class SearchTemplate.Builder {
+ ctor public SearchTemplate.Builder(androidx.car.app.model.SearchTemplate.SearchCallback);
+ method public androidx.car.app.model.SearchTemplate build();
+ method public androidx.car.app.model.SearchTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.SearchTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.SearchTemplate.Builder setInitialSearchText(String);
+ method public androidx.car.app.model.SearchTemplate.Builder setItemList(androidx.car.app.model.ItemList);
+ method public androidx.car.app.model.SearchTemplate.Builder setLoading(boolean);
+ method public androidx.car.app.model.SearchTemplate.Builder setSearchHint(String);
+ method public androidx.car.app.model.SearchTemplate.Builder setShowKeyboardByDefault(boolean);
+ }
+
+ public static interface SearchTemplate.SearchCallback {
+ method public default void onSearchSubmitted(String);
+ method public default void onSearchTextChanged(String);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class SectionedItemList {
+ method public static androidx.car.app.model.SectionedItemList create(androidx.car.app.model.ItemList, CharSequence);
+ method public androidx.car.app.model.CarText getHeader();
+ method public androidx.car.app.model.ItemList getItemList();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface Template {
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class TemplateInfo {
+ ctor public TemplateInfo(Class<? extends androidx.car.app.model.Template>, String);
+ method public Class<? extends androidx.car.app.model.Template> getTemplateClass();
+ method public String getTemplateId();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class TemplateWrapper {
+ method public static androidx.car.app.model.TemplateWrapper copyOf(androidx.car.app.model.TemplateWrapper);
+ method public int getCurrentTaskStep();
+ method public String getId();
+ method public androidx.car.app.model.Template getTemplate();
+ method public java.util.List<androidx.car.app.model.TemplateInfo!> getTemplateInfosForScreenStack();
+ method public boolean isRefresh();
+ method public void setCurrentTaskStep(int);
+ method public void setId(String);
+ method public void setRefresh(boolean);
+ method public void setTemplate(androidx.car.app.model.Template);
+ method public static androidx.car.app.model.TemplateWrapper wrap(androidx.car.app.model.Template);
+ method public static androidx.car.app.model.TemplateWrapper wrap(androidx.car.app.model.Template, String);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Toggle {
+ method public androidx.car.app.model.OnCheckedChangeDelegate getOnCheckedChangeDelegate();
+ method public boolean isChecked();
+ }
+
+ public static final class Toggle.Builder {
+ ctor public Toggle.Builder(androidx.car.app.model.Toggle.OnCheckedChangeListener);
+ method public androidx.car.app.model.Toggle build();
+ method public androidx.car.app.model.Toggle.Builder setChecked(boolean);
+ }
+
+ public static interface Toggle.OnCheckedChangeListener {
+ method public void onCheckedChange(boolean);
+ }
+
+}
+
+package androidx.car.app.model.signin {
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public final class InputSignInMethod implements androidx.car.app.model.signin.SignInTemplate.SignInMethod {
+ method public androidx.car.app.model.CarText? getDefaultValue();
+ method public androidx.car.app.model.CarText? getErrorMessage();
+ method public androidx.car.app.model.CarText? getHint();
+ method public androidx.car.app.model.InputCallbackDelegate getInputCallbackDelegate();
+ method public int getInputType();
+ method public int getKeyboardType();
+ method public boolean isShowKeyboardByDefault();
+ field public static final int INPUT_TYPE_DEFAULT = 1; // 0x1
+ field public static final int INPUT_TYPE_PASSWORD = 2; // 0x2
+ field public static final int KEYBOARD_DEFAULT = 1; // 0x1
+ field public static final int KEYBOARD_EMAIL = 2; // 0x2
+ field public static final int KEYBOARD_NUMBER = 4; // 0x4
+ field public static final int KEYBOARD_PHONE = 3; // 0x3
+ }
+
+ public static final class InputSignInMethod.Builder {
+ ctor public InputSignInMethod.Builder(androidx.car.app.model.InputCallback);
+ method public androidx.car.app.model.signin.InputSignInMethod build();
+ method public androidx.car.app.model.signin.InputSignInMethod.Builder setDefaultValue(String);
+ method public androidx.car.app.model.signin.InputSignInMethod.Builder setErrorMessage(CharSequence);
+ method public androidx.car.app.model.signin.InputSignInMethod.Builder setHint(CharSequence);
+ method public androidx.car.app.model.signin.InputSignInMethod.Builder setInputType(int);
+ method public androidx.car.app.model.signin.InputSignInMethod.Builder setKeyboardType(int);
+ method public androidx.car.app.model.signin.InputSignInMethod.Builder setShowKeyboardByDefault(boolean);
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public final class PinSignInMethod implements androidx.car.app.model.signin.SignInTemplate.SignInMethod {
+ ctor public PinSignInMethod(CharSequence);
+ method public androidx.car.app.model.CarText getPinCode();
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public final class ProviderSignInMethod implements androidx.car.app.model.signin.SignInTemplate.SignInMethod {
+ ctor public ProviderSignInMethod(androidx.car.app.model.Action);
+ method public androidx.car.app.model.Action getAction();
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(4) public final class QRCodeSignInMethod implements androidx.car.app.model.signin.SignInTemplate.SignInMethod {
+ ctor public QRCodeSignInMethod(android.net.Uri);
+ method public android.net.Uri getUri();
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public final class SignInTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public java.util.List<androidx.car.app.model.Action!> getActions();
+ method public androidx.car.app.model.CarText? getAdditionalText();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.CarText? getInstructions();
+ method public androidx.car.app.model.signin.SignInTemplate.SignInMethod getSignInMethod();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public boolean isLoading();
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public static final class SignInTemplate.Builder {
+ ctor public SignInTemplate.Builder(androidx.car.app.model.signin.SignInTemplate.SignInMethod);
+ method public androidx.car.app.model.signin.SignInTemplate.Builder addAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.signin.SignInTemplate build();
+ method public androidx.car.app.model.signin.SignInTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.signin.SignInTemplate.Builder setAdditionalText(CharSequence);
+ method public androidx.car.app.model.signin.SignInTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.signin.SignInTemplate.Builder setInstructions(CharSequence);
+ method public androidx.car.app.model.signin.SignInTemplate.Builder setLoading(boolean);
+ method public androidx.car.app.model.signin.SignInTemplate.Builder setTitle(CharSequence);
+ }
+
+ public static interface SignInTemplate.SignInMethod {
+ }
+
+}
+
+package androidx.car.app.navigation {
+
+ public class NavigationManager implements androidx.car.app.managers.Manager {
+ method @MainThread public void clearNavigationManagerCallback();
+ method @MainThread public void navigationEnded();
+ method @MainThread public void navigationStarted();
+ method @MainThread public void setNavigationManagerCallback(androidx.car.app.navigation.NavigationManagerCallback);
+ method @MainThread public void setNavigationManagerCallback(java.util.concurrent.Executor, androidx.car.app.navigation.NavigationManagerCallback);
+ method @MainThread public void updateTrip(androidx.car.app.navigation.model.Trip);
+ }
+
+ public interface NavigationManagerCallback {
+ method public default void onAutoDriveEnabled();
+ method public default void onStopNavigation();
+ }
+
+}
+
+package androidx.car.app.navigation.model {
+
+ @androidx.car.app.annotations.CarProtocol public final class Destination {
+ method public androidx.car.app.model.CarText? getAddress();
+ method public androidx.car.app.model.CarIcon? getImage();
+ method public androidx.car.app.model.CarText? getName();
+ }
+
+ public static final class Destination.Builder {
+ ctor public Destination.Builder();
+ method public androidx.car.app.navigation.model.Destination build();
+ method public androidx.car.app.navigation.model.Destination.Builder setAddress(CharSequence);
+ method public androidx.car.app.navigation.model.Destination.Builder setImage(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.navigation.model.Destination.Builder setName(CharSequence);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Lane {
+ method public java.util.List<androidx.car.app.navigation.model.LaneDirection!> getDirections();
+ }
+
+ public static final class Lane.Builder {
+ ctor public Lane.Builder();
+ method public androidx.car.app.navigation.model.Lane.Builder addDirection(androidx.car.app.navigation.model.LaneDirection);
+ method public androidx.car.app.navigation.model.Lane build();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class LaneDirection {
+ method public static androidx.car.app.navigation.model.LaneDirection create(int, boolean);
+ method public int getShape();
+ method public boolean isRecommended();
+ field public static final int SHAPE_NORMAL_LEFT = 5; // 0x5
+ field public static final int SHAPE_NORMAL_RIGHT = 6; // 0x6
+ field public static final int SHAPE_SHARP_LEFT = 7; // 0x7
+ field public static final int SHAPE_SHARP_RIGHT = 8; // 0x8
+ field public static final int SHAPE_SLIGHT_LEFT = 3; // 0x3
+ field public static final int SHAPE_SLIGHT_RIGHT = 4; // 0x4
+ field public static final int SHAPE_STRAIGHT = 2; // 0x2
+ field public static final int SHAPE_UNKNOWN = 1; // 0x1
+ field public static final int SHAPE_U_TURN_LEFT = 9; // 0x9
+ field public static final int SHAPE_U_TURN_RIGHT = 10; // 0xa
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Maneuver {
+ method public androidx.car.app.model.CarIcon? getIcon();
+ method public int getRoundaboutExitAngle();
+ method public int getRoundaboutExitNumber();
+ method public int getType();
+ field public static final int TYPE_DEPART = 1; // 0x1
+ field public static final int TYPE_DESTINATION = 39; // 0x27
+ field public static final int TYPE_DESTINATION_LEFT = 41; // 0x29
+ field public static final int TYPE_DESTINATION_RIGHT = 42; // 0x2a
+ field public static final int TYPE_DESTINATION_STRAIGHT = 40; // 0x28
+ field public static final int TYPE_FERRY_BOAT = 37; // 0x25
+ field public static final int TYPE_FERRY_BOAT_LEFT = 47; // 0x2f
+ field public static final int TYPE_FERRY_BOAT_RIGHT = 48; // 0x30
+ field public static final int TYPE_FERRY_TRAIN = 38; // 0x26
+ field public static final int TYPE_FERRY_TRAIN_LEFT = 49; // 0x31
+ field public static final int TYPE_FERRY_TRAIN_RIGHT = 50; // 0x32
+ field public static final int TYPE_FORK_LEFT = 25; // 0x19
+ field public static final int TYPE_FORK_RIGHT = 26; // 0x1a
+ field public static final int TYPE_KEEP_LEFT = 3; // 0x3
+ field public static final int TYPE_KEEP_RIGHT = 4; // 0x4
+ field public static final int TYPE_MERGE_LEFT = 27; // 0x1b
+ field public static final int TYPE_MERGE_RIGHT = 28; // 0x1c
+ field public static final int TYPE_MERGE_SIDE_UNSPECIFIED = 29; // 0x1d
+ field public static final int TYPE_NAME_CHANGE = 2; // 0x2
+ field public static final int TYPE_OFF_RAMP_NORMAL_LEFT = 23; // 0x17
+ field public static final int TYPE_OFF_RAMP_NORMAL_RIGHT = 24; // 0x18
+ field public static final int TYPE_OFF_RAMP_SLIGHT_LEFT = 21; // 0x15
+ field public static final int TYPE_OFF_RAMP_SLIGHT_RIGHT = 22; // 0x16
+ field public static final int TYPE_ON_RAMP_NORMAL_LEFT = 15; // 0xf
+ field public static final int TYPE_ON_RAMP_NORMAL_RIGHT = 16; // 0x10
+ field public static final int TYPE_ON_RAMP_SHARP_LEFT = 17; // 0x11
+ field public static final int TYPE_ON_RAMP_SHARP_RIGHT = 18; // 0x12
+ field public static final int TYPE_ON_RAMP_SLIGHT_LEFT = 13; // 0xd
+ field public static final int TYPE_ON_RAMP_SLIGHT_RIGHT = 14; // 0xe
+ field public static final int TYPE_ON_RAMP_U_TURN_LEFT = 19; // 0x13
+ field public static final int TYPE_ON_RAMP_U_TURN_RIGHT = 20; // 0x14
+ field public static final int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CCW = 34; // 0x22
+ field public static final int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CCW_WITH_ANGLE = 35; // 0x23
+ field public static final int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CW = 32; // 0x20
+ field public static final int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CW_WITH_ANGLE = 33; // 0x21
+ field public static final int TYPE_ROUNDABOUT_ENTER_CCW = 45; // 0x2d
+ field public static final int TYPE_ROUNDABOUT_ENTER_CW = 43; // 0x2b
+ field public static final int TYPE_ROUNDABOUT_EXIT_CCW = 46; // 0x2e
+ field public static final int TYPE_ROUNDABOUT_EXIT_CW = 44; // 0x2c
+ field public static final int TYPE_STRAIGHT = 36; // 0x24
+ field public static final int TYPE_TURN_NORMAL_LEFT = 7; // 0x7
+ field public static final int TYPE_TURN_NORMAL_RIGHT = 8; // 0x8
+ field public static final int TYPE_TURN_SHARP_LEFT = 9; // 0x9
+ field public static final int TYPE_TURN_SHARP_RIGHT = 10; // 0xa
+ field public static final int TYPE_TURN_SLIGHT_LEFT = 5; // 0x5
+ field public static final int TYPE_TURN_SLIGHT_RIGHT = 6; // 0x6
+ field public static final int TYPE_UNKNOWN = 0; // 0x0
+ field public static final int TYPE_U_TURN_LEFT = 11; // 0xb
+ field public static final int TYPE_U_TURN_RIGHT = 12; // 0xc
+ }
+
+ public static final class Maneuver.Builder {
+ ctor public Maneuver.Builder(int);
+ method public androidx.car.app.navigation.model.Maneuver build();
+ method public androidx.car.app.navigation.model.Maneuver.Builder setIcon(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.navigation.model.Maneuver.Builder setRoundaboutExitAngle(@IntRange(from=1, to=360) int);
+ method public androidx.car.app.navigation.model.Maneuver.Builder setRoundaboutExitNumber(@IntRange(from=1) int);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class MessageInfo implements androidx.car.app.navigation.model.NavigationTemplate.NavigationInfo {
+ method public androidx.car.app.model.CarIcon? getImage();
+ method public androidx.car.app.model.CarText? getText();
+ method public androidx.car.app.model.CarText? getTitle();
+ }
+
+ public static final class MessageInfo.Builder {
+ ctor public MessageInfo.Builder(CharSequence);
+ ctor public MessageInfo.Builder(androidx.car.app.model.CarText);
+ method public androidx.car.app.navigation.model.MessageInfo build();
+ method public androidx.car.app.navigation.model.MessageInfo.Builder setImage(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.navigation.model.MessageInfo.Builder setText(CharSequence);
+ method public androidx.car.app.navigation.model.MessageInfo.Builder setText(androidx.car.app.model.CarText);
+ method public androidx.car.app.navigation.model.MessageInfo.Builder setTitle(CharSequence);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class NavigationTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.CarColor? getBackgroundColor();
+ method public androidx.car.app.navigation.model.TravelEstimate? getDestinationTravelEstimate();
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.model.ActionStrip? getMapActionStrip();
+ method public androidx.car.app.navigation.model.NavigationTemplate.NavigationInfo? getNavigationInfo();
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.navigation.model.PanModeDelegate? getPanModeDelegate();
+ method @Deprecated @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.model.Toggle? getPanModeToggle();
+ }
+
+ public static final class NavigationTemplate.Builder {
+ ctor public NavigationTemplate.Builder();
+ method public androidx.car.app.navigation.model.NavigationTemplate build();
+ method public androidx.car.app.navigation.model.NavigationTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.navigation.model.NavigationTemplate.Builder setBackgroundColor(androidx.car.app.model.CarColor);
+ method public androidx.car.app.navigation.model.NavigationTemplate.Builder setDestinationTravelEstimate(androidx.car.app.navigation.model.TravelEstimate);
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.navigation.model.NavigationTemplate.Builder setMapActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.navigation.model.NavigationTemplate.Builder setNavigationInfo(androidx.car.app.navigation.model.NavigationTemplate.NavigationInfo);
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.navigation.model.NavigationTemplate.Builder setPanModeListener(androidx.car.app.navigation.model.PanModeListener);
+ }
+
+ public static interface NavigationTemplate.NavigationInfo {
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(2) public interface PanModeDelegate {
+ method public void sendPanModeChanged(boolean, androidx.car.app.OnDoneCallback);
+ }
+
+ public interface PanModeListener {
+ method public void onPanModeChanged(boolean);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class PlaceListNavigationTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.ItemList? getItemList();
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.model.ActionStrip? getMapActionStrip();
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.navigation.model.PanModeDelegate? getPanModeDelegate();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public boolean isLoading();
+ }
+
+ public static final class PlaceListNavigationTemplate.Builder {
+ ctor public PlaceListNavigationTemplate.Builder();
+ method public androidx.car.app.navigation.model.PlaceListNavigationTemplate build();
+ method public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setItemList(androidx.car.app.model.ItemList);
+ method public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setLoading(boolean);
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setMapActionStrip(androidx.car.app.model.ActionStrip);
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setPanModeListener(androidx.car.app.navigation.model.PanModeListener);
+ method public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setTitle(CharSequence);
+ method public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setTitle(androidx.car.app.model.CarText);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class RoutePreviewNavigationTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.ItemList? getItemList();
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.model.ActionStrip? getMapActionStrip();
+ method public androidx.car.app.model.Action? getNavigateAction();
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.navigation.model.PanModeDelegate? getPanModeDelegate();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public boolean isLoading();
+ }
+
+ public static final class RoutePreviewNavigationTemplate.Builder {
+ ctor public RoutePreviewNavigationTemplate.Builder();
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate build();
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setItemList(androidx.car.app.model.ItemList);
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setLoading(boolean);
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setMapActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setNavigateAction(androidx.car.app.model.Action);
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setPanModeListener(androidx.car.app.navigation.model.PanModeListener);
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setTitle(CharSequence);
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setTitle(androidx.car.app.model.CarText);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class RoutingInfo implements androidx.car.app.navigation.model.NavigationTemplate.NavigationInfo {
+ method public androidx.car.app.model.Distance? getCurrentDistance();
+ method public androidx.car.app.navigation.model.Step? getCurrentStep();
+ method public androidx.car.app.model.CarIcon? getJunctionImage();
+ method public androidx.car.app.navigation.model.Step? getNextStep();
+ method public boolean isLoading();
+ }
+
+ public static final class RoutingInfo.Builder {
+ ctor public RoutingInfo.Builder();
+ method public androidx.car.app.navigation.model.RoutingInfo build();
+ method public androidx.car.app.navigation.model.RoutingInfo.Builder setCurrentStep(androidx.car.app.navigation.model.Step, androidx.car.app.model.Distance);
+ method public androidx.car.app.navigation.model.RoutingInfo.Builder setJunctionImage(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.navigation.model.RoutingInfo.Builder setLoading(boolean);
+ method public androidx.car.app.navigation.model.RoutingInfo.Builder setNextStep(androidx.car.app.navigation.model.Step);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Step {
+ method public androidx.car.app.model.CarText? getCue();
+ method public java.util.List<androidx.car.app.navigation.model.Lane!> getLanes();
+ method public androidx.car.app.model.CarIcon? getLanesImage();
+ method public androidx.car.app.navigation.model.Maneuver? getManeuver();
+ method public androidx.car.app.model.CarText? getRoad();
+ }
+
+ public static final class Step.Builder {
+ ctor public Step.Builder();
+ ctor public Step.Builder(CharSequence);
+ ctor public Step.Builder(androidx.car.app.model.CarText);
+ method public androidx.car.app.navigation.model.Step.Builder addLane(androidx.car.app.navigation.model.Lane);
+ method public androidx.car.app.navigation.model.Step build();
+ method public androidx.car.app.navigation.model.Step.Builder setCue(CharSequence);
+ method public androidx.car.app.navigation.model.Step.Builder setLanesImage(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.navigation.model.Step.Builder setManeuver(androidx.car.app.navigation.model.Maneuver);
+ method public androidx.car.app.navigation.model.Step.Builder setRoad(CharSequence);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class TravelEstimate {
+ method public androidx.car.app.model.DateTimeWithZone? getArrivalTimeAtDestination();
+ method public androidx.car.app.model.Distance? getRemainingDistance();
+ method public androidx.car.app.model.CarColor? getRemainingDistanceColor();
+ method public androidx.car.app.model.CarColor? getRemainingTimeColor();
+ method public long getRemainingTimeSeconds();
+ field public static final long REMAINING_TIME_UNKNOWN = -1L; // 0xffffffffffffffffL
+ }
+
+ public static final class TravelEstimate.Builder {
+ ctor public TravelEstimate.Builder(androidx.car.app.model.Distance, androidx.car.app.model.DateTimeWithZone);
+ ctor @RequiresApi(26) public TravelEstimate.Builder(androidx.car.app.model.Distance, java.time.ZonedDateTime);
+ method public androidx.car.app.navigation.model.TravelEstimate build();
+ method public androidx.car.app.navigation.model.TravelEstimate.Builder setRemainingDistanceColor(androidx.car.app.model.CarColor);
+ method @RequiresApi(26) public androidx.car.app.navigation.model.TravelEstimate.Builder setRemainingTime(java.time.Duration);
+ method public androidx.car.app.navigation.model.TravelEstimate.Builder setRemainingTimeColor(androidx.car.app.model.CarColor);
+ method public androidx.car.app.navigation.model.TravelEstimate.Builder setRemainingTimeSeconds(@IntRange(from=0xffffffff) long);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Trip {
+ method public androidx.car.app.model.CarText? getCurrentRoad();
+ method public java.util.List<androidx.car.app.navigation.model.TravelEstimate!> getDestinationTravelEstimates();
+ method public java.util.List<androidx.car.app.navigation.model.Destination!> getDestinations();
+ method public java.util.List<androidx.car.app.navigation.model.TravelEstimate!> getStepTravelEstimates();
+ method public java.util.List<androidx.car.app.navigation.model.Step!> getSteps();
+ method public boolean isLoading();
+ }
+
+ public static final class Trip.Builder {
+ ctor public Trip.Builder();
+ method public androidx.car.app.navigation.model.Trip.Builder addDestination(androidx.car.app.navigation.model.Destination, androidx.car.app.navigation.model.TravelEstimate);
+ method public androidx.car.app.navigation.model.Trip.Builder addStep(androidx.car.app.navigation.model.Step, androidx.car.app.navigation.model.TravelEstimate);
+ method public androidx.car.app.navigation.model.Trip build();
+ method public androidx.car.app.navigation.model.Trip.Builder setCurrentRoad(CharSequence);
+ method public androidx.car.app.navigation.model.Trip.Builder setLoading(boolean);
+ }
+
+}
+
+package androidx.car.app.notification {
+
+ public final class CarAppExtender implements androidx.core.app.NotificationCompat.Extender {
+ ctor public CarAppExtender(android.app.Notification);
+ method public androidx.core.app.NotificationCompat.Builder extend(androidx.core.app.NotificationCompat.Builder);
+ method public java.util.List<android.app.Notification.Action!> getActions();
+ method public String? getChannelId();
+ method public androidx.car.app.model.CarColor? getColor();
+ method public android.app.PendingIntent? getContentIntent();
+ method public CharSequence? getContentText();
+ method public CharSequence? getContentTitle();
+ method public android.app.PendingIntent? getDeleteIntent();
+ method public int getImportance();
+ method public android.graphics.Bitmap? getLargeIcon();
+ method @DrawableRes public int getSmallIcon();
+ method public static boolean isExtended(android.app.Notification);
+ }
+
+ public static final class CarAppExtender.Builder {
+ ctor public CarAppExtender.Builder();
+ method public androidx.car.app.notification.CarAppExtender.Builder addAction(@DrawableRes int, CharSequence, android.app.PendingIntent);
+ method public androidx.car.app.notification.CarAppExtender build();
+ method public androidx.car.app.notification.CarAppExtender.Builder setChannelId(String);
+ method public androidx.car.app.notification.CarAppExtender.Builder setColor(androidx.car.app.model.CarColor);
+ method public androidx.car.app.notification.CarAppExtender.Builder setContentIntent(android.app.PendingIntent);
+ method public androidx.car.app.notification.CarAppExtender.Builder setContentText(CharSequence);
+ method public androidx.car.app.notification.CarAppExtender.Builder setContentTitle(CharSequence);
+ method public androidx.car.app.notification.CarAppExtender.Builder setDeleteIntent(android.app.PendingIntent);
+ method public androidx.car.app.notification.CarAppExtender.Builder setImportance(int);
+ method public androidx.car.app.notification.CarAppExtender.Builder setLargeIcon(android.graphics.Bitmap);
+ method public androidx.car.app.notification.CarAppExtender.Builder setSmallIcon(int);
+ }
+
+ public final class CarNotificationManager {
+ method public boolean areNotificationsEnabled();
+ method public void cancel(int);
+ method public void cancel(String?, int);
+ method public void cancelAll();
+ method public void createNotificationChannel(androidx.core.app.NotificationChannelCompat);
+ method public void createNotificationChannelGroup(androidx.core.app.NotificationChannelGroupCompat);
+ method public void createNotificationChannelGroups(java.util.List<androidx.core.app.NotificationChannelGroupCompat!>);
+ method public void createNotificationChannels(java.util.List<androidx.core.app.NotificationChannelCompat!>);
+ method public void deleteNotificationChannel(String);
+ method public void deleteNotificationChannelGroup(String);
+ method public void deleteUnlistedNotificationChannels(java.util.Collection<java.lang.String!>);
+ method public static androidx.car.app.notification.CarNotificationManager from(android.content.Context);
+ method public static java.util.Set<java.lang.String!> getEnabledListenerPackages(android.content.Context);
+ method public int getImportance();
+ method public androidx.core.app.NotificationChannelCompat? getNotificationChannel(String);
+ method public androidx.core.app.NotificationChannelCompat? getNotificationChannel(String, String);
+ method public androidx.core.app.NotificationChannelGroupCompat? getNotificationChannelGroup(String);
+ method public java.util.List<androidx.core.app.NotificationChannelGroupCompat!> getNotificationChannelGroups();
+ method public java.util.List<androidx.core.app.NotificationChannelCompat!> getNotificationChannels();
+ method public void notify(int, androidx.core.app.NotificationCompat.Builder);
+ method public void notify(String?, int, androidx.core.app.NotificationCompat.Builder);
+ }
+
+ public final class CarPendingIntent {
+ method public static android.app.PendingIntent getCarApp(android.content.Context, int, android.content.Intent, int);
+ }
+
+}
+
+package androidx.car.app.serialization {
+
+ public final class Bundleable implements android.os.Parcelable {
+ method public static androidx.car.app.serialization.Bundleable create(Object) throws androidx.car.app.serialization.BundlerException;
+ method public int describeContents();
+ method public Object get() throws androidx.car.app.serialization.BundlerException;
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<androidx.car.app.serialization.Bundleable!> CREATOR;
+ }
+
+ public class BundlerException extends java.lang.Exception {
+ ctor public BundlerException(String?, Throwable);
+ ctor public BundlerException(String?);
+ }
+
+}
+
+package androidx.car.app.validation {
+
+ public final class HostValidator {
+ method public java.util.Map<java.lang.String!,java.util.List<java.lang.String!>!> getAllowedHosts();
+ method public boolean isValidHost(androidx.car.app.HostInfo);
+ field public static final androidx.car.app.validation.HostValidator ALLOW_ALL_HOSTS_VALIDATOR;
+ field public static final String TEMPLATE_RENDERER_PERMISSION = "android.car.permission.TEMPLATE_RENDERER";
+ }
+
+ public static final class HostValidator.Builder {
+ ctor public HostValidator.Builder(android.content.Context);
+ method public androidx.car.app.validation.HostValidator.Builder addAllowedHost(String, String);
+ method public androidx.car.app.validation.HostValidator.Builder addAllowedHosts(@ArrayRes int);
+ method public androidx.car.app.validation.HostValidator build();
+ }
+
+}
+
+package androidx.car.app.versioning {
+
+ public final class CarAppApiLevels {
+ method public static int getLatest();
+ method public static int getOldest();
+ field public static final int LEVEL_1 = 1; // 0x1
+ field public static final int LEVEL_2 = 2; // 0x2
+ field public static final int LEVEL_3 = 3; // 0x3
+ field public static final int LEVEL_4 = 4; // 0x4
+ }
+
+}
+
diff --git a/car/app/app/api/restricted_1.2.0-beta02.txt b/car/app/app/api/restricted_1.2.0-beta02.txt
new file mode 100644
index 0000000..a6a92f8
--- /dev/null
+++ b/car/app/app/api/restricted_1.2.0-beta02.txt
@@ -0,0 +1,1441 @@
+// Signature format: 4.0
+package androidx.car.app {
+
+ @androidx.car.app.annotations.CarProtocol public final class AppInfo {
+ ctor @VisibleForTesting public AppInfo(int, int, String);
+ method public int getLatestCarAppApiLevel();
+ method public String getLibraryDisplayVersion();
+ method public int getMinCarAppApiLevel();
+ field public static final String MIN_API_LEVEL_METADATA_KEY = "androidx.car.app.minCarApiLevel";
+ }
+
+ public class AppManager implements androidx.car.app.managers.Manager {
+ method public void invalidate();
+ method public void setSurfaceCallback(androidx.car.app.SurfaceCallback?);
+ method public void showToast(CharSequence, int);
+ }
+
+ public final class CarAppPermission {
+ method public static void checkHasLibraryPermission(android.content.Context, String);
+ method public static void checkHasPermission(android.content.Context, String);
+ field public static final String ACCESS_SURFACE = "androidx.car.app.ACCESS_SURFACE";
+ field public static final String MAP_TEMPLATES = "androidx.car.app.MAP_TEMPLATES";
+ field public static final String NAVIGATION_TEMPLATES = "androidx.car.app.NAVIGATION_TEMPLATES";
+ }
+
+ public abstract class CarAppService extends android.app.Service {
+ ctor public CarAppService();
+ method public abstract androidx.car.app.validation.HostValidator createHostValidator();
+ method @CallSuper public final void dump(java.io.FileDescriptor, java.io.PrintWriter, String![]?);
+ method public final androidx.car.app.Session? getCurrentSession();
+ method public final androidx.car.app.HostInfo? getHostInfo();
+ method @CallSuper public final android.os.IBinder onBind(android.content.Intent);
+ method public abstract androidx.car.app.Session onCreateSession();
+ method public final boolean onUnbind(android.content.Intent);
+ field public static final String CATEGORY_CHARGING_APP = "androidx.car.app.category.CHARGING";
+ field public static final String CATEGORY_NAVIGATION_APP = "androidx.car.app.category.NAVIGATION";
+ field public static final String CATEGORY_PARKING_APP = "androidx.car.app.category.PARKING";
+ field public static final String SERVICE_INTERFACE = "androidx.car.app.CarAppService";
+ }
+
+ public class CarContext extends android.content.ContextWrapper {
+ method public void finishCarApp();
+ method @androidx.car.app.annotations.RequiresCarApi(2) public android.content.ComponentName? getCallingComponent();
+ method public int getCarAppApiLevel();
+ method public Object getCarService(String);
+ method public <T> T getCarService(Class<T!>);
+ method public String getCarServiceName(Class<?>);
+ method public androidx.car.app.HostInfo? getHostInfo();
+ method public androidx.activity.OnBackPressedDispatcher getOnBackPressedDispatcher();
+ method public boolean isDarkMode();
+ method public void requestPermissions(java.util.List<java.lang.String!>, androidx.car.app.OnRequestPermissionsListener);
+ method public void requestPermissions(java.util.List<java.lang.String!>, java.util.concurrent.Executor, androidx.car.app.OnRequestPermissionsListener);
+ method @androidx.car.app.annotations.RequiresCarApi(2) public void setCarAppResult(int, android.content.Intent?);
+ method public void startCarApp(android.content.Intent);
+ method @Deprecated public static void startCarApp(android.content.Intent, android.content.Intent);
+ field public static final String ACTION_NAVIGATE = "androidx.car.app.action.NAVIGATE";
+ field public static final String APP_SERVICE = "app";
+ field public static final String CAR_SERVICE = "car";
+ field @androidx.car.app.annotations.RequiresCarApi(2) public static final String CONSTRAINT_SERVICE = "constraints";
+ field public static final String EXTRA_START_CAR_APP_BINDER_KEY = "androidx.car.app.extra.START_CAR_APP_BINDER_KEY";
+ field @androidx.car.app.annotations.RequiresCarApi(3) public static final String HARDWARE_SERVICE = "hardware";
+ field public static final String NAVIGATION_SERVICE = "navigation";
+ field public static final String SCREEN_SERVICE = "screen";
+ }
+
+ public final class CarToast {
+ method public static androidx.car.app.CarToast makeText(androidx.car.app.CarContext, @StringRes int, int);
+ method public static androidx.car.app.CarToast makeText(androidx.car.app.CarContext, CharSequence, int);
+ method public void setDuration(int);
+ method public void setText(@StringRes int);
+ method public void setText(CharSequence);
+ method public void show();
+ field public static final int LENGTH_LONG = 1; // 0x1
+ field public static final int LENGTH_SHORT = 0; // 0x0
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class FailureResponse {
+ ctor public FailureResponse(Throwable);
+ method public int getErrorType();
+ method public String getStackTrace();
+ field public static final int BUNDLER_EXCEPTION = 1; // 0x1
+ field public static final int ILLEGAL_STATE_EXCEPTION = 2; // 0x2
+ field public static final int INVALID_PARAMETER_EXCEPTION = 3; // 0x3
+ field public static final int REMOTE_EXCEPTION = 6; // 0x6
+ field public static final int RUNTIME_EXCEPTION = 5; // 0x5
+ field public static final int SECURITY_EXCEPTION = 4; // 0x4
+ field public static final int UNKNOWN_ERROR = 0; // 0x0
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class HandshakeInfo {
+ ctor public HandshakeInfo(String, int);
+ method public int getHostCarAppApiLevel();
+ method public String getHostPackageName();
+ }
+
+ public final class HostException extends java.lang.RuntimeException {
+ ctor public HostException(String);
+ ctor public HostException(String, Throwable);
+ ctor public HostException(Throwable);
+ }
+
+ public final class HostInfo {
+ ctor public HostInfo(String, int);
+ method public String getPackageName();
+ method public int getUid();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface OnDoneCallback {
+ method public default void onFailure(androidx.car.app.serialization.Bundleable);
+ method public default void onSuccess(androidx.car.app.serialization.Bundleable?);
+ }
+
+ public interface OnRequestPermissionsListener {
+ method public void onRequestPermissionsResult(java.util.List<java.lang.String!>, java.util.List<java.lang.String!>);
+ }
+
+ public interface OnScreenResultListener {
+ method public void onScreenResult(Object?);
+ }
+
+ public abstract class Screen implements androidx.lifecycle.LifecycleOwner {
+ ctor protected Screen(androidx.car.app.CarContext);
+ method public final void finish();
+ method public final androidx.car.app.CarContext getCarContext();
+ method public final androidx.lifecycle.Lifecycle getLifecycle();
+ method public String? getMarker();
+ method public final androidx.car.app.ScreenManager getScreenManager();
+ method public final void invalidate();
+ method public abstract androidx.car.app.model.Template onGetTemplate();
+ method public void setMarker(String?);
+ method public void setResult(Object?);
+ }
+
+ @MainThread public class ScreenManager implements androidx.car.app.managers.Manager {
+ method public int getStackSize();
+ method public androidx.car.app.Screen getTop();
+ method public void pop();
+ method public void popTo(String);
+ method public void popToRoot();
+ method public void push(androidx.car.app.Screen);
+ method public void pushForResult(androidx.car.app.Screen, androidx.car.app.OnScreenResultListener);
+ method public void remove(androidx.car.app.Screen);
+ }
+
+ public abstract class Session implements androidx.lifecycle.LifecycleOwner {
+ ctor public Session();
+ method public final androidx.car.app.CarContext getCarContext();
+ method public androidx.lifecycle.Lifecycle getLifecycle();
+ method public void onCarConfigurationChanged(android.content.res.Configuration);
+ method public abstract androidx.car.app.Screen onCreateScreen(android.content.Intent);
+ method public void onNewIntent(android.content.Intent);
+ }
+
+ public interface SurfaceCallback {
+ method @androidx.car.app.annotations.RequiresCarApi(2) public default void onFling(float, float);
+ method @androidx.car.app.annotations.RequiresCarApi(2) public default void onScale(float, float, float);
+ method @androidx.car.app.annotations.RequiresCarApi(2) public default void onScroll(float, float);
+ method public default void onStableAreaChanged(android.graphics.Rect);
+ method public default void onSurfaceAvailable(androidx.car.app.SurfaceContainer);
+ method public default void onSurfaceDestroyed(androidx.car.app.SurfaceContainer);
+ method public default void onVisibleAreaChanged(android.graphics.Rect);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class SurfaceContainer {
+ ctor public SurfaceContainer(android.view.Surface?, int, int, int);
+ method public int getDpi();
+ method public int getHeight();
+ method public android.view.Surface? getSurface();
+ method public int getWidth();
+ }
+
+}
+
+package androidx.car.app.annotations {
+
+ @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) @java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE, java.lang.annotation.ElementType.PARAMETER}) public @interface CarProtocol {
+ }
+
+ @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE, java.lang.annotation.ElementType.CONSTRUCTOR, java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.METHOD}) public @interface RequiresCarApi {
+ method public abstract int value();
+ }
+
+}
+
+package androidx.car.app.connection {
+
+ public final class CarConnection {
+ ctor public CarConnection(android.content.Context);
+ method public androidx.lifecycle.LiveData<java.lang.Integer!> getType();
+ field public static final String ACTION_CAR_CONNECTION_UPDATED = "androidx.car.app.connection.action.CAR_CONNECTION_UPDATED";
+ field public static final String CAR_CONNECTION_STATE = "CarConnectionState";
+ field public static final int CONNECTION_TYPE_NATIVE = 1; // 0x1
+ field public static final int CONNECTION_TYPE_NOT_CONNECTED = 0; // 0x0
+ field public static final int CONNECTION_TYPE_PROJECTION = 2; // 0x2
+ }
+
+}
+
+package androidx.car.app.constraints {
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public class ConstraintManager implements androidx.car.app.managers.Manager {
+ method public int getContentLimit(int);
+ field public static final int CONTENT_LIMIT_TYPE_GRID = 1; // 0x1
+ field public static final int CONTENT_LIMIT_TYPE_LIST = 0; // 0x0
+ field public static final int CONTENT_LIMIT_TYPE_PANE = 4; // 0x4
+ field public static final int CONTENT_LIMIT_TYPE_PLACE_LIST = 2; // 0x2
+ field public static final int CONTENT_LIMIT_TYPE_ROUTE_LIST = 3; // 0x3
+ }
+
+}
+
+package androidx.car.app.hardware {
+
+ @MainThread @androidx.car.app.annotations.RequiresCarApi(3) public interface CarHardwareManager extends androidx.car.app.managers.Manager {
+ method public default androidx.car.app.hardware.info.CarInfo getCarInfo();
+ method public default androidx.car.app.hardware.info.CarSensors getCarSensors();
+ }
+
+}
+
+package androidx.car.app.hardware.common {
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class CarUnit {
+ method public static String toString(int);
+ field public static final int KILOMETER = 3; // 0x3
+ field public static final int KILOMETERS_PER_HOUR = 102; // 0x66
+ field public static final int METER = 2; // 0x2
+ field public static final int METERS_PER_SEC = 101; // 0x65
+ field public static final int MILE = 4; // 0x4
+ field public static final int MILES_PER_HOUR = 103; // 0x67
+ field public static final int MILLIMETER = 1; // 0x1
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class CarValue<T> {
+ ctor public CarValue(T?, long, int);
+ method public int getStatus();
+ method public long getTimestampMillis();
+ method public T? getValue();
+ field public static final int STATUS_SUCCESS = 1; // 0x1
+ field public static final int STATUS_UNAVAILABLE = 3; // 0x3
+ field public static final int STATUS_UNIMPLEMENTED = 2; // 0x2
+ field public static final int STATUS_UNKNOWN = 0; // 0x0
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public interface OnCarDataAvailableListener<T> {
+ method public void onCarDataAvailable(T);
+ }
+
+}
+
+package androidx.car.app.hardware.info {
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class Accelerometer {
+ ctor public Accelerometer(androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Float!>!>);
+ method public androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Float!>!> getForces();
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class CarHardwareLocation {
+ ctor public CarHardwareLocation(androidx.car.app.hardware.common.CarValue<android.location.Location!>);
+ method public androidx.car.app.hardware.common.CarValue<android.location.Location!> getLocation();
+ }
+
+ @MainThread @androidx.car.app.annotations.RequiresCarApi(3) public interface CarInfo {
+ method public void addEnergyLevelListener(java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.EnergyLevel!>);
+ method public void addMileageListener(java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Mileage!>);
+ method public void addSpeedListener(java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Speed!>);
+ method public void addTollListener(java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.TollCard!>);
+ method public void fetchEnergyProfile(java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.EnergyProfile!>);
+ method public void fetchModel(java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Model!>);
+ method public void removeEnergyLevelListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.EnergyLevel!>);
+ method public void removeMileageListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Mileage!>);
+ method public void removeSpeedListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Speed!>);
+ method public void removeTollListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.TollCard!>);
+ }
+
+ @MainThread @androidx.car.app.annotations.RequiresCarApi(3) public interface CarSensors {
+ method public void addAccelerometerListener(int, java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Accelerometer!>);
+ method public void addCarHardwareLocationListener(int, java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.CarHardwareLocation!>);
+ method public void addCompassListener(int, java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Compass!>);
+ method public void addGyroscopeListener(int, java.util.concurrent.Executor, androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Gyroscope!>);
+ method public void removeAccelerometerListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Accelerometer!>);
+ method public void removeCarHardwareLocationListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.CarHardwareLocation!>);
+ method public void removeCompassListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Compass!>);
+ method public void removeGyroscopeListener(androidx.car.app.hardware.common.OnCarDataAvailableListener<androidx.car.app.hardware.info.Gyroscope!>);
+ field public static final int UPDATE_RATE_FASTEST = 3; // 0x3
+ field public static final int UPDATE_RATE_NORMAL = 1; // 0x1
+ field public static final int UPDATE_RATE_UI = 2; // 0x2
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class Compass {
+ ctor public Compass(androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Float!>!>);
+ method public androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Float!>!> getOrientations();
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class EnergyLevel {
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Float!> getBatteryPercent();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Integer!> getDistanceDisplayUnit();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Boolean!> getEnergyIsLow();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Float!> getFuelPercent();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Float!> getRangeRemainingMeters();
+ }
+
+ public static final class EnergyLevel.Builder {
+ ctor public EnergyLevel.Builder();
+ method public androidx.car.app.hardware.info.EnergyLevel build();
+ method public androidx.car.app.hardware.info.EnergyLevel.Builder setBatteryPercent(androidx.car.app.hardware.common.CarValue<java.lang.Float!>);
+ method public androidx.car.app.hardware.info.EnergyLevel.Builder setDistanceDisplayUnit(androidx.car.app.hardware.common.CarValue<java.lang.Integer!>);
+ method public androidx.car.app.hardware.info.EnergyLevel.Builder setEnergyIsLow(androidx.car.app.hardware.common.CarValue<java.lang.Boolean!>);
+ method public androidx.car.app.hardware.info.EnergyLevel.Builder setFuelPercent(androidx.car.app.hardware.common.CarValue<java.lang.Float!>);
+ method public androidx.car.app.hardware.info.EnergyLevel.Builder setRangeRemainingMeters(androidx.car.app.hardware.common.CarValue<java.lang.Float!>);
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class EnergyProfile {
+ method public androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Integer!>!> getEvConnectorTypes();
+ method public androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Integer!>!> getFuelTypes();
+ field public static final int EVCONNECTOR_TYPE_CHADEMO = 3; // 0x3
+ field public static final int EVCONNECTOR_TYPE_COMBO_1 = 4; // 0x4
+ field public static final int EVCONNECTOR_TYPE_COMBO_2 = 5; // 0x5
+ field public static final int EVCONNECTOR_TYPE_GBT = 9; // 0x9
+ field public static final int EVCONNECTOR_TYPE_GBT_DC = 10; // 0xa
+ field public static final int EVCONNECTOR_TYPE_J1772 = 1; // 0x1
+ field public static final int EVCONNECTOR_TYPE_MENNEKES = 2; // 0x2
+ field public static final int EVCONNECTOR_TYPE_OTHER = 101; // 0x65
+ field public static final int EVCONNECTOR_TYPE_SCAME = 11; // 0xb
+ field public static final int EVCONNECTOR_TYPE_TESLA_HPWC = 7; // 0x7
+ field public static final int EVCONNECTOR_TYPE_TESLA_ROADSTER = 6; // 0x6
+ field public static final int EVCONNECTOR_TYPE_TESLA_SUPERCHARGER = 8; // 0x8
+ field public static final int EVCONNECTOR_TYPE_UNKNOWN = 0; // 0x0
+ field public static final int FUEL_TYPE_BIODIESEL = 5; // 0x5
+ field public static final int FUEL_TYPE_CNG = 8; // 0x8
+ field public static final int FUEL_TYPE_DIESEL_1 = 3; // 0x3
+ field public static final int FUEL_TYPE_DIESEL_2 = 4; // 0x4
+ field public static final int FUEL_TYPE_E85 = 6; // 0x6
+ field public static final int FUEL_TYPE_ELECTRIC = 10; // 0xa
+ field public static final int FUEL_TYPE_HYDROGEN = 11; // 0xb
+ field public static final int FUEL_TYPE_LEADED = 2; // 0x2
+ field public static final int FUEL_TYPE_LNG = 9; // 0x9
+ field public static final int FUEL_TYPE_LPG = 7; // 0x7
+ field public static final int FUEL_TYPE_OTHER = 12; // 0xc
+ field public static final int FUEL_TYPE_UNKNOWN = 0; // 0x0
+ field public static final int FUEL_TYPE_UNLEADED = 1; // 0x1
+ }
+
+ public static final class EnergyProfile.Builder {
+ ctor public EnergyProfile.Builder();
+ method public androidx.car.app.hardware.info.EnergyProfile build();
+ method public androidx.car.app.hardware.info.EnergyProfile.Builder setEvConnectorTypes(androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Integer!>!>);
+ method public androidx.car.app.hardware.info.EnergyProfile.Builder setFuelTypes(androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Integer!>!>);
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class Gyroscope {
+ ctor public Gyroscope(androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Float!>!>);
+ method public androidx.car.app.hardware.common.CarValue<java.util.List<java.lang.Float!>!> getRotations();
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class Mileage {
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Integer!> getDistanceDisplayUnit();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Float!> getOdometerMeters();
+ }
+
+ public static final class Mileage.Builder {
+ ctor public Mileage.Builder();
+ method public androidx.car.app.hardware.info.Mileage build();
+ method public androidx.car.app.hardware.info.Mileage.Builder setDistanceDisplayUnit(androidx.car.app.hardware.common.CarValue<java.lang.Integer!>);
+ method public androidx.car.app.hardware.info.Mileage.Builder setOdometerMeters(androidx.car.app.hardware.common.CarValue<java.lang.Float!>);
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class Model {
+ method public androidx.car.app.hardware.common.CarValue<java.lang.String!> getManufacturer();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.String!> getName();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Integer!> getYear();
+ }
+
+ public static final class Model.Builder {
+ ctor public Model.Builder();
+ method public androidx.car.app.hardware.info.Model build();
+ method public androidx.car.app.hardware.info.Model.Builder setManufacturer(androidx.car.app.hardware.common.CarValue<java.lang.String!>);
+ method public androidx.car.app.hardware.info.Model.Builder setName(androidx.car.app.hardware.common.CarValue<java.lang.String!>);
+ method public androidx.car.app.hardware.info.Model.Builder setYear(androidx.car.app.hardware.common.CarValue<java.lang.Integer!>);
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class Speed {
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Float!> getDisplaySpeedMetersPerSecond();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Float!> getRawSpeedMetersPerSecond();
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Integer!> getSpeedDisplayUnit();
+ }
+
+ public static final class Speed.Builder {
+ ctor public Speed.Builder();
+ method public androidx.car.app.hardware.info.Speed build();
+ method public androidx.car.app.hardware.info.Speed.Builder setDisplaySpeedMetersPerSecond(androidx.car.app.hardware.common.CarValue<java.lang.Float!>);
+ method public androidx.car.app.hardware.info.Speed.Builder setRawSpeedMetersPerSecond(androidx.car.app.hardware.common.CarValue<java.lang.Float!>);
+ method public androidx.car.app.hardware.info.Speed.Builder setSpeedDisplayUnit(androidx.car.app.hardware.common.CarValue<java.lang.Integer!>);
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(3) public final class TollCard {
+ method public androidx.car.app.hardware.common.CarValue<java.lang.Integer!> getCardState();
+ field public static final int TOLLCARD_STATE_INVALID = 2; // 0x2
+ field public static final int TOLLCARD_STATE_NOT_INSERTED = 3; // 0x3
+ field public static final int TOLLCARD_STATE_UNKNOWN = 0; // 0x0
+ field public static final int TOLLCARD_STATE_VALID = 1; // 0x1
+ }
+
+ public static final class TollCard.Builder {
+ ctor public TollCard.Builder();
+ method public androidx.car.app.hardware.info.TollCard build();
+ method public androidx.car.app.hardware.info.TollCard.Builder setCardState(androidx.car.app.hardware.common.CarValue<java.lang.Integer!>);
+ }
+
+}
+
+package androidx.car.app.managers {
+
+ public interface Manager {
+ }
+
+}
+
+package androidx.car.app.model {
+
+ @androidx.car.app.annotations.CarProtocol public final class Action {
+ method public androidx.car.app.model.CarColor? getBackgroundColor();
+ method @androidx.car.app.annotations.RequiresCarApi(4) public int getFlags();
+ method public androidx.car.app.model.CarIcon? getIcon();
+ method public androidx.car.app.model.OnClickDelegate? getOnClickDelegate();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public int getType();
+ method public boolean isStandard();
+ method public static String typeToString(int);
+ field public static final androidx.car.app.model.Action APP_ICON;
+ field public static final androidx.car.app.model.Action BACK;
+ field @androidx.car.app.annotations.RequiresCarApi(4) public static final int FLAG_PRIMARY = 1; // 0x1
+ field public static final androidx.car.app.model.Action PAN;
+ field public static final int TYPE_APP_ICON = 65538; // 0x10002
+ field public static final int TYPE_BACK = 65539; // 0x10003
+ field public static final int TYPE_CUSTOM = 1; // 0x1
+ field public static final int TYPE_PAN = 65540; // 0x10004
+ }
+
+ public static final class Action.Builder {
+ ctor public Action.Builder();
+ ctor @androidx.car.app.annotations.RequiresCarApi(2) public Action.Builder(androidx.car.app.model.Action);
+ method public androidx.car.app.model.Action build();
+ method public androidx.car.app.model.Action.Builder setBackgroundColor(androidx.car.app.model.CarColor);
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.model.Action.Builder setFlags(int);
+ method public androidx.car.app.model.Action.Builder setIcon(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.model.Action.Builder setOnClickListener(androidx.car.app.model.OnClickListener);
+ method public androidx.car.app.model.Action.Builder setTitle(CharSequence);
+ method public androidx.car.app.model.Action.Builder setTitle(androidx.car.app.model.CarText);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class ActionStrip {
+ method public java.util.List<androidx.car.app.model.Action!> getActions();
+ method public androidx.car.app.model.Action? getFirstActionOfType(int);
+ }
+
+ public static final class ActionStrip.Builder {
+ ctor public ActionStrip.Builder();
+ method public androidx.car.app.model.ActionStrip.Builder addAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.ActionStrip build();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class CarColor {
+ method public static androidx.car.app.model.CarColor createCustom(@ColorInt int, @ColorInt int);
+ method @ColorInt public int getColor();
+ method @ColorInt public int getColorDark();
+ method public int getType();
+ field public static final androidx.car.app.model.CarColor BLUE;
+ field public static final androidx.car.app.model.CarColor DEFAULT;
+ field public static final androidx.car.app.model.CarColor GREEN;
+ field public static final androidx.car.app.model.CarColor PRIMARY;
+ field public static final androidx.car.app.model.CarColor RED;
+ field public static final androidx.car.app.model.CarColor SECONDARY;
+ field public static final int TYPE_BLUE = 6; // 0x6
+ field public static final int TYPE_CUSTOM = 0; // 0x0
+ field public static final int TYPE_DEFAULT = 1; // 0x1
+ field public static final int TYPE_GREEN = 5; // 0x5
+ field public static final int TYPE_PRIMARY = 2; // 0x2
+ field public static final int TYPE_RED = 4; // 0x4
+ field public static final int TYPE_SECONDARY = 3; // 0x3
+ field public static final int TYPE_YELLOW = 7; // 0x7
+ field public static final androidx.car.app.model.CarColor YELLOW;
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class CarIcon {
+ method public androidx.core.graphics.drawable.IconCompat? getIcon();
+ method public androidx.car.app.model.CarColor? getTint();
+ method public int getType();
+ field public static final androidx.car.app.model.CarIcon ALERT;
+ field public static final androidx.car.app.model.CarIcon APP_ICON;
+ field public static final androidx.car.app.model.CarIcon BACK;
+ field public static final androidx.car.app.model.CarIcon ERROR;
+ field @androidx.car.app.annotations.RequiresCarApi(2) public static final androidx.car.app.model.CarIcon PAN;
+ field public static final int TYPE_ALERT = 4; // 0x4
+ field public static final int TYPE_APP_ICON = 5; // 0x5
+ field public static final int TYPE_BACK = 3; // 0x3
+ field public static final int TYPE_CUSTOM = 1; // 0x1
+ field public static final int TYPE_ERROR = 6; // 0x6
+ field public static final int TYPE_PAN = 7; // 0x7
+ }
+
+ public static final class CarIcon.Builder {
+ ctor public CarIcon.Builder(androidx.core.graphics.drawable.IconCompat);
+ ctor public CarIcon.Builder(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.model.CarIcon build();
+ method public androidx.car.app.model.CarIcon.Builder setTint(androidx.car.app.model.CarColor);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class CarIconSpan extends androidx.car.app.model.CarSpan {
+ method public static androidx.car.app.model.CarIconSpan create(androidx.car.app.model.CarIcon);
+ method public static androidx.car.app.model.CarIconSpan create(androidx.car.app.model.CarIcon, int);
+ method public int getAlignment();
+ method public androidx.car.app.model.CarIcon getIcon();
+ field public static final int ALIGN_BASELINE = 1; // 0x1
+ field public static final int ALIGN_BOTTOM = 0; // 0x0
+ field public static final int ALIGN_CENTER = 2; // 0x2
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class CarLocation {
+ method public static androidx.car.app.model.CarLocation create(double, double);
+ method public static androidx.car.app.model.CarLocation create(android.location.Location);
+ method public double getLatitude();
+ method public double getLongitude();
+ }
+
+ @Keep @androidx.car.app.annotations.CarProtocol public class CarSpan extends android.text.style.CharacterStyle {
+ ctor public CarSpan();
+ method public void updateDrawState(android.text.TextPaint);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class CarText {
+ method public static androidx.car.app.model.CarText create(CharSequence);
+ method public java.util.List<java.lang.CharSequence!> getVariants();
+ method public boolean isEmpty();
+ method public static boolean isNullOrEmpty(androidx.car.app.model.CarText?);
+ method public CharSequence toCharSequence();
+ }
+
+ public static final class CarText.Builder {
+ ctor public CarText.Builder(CharSequence);
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.model.CarText.Builder addVariant(CharSequence);
+ method public androidx.car.app.model.CarText build();
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(2) public final class ClickableSpan extends androidx.car.app.model.CarSpan {
+ method public static androidx.car.app.model.ClickableSpan create(androidx.car.app.model.OnClickListener);
+ method public androidx.car.app.model.OnClickDelegate getOnClickDelegate();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class DateTimeWithZone {
+ method public static androidx.car.app.model.DateTimeWithZone create(long, @IntRange(from=0xffff02e0, to=64800) int, String);
+ method public static androidx.car.app.model.DateTimeWithZone create(long, java.util.TimeZone);
+ method @RequiresApi(26) public static androidx.car.app.model.DateTimeWithZone create(java.time.ZonedDateTime);
+ method public long getTimeSinceEpochMillis();
+ method public int getZoneOffsetSeconds();
+ method public String? getZoneShortName();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Distance {
+ method public static androidx.car.app.model.Distance create(double, int);
+ method public double getDisplayDistance();
+ method public int getDisplayUnit();
+ field public static final int UNIT_FEET = 6; // 0x6
+ field public static final int UNIT_KILOMETERS = 2; // 0x2
+ field public static final int UNIT_KILOMETERS_P1 = 3; // 0x3
+ field public static final int UNIT_METERS = 1; // 0x1
+ field public static final int UNIT_MILES = 4; // 0x4
+ field public static final int UNIT_MILES_P1 = 5; // 0x5
+ field public static final int UNIT_YARDS = 7; // 0x7
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class DistanceSpan extends androidx.car.app.model.CarSpan {
+ method public static androidx.car.app.model.DistanceSpan create(androidx.car.app.model.Distance);
+ method public androidx.car.app.model.Distance getDistance();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class DurationSpan extends androidx.car.app.model.CarSpan {
+ method public static androidx.car.app.model.DurationSpan create(long);
+ method @RequiresApi(26) public static androidx.car.app.model.DurationSpan create(java.time.Duration);
+ method public long getDurationSeconds();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class ForegroundCarColorSpan extends androidx.car.app.model.CarSpan {
+ method public static androidx.car.app.model.ForegroundCarColorSpan create(androidx.car.app.model.CarColor);
+ method public androidx.car.app.model.CarColor getColor();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class GridItem implements androidx.car.app.model.Item {
+ method public androidx.car.app.model.CarIcon? getImage();
+ method public int getImageType();
+ method public androidx.car.app.model.OnClickDelegate? getOnClickDelegate();
+ method public androidx.car.app.model.CarText? getText();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public boolean isLoading();
+ field public static final int IMAGE_TYPE_ICON = 1; // 0x1
+ field public static final int IMAGE_TYPE_LARGE = 2; // 0x2
+ }
+
+ public static final class GridItem.Builder {
+ ctor public GridItem.Builder();
+ method public androidx.car.app.model.GridItem build();
+ method public androidx.car.app.model.GridItem.Builder setImage(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.model.GridItem.Builder setImage(androidx.car.app.model.CarIcon, int);
+ method public androidx.car.app.model.GridItem.Builder setLoading(boolean);
+ method public androidx.car.app.model.GridItem.Builder setOnClickListener(androidx.car.app.model.OnClickListener);
+ method public androidx.car.app.model.GridItem.Builder setText(CharSequence);
+ method public androidx.car.app.model.GridItem.Builder setText(androidx.car.app.model.CarText);
+ method public androidx.car.app.model.GridItem.Builder setTitle(CharSequence);
+ method public androidx.car.app.model.GridItem.Builder setTitle(androidx.car.app.model.CarText);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class GridTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.ItemList? getSingleList();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public boolean isLoading();
+ }
+
+ public static final class GridTemplate.Builder {
+ ctor public GridTemplate.Builder();
+ method public androidx.car.app.model.GridTemplate build();
+ method public androidx.car.app.model.GridTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.GridTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.GridTemplate.Builder setLoading(boolean);
+ method public androidx.car.app.model.GridTemplate.Builder setSingleList(androidx.car.app.model.ItemList);
+ method public androidx.car.app.model.GridTemplate.Builder setTitle(CharSequence);
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public interface InputCallback {
+ method public default void onInputSubmitted(String);
+ method public default void onInputTextChanged(String);
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public interface InputCallbackDelegate {
+ method public void sendInputSubmitted(String, androidx.car.app.OnDoneCallback);
+ method public void sendInputTextChanged(String, androidx.car.app.OnDoneCallback);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface Item {
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class ItemList {
+ method public java.util.List<androidx.car.app.model.Item!> getItems();
+ method public androidx.car.app.model.CarText? getNoItemsMessage();
+ method public androidx.car.app.model.OnItemVisibilityChangedDelegate? getOnItemVisibilityChangedDelegate();
+ method public androidx.car.app.model.OnSelectedDelegate? getOnSelectedDelegate();
+ method public int getSelectedIndex();
+ }
+
+ public static final class ItemList.Builder {
+ ctor public ItemList.Builder();
+ method public androidx.car.app.model.ItemList.Builder addItem(androidx.car.app.model.Item);
+ method public androidx.car.app.model.ItemList build();
+ method public androidx.car.app.model.ItemList.Builder setNoItemsMessage(CharSequence);
+ method public androidx.car.app.model.ItemList.Builder setOnItemsVisibilityChangedListener(androidx.car.app.model.ItemList.OnItemVisibilityChangedListener);
+ method public androidx.car.app.model.ItemList.Builder setOnSelectedListener(androidx.car.app.model.ItemList.OnSelectedListener);
+ method public androidx.car.app.model.ItemList.Builder setSelectedIndex(@IntRange(from=0) int);
+ }
+
+ public static interface ItemList.OnItemVisibilityChangedListener {
+ method public void onItemVisibilityChanged(int, int);
+ }
+
+ public static interface ItemList.OnSelectedListener {
+ method public void onSelected(int);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class ListTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public java.util.List<androidx.car.app.model.SectionedItemList!> getSectionedLists();
+ method public androidx.car.app.model.ItemList? getSingleList();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public boolean isLoading();
+ }
+
+ public static final class ListTemplate.Builder {
+ ctor public ListTemplate.Builder();
+ method public androidx.car.app.model.ListTemplate.Builder addSectionedList(androidx.car.app.model.SectionedItemList);
+ method public androidx.car.app.model.ListTemplate build();
+ method public androidx.car.app.model.ListTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.ListTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.ListTemplate.Builder setLoading(boolean);
+ method public androidx.car.app.model.ListTemplate.Builder setSingleList(androidx.car.app.model.ItemList);
+ method public androidx.car.app.model.ListTemplate.Builder setTitle(CharSequence);
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public final class LongMessageTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public java.util.List<androidx.car.app.model.Action!> getActions();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.CarText getMessage();
+ method public androidx.car.app.model.CarText? getTitle();
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public static final class LongMessageTemplate.Builder {
+ ctor public LongMessageTemplate.Builder(CharSequence);
+ method public androidx.car.app.model.LongMessageTemplate.Builder addAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.LongMessageTemplate build();
+ method public androidx.car.app.model.LongMessageTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.LongMessageTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.LongMessageTemplate.Builder setTitle(CharSequence);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class MessageTemplate implements androidx.car.app.model.Template {
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public java.util.List<androidx.car.app.model.Action!> getActions();
+ method public androidx.car.app.model.CarText? getDebugMessage();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.CarIcon? getIcon();
+ method public androidx.car.app.model.CarText getMessage();
+ method public androidx.car.app.model.CarText? getTitle();
+ method @androidx.car.app.annotations.RequiresCarApi(2) public boolean isLoading();
+ }
+
+ public static final class MessageTemplate.Builder {
+ ctor public MessageTemplate.Builder(CharSequence);
+ ctor public MessageTemplate.Builder(androidx.car.app.model.CarText);
+ method public androidx.car.app.model.MessageTemplate.Builder addAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.MessageTemplate build();
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.model.MessageTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.MessageTemplate.Builder setDebugMessage(Throwable);
+ method public androidx.car.app.model.MessageTemplate.Builder setDebugMessage(String);
+ method public androidx.car.app.model.MessageTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.MessageTemplate.Builder setIcon(androidx.car.app.model.CarIcon);
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.model.MessageTemplate.Builder setLoading(boolean);
+ method public androidx.car.app.model.MessageTemplate.Builder setTitle(CharSequence);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Metadata {
+ method public androidx.car.app.model.Place? getPlace();
+ field public static final androidx.car.app.model.Metadata EMPTY_METADATA;
+ }
+
+ public static final class Metadata.Builder {
+ ctor public Metadata.Builder();
+ ctor public Metadata.Builder(androidx.car.app.model.Metadata);
+ method public androidx.car.app.model.Metadata build();
+ method public androidx.car.app.model.Metadata.Builder setPlace(androidx.car.app.model.Place);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface OnCheckedChangeDelegate {
+ method public void sendCheckedChange(boolean, androidx.car.app.OnDoneCallback);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface OnClickDelegate {
+ method public boolean isParkedOnly();
+ method public void sendClick(androidx.car.app.OnDoneCallback);
+ }
+
+ public interface OnClickListener {
+ method public void onClick();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface OnItemVisibilityChangedDelegate {
+ method public void sendItemVisibilityChanged(int, int, androidx.car.app.OnDoneCallback);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface OnSelectedDelegate {
+ method public void sendSelected(int, androidx.car.app.OnDoneCallback);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Pane {
+ method public java.util.List<androidx.car.app.model.Action!> getActions();
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.model.CarIcon? getImage();
+ method public java.util.List<androidx.car.app.model.Row!> getRows();
+ method public boolean isLoading();
+ }
+
+ public static final class Pane.Builder {
+ ctor public Pane.Builder();
+ method public androidx.car.app.model.Pane.Builder addAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.Pane.Builder addRow(androidx.car.app.model.Row);
+ method public androidx.car.app.model.Pane build();
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.model.Pane.Builder setImage(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.model.Pane.Builder setLoading(boolean);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class PaneTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.Pane getPane();
+ method public androidx.car.app.model.CarText? getTitle();
+ }
+
+ public static final class PaneTemplate.Builder {
+ ctor public PaneTemplate.Builder(androidx.car.app.model.Pane);
+ method public androidx.car.app.model.PaneTemplate build();
+ method public androidx.car.app.model.PaneTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.PaneTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.PaneTemplate.Builder setTitle(CharSequence);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class ParkedOnlyOnClickListener implements androidx.car.app.model.OnClickListener {
+ method public static androidx.car.app.model.ParkedOnlyOnClickListener create(androidx.car.app.model.OnClickListener);
+ method public void onClick();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Place {
+ method public androidx.car.app.model.CarLocation getLocation();
+ method public androidx.car.app.model.PlaceMarker? getMarker();
+ }
+
+ public static final class Place.Builder {
+ ctor public Place.Builder(androidx.car.app.model.CarLocation);
+ ctor public Place.Builder(androidx.car.app.model.Place);
+ method public androidx.car.app.model.Place build();
+ method public androidx.car.app.model.Place.Builder setMarker(androidx.car.app.model.PlaceMarker);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class PlaceListMapTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.Place? getAnchor();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.ItemList? getItemList();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public boolean isCurrentLocationEnabled();
+ method public boolean isLoading();
+ }
+
+ public static final class PlaceListMapTemplate.Builder {
+ ctor public PlaceListMapTemplate.Builder();
+ method public androidx.car.app.model.PlaceListMapTemplate build();
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setAnchor(androidx.car.app.model.Place);
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setCurrentLocationEnabled(boolean);
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setItemList(androidx.car.app.model.ItemList);
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setLoading(boolean);
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setTitle(CharSequence);
+ method public androidx.car.app.model.PlaceListMapTemplate.Builder setTitle(androidx.car.app.model.CarText);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class PlaceMarker {
+ method public androidx.car.app.model.CarColor? getColor();
+ method public androidx.car.app.model.CarIcon? getIcon();
+ method public int getIconType();
+ method public androidx.car.app.model.CarText? getLabel();
+ field public static final int TYPE_ICON = 0; // 0x0
+ field public static final int TYPE_IMAGE = 1; // 0x1
+ }
+
+ public static final class PlaceMarker.Builder {
+ ctor public PlaceMarker.Builder();
+ method public androidx.car.app.model.PlaceMarker build();
+ method public androidx.car.app.model.PlaceMarker.Builder setColor(androidx.car.app.model.CarColor);
+ method public androidx.car.app.model.PlaceMarker.Builder setIcon(androidx.car.app.model.CarIcon, int);
+ method public androidx.car.app.model.PlaceMarker.Builder setLabel(CharSequence);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Row implements androidx.car.app.model.Item {
+ method public androidx.car.app.model.CarIcon? getImage();
+ method public androidx.car.app.model.Metadata? getMetadata();
+ method public androidx.car.app.model.OnClickDelegate? getOnClickDelegate();
+ method public int getRowImageType();
+ method public java.util.List<androidx.car.app.model.CarText!> getTexts();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public androidx.car.app.model.Toggle? getToggle();
+ method public boolean isBrowsable();
+ method public androidx.car.app.model.Row row();
+ method public CharSequence yourBoat();
+ field public static final int IMAGE_TYPE_ICON = 4; // 0x4
+ field public static final int IMAGE_TYPE_LARGE = 2; // 0x2
+ field public static final int IMAGE_TYPE_SMALL = 1; // 0x1
+ }
+
+ public static final class Row.Builder {
+ ctor public Row.Builder();
+ method public androidx.car.app.model.Row.Builder addText(CharSequence);
+ method public androidx.car.app.model.Row.Builder addText(androidx.car.app.model.CarText);
+ method public androidx.car.app.model.Row build();
+ method public androidx.car.app.model.Row.Builder setBrowsable(boolean);
+ method public androidx.car.app.model.Row.Builder setImage(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.model.Row.Builder setImage(androidx.car.app.model.CarIcon, int);
+ method public androidx.car.app.model.Row.Builder setMetadata(androidx.car.app.model.Metadata);
+ method public androidx.car.app.model.Row.Builder setOnClickListener(androidx.car.app.model.OnClickListener);
+ method public androidx.car.app.model.Row.Builder setTitle(CharSequence);
+ method public androidx.car.app.model.Row.Builder setTitle(androidx.car.app.model.CarText);
+ method public androidx.car.app.model.Row.Builder setToggle(androidx.car.app.model.Toggle);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface SearchCallbackDelegate {
+ method public void sendSearchSubmitted(String, androidx.car.app.OnDoneCallback);
+ method public void sendSearchTextChanged(String, androidx.car.app.OnDoneCallback);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class SearchTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public String? getInitialSearchText();
+ method public androidx.car.app.model.ItemList? getItemList();
+ method public androidx.car.app.model.SearchCallbackDelegate getSearchCallbackDelegate();
+ method public String? getSearchHint();
+ method public boolean isLoading();
+ method public boolean isShowKeyboardByDefault();
+ }
+
+ public static final class SearchTemplate.Builder {
+ ctor public SearchTemplate.Builder(androidx.car.app.model.SearchTemplate.SearchCallback);
+ method public androidx.car.app.model.SearchTemplate build();
+ method public androidx.car.app.model.SearchTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.SearchTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.SearchTemplate.Builder setInitialSearchText(String);
+ method public androidx.car.app.model.SearchTemplate.Builder setItemList(androidx.car.app.model.ItemList);
+ method public androidx.car.app.model.SearchTemplate.Builder setLoading(boolean);
+ method public androidx.car.app.model.SearchTemplate.Builder setSearchHint(String);
+ method public androidx.car.app.model.SearchTemplate.Builder setShowKeyboardByDefault(boolean);
+ }
+
+ public static interface SearchTemplate.SearchCallback {
+ method public default void onSearchSubmitted(String);
+ method public default void onSearchTextChanged(String);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class SectionedItemList {
+ method public static androidx.car.app.model.SectionedItemList create(androidx.car.app.model.ItemList, CharSequence);
+ method public androidx.car.app.model.CarText getHeader();
+ method public androidx.car.app.model.ItemList getItemList();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public interface Template {
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class TemplateInfo {
+ ctor public TemplateInfo(Class<? extends androidx.car.app.model.Template>, String);
+ method public Class<? extends androidx.car.app.model.Template> getTemplateClass();
+ method public String getTemplateId();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class TemplateWrapper {
+ method public static androidx.car.app.model.TemplateWrapper copyOf(androidx.car.app.model.TemplateWrapper);
+ method public int getCurrentTaskStep();
+ method public String getId();
+ method public androidx.car.app.model.Template getTemplate();
+ method public java.util.List<androidx.car.app.model.TemplateInfo!> getTemplateInfosForScreenStack();
+ method public boolean isRefresh();
+ method public void setCurrentTaskStep(int);
+ method public void setId(String);
+ method public void setRefresh(boolean);
+ method public void setTemplate(androidx.car.app.model.Template);
+ method public static androidx.car.app.model.TemplateWrapper wrap(androidx.car.app.model.Template);
+ method public static androidx.car.app.model.TemplateWrapper wrap(androidx.car.app.model.Template, String);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Toggle {
+ method public androidx.car.app.model.OnCheckedChangeDelegate getOnCheckedChangeDelegate();
+ method public boolean isChecked();
+ }
+
+ public static final class Toggle.Builder {
+ ctor public Toggle.Builder(androidx.car.app.model.Toggle.OnCheckedChangeListener);
+ method public androidx.car.app.model.Toggle build();
+ method public androidx.car.app.model.Toggle.Builder setChecked(boolean);
+ }
+
+ public static interface Toggle.OnCheckedChangeListener {
+ method public void onCheckedChange(boolean);
+ }
+
+}
+
+package androidx.car.app.model.signin {
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public final class InputSignInMethod implements androidx.car.app.model.signin.SignInTemplate.SignInMethod {
+ method public androidx.car.app.model.CarText? getDefaultValue();
+ method public androidx.car.app.model.CarText? getErrorMessage();
+ method public androidx.car.app.model.CarText? getHint();
+ method public androidx.car.app.model.InputCallbackDelegate getInputCallbackDelegate();
+ method public int getInputType();
+ method public int getKeyboardType();
+ method public boolean isShowKeyboardByDefault();
+ field public static final int INPUT_TYPE_DEFAULT = 1; // 0x1
+ field public static final int INPUT_TYPE_PASSWORD = 2; // 0x2
+ field public static final int KEYBOARD_DEFAULT = 1; // 0x1
+ field public static final int KEYBOARD_EMAIL = 2; // 0x2
+ field public static final int KEYBOARD_NUMBER = 4; // 0x4
+ field public static final int KEYBOARD_PHONE = 3; // 0x3
+ }
+
+ public static final class InputSignInMethod.Builder {
+ ctor public InputSignInMethod.Builder(androidx.car.app.model.InputCallback);
+ method public androidx.car.app.model.signin.InputSignInMethod build();
+ method public androidx.car.app.model.signin.InputSignInMethod.Builder setDefaultValue(String);
+ method public androidx.car.app.model.signin.InputSignInMethod.Builder setErrorMessage(CharSequence);
+ method public androidx.car.app.model.signin.InputSignInMethod.Builder setHint(CharSequence);
+ method public androidx.car.app.model.signin.InputSignInMethod.Builder setInputType(int);
+ method public androidx.car.app.model.signin.InputSignInMethod.Builder setKeyboardType(int);
+ method public androidx.car.app.model.signin.InputSignInMethod.Builder setShowKeyboardByDefault(boolean);
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public final class PinSignInMethod implements androidx.car.app.model.signin.SignInTemplate.SignInMethod {
+ ctor public PinSignInMethod(CharSequence);
+ method public androidx.car.app.model.CarText getPinCode();
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public final class ProviderSignInMethod implements androidx.car.app.model.signin.SignInTemplate.SignInMethod {
+ ctor public ProviderSignInMethod(androidx.car.app.model.Action);
+ method public androidx.car.app.model.Action getAction();
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(4) public final class QRCodeSignInMethod implements androidx.car.app.model.signin.SignInTemplate.SignInMethod {
+ ctor public QRCodeSignInMethod(android.net.Uri);
+ method public android.net.Uri getUri();
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public final class SignInTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public java.util.List<androidx.car.app.model.Action!> getActions();
+ method public androidx.car.app.model.CarText? getAdditionalText();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.CarText? getInstructions();
+ method public androidx.car.app.model.signin.SignInTemplate.SignInMethod getSignInMethod();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public boolean isLoading();
+ }
+
+ @androidx.car.app.annotations.RequiresCarApi(2) public static final class SignInTemplate.Builder {
+ ctor public SignInTemplate.Builder(androidx.car.app.model.signin.SignInTemplate.SignInMethod);
+ method public androidx.car.app.model.signin.SignInTemplate.Builder addAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.signin.SignInTemplate build();
+ method public androidx.car.app.model.signin.SignInTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.model.signin.SignInTemplate.Builder setAdditionalText(CharSequence);
+ method public androidx.car.app.model.signin.SignInTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.model.signin.SignInTemplate.Builder setInstructions(CharSequence);
+ method public androidx.car.app.model.signin.SignInTemplate.Builder setLoading(boolean);
+ method public androidx.car.app.model.signin.SignInTemplate.Builder setTitle(CharSequence);
+ }
+
+ public static interface SignInTemplate.SignInMethod {
+ }
+
+}
+
+package androidx.car.app.navigation {
+
+ public class NavigationManager implements androidx.car.app.managers.Manager {
+ method @MainThread public void clearNavigationManagerCallback();
+ method @MainThread public void navigationEnded();
+ method @MainThread public void navigationStarted();
+ method @MainThread public void setNavigationManagerCallback(androidx.car.app.navigation.NavigationManagerCallback);
+ method @MainThread public void setNavigationManagerCallback(java.util.concurrent.Executor, androidx.car.app.navigation.NavigationManagerCallback);
+ method @MainThread public void updateTrip(androidx.car.app.navigation.model.Trip);
+ }
+
+ public interface NavigationManagerCallback {
+ method public default void onAutoDriveEnabled();
+ method public default void onStopNavigation();
+ }
+
+}
+
+package androidx.car.app.navigation.model {
+
+ @androidx.car.app.annotations.CarProtocol public final class Destination {
+ method public androidx.car.app.model.CarText? getAddress();
+ method public androidx.car.app.model.CarIcon? getImage();
+ method public androidx.car.app.model.CarText? getName();
+ }
+
+ public static final class Destination.Builder {
+ ctor public Destination.Builder();
+ method public androidx.car.app.navigation.model.Destination build();
+ method public androidx.car.app.navigation.model.Destination.Builder setAddress(CharSequence);
+ method public androidx.car.app.navigation.model.Destination.Builder setImage(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.navigation.model.Destination.Builder setName(CharSequence);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Lane {
+ method public java.util.List<androidx.car.app.navigation.model.LaneDirection!> getDirections();
+ }
+
+ public static final class Lane.Builder {
+ ctor public Lane.Builder();
+ method public androidx.car.app.navigation.model.Lane.Builder addDirection(androidx.car.app.navigation.model.LaneDirection);
+ method public androidx.car.app.navigation.model.Lane build();
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class LaneDirection {
+ method public static androidx.car.app.navigation.model.LaneDirection create(int, boolean);
+ method public int getShape();
+ method public boolean isRecommended();
+ field public static final int SHAPE_NORMAL_LEFT = 5; // 0x5
+ field public static final int SHAPE_NORMAL_RIGHT = 6; // 0x6
+ field public static final int SHAPE_SHARP_LEFT = 7; // 0x7
+ field public static final int SHAPE_SHARP_RIGHT = 8; // 0x8
+ field public static final int SHAPE_SLIGHT_LEFT = 3; // 0x3
+ field public static final int SHAPE_SLIGHT_RIGHT = 4; // 0x4
+ field public static final int SHAPE_STRAIGHT = 2; // 0x2
+ field public static final int SHAPE_UNKNOWN = 1; // 0x1
+ field public static final int SHAPE_U_TURN_LEFT = 9; // 0x9
+ field public static final int SHAPE_U_TURN_RIGHT = 10; // 0xa
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Maneuver {
+ method public androidx.car.app.model.CarIcon? getIcon();
+ method public int getRoundaboutExitAngle();
+ method public int getRoundaboutExitNumber();
+ method public int getType();
+ field public static final int TYPE_DEPART = 1; // 0x1
+ field public static final int TYPE_DESTINATION = 39; // 0x27
+ field public static final int TYPE_DESTINATION_LEFT = 41; // 0x29
+ field public static final int TYPE_DESTINATION_RIGHT = 42; // 0x2a
+ field public static final int TYPE_DESTINATION_STRAIGHT = 40; // 0x28
+ field public static final int TYPE_FERRY_BOAT = 37; // 0x25
+ field public static final int TYPE_FERRY_BOAT_LEFT = 47; // 0x2f
+ field public static final int TYPE_FERRY_BOAT_RIGHT = 48; // 0x30
+ field public static final int TYPE_FERRY_TRAIN = 38; // 0x26
+ field public static final int TYPE_FERRY_TRAIN_LEFT = 49; // 0x31
+ field public static final int TYPE_FERRY_TRAIN_RIGHT = 50; // 0x32
+ field public static final int TYPE_FORK_LEFT = 25; // 0x19
+ field public static final int TYPE_FORK_RIGHT = 26; // 0x1a
+ field public static final int TYPE_KEEP_LEFT = 3; // 0x3
+ field public static final int TYPE_KEEP_RIGHT = 4; // 0x4
+ field public static final int TYPE_MERGE_LEFT = 27; // 0x1b
+ field public static final int TYPE_MERGE_RIGHT = 28; // 0x1c
+ field public static final int TYPE_MERGE_SIDE_UNSPECIFIED = 29; // 0x1d
+ field public static final int TYPE_NAME_CHANGE = 2; // 0x2
+ field public static final int TYPE_OFF_RAMP_NORMAL_LEFT = 23; // 0x17
+ field public static final int TYPE_OFF_RAMP_NORMAL_RIGHT = 24; // 0x18
+ field public static final int TYPE_OFF_RAMP_SLIGHT_LEFT = 21; // 0x15
+ field public static final int TYPE_OFF_RAMP_SLIGHT_RIGHT = 22; // 0x16
+ field public static final int TYPE_ON_RAMP_NORMAL_LEFT = 15; // 0xf
+ field public static final int TYPE_ON_RAMP_NORMAL_RIGHT = 16; // 0x10
+ field public static final int TYPE_ON_RAMP_SHARP_LEFT = 17; // 0x11
+ field public static final int TYPE_ON_RAMP_SHARP_RIGHT = 18; // 0x12
+ field public static final int TYPE_ON_RAMP_SLIGHT_LEFT = 13; // 0xd
+ field public static final int TYPE_ON_RAMP_SLIGHT_RIGHT = 14; // 0xe
+ field public static final int TYPE_ON_RAMP_U_TURN_LEFT = 19; // 0x13
+ field public static final int TYPE_ON_RAMP_U_TURN_RIGHT = 20; // 0x14
+ field public static final int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CCW = 34; // 0x22
+ field public static final int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CCW_WITH_ANGLE = 35; // 0x23
+ field public static final int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CW = 32; // 0x20
+ field public static final int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CW_WITH_ANGLE = 33; // 0x21
+ field public static final int TYPE_ROUNDABOUT_ENTER_CCW = 45; // 0x2d
+ field public static final int TYPE_ROUNDABOUT_ENTER_CW = 43; // 0x2b
+ field public static final int TYPE_ROUNDABOUT_EXIT_CCW = 46; // 0x2e
+ field public static final int TYPE_ROUNDABOUT_EXIT_CW = 44; // 0x2c
+ field public static final int TYPE_STRAIGHT = 36; // 0x24
+ field public static final int TYPE_TURN_NORMAL_LEFT = 7; // 0x7
+ field public static final int TYPE_TURN_NORMAL_RIGHT = 8; // 0x8
+ field public static final int TYPE_TURN_SHARP_LEFT = 9; // 0x9
+ field public static final int TYPE_TURN_SHARP_RIGHT = 10; // 0xa
+ field public static final int TYPE_TURN_SLIGHT_LEFT = 5; // 0x5
+ field public static final int TYPE_TURN_SLIGHT_RIGHT = 6; // 0x6
+ field public static final int TYPE_UNKNOWN = 0; // 0x0
+ field public static final int TYPE_U_TURN_LEFT = 11; // 0xb
+ field public static final int TYPE_U_TURN_RIGHT = 12; // 0xc
+ }
+
+ public static final class Maneuver.Builder {
+ ctor public Maneuver.Builder(int);
+ method public androidx.car.app.navigation.model.Maneuver build();
+ method public androidx.car.app.navigation.model.Maneuver.Builder setIcon(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.navigation.model.Maneuver.Builder setRoundaboutExitAngle(@IntRange(from=1, to=360) int);
+ method public androidx.car.app.navigation.model.Maneuver.Builder setRoundaboutExitNumber(@IntRange(from=1) int);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class MessageInfo implements androidx.car.app.navigation.model.NavigationTemplate.NavigationInfo {
+ method public androidx.car.app.model.CarIcon? getImage();
+ method public androidx.car.app.model.CarText? getText();
+ method public androidx.car.app.model.CarText? getTitle();
+ }
+
+ public static final class MessageInfo.Builder {
+ ctor public MessageInfo.Builder(CharSequence);
+ ctor public MessageInfo.Builder(androidx.car.app.model.CarText);
+ method public androidx.car.app.navigation.model.MessageInfo build();
+ method public androidx.car.app.navigation.model.MessageInfo.Builder setImage(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.navigation.model.MessageInfo.Builder setText(CharSequence);
+ method public androidx.car.app.navigation.model.MessageInfo.Builder setText(androidx.car.app.model.CarText);
+ method public androidx.car.app.navigation.model.MessageInfo.Builder setTitle(CharSequence);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class NavigationTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.CarColor? getBackgroundColor();
+ method public androidx.car.app.navigation.model.TravelEstimate? getDestinationTravelEstimate();
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.model.ActionStrip? getMapActionStrip();
+ method public androidx.car.app.navigation.model.NavigationTemplate.NavigationInfo? getNavigationInfo();
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.navigation.model.PanModeDelegate? getPanModeDelegate();
+ method @Deprecated @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.model.Toggle? getPanModeToggle();
+ }
+
+ public static final class NavigationTemplate.Builder {
+ ctor public NavigationTemplate.Builder();
+ method public androidx.car.app.navigation.model.NavigationTemplate build();
+ method public androidx.car.app.navigation.model.NavigationTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.navigation.model.NavigationTemplate.Builder setBackgroundColor(androidx.car.app.model.CarColor);
+ method public androidx.car.app.navigation.model.NavigationTemplate.Builder setDestinationTravelEstimate(androidx.car.app.navigation.model.TravelEstimate);
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.navigation.model.NavigationTemplate.Builder setMapActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.navigation.model.NavigationTemplate.Builder setNavigationInfo(androidx.car.app.navigation.model.NavigationTemplate.NavigationInfo);
+ method @androidx.car.app.annotations.RequiresCarApi(2) public androidx.car.app.navigation.model.NavigationTemplate.Builder setPanModeListener(androidx.car.app.navigation.model.PanModeListener);
+ }
+
+ public static interface NavigationTemplate.NavigationInfo {
+ }
+
+ @androidx.car.app.annotations.CarProtocol @androidx.car.app.annotations.RequiresCarApi(2) public interface PanModeDelegate {
+ method public void sendPanModeChanged(boolean, androidx.car.app.OnDoneCallback);
+ }
+
+ public interface PanModeListener {
+ method public void onPanModeChanged(boolean);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class PlaceListNavigationTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.ItemList? getItemList();
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.model.ActionStrip? getMapActionStrip();
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.navigation.model.PanModeDelegate? getPanModeDelegate();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public boolean isLoading();
+ }
+
+ public static final class PlaceListNavigationTemplate.Builder {
+ ctor public PlaceListNavigationTemplate.Builder();
+ method public androidx.car.app.navigation.model.PlaceListNavigationTemplate build();
+ method public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setItemList(androidx.car.app.model.ItemList);
+ method public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setLoading(boolean);
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setMapActionStrip(androidx.car.app.model.ActionStrip);
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setPanModeListener(androidx.car.app.navigation.model.PanModeListener);
+ method public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setTitle(CharSequence);
+ method public androidx.car.app.navigation.model.PlaceListNavigationTemplate.Builder setTitle(androidx.car.app.model.CarText);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class RoutePreviewNavigationTemplate implements androidx.car.app.model.Template {
+ method public androidx.car.app.model.ActionStrip? getActionStrip();
+ method public androidx.car.app.model.Action? getHeaderAction();
+ method public androidx.car.app.model.ItemList? getItemList();
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.model.ActionStrip? getMapActionStrip();
+ method public androidx.car.app.model.Action? getNavigateAction();
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.navigation.model.PanModeDelegate? getPanModeDelegate();
+ method public androidx.car.app.model.CarText? getTitle();
+ method public boolean isLoading();
+ }
+
+ public static final class RoutePreviewNavigationTemplate.Builder {
+ ctor public RoutePreviewNavigationTemplate.Builder();
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate build();
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setHeaderAction(androidx.car.app.model.Action);
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setItemList(androidx.car.app.model.ItemList);
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setLoading(boolean);
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setMapActionStrip(androidx.car.app.model.ActionStrip);
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setNavigateAction(androidx.car.app.model.Action);
+ method @androidx.car.app.annotations.RequiresCarApi(4) public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setPanModeListener(androidx.car.app.navigation.model.PanModeListener);
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setTitle(CharSequence);
+ method public androidx.car.app.navigation.model.RoutePreviewNavigationTemplate.Builder setTitle(androidx.car.app.model.CarText);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class RoutingInfo implements androidx.car.app.navigation.model.NavigationTemplate.NavigationInfo {
+ method public androidx.car.app.model.Distance? getCurrentDistance();
+ method public androidx.car.app.navigation.model.Step? getCurrentStep();
+ method public androidx.car.app.model.CarIcon? getJunctionImage();
+ method public androidx.car.app.navigation.model.Step? getNextStep();
+ method public boolean isLoading();
+ }
+
+ public static final class RoutingInfo.Builder {
+ ctor public RoutingInfo.Builder();
+ method public androidx.car.app.navigation.model.RoutingInfo build();
+ method public androidx.car.app.navigation.model.RoutingInfo.Builder setCurrentStep(androidx.car.app.navigation.model.Step, androidx.car.app.model.Distance);
+ method public androidx.car.app.navigation.model.RoutingInfo.Builder setJunctionImage(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.navigation.model.RoutingInfo.Builder setLoading(boolean);
+ method public androidx.car.app.navigation.model.RoutingInfo.Builder setNextStep(androidx.car.app.navigation.model.Step);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Step {
+ method public androidx.car.app.model.CarText? getCue();
+ method public java.util.List<androidx.car.app.navigation.model.Lane!> getLanes();
+ method public androidx.car.app.model.CarIcon? getLanesImage();
+ method public androidx.car.app.navigation.model.Maneuver? getManeuver();
+ method public androidx.car.app.model.CarText? getRoad();
+ }
+
+ public static final class Step.Builder {
+ ctor public Step.Builder();
+ ctor public Step.Builder(CharSequence);
+ ctor public Step.Builder(androidx.car.app.model.CarText);
+ method public androidx.car.app.navigation.model.Step.Builder addLane(androidx.car.app.navigation.model.Lane);
+ method public androidx.car.app.navigation.model.Step build();
+ method public androidx.car.app.navigation.model.Step.Builder setCue(CharSequence);
+ method public androidx.car.app.navigation.model.Step.Builder setLanesImage(androidx.car.app.model.CarIcon);
+ method public androidx.car.app.navigation.model.Step.Builder setManeuver(androidx.car.app.navigation.model.Maneuver);
+ method public androidx.car.app.navigation.model.Step.Builder setRoad(CharSequence);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class TravelEstimate {
+ method public androidx.car.app.model.DateTimeWithZone? getArrivalTimeAtDestination();
+ method public androidx.car.app.model.Distance? getRemainingDistance();
+ method public androidx.car.app.model.CarColor? getRemainingDistanceColor();
+ method public androidx.car.app.model.CarColor? getRemainingTimeColor();
+ method public long getRemainingTimeSeconds();
+ field public static final long REMAINING_TIME_UNKNOWN = -1L; // 0xffffffffffffffffL
+ }
+
+ public static final class TravelEstimate.Builder {
+ ctor public TravelEstimate.Builder(androidx.car.app.model.Distance, androidx.car.app.model.DateTimeWithZone);
+ ctor @RequiresApi(26) public TravelEstimate.Builder(androidx.car.app.model.Distance, java.time.ZonedDateTime);
+ method public androidx.car.app.navigation.model.TravelEstimate build();
+ method public androidx.car.app.navigation.model.TravelEstimate.Builder setRemainingDistanceColor(androidx.car.app.model.CarColor);
+ method @RequiresApi(26) public androidx.car.app.navigation.model.TravelEstimate.Builder setRemainingTime(java.time.Duration);
+ method public androidx.car.app.navigation.model.TravelEstimate.Builder setRemainingTimeColor(androidx.car.app.model.CarColor);
+ method public androidx.car.app.navigation.model.TravelEstimate.Builder setRemainingTimeSeconds(@IntRange(from=0xffffffff) long);
+ }
+
+ @androidx.car.app.annotations.CarProtocol public final class Trip {
+ method public androidx.car.app.model.CarText? getCurrentRoad();
+ method public java.util.List<androidx.car.app.navigation.model.TravelEstimate!> getDestinationTravelEstimates();
+ method public java.util.List<androidx.car.app.navigation.model.Destination!> getDestinations();
+ method public java.util.List<androidx.car.app.navigation.model.TravelEstimate!> getStepTravelEstimates();
+ method public java.util.List<androidx.car.app.navigation.model.Step!> getSteps();
+ method public boolean isLoading();
+ }
+
+ public static final class Trip.Builder {
+ ctor public Trip.Builder();
+ method public androidx.car.app.navigation.model.Trip.Builder addDestination(androidx.car.app.navigation.model.Destination, androidx.car.app.navigation.model.TravelEstimate);
+ method public androidx.car.app.navigation.model.Trip.Builder addStep(androidx.car.app.navigation.model.Step, androidx.car.app.navigation.model.TravelEstimate);
+ method public androidx.car.app.navigation.model.Trip build();
+ method public androidx.car.app.navigation.model.Trip.Builder setCurrentRoad(CharSequence);
+ method public androidx.car.app.navigation.model.Trip.Builder setLoading(boolean);
+ }
+
+}
+
+package androidx.car.app.notification {
+
+ public final class CarAppExtender implements androidx.core.app.NotificationCompat.Extender {
+ ctor public CarAppExtender(android.app.Notification);
+ method public androidx.core.app.NotificationCompat.Builder extend(androidx.core.app.NotificationCompat.Builder);
+ method public java.util.List<android.app.Notification.Action!> getActions();
+ method public String? getChannelId();
+ method public androidx.car.app.model.CarColor? getColor();
+ method public android.app.PendingIntent? getContentIntent();
+ method public CharSequence? getContentText();
+ method public CharSequence? getContentTitle();
+ method public android.app.PendingIntent? getDeleteIntent();
+ method public int getImportance();
+ method public android.graphics.Bitmap? getLargeIcon();
+ method @DrawableRes public int getSmallIcon();
+ method public static boolean isExtended(android.app.Notification);
+ }
+
+ public static final class CarAppExtender.Builder {
+ ctor public CarAppExtender.Builder();
+ method public androidx.car.app.notification.CarAppExtender.Builder addAction(@DrawableRes int, CharSequence, android.app.PendingIntent);
+ method public androidx.car.app.notification.CarAppExtender build();
+ method public androidx.car.app.notification.CarAppExtender.Builder setChannelId(String);
+ method public androidx.car.app.notification.CarAppExtender.Builder setColor(androidx.car.app.model.CarColor);
+ method public androidx.car.app.notification.CarAppExtender.Builder setContentIntent(android.app.PendingIntent);
+ method public androidx.car.app.notification.CarAppExtender.Builder setContentText(CharSequence);
+ method public androidx.car.app.notification.CarAppExtender.Builder setContentTitle(CharSequence);
+ method public androidx.car.app.notification.CarAppExtender.Builder setDeleteIntent(android.app.PendingIntent);
+ method public androidx.car.app.notification.CarAppExtender.Builder setImportance(int);
+ method public androidx.car.app.notification.CarAppExtender.Builder setLargeIcon(android.graphics.Bitmap);
+ method public androidx.car.app.notification.CarAppExtender.Builder setSmallIcon(int);
+ }
+
+ public final class CarNotificationManager {
+ method public boolean areNotificationsEnabled();
+ method public void cancel(int);
+ method public void cancel(String?, int);
+ method public void cancelAll();
+ method public void createNotificationChannel(androidx.core.app.NotificationChannelCompat);
+ method public void createNotificationChannelGroup(androidx.core.app.NotificationChannelGroupCompat);
+ method public void createNotificationChannelGroups(java.util.List<androidx.core.app.NotificationChannelGroupCompat!>);
+ method public void createNotificationChannels(java.util.List<androidx.core.app.NotificationChannelCompat!>);
+ method public void deleteNotificationChannel(String);
+ method public void deleteNotificationChannelGroup(String);
+ method public void deleteUnlistedNotificationChannels(java.util.Collection<java.lang.String!>);
+ method public static androidx.car.app.notification.CarNotificationManager from(android.content.Context);
+ method public static java.util.Set<java.lang.String!> getEnabledListenerPackages(android.content.Context);
+ method public int getImportance();
+ method public androidx.core.app.NotificationChannelCompat? getNotificationChannel(String);
+ method public androidx.core.app.NotificationChannelCompat? getNotificationChannel(String, String);
+ method public androidx.core.app.NotificationChannelGroupCompat? getNotificationChannelGroup(String);
+ method public java.util.List<androidx.core.app.NotificationChannelGroupCompat!> getNotificationChannelGroups();
+ method public java.util.List<androidx.core.app.NotificationChannelCompat!> getNotificationChannels();
+ method public void notify(int, androidx.core.app.NotificationCompat.Builder);
+ method public void notify(String?, int, androidx.core.app.NotificationCompat.Builder);
+ }
+
+ public final class CarPendingIntent {
+ method public static android.app.PendingIntent getCarApp(android.content.Context, int, android.content.Intent, int);
+ }
+
+}
+
+package androidx.car.app.serialization {
+
+ public final class Bundleable implements android.os.Parcelable {
+ method public static androidx.car.app.serialization.Bundleable create(Object) throws androidx.car.app.serialization.BundlerException;
+ method public int describeContents();
+ method public Object get() throws androidx.car.app.serialization.BundlerException;
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<androidx.car.app.serialization.Bundleable!> CREATOR;
+ }
+
+ public class BundlerException extends java.lang.Exception {
+ ctor public BundlerException(String?, Throwable);
+ ctor public BundlerException(String?);
+ }
+
+}
+
+package androidx.car.app.validation {
+
+ public final class HostValidator {
+ method public java.util.Map<java.lang.String!,java.util.List<java.lang.String!>!> getAllowedHosts();
+ method public boolean isValidHost(androidx.car.app.HostInfo);
+ field public static final androidx.car.app.validation.HostValidator ALLOW_ALL_HOSTS_VALIDATOR;
+ field public static final String TEMPLATE_RENDERER_PERMISSION = "android.car.permission.TEMPLATE_RENDERER";
+ }
+
+ public static final class HostValidator.Builder {
+ ctor public HostValidator.Builder(android.content.Context);
+ method public androidx.car.app.validation.HostValidator.Builder addAllowedHost(String, String);
+ method public androidx.car.app.validation.HostValidator.Builder addAllowedHosts(@ArrayRes int);
+ method public androidx.car.app.validation.HostValidator build();
+ }
+
+}
+
+package androidx.car.app.versioning {
+
+ public final class CarAppApiLevels {
+ method public static int getLatest();
+ method public static int getOldest();
+ field public static final int LEVEL_1 = 1; // 0x1
+ field public static final int LEVEL_2 = 2; // 0x2
+ field public static final int LEVEL_3 = 3; // 0x3
+ field public static final int LEVEL_4 = 4; // 0x4
+ }
+
+}
+
diff --git a/camera/camera-view/dependencies.gradle b/car/app/app/src/main/aidl/androidx/car/app/model/IOnContentRefreshListener.aidl
similarity index 75%
rename from camera/camera-view/dependencies.gradle
rename to car/app/app/src/main/aidl/androidx/car/app/model/IOnContentRefreshListener.aidl
index d29ffb1..39777df 100644
--- a/camera/camera-view/dependencies.gradle
+++ b/car/app/app/src/main/aidl/androidx/car/app/model/IOnContentRefreshListener.aidl
@@ -14,7 +14,11 @@
* limitations under the License.
*/
-ext {
- // camera-view temporarily pins same-group depenencies to RC/stable until beta
- VIEW_ATOMIC_GROUP_PINNED_VER = "1.0.1"
+package androidx.car.app.model;
+
+import androidx.car.app.IOnDoneCallback;
+
+/** @hide */
+oneway interface IOnContentRefreshListener {
+ void onContentRefreshRequested(IOnDoneCallback callback) = 1;
}
diff --git a/car/app/app/src/main/java/androidx/car/app/CarAppService.java b/car/app/app/src/main/java/androidx/car/app/CarAppService.java
index 5a3915e..409f0e7 100644
--- a/car/app/app/src/main/java/androidx/car/app/CarAppService.java
+++ b/car/app/app/src/main/java/androidx/car/app/CarAppService.java
@@ -132,6 +132,24 @@
@Nullable
private HandshakeInfo mHandshakeInfo;
+ @Nullable
+ private CarAppBinder mBinder;
+
+ @Override
+ @CallSuper
+ public void onCreate() {
+ mBinder = new CarAppBinder(this);
+ }
+
+ @Override
+ @CallSuper
+ public void onDestroy() {
+ if (mBinder != null) {
+ mBinder.destroy();
+ mBinder = null;
+ }
+ }
+
/**
* Handles the host binding to this car app.
*
@@ -144,7 +162,7 @@
@CallSuper
@NonNull
public final IBinder onBind(@NonNull Intent intent) {
- return mBinder;
+ return requireNonNull(mBinder);
}
/**
@@ -340,241 +358,261 @@
return requireNonNull(getLifecycleIfValid());
}
- private final ICarApp.Stub mBinder =
- new ICarApp.Stub() {
- // incompatible argument for parameter context of attachBaseContext.
- // call to onCreateScreen(android.content.Intent) not allowed on the given receiver.
- @SuppressWarnings({
- "nullness:argument.type.incompatible",
- "nullness:method.invocation.invalid"
- })
- @Override
- public void onAppCreate(
- ICarHost carHost,
- Intent intent,
- Configuration configuration,
- IOnDoneCallback callback) {
- if (Log.isLoggable(TAG, Log.DEBUG)) {
- Log.d(TAG, "onAppCreate intent: " + intent);
- }
+ private static final class CarAppBinder extends ICarApp.Stub {
+ @Nullable private CarAppService mService;
- RemoteUtils.dispatchCallFromHost(callback, "onAppCreate", () -> {
- Session session = getCurrentSession();
- if (session == null
- || getLifecycle().getCurrentState() == State.DESTROYED) {
- session = onCreateSession();
- setCurrentSession(session);
- }
-
- session.configure(CarAppService.this,
- requireNonNull(getHandshakeInfo()),
- requireNonNull(getHostInfo()),
- carHost, configuration);
-
- // Whenever the host unbinds, the screens in the stack are destroyed. If
- // there is another bind, before the OS has destroyed this Service, then
- // the stack will be empty, and we need to treat it as a new instance.
- LifecycleRegistry registry = getLifecycle();
- Lifecycle.State state = registry.getCurrentState();
- int screenStackSize = session.getCarContext().getCarService(
- ScreenManager.class).getScreenStack().size();
- if (!state.isAtLeast(State.CREATED) || screenStackSize < 1) {
- if (Log.isLoggable(TAG, Log.DEBUG)) {
- Log.d(TAG, "onAppCreate the app was not yet created or the "
- + "screen stack was empty state: "
- + registry.getCurrentState()
- + ", stack size: " + screenStackSize);
- }
- registry.handleLifecycleEvent(Event.ON_CREATE);
- session.getCarContext().getCarService(ScreenManager.class).push(
- session.onCreateScreen(intent));
- } else {
- if (Log.isLoggable(TAG, Log.DEBUG)) {
- Log.d(TAG, "onAppCreate the app was already created");
- }
- onNewIntentInternal(session, intent);
- }
- return null;
- });
-
- if (Log.isLoggable(TAG, Log.DEBUG)) {
- Log.d(TAG, "onAppCreate completed");
- }
- }
-
- @Override
- public void onAppStart(IOnDoneCallback callback) {
- RemoteUtils.dispatchCallFromHost(
- getLifecycleIfValid(), callback,
- "onAppStart", () -> {
- getLifecycle().handleLifecycleEvent(Event.ON_START);
- return null;
- });
- }
-
- @Override
- public void onAppResume(IOnDoneCallback callback) {
- RemoteUtils.dispatchCallFromHost(
- getLifecycleIfValid(), callback,
- "onAppResume", () -> {
- getLifecycle()
- .handleLifecycleEvent(Event.ON_RESUME);
- return null;
- });
- }
-
- @Override
- public void onAppPause(IOnDoneCallback callback) {
- RemoteUtils.dispatchCallFromHost(
- getLifecycleIfValid(), callback, "onAppPause",
- () -> {
- getLifecycle().handleLifecycleEvent(Event.ON_PAUSE);
- return null;
- });
- }
-
- @Override
- public void onAppStop(IOnDoneCallback callback) {
- RemoteUtils.dispatchCallFromHost(
- getLifecycleIfValid(), callback, "onAppStop",
- () -> {
- getLifecycle().handleLifecycleEvent(Event.ON_STOP);
- return null;
- });
- }
-
- @Override
- public void onNewIntent(Intent intent, IOnDoneCallback callback) {
- RemoteUtils.dispatchCallFromHost(
- getLifecycleIfValid(),
- callback,
- "onNewIntent",
- () -> {
- onNewIntentInternal(throwIfInvalid(getCurrentSession()), intent);
- return null;
- });
- }
-
- @Override
- public void onConfigurationChanged(Configuration configuration,
- IOnDoneCallback callback) {
- RemoteUtils.dispatchCallFromHost(
- getLifecycleIfValid(),
- callback,
- "onConfigurationChanged",
- () -> {
- onConfigurationChangedInternal(
- throwIfInvalid(getCurrentSession()), configuration);
- return null;
- });
- }
-
- @Override
- public void getManager(@CarServiceType @NonNull String type,
- IOnDoneCallback callback) {
- ThreadUtils.runOnMain(() -> {
- Session session = throwIfInvalid(getCurrentSession());
- switch (type) {
- case CarContext.APP_SERVICE:
- RemoteUtils.sendSuccessResponseToHost(
- callback,
- "getManager",
- session.getCarContext().getCarService(
- AppManager.class).getIInterface());
- return;
- case CarContext.NAVIGATION_SERVICE:
- RemoteUtils.sendSuccessResponseToHost(
- callback,
- "getManager",
- session.getCarContext().getCarService(
- NavigationManager.class).getIInterface());
- return;
- default:
- Log.e(TAG, type + "%s is not a valid manager");
- RemoteUtils.sendFailureResponseToHost(callback, "getManager",
- new InvalidParameterException(
- type + " is not a valid manager type"));
- }
- });
- }
-
- @Override
- public void getAppInfo(IOnDoneCallback callback) {
- try {
- RemoteUtils.sendSuccessResponseToHost(
- callback, "getAppInfo", CarAppService.this.getAppInfo());
- } catch (IllegalArgumentException e) {
- // getAppInfo() could fail with the specified API version is invalid.
- RemoteUtils.sendFailureResponseToHost(callback, "getAppInfo", e);
- }
- }
-
- @Override
- public void onHandshakeCompleted(Bundleable handshakeInfo,
- IOnDoneCallback callback) {
- try {
- HandshakeInfo deserializedHandshakeInfo =
- (HandshakeInfo) handshakeInfo.get();
- String packageName = deserializedHandshakeInfo.getHostPackageName();
- int uid = Binder.getCallingUid();
- HostInfo hostInfo = new HostInfo(packageName, uid);
- if (!getHostValidator().isValidHost(hostInfo)) {
- RemoteUtils.sendFailureResponseToHost(callback, "onHandshakeCompleted",
- new IllegalArgumentException("Unknown host '"
- + packageName + "', uid:" + uid));
- return;
- }
-
- int appMinApiLevel =
- CarAppService.this.getAppInfo().getMinCarAppApiLevel();
- int hostApiLevel = deserializedHandshakeInfo.getHostCarAppApiLevel();
- if (appMinApiLevel > hostApiLevel) {
- RemoteUtils.sendFailureResponseToHost(callback, "onHandshakeCompleted",
- new IllegalArgumentException(
- "Host API level (" + hostApiLevel + ") is "
- + "less than the app's min API level ("
- + appMinApiLevel + ")"));
- return;
- }
-
- setHostInfo(hostInfo);
- setHandshakeInfo(deserializedHandshakeInfo);
- RemoteUtils.sendSuccessResponseToHost(callback, "onHandshakeCompleted",
- null);
- } catch (BundlerException | IllegalArgumentException e) {
- setHostInfo(null);
- RemoteUtils.sendFailureResponseToHost(callback, "onHandshakeCompleted", e);
- }
- }
-
- // call to onNewIntent(android.content.Intent) not allowed on the given receiver.
- @SuppressWarnings("nullness:method.invocation.invalid")
- @MainThread
- private void onNewIntentInternal(Session session, Intent intent) {
- ThreadUtils.checkMainThread();
- session.onNewIntent(intent);
- }
-
- // call to onCarConfigurationChanged(android.content.res.Configuration) not
- // allowed on the given receiver.
- @SuppressWarnings("nullness:method.invocation.invalid")
- @MainThread
- private void onConfigurationChangedInternal(Session session,
- Configuration configuration) {
- ThreadUtils.checkMainThread();
- if (Log.isLoggable(TAG, Log.DEBUG)) {
- Log.d(TAG, "onCarConfigurationChanged configuration: " + configuration);
- }
-
- session.onCarConfigurationChangedInternal(configuration);
- }
- };
-
- Session throwIfInvalid(@Nullable Session session) {
- if (session == null) {
- throw new IllegalStateException("Null session found when non-null expected");
+ CarAppBinder(@NonNull CarAppService service) {
+ mService = service;
}
- return session;
+ /**
+ * Explicitly mark the binder to be destroyed and remove the reference to the
+ * {@link CarAppService}, and any subsequent call from the host after this would be
+ * considered invalid and throws an exception.
+ *
+ * <p>This is needed because the binder object can outlive the service and will not be
+ * garbage collected until the car host cleans up its side of the binder reference,
+ * causing a leak. See https://github.com/square/leakcanary/issues/1906 for more context
+ * related to this issue.
+ */
+ void destroy() {
+ mService = null;
+ }
+
+ // incompatible argument for parameter context of attachBaseContext.
+ // call to onCreateScreen(android.content.Intent) not allowed on the given receiver.
+ @SuppressWarnings({
+ "nullness:argument.type.incompatible",
+ "nullness:method.invocation.invalid"
+ })
+ @Override
+ public void onAppCreate(
+ ICarHost carHost,
+ Intent intent,
+ Configuration configuration,
+ IOnDoneCallback callback) {
+ if (Log.isLoggable(TAG, Log.DEBUG)) {
+ Log.d(TAG, "onAppCreate intent: " + intent);
+ }
+
+ RemoteUtils.dispatchCallFromHost(callback, "onAppCreate", () -> {
+ CarAppService service = requireNonNull(mService);
+ Session session = service.getCurrentSession();
+ if (session == null
+ || service.getLifecycle().getCurrentState() == State.DESTROYED) {
+ session = service.onCreateSession();
+ service.setCurrentSession(session);
+ }
+
+ session.configure(service,
+ requireNonNull(service.getHandshakeInfo()),
+ requireNonNull(service.getHostInfo()),
+ carHost, configuration);
+
+ // Whenever the host unbinds, the screens in the stack are destroyed. If
+ // there is another bind, before the OS has destroyed this Service, then
+ // the stack will be empty, and we need to treat it as a new instance.
+ LifecycleRegistry registry = service.getLifecycle();
+ Lifecycle.State state = registry.getCurrentState();
+ int screenStackSize = session.getCarContext().getCarService(
+ ScreenManager.class).getScreenStack().size();
+ if (!state.isAtLeast(State.CREATED) || screenStackSize < 1) {
+ if (Log.isLoggable(TAG, Log.DEBUG)) {
+ Log.d(TAG, "onAppCreate the app was not yet created or the "
+ + "screen stack was empty state: "
+ + registry.getCurrentState()
+ + ", stack size: " + screenStackSize);
+ }
+ registry.handleLifecycleEvent(Event.ON_CREATE);
+ session.getCarContext().getCarService(ScreenManager.class).push(
+ session.onCreateScreen(intent));
+ } else {
+ if (Log.isLoggable(TAG, Log.DEBUG)) {
+ Log.d(TAG, "onAppCreate the app was already created");
+ }
+ onNewIntentInternal(session, intent);
+ }
+ return null;
+ });
+
+ if (Log.isLoggable(TAG, Log.DEBUG)) {
+ Log.d(TAG, "onAppCreate completed");
+ }
+ }
+
+ @Override
+ public void onAppStart(IOnDoneCallback callback) {
+ CarAppService service = requireNonNull(mService);
+ RemoteUtils.dispatchCallFromHost(
+ service.getLifecycleIfValid(), callback,
+ "onAppStart", () -> {
+ service.getLifecycle().handleLifecycleEvent(Event.ON_START);
+ return null;
+ });
+ }
+
+ @Override
+ public void onAppResume(IOnDoneCallback callback) {
+ CarAppService service = requireNonNull(mService);
+ RemoteUtils.dispatchCallFromHost(
+ service.getLifecycleIfValid(), callback,
+ "onAppResume", () -> {
+ service.getLifecycle()
+ .handleLifecycleEvent(Event.ON_RESUME);
+ return null;
+ });
+ }
+
+ @Override
+ public void onAppPause(IOnDoneCallback callback) {
+ CarAppService service = requireNonNull(mService);
+ RemoteUtils.dispatchCallFromHost(
+ service.getLifecycleIfValid(), callback, "onAppPause",
+ () -> {
+ service.getLifecycle().handleLifecycleEvent(Event.ON_PAUSE);
+ return null;
+ });
+ }
+
+ @Override
+ public void onAppStop(IOnDoneCallback callback) {
+ CarAppService service = requireNonNull(mService);
+ RemoteUtils.dispatchCallFromHost(
+ service.getLifecycleIfValid(), callback, "onAppStop",
+ () -> {
+ service.getLifecycle().handleLifecycleEvent(Event.ON_STOP);
+ return null;
+ });
+ }
+
+ @Override
+ public void onNewIntent(Intent intent, IOnDoneCallback callback) {
+ CarAppService service = requireNonNull(mService);
+ RemoteUtils.dispatchCallFromHost(
+ service.getLifecycleIfValid(),
+ callback,
+ "onNewIntent",
+ () -> {
+ onNewIntentInternal(requireNonNull(service.getCurrentSession()), intent);
+ return null;
+ });
+ }
+
+ @Override
+ public void onConfigurationChanged(Configuration configuration,
+ IOnDoneCallback callback) {
+ CarAppService service = requireNonNull(mService);
+ RemoteUtils.dispatchCallFromHost(
+ service.getLifecycleIfValid(),
+ callback,
+ "onConfigurationChanged",
+ () -> {
+ onConfigurationChangedInternal(requireNonNull(service.getCurrentSession()),
+ configuration);
+ return null;
+ });
+ }
+
+ @Override
+ public void getManager(@CarServiceType @NonNull String type,
+ IOnDoneCallback callback) {
+ ThreadUtils.runOnMain(() -> {
+ CarAppService service = requireNonNull(mService);
+ Session session = requireNonNull(service.getCurrentSession());
+ switch (type) {
+ case CarContext.APP_SERVICE:
+ RemoteUtils.sendSuccessResponseToHost(
+ callback,
+ "getManager",
+ session.getCarContext().getCarService(
+ AppManager.class).getIInterface());
+ return;
+ case CarContext.NAVIGATION_SERVICE:
+ RemoteUtils.sendSuccessResponseToHost(
+ callback,
+ "getManager",
+ session.getCarContext().getCarService(
+ NavigationManager.class).getIInterface());
+ return;
+ default:
+ Log.e(TAG, type + "%s is not a valid manager");
+ RemoteUtils.sendFailureResponseToHost(callback, "getManager",
+ new InvalidParameterException(
+ type + " is not a valid manager type"));
+ }
+ });
+ }
+
+ @Override
+ public void getAppInfo(IOnDoneCallback callback) {
+ try {
+ CarAppService service = requireNonNull(mService);
+ RemoteUtils.sendSuccessResponseToHost(
+ callback, "getAppInfo", service.getAppInfo());
+ } catch (IllegalArgumentException e) {
+ // getAppInfo() could fail with the specified API version is invalid.
+ RemoteUtils.sendFailureResponseToHost(callback, "getAppInfo", e);
+ }
+ }
+
+ @Override
+ public void onHandshakeCompleted(Bundleable handshakeInfo,
+ IOnDoneCallback callback) {
+ CarAppService service = requireNonNull(mService);
+ try {
+ HandshakeInfo deserializedHandshakeInfo =
+ (HandshakeInfo) handshakeInfo.get();
+ String packageName = deserializedHandshakeInfo.getHostPackageName();
+ int uid = Binder.getCallingUid();
+ HostInfo hostInfo = new HostInfo(packageName, uid);
+ if (!service.getHostValidator().isValidHost(hostInfo)) {
+ RemoteUtils.sendFailureResponseToHost(callback, "onHandshakeCompleted",
+ new IllegalArgumentException("Unknown host '"
+ + packageName + "', uid:" + uid));
+ return;
+ }
+
+ int appMinApiLevel = service.getAppInfo().getMinCarAppApiLevel();
+ int hostApiLevel = deserializedHandshakeInfo.getHostCarAppApiLevel();
+ if (appMinApiLevel > hostApiLevel) {
+ RemoteUtils.sendFailureResponseToHost(callback, "onHandshakeCompleted",
+ new IllegalArgumentException(
+ "Host API level (" + hostApiLevel + ") is "
+ + "less than the app's min API level ("
+ + appMinApiLevel + ")"));
+ return;
+ }
+
+ service.setHostInfo(hostInfo);
+ service.setHandshakeInfo(deserializedHandshakeInfo);
+ RemoteUtils.sendSuccessResponseToHost(callback, "onHandshakeCompleted",
+ null);
+ } catch (BundlerException | IllegalArgumentException e) {
+ service.setHostInfo(null);
+ RemoteUtils.sendFailureResponseToHost(callback, "onHandshakeCompleted", e);
+ }
+ }
+
+ // call to onNewIntent(android.content.Intent) not allowed on the given receiver.
+ @SuppressWarnings("nullness:method.invocation.invalid")
+ @MainThread
+ private void onNewIntentInternal(Session session, Intent intent) {
+ ThreadUtils.checkMainThread();
+ session.onNewIntent(intent);
+ }
+
+ // call to onCarConfigurationChanged(android.content.res.Configuration) not
+ // allowed on the given receiver.
+ @SuppressWarnings("nullness:method.invocation.invalid")
+ @MainThread
+ private void onConfigurationChangedInternal(Session session,
+ Configuration configuration) {
+ ThreadUtils.checkMainThread();
+ if (Log.isLoggable(TAG, Log.DEBUG)) {
+ Log.d(TAG, "onCarConfigurationChanged configuration: " + configuration);
+ }
+
+ session.onCarConfigurationChangedInternal(configuration);
+ }
}
}
diff --git a/car/app/app/src/main/java/androidx/car/app/model/OnContentRefreshDelegate.java b/car/app/app/src/main/java/androidx/car/app/model/OnContentRefreshDelegate.java
new file mode 100644
index 0000000..e59ebcb
--- /dev/null
+++ b/car/app/app/src/main/java/androidx/car/app/model/OnContentRefreshDelegate.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package androidx.car.app.model;
+
+import android.annotation.SuppressLint;
+
+import androidx.annotation.NonNull;
+import androidx.car.app.OnDoneCallback;
+import androidx.car.app.annotations.CarProtocol;
+import androidx.car.app.annotations.ExperimentalCarApi;
+
+/**
+ * A host-side delegate for sending
+ * {@link androidx.car.app.model.OnContentRefreshListener} events to the car app.
+ */
+@ExperimentalCarApi
+@CarProtocol
+public interface OnContentRefreshDelegate {
+ /**
+ * Notifies that a content refresh has been requested by the user.
+ *
+ * @param callback the {@link OnDoneCallback} to trigger when the client finishes handling
+ * the event
+ */
+ // This mirrors the AIDL class and is not supported to support an executor as an input.
+ @SuppressLint("ExecutorRegistration")
+ void sendContentRefreshRequested(@NonNull OnDoneCallback callback);
+}
diff --git a/car/app/app/src/main/java/androidx/car/app/model/OnContentRefreshDelegateImpl.java b/car/app/app/src/main/java/androidx/car/app/model/OnContentRefreshDelegateImpl.java
new file mode 100644
index 0000000..b669b24
--- /dev/null
+++ b/car/app/app/src/main/java/androidx/car/app/model/OnContentRefreshDelegateImpl.java
@@ -0,0 +1,95 @@
+/*
+ * Copyright 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package androidx.car.app.model;
+
+import static androidx.annotation.RestrictTo.Scope.LIBRARY;
+
+import static java.util.Objects.requireNonNull;
+
+import android.annotation.SuppressLint;
+import android.os.RemoteException;
+
+import androidx.annotation.Keep;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.annotation.OptIn;
+import androidx.annotation.RestrictTo;
+import androidx.car.app.IOnDoneCallback;
+import androidx.car.app.OnDoneCallback;
+import androidx.car.app.annotations.CarProtocol;
+import androidx.car.app.annotations.ExperimentalCarApi;
+import androidx.car.app.utils.RemoteUtils;
+
+/**
+ * Implementation class for {@link OnContentRefreshListener}.
+ *
+ * @hide
+ */
+@RestrictTo(LIBRARY)
+@CarProtocol
+@OptIn(markerClass = ExperimentalCarApi.class) // OnContentRefreshDelegate, OnContentRefreshListener
+public class OnContentRefreshDelegateImpl implements OnContentRefreshDelegate {
+ @Keep
+ @Nullable
+ private final IOnContentRefreshListener mListener;
+
+ @Override
+ public void sendContentRefreshRequested(@NonNull OnDoneCallback callback) {
+ try {
+ requireNonNull(mListener)
+ .onContentRefreshRequested(RemoteUtils.createOnDoneCallbackStub(callback));
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * Creates a {@link OnContentRefreshDelegate} for host-side callbacks to the input listener.
+ */
+ @NonNull
+ // This listener relates to UI event and is expected to be triggered on the main thread.
+ @SuppressLint("ExecutorRegistration")
+ public static OnContentRefreshDelegate create(@NonNull OnContentRefreshListener listener) {
+ return new OnContentRefreshDelegateImpl(listener);
+ }
+
+ private OnContentRefreshDelegateImpl(@NonNull OnContentRefreshListener listener) {
+ mListener = new OnContentRefreshListenerStub(listener);
+ }
+
+ /** For serialization. */
+ private OnContentRefreshDelegateImpl() {
+ mListener = null;
+ }
+
+ @Keep // We need to keep these stub for Bundler serialization logic.
+ private static class OnContentRefreshListenerStub extends IOnContentRefreshListener.Stub {
+ private final OnContentRefreshListener mOnContentRefreshListener;
+
+ OnContentRefreshListenerStub(OnContentRefreshListener onContentRefreshListener) {
+ mOnContentRefreshListener = onContentRefreshListener;
+ }
+
+ @Override
+ public void onContentRefreshRequested(IOnDoneCallback callback) {
+ RemoteUtils.dispatchCallFromHost(callback, "onClick", () -> {
+ mOnContentRefreshListener.onContentRefreshRequested();
+ return null;
+ });
+ }
+ }
+}
diff --git a/camera/camera-view/dependencies.gradle b/car/app/app/src/main/java/androidx/car/app/model/OnContentRefreshListener.java
similarity index 64%
copy from camera/camera-view/dependencies.gradle
copy to car/app/app/src/main/java/androidx/car/app/model/OnContentRefreshListener.java
index d29ffb1..97674fa 100644
--- a/camera/camera-view/dependencies.gradle
+++ b/car/app/app/src/main/java/androidx/car/app/model/OnContentRefreshListener.java
@@ -14,7 +14,13 @@
* limitations under the License.
*/
-ext {
- // camera-view temporarily pins same-group depenencies to RC/stable until beta
- VIEW_ATOMIC_GROUP_PINNED_VER = "1.0.1"
+package androidx.car.app.model;
+
+import androidx.car.app.annotations.ExperimentalCarApi;
+
+/** A listener of content refresh requests */
+@ExperimentalCarApi
+public interface OnContentRefreshListener {
+ /** Notifies that the user has requested a refresh of the currently displayed content. */
+ void onContentRefreshRequested();
}
diff --git a/car/app/app/src/main/java/androidx/car/app/model/PlaceListMapTemplate.java b/car/app/app/src/main/java/androidx/car/app/model/PlaceListMapTemplate.java
index 09b4b77..9249dff 100644
--- a/car/app/app/src/main/java/androidx/car/app/model/PlaceListMapTemplate.java
+++ b/car/app/app/src/main/java/androidx/car/app/model/PlaceListMapTemplate.java
@@ -22,10 +22,15 @@
import static java.util.Objects.requireNonNull;
+import android.annotation.SuppressLint;
+
import androidx.annotation.Keep;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
+import androidx.annotation.OptIn;
+import androidx.car.app.Screen;
import androidx.car.app.annotations.CarProtocol;
+import androidx.car.app.annotations.ExperimentalCarApi;
import androidx.car.app.model.constraints.CarTextConstraints;
import java.util.Collections;
@@ -48,6 +53,8 @@
* <li>The previous template is in a loading state (see {@link Builder#setLoading}, or
* <li>The template title has not changed, and the number of rows and the title (not counting
* spans) of each row between the previous and new {@link ItemList}s have not changed.
+ * <li>The template is sent in response to a user-initiated content refresh request. (see
+ * {@link Builder#setOnContentRefreshListener}.
* </ul>
*/
@CarProtocol
@@ -71,6 +78,10 @@
@Keep
@Nullable
private final Place mAnchor;
+ @Keep
+ @Nullable
+ @ExperimentalCarApi
+ private final OnContentRefreshDelegate mOnContentRefreshDelegate;
public boolean isCurrentLocationEnabled() {
return mShowCurrentLocation;
@@ -137,19 +148,33 @@
return mAnchor;
}
+ /**
+ * Returns the {@link OnContentRefreshDelegate} to be called when the user requests for content
+ * refresh for this template.
+ *
+ * @see Builder#setOnContentRefreshListener
+ */
+ @Nullable
+ @ExperimentalCarApi
+ public OnContentRefreshDelegate getOnContentRefreshDelegate() {
+ return mOnContentRefreshDelegate;
+ }
+
@NonNull
@Override
public String toString() {
return "PlaceListMapTemplate";
}
+ @OptIn(markerClass = ExperimentalCarApi.class) // OnContentRefreshDelegate
@Override
public int hashCode() {
return Objects.hash(
mShowCurrentLocation, mIsLoading, mTitle, mItemList, mHeaderAction, mActionStrip,
- mAnchor);
+ mAnchor, mOnContentRefreshDelegate == null);
}
+ @OptIn(markerClass = ExperimentalCarApi.class) // OnContentRefreshDelegate
@Override
public boolean equals(@Nullable Object other) {
if (this == other) {
@@ -166,9 +191,12 @@
&& Objects.equals(mItemList, otherTemplate.mItemList)
&& Objects.equals(mHeaderAction, otherTemplate.mHeaderAction)
&& Objects.equals(mActionStrip, otherTemplate.mActionStrip)
- && Objects.equals(mAnchor, otherTemplate.mAnchor);
+ && Objects.equals(mAnchor, otherTemplate.mAnchor)
+ && Objects.equals(mOnContentRefreshDelegate == null,
+ otherTemplate.mOnContentRefreshDelegate == null);
}
+ @OptIn(markerClass = ExperimentalCarApi.class) // OnContentRefreshDelegate
PlaceListMapTemplate(Builder builder) {
mShowCurrentLocation = builder.mShowCurrentLocation;
mIsLoading = builder.mIsLoading;
@@ -177,9 +205,11 @@
mHeaderAction = builder.mHeaderAction;
mActionStrip = builder.mActionStrip;
mAnchor = builder.mAnchor;
+ mOnContentRefreshDelegate = builder.mOnContentRefreshDelegate;
}
/** Constructs an empty instance, used by serialization code. */
+ @OptIn(markerClass = ExperimentalCarApi.class) // OnContentRefreshDelegate
private PlaceListMapTemplate() {
mShowCurrentLocation = false;
mIsLoading = false;
@@ -188,6 +218,7 @@
mHeaderAction = null;
mActionStrip = null;
mAnchor = null;
+ mOnContentRefreshDelegate = null;
}
/** A builder of {@link PlaceListMapTemplate}. */
@@ -204,6 +235,9 @@
ActionStrip mActionStrip;
@Nullable
Place mAnchor;
+ @Nullable
+ @ExperimentalCarApi
+ OnContentRefreshDelegate mOnContentRefreshDelegate;
/**
* Sets whether to show the current location in the map.
@@ -378,6 +412,27 @@
}
/**
+ * Sets the {@link OnContentRefreshListener} to call when the user requests for the list
+ * contents to be refreshed in this template.
+ *
+ * <p>When the listener is triggered, an app can send a new {@link PlaceListMapTemplate},
+ * for example, to show a new set of point-of-interests based on the current user
+ * location, without the car host counting it against the template quota described in
+ * {@link Screen#onGetTemplate()}.
+ *
+ * @throws NullPointerException if {@code itemVisibilityChangedListener} is {@code null}
+ */
+ @NonNull
+ @SuppressLint({"MissingGetterMatchingBuilder", "ExecutorRegistration"})
+ @ExperimentalCarApi
+ public Builder setOnContentRefreshListener(
+ @NonNull OnContentRefreshListener onContentRefreshListener) {
+ mOnContentRefreshDelegate =
+ OnContentRefreshDelegateImpl.create(onContentRefreshListener);
+ return this;
+ }
+
+ /**
* Constructs the template defined by this builder.
*
* <h4>Requirements</h4>
diff --git a/car/app/app/src/main/java/androidx/car/app/navigation/model/PlaceListNavigationTemplate.java b/car/app/app/src/main/java/androidx/car/app/navigation/model/PlaceListNavigationTemplate.java
index b70724a..2b96b3d 100644
--- a/car/app/app/src/main/java/androidx/car/app/navigation/model/PlaceListNavigationTemplate.java
+++ b/car/app/app/src/main/java/androidx/car/app/navigation/model/PlaceListNavigationTemplate.java
@@ -28,9 +28,11 @@
import androidx.annotation.Keep;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
+import androidx.annotation.OptIn;
import androidx.car.app.Screen;
import androidx.car.app.SurfaceCallback;
import androidx.car.app.annotations.CarProtocol;
+import androidx.car.app.annotations.ExperimentalCarApi;
import androidx.car.app.annotations.RequiresCarApi;
import androidx.car.app.model.Action;
import androidx.car.app.model.ActionStrip;
@@ -40,7 +42,11 @@
import androidx.car.app.model.Item;
import androidx.car.app.model.ItemList;
import androidx.car.app.model.ModelUtils;
+import androidx.car.app.model.OnContentRefreshDelegate;
+import androidx.car.app.model.OnContentRefreshDelegateImpl;
+import androidx.car.app.model.OnContentRefreshListener;
import androidx.car.app.model.Place;
+import androidx.car.app.model.PlaceListMapTemplate;
import androidx.car.app.model.PlaceMarker;
import androidx.car.app.model.Row;
import androidx.car.app.model.Template;
@@ -67,6 +73,8 @@
* <li>The template title has not changed, and the number of rows and the title (not
* counting spans) of each row between the previous and new {@link ItemList}s have not
* changed.
+ * <li>The template is sent in response to a user-initiated content refresh request. (see
+ * {@link PlaceListMapTemplate.Builder#setOnContentRefreshListener}.
* </ul>
*
* <p>In order to use this template your car app <b>MUST</b> declare that it uses the {@code
@@ -94,6 +102,10 @@
@Keep
@Nullable
private final PanModeDelegate mPanModeDelegate;
+ @Keep
+ @Nullable
+ @ExperimentalCarApi
+ private final OnContentRefreshDelegate mOnContentRefreshDelegate;
/**
* Returns the title of the template or {@code null} if not set.
@@ -167,18 +179,32 @@
return mItemList;
}
+ /**
+ * Returns the {@link OnContentRefreshDelegate} to be called when the user requests for content
+ * refresh for this template.
+ *
+ * @see PlaceListMapTemplate.Builder#setOnContentRefreshListener
+ */
+ @Nullable
+ @ExperimentalCarApi
+ public OnContentRefreshDelegate getOnContentRefreshDelegate() {
+ return mOnContentRefreshDelegate;
+ }
+
@NonNull
@Override
public String toString() {
return "PlaceListNavigationTemplate";
}
+ @OptIn(markerClass = ExperimentalCarApi.class) // OnContentRefreshDelegate
@Override
public int hashCode() {
return Objects.hash(mTitle, mIsLoading, mItemList, mHeaderAction, mActionStrip,
- mMapActionStrip, mPanModeDelegate == null);
+ mMapActionStrip, mPanModeDelegate == null, mOnContentRefreshDelegate == null);
}
+ @OptIn(markerClass = ExperimentalCarApi.class) // OnContentRefreshDelegate
@Override
public boolean equals(@Nullable Object other) {
if (this == other) {
@@ -195,9 +221,12 @@
&& Objects.equals(mHeaderAction, otherTemplate.mHeaderAction)
&& Objects.equals(mActionStrip, otherTemplate.mActionStrip)
&& Objects.equals(mMapActionStrip, otherTemplate.mMapActionStrip)
- && Objects.equals(mPanModeDelegate == null, otherTemplate.mPanModeDelegate == null);
+ && Objects.equals(mPanModeDelegate == null, otherTemplate.mPanModeDelegate == null)
+ && Objects.equals(mOnContentRefreshDelegate == null,
+ otherTemplate.mOnContentRefreshDelegate == null);
}
+ @OptIn(markerClass = ExperimentalCarApi.class) // OnContentRefreshDelegate
PlaceListNavigationTemplate(Builder builder) {
mTitle = builder.mTitle;
mIsLoading = builder.mIsLoading;
@@ -206,9 +235,11 @@
mActionStrip = builder.mActionStrip;
mMapActionStrip = builder.mMapActionStrip;
mPanModeDelegate = builder.mPanModeDelegate;
+ mOnContentRefreshDelegate = builder.mOnContentRefreshDelegate;
}
/** Constructs an empty instance, used by serialization code. */
+ @OptIn(markerClass = ExperimentalCarApi.class) // OnContentRefreshDelegate
private PlaceListNavigationTemplate() {
mTitle = null;
mIsLoading = false;
@@ -217,6 +248,7 @@
mActionStrip = null;
mMapActionStrip = null;
mPanModeDelegate = null;
+ mOnContentRefreshDelegate = null;
}
/** A builder of {@link PlaceListNavigationTemplate}. */
@@ -234,6 +266,9 @@
ActionStrip mMapActionStrip;
@Nullable
PanModeDelegate mPanModeDelegate;
+ @Nullable
+ @ExperimentalCarApi
+ OnContentRefreshDelegate mOnContentRefreshDelegate;
/**
* Sets the title of the template.
@@ -419,6 +454,27 @@
}
/**
+ * Sets the {@link OnContentRefreshListener} to call when the user requests for the list
+ * contents to be refreshed in this template.
+ *
+ * <p>When the listener is triggered, an app can send a new {@link PlaceListMapTemplate},
+ * for example, to show a new set of point-of-interests based on the current user
+ * location, without the car host counting it against the template quota described in
+ * {@link Screen#onGetTemplate()}.
+ *
+ * @throws NullPointerException if {@code itemVisibilityChangedListener} is {@code null}
+ */
+ @NonNull
+ @SuppressLint({"MissingGetterMatchingBuilder", "ExecutorRegistration"})
+ @ExperimentalCarApi
+ public Builder setOnContentRefreshListener(
+ @NonNull OnContentRefreshListener onContentRefreshListener) {
+ mOnContentRefreshDelegate =
+ OnContentRefreshDelegateImpl.create(onContentRefreshListener);
+ return this;
+ }
+
+ /**
* Constructs the template defined by this builder.
*
* <h4>Requirements</h4>
diff --git a/car/app/app/src/test/java/androidx/car/app/CarAppServiceTest.java b/car/app/app/src/test/java/androidx/car/app/CarAppServiceTest.java
index faa7bb1..d5a69b1 100644
--- a/car/app/app/src/test/java/androidx/car/app/CarAppServiceTest.java
+++ b/car/app/app/src/test/java/androidx/car/app/CarAppServiceTest.java
@@ -112,6 +112,7 @@
AppInfo appInfo = new AppInfo(CarAppApiLevels.getOldest(), CarAppApiLevels.getLatest(),
"blah");
+ mCarAppService.onCreate();
mCarAppService.setAppInfo(appInfo);
// Sets default handshake and host info. OnAppCreate depends on these being non-null.
diff --git a/car/app/app/src/test/java/androidx/car/app/model/PlaceListMapTemplateTest.java b/car/app/app/src/test/java/androidx/car/app/model/PlaceListMapTemplateTest.java
index 3c19cf1..f2f57d9 100644
--- a/car/app/app/src/test/java/androidx/car/app/model/PlaceListMapTemplateTest.java
+++ b/car/app/app/src/test/java/androidx/car/app/model/PlaceListMapTemplateTest.java
@@ -19,10 +19,13 @@
import static com.google.common.truth.Truth.assertThat;
import static org.junit.Assert.assertThrows;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
import android.content.Context;
import android.text.SpannableString;
+import androidx.car.app.OnDoneCallback;
import androidx.car.app.TestUtils;
import androidx.test.core.app.ApplicationProvider;
@@ -138,6 +141,7 @@
assertThat(template.getHeaderAction()).isNull();
assertThat(template.getActionStrip()).isNull();
assertThat(template.isCurrentLocationEnabled()).isFalse();
+ assertThat(template.getOnContentRefreshDelegate()).isNull();
}
@Test
@@ -322,7 +326,26 @@
}
@Test
+ public void setOnContentRefreshListener_triggersListener() {
+ OnContentRefreshListener listener = mock(OnContentRefreshListener.class);
+ ItemList itemList = TestUtils.createItemListWithDistanceSpan(6, false, mDistanceSpan);
+ String title = "title";
+ PlaceListMapTemplate template =
+ new PlaceListMapTemplate.Builder()
+ .setItemList(itemList)
+ .setTitle(title)
+ .setOnContentRefreshListener(listener)
+ .build();
+
+ OnDoneCallback onDoneCallback = mock(OnDoneCallback.class);
+ template.getOnContentRefreshDelegate().sendContentRefreshRequested(onDoneCallback);
+ verify(listener).onContentRefreshRequested();
+ verify(onDoneCallback).onSuccess(null);
+ }
+
+ @Test
public void equals() {
+ OnContentRefreshListener listener = mock(OnContentRefreshListener.class);
ActionStrip actionStrip = new ActionStrip.Builder().addAction(Action.BACK).build();
String title = "foo";
Place place =
@@ -339,6 +362,7 @@
.setTitle(title)
.setAnchor(place)
.setCurrentLocationEnabled(true)
+ .setOnContentRefreshListener(listener)
.build();
assertThat(template)
@@ -351,6 +375,7 @@
.setTitle(title)
.setAnchor(place)
.setCurrentLocationEnabled(true)
+ .setOnContentRefreshListener(listener)
.build());
}
@@ -480,4 +505,24 @@
.setCurrentLocationEnabled(false)
.build());
}
+
+ @Test
+ public void notEquals_nonAndNonNullOnContentRefreshListeners() {
+ OnContentRefreshListener listener = mock(OnContentRefreshListener.class);
+ PlaceListMapTemplate template =
+ new PlaceListMapTemplate.Builder()
+ .setTitle("Title")
+ .setItemList(
+ TestUtils.createItemListWithDistanceSpan(6, false, mDistanceSpan))
+ .setOnContentRefreshListener(listener)
+ .build();
+
+ assertThat(template)
+ .isNotEqualTo(
+ new PlaceListMapTemplate.Builder()
+ .setTitle("Title")
+ .setItemList(TestUtils.createItemListWithDistanceSpan(6, false,
+ mDistanceSpan))
+ .build());
+ }
}
diff --git a/car/app/app/src/test/java/androidx/car/app/navigation/model/PlaceListNavigationTemplateTest.java b/car/app/app/src/test/java/androidx/car/app/navigation/model/PlaceListNavigationTemplateTest.java
index fd43af8..1bc7ff5 100644
--- a/car/app/app/src/test/java/androidx/car/app/navigation/model/PlaceListNavigationTemplateTest.java
+++ b/car/app/app/src/test/java/androidx/car/app/navigation/model/PlaceListNavigationTemplateTest.java
@@ -19,10 +19,13 @@
import static com.google.common.truth.Truth.assertThat;
import static org.junit.Assert.assertThrows;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
import android.content.Context;
import android.text.SpannableString;
+import androidx.car.app.OnDoneCallback;
import androidx.car.app.TestUtils;
import androidx.car.app.model.Action;
import androidx.car.app.model.ActionStrip;
@@ -33,6 +36,7 @@
import androidx.car.app.model.DistanceSpan;
import androidx.car.app.model.ItemList;
import androidx.car.app.model.Metadata;
+import androidx.car.app.model.OnContentRefreshListener;
import androidx.car.app.model.Place;
import androidx.car.app.model.PlaceMarker;
import androidx.car.app.model.Row;
@@ -206,6 +210,7 @@
assertThat(template.getItemList().getItems()).isEmpty();
assertThat(template.getTitle().toString()).isEqualTo("Title");
assertThat(template.getActionStrip()).isNull();
+ assertThat(template.getOnContentRefreshDelegate()).isNull();
}
@Test
@@ -332,7 +337,24 @@
}
@Test
+ public void setOnContentRefreshListener_triggersListener() {
+ OnContentRefreshListener listener = mock(OnContentRefreshListener.class);
+ PlaceListNavigationTemplate template =
+ new PlaceListNavigationTemplate.Builder()
+ .setTitle("title")
+ .setItemList(new ItemList.Builder().build())
+ .setOnContentRefreshListener(listener)
+ .build();
+
+ OnDoneCallback onDoneCallback = mock(OnDoneCallback.class);
+ template.getOnContentRefreshDelegate().sendContentRefreshRequested(onDoneCallback);
+ verify(listener).onContentRefreshRequested();
+ verify(onDoneCallback).onSuccess(null);
+ }
+
+ @Test
public void equals() {
+ OnContentRefreshListener listener = mock(OnContentRefreshListener.class);
PlaceListNavigationTemplate template =
new PlaceListNavigationTemplate.Builder()
.setItemList(
@@ -340,8 +362,10 @@
.setHeaderAction(Action.BACK)
.setActionStrip(new ActionStrip.Builder().addAction(Action.BACK).build())
.setMapActionStrip(mMapActionStrip)
- .setPanModeListener((panModechanged) -> {})
+ .setPanModeListener((panModechanged) -> {
+ })
.setTitle("title")
+ .setOnContentRefreshListener(listener)
.build();
assertThat(template)
@@ -353,8 +377,10 @@
.setActionStrip(
new ActionStrip.Builder().addAction(Action.BACK).build())
.setMapActionStrip(mMapActionStrip)
- .setPanModeListener((panModechanged) -> {})
+ .setPanModeListener((panModechanged) -> {
+ })
.setTitle("title")
+ .setOnContentRefreshListener(listener)
.build());
}
@@ -485,4 +511,24 @@
.setTitle("other")
.build());
}
+
+ @Test
+ public void notEquals_nonAndNonNullOnContentRefreshListeners() {
+ OnContentRefreshListener listener = mock(OnContentRefreshListener.class);
+ PlaceListNavigationTemplate template =
+ new PlaceListNavigationTemplate.Builder()
+ .setItemList(
+ TestUtils.createItemListWithDistanceSpan(6, false, mDistanceSpan))
+ .setTitle("title")
+ .setOnContentRefreshListener(listener)
+ .build();
+
+ assertThat(template)
+ .isNotEqualTo(
+ new PlaceListNavigationTemplate.Builder()
+ .setItemList(TestUtils.createItemListWithDistanceSpan(6, false,
+ mDistanceSpan))
+ .setTitle("other")
+ .build());
+ }
}
diff --git a/collection2/collection2/src/commonMain/kotlin/androidx/collection/LongSparseArray.kt b/collection2/collection2/src/commonMain/kotlin/androidx/collection/LongSparseArray.kt
index 023e607..eb65603 100644
--- a/collection2/collection2/src/commonMain/kotlin/androidx/collection/LongSparseArray.kt
+++ b/collection2/collection2/src/commonMain/kotlin/androidx/collection/LongSparseArray.kt
@@ -218,6 +218,13 @@
* @return Returns true if the value was replaced.
*/
fun replace(key: Long, oldValue: E?, newValue: E): Boolean
+
+ /**
+ * This implementation composes a string by iterating over its mappings. If
+ * this map contains itself as a value, the string "(this Map)"
+ * will appear in its place.
+ */
+ override fun toString(): String
}
internal inline fun <E> LongSparseArray<E>.commonSize(): Int {
diff --git a/collection2/collection2/src/commonMain/kotlin/androidx/collection/SimpleArrayMap.kt b/collection2/collection2/src/commonMain/kotlin/androidx/collection/SimpleArrayMap.kt
index 8b359bc..df659c3 100644
--- a/collection2/collection2/src/commonMain/kotlin/androidx/collection/SimpleArrayMap.kt
+++ b/collection2/collection2/src/commonMain/kotlin/androidx/collection/SimpleArrayMap.kt
@@ -532,9 +532,7 @@
}
/**
- * {@inheritDoc}
- *
- * <p>This implementation returns false if the object is not a Map or
+ * This implementation returns false if the object is not a Map or
* SimpleArrayMap, or if the maps have different sizes. Otherwise, for each
* key in this map, values of both maps are compared. If the values for any
* key are not equal, the method returns false, otherwise it returns true.
@@ -591,9 +589,6 @@
return false
}
- /**
- * {@inheritDoc}
- */
open override fun hashCode(): Int {
val hashes = hashes
val array: Array<Any?> = keyValues
@@ -611,9 +606,7 @@
}
/**
- * {@inheritDoc}
- *
- * <p>This implementation composes a string by iterating over its mappings. If
+ * This implementation composes a string by iterating over its mappings. If
* this map contains itself as a key or a value, the string "(this Map)"
* will appear in its place.
*/
diff --git a/collection2/collection2/src/commonMain/kotlin/androidx/collection/SparseArray.kt b/collection2/collection2/src/commonMain/kotlin/androidx/collection/SparseArray.kt
index 587c5c4..e05d057 100644
--- a/collection2/collection2/src/commonMain/kotlin/androidx/collection/SparseArray.kt
+++ b/collection2/collection2/src/commonMain/kotlin/androidx/collection/SparseArray.kt
@@ -23,6 +23,39 @@
import kotlin.jvm.JvmName
+/**
+ * [SparseArray]s map integers to values. Unlike a normal array,
+ * there can be gaps in the indices. It is intended to be more memory efficient
+ * than using a [HashMap] to map [Int]s to [Any], both because it avoids
+ * auto-boxing keys and its data structure doesn't rely on an extra entry object
+ * for each mapping.
+ *
+ * Note that this container keeps its mappings in an array data structure, using a binary search to
+ * find keys. The implementation is not intended to be appropriate for data structures that may
+ * contain large numbers of items. It is generally slower than a traditional HashMap, since
+ * lookups require a binary search and adds and removes require inserting and deleting entries in
+ * the array. For containers holding up to hundreds of items, the performance difference is not
+ * significant, less than 50%.
+ *
+ * To help with performance, the container includes an optimization when removing
+ * keys: instead of compacting its array immediately, it leaves the removed entry marked
+ * as deleted. The entry can then be re-used for the same key, or compacted later in
+ * a single garbage collection step of all removed entries. This garbage collection will
+ * need to be performed at any time the array needs to be grown or the map size or
+ * entry values are retrieved.
+ *
+ * It is possible to iterate over the items in this container using
+ * [keyAt] and [valueAt]. Iterating over the keys using
+ * [keyAt] with ascending values of the index will return the
+ * keys in ascending order, or the values corresponding to the keys in ascending
+ * order in the case of [valueAt].
+ *
+ * @param initialCapacity initial capacity of the array. The array will not
+ * require any additional memory allocation to store the specified
+ * number of mappings. If you supply an initial capacity of 0, the
+ * sparse array will be initialized with a light-weight representation
+ * not requiring any additional array allocations. Default initialCapacity is 10.
+ */
expect class SparseArray<E>(initialCapacity: Int = 10) {
internal var keys: IntArray
internal var values: Array<Any?>
@@ -33,36 +66,143 @@
constructor(array: SparseArray<E>)
+ /**
+ * The number of key-value mappings that this [SparseArray] currently stores.
+ */
val size: Int
+
+ /**
+ * @return true if [size] is 0.
+ */
fun isEmpty(): Boolean
+ /**
+ * Gets the value mapped from the specified key, or `null` if no such mapping has been made.
+ */
operator fun get(key: Int): E?
+
+ /**
+ * Gets the value mapped from the specified key, or the specified [default] value if no such
+ * mapping has been made.
+ */
fun get(key: Int, default: E): E
+ /**
+ * Adds a mapping from the specified key to the specified value,
+ * replacing the previous mapping from the specified key if there
+ * was one.
+ */
fun put(key: Int, value: E) // TODO operator
+
+ /**
+ * Copies all of the mappings from [other] to this array. The effect of this call is
+ * equivalent to that of calling [put] on this map once for each mapping
+ * from key to value in [other].
+ */
fun putAll(other: SparseArray<out E>)
+
+ /**
+ * Add a new value to the array map only if the key does not already have a value or it is
+ * mapped to `null`.
+ * @param key The key under which to store the value.
+ * @param value The value to store for the given key.
+ * @return the value that was stored for the given key, or `null` if there was no such key.
+ */
fun putIfAbsent(key: Int, value: E): E?
+
+ /**
+ * Puts a key/value pair into the array, optimizing for the case where
+ * the key is greater than all existing keys in the array.
+ */
fun append(key: Int, value: E)
+ /**
+ * Given an index in the range `0...size()-1`, returns the key from the [index]th key-value
+ * mapping that this [SparseArray] stores.
+ */
fun keyAt(index: Int): Int
+ /**
+ * Given an index in the range `0...size()-1`, returns the value from the [index]th key-value
+ * mapping that this [SparseArray] stores.
+ */
fun valueAt(index: Int): E
+
+ /**
+ * Given an index in the range `0...size()-1`, sets a new value for the [index]th key-value
+ * mapping that this [SparseArray] stores.
+ */
fun setValueAt(index: Int, value: E)
+ /**
+ * Returns the index for which [keyAt] would return the specified key, or a negative number if
+ * the specified key is not mapped.
+ */
fun indexOfKey(key: Int): Int
+
+ /**
+ * Returns an index for which [valueAt] would return the specified key, or a negative number
+ * if no keys map to the specified value.
+ *
+ * Beware that this is a linear search, unlike lookups by key, and that multiple keys can map
+ * to the same value and this will find only one of them.
+ *
+ * Note also that unlike most collections' `indexOf` methods, this method compares values using
+ * `===` rather than `==`.
+ */
fun indexOfValue(value: E): Int
+ /** Returns true if the specified key is mapped. */
fun containsKey(key: Int): Boolean
+
+ /** Returns true if the specified value is mapped from any key. */
fun containsValue(value: E): Boolean
+ /**
+ * Removes all key-value mappings from this SparseArray.
+ */
fun clear()
+ /**
+ * Removes the mapping from the specified key, if there was any.
+ */
fun remove(key: Int)
+
+ /**
+ * Remove an existing [key] from the array map only if it is currently mapped to [value].
+ * @return Returns true if the mapping was removed.
+ */
fun remove(key: Int, value: Any?): Boolean
+
+ /**
+ * Removes the mapping at the specified index.
+ */
fun removeAt(index: Int)
+ /**
+ * Replace the mapping for [key] only if it is already mapped to a value.
+ * @param key The key of the mapping to replace.
+ * @param value The value to store for the given key.
+ * @return Returns the previous mapped value or `null`.
+ */
fun replace(key: Int, value: E): E?
+
+ /**
+ * Replace the mapping for [key] only if it is already mapped to value.
+ *
+ * @param key The key of the mapping to replace.
+ * @param oldValue The value expected to be mapped to the key.
+ * @param newValue The value to store for the given key.
+ * @return `true` if the value was replaced.
+ */
fun replace(key: Int, oldValue: E?, newValue: E): Boolean
+
+ /**
+ * This implementation composes a string by iterating over its mappings. If
+ * this array contains itself as a value, the string "(this Map)"
+ * will appear in its place.
+ */
+ override fun toString(): String
}
internal inline fun <E> SparseArray<E>.commonSize(): Int {
diff --git a/collection2/collection2/src/commonMain/kotlin/androidx/collection/collection-documentation.md b/collection2/collection2/src/commonMain/kotlin/androidx/collection/collection-documentation.md
new file mode 100644
index 0000000..e90ba65
--- /dev/null
+++ b/collection2/collection2/src/commonMain/kotlin/androidx/collection/collection-documentation.md
@@ -0,0 +1,16 @@
+# Module root
+
+Collections
+
+# Package androidx.collection
+
+A set of collection libraries suited for small data sets which are also optimized for Android,
+usually by sacrificing speed for memory efficiency.
+
+* [ArraySet] / [ArrayMap]: Implementations of [Set] and [Map], respectively, which
+ are backed by an array with lookups done by a binary search.
+* [SparseArray] / [LongSparseArray]: Map-like structures whose keys are [Int] and [Long],
+ respectively, which prevents boxing compared to a traditional [Map].
+* [LruCache]: A map-like cache which keeps frequently-used entries and automatically evicts others.
+* [CircularArray] / [CircularIntArray]: List-like structures which can efficiently prepend and
+ append elements.
\ No newline at end of file
diff --git a/collection2/collection2/src/jvmMain/java/androidx/collection/ArrayMap.java b/collection2/collection2/src/jvmMain/java/androidx/collection/ArrayMap.java
index 7fdc52d..5f0f65b 100644
--- a/collection2/collection2/src/jvmMain/java/androidx/collection/ArrayMap.java
+++ b/collection2/collection2/src/jvmMain/java/androidx/collection/ArrayMap.java
@@ -26,6 +26,32 @@
/**
* Memory-efficient map of keys to values with list-style random-access semantics.
*
+ * ArrayMap is a generic key->value mapping data structure that is
+ * designed to be more memory efficient than a traditional {@link java.util.HashMap},
+ * this implementation is a version of the platform's
+ * {@code android.util.ArrayMap} that can be used on older versions of the platform.
+ * It keeps its mappings in an array data structure -- an integer array of hash
+ * codes for each item, and an Object array of the key/value pairs. This allows it to
+ * avoid having to create an extra object for every entry put in to the map, and it
+ * also tries to control the growth of the size of these arrays more aggressively
+ * (since growing them only requires copying the entries in the array, not rebuilding
+ * a hash map).
+ *
+ * <p>If you don't need the standard Java container APIs provided here (iterators etc),
+ * consider using {@link SimpleArrayMap} instead.</p>
+ *
+ * <p>Note that this implementation is not intended to be appropriate for data structures
+ * that may contain large numbers of items. It is generally slower than a traditional
+ * HashMap, since lookups require a binary search and adds and removes require inserting
+ * and deleting entries in the array. For containers holding up to hundreds of items,
+ * the performance difference is not significant, less than 50%.</p>
+ *
+ * <p>Because this container is intended to better balance memory use, unlike most other
+ * standard Java containers it will shrink its array as items are removed from it. Currently
+ * you have no control over this shrinking -- if you set a capacity and then remove an
+ * item, it may reduce the capacity to better match the current size. In the future an
+ * explicit call to set the capacity should turn off this aggressive shrinking behavior.</p>
+ *
* <p><b>Note:</b></p> This is the only class in this package that is implemented in Java. It is
* difficult to implement this class in Kotlin without breaking runtime or compile-time
* compatibility due to the many implicit bridges between Kotlin's and Java's collection classes
diff --git a/collection2/collection2/src/jvmMain/kotlin/androidx/collection/LongSparseArray.jvm.kt b/collection2/collection2/src/jvmMain/kotlin/androidx/collection/LongSparseArray.jvm.kt
index 2347fd6..6312568 100644
--- a/collection2/collection2/src/jvmMain/kotlin/androidx/collection/LongSparseArray.jvm.kt
+++ b/collection2/collection2/src/jvmMain/kotlin/androidx/collection/LongSparseArray.jvm.kt
@@ -102,5 +102,5 @@
return clone
}
- override fun toString(): String = commonToString()
+ actual override fun toString(): String = commonToString()
}
diff --git a/collection2/collection2/src/jvmMain/kotlin/androidx/collection/SparseArray.jvm.kt b/collection2/collection2/src/jvmMain/kotlin/androidx/collection/SparseArray.jvm.kt
index 5114763..286494b 100644
--- a/collection2/collection2/src/jvmMain/kotlin/androidx/collection/SparseArray.jvm.kt
+++ b/collection2/collection2/src/jvmMain/kotlin/androidx/collection/SparseArray.jvm.kt
@@ -99,7 +99,7 @@
return clone
}
- override fun toString(): String = commonToString()
+ actual override fun toString(): String = commonToString()
@Deprecated("Use remove(key)", level = HIDDEN) // For Java binary compatibility.
fun delete(key: Int): Unit = remove(key)
diff --git a/collection2/collection2/src/nonJvmMain/kotlin/androidx/collection/LongSparseArray.nonJvm.kt b/collection2/collection2/src/nonJvmMain/kotlin/androidx/collection/LongSparseArray.nonJvm.kt
index f2f7005..72e6518 100644
--- a/collection2/collection2/src/nonJvmMain/kotlin/androidx/collection/LongSparseArray.nonJvm.kt
+++ b/collection2/collection2/src/nonJvmMain/kotlin/androidx/collection/LongSparseArray.nonJvm.kt
@@ -75,5 +75,5 @@
actual fun replace(key: Long, oldValue: E?, newValue: E): Boolean =
commonReplace(key, oldValue, newValue)
- override fun toString(): String = commonToString()
+ actual override fun toString(): String = commonToString()
}
diff --git a/collection2/collection2/src/nonJvmMain/kotlin/androidx/collection/SparseArray.nonJvm.kt b/collection2/collection2/src/nonJvmMain/kotlin/androidx/collection/SparseArray.nonJvm.kt
index 3a89403..4697eb7 100644
--- a/collection2/collection2/src/nonJvmMain/kotlin/androidx/collection/SparseArray.nonJvm.kt
+++ b/collection2/collection2/src/nonJvmMain/kotlin/androidx/collection/SparseArray.nonJvm.kt
@@ -75,5 +75,5 @@
actual fun replace(key: Int, oldValue: E?, newValue: E): Boolean =
commonReplace(key, oldValue, newValue)
- override fun toString(): String = commonToString()
+ actual override fun toString(): String = commonToString()
}
diff --git a/compose/animation/animation-graphics/src/androidAndroidTest/kotlin/androidx/compose/animation/graphics/vector/AnimatorTest.kt b/compose/animation/animation-graphics/src/androidAndroidTest/kotlin/androidx/compose/animation/graphics/vector/AnimatorTest.kt
index 8e3a241..a84de10 100644
--- a/compose/animation/animation-graphics/src/androidAndroidTest/kotlin/androidx/compose/animation/graphics/vector/AnimatorTest.kt
+++ b/compose/animation/animation-graphics/src/androidAndroidTest/kotlin/androidx/compose/animation/graphics/vector/AnimatorTest.kt
@@ -131,13 +131,41 @@
)
}
+ @Test
+ fun offsetAnimators() {
+ verifyAnimator(
+ AnimatorSet(
+ animators = listOf(
+ objectAnimator(
+ propertyName = "translateX",
+ duration = 500,
+ keyframes = listOf(
+ Keyframe(0f, 0f, LinearEasing),
+ Keyframe(1f, 500f, LinearEasing),
+ )
+ ),
+ objectAnimator(
+ propertyName = "translateX",
+ duration = 500,
+ startDelay = 500,
+ keyframes = listOf(
+ Keyframe(0f, 500f, LinearEasing),
+ Keyframe(1f, 1000f, LinearEasing),
+ )
+ )
+ ),
+ ordering = Ordering.Together
+ )
+ )
+ }
+
@OptIn(InternalAnimationApi::class, ExperimentalComposeUiApi::class)
private fun verifyAnimator(a: Animator) {
val isAtEnd = mutableStateOf(false)
val config = StateVectorConfig()
rule.setContent {
val transition = updateTransition(isAtEnd.value, label = "translateX")
- a.Configure(transition, config, 1000, 0)
+ a.Configure(transition, config, 1000)
if (transition.isRunning) {
assertThat(config.getOrDefault(VectorProperty.TranslateX, -1f))
.isWithin(tolerance)
diff --git a/compose/animation/animation-graphics/src/commonMain/kotlin/androidx/compose/animation/graphics/vector/Animator.kt b/compose/animation/animation-graphics/src/commonMain/kotlin/androidx/compose/animation/graphics/vector/Animator.kt
index 12766ce..5e32fb3 100644
--- a/compose/animation/animation-graphics/src/commonMain/kotlin/androidx/compose/animation/graphics/vector/Animator.kt
+++ b/compose/animation/animation-graphics/src/commonMain/kotlin/androidx/compose/animation/graphics/vector/Animator.kt
@@ -19,13 +19,14 @@
import androidx.compose.animation.animateColor
import androidx.compose.animation.core.Easing
import androidx.compose.animation.core.FiniteAnimationSpec
-import androidx.compose.animation.core.KeyframesSpec
import androidx.compose.animation.core.RepeatMode
import androidx.compose.animation.core.Transition
import androidx.compose.animation.core.animateFloat
import androidx.compose.animation.core.keyframes
import androidx.compose.runtime.Composable
import androidx.compose.runtime.State
+import androidx.compose.runtime.derivedStateOf
+import androidx.compose.runtime.remember
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.SolidColor
import androidx.compose.ui.graphics.vector.PathNode
@@ -44,20 +45,217 @@
transition: Transition<Boolean>,
overallDuration: Int
): VectorConfig {
- return StateVectorConfig().also { override ->
- Configure(transition, override, overallDuration, 0)
+ return remember { StateVectorConfig() }.also { config ->
+ Configure(transition, config, overallDuration)
}
}
@Composable
- abstract fun Configure(
+ fun Configure(
transition: Transition<Boolean>,
config: StateVectorConfig,
+ overallDuration: Int
+ ) {
+ val propertyValuesMap = remember(overallDuration) {
+ mutableMapOf<String, PropertyValues<*>>().also {
+ collectPropertyValues(it, overallDuration, 0)
+ }
+ }
+ for ((propertyName, values) in propertyValuesMap) {
+ values.timestamps.sortBy { it.time }
+ val state = values.createState(transition, propertyName, overallDuration)
+ @Suppress("UNCHECKED_CAST")
+ when (propertyName) {
+ "rotation" -> config.rotationState = state as State<Float>
+ "pivotX" -> config.pivotXState = state as State<Float>
+ "pivotY" -> config.pivotYState = state as State<Float>
+ "scaleX" -> config.scaleXState = state as State<Float>
+ "scaleY" -> config.scaleYState = state as State<Float>
+ "translateX" -> config.translateXState = state as State<Float>
+ "translateY" -> config.translateYState = state as State<Float>
+ "fillAlpha" -> config.fillAlphaState = state as State<Float>
+ "strokeWidth" -> config.strokeWidthState = state as State<Float>
+ "strokeAlpha" -> config.strokeAlphaState = state as State<Float>
+ "trimPathStart" -> config.trimPathStartState = state as State<Float>
+ "trimPathEnd" -> config.trimPathEndState = state as State<Float>
+ "trimPathOffset" -> config.trimPathOffsetState = state as State<Float>
+ "fillColor" -> config.fillColorState = state as State<Color>
+ "strokeColor" -> config.strokeColorState = state as State<Color>
+ "pathData" -> config.pathDataState = state as State<List<PathNode>>
+ else -> throw IllegalStateException("Unknown propertyName: $propertyName")
+ }
+ }
+ }
+
+ abstract fun collectPropertyValues(
+ propertyValuesMap: MutableMap<String, PropertyValues<*>>,
overallDuration: Int,
parentDelay: Int
)
}
+internal class Timestamp<T>(
+ val time: Int,
+ val value: T,
+ val easing: Easing
+)
+
+internal sealed class PropertyValues<T> {
+
+ val timestamps = mutableListOf<Timestamp<T>>()
+
+ fun addKeyframes(
+ keyframes: List<Keyframe<T>>,
+ overallDuration: Int,
+ parentDelay: Int,
+ totalDuration: Int,
+ startDelay: Int
+ ) {
+ val startFraction = (parentDelay + startDelay).toFloat() / overallDuration
+ val fractionRatio = (totalDuration - startDelay).toFloat() / overallDuration
+ timestamps.addAll(
+ keyframes.map { keyframe ->
+ Timestamp(
+ ((keyframe.fraction * fractionRatio + startFraction) * overallDuration).toInt(),
+ keyframe.value,
+ keyframe.interpolator
+ )
+ }
+ )
+ }
+
+ @Composable
+ abstract fun createState(
+ transition: Transition<Boolean>,
+ propertyName: String,
+ overallDuration: Int
+ ): State<T>
+
+ protected fun createAnimationSpec(
+ overallDuration: Int
+ ): @Composable Transition.Segment<Boolean>.() -> FiniteAnimationSpec<T> {
+ return {
+ if (targetState) { // Start to end
+ keyframes {
+ durationMillis = overallDuration
+ timestamps.fastForEach { timestamp ->
+ timestamp.value at timestamp.time with timestamp.easing
+ }
+ }
+ } else {
+ keyframes {
+ durationMillis = overallDuration
+ timestamps.asReversed().fastForEach { timestamp ->
+ timestamp.value at
+ overallDuration - timestamp.time with
+ timestamp.easing.transpose()
+ }
+ }
+ }
+ }
+ }
+
+ protected fun targetValueByState(): @Composable (state: Boolean) -> T {
+ return { atEnd ->
+ if (atEnd) {
+ timestamps.last().value
+ } else {
+ timestamps.first().value
+ }
+ }
+ }
+}
+
+private class FloatPropertyValues : PropertyValues<Float>() {
+
+ @Composable
+ override fun createState(
+ transition: Transition<Boolean>,
+ propertyName: String,
+ overallDuration: Int
+ ): State<Float> {
+ return transition.animateFloat(
+ transitionSpec = createAnimationSpec(overallDuration),
+ label = propertyName,
+ targetValueByState = targetValueByState()
+ )
+ }
+}
+
+private class ColorPropertyValues : PropertyValues<Color>() {
+
+ @Composable
+ override fun createState(
+ transition: Transition<Boolean>,
+ propertyName: String,
+ overallDuration: Int
+ ): State<Color> {
+ return transition.animateColor(
+ transitionSpec = createAnimationSpec(overallDuration),
+ label = propertyName,
+ targetValueByState = targetValueByState()
+ )
+ }
+}
+
+internal class PathPropertyValues : PropertyValues<List<PathNode>>() {
+
+ @Composable
+ override fun createState(
+ transition: Transition<Boolean>,
+ propertyName: String,
+ overallDuration: Int
+ ): State<List<PathNode>> {
+ val timeState = transition.animateFloat(
+ transitionSpec = {
+ if (targetState) { // Start to end
+ keyframes {
+ durationMillis = overallDuration
+ timestamps.fastForEach { timestamp ->
+ timestamp.time.toFloat() at timestamp.time with timestamp.easing
+ }
+ }
+ } else {
+ keyframes {
+ durationMillis = overallDuration
+ timestamps.asReversed().fastForEach { timestamp ->
+ timestamp.time.toFloat() at
+ overallDuration - timestamp.time with
+ timestamp.easing.transpose()
+ }
+ }
+ }
+ },
+ label = propertyName
+ ) { atEnd ->
+ if (atEnd) {
+ timestamps.last().time
+ } else {
+ timestamps.first().time
+ }.toFloat()
+ }
+ return derivedStateOf { interpolate(timeState.value) }
+ }
+
+ private fun interpolate(time: Float): List<PathNode> {
+ val index = (timestamps.indexOfFirst { it.time >= time } - 1)
+ .coerceAtLeast(0)
+ val easing = timestamps[index + 1].easing
+ val innerFraction = easing.transform(
+ (
+ (time - timestamps[index].time) /
+ (timestamps[index + 1].time - timestamps[index].time)
+ )
+ .coerceIn(0f, 1f)
+ )
+ return lerp(
+ timestamps[index].value,
+ timestamps[index + 1].value,
+ innerFraction
+ )
+ }
+}
+
internal data class ObjectAnimator(
val duration: Int,
val startDelay: Int,
@@ -72,21 +270,59 @@
startDelay + duration * (repeatCount + 1)
}
- @Composable
- override fun Configure(
- transition: Transition<Boolean>,
- config: StateVectorConfig,
+ override fun collectPropertyValues(
+ propertyValuesMap: MutableMap<String, PropertyValues<*>>,
overallDuration: Int,
parentDelay: Int
) {
holders.fastForEach { holder ->
- holder.AnimateIn(
- config,
- transition,
- overallDuration,
- duration,
- parentDelay + startDelay
- )
+ when (holder) {
+ is PropertyValuesHolder2D -> {
+ // TODO(b/178978971): Implement path animation
+ }
+ is PropertyValuesHolderFloat -> {
+ val values =
+ propertyValuesMap[holder.propertyName] as FloatPropertyValues?
+ ?: FloatPropertyValues()
+ values.addKeyframes(
+ holder.animatorKeyframes,
+ overallDuration,
+ parentDelay,
+ totalDuration,
+ startDelay
+ )
+ propertyValuesMap[holder.propertyName] = values
+ }
+ is PropertyValuesHolderColor -> {
+ val values =
+ propertyValuesMap[holder.propertyName] as ColorPropertyValues?
+ ?: ColorPropertyValues()
+ values.addKeyframes(
+ holder.animatorKeyframes,
+ overallDuration,
+ parentDelay,
+ totalDuration,
+ startDelay
+ )
+ propertyValuesMap[holder.propertyName] = values
+ }
+ is PropertyValuesHolderPath -> {
+ val values =
+ propertyValuesMap[holder.propertyName] as PathPropertyValues?
+ ?: PathPropertyValues()
+ values.addKeyframes(
+ holder.animatorKeyframes,
+ overallDuration,
+ parentDelay,
+ totalDuration,
+ startDelay
+ )
+ propertyValuesMap[holder.propertyName] = values
+ }
+ is PropertyValuesHolderInt -> {
+ // Not implemented since AVD does not use any Int property.
+ }
+ }
}
}
}
@@ -101,342 +337,71 @@
Ordering.Sequentially -> animators.fastSumBy { it.totalDuration }
}
- @Composable
- override fun Configure(
- transition: Transition<Boolean>,
- config: StateVectorConfig,
+ override fun collectPropertyValues(
+ propertyValuesMap: MutableMap<String, PropertyValues<*>>,
overallDuration: Int,
parentDelay: Int
) {
when (ordering) {
Ordering.Together -> {
animators.fastForEach { animator ->
- animator.Configure(transition, config, overallDuration, parentDelay)
+ animator.collectPropertyValues(
+ propertyValuesMap,
+ overallDuration,
+ parentDelay
+ )
}
}
Ordering.Sequentially -> {
var accumulatedDelay = parentDelay
- normalizeSequentialAnimators().fastForEach { animator ->
- animator.Configure(transition, config, overallDuration, accumulatedDelay)
+ animators.fastForEach { animator ->
+ animator.collectPropertyValues(
+ propertyValuesMap,
+ overallDuration,
+ accumulatedDelay
+ )
accumulatedDelay += animator.totalDuration
}
}
}
}
-
- /**
- * Normalizes a sequential animator set that is used as a list of keyframes for a single
- * property. The animators are expected to run one after another animating the same property
- * continuously, and none of the animators should use intermediate keyframes in it. If the
- * animators meet this criteria, they are converted to an animator with multiple keyframes.
- * Otherwise, this returns [animators] as they are.
- */
- private fun normalizeSequentialAnimators(): List<Animator> {
- if (ordering != Ordering.Sequentially) {
- return animators
- }
- var propertyName: String? = null
- val keyframes = mutableListOf<Keyframe<Any?>>()
- var startDelay: Int? = null
- var resultHolder: PropertyValuesHolder<*>? = null
- var accumulatedDuration = 0f
- val totalDuration = totalDuration
- for (animator in animators) {
- if (animator !is ObjectAnimator) {
- return animators
- }
- if (startDelay == null) {
- startDelay = animator.startDelay
- }
- val holders = animator.holders
- if (holders.size != 1) {
- return animators
- }
- val holder = holders[0]
- if (holder !is PropertyValuesHolder1D) {
- return animators
- }
- if (propertyName == null) {
- propertyName = holder.propertyName
- } else if (propertyName != holder.propertyName) {
- return animators
- }
- if (resultHolder == null) {
- @Suppress("UNCHECKED_CAST")
- resultHolder = when (holder) {
- is PropertyValuesHolderFloat -> PropertyValuesHolderFloat(
- propertyName,
- keyframes as List<Keyframe<Float>>
- )
- is PropertyValuesHolderInt -> PropertyValuesHolderInt(
- propertyName,
- keyframes as List<Keyframe<Int>>
- )
- is PropertyValuesHolderPath -> PropertyValuesHolderPath(
- propertyName,
- keyframes as List<Keyframe<List<PathNode>>>
- )
- is PropertyValuesHolderColor -> PropertyValuesHolderColor(
- propertyName,
- keyframes as List<Keyframe<Color>>
- )
- }
- }
- if (holder.animatorKeyframes.size != 2) {
- return animators
- }
- val start = holder.animatorKeyframes[0]
- val end = holder.animatorKeyframes[1]
- if (start.fraction != 0f || end.fraction != 1f) {
- return animators
- }
- if (keyframes.isEmpty()) {
- keyframes.add(Keyframe(0f, start.value, start.interpolator))
- }
- accumulatedDuration += animator.duration
- val fraction = accumulatedDuration / (totalDuration - startDelay)
- keyframes.add(Keyframe(fraction, end.value, end.interpolator))
- }
- if (resultHolder == null) {
- return animators
- }
- return listOf(
- ObjectAnimator(
- duration = totalDuration,
- startDelay = startDelay ?: 0,
- repeatCount = 0,
- repeatMode = RepeatMode.Restart,
- holders = listOf(resultHolder)
- )
- )
- }
}
-internal sealed class PropertyValuesHolder<T> {
-
- @Composable
- abstract fun AnimateIn(
- config: StateVectorConfig,
- transition: Transition<Boolean>,
- overallDuration: Int,
- duration: Int,
- delay: Int
- )
-}
+internal sealed class PropertyValuesHolder<T>
internal data class PropertyValuesHolder2D(
val xPropertyName: String,
val yPropertyName: String,
val pathData: List<PathNode>,
val interpolator: Easing
-) : PropertyValuesHolder<Pair<Float, Float>>() {
-
- @Composable
- override fun AnimateIn(
- config: StateVectorConfig,
- transition: Transition<Boolean>,
- overallDuration: Int,
- duration: Int,
- delay: Int
- ) {
- // TODO(b/178978971): Implement path animation.
- }
-}
+) : PropertyValuesHolder<Pair<Float, Float>>()
internal sealed class PropertyValuesHolder1D<T>(
val propertyName: String
) : PropertyValuesHolder<T>() {
abstract val animatorKeyframes: List<Keyframe<T>>
-
- protected val targetValueByState: @Composable (Boolean) -> T = { atEnd ->
- if (atEnd) {
- animatorKeyframes.last().value
- } else {
- animatorKeyframes.first().value
- }
- }
-
- protected fun <R> createTransitionSpec(
- overallDuration: Int,
- duration: Int,
- delay: Int,
- addKeyframe: KeyframesSpec.KeyframesSpecConfig<R>.(
- keyframe: Keyframe<T>,
- time: Int,
- easing: Easing
- ) -> Unit
- ): @Composable Transition.Segment<Boolean>.() -> FiniteAnimationSpec<R> {
- return {
- if (targetState) { // at end
- keyframes {
- durationMillis = duration
- delayMillis = delay
- animatorKeyframes.fastForEach { keyframe ->
- val time = (duration * keyframe.fraction).toInt()
- addKeyframe(keyframe, time, keyframe.interpolator)
- }
- }
- } else {
- keyframes {
- durationMillis = duration
- delayMillis = overallDuration - duration - delay
- animatorKeyframes.fastForEach { keyframe ->
- val time = (duration * (1 - keyframe.fraction)).toInt()
- addKeyframe(keyframe, time, keyframe.interpolator.transpose())
- }
- }
- }
- }
- }
}
internal class PropertyValuesHolderFloat(
propertyName: String,
override val animatorKeyframes: List<Keyframe<Float>>
-) : PropertyValuesHolder1D<Float>(propertyName) {
-
- @Composable
- override fun AnimateIn(
- config: StateVectorConfig,
- transition: Transition<Boolean>,
- overallDuration: Int,
- duration: Int,
- delay: Int
- ) {
- val state = transition.animateFloat(
- transitionSpec = createTransitionSpec(
- overallDuration,
- duration,
- delay
- ) { keyframe, time, easing ->
- keyframe.value at time with easing
- },
- label = propertyName,
- targetValueByState = targetValueByState
- )
- when (propertyName) {
- "rotation" -> config.rotationState = state
- "pivotX" -> config.pivotXState = state
- "pivotY" -> config.pivotYState = state
- "scaleX" -> config.scaleXState = state
- "scaleY" -> config.scaleYState = state
- "translateX" -> config.translateXState = state
- "translateY" -> config.translateYState = state
- "fillAlpha" -> config.fillAlphaState = state
- "strokeWidth" -> config.strokeWidthState = state
- "strokeAlpha" -> config.strokeAlphaState = state
- "trimPathStart" -> config.trimPathStartState = state
- "trimPathEnd" -> config.trimPathEndState = state
- "trimPathOffset" -> config.trimPathOffsetState = state
- else -> throw IllegalStateException("Unknown propertyName: $propertyName")
- }
- }
-}
+) : PropertyValuesHolder1D<Float>(propertyName)
internal class PropertyValuesHolderInt(
propertyName: String,
override val animatorKeyframes: List<Keyframe<Int>>
-) : PropertyValuesHolder1D<Int>(propertyName) {
-
- @Composable
- override fun AnimateIn(
- config: StateVectorConfig,
- transition: Transition<Boolean>,
- overallDuration: Int,
- duration: Int,
- delay: Int
- ) {
- // AnimatedVectorDrawable does not have an Int property; Ignore.
- }
-}
+) : PropertyValuesHolder1D<Int>(propertyName)
internal class PropertyValuesHolderColor(
propertyName: String,
override val animatorKeyframes: List<Keyframe<Color>>
-) : PropertyValuesHolder1D<Color>(propertyName) {
-
- @Composable
- override fun AnimateIn(
- config: StateVectorConfig,
- transition: Transition<Boolean>,
- overallDuration: Int,
- duration: Int,
- delay: Int
- ) {
- val state = transition.animateColor(
- transitionSpec = createTransitionSpec(
- overallDuration,
- duration,
- delay
- ) { keyframe, time, easing ->
- keyframe.value at time with easing
- },
- label = propertyName,
- targetValueByState = targetValueByState
- )
- when (propertyName) {
- "fillColor" -> config.fillColorState = state
- "strokeColor" -> config.strokeColorState = state
- else -> throw IllegalStateException("Unknown propertyName: $propertyName")
- }
- }
-}
+) : PropertyValuesHolder1D<Color>(propertyName)
internal class PropertyValuesHolderPath(
propertyName: String,
override val animatorKeyframes: List<Keyframe<List<PathNode>>>
-) : PropertyValuesHolder1D<List<PathNode>>(propertyName) {
-
- @Composable
- override fun AnimateIn(
- config: StateVectorConfig,
- transition: Transition<Boolean>,
- overallDuration: Int,
- duration: Int,
- delay: Int
- ) {
- if (propertyName == "pathData") {
- val state = transition.animateFloat(
- transitionSpec = createTransitionSpec(
- overallDuration,
- duration,
- delay
- ) { keyframe, time, easing ->
- keyframe.fraction at time with easing
- },
- label = propertyName
- ) { atEnd ->
- if (atEnd) {
- animatorKeyframes.last().fraction
- } else {
- animatorKeyframes.first().fraction
- }
- }
- config.pathDataStatePair = state to this
- } else {
- throw IllegalStateException("Unknown propertyName: $propertyName")
- }
- }
-
- fun interpolate(fraction: Float): List<PathNode> {
- val index = (animatorKeyframes.indexOfFirst { it.fraction >= fraction } - 1)
- .coerceAtLeast(0)
- val easing = animatorKeyframes[index + 1].interpolator
- val innerFraction = easing.transform(
- (
- (fraction - animatorKeyframes[index].fraction) /
- (animatorKeyframes[index + 1].fraction - animatorKeyframes[index].fraction)
- )
- .coerceIn(0f, 1f)
- )
- return lerp(
- animatorKeyframes[index].value,
- animatorKeyframes[index + 1].value,
- innerFraction
- )
- }
-}
+) : PropertyValuesHolder1D<List<PathNode>>(propertyName)
internal data class Keyframe<T>(
val fraction: Float,
@@ -458,9 +423,7 @@
var scaleYState: State<Float>? = null
var translateXState: State<Float>? = null
var translateYState: State<Float>? = null
-
- // PathData is special because we have to animate its float fraction and interpolate the path.
- var pathDataStatePair: Pair<State<Float>, PropertyValuesHolderPath>? = null
+ var pathDataState: State<List<PathNode>>? = null
var fillColorState: State<Color>? = null
var strokeColorState: State<Color>? = null
var strokeWidthState: State<Float>? = null
@@ -480,10 +443,7 @@
is VectorProperty.ScaleY -> scaleYState?.value ?: defaultValue
is VectorProperty.TranslateX -> translateXState?.value ?: defaultValue
is VectorProperty.TranslateY -> translateYState?.value ?: defaultValue
- is VectorProperty.PathData ->
- pathDataStatePair?.let { (state, holder) ->
- holder.interpolate(state.value)
- } ?: defaultValue
+ is VectorProperty.PathData -> pathDataState?.value ?: defaultValue
is VectorProperty.Fill -> fillColorState?.let { state ->
SolidColor(state.value)
} ?: defaultValue
diff --git a/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/DurableFunctionKeyCodegenTests.kt b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/DurableFunctionKeyCodegenTests.kt
new file mode 100644
index 0000000..43746a5
--- /dev/null
+++ b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/DurableFunctionKeyCodegenTests.kt
@@ -0,0 +1,109 @@
+/*
+ * Copyright 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package androidx.compose.compiler.plugins.kotlin
+
+import org.jetbrains.kotlin.config.CompilerConfiguration
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.robolectric.RobolectricTestRunner
+import org.robolectric.annotation.Config
+
+/* ktlint-disable max-line-length */
+@RunWith(RobolectricTestRunner::class)
+@Config(
+ manifest = Config.NONE,
+ minSdk = 23,
+ maxSdk = 23
+)
+class DurableFunctionKeyCodegenTests : AbstractCodegenSignatureTest() {
+
+ override fun updateConfiguration(configuration: CompilerConfiguration) {
+ super.updateConfiguration(configuration)
+ configuration.put(ComposeConfiguration.GENERATE_FUNCTION_KEY_META_CLASSES_KEY, true)
+ }
+
+ @Test
+ fun testSimpleComposable(): Unit = validateBytecode(
+ """
+ @Composable fun Example() {}
+ """
+ ) { bytecode ->
+ bytecode.assertKeyMetaClass(1)
+ bytecode.assertFunctionKeyMetaClassAnnotationCount(1)
+ bytecode.assertFunctionKeyMetaAnnotationCount(1)
+ }
+
+ @Test
+ fun testMultipleComposables(): Unit = validateBytecode(
+ """
+ @Composable fun Example1() {}
+ @Composable fun Example2() {}
+ """
+ ) { bytecode ->
+ bytecode.assertKeyMetaClass(1)
+ bytecode.assertFunctionKeyMetaClassAnnotationCount(1)
+ bytecode.assertFunctionKeyMetaAnnotationCount(2)
+ }
+
+ @Test
+ fun testComposableLambdas(): Unit = validateBytecode(
+ """
+ @Composable fun Row(content: @Composable () -> Unit) { content() }
+ @Composable fun Example2() {
+ Row {}
+ }
+ """
+ ) { bytecode ->
+ bytecode.assertKeyMetaClass(1)
+ bytecode.assertFunctionKeyMetaClassAnnotationCount(1)
+ bytecode.assertFunctionKeyMetaAnnotationCount(3)
+ }
+
+ private fun String.assertKeyMetaClass(expected: Int) {
+ assertEquals(expected,
+ lines().count {
+ it.contains("final class") && it.endsWith("%KeyMeta {")
+ }
+ )
+ }
+
+ private fun String.assertFunctionKeyMetaClassAnnotationCount(expected: Int) {
+ assertEquals(expected,
+ lines().count {
+ it.contains("@Landroidx/compose/runtime/internal/FunctionKeyMetaClass;")
+ }
+ )
+ }
+
+ private fun String.assertFunctionKeyMetaAnnotationCount(expected: Int) {
+ assertEquals(expected,
+ lines().sumOf {
+ when {
+ it.contains("@Landroidx/compose/runtime/internal/FunctionKeyMeta%Container;") -> {
+ it.occurrences("@Landroidx/compose/runtime/internal/FunctionKeyMeta;")
+ }
+ it.contains("@Landroidx/compose/runtime/internal/FunctionKeyMeta;") -> 1
+ else -> 0
+ }
+ }
+ )
+ }
+
+ private fun String.occurrences(substring: String): Int = split(substring)
+ .dropLastWhile { it.isEmpty() }
+ .count() - 1
+}
\ No newline at end of file
diff --git a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/ComposeIrGenerationExtension.kt b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/ComposeIrGenerationExtension.kt
index 6633510..30a0790 100644
--- a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/ComposeIrGenerationExtension.kt
+++ b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/ComposeIrGenerationExtension.kt
@@ -201,7 +201,9 @@
}
if (generateFunctionKeyMetaClasses) {
- functionKeyTransformer.includeFunctionKeyMetaClasses()
+ functionKeyTransformer.realizeKeyMetaAnnotations(moduleFragment)
+ } else {
+ functionKeyTransformer.removeKeyMetaClasses(moduleFragment)
}
if (metricsDestination != null) {
diff --git a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/VersionChecker.kt b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/VersionChecker.kt
index c6df941..f37c4df 100644
--- a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/VersionChecker.kt
+++ b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/VersionChecker.kt
@@ -65,6 +65,7 @@
4900 to "1.1.0-beta04",
5000 to "1.1.0-rc01",
6000 to "1.2.0-alpha01",
+ 6100 to "1.2.0-alpha02",
)
/**
@@ -77,7 +78,7 @@
* The maven version string of this compiler. This string should be updated before/after every
* release.
*/
- const val compilerVersion: String = "1.2.0-alpha01"
+ const val compilerVersion: String = "1.2.0-alpha02"
private val minimumRuntimeVersion: String
get() = versionTable[minimumRuntimeVersionInt] ?: "unknown"
}
diff --git a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/analysis/ComposeWritableSlices.kt b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/analysis/ComposeWritableSlices.kt
index 49643e1..fa6aa3a 100644
--- a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/analysis/ComposeWritableSlices.kt
+++ b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/analysis/ComposeWritableSlices.kt
@@ -29,4 +29,6 @@
BasicWritableSlice(RewritePolicy.DO_NOTHING)
val DURABLE_FUNCTION_KEY: WritableSlice<IrAttributeContainer, KeyInfo> =
BasicWritableSlice(RewritePolicy.DO_NOTHING)
+ val DURABLE_FUNCTION_KEYS: WritableSlice<IrAttributeContainer, List<KeyInfo>> =
+ BasicWritableSlice(RewritePolicy.DO_NOTHING)
}
diff --git a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/DurableFunctionKeyTransformer.kt b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/DurableFunctionKeyTransformer.kt
index 71cf8f4..19d8174 100644
--- a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/DurableFunctionKeyTransformer.kt
+++ b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/DurableFunctionKeyTransformer.kt
@@ -18,12 +18,12 @@
import androidx.compose.compiler.plugins.kotlin.ModuleMetrics
import androidx.compose.compiler.plugins.kotlin.analysis.ComposeWritableSlices.DURABLE_FUNCTION_KEY
+import androidx.compose.compiler.plugins.kotlin.analysis.ComposeWritableSlices.DURABLE_FUNCTION_KEYS
import androidx.compose.compiler.plugins.kotlin.irTrace
import org.jetbrains.kotlin.backend.common.extensions.IrPluginContext
import org.jetbrains.kotlin.backend.common.ir.addChild
import org.jetbrains.kotlin.backend.common.ir.createParameterDeclarations
import org.jetbrains.kotlin.backend.common.lower.DeclarationIrBuilder
-import org.jetbrains.kotlin.backend.common.push
import org.jetbrains.kotlin.descriptors.ClassKind
import org.jetbrains.kotlin.descriptors.DescriptorVisibilities
import org.jetbrains.kotlin.ir.IrStatement
@@ -34,6 +34,7 @@
import org.jetbrains.kotlin.ir.builders.irDelegatingConstructorCall
import org.jetbrains.kotlin.ir.declarations.IrClass
import org.jetbrains.kotlin.ir.declarations.IrFile
+import org.jetbrains.kotlin.ir.declarations.IrModuleFragment
import org.jetbrains.kotlin.ir.declarations.IrSimpleFunction
import org.jetbrains.kotlin.ir.expressions.IrConstructorCall
import org.jetbrains.kotlin.ir.expressions.impl.IrConstructorCallImpl
@@ -41,6 +42,8 @@
import org.jetbrains.kotlin.ir.util.DeepCopySymbolRemapper
import org.jetbrains.kotlin.ir.util.constructors
import org.jetbrains.kotlin.ir.util.primaryConstructor
+import org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid
+import org.jetbrains.kotlin.ir.visitors.transformChildrenVoid
import org.jetbrains.kotlin.load.kotlin.PackagePartClassUtils
import org.jetbrains.kotlin.name.Name
import org.jetbrains.kotlin.resolve.BindingTrace
@@ -66,14 +69,14 @@
* This transform runs early on in the lowering pipeline, and stores the keys for every function in
* the file in the BindingTrace for each function. These keys are then retrieved later on by other
* lowerings and marked as used. After all lowerings have completed, one can use the
- * [includeFunctionKeyMetaClasses] method to generate additional empty classes that include annotations
+ * [realizeKeyMetaAnnotations] method to generate additional empty classes that include annotations
* with the keys of each function and their source locations for tooling to utilize.
*
* For example, this transform will run on code like the following:
*
* @Composable fun Example() {
* Box {
- * Text("Hello WOrld")
+ * Text("Hello World")
* }
* }
*
@@ -108,35 +111,43 @@
bindingTrace,
metrics
) {
- inner class Meta(
- val file: IrFile,
- val metaClass: IrClass,
- ) {
- val keys = mutableListOf<KeyInfo>()
- fun includeFunctionKeyMetaClass() {
- val usedKeys = keys.filter { it.used }
- if (usedKeys.isEmpty()) {
- // If none of the keys were used, don't generate a class
- return
+ fun removeKeyMetaClasses(moduleFragment: IrModuleFragment) {
+ moduleFragment.transformChildrenVoid(object : IrElementTransformerVoid() {
+ override fun visitFile(declaration: IrFile): IrFile {
+ val children = declaration.declarations.toList().filterIsInstance<IrClass>()
+ for (child in children) {
+ val keys = context.irTrace[DURABLE_FUNCTION_KEYS, child]
+ if (keys != null) {
+ declaration.declarations.remove(child)
+ }
+ }
+ return declaration
}
- metaClass.annotations += usedKeys.map { irKeyMetaAnnotation(it) }
- file.addChild(metaClass)
- }
+ })
}
- val metas = mutableListOf<Meta>()
-
- var current: Meta? = null
-
- fun includeFunctionKeyMetaClasses() {
- if (keyMetaAnnotation == null || metaClassAnnotation == null) {
- // if the generate key meta flag was passed in to the compiler but the annotations
- // aren't in the runtime, we are just going to silently ignore it.
- return
- }
- metas.forEach { it.includeFunctionKeyMetaClass() }
+ fun realizeKeyMetaAnnotations(moduleFragment: IrModuleFragment) {
+ moduleFragment.transformChildrenVoid(object : IrElementTransformerVoid() {
+ override fun visitFile(declaration: IrFile): IrFile {
+ val children = declaration.declarations.toList().filterIsInstance<IrClass>()
+ for (child in children) {
+ val keys = context.irTrace[DURABLE_FUNCTION_KEYS, child]
+ if (keys != null) {
+ val usedKeys = keys.filter { it.used }
+ if (usedKeys.isNotEmpty()) {
+ child.annotations += usedKeys.map { irKeyMetaAnnotation(it) }
+ } else {
+ declaration.declarations.remove(child)
+ }
+ }
+ }
+ return declaration
+ }
+ })
}
+ var currentKeys = mutableListOf<KeyInfo>()
+
private val keyMetaAnnotation =
getInternalClassOrNull("FunctionKeyMeta")
private val metaClassAnnotation =
@@ -151,11 +162,11 @@
keyMetaAnnotation.constructors.single(),
0,
0,
- 2
+ 3
).apply {
putValueArgument(0, irConst(key.key.hashCode()))
putValueArgument(1, irConst(key.startOffset))
- putValueArgument(1, irConst(key.endOffset))
+ putValueArgument(2, irConst(key.endOffset))
}
private fun irMetaClassAnnotation(
@@ -209,17 +220,16 @@
override fun visitFile(declaration: IrFile): IrFile {
val stringKeys = mutableSetOf<String>()
return root(stringKeys) {
- val prev = current
- val next = Meta(
- declaration,
- buildClass(declaration.fileEntry.name)
- )
- metas.push(next)
+ val metaClass = buildClass(declaration.fileEntry.name)
+ val prev = currentKeys
+ val next = mutableListOf<KeyInfo>()
try {
- current = next
+ currentKeys = next
super.visitFile(declaration)
} finally {
- current = prev
+ context.irTrace.record(DURABLE_FUNCTION_KEYS, metaClass, next)
+ declaration.addChild(metaClass)
+ currentKeys = prev
}
}
}
@@ -231,9 +241,9 @@
fullName,
declaration.startOffset,
declaration.endOffset,
- success,
+ !success,
)
- current?.keys?.add(info)
+ currentKeys.add(info)
context.irTrace.record(DURABLE_FUNCTION_KEY, declaration, info)
return super.visitSimpleFunction(declaration)
}
diff --git a/compose/integration-tests/docs-snippets/src/main/java/androidx/compose/integration/docs/interoperability/Interoperability.kt b/compose/integration-tests/docs-snippets/src/main/java/androidx/compose/integration/docs/interoperability/Interoperability.kt
index ac91305..b512bf1 100644
--- a/compose/integration-tests/docs-snippets/src/main/java/androidx/compose/integration/docs/interoperability/Interoperability.kt
+++ b/compose/integration-tests/docs-snippets/src/main/java/androidx/compose/integration/docs/interoperability/Interoperability.kt
@@ -261,7 +261,7 @@
val intentFilter = IntentFilter(systemAction)
val broadcast = object : BroadcastReceiver() {
override fun onReceive(context: Context?, intent: Intent?) {
- onSystemEvent(intent)
+ currentOnSystemEvent(intent)
}
}
diff --git a/compose/integration-tests/docs-snippets/src/main/java/androidx/compose/integration/docs/sideeffects/SideEffects.kt b/compose/integration-tests/docs-snippets/src/main/java/androidx/compose/integration/docs/sideeffects/SideEffects.kt
index 5c703e0..7429a97 100644
--- a/compose/integration-tests/docs-snippets/src/main/java/androidx/compose/integration/docs/sideeffects/SideEffects.kt
+++ b/compose/integration-tests/docs-snippets/src/main/java/androidx/compose/integration/docs/sideeffects/SideEffects.kt
@@ -238,7 +238,7 @@
// Calculate high priority tasks only when the todoTasks or highPriorityKeywords
// change, not on every recomposition
- val highPriorityTasks by remember {
+ val highPriorityTasks by remember(highPriorityKeywords) {
derivedStateOf { todoTasks.filter { it.containsWord(highPriorityKeywords) } }
}
diff --git a/compose/material3/material3/src/androidAndroidTest/kotlin/androidx/compose/material3/ButtonScreenshotTest.kt b/compose/material3/material3/src/androidAndroidTest/kotlin/androidx/compose/material3/ButtonScreenshotTest.kt
new file mode 100644
index 0000000..faf3749
--- /dev/null
+++ b/compose/material3/material3/src/androidAndroidTest/kotlin/androidx/compose/material3/ButtonScreenshotTest.kt
@@ -0,0 +1,212 @@
+/*
+ * Copyright 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package androidx.compose.material3
+
+import android.os.Build
+import androidx.compose.foundation.layout.Box
+import androidx.compose.foundation.layout.requiredSize
+import androidx.compose.foundation.layout.wrapContentSize
+import androidx.compose.testutils.assertAgainstGolden
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.platform.testTag
+import androidx.compose.ui.test.ExperimentalTestApi
+import androidx.compose.ui.test.captureToImage
+import androidx.compose.ui.test.hasClickAction
+import androidx.compose.ui.test.junit4.createComposeRule
+import androidx.compose.ui.test.onNodeWithTag
+import androidx.compose.ui.test.onNodeWithText
+import androidx.compose.ui.unit.dp
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.filters.MediumTest
+import androidx.test.filters.SdkSuppress
+import androidx.test.screenshot.AndroidXScreenshotTestRule
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+
+@MediumTest
+@RunWith(AndroidJUnit4::class)
+@SdkSuppress(minSdkVersion = Build.VERSION_CODES.O)
+@OptIn(ExperimentalTestApi::class)
+class ButtonScreenshotTest {
+
+ @get:Rule
+ val rule = createComposeRule()
+
+ @get:Rule
+ val screenshotRule = AndroidXScreenshotTestRule(GOLDEN_MATERIAL3)
+
+ @Test
+ fun default_button_light_theme() {
+ rule.setMaterialContent(lightColorScheme()) {
+ Button(onClick = { }) {
+ Text("Button")
+ }
+ }
+
+ rule.onNode(hasClickAction())
+ .captureToImage()
+ .assertAgainstGolden(screenshotRule, "button_light_theme")
+ }
+
+ @Test
+ fun default_button_dark_theme() {
+ rule.setMaterialContent(darkColorScheme()) {
+ Button(onClick = { }) {
+ Text("Button")
+ }
+ }
+
+ rule.onNode(hasClickAction())
+ .captureToImage()
+ .assertAgainstGolden(screenshotRule, "button_dark_theme")
+ }
+
+ @Test
+ fun disabled_button_light_theme() {
+ rule.setMaterialContent(lightColorScheme()) {
+ Button(onClick = { }, enabled = false) {
+ Text("Button")
+ }
+ }
+
+ rule.onNodeWithText("Button")
+ .captureToImage()
+ .assertAgainstGolden(screenshotRule, "button_disabled_light_theme")
+ }
+
+ @Test
+ fun disabled_button_dark_theme() {
+ rule.setMaterialContent(darkColorScheme()) {
+ Button(onClick = { }, enabled = false) {
+ Text("Button")
+ }
+ }
+
+ rule.onNodeWithText("Button")
+ .captureToImage()
+ .assertAgainstGolden(screenshotRule, "button_disabled_dark_theme")
+ }
+
+ @Test
+ fun elevated_button_lightTheme() {
+ rule.setMaterialContent(lightColorScheme()) {
+ Box(
+ Modifier.requiredSize(200.dp, 100.dp).wrapContentSize().testTag("elevated button")
+ ) {
+ ElevatedButton(onClick = {}) { Text("Elevated Button") }
+ }
+ }
+
+ rule.onNodeWithTag("elevated button")
+ .captureToImage()
+ .assertAgainstGolden(screenshotRule, "elevated_button_light_theme")
+ }
+
+ @Test
+ fun disabled_elevated_button_lightTheme() {
+ rule.setMaterialContent(lightColorScheme()) {
+ Box(
+ Modifier.requiredSize(200.dp, 100.dp).wrapContentSize().testTag("elevated button")
+ ) {
+ ElevatedButton(onClick = {}, enabled = false) { Text("Elevated Button") }
+ }
+ }
+
+ rule
+ .onNodeWithTag("elevated button")
+ .captureToImage()
+ .assertAgainstGolden(screenshotRule, "elevated_button_disabled_light_theme")
+ }
+
+ @Test
+ fun filled_tonal_button_lightTheme() {
+ rule.setMaterialContent(lightColorScheme()) {
+ FilledTonalButton(onClick = {}) { Text("Filled tonal Button") }
+ }
+
+ rule.onNode(hasClickAction())
+ .captureToImage()
+ .assertAgainstGolden(screenshotRule, "filled_tonal_button_light_theme")
+ }
+
+ @Test
+ fun disabled_filled_tonal_button_lightTheme() {
+ rule.setMaterialContent(lightColorScheme()) {
+ FilledTonalButton(
+ onClick = {},
+ enabled = false,
+ modifier = Modifier.testTag("button")
+ ) {
+ Text("Filled tonal Button")
+ }
+ }
+
+ rule.onNodeWithTag("button")
+ .captureToImage()
+ .assertAgainstGolden(screenshotRule, "filled_tonal_button_disabled_light_theme")
+ }
+
+ @Test
+ fun outlined_button_lightTheme() {
+ rule.setMaterialContent(lightColorScheme()) {
+ OutlinedButton(onClick = {}) { Text("Outlined Button") }
+ }
+
+ rule.onNode(hasClickAction())
+ .captureToImage()
+ .assertAgainstGolden(screenshotRule, "outlined_button_light_theme")
+ }
+
+ @Test
+ fun disabled_outlined_button_lightTheme() {
+ rule.setMaterialContent(lightColorScheme()) {
+ OutlinedButton(onClick = {}, enabled = false, modifier = Modifier.testTag("button")) {
+ Text("Outlined Button")
+ }
+ }
+
+ rule.onNodeWithTag("button")
+ .captureToImage()
+ .assertAgainstGolden(screenshotRule, "outlined_button_disabled_light_theme")
+ }
+
+ @Test
+ fun text_button_lightTheme() {
+ rule.setMaterialContent(lightColorScheme()) {
+ TextButton(onClick = {}) {
+ Text("Text Button")
+ }
+ }
+
+ rule.onNode(hasClickAction())
+ .captureToImage()
+ .assertAgainstGolden(screenshotRule, "text_button_light_theme")
+ }
+
+ @Test
+ fun disabled_text_button_lightTheme() {
+ rule.setMaterialContent(lightColorScheme()) {
+ TextButton(onClick = {}, enabled = false, modifier = Modifier.testTag("button")) {
+ Text("Text Button")
+ }
+ }
+
+ rule.onNodeWithTag("button")
+ .captureToImage()
+ .assertAgainstGolden(screenshotRule, "text_button_disabled_light_theme")
+ }
+}
diff --git a/compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/Button.kt b/compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/Button.kt
index 7651c82..f3e26a5 100644
--- a/compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/Button.kt
+++ b/compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/Button.kt
@@ -624,10 +624,7 @@
fun textButtonColors(
containerColor: Color = Color.Transparent,
contentColor: Color = MaterialTheme.colorScheme.fromToken(TextButton.LabelTextColor),
- disabledContainerColor: Color =
- MaterialTheme.colorScheme
- .fromToken(TextButton.DisabledContainerColor)
- .copy(alpha = TextButton.DisabledContainerOpacity),
+ disabledContainerColor: Color = Color.Transparent,
disabledContentColor: Color =
MaterialTheme.colorScheme
.fromToken(TextButton.DisabledLabelTextColor)
diff --git a/compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/tokens/TextButton.kt b/compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/tokens/TextButton.kt
index 1281bc74..364e1e1 100644
--- a/compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/tokens/TextButton.kt
+++ b/compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/tokens/TextButton.kt
@@ -24,8 +24,6 @@
val ContainerElevation = Elevation.Level0
val ContainerHeight = 40.0.dp
val ContainerShape = RoundedCornerShape(20.0.dp)
- val DisabledContainerColor = ColorSchemeKey.OnSurface
- const val DisabledContainerOpacity = 0.12f
val DisabledLabelTextColor = ColorSchemeKey.OnSurface
const val DisabledLabelTextOpacity = 0.38f
val FocusLabelTextColor = ColorSchemeKey.Primary
diff --git a/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/ComposeVersion.kt b/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/ComposeVersion.kt
index 06a66f3..fc679b9 100644
--- a/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/ComposeVersion.kt
+++ b/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/ComposeVersion.kt
@@ -28,5 +28,5 @@
* IMPORTANT: Whenever updating this value, please make sure to also update `versionTable` and
* `minimumRuntimeVersionInt` in `VersionChecker.kt` of the compiler.
*/
- const val version: Int = 6000
+ const val version: Int = 6100
}
diff --git a/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/collection/MutableVector.kt b/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/collection/MutableVector.kt
index 5d1514f..ac747dc 100644
--- a/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/collection/MutableVector.kt
+++ b/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/collection/MutableVector.kt
@@ -935,7 +935,10 @@
override fun containsAll(elements: Collection<T>): Boolean = vector.containsAll(elements)
- override fun get(index: Int): T = vector[index]
+ override fun get(index: Int): T {
+ checkIndex(index)
+ return vector[index]
+ }
override fun indexOf(element: T): Int = vector.indexOf(element)
@@ -965,14 +968,22 @@
override fun removeAll(elements: Collection<T>): Boolean = vector.removeAll(elements)
- override fun removeAt(index: Int): T = vector.removeAt(index)
+ override fun removeAt(index: Int): T {
+ checkIndex(index)
+ return vector.removeAt(index)
+ }
override fun retainAll(elements: Collection<T>): Boolean = vector.retainAll(elements)
- override fun set(index: Int, element: T): T = vector.set(index, element)
+ override fun set(index: Int, element: T): T {
+ checkIndex(index)
+ return vector.set(index, element)
+ }
- override fun subList(fromIndex: Int, toIndex: Int): MutableList<T> =
- SubList(this, fromIndex, toIndex)
+ override fun subList(fromIndex: Int, toIndex: Int): MutableList<T> {
+ checkSubIndex(fromIndex, toIndex)
+ return SubList(this, fromIndex, toIndex)
+ }
}
/**
@@ -1006,7 +1017,10 @@
return true
}
- override fun get(index: Int): T = list[index + start]
+ override fun get(index: Int): T {
+ checkIndex(index)
+ return list[index + start]
+ }
override fun indexOf(element: T): Int {
for (i in start until end) {
@@ -1084,6 +1098,7 @@
}
override fun removeAt(index: Int): T {
+ checkIndex(index)
val item = list.removeAt(index + start)
end--
return item
@@ -1101,10 +1116,39 @@
return originalEnd != end
}
- override fun set(index: Int, element: T): T = list.set(index + start, element)
+ override fun set(index: Int, element: T): T {
+ checkIndex(index)
+ return list.set(index + start, element)
+ }
- override fun subList(fromIndex: Int, toIndex: Int): MutableList<T> =
- SubList(this, fromIndex, toIndex)
+ override fun subList(fromIndex: Int, toIndex: Int): MutableList<T> {
+ checkSubIndex(fromIndex, toIndex)
+ return SubList(this, fromIndex, toIndex)
+ }
+ }
+}
+
+private fun List<*>.checkIndex(index: Int) {
+ val size = size
+ if (index < 0 || index >= size) {
+ throw IndexOutOfBoundsException("Index $index is out of bounds. " +
+ "The list has $size elements.")
+ }
+}
+
+private fun List<*>.checkSubIndex(fromIndex: Int, toIndex: Int) {
+ val size = size
+ if (fromIndex > toIndex) {
+ throw IllegalArgumentException("Indices are out of order. fromIndex ($fromIndex) is " +
+ "greater than toIndex ($toIndex).")
+ }
+ if (fromIndex < 0) {
+ throw IndexOutOfBoundsException("fromIndex ($fromIndex) is less than 0.")
+ }
+ if (toIndex > size) {
+ throw IndexOutOfBoundsException(
+ "toIndex ($toIndex) is more than than the list size ($size)"
+ )
}
}
diff --git a/compose/runtime/runtime/src/test/kotlin/androidx/compose/runtime/collection/MutableVectorTest.kt b/compose/runtime/runtime/src/test/kotlin/androidx/compose/runtime/collection/MutableVectorTest.kt
index 8c6fd86..d9b6c77 100644
--- a/compose/runtime/runtime/src/test/kotlin/androidx/compose/runtime/collection/MutableVectorTest.kt
+++ b/compose/runtime/runtime/src/test/kotlin/androidx/compose/runtime/collection/MutableVectorTest.kt
@@ -809,4 +809,112 @@
l.sortWith(Comparator { p0, p1 -> p0 - p1 })
assertTrue(l.contentEquals(list))
}
+
+ @Test(IndexOutOfBoundsException::class)
+ fun list_outOfBounds_Get_Below() {
+ val l = mutableVectorOf(1, 2, 3, 4).asMutableList()
+ l[-1]
+ }
+
+ @Test(IndexOutOfBoundsException::class)
+ fun sublist_outOfBounds_Get_Below() {
+ val l = mutableVectorOf(1, 2, 3, 4).asMutableList().subList(1, 2)
+ l[-1]
+ }
+
+ @Test(IndexOutOfBoundsException::class)
+ fun list_outOfBounds_Get_Above() {
+ val l = mutableVectorOf(1, 2, 3, 4).asMutableList()
+ l[4]
+ }
+
+ @Test(IndexOutOfBoundsException::class)
+ fun sublist_outOfBounds_Get_Above() {
+ val l = mutableVectorOf(1, 2, 3, 4).asMutableList().subList(1, 2)
+ l[1]
+ }
+
+ @Test(IndexOutOfBoundsException::class)
+ fun list_outOfBounds_RemoveAt_Below() {
+ val l = mutableVectorOf(0, 1, 2, 3).asMutableList()
+ l.removeAt(-1)
+ }
+
+ @Test(IndexOutOfBoundsException::class)
+ fun sublist_outOfBounds_RemoveAt_Below() {
+ val l = mutableVectorOf(0, 1, 2, 3).asMutableList().subList(1, 2)
+ l.removeAt(-1)
+ }
+
+ @Test(IndexOutOfBoundsException::class)
+ fun list_outOfBounds_RemoveAt_Above() {
+ val l = mutableVectorOf(0, 1, 2, 3).asMutableList()
+ l.removeAt(4)
+ }
+
+ @Test(IndexOutOfBoundsException::class)
+ fun sublist_outOfBounds_RemoveAt_Above() {
+ val l = mutableVectorOf(0, 1, 2, 3).asMutableList().subList(1, 2)
+ l.removeAt(1)
+ }
+
+ @Test(IndexOutOfBoundsException::class)
+ fun list_outOfBounds_Set_Below() {
+ val l = mutableVectorOf(0, 1, 2, 3).asMutableList()
+ l[-1] = 1
+ }
+
+ @Test(IndexOutOfBoundsException::class)
+ fun sublist_outOfBounds_Set_Below() {
+ val l = mutableVectorOf(0, 1, 2, 3).asMutableList().subList(1, 2)
+ l[-1] = 1
+ }
+
+ @Test(IndexOutOfBoundsException::class)
+ fun list_outOfBounds_Set_Above() {
+ val l = mutableVectorOf(0, 1, 2, 3).asMutableList()
+ l[4] = 1
+ }
+
+ @Test(IndexOutOfBoundsException::class)
+ fun sublist_outOfBounds_Set_Above() {
+ val l = mutableVectorOf(0, 1, 2, 3).asMutableList().subList(1, 2)
+ l[1] = 1
+ }
+
+ @Test(IndexOutOfBoundsException::class)
+ fun list_outOfBounds_SubList_Below() {
+ val l = mutableVectorOf(0, 1, 2, 3).asMutableList()
+ l.subList(-1, 1)
+ }
+
+ @Test(IndexOutOfBoundsException::class)
+ fun sublist_outOfBounds_SubList_Below() {
+ val l = mutableVectorOf(0, 1, 2, 3).asMutableList().subList(1, 2)
+ l.subList(-1, 1)
+ }
+
+ @Test(IndexOutOfBoundsException::class)
+ fun list_outOfBounds_SubList_Above() {
+ val l = mutableVectorOf(0, 1, 2, 3).asMutableList()
+ l.subList(5, 5)
+ }
+
+ @Test(IndexOutOfBoundsException::class)
+ fun sublist_outOfBounds_SubList_Above() {
+ val l = mutableVectorOf(0, 1, 2, 3).asMutableList().subList(1, 2)
+ l.subList(1, 2)
+ }
+
+ @Test(IllegalArgumentException::class)
+ fun list_outOfBounds_SubList_Order() {
+ val l = mutableVectorOf(0, 1, 2, 3).asMutableList()
+ l.subList(3, 2)
+ }
+
+ @Test(IllegalArgumentException::class)
+ fun sublist_outOfBounds_SubList_Order() {
+ val l = mutableVectorOf(0, 1, 2, 3).asMutableList().subList(1, 2)
+ l.subList(1, 0)
+ }
}
\ No newline at end of file
diff --git a/compose/ui/ui-graphics/src/androidMain/kotlin/androidx/compose/ui/graphics/AndroidImageBitmap.android.kt b/compose/ui/ui-graphics/src/androidMain/kotlin/androidx/compose/ui/graphics/AndroidImageBitmap.android.kt
index be26120..3faf08c 100644
--- a/compose/ui/ui-graphics/src/androidMain/kotlin/androidx/compose/ui/graphics/AndroidImageBitmap.android.kt
+++ b/compose/ui/ui-graphics/src/androidMain/kotlin/androidx/compose/ui/graphics/AndroidImageBitmap.android.kt
@@ -19,6 +19,7 @@
import android.graphics.Bitmap
import android.os.Build
import android.util.DisplayMetrics
+import androidx.annotation.DoNotInline
import androidx.annotation.RequiresApi
import androidx.compose.ui.graphics.colorspace.ColorSpace
import androidx.compose.ui.graphics.colorspace.ColorSpaces
@@ -182,94 +183,98 @@
* Separate class to contain all API calls that require API level 26 to assist in dead code
* elimination during compilation time
*/
-private class Api26Bitmap {
+@RequiresApi(Build.VERSION_CODES.O)
+private object Api26Bitmap {
+ @DoNotInline
+ @JvmStatic
+ internal fun createBitmap(
+ width: Int,
+ height: Int,
+ bitmapConfig: ImageBitmapConfig,
+ hasAlpha: Boolean,
+ colorSpace: ColorSpace
+ ): Bitmap {
+ // Note intentionally ignoring density in all cases
+ return Bitmap.createBitmap(
+ null,
+ width,
+ height,
+ bitmapConfig.toBitmapConfig(),
+ hasAlpha,
+ colorSpace.toFrameworkColorSpace()
+ )
+ }
- @RequiresApi(Build.VERSION_CODES.O)
- companion object {
+ @DoNotInline
+ @JvmStatic
+ internal fun Bitmap.composeColorSpace() =
+ colorSpace?.composeColorSpace() ?: ColorSpaces.Srgb
- internal fun createBitmap(
- width: Int,
- height: Int,
- bitmapConfig: ImageBitmapConfig,
- hasAlpha: Boolean,
- colorSpace: ColorSpace
- ): Bitmap {
- // Note intentionally ignoring density in all cases
- return Bitmap.createBitmap(
- null,
- width,
- height,
- bitmapConfig.toBitmapConfig(),
- hasAlpha,
- colorSpace.toFrameworkColorSpace()
- )
+ @DoNotInline
+ @JvmStatic
+ internal fun ColorSpace.toFrameworkColorSpace(): android.graphics.ColorSpace {
+ val frameworkNamedSpace = when (this) {
+ ColorSpaces.Srgb -> android.graphics.ColorSpace.Named.SRGB
+ ColorSpaces.Aces -> android.graphics.ColorSpace.Named.ACES
+ ColorSpaces.Acescg -> android.graphics.ColorSpace.Named.ACESCG
+ ColorSpaces.AdobeRgb -> android.graphics.ColorSpace.Named.ADOBE_RGB
+ ColorSpaces.Bt2020 -> android.graphics.ColorSpace.Named.BT2020
+ ColorSpaces.Bt709 -> android.graphics.ColorSpace.Named.BT709
+ ColorSpaces.CieLab -> android.graphics.ColorSpace.Named.CIE_LAB
+ ColorSpaces.CieXyz -> android.graphics.ColorSpace.Named.CIE_XYZ
+ ColorSpaces.DciP3 -> android.graphics.ColorSpace.Named.DCI_P3
+ ColorSpaces.DisplayP3 -> android.graphics.ColorSpace.Named.DISPLAY_P3
+ ColorSpaces.ExtendedSrgb -> android.graphics.ColorSpace.Named.EXTENDED_SRGB
+ ColorSpaces.LinearExtendedSrgb ->
+ android.graphics.ColorSpace.Named.LINEAR_EXTENDED_SRGB
+ ColorSpaces.LinearSrgb -> android.graphics.ColorSpace.Named.LINEAR_SRGB
+ ColorSpaces.Ntsc1953 -> android.graphics.ColorSpace.Named.NTSC_1953
+ ColorSpaces.ProPhotoRgb -> android.graphics.ColorSpace.Named.PRO_PHOTO_RGB
+ ColorSpaces.SmpteC -> android.graphics.ColorSpace.Named.SMPTE_C
+ else -> android.graphics.ColorSpace.Named.SRGB
}
+ return android.graphics.ColorSpace.get(frameworkNamedSpace)
+ }
- internal fun Bitmap.composeColorSpace() =
- colorSpace?.composeColorSpace() ?: ColorSpaces.Srgb
-
- internal fun ColorSpace.toFrameworkColorSpace(): android.graphics.ColorSpace {
- val frameworkNamedSpace = when (this) {
- ColorSpaces.Srgb -> android.graphics.ColorSpace.Named.SRGB
- ColorSpaces.Aces -> android.graphics.ColorSpace.Named.ACES
- ColorSpaces.Acescg -> android.graphics.ColorSpace.Named.ACESCG
- ColorSpaces.AdobeRgb -> android.graphics.ColorSpace.Named.ADOBE_RGB
- ColorSpaces.Bt2020 -> android.graphics.ColorSpace.Named.BT2020
- ColorSpaces.Bt709 -> android.graphics.ColorSpace.Named.BT709
- ColorSpaces.CieLab -> android.graphics.ColorSpace.Named.CIE_LAB
- ColorSpaces.CieXyz -> android.graphics.ColorSpace.Named.CIE_XYZ
- ColorSpaces.DciP3 -> android.graphics.ColorSpace.Named.DCI_P3
- ColorSpaces.DisplayP3 -> android.graphics.ColorSpace.Named.DISPLAY_P3
- ColorSpaces.ExtendedSrgb -> android.graphics.ColorSpace.Named.EXTENDED_SRGB
- ColorSpaces.LinearExtendedSrgb ->
- android.graphics.ColorSpace.Named.LINEAR_EXTENDED_SRGB
- ColorSpaces.LinearSrgb -> android.graphics.ColorSpace.Named.LINEAR_SRGB
- ColorSpaces.Ntsc1953 -> android.graphics.ColorSpace.Named.NTSC_1953
- ColorSpaces.ProPhotoRgb -> android.graphics.ColorSpace.Named.PRO_PHOTO_RGB
- ColorSpaces.SmpteC -> android.graphics.ColorSpace.Named.SMPTE_C
- else -> android.graphics.ColorSpace.Named.SRGB
- }
- return android.graphics.ColorSpace.get(frameworkNamedSpace)
- }
-
- internal fun android.graphics.ColorSpace.composeColorSpace(): ColorSpace {
- return when (this) {
- android.graphics.ColorSpace.get(android.graphics.ColorSpace.Named.SRGB) ->
- ColorSpaces.Srgb
- android.graphics.ColorSpace.get(android.graphics.ColorSpace.Named.ACES) ->
- ColorSpaces.Aces
- android.graphics.ColorSpace.get(android.graphics.ColorSpace.Named.ACESCG) ->
- ColorSpaces.Acescg
- android.graphics.ColorSpace.get(android.graphics.ColorSpace.Named.ADOBE_RGB) ->
- ColorSpaces.AdobeRgb
- android.graphics.ColorSpace.get(android.graphics.ColorSpace.Named.BT2020) ->
- ColorSpaces.Bt2020
- android.graphics.ColorSpace.get(android.graphics.ColorSpace.Named.BT709) ->
- ColorSpaces.Bt709
- android.graphics.ColorSpace.get(android.graphics.ColorSpace.Named.CIE_LAB) ->
- ColorSpaces.CieLab
- android.graphics.ColorSpace.get(android.graphics.ColorSpace.Named.CIE_XYZ) ->
- ColorSpaces.CieXyz
- android.graphics.ColorSpace.get(android.graphics.ColorSpace.Named.DCI_P3) ->
- ColorSpaces.DciP3
- android.graphics.ColorSpace.get(android.graphics.ColorSpace.Named.DISPLAY_P3) ->
- ColorSpaces.DisplayP3
- android.graphics.ColorSpace.get(android.graphics.ColorSpace.Named.EXTENDED_SRGB) ->
- ColorSpaces.ExtendedSrgb
- android.graphics.ColorSpace.get(
- android.graphics.ColorSpace.Named.LINEAR_EXTENDED_SRGB
- ) ->
- ColorSpaces.LinearExtendedSrgb
- android.graphics.ColorSpace.get(android.graphics.ColorSpace.Named.LINEAR_SRGB) ->
- ColorSpaces.LinearSrgb
- android.graphics.ColorSpace.get(android.graphics.ColorSpace.Named.NTSC_1953) ->
- ColorSpaces.Ntsc1953
- android.graphics.ColorSpace.get(android.graphics.ColorSpace.Named.PRO_PHOTO_RGB) ->
- ColorSpaces.ProPhotoRgb
- android.graphics.ColorSpace.get(android.graphics.ColorSpace.Named.SMPTE_C) ->
- ColorSpaces.SmpteC
- else -> ColorSpaces.Srgb
- }
+ @DoNotInline
+ @JvmStatic
+ internal fun android.graphics.ColorSpace.composeColorSpace(): ColorSpace {
+ return when (this) {
+ android.graphics.ColorSpace.get(android.graphics.ColorSpace.Named.SRGB) ->
+ ColorSpaces.Srgb
+ android.graphics.ColorSpace.get(android.graphics.ColorSpace.Named.ACES) ->
+ ColorSpaces.Aces
+ android.graphics.ColorSpace.get(android.graphics.ColorSpace.Named.ACESCG) ->
+ ColorSpaces.Acescg
+ android.graphics.ColorSpace.get(android.graphics.ColorSpace.Named.ADOBE_RGB) ->
+ ColorSpaces.AdobeRgb
+ android.graphics.ColorSpace.get(android.graphics.ColorSpace.Named.BT2020) ->
+ ColorSpaces.Bt2020
+ android.graphics.ColorSpace.get(android.graphics.ColorSpace.Named.BT709) ->
+ ColorSpaces.Bt709
+ android.graphics.ColorSpace.get(android.graphics.ColorSpace.Named.CIE_LAB) ->
+ ColorSpaces.CieLab
+ android.graphics.ColorSpace.get(android.graphics.ColorSpace.Named.CIE_XYZ) ->
+ ColorSpaces.CieXyz
+ android.graphics.ColorSpace.get(android.graphics.ColorSpace.Named.DCI_P3) ->
+ ColorSpaces.DciP3
+ android.graphics.ColorSpace.get(android.graphics.ColorSpace.Named.DISPLAY_P3) ->
+ ColorSpaces.DisplayP3
+ android.graphics.ColorSpace.get(android.graphics.ColorSpace.Named.EXTENDED_SRGB) ->
+ ColorSpaces.ExtendedSrgb
+ android.graphics.ColorSpace.get(
+ android.graphics.ColorSpace.Named.LINEAR_EXTENDED_SRGB
+ ) ->
+ ColorSpaces.LinearExtendedSrgb
+ android.graphics.ColorSpace.get(android.graphics.ColorSpace.Named.LINEAR_SRGB) ->
+ ColorSpaces.LinearSrgb
+ android.graphics.ColorSpace.get(android.graphics.ColorSpace.Named.NTSC_1953) ->
+ ColorSpaces.Ntsc1953
+ android.graphics.ColorSpace.get(android.graphics.ColorSpace.Named.PRO_PHOTO_RGB) ->
+ ColorSpaces.ProPhotoRgb
+ android.graphics.ColorSpace.get(android.graphics.ColorSpace.Named.SMPTE_C) ->
+ ColorSpaces.SmpteC
+ else -> ColorSpaces.Srgb
}
}
}
\ No newline at end of file
diff --git a/compose/ui/ui-text/api/current.txt b/compose/ui/ui-text/api/current.txt
index ee52a20..e60bd71 100644
--- a/compose/ui/ui-text/api/current.txt
+++ b/compose/ui/ui-text/api/current.txt
@@ -536,8 +536,8 @@
}
@androidx.compose.runtime.Immutable public abstract sealed class FontFamily {
- method public final boolean getCanLoadSynchronously();
- property public final boolean canLoadSynchronously;
+ method @Deprecated public final boolean getCanLoadSynchronously();
+ property @Deprecated public final boolean canLoadSynchronously;
field public static final androidx.compose.ui.text.font.FontFamily.Companion Companion;
}
diff --git a/compose/ui/ui-text/api/public_plus_experimental_current.txt b/compose/ui/ui-text/api/public_plus_experimental_current.txt
index de9483b..f11d69e2 100644
--- a/compose/ui/ui-text/api/public_plus_experimental_current.txt
+++ b/compose/ui/ui-text/api/public_plus_experimental_current.txt
@@ -551,8 +551,8 @@
}
@androidx.compose.runtime.Immutable public abstract sealed class FontFamily {
- method public final boolean getCanLoadSynchronously();
- property public final boolean canLoadSynchronously;
+ method @Deprecated public final boolean getCanLoadSynchronously();
+ property @Deprecated public final boolean canLoadSynchronously;
field public static final androidx.compose.ui.text.font.FontFamily.Companion Companion;
}
diff --git a/compose/ui/ui-text/api/restricted_current.txt b/compose/ui/ui-text/api/restricted_current.txt
index ee52a20..e60bd71 100644
--- a/compose/ui/ui-text/api/restricted_current.txt
+++ b/compose/ui/ui-text/api/restricted_current.txt
@@ -536,8 +536,8 @@
}
@androidx.compose.runtime.Immutable public abstract sealed class FontFamily {
- method public final boolean getCanLoadSynchronously();
- property public final boolean canLoadSynchronously;
+ method @Deprecated public final boolean getCanLoadSynchronously();
+ property @Deprecated public final boolean canLoadSynchronously;
field public static final androidx.compose.ui.text.font.FontFamily.Companion Companion;
}
diff --git a/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/FontFamily.kt b/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/FontFamily.kt
index af9dc7d..c9fbf74 100644
--- a/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/FontFamily.kt
+++ b/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/font/FontFamily.kt
@@ -27,8 +27,7 @@
* @see GenericFontFamily
*/
@Immutable
-// TODO Unused parameter canLoadSynchronously
-sealed class FontFamily(val canLoadSynchronously: Boolean) {
+sealed class FontFamily(canLoadSynchronously: Boolean) {
companion object {
/**
* The platform default font.
@@ -74,6 +73,13 @@
*/
val Cursive = GenericFontFamily("cursive")
}
+
+ @Suppress("CanBePrimaryConstructorProperty") // for deprecation
+ @get:Deprecated(
+ message = "Unused property that has no meaning. Do not use.",
+ level = DeprecationLevel.ERROR
+ )
+ val canLoadSynchronously = canLoadSynchronously
}
/**
diff --git a/compose/ui/ui/api/public_plus_experimental_current.txt b/compose/ui/ui/api/public_plus_experimental_current.txt
index eced941..5faa873 100644
--- a/compose/ui/ui/api/public_plus_experimental_current.txt
+++ b/compose/ui/ui/api/public_plus_experimental_current.txt
@@ -2573,6 +2573,7 @@
}
public final class WindowRecomposer_androidKt {
+ method @androidx.compose.ui.ExperimentalComposeUiApi public static androidx.compose.runtime.Recomposer createLifecycleAwareWindowRecomposer(android.view.View, optional kotlin.coroutines.CoroutineContext coroutineContext, optional androidx.lifecycle.Lifecycle? lifecycle);
method public static androidx.compose.runtime.CompositionContext? findViewTreeCompositionContext(android.view.View);
method public static androidx.compose.runtime.CompositionContext? getCompositionContext(android.view.View);
method public static void setCompositionContext(android.view.View, androidx.compose.runtime.CompositionContext? value);
diff --git a/compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/AndroidLayoutDrawTest.kt b/compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/AndroidLayoutDrawTest.kt
index 27ce9ff..57f3add 100644
--- a/compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/AndroidLayoutDrawTest.kt
+++ b/compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/AndroidLayoutDrawTest.kt
@@ -23,6 +23,7 @@
import android.os.Build
import android.os.Handler
import android.os.Looper
+import android.transition.TransitionManager
import android.view.PixelCopy
import android.view.View
import android.view.ViewGroup
@@ -3631,6 +3632,37 @@
assertEquals(1, innerDrawLatch.count)
}
+ /**
+ * Android Transitions should be possible with Compose Views. View layers can
+ * confuse the Android Transition system.
+ */
+ @Test
+ fun worksWithTransitions() {
+ val frameLayout = FrameLayout(activity)
+ activityTestRule.runOnUiThread {
+ activity.setContentView(frameLayout)
+ val composeView = ComposeView(activity).apply {
+ setContent {
+ Box {}
+ }
+ }
+ frameLayout.addView(composeView)
+ }
+
+ activityTestRule.runOnUiThread {
+ TransitionManager.beginDelayedTransition(frameLayout)
+ frameLayout.removeAllViews()
+ val composeView = ComposeView(activity).apply {
+ setContent {
+ Box(Modifier.drawLatchModifier()) {}
+ }
+ }
+ frameLayout.addView(composeView)
+ }
+
+ assertTrue(drawLatch.await(1, TimeUnit.SECONDS))
+ }
+
private fun Modifier.layout(onLayout: () -> Unit) = layout { measurable, constraints ->
val placeable = measurable.measure(constraints)
layout(placeable.width, placeable.height) {
diff --git a/compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/input/pointer/MotionEventAdapterTest.kt b/compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/input/pointer/MotionEventAdapterTest.kt
index 7ff259d..50fd691 100644
--- a/compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/input/pointer/MotionEventAdapterTest.kt
+++ b/compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/input/pointer/MotionEventAdapterTest.kt
@@ -17,6 +17,7 @@
package androidx.compose.ui.input.pointer
import android.util.SparseLongArray
+import android.view.InputDevice
import android.view.MotionEvent
import android.view.MotionEvent.ACTION_CANCEL
import android.view.MotionEvent.ACTION_DOWN
@@ -1688,7 +1689,7 @@
0f,
0,
0,
- 0,
+ InputDevice.SOURCE_TOUCHSCREEN,
0
)
@@ -1705,4 +1706,4 @@
assertThat(actual.positionOnScreen.x).isEqualTo(x)
assertThat(actual.positionOnScreen.y).isEqualTo(y)
assertThat(actual.type).isEqualTo(type)
-}
\ No newline at end of file
+}
diff --git a/compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/input/pointer/TestUtils.kt b/compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/input/pointer/TestUtils.kt
index 8d850b1..9ef3644 100644
--- a/compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/input/pointer/TestUtils.kt
+++ b/compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/input/pointer/TestUtils.kt
@@ -203,7 +203,7 @@
0f,
0,
0,
- 0,
+ InputDevice.SOURCE_TOUCHSCREEN,
0
).apply {
offsetLocation(-locationOnScreen[0].toFloat(), -locationOnScreen[1].toFloat())
diff --git a/compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/platform/WindowRecomposerTest.kt b/compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/platform/WindowRecomposerTest.kt
index c182662..2ec7077 100644
--- a/compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/platform/WindowRecomposerTest.kt
+++ b/compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/platform/WindowRecomposerTest.kt
@@ -24,37 +24,47 @@
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.text.BasicText
+import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.Recomposer
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.setValue
import androidx.compose.runtime.snapshotFlow
+import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.InternalComposeUiApi
import androidx.compose.ui.Modifier
import androidx.compose.ui.background
import androidx.compose.ui.graphics.Color
import androidx.core.view.get
+import androidx.lifecycle.Lifecycle
+import androidx.lifecycle.LifecycleOwner
+import androidx.lifecycle.LifecycleRegistry
import androidx.test.core.app.ActivityScenario
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.LargeTest
import androidx.test.filters.MediumTest
+import kotlinx.coroutines.CompletableDeferred
import kotlinx.coroutines.DelicateCoroutinesApi
+import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.launch
import kotlinx.coroutines.runBlocking
+import kotlinx.coroutines.withContext
import kotlinx.coroutines.withTimeoutOrNull
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNotNull
import org.junit.Assert.assertNotSame
import org.junit.Assert.assertNull
+import org.junit.Assert.assertSame
import org.junit.Assert.fail
import org.junit.Test
import org.junit.runner.RunWith
import java.lang.ref.WeakReference
+import kotlin.coroutines.CoroutineContext
@RunWith(AndroidJUnit4::class)
class WindowRecomposerTest {
@@ -142,6 +152,7 @@
}
@Test
+ @MediumTest
fun setContentViewCalledMultipleTimes(): Unit = runBlocking {
var output by mutableStateOf("initial")
val input = MutableStateFlow(0)
@@ -182,4 +193,102 @@
assertOutput("one 2")
}
}
+
+ @ExperimentalComposeUiApi
+ @Test
+ @MediumTest
+ fun lifecycleAwareWindowRecomposerAcceptsContextElements(): Unit = runBlocking {
+ ActivityScenario.launch(ComponentActivity::class.java).use { scenario ->
+ val expectedElement = SampleCoroutineContextElement()
+ val effectContext = CompletableDeferred<CoroutineContext>()
+ scenario.onActivity { activity ->
+ val view = ComposeView(activity)
+ val recomposer = view.createLifecycleAwareWindowRecomposer(
+ expectedElement,
+ activity.lifecycle
+ )
+ view.setParentCompositionContext(recomposer)
+ view.setContent {
+ LaunchedEffect(Unit) {
+ effectContext.complete(coroutineContext)
+ }
+ }
+
+ activity.setContentView(view)
+ }
+ assertSame(expectedElement, effectContext.await()[SampleCoroutineContextElement])
+ }
+ }
+
+ @ExperimentalComposeUiApi
+ @Test
+ @MediumTest
+ fun lifecycleAwareWindowRecomposerJoinsAfterDetach(): Unit = runBlocking {
+ ActivityScenario.launch(ComponentActivity::class.java).use { scenario ->
+ lateinit var recomposer: Recomposer
+ val lifecycleOwner = object : LifecycleOwner {
+ val lifecycle = LifecycleRegistry(this)
+ override fun getLifecycle(): Lifecycle = lifecycle
+ }
+ scenario.onActivity { activity ->
+ val view = View(activity)
+ lifecycleOwner.lifecycle.currentState = Lifecycle.State.RESUMED
+ recomposer = view.createLifecycleAwareWindowRecomposer(
+ lifecycle = lifecycleOwner.lifecycle
+ )
+ activity.setContentView(view)
+ (view.parent as ViewGroup).removeView(view)
+ }
+ assertNotNull(
+ "recomposer did not join",
+ withTimeoutOrNull(3_000) {
+ recomposer.join()
+ }
+ )
+
+ // LifecycleRegistry enforces main thread checks for observerCount
+ withContext(Dispatchers.Main) {
+ assertEquals(
+ "did not unregister LifecycleObserver after detach; lifecycle observer count",
+ 0,
+ lifecycleOwner.lifecycle.observerCount
+ )
+ }
+ }
+ }
+
+ @ExperimentalComposeUiApi
+ @Test
+ @MediumTest
+ fun lifecycleAwareWindowRecomposerJoinsAfterLifecycleDestroy(): Unit = runBlocking {
+ ActivityScenario.launch(ComponentActivity::class.java).use { scenario ->
+ lateinit var recomposer: Recomposer
+ scenario.onActivity { activity ->
+ val view = View(activity)
+ val lifecycleOwner = object : LifecycleOwner {
+ val lifecycle = LifecycleRegistry(this)
+ override fun getLifecycle(): Lifecycle = lifecycle
+ }
+ lifecycleOwner.lifecycle.currentState = Lifecycle.State.RESUMED
+ recomposer = view.createLifecycleAwareWindowRecomposer(
+ lifecycle = lifecycleOwner.lifecycle
+ )
+ activity.setContentView(view)
+ lifecycleOwner.lifecycle.currentState = Lifecycle.State.DESTROYED
+ }
+ assertNotNull(
+ "recomposer did not join",
+ withTimeoutOrNull(3_000) {
+ recomposer.join()
+ }
+ )
+ }
+ }
+}
+
+private class SampleCoroutineContextElement : CoroutineContext.Element {
+ override val key: CoroutineContext.Key<SampleCoroutineContextElement>
+ get() = SampleCoroutineContextElement
+
+ companion object : CoroutineContext.Key<SampleCoroutineContextElement>
}
\ No newline at end of file
diff --git a/compose/ui/ui/src/androidMain/baseline-prof.txt b/compose/ui/ui/src/androidMain/baseline-prof.txt
index f1c9338..3c19848 100644
--- a/compose/ui/ui/src/androidMain/baseline-prof.txt
+++ b/compose/ui/ui/src/androidMain/baseline-prof.txt
@@ -60,9 +60,10 @@
HSPLandroidx/compose/ui/platform/InspectableValueKt;->isDebugInspectorInfoEnabled()Z
HSPLandroidx/compose/ui/platform/InspectorValueInfo;-><init>(Lkotlin/jvm/functions/Function1;)V
HSPLandroidx/compose/ui/platform/RenderNodeLayer;->**(**)**
-HSPLandroidx/compose/ui/platform/RenderNodeApi29;->**(**)**
+HSPLandroidx/compose/ui/platform/RenderNodeApi**;->**(**)**
HSPLandroidx/compose/ui/platform/OutlineResolver;->**(**)**
HSPLandroidx/compose/ui/platform/RenderNodeMatrixCache;->**(**)**
+HSPLandroidx/compose/ui/platform/ViewLayer;->**(**)**
HSPLandroidx/compose/ui/platform/WindowRecomposerPolicy**->**(**)**
HSPLandroidx/compose/ui/platform/WindowRecomposer_androidKt**->**(**)**
HSPLandroidx/compose/ui/platform/WrappedComposition**->**(**)**
diff --git a/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt b/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt
index fbec0bf..ed62345 100644
--- a/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt
+++ b/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.android.kt
@@ -184,10 +184,21 @@
private val accessibilityManager: AccessibilityManager =
view.context.getSystemService(Context.ACCESSIBILITY_SERVICE) as AccessibilityManager
internal var accessibilityForceEnabledForTesting = false
- private val isAccessibilityEnabled
+ /** Indicates if accessibility in the system enabled */
+ private val accessibilityEnabled
+ get() = accessibilityForceEnabledForTesting || accessibilityManager.isEnabled
+
+ /** Indicates if touch exploration in the system enabled.
+ * For example screen readers are the services with touch exploration.
+ *
+ * Will return false if no accessibility services are enabled,
+ * or if no enabled service has a touch exploration mode
+ */
+ private val touchExplorationEnabled
get() = accessibilityForceEnabledForTesting ||
accessibilityManager.isEnabled &&
accessibilityManager.isTouchExplorationEnabled
+
private val handler = Handler(Looper.getMainLooper())
private var nodeProvider: AccessibilityNodeProviderCompat =
AccessibilityNodeProviderCompat(MyNodeProvider())
@@ -930,7 +941,7 @@
* @return Whether this virtual view actually took accessibility focus.
*/
private fun requestAccessibilityFocus(virtualViewId: Int): Boolean {
- if (!isAccessibilityEnabled) {
+ if (!touchExplorationEnabled) {
return false
}
// TODO: Check virtual view visibility.
@@ -981,7 +992,7 @@
contentChangeType: Int? = null,
contentDescription: List<String>? = null
): Boolean {
- if (virtualViewId == InvalidId || !isAccessibilityEnabled) {
+ if (virtualViewId == InvalidId || !accessibilityEnabled) {
return false
}
@@ -1003,7 +1014,7 @@
* @return true if the event was sent successfully.
*/
private fun sendEvent(event: AccessibilityEvent): Boolean {
- if (!isAccessibilityEnabled) {
+ if (!accessibilityEnabled) {
return false
}
@@ -1455,7 +1466,7 @@
* @return Whether the hover event was handled.
*/
fun dispatchHoverEvent(event: MotionEvent): Boolean {
- if (!isAccessibilityEnabled) {
+ if (!touchExplorationEnabled) {
return false
}
@@ -1587,7 +1598,7 @@
// later, we can refresh currentSemanticsNodes if currentSemanticsNodes is stale.
currentSemanticsNodesInvalidated = true
- if (isAccessibilityEnabled && !checkingForSemanticsChanges) {
+ if (accessibilityEnabled && !checkingForSemanticsChanges) {
checkingForSemanticsChanges = true
handler.post(semanticsChangeChecker)
}
@@ -1602,7 +1613,7 @@
try {
val subtreeChangedSemanticsNodesIds = ArraySet<Int>()
for (notification in boundsUpdateChannel) {
- if (isAccessibilityEnabled) {
+ if (accessibilityEnabled) {
for (i in subtreeChangedLayoutNodes.indices) {
sendSubtreeChangeAccessibilityEvents(
subtreeChangedLayoutNodes.valueAt(i)!!,
@@ -1642,7 +1653,7 @@
// currentSemanticsNodesInvalidated up to date so that when accessibility is turned on
// later, we can refresh currentSemanticsNodes if currentSemanticsNodes is stale.
currentSemanticsNodesInvalidated = true
- if (!isAccessibilityEnabled) {
+ if (!accessibilityEnabled) {
return
}
// The layout change of a LayoutNode will also affect its children, so even if it doesn't
@@ -2409,34 +2420,34 @@
}
}
- private class Api24Impl {
- @RequiresApi(Build.VERSION_CODES.N)
- companion object {
- fun addSetProgressAction(
- info: AccessibilityNodeInfoCompat,
- semanticsNode: SemanticsNode
- ) {
- if (semanticsNode.enabled()) {
- semanticsNode.unmergedConfig.getOrNull(SemanticsActions.SetProgress)?.let {
- info.addAction(
- AccessibilityActionCompat(
- android.R.id.accessibilityActionSetProgress,
- it.label
- )
+ @RequiresApi(Build.VERSION_CODES.N)
+ private object Api24Impl {
+ @DoNotInline
+ @JvmStatic
+ fun addSetProgressAction(
+ info: AccessibilityNodeInfoCompat,
+ semanticsNode: SemanticsNode
+ ) {
+ if (semanticsNode.enabled()) {
+ semanticsNode.unmergedConfig.getOrNull(SemanticsActions.SetProgress)?.let {
+ info.addAction(
+ AccessibilityActionCompat(
+ android.R.id.accessibilityActionSetProgress,
+ it.label
)
- }
+ )
}
}
}
}
- private class Api28Impl {
- @RequiresApi(Build.VERSION_CODES.P)
- companion object {
- fun setScrollEventDelta(event: AccessibilityEvent, deltaX: Int, deltaY: Int) {
- event.scrollDeltaX = deltaX
- event.scrollDeltaY = deltaY
- }
+ @RequiresApi(Build.VERSION_CODES.P)
+ private object Api28Impl {
+ @JvmStatic
+ @DoNotInline
+ fun setScrollEventDelta(event: AccessibilityEvent, deltaX: Int, deltaY: Int) {
+ event.scrollDeltaX = deltaX
+ event.scrollDeltaY = deltaY
}
}
}
diff --git a/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidTextToolbar.android.kt b/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidTextToolbar.android.kt
index 9427dd7..958ff59 100644
--- a/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidTextToolbar.android.kt
+++ b/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidTextToolbar.android.kt
@@ -93,6 +93,7 @@
}
@RequiresApi(23)
+ @DoNotInline
fun invalidateContentRect(actionMode: ActionMode) {
actionMode.invalidateContentRect()
}
diff --git a/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/RenderNodeLayer.android.kt b/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/RenderNodeLayer.android.kt
index 34d131b..d161eca 100644
--- a/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/RenderNodeLayer.android.kt
+++ b/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/RenderNodeLayer.android.kt
@@ -97,12 +97,10 @@
}
@RequiresApi(29)
- private class UniqueDrawingIdApi29 {
- @RequiresApi(29)
- companion object {
- @JvmStatic
- fun getUniqueDrawingId(view: View) = view.uniqueDrawingId
- }
+ private object UniqueDrawingIdApi29 {
+ @JvmStatic
+ @androidx.annotation.DoNotInline
+ fun getUniqueDrawingId(view: View) = view.uniqueDrawingId
}
override fun updateLayerProperties(
diff --git a/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/ViewLayer.android.kt b/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/ViewLayer.android.kt
index 381f621..d8c2ac9 100644
--- a/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/ViewLayer.android.kt
+++ b/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/ViewLayer.android.kt
@@ -98,12 +98,10 @@
}
@RequiresApi(29)
- private class UniqueDrawingIdApi29 {
- @RequiresApi(29)
- companion object {
- @JvmStatic
- fun getUniqueDrawingId(view: View) = view.uniqueDrawingId
- }
+ private object UniqueDrawingIdApi29 {
+ @JvmStatic
+ @androidx.annotation.DoNotInline
+ fun getUniqueDrawingId(view: View) = view.uniqueDrawingId
}
/**
diff --git a/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/ViewLayerContainer.android.kt b/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/ViewLayerContainer.android.kt
index a4282ee..27336f6 100644
--- a/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/ViewLayerContainer.android.kt
+++ b/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/ViewLayerContainer.android.kt
@@ -44,6 +44,8 @@
* The container we will use for [ViewLayer]s when [ViewLayer.shouldUseDispatchDraw] is true.
*/
internal open class DrawChildContainer(context: Context) : ViewGroup(context) {
+ private var isDrawing = false
+
init {
clipChildren = false
@@ -65,7 +67,7 @@
// We only want to call super.dispatchDraw() if there is an invalidated layer
var doDispatch = false
- for (i in 0 until childCount) {
+ for (i in 0 until super.getChildCount()) {
val child = getChildAt(i) as ViewLayer
if (child.isInvalidated) {
doDispatch = true
@@ -74,10 +76,21 @@
}
if (doDispatch) {
- super.dispatchDraw(canvas)
+ isDrawing = true
+ try {
+ super.dispatchDraw(canvas)
+ } finally {
+ isDrawing = false
+ }
}
}
+ /**
+ * We don't want to advertise children to the transition system. ViewLayers shouldn't be
+ * watched for add/remove for transitions purposes.
+ */
+ override fun getChildCount(): Int = if (isDrawing) super.getChildCount() else 0
+
// we change visibility for this method so ViewLayer can use it for drawing
internal fun drawChild(canvas: Canvas, view: View, drawingTime: Long) {
super.drawChild(canvas.nativeCanvas, view, drawingTime)
diff --git a/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/WindowRecomposer.android.kt b/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/WindowRecomposer.android.kt
index 4060a3c..aa910b5 100644
--- a/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/WindowRecomposer.android.kt
+++ b/compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/WindowRecomposer.android.kt
@@ -22,6 +22,7 @@
import androidx.compose.runtime.MonotonicFrameClock
import androidx.compose.runtime.PausableMonotonicFrameClock
import androidx.compose.runtime.Recomposer
+import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.InternalComposeUiApi
import androidx.compose.ui.R
import androidx.lifecycle.Lifecycle
@@ -35,6 +36,8 @@
import kotlinx.coroutines.android.asCoroutineDispatcher
import kotlinx.coroutines.launch
import java.util.concurrent.atomic.AtomicReference
+import kotlin.coroutines.ContinuationInterceptor
+import kotlin.coroutines.CoroutineContext
import kotlin.coroutines.EmptyCoroutineContext
/**
@@ -95,8 +98,9 @@
* [Lifecycle.State.STARTED], causing animations and other uses of [MonotonicFrameClock]
* APIs to suspend until a **visible** frame will be produced.
*/
+ @OptIn(ExperimentalComposeUiApi::class)
val LifecycleAware: WindowRecomposerFactory = WindowRecomposerFactory { rootView ->
- rootView.createLifecycleAwareViewTreeRecomposer()
+ rootView.createLifecycleAwareWindowRecomposer()
}
}
}
@@ -233,15 +237,42 @@
}
}
-private fun View.createLifecycleAwareViewTreeRecomposer(): Recomposer {
- val currentThreadContext = AndroidUiDispatcher.CurrentThread
- val pausableClock = currentThreadContext[MonotonicFrameClock]?.let {
+/**
+ * Create a [Lifecycle] and [window attachment][View.isAttachedToWindow]-aware [Recomposer] for
+ * this [View] with the same behavior as [WindowRecomposerFactory.LifecycleAware].
+ *
+ * [coroutineContext] will override any [CoroutineContext] elements from the default configuration
+ * normally used for this content view. The default [CoroutineContext] contains
+ * [AndroidUiDispatcher.CurrentThread]; this function should only be called from the UI thread
+ * of this [View] or its intended UI thread if it is currently detached.
+ *
+ * If [lifecycle] is `null` or not supplied the [ViewTreeLifecycleOwner] will be used;
+ * if a non-null [lifecycle] is not provided and a [ViewTreeLifecycleOwner] is not present
+ * an [IllegalStateException] will be thrown.
+ *
+ * The returned [Recomposer] will be [cancelled][Recomposer.cancel] when this [View] is detached
+ * from a window or if its determined [Lifecycle] is [destroyed][Lifecycle.Event.ON_DESTROY].
+ * Recomposition and associated [frame-based][MonotonicFrameClock] effects may be throttled
+ * or paused while the [Lifecycle] is not at least [Lifecycle.State.STARTED].
+ */
+@ExperimentalComposeUiApi
+fun View.createLifecycleAwareWindowRecomposer(
+ coroutineContext: CoroutineContext = EmptyCoroutineContext,
+ lifecycle: Lifecycle? = null
+): Recomposer {
+ // Only access AndroidUiDispatcher.CurrentThread if we would use an element from it,
+ // otherwise prevent lazy initialization.
+ val baseContext = if (coroutineContext[ContinuationInterceptor] == null ||
+ coroutineContext[MonotonicFrameClock] == null) {
+ AndroidUiDispatcher.CurrentThread + coroutineContext
+ } else coroutineContext
+ val pausableClock = baseContext[MonotonicFrameClock]?.let {
PausableMonotonicFrameClock(it).apply { pause() }
}
- val contextWithClock = currentThreadContext + (pausableClock ?: EmptyCoroutineContext)
+ val contextWithClock = baseContext + (pausableClock ?: EmptyCoroutineContext)
val recomposer = Recomposer(contextWithClock)
val runRecomposeScope = CoroutineScope(contextWithClock)
- val viewTreeLifecycleOwner = checkNotNull(ViewTreeLifecycleOwner.get(this)) {
+ val viewTreeLifecycle = checkNotNull(lifecycle ?: ViewTreeLifecycleOwner.get(this)?.lifecycle) {
"ViewTreeLifecycleOwner not found from $this"
}
// Removing the view holding the ViewTreeRecomposer means we may never be reattached again.
@@ -257,7 +288,7 @@
}
}
)
- viewTreeLifecycleOwner.lifecycle.addObserver(
+ viewTreeLifecycle.addObserver(
object : LifecycleEventObserver {
override fun onStateChanged(lifecycleOwner: LifecycleOwner, event: Lifecycle.Event) {
val self = this
diff --git a/core/core-splashscreen/api/1.0.0-beta01.txt b/core/core-splashscreen/api/1.0.0-beta01.txt
new file mode 100644
index 0000000..5208466
--- /dev/null
+++ b/core/core-splashscreen/api/1.0.0-beta01.txt
@@ -0,0 +1,36 @@
+// Signature format: 4.0
+package androidx.core.splashscreen {
+
+ public final class SplashScreen {
+ method public static androidx.core.splashscreen.SplashScreen installSplashScreen(android.app.Activity);
+ method public void setKeepOnScreenCondition(androidx.core.splashscreen.SplashScreen.KeepOnScreenCondition condition);
+ method public void setOnExitAnimationListener(androidx.core.splashscreen.SplashScreen.OnExitAnimationListener listener);
+ field public static final androidx.core.splashscreen.SplashScreen.Companion Companion;
+ }
+
+ public static final class SplashScreen.Companion {
+ method public androidx.core.splashscreen.SplashScreen installSplashScreen(android.app.Activity);
+ }
+
+ public static fun interface SplashScreen.KeepOnScreenCondition {
+ method @MainThread public boolean shouldKeepOnScreen();
+ }
+
+ public static fun interface SplashScreen.OnExitAnimationListener {
+ method @MainThread public void onSplashScreenExit(androidx.core.splashscreen.SplashScreenViewProvider splashScreenViewProvider);
+ }
+
+ public final class SplashScreenViewProvider {
+ method public long getIconAnimationDurationMillis();
+ method public long getIconAnimationStartMillis();
+ method public android.view.View getIconView();
+ method public android.view.View getView();
+ method public void remove();
+ property public final long iconAnimationDurationMillis;
+ property public final long iconAnimationStartMillis;
+ property public final android.view.View iconView;
+ property public final android.view.View view;
+ }
+
+}
+
diff --git a/core/core-splashscreen/api/public_plus_experimental_1.0.0-beta01.txt b/core/core-splashscreen/api/public_plus_experimental_1.0.0-beta01.txt
new file mode 100644
index 0000000..5208466
--- /dev/null
+++ b/core/core-splashscreen/api/public_plus_experimental_1.0.0-beta01.txt
@@ -0,0 +1,36 @@
+// Signature format: 4.0
+package androidx.core.splashscreen {
+
+ public final class SplashScreen {
+ method public static androidx.core.splashscreen.SplashScreen installSplashScreen(android.app.Activity);
+ method public void setKeepOnScreenCondition(androidx.core.splashscreen.SplashScreen.KeepOnScreenCondition condition);
+ method public void setOnExitAnimationListener(androidx.core.splashscreen.SplashScreen.OnExitAnimationListener listener);
+ field public static final androidx.core.splashscreen.SplashScreen.Companion Companion;
+ }
+
+ public static final class SplashScreen.Companion {
+ method public androidx.core.splashscreen.SplashScreen installSplashScreen(android.app.Activity);
+ }
+
+ public static fun interface SplashScreen.KeepOnScreenCondition {
+ method @MainThread public boolean shouldKeepOnScreen();
+ }
+
+ public static fun interface SplashScreen.OnExitAnimationListener {
+ method @MainThread public void onSplashScreenExit(androidx.core.splashscreen.SplashScreenViewProvider splashScreenViewProvider);
+ }
+
+ public final class SplashScreenViewProvider {
+ method public long getIconAnimationDurationMillis();
+ method public long getIconAnimationStartMillis();
+ method public android.view.View getIconView();
+ method public android.view.View getView();
+ method public void remove();
+ property public final long iconAnimationDurationMillis;
+ property public final long iconAnimationStartMillis;
+ property public final android.view.View iconView;
+ property public final android.view.View view;
+ }
+
+}
+
diff --git a/core/core-splashscreen/api/res-1.0.0-beta01.txt b/core/core-splashscreen/api/res-1.0.0-beta01.txt
new file mode 100644
index 0000000..6227062
--- /dev/null
+++ b/core/core-splashscreen/api/res-1.0.0-beta01.txt
@@ -0,0 +1,7 @@
+attr postSplashScreenTheme
+attr windowSplashScreenAnimatedIcon
+attr windowSplashScreenAnimationDuration
+attr windowSplashScreenBackground
+dimen splashscreen_icon_size
+style Theme_SplashScreen
+style Theme_SplashScreen_IconBackground
diff --git a/core/core-splashscreen/api/restricted_1.0.0-beta01.txt b/core/core-splashscreen/api/restricted_1.0.0-beta01.txt
new file mode 100644
index 0000000..5208466
--- /dev/null
+++ b/core/core-splashscreen/api/restricted_1.0.0-beta01.txt
@@ -0,0 +1,36 @@
+// Signature format: 4.0
+package androidx.core.splashscreen {
+
+ public final class SplashScreen {
+ method public static androidx.core.splashscreen.SplashScreen installSplashScreen(android.app.Activity);
+ method public void setKeepOnScreenCondition(androidx.core.splashscreen.SplashScreen.KeepOnScreenCondition condition);
+ method public void setOnExitAnimationListener(androidx.core.splashscreen.SplashScreen.OnExitAnimationListener listener);
+ field public static final androidx.core.splashscreen.SplashScreen.Companion Companion;
+ }
+
+ public static final class SplashScreen.Companion {
+ method public androidx.core.splashscreen.SplashScreen installSplashScreen(android.app.Activity);
+ }
+
+ public static fun interface SplashScreen.KeepOnScreenCondition {
+ method @MainThread public boolean shouldKeepOnScreen();
+ }
+
+ public static fun interface SplashScreen.OnExitAnimationListener {
+ method @MainThread public void onSplashScreenExit(androidx.core.splashscreen.SplashScreenViewProvider splashScreenViewProvider);
+ }
+
+ public final class SplashScreenViewProvider {
+ method public long getIconAnimationDurationMillis();
+ method public long getIconAnimationStartMillis();
+ method public android.view.View getIconView();
+ method public android.view.View getView();
+ method public void remove();
+ property public final long iconAnimationDurationMillis;
+ property public final long iconAnimationStartMillis;
+ property public final android.view.View iconView;
+ property public final android.view.View view;
+ }
+
+}
+
diff --git a/core/core-splashscreen/build.gradle b/core/core-splashscreen/build.gradle
index d325d3b..b59588f 100644
--- a/core/core-splashscreen/build.gradle
+++ b/core/core-splashscreen/build.gradle
@@ -44,7 +44,7 @@
androidTestImplementation(project(":appcompat:appcompat"))
androidTestImplementation(project(":test:screenshot:screenshot"))
- samples(project(":core:core-splashscreen:core-splashscreen-samples"))
+ samples("androidx.core.core-splashscreen:core-splashscreen-samples:1.0.0-beta01")
}
androidx {
diff --git a/development/referenceDocs/stageReferenceDocsWithDackka.sh b/development/referenceDocs/stageReferenceDocsWithDackka.sh
index 4b95bf2..c9162a1 100755
--- a/development/referenceDocs/stageReferenceDocsWithDackka.sh
+++ b/development/referenceDocs/stageReferenceDocsWithDackka.sh
@@ -205,19 +205,6 @@
g4 revert ...
g4 sync
-# Temporarily skipping due to o/128063951. b/186655027 tracks adding this back.
-# TODO: check this logic when uncommenting
-#
-# Provision database if the target DB is not the default staging DB.
-# if [ "${FLAGS_db}" != "$defaultDb" ]; then
-# printf "\n"
-# printf "=================================================================== \n"
-# printf "== Provision staging database ${FLAGS_db} \n"
-# printf "=================================================================== \n"
-#
-# /google/data/ro/projects/devsite/devsite2 provision --db="${FLAGS_db}"
-# fi
-
printf "\n"
printf "=================================================================== \n"
printf "== Prep directories and copy refdocs to CitC client \n"
diff --git a/development/studio/profile.config b/development/studio/profile.config
new file mode 100644
index 0000000..5e0b6da
--- /dev/null
+++ b/development/studio/profile.config
@@ -0,0 +1,133 @@
+# A set of trace points to trace a build from the command line
+# This file is originally based on studio-main/tools/base/tracer/gradle.profile
+
+# Add the agent flag via _JAVA_OPTIONS to get both the wrapper and gradle instrumented
+#Trace-Agent: true
+
+# *flingers
+Trace: com.android.zipflinger.Compressor
+Trace: com.android.zipflinger.ZipArchive
+Trace: com.android.signflinger.SignedApk
+
+# Gradle wraper end-to-end events
+Start: org.gradle.wrapper.GradleWrapperMain::main
+Flush: org.gradle.launcher.Main::doAction
+
+# Main configuration step
+Trace: org.gradle.configuration.DefaultBuildConfigurer::configure
+# Main execution step
+Trace: org.gradle.execution.DefaultBuildExecuter::execute
+Trace: org.gradle.execution.DefaultBuildConfigurationActionExecuter::configure
+
+# Android plugin
+Trace: com.android.build.gradle.internal.plugins.BasePlugin
+#Annotation: org.gradle.api.tasks.TaskAction
+
+# Apk step
+#Trace: com.android.build.gradle.tasks.PackageAndroidArtifact::doIncrementalTaskAction
+#Trace: com.android.build.gradle.tasks.PackageAndroidArtifact::doFullTaskAction
+#Trace: com.android.tools.build.apkzlib.zip.ZFile::<init>
+#Trace: com.android.tools.build.apkzlib.zip.ZFile::openReadOnly
+#Trace: com.android.tools.build.apkzlib.zip.ZFile::openReadWrite
+#Trace: com.android.tools.build.apkzlib.zip.ZFile::readData
+#Trace: com.android.tools.build.apkzlib.zip.ZFile::readCentralDirectory
+#Trace: com.android.tools.build.apkzlib.zip.ZFile::mergeFrom
+#Trace: com.android.tools.build.apkzlib.zip.ZFile::add
+#Trace: com.android.tools.build.apkzlib.zip.ZFile::update
+#Trace: com.android.tools.build.apkzlib.zip.ZFile::close
+#Trace: com.android.tools.build.apkzlib.zip.ZFile::writeAllFilesToZip
+#Trace: com.android.tools.build.apkzlib.zip.ZFile::recomputeAndWriteCentralDirectoryAndEocd
+#Trace: com.android.tools.build.apkzlib.zip.ZFile::directFullyRead
+#Trace: com.android.tools.build.apkzlib.zip.ZFile::notify
+#Trace: com.android.tools.build.apkzlib.zip.ZFile::processAllReadyEntriesWithWait
+#Trace: com.android.tools.build.apkzlib.zfile.ApkZFileCreator
+#Trace: com.android.tools.build.apkzlib.zfile.ApkZFileCreatorFactory
+#Trace: com.android.build.gradle.internal.packaging.IncrementalPackagerBuilder
+#Trace: com.android.builder.internal.packaging.IncrementalPackager
+#Trace: com.android.build.gradle.tasks.PackageAndroidArtifact.IncrementalSplitterRunnable
+#Trace: com.android.build.gradle.internal.tasks.KnownFilesSaveData
+#Trace: com.android.builder.files.RelativeFiles::fromZip
+#Trace: com.android.builder.files.ZipCentralDirectory
+#Trace: com.android.tools.build.apkzlib.bytestorage.ByteStorage
+#Trace: com.android.tools.build.apkzlib.bytestorage.ChunkBasedByteStorage
+#Trace: com.android.tools.build.apkzlib.bytestorage.InMemoryByteStorage
+#Trace: com.android.tools.build.apkzlib.bytestorage.OverflowToDiskByteStorage
+#Trace: com.android.tools.build.apkzlib.bytestorage.TemporaryDirectoryStorage
+#Trace: com.android.tools.build.apkzlib.zip.StoredEntry
+
+# Signing
+#Trace: com.android.tools.build.apkzlib.sign.SigningExtension
+#Trace: com.android.tools.build.apkzlib.sign.SigningExtension::isCurrentSignatureAsRequested
+#Trace: com.android.tools.build.apkzlib.sign.SigningExtension::onOutputZipReadyForUpdate
+#Trace: com.android.tools.build.apkzlib.sign.SigningExtension::onOutputZipEntriesWritten
+
+# Flush the daemon
+Flush: org.gradle.internal.buildevents.BuildResultLogger::buildFinished
+
+# Task executors
+# All: Trace: org.gradle.api.internal.tasks.execution.*
+#Trace: org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter::execute
+#Trace: org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter::execute
+
+
+# Snapshot/checksumming:
+#Trace: org.gradle.api.internal.changedetection.state.AbstractFileCollectionSnapshotter::snapshot
+#Trace: org.gradle.api.internal.changedetection.state.DefaultFileSystemSnapshotter::snapshotDirectoryTree
+
+# More details:
+#Trace: org.gradle.api.internal.artifacts.configurations.DefaultConfiguration::getFiles
+#Trace: org.gradle.api.internal.changedetection.state.CompileClasspathSnapshotBuilder
+#Trace: org.gradle.api.internal.changedetection.state.RuntimeClasspathSnapshotBuilder
+#Trace: org.gradle.api.internal.file.CalculatedTaskInputFileCollection::getFiles
+#Trace: org.gradle.jvm.internal.DependencyResolvingClasspath
+#Trace: org.gradle.jvm.internal.DependencyResolvingClasspath::getFiles
+#Trace: org.gradle.api.internal.artifacts.ivyservice.DefaultConfigurationResolver
+#Trace: org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationFileCollection
+#Trace: org.gradle.api.internal.artifacts.configurations.DefaultConfiguration#getFiles
+#Trace: org.gradle.api.internal.file.AbstractFileTree::getFiles
+
+# Even more details:
+#Trace: org.gradle.api.internal.AbstractTask::execute
+#Trace: org.gradle.api.internal.changedetection.state.DefaultFileSystemSnapshotter
+#Trace: org.gradle.internal.execution.history.changes.*
+#Trace: org.gradle.api.internal.project.taskfactory.*
+#Trace: org.gradle.api.internal.project.taskfactory.*
+#Trace: org.gradle.api.internal.artifacts.ivyservice.resolveengine.*
+#Trace: org.gradle.api.internal.artifacts.ivyservice.resolveengine.artifact.*
+#Trace: org.gradle.api.internal.artifacts.transform.DefaultTransformedFileCache
+#Trace: org.gradle.api.internal.artifacts.transform.TransformingAsyncArtifactListener
+#Trace: org.gradle.api.internal.artifacts.transform.UserCodeBackedTransformer
+#Trace: org.gradle.api.internal.changedetection.state.DefaultFileSystemSnapshotter$HashBackedSnapshot
+#Trace: org.gradle.api.internal.file.AbstractFileCollection.*
+Trace: org.gradle.api.internal.changedetection.changes.DefaultTaskArtifactStateRepository$TaskArtifactStateImpl
+#Trace: org.gradle.api.internal.changedetection.state.AbstractFileCollectionSnapshotter
+#Trace: org.gradle.api.internal.changedetection.state.AbstractFileCollectionSnapshotter$FileCollectionVisitorImpl
+#Trace: org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository
+#Trace: org.gradle.api.internal.changedetection.state.FileCollectionVisitingSnapshotBuilder
+#Trace: org.gradle.api.internal.file.AbstractFileTree::getFiles
+#Trace: org.gradle.api.internal.file.collections.FileCollectionAdapter::getFiles
+#Trace: org.gradle.api.internal.file.CompositeFileCollection::getFiles
+#Trace: org.gradle.api.internal.AbstractTask
+Trace: org.gradle.internal.buildevents.*
+#Trace: org.gradle.internal.service.scopes.*
+Trace: org.gradle.execution.*
+Trace: org.gradle.configuration.*
+Trace: org.gradle.internal.buildevents.BuildResultLogger
+
+# model building
+Trace: com.android.build.gradle.internal.ide.ModelBuilder
+Trace: com.android.build.gradle.internal.ide.dependencies.ArtifactDependencyGraph
+Trace: com.android.build.gradle.internal.ide.dependencies.LibraryUtils
+Trace: com.android.build.gradle.internal.ide.AndroidLibraryImpl
+Trace: com.android.build.gradle.internal.ide.JavaLibraryImpl
+
+# other
+#Trace: org.jetbrains.intellij.*
+#Trace: com.intellij.*
+#Trace: com.intellij.util.indexing.*
+Trace: com.intellij.util.indexing.UnindexedFilesUpdater::performInDumbMode
+Trace: com.intellij.openapi.project.DumbServiceMergingTaskQueue::executeTask
+Trace: com.intellij.openapi.project.impl.ProjectManagerImpl::initProject
+Trace: com.jetbrains.cidr.lang.symbols.symtable.building.OCSymbolLoadingActivity
+Trace: org.gradle.api.internal.tasks.TaskDependencyContainer
+Trace: org.gradle.groovy.scripts.*
diff --git a/docs-tip-of-tree/build.gradle b/docs-tip-of-tree/build.gradle
index a22fca0..278d396 100644
--- a/docs-tip-of-tree/build.gradle
+++ b/docs-tip-of-tree/build.gradle
@@ -281,7 +281,6 @@
docs(project(":wear:watchface:watchface"))
docs(project(":wear:watchface:watchface-complications"))
docs(project(":wear:watchface:watchface-complications-data"))
- docs(project(":wear:watchface:watchface-complications-data-core"))
docs(project(":wear:watchface:watchface-complications-data-source"))
samples(project(":wear:watchface:watchface-complications-data-source-samples"))
docs(project(":wear:watchface:watchface-complications-rendering"))
diff --git a/external/libyuv/build.gradle b/external/libyuv/build.gradle
index 32f07d2..d4d82f6 100644
--- a/external/libyuv/build.gradle
+++ b/external/libyuv/build.gradle
@@ -72,19 +72,25 @@
def buildDir = project.buildDir
tasks.named("prefabReleaseConfigurePackage").configure {
it.doLast {
+ // handle differences in prefab configuration location between AGP versions
+ def packageLocation = "prefab_package_configuration"
+ def packageDir = new File("$buildDir/intermediates/${packageLocation}")
+ if (!packageDir.exists()) {
+ packageLocation = "prefab_package"
+ }
def abis = ["android.arm64-v8a", "android.armeabi-v7a", "android.x86", "android.x86_64"]
abis.each { abi ->
- def releaseAbiJson = new File("$buildDir/intermediates/prefab_package/release/prefab/modules/yuv/libs/${abi}/abi.json")
+ def releaseAbiJson = new File("$buildDir/intermediates/${packageLocation}/release/prefab/modules/yuv/libs/${abi}/abi.json")
if (!releaseAbiJson.exists()) {
throw new GradleException("$releaseAbiJson does not exist")
}
}
- def releasePrefabJson = new File("$buildDir/intermediates/prefab_package/release/prefab/prefab.json")
+ def releasePrefabJson = new File("$buildDir/intermediates/${packageLocation}/release/prefab/prefab.json")
if (!releasePrefabJson.exists()) {
throw new GradleException("$releasePrefabJson does not exist")
}
- def releaseConvertArgb = new File("$buildDir/intermediates/prefab_package/release/prefab/modules/yuv/include/libyuv/convert_argb.h")
+ def releaseConvertArgb = new File("$buildDir/intermediates/${packageLocation}/release/prefab/modules/yuv/include/libyuv/convert_argb.h")
if (!releaseConvertArgb.exists()) {
throw new GradleException("$releaseConvertArgb does not exist")
}
@@ -92,19 +98,25 @@
}
tasks.named("prefabDebugConfigurePackage").configure {
it.doLast {
+ // handle differences in prefab configuration location between AGP versions
+ def packageLocation = "prefab_package_configuration"
+ def packageDir = new File("$buildDir/intermediates/${packageLocation}")
+ if (!packageDir.exists()) {
+ packageLocation = "prefab_package"
+ }
def abis = ["android.arm64-v8a", "android.armeabi-v7a", "android.x86", "android.x86_64"]
abis.each { abi ->
- def debugAbiJson = new File("$buildDir/intermediates/prefab_package/debug/prefab/modules/yuv/libs/${abi}/abi.json")
+ def debugAbiJson = new File("$buildDir/intermediates/${packageLocation}/debug/prefab/modules/yuv/libs/${abi}/abi.json")
if (!debugAbiJson.exists()) {
throw new GradleException("$debugAbiJson does not exist")
}
}
- def debugPrefabJson = new File("$buildDir/intermediates/prefab_package/debug/prefab/prefab.json")
+ def debugPrefabJson = new File("$buildDir/intermediates/${packageLocation}/debug/prefab/prefab.json")
if (!debugPrefabJson.exists()) {
throw new GradleException("$debugPrefabJson does not exist")
}
- def debugConvertArgb = new File("$buildDir/intermediates/prefab_package/debug/prefab/modules/yuv/include/libyuv/convert_argb.h")
+ def debugConvertArgb = new File("$buildDir/intermediates/${packageLocation}/debug/prefab/modules/yuv/include/libyuv/convert_argb.h")
if (!debugConvertArgb.exists()) {
throw new GradleException("$debugConvertArgb does not exist")
}
diff --git a/glance/glance-appwidget/src/androidAndroidTest/kotlin/androidx/glance/appwidget/LazyColumnTest.kt b/glance/glance-appwidget/src/androidAndroidTest/kotlin/androidx/glance/appwidget/LazyColumnTest.kt
index 84e7151..6a108c0 100644
--- a/glance/glance-appwidget/src/androidAndroidTest/kotlin/androidx/glance/appwidget/LazyColumnTest.kt
+++ b/glance/glance-appwidget/src/androidAndroidTest/kotlin/androidx/glance/appwidget/LazyColumnTest.kt
@@ -20,14 +20,12 @@
import android.os.Build
import android.view.Gravity
import android.view.View
-import android.view.ViewGroup
import android.widget.Button
import android.widget.FrameLayout
import android.widget.ListView
import android.widget.TextView
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
-import androidx.core.view.children
import androidx.glance.Button
import androidx.glance.GlanceModifier
import androidx.glance.action.actionStartActivity
@@ -356,8 +354,7 @@
}
}
- // b/206630723: Change in Ie0923d5de57d328b2cdd78219f0049bf38cb9bed to work around KT-49573
- mHostRule.onUnboxedHostView2(action)
+ mHostRule.onUnboxedHostView(action)
}
private inline fun <reified T : View> ListView.getUnboxedListItem(position: Int): T {
@@ -370,11 +367,3 @@
return frame.getChildAt(0).getTargetView()
}
}
-
-// b/206630723 Change in Ie0923d5de57d328b2cdd78219f0049bf38cb9bed to work around KT-49573
-inline fun AppWidgetHostRule.onUnboxedHostView2(crossinline block: (ListView) -> Unit) {
- onHostActivity {
- val boxingView = assertIs<ViewGroup>(mHostView.getChildAt(0))
- block(boxingView.children.single().getTargetView())
- }
-}
diff --git a/glance/glance-appwidget/src/androidMain/kotlin/androidx/glance/appwidget/state/GlanceAppWidgetState.kt b/glance/glance-appwidget/src/androidMain/kotlin/androidx/glance/appwidget/state/GlanceAppWidgetState.kt
index 3c4455d..2d5103b 100644
--- a/glance/glance-appwidget/src/androidMain/kotlin/androidx/glance/appwidget/state/GlanceAppWidgetState.kt
+++ b/glance/glance-appwidget/src/androidMain/kotlin/androidx/glance/appwidget/state/GlanceAppWidgetState.kt
@@ -79,7 +79,7 @@
): T =
updateAppWidgetState(
context,
- checkNotNull(stateDefinition as GlanceStateDefinition<T>) {
+ checkNotNull(stateDefinition as GlanceStateDefinition<T>?) {
"No state defined in this provider"
},
glanceId,
diff --git a/glance/glance-appwidget/src/test/kotlin/androidx/glance/appwidget/state/GlanceAppWidgetStateTest.kt b/glance/glance-appwidget/src/test/kotlin/androidx/glance/appwidget/state/GlanceAppWidgetStateTest.kt
new file mode 100644
index 0000000..a531513
--- /dev/null
+++ b/glance/glance-appwidget/src/test/kotlin/androidx/glance/appwidget/state/GlanceAppWidgetStateTest.kt
@@ -0,0 +1,108 @@
+/*
+ * Copyright 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package androidx.glance.appwidget.state
+
+import android.content.Context
+import androidx.compose.runtime.Composable
+import androidx.datastore.preferences.core.Preferences
+import androidx.datastore.preferences.core.emptyPreferences
+import androidx.datastore.preferences.core.preferencesOf
+import androidx.datastore.preferences.core.intPreferencesKey
+import androidx.glance.appwidget.AppWidgetId
+import androidx.glance.appwidget.GlanceAppWidget
+import androidx.glance.appwidget.createUniqueRemoteUiName
+import androidx.glance.state.GlanceState
+import androidx.glance.state.GlanceStateDefinition
+import androidx.glance.state.PreferencesGlanceStateDefinition
+import androidx.test.core.app.ApplicationProvider
+import com.google.common.truth.Truth.assertThat
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.runBlocking
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.robolectric.RobolectricTestRunner
+import kotlin.test.assertFailsWith
+
+@OptIn(ExperimentalCoroutinesApi::class)
+@RunWith(RobolectricTestRunner::class)
+class GlanceAppWidgetStateTest {
+
+ private val context = ApplicationProvider.getApplicationContext<Context>()
+
+ @Before
+ fun setUp() {
+ runBlocking {
+ GlanceState.deleteStore(
+ context,
+ PreferencesGlanceStateDefinition,
+ createUniqueRemoteUiName(appWidgetId.appWidgetId)
+ )
+ }
+ }
+
+ @Test
+ fun getAppWidgetState_noStateDefine_shouldFail() {
+ val appWidget = GlanceAppWidgetProviderWithoutState()
+ val ex = runBlocking {
+ assertFailsWith<IllegalStateException> {
+ appWidget.getAppWidgetState(context, appWidgetId)
+ }
+ }
+ assertThat(ex.message).isEqualTo("No state defined in this provider")
+ }
+
+ @Test
+ fun getAppWidgetState_default_shouldReturnEmptyState() {
+ val appWidget = GlanceAppWidgetProviderPreferencesState()
+ val result = runBlocking {
+ appWidget.getAppWidgetState<Preferences>(context, appWidgetId)
+ }
+ assertThat(result).isEqualTo(emptyPreferences())
+ }
+
+ @Test
+ fun updateAppWidgetState_performUpdate() {
+ val key = intPreferencesKey("int_key")
+ val appWidget = GlanceAppWidgetProviderPreferencesState()
+ val storedPrefs = runBlocking {
+ appWidget.updateAppWidgetState<Preferences>(context, appWidgetId) { prefs ->
+ prefs.toMutablePreferences().apply { this[key] = 1 }.toPreferences()
+ }
+ appWidget.getAppWidgetState<Preferences>(context, appWidgetId)
+ }
+ assertThat(storedPrefs).isEqualTo(preferencesOf(key to 1))
+ }
+
+ class GlanceAppWidgetProviderWithoutState : GlanceAppWidget() {
+ @Composable
+ override fun Content() {
+ }
+ }
+
+ class GlanceAppWidgetProviderPreferencesState : GlanceAppWidget() {
+ override val stateDefinition: GlanceStateDefinition<*>? = PreferencesGlanceStateDefinition
+
+ @Composable
+ override fun Content() {
+ }
+ }
+
+ private companion object {
+ val appWidgetId = AppWidgetId(1)
+ }
+}
diff --git a/navigation/navigation-safe-args-gradle-plugin/build.gradle b/navigation/navigation-safe-args-gradle-plugin/build.gradle
index ef13217..4ab7d3b 100644
--- a/navigation/navigation-safe-args-gradle-plugin/build.gradle
+++ b/navigation/navigation-safe-args-gradle-plugin/build.gradle
@@ -25,7 +25,7 @@
}
dependencies {
- implementation("com.android.tools.build:gradle:4.2.0")
+ implementation("com.android.tools.build:gradle:7.0.4")
implementation(libs.kotlinGradlePluginz)
api(project(":navigation:navigation-safe-args-generator"))
api(gradleApi())
diff --git a/navigation/navigation-safe-args-gradle-plugin/src/main/kotlin/androidx/navigation/safeargs/gradle/SafeArgsPlugin.kt b/navigation/navigation-safe-args-gradle-plugin/src/main/kotlin/androidx/navigation/safeargs/gradle/SafeArgsPlugin.kt
index 70cb477..83a768a 100644
--- a/navigation/navigation-safe-args-gradle-plugin/src/main/kotlin/androidx/navigation/safeargs/gradle/SafeArgsPlugin.kt
+++ b/navigation/navigation-safe-args-gradle-plugin/src/main/kotlin/androidx/navigation/safeargs/gradle/SafeArgsPlugin.kt
@@ -16,13 +16,11 @@
package androidx.navigation.safeargs.gradle
-import com.android.build.api.extension.AndroidComponentsExtension
+import com.android.build.api.variant.AndroidComponentsExtension
import com.android.build.api.variant.DynamicFeatureVariant
import com.android.build.gradle.AppExtension
import com.android.build.gradle.BaseExtension
import com.android.build.gradle.LibraryExtension
-import com.android.build.gradle.api.ApplicationVariant
-import com.android.build.gradle.api.BaseVariant
import groovy.xml.XmlSlurper
import org.gradle.api.GradleException
import org.gradle.api.Plugin
@@ -45,7 +43,11 @@
abstract val generateKotlin: Boolean
- private fun forEachVariant(extension: BaseExtension, action: (BaseVariant) -> Unit) {
+ @Suppress("DEPRECATION") // For BaseVariant should be replaced in later studio versions
+ private fun forEachVariant(
+ extension: BaseExtension,
+ action: (com.android.build.gradle.api.BaseVariant) -> Unit
+ ) {
when {
extension is AppExtension -> extension.applicationVariants.all(action)
extension is LibraryExtension -> {
@@ -73,18 +75,15 @@
project.extensions.findByType(AndroidComponentsExtension::class.java)
?: throw GradleException("safeargs plugin must be used with android plugin")
variantExtension.onVariants { variant ->
+ @Suppress("DEPRECATION") // For ApplicationVariant
when (variant) {
- is ApplicationVariant, is DynamicFeatureVariant ->
- // Using reflection for AGP 7.0+ cause it can't resolve that
- // DynamicFeatureVariant implements GeneratesApk so the `applicationId`
- // property is actually available. Once we upgrade to 7.0 we will use
- // getNamespace().
- variant::class.java.getDeclaredMethod("getApplicationId").let { method ->
- method.trySetAccessible()
- applicationIds.getOrPut(variant.name) {
- @kotlin.Suppress("UNCHECKED_CAST")
- method.invoke(variant) as Provider<String>
- }
+ is com.android.build.gradle.api.ApplicationVariant ->
+ applicationIds.getOrPut(variant.name) {
+ variant.namespace
+ }
+ is DynamicFeatureVariant ->
+ applicationIds.getOrPut(variant.name) {
+ variant.applicationId
}
}
}
@@ -119,11 +118,13 @@
)
task.generateKotlin.set(generateKotlin)
}
+ @Suppress("DEPRECATION") // For BaseVariant should be replaced in later studio versions
variant.registerJavaGeneratingTask(task, task.outputDir.asFile.get())
}
}
- private fun BaseVariant.rFilePackage() = providerFactory.provider {
+ @Suppress("DEPRECATION") // For BaseVariant should be replaced in later studio versions
+ private fun com.android.build.gradle.api.BaseVariant.rFilePackage() = providerFactory.provider {
val mainSourceSet = sourceSets.find { it.name == "main" }
val sourceSet = mainSourceSet ?: sourceSets[0]
val manifest = sourceSet.manifestFile
@@ -131,8 +132,9 @@
parsed.getProperty("@package").toString()
}
+ @Suppress("DEPRECATION") // For BaseVariant should be replaced in later studio versions
private fun navigationFiles(
- variant: BaseVariant,
+ variant: com.android.build.gradle.api.BaseVariant,
project: Project
): ConfigurableFileCollection {
val fileProvider = providerFactory.provider {
diff --git a/room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XElement.kt b/room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XElement.kt
index a644cdd..669f656 100644
--- a/room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XElement.kt
+++ b/room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XElement.kt
@@ -68,6 +68,16 @@
}
/**
+ * Checks whether this element represents an [XEnumTypeElement].
+ */
+fun XElement.isEnum(): Boolean {
+ contract {
+ returns(true) implies (this@isEnum is XEnumTypeElement)
+ }
+ return this is XEnumTypeElement
+}
+
+/**
* Checks whether this element represents an [XVariableElement].
*/
fun XElement.isVariableElement(): Boolean {
diff --git a/room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XTypeElement.kt b/room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XTypeElement.kt
index aa68fc6..76bc4aa 100644
--- a/room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XTypeElement.kt
+++ b/room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XTypeElement.kt
@@ -47,6 +47,11 @@
val superType: XType?
/**
+ * The super interfaces implemented by this class.
+ */
+ val superInterfaces: List<XType>
+
+ /**
* Javapoet [ClassName] of the type.
*/
override val className: ClassName
diff --git a/room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/javac/JavacTypeElement.kt b/room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/javac/JavacTypeElement.kt
index 4263bf5..8828e8d 100644
--- a/room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/javac/JavacTypeElement.kt
+++ b/room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/javac/JavacTypeElement.kt
@@ -166,6 +166,17 @@
}
}
+ override val superInterfaces by lazy {
+ element.interfaces.map {
+ val element = MoreTypes.asTypeElement(it)
+ env.wrap<JavacType>(
+ typeMirror = it,
+ kotlinType = KotlinMetadataElement.createFor(element)?.kmType,
+ elementNullability = element.nullability
+ )
+ }
+ }
+
override val equalityItems: Array<out Any?> by lazy {
arrayOf(element)
}
diff --git a/room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspTypeElement.kt b/room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspTypeElement.kt
index 0ff48a5..7445985 100644
--- a/room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspTypeElement.kt
+++ b/room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspTypeElement.kt
@@ -89,6 +89,21 @@
}
}
+ override val superInterfaces by lazy {
+ declaration.superTypes.asSequence().map {
+ it.resolve()
+ }
+ .filter {
+ it.declaration is KSClassDeclaration &&
+ (it.declaration as KSClassDeclaration).classKind == ClassKind.INTERFACE
+ }.mapTo(mutableListOf()) {
+ env.wrap(
+ ksType = it,
+ allowPrimitives = false
+ )
+ }
+ }
+
override val className: ClassName by lazy {
declaration.typeName(env.resolver).tryBox().also { typeName ->
check(typeName is ClassName) {
diff --git a/room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XTypeElementTest.kt b/room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XTypeElementTest.kt
index 6c82781..6793e2e8 100644
--- a/room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XTypeElementTest.kt
+++ b/room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XTypeElementTest.kt
@@ -160,6 +160,30 @@
}
@Test
+ fun superInterfaces() {
+ val src = Source.kotlin(
+ "foo.kt",
+ """
+ package foo.bar;
+ class Baz : MyInterface<String>, AbstractClass() {
+ }
+ abstract class AbstractClass {}
+ interface MyInterface<E> {}
+ """.trimIndent()
+ )
+ runProcessorTest(sources = listOf(src)) { invocation ->
+ invocation.processingEnv.requireTypeElement("foo.bar.Baz").let {
+ assertThat(it.superInterfaces).hasSize(1)
+ val superInterface = it.superInterfaces.first {
+ type -> type.rawType.toString() == "foo.bar.MyInterface" }
+ assertThat(superInterface.typeArguments).hasSize(1)
+ assertThat(superInterface.typeArguments[0].typeName)
+ .isEqualTo(ClassName.get("java.lang", "String"))
+ }
+ }
+ }
+
+ @Test
fun nestedClassName() {
val src = Source.kotlin(
"Foo.kt",
diff --git a/settings.gradle b/settings.gradle
index abab84a..170b007 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -727,7 +727,6 @@
includeProject(":wear:watchface:watchface-complications", "wear/watchface/watchface-complications", [BuildType.MAIN, BuildType.WEAR])
includeProject(":wear:watchface:watchface-complications-permission-dialogs-sample", "wear/watchface/watchface-complications-permission-dialogs-sample", [BuildType.MAIN, BuildType.WEAR])
includeProject(":wear:watchface:watchface-complications-data", "wear/watchface/watchface-complications-data", [BuildType.MAIN, BuildType.WEAR])
-includeProject(":wear:watchface:watchface-complications-data-core", "wear/watchface/watchface-complications-data-core", [BuildType.MAIN, BuildType.WEAR])
includeProject(":wear:watchface:watchface-complications-data-source", "wear/watchface/watchface-complications-data-source", [BuildType.MAIN, BuildType.WEAR])
includeProject(":wear:watchface:watchface-complications-data-source-ktx", "wear/watchface/watchface-complications-data-source-ktx", [BuildType.MAIN, BuildType.WEAR])
includeProject(":wear:watchface:watchface-complications-data-source-samples", "wear/watchface/watchface-complications-data-source-samples", [BuildType.MAIN, BuildType.WEAR])
diff --git a/startup/startup-runtime/src/main/java/androidx/startup/AppInitializer.java b/startup/startup-runtime/src/main/java/androidx/startup/AppInitializer.java
index 7458146..1a85102 100644
--- a/startup/startup-runtime/src/main/java/androidx/startup/AppInitializer.java
+++ b/startup/startup-runtime/src/main/java/androidx/startup/AppInitializer.java
@@ -114,7 +114,7 @@
@NonNull
@SuppressWarnings("unused")
public <T> T initializeComponent(@NonNull Class<? extends Initializer<T>> component) {
- return doInitialize(component, new HashSet<Class<?>>());
+ return doInitialize(component);
}
/**
@@ -130,57 +130,68 @@
@NonNull
@SuppressWarnings({"unchecked", "TypeParameterUnusedInFormals"})
- <T> T doInitialize(
+ <T> T doInitialize(@NonNull Class<? extends Initializer<?>> component) {
+ Object result;
+ synchronized (sLock) {
+ result = mInitialized.get(component);
+ if (result == null) {
+ result = doInitialize(component, new HashSet<Class<?>>());
+ }
+ }
+ return (T) result;
+ }
+
+ @NonNull
+ @SuppressWarnings({"unchecked", "TypeParameterUnusedInFormals"})
+ private <T> T doInitialize(
@NonNull Class<? extends Initializer<?>> component,
@NonNull Set<Class<?>> initializing) {
- synchronized (sLock) {
- boolean isTracingEnabled = Trace.isEnabled();
- try {
- if (isTracingEnabled) {
- // Use the simpleName here because section names would get too big otherwise.
- Trace.beginSection(component.getSimpleName());
- }
- if (initializing.contains(component)) {
- String message = String.format(
- "Cannot initialize %s. Cycle detected.", component.getName()
- );
- throw new IllegalStateException(message);
- }
- Object result;
- if (!mInitialized.containsKey(component)) {
- initializing.add(component);
- try {
- Object instance = component.getDeclaredConstructor().newInstance();
- Initializer<?> initializer = (Initializer<?>) instance;
- List<Class<? extends Initializer<?>>> dependencies =
- initializer.dependencies();
+ boolean isTracingEnabled = Trace.isEnabled();
+ try {
+ if (isTracingEnabled) {
+ // Use the simpleName here because section names would get too big otherwise.
+ Trace.beginSection(component.getSimpleName());
+ }
+ if (initializing.contains(component)) {
+ String message = String.format(
+ "Cannot initialize %s. Cycle detected.", component.getName()
+ );
+ throw new IllegalStateException(message);
+ }
+ Object result;
+ if (!mInitialized.containsKey(component)) {
+ initializing.add(component);
+ try {
+ Object instance = component.getDeclaredConstructor().newInstance();
+ Initializer<?> initializer = (Initializer<?>) instance;
+ List<Class<? extends Initializer<?>>> dependencies =
+ initializer.dependencies();
- if (!dependencies.isEmpty()) {
- for (Class<? extends Initializer<?>> clazz : dependencies) {
- if (!mInitialized.containsKey(clazz)) {
- doInitialize(clazz, initializing);
- }
+ if (!dependencies.isEmpty()) {
+ for (Class<? extends Initializer<?>> clazz : dependencies) {
+ if (!mInitialized.containsKey(clazz)) {
+ doInitialize(clazz, initializing);
}
}
- if (StartupLogger.DEBUG) {
- StartupLogger.i(String.format("Initializing %s", component.getName()));
- }
- result = initializer.create(mContext);
- if (StartupLogger.DEBUG) {
- StartupLogger.i(String.format("Initialized %s", component.getName()));
- }
- initializing.remove(component);
- mInitialized.put(component, result);
- } catch (Throwable throwable) {
- throw new StartupException(throwable);
}
- } else {
- result = mInitialized.get(component);
+ if (StartupLogger.DEBUG) {
+ StartupLogger.i(String.format("Initializing %s", component.getName()));
+ }
+ result = initializer.create(mContext);
+ if (StartupLogger.DEBUG) {
+ StartupLogger.i(String.format("Initialized %s", component.getName()));
+ }
+ initializing.remove(component);
+ mInitialized.put(component, result);
+ } catch (Throwable throwable) {
+ throw new StartupException(throwable);
}
- return (T) result;
- } finally {
- Trace.endSection();
+ } else {
+ result = mInitialized.get(component);
}
+ return (T) result;
+ } finally {
+ Trace.endSection();
}
}
diff --git a/studiow b/studiow
index f8fe813..bef8db4 100755
--- a/studiow
+++ b/studiow
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
function usage() {
- echo "Usage: studiow [--clean] [--reinstall] [<project subset>]"
+ echo "Usage: studiow [--clean] [--reinstall] [--profile] <project subset>"
echo
echo "OPTIONS"
echo " --clean"
@@ -9,6 +9,8 @@
echo
echo " --reinstall"
echo " Remove and re-download Studio itself. Also implies --clean"
+ echo " --profile"
+ echo " Enables profiling of Studio"
echo
echo "Project subsets:"
echo " m, main"
@@ -38,6 +40,7 @@
clean=false
reinstall=false
projectSubset=""
+profile=false
while [ "$1" != "" ]; do
arg="$1"
shift
@@ -51,6 +54,10 @@
reinstall=true
continue
fi
+ if [ "$arg" == "--profile" ]; then
+ profile=true
+ continue
+ fi
# parse arguments
subsetArg="$arg"
newSubset=""
@@ -107,6 +114,19 @@
rm -rf studio
fi
+if [ "$profile" == "true" ]; then
+ PROFILE_FILE=/tmp/report.json
+ traceConfig="$(cd development/studio && pwd)/profile.config"
+ rm -f "$PROFILE_FILE"
+ echo "Profile file will be $PROFILE_FILE , which will be able to be loaded into chrome://tracing"
+ echo
+ echo "If you find that too many or too few function calls are included in the trace, modify $traceConfig"
+ echo
+ tracerJar="$(cd ../../prebuilts/androidx/external/com/android/tools/tracer/agent && pwd)/trace_agent.jar"
+ # Make sure to set _JAVA_OPTIONS before starting Gradle
+ export _JAVA_OPTIONS="$_JAVA_OPTIONS -javaagent:${tracerJar}=${traceConfig}"
+fi
+
if [ "$clean" == "true" ]; then
# remove studio-specific caches
@@ -116,9 +136,17 @@
remove ~/.android
# delete (without backup) files that users won't have customized
git clean -fdX .idea/
+
# remove gradle caches too and build
./cleanBuild.sh -y studio
else
+ # If not a clean launch, then a Gradle daemon might be running.
+ # If profiling, we need to stop the Gradle daemon to make sure any changes to the
+ # profiling properties will be used.
+ if [ "$profile" == "true" ]; then
+ ./gradlew --stop
+ fi
+
# ask gradle to launch studio
./gradlew :studio
fi
diff --git a/text/text/build.gradle b/text/text/build.gradle
index b1f32af..bdb9909 100644
--- a/text/text/build.gradle
+++ b/text/text/build.gradle
@@ -28,7 +28,7 @@
dependencies {
implementation(libs.kotlinStdlib)
- api "androidx.annotation:annotation:1.1.0"
+ api "androidx.annotation:annotation:1.2.0"
testImplementation(libs.testRules)
testImplementation(libs.testRunner)
diff --git a/text/text/src/main/java/androidx/compose/ui/text/android/StaticLayoutFactory.kt b/text/text/src/main/java/androidx/compose/ui/text/android/StaticLayoutFactory.kt
index 4d005e6..ef17dfb 100644
--- a/text/text/src/main/java/androidx/compose/ui/text/android/StaticLayoutFactory.kt
+++ b/text/text/src/main/java/androidx/compose/ui/text/android/StaticLayoutFactory.kt
@@ -23,6 +23,7 @@
import android.text.TextPaint
import android.text.TextUtils.TruncateAt
import android.util.Log
+import androidx.annotation.DoNotInline
import androidx.annotation.FloatRange
import androidx.annotation.IntRange
import androidx.annotation.RequiresApi
@@ -132,12 +133,15 @@
}
private interface StaticLayoutFactoryImpl {
+
+ @DoNotInline // API level specific, do not inline to prevent ART class verification breakages
fun create(params: StaticLayoutParams): StaticLayout
}
@RequiresApi(23)
private class StaticLayoutFactory23 : StaticLayoutFactoryImpl {
+ @DoNotInline
override fun create(params: StaticLayoutParams): StaticLayout {
return Builder.obtain(params.text, params.start, params.end, params.paint, params.width)
.apply {
@@ -166,6 +170,7 @@
@RequiresApi(26)
private object StaticLayoutFactory26 {
+ @DoNotInline
fun setJustificationMode(builder: Builder, justificationMode: Int) {
builder.setJustificationMode(justificationMode)
}
@@ -173,6 +178,7 @@
@RequiresApi(28)
private object StaticLayoutFactory28 {
+ @DoNotInline
fun setUseLineSpacingFromFallbacks(builder: Builder, useFallbackLineSpacing: Boolean) {
builder.setUseLineSpacingFromFallbacks(useFallbackLineSpacing)
}
@@ -213,6 +219,7 @@
}
}
+ @DoNotInline
override fun create(params: StaticLayoutParams): StaticLayout {
// On API 21 to 23, try to call the StaticLayoutConstructor which supports the
// textDir and maxLines.
diff --git a/transition/transition/src/androidTest/java/androidx/transition/GhostViewTest.java b/transition/transition/src/androidTest/java/androidx/transition/GhostViewTest.java
index 40ac8f1..ad28031 100644
--- a/transition/transition/src/androidTest/java/androidx/transition/GhostViewTest.java
+++ b/transition/transition/src/androidTest/java/androidx/transition/GhostViewTest.java
@@ -324,6 +324,7 @@
int height = view.getHeight();
final Bitmap dest = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
final CountDownLatch latch = new CountDownLatch(1);
+ int[] pixelCopyResult = new int[1];
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
int[] offset = new int[2];
view.getLocationInWindow(offset);
@@ -333,7 +334,7 @@
new PixelCopy.OnPixelCopyFinishedListener() {
@Override
public void onPixelCopyFinished(int copyResult) {
- assertEquals(PixelCopy.SUCCESS, copyResult);
+ pixelCopyResult[0] = copyResult;
latch.countDown();
}
@@ -345,11 +346,13 @@
@Override
public void run() {
view.draw(new Canvas(dest));
+ pixelCopyResult[0] = PixelCopy.SUCCESS;
latch.countDown();
}
});
}
assertTrue(latch.await(1, TimeUnit.SECONDS));
+ assertEquals(PixelCopy.SUCCESS, pixelCopyResult[0]);
return dest;
}
diff --git a/wear/compose/compose-material/src/commonMain/kotlin/androidx/wear/compose/material/ScalingLazyColumn.kt b/wear/compose/compose-material/src/commonMain/kotlin/androidx/wear/compose/material/ScalingLazyColumn.kt
index 2baa159..fc3ff02 100644
--- a/wear/compose/compose-material/src/commonMain/kotlin/androidx/wear/compose/material/ScalingLazyColumn.kt
+++ b/wear/compose/compose-material/src/commonMain/kotlin/androidx/wear/compose/material/ScalingLazyColumn.kt
@@ -236,6 +236,7 @@
* of them to fill the whole minimum size
* @param horizontalAlignment the horizontal alignment applied to the items
* @param contentPadding The padding to apply around the contents
+ * @param anchorType How to anchor list items to the center-line of the viewport
* @param state The state of the component
*/
@Composable
diff --git a/wear/watchface/watchface-complications-data-core/api/public_plus_experimental_current.txt b/wear/watchface/watchface-complications-data-core/api/public_plus_experimental_current.txt
deleted file mode 100644
index e6f50d0..0000000
--- a/wear/watchface/watchface-complications-data-core/api/public_plus_experimental_current.txt
+++ /dev/null
@@ -1 +0,0 @@
-// Signature format: 4.0
diff --git a/wear/watchface/watchface-complications-data-core/api/restricted_current.txt b/wear/watchface/watchface-complications-data-core/api/restricted_current.txt
deleted file mode 100644
index e6f50d0..0000000
--- a/wear/watchface/watchface-complications-data-core/api/restricted_current.txt
+++ /dev/null
@@ -1 +0,0 @@
-// Signature format: 4.0
diff --git a/wear/watchface/watchface-complications-data-core/build.gradle b/wear/watchface/watchface-complications-data-core/build.gradle
deleted file mode 100644
index 61d63ff..0000000
--- a/wear/watchface/watchface-complications-data-core/build.gradle
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import androidx.build.LibraryGroups
-import androidx.build.Publish
-
-plugins {
- id("AndroidXPlugin")
- id("com.android.library")
- id("org.jetbrains.kotlin.android")
-}
-
-dependencies {
- api("androidx.annotation:annotation:1.1.0")
- implementation("androidx.core:core:1.1.0")
- implementation("androidx.preference:preference:1.1.0")
- implementation("androidx.annotation:annotation:1.2.0")
-
- constraints {
- implementation(project(":wear:watchface:watchface-complications-data"))
- }
-
- testImplementation(libs.kotlinStdlib)
- testImplementation(libs.kotlinCoroutinesAndroid)
- testImplementation(libs.testCore)
- testImplementation(libs.testRunner)
- testImplementation(libs.testRules)
- testImplementation(libs.robolectric)
- testImplementation(libs.mockitoCore)
- testImplementation(libs.truth)
- testImplementation(libs.junit)
-}
-
-android {
- buildFeatures {
- aidl = true
- }
- defaultConfig {
- minSdkVersion 26
- }
- buildTypes.all {
- consumerProguardFiles "proguard-rules.pro"
- }
-
- // Use Robolectric 4.+
- testOptions.unitTests.includeAndroidResources = true
-}
-
-androidx {
- name = "Android Wear Complications Data Internal"
- publish = Publish.SNAPSHOT_AND_RELEASE
- mavenGroup = LibraryGroups.WEAR_WATCHFACE
- inceptionYear = "2021"
- description = "Android Wear Complications Data Internal"
-}
diff --git a/wear/watchface/watchface-complications-data-core/src/main/AndroidManifest.xml b/wear/watchface/watchface-complications-data-core/src/main/AndroidManifest.xml
deleted file mode 100644
index 5b067ac..0000000
--- a/wear/watchface/watchface-complications-data-core/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright 2021 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="androidx.wear.watchface.complications.data.internal">
- <application>
- <uses-library android:name="com.google.android.wearable" android:required="false" />
- </application>
-</manifest>
diff --git a/wear/watchface/watchface-complications-data-core/src/test/java/android/support/wearable/complications/SharedRobolectricTestRunner.kt b/wear/watchface/watchface-complications-data-core/src/test/java/android/support/wearable/complications/SharedRobolectricTestRunner.kt
deleted file mode 100644
index 17a5ffd..0000000
--- a/wear/watchface/watchface-complications-data-core/src/test/java/android/support/wearable/complications/SharedRobolectricTestRunner.kt
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.support.wearable.complications
-
-import org.junit.runners.model.FrameworkMethod
-import org.robolectric.RobolectricTestRunner
-import org.robolectric.internal.bytecode.InstrumentationConfiguration
-
-/** A test runner for all tests within this package. */
-public class SharedRobolectricTestRunner(private val testClass: Class<*>) :
- RobolectricTestRunner(testClass) {
-
- override fun createClassLoaderConfig(method: FrameworkMethod?): InstrumentationConfiguration =
- InstrumentationConfiguration.Builder(super.createClassLoaderConfig(method)).apply {
- doNotInstrumentPackage("androidx.wear")
- doNotInstrumentPackage("android.support.wearable")
- }.build()
-}
diff --git a/wear/watchface/watchface-complications-data-core/src/test/resources/robolectric.properties b/wear/watchface/watchface-complications-data-core/src/test/resources/robolectric.properties
deleted file mode 100644
index ce87047..0000000
--- a/wear/watchface/watchface-complications-data-core/src/test/resources/robolectric.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-# Robolectric currently doesn't support API 30, so we have to explicitly specify 29 as the target
-# sdk for now. Remove when no longer necessary.
-sdk=29
diff --git a/wear/watchface/watchface-complications-data-source/src/main/java/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService.kt b/wear/watchface/watchface-complications-data-source/src/main/java/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService.kt
index a246b2c..c4c9ae4 100644
--- a/wear/watchface/watchface-complications-data-source/src/main/java/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService.kt
+++ b/wear/watchface/watchface-complications-data-source/src/main/java/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService.kt
@@ -102,7 +102,7 @@
* ```
* <meta-data android:name=
* "androidx.wear.watchface.complications.data.source.SYNCHRONOUS_UPDATE_PERIOD_MILLISECONDS"
- * android:value="1"/>
+ * android:value="1000"/>
* ```
*
* - A ComplicationDataSourceService can include a `meta-data` tag with
@@ -243,12 +243,12 @@
/**
* If a metadata key with [METADATA_KEY_SYNCHRONOUS_UPDATE_PERIOD_MILLISECONDS] is present in
- * the manifest, then onStartInteractiveComplication will be called when the watch face is
- * visible and non-ambient. A series of [onSynchronousComplicationRequest]s will follow, ending
- * with a call to [onStopSynchronousComplicationRequests].
+ * the manifest, then [onStartSynchronousComplicationRequests] will be called when the watch
+ * face is visible and non-ambient. A series of [onSynchronousComplicationRequest]s will follow,
+ * ending with a call to [onStopSynchronousComplicationRequests].
*
- * After onStopInteractiveComplication calls to [onComplicationRequest] will stop until the
- * watchface ceases to be visible and non-ambient.
+ * After [onStopSynchronousComplicationRequests] calls to [onSynchronousComplicationRequest]
+ * will stop until the watchface ceases to be visible and non-ambient.
*
* @param complicationInstanceId The system's ID for the complication. Note this ID is distinct
* from the complication slot used by the watch face itself.
@@ -259,12 +259,13 @@
/**
* If a metadata key with [METADATA_KEY_SYNCHRONOUS_UPDATE_PERIOD_MILLISECONDS] is present in the
- * manifest, then onStartInteractiveComplication will be called when the watch face ceases to be
- * visible and non-ambient. No subsequent calls to [onSynchronousComplicationRequest] will me
- * made unless the complication becomes visible and non-ambient again.
+ * manifest, then [onStartSynchronousComplicationRequests] will be called when the watch face
+ * ceases to be visible and non-ambient. No subsequent calls to
+ * [onSynchronousComplicationRequest] will be made unless the complication becomes visible and
+ * non-ambient again.
*
- * After onStopInteractiveComplication calls to [onComplicationRequest] may resume (depending on
- * the value of METADATA_KEY_UPDATE_PERIOD_SECONDS).
+ * After [onStopSynchronousComplicationRequests] calls to [onComplicationRequest] may resume
+ * (depending on the value of [METADATA_KEY_UPDATE_PERIOD_SECONDS]).
*
* @param complicationInstanceId The system's ID for the complication. Note this ID is distinct
* from the complication slot used by the watch face itself.
@@ -534,8 +535,8 @@
* [onSynchronousComplicationRequest]s when the watch face is visible and non-ambient.
*
* A ComplicationDataSourceService should include a `meta-data` tag with this name in its
- * manifest entry. The value of this tag is the number of seconds the complication data
- * source would like to elapse between [onSynchronousComplicationRequest]s requests.
+ * manifest entry. The value of this tag is the number of milliseconds the complication
+ * data source would like to elapse between [onSynchronousComplicationRequest]s requests.
*
* Note that update requests are not guaranteed to be sent with this frequency and a lower
* limit exists (initially 1 second).
diff --git a/wear/watchface/watchface-complications-data/build.gradle b/wear/watchface/watchface-complications-data/build.gradle
index 5219517..29be48a 100644
--- a/wear/watchface/watchface-complications-data/build.gradle
+++ b/wear/watchface/watchface-complications-data/build.gradle
@@ -14,7 +14,10 @@
* limitations under the License.
*/
+import androidx.build.RunApiTasks
+
import androidx.build.LibraryGroups
+import androidx.build.LibraryVersions
import androidx.build.Publish
plugins {
@@ -27,7 +30,6 @@
api("androidx.annotation:annotation:1.1.0")
api(libs.kotlinStdlib)
api(libs.kotlinCoroutinesAndroid)
- api(project(":wear:watchface:watchface-complications-data-core"))
implementation("androidx.core:core:1.1.0")
implementation("androidx.preference:preference:1.1.0")
implementation("androidx.annotation:annotation:1.2.0")
@@ -41,9 +43,15 @@
}
android {
+ buildFeatures {
+ aidl = true
+ }
defaultConfig {
minSdkVersion 26
}
+ buildTypes.all {
+ consumerProguardFiles "proguard-rules.pro"
+ }
// Use Robolectric 4.+
testOptions.unitTests.includeAndroidResources = true
diff --git a/wear/watchface/watchface-complications-data-core/lint-baseline.xml b/wear/watchface/watchface-complications-data/lint-baseline.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/lint-baseline.xml
rename to wear/watchface/watchface-complications-data/lint-baseline.xml
diff --git a/wear/watchface/watchface-complications-data-core/proguard-rules.pro b/wear/watchface/watchface-complications-data/proguard-rules.pro
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/proguard-rules.pro
rename to wear/watchface/watchface-complications-data/proguard-rules.pro
diff --git a/wear/watchface/watchface-complications-data-core/src/main/aidl/android/support/wearable/complications/ComplicationData.aidl b/wear/watchface/watchface-complications-data/src/main/aidl/android/support/wearable/complications/ComplicationData.aidl
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/aidl/android/support/wearable/complications/ComplicationData.aidl
rename to wear/watchface/watchface-complications-data/src/main/aidl/android/support/wearable/complications/ComplicationData.aidl
diff --git a/wear/watchface/watchface-complications-data-core/src/main/aidl/android/support/wearable/complications/ComplicationProviderInfo.aidl b/wear/watchface/watchface-complications-data/src/main/aidl/android/support/wearable/complications/ComplicationProviderInfo.aidl
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/aidl/android/support/wearable/complications/ComplicationProviderInfo.aidl
rename to wear/watchface/watchface-complications-data/src/main/aidl/android/support/wearable/complications/ComplicationProviderInfo.aidl
diff --git a/wear/watchface/watchface-complications-data-core/src/main/aidl/android/support/wearable/complications/IComplicationManager.aidl b/wear/watchface/watchface-complications-data/src/main/aidl/android/support/wearable/complications/IComplicationManager.aidl
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/aidl/android/support/wearable/complications/IComplicationManager.aidl
rename to wear/watchface/watchface-complications-data/src/main/aidl/android/support/wearable/complications/IComplicationManager.aidl
diff --git a/wear/watchface/watchface-complications-data-core/src/main/aidl/android/support/wearable/complications/IComplicationProvider.aidl b/wear/watchface/watchface-complications-data/src/main/aidl/android/support/wearable/complications/IComplicationProvider.aidl
similarity index 97%
rename from wear/watchface/watchface-complications-data-core/src/main/aidl/android/support/wearable/complications/IComplicationProvider.aidl
rename to wear/watchface/watchface-complications-data/src/main/aidl/android/support/wearable/complications/IComplicationProvider.aidl
index ac51161..e496132 100644
--- a/wear/watchface/watchface-complications-data-core/src/main/aidl/android/support/wearable/complications/IComplicationProvider.aidl
+++ b/wear/watchface/watchface-complications-data/src/main/aidl/android/support/wearable/complications/IComplicationProvider.aidl
@@ -86,7 +86,7 @@
/**
* If a metadata key with
- * androidx.wear.watchface.complications.data.source.SYNCHRONOUS_UPDATE_PERIOD_MILLISECOND is
+ * androidx.wear.watchface.complications.data.source.SYNCHRONOUS_UPDATE_PERIOD_MILLISECONDS is
* present in the manifest, and the watch face becomes visible and non-ambient then
* onStartSynchronousComplicationRequests will be called. A series of calls to
* onSynchronousComplicationRequest will follow, ending with a call to
@@ -103,9 +103,9 @@
/**
* If a metadata key with
- * androidx.wear.watchface.complications.data.source.SYNCHRONOUS_UPDATE_PERIOD_MILLISECOND is
+ * androidx.wear.watchface.complications.data.source.SYNCHRONOUS_UPDATE_PERIOD_MILLISECONDS is
* present in the manifest, when the watch face ceases to be visible and non ambient
- * onStopInteractiveComplication will be called. After this no subsequent calls to
+ * onStopSynchronousComplicationRequests will be called. After this no subsequent calls to
* onSynchronousComplicationRequest will me made unless the watch face becomes visible and non
* ambient again. However calls to onComplicationRequest may resume (depending on
* the value of METADATA_KEY_UPDATE_PERIOD_SECONDS).
diff --git a/wear/watchface/watchface-complications-data-core/src/main/aidl/android/support/wearable/complications/IPreviewComplicationDataCallback.aidl b/wear/watchface/watchface-complications-data/src/main/aidl/android/support/wearable/complications/IPreviewComplicationDataCallback.aidl
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/aidl/android/support/wearable/complications/IPreviewComplicationDataCallback.aidl
rename to wear/watchface/watchface-complications-data/src/main/aidl/android/support/wearable/complications/IPreviewComplicationDataCallback.aidl
diff --git a/wear/watchface/watchface-complications-data-core/src/main/aidl/android/support/wearable/complications/IProviderInfoService.aidl b/wear/watchface/watchface-complications-data/src/main/aidl/android/support/wearable/complications/IProviderInfoService.aidl
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/aidl/android/support/wearable/complications/IProviderInfoService.aidl
rename to wear/watchface/watchface-complications-data/src/main/aidl/android/support/wearable/complications/IProviderInfoService.aidl
diff --git a/wear/watchface/watchface-complications-data-core/src/main/java/android/support/wearable/complications/CharSequenceSerializableHelper.java b/wear/watchface/watchface-complications-data/src/main/java/android/support/wearable/complications/CharSequenceSerializableHelper.java
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/java/android/support/wearable/complications/CharSequenceSerializableHelper.java
rename to wear/watchface/watchface-complications-data/src/main/java/android/support/wearable/complications/CharSequenceSerializableHelper.java
diff --git a/wear/watchface/watchface-complications-data-core/src/main/java/android/support/wearable/complications/ComplicationData.java b/wear/watchface/watchface-complications-data/src/main/java/android/support/wearable/complications/ComplicationData.java
similarity index 99%
rename from wear/watchface/watchface-complications-data-core/src/main/java/android/support/wearable/complications/ComplicationData.java
rename to wear/watchface/watchface-complications-data/src/main/java/android/support/wearable/complications/ComplicationData.java
index 226d0f1..d2898eb 100644
--- a/wear/watchface/watchface-complications-data-core/src/main/java/android/support/wearable/complications/ComplicationData.java
+++ b/wear/watchface/watchface-complications-data/src/main/java/android/support/wearable/complications/ComplicationData.java
@@ -673,12 +673,9 @@
if (timelineEntries == null) {
mFields.remove(FIELD_TIMELINE_ENTRIES);
} else {
- Parcelable[] array = new Parcelable[timelineEntries.size()];
- int index = 0;
- for (ComplicationData timelineEntry : timelineEntries) {
- array[index++] = timelineEntry.mFields;
- }
- mFields.putParcelableArray(FIELD_TIMELINE_ENTRIES, array);
+ mFields.putParcelableArray(
+ FIELD_TIMELINE_ENTRIES,
+ timelineEntries.stream().map(e-> e.mFields).toArray(Parcelable[]::new));
}
}
diff --git a/wear/watchface/watchface-complications-data-core/src/main/java/android/support/wearable/complications/ComplicationProviderInfo.java b/wear/watchface/watchface-complications-data/src/main/java/android/support/wearable/complications/ComplicationProviderInfo.java
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/java/android/support/wearable/complications/ComplicationProviderInfo.java
rename to wear/watchface/watchface-complications-data/src/main/java/android/support/wearable/complications/ComplicationProviderInfo.java
diff --git a/wear/watchface/watchface-complications-data-core/src/main/java/android/support/wearable/complications/ComplicationText.java b/wear/watchface/watchface-complications-data/src/main/java/android/support/wearable/complications/ComplicationText.java
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/java/android/support/wearable/complications/ComplicationText.java
rename to wear/watchface/watchface-complications-data/src/main/java/android/support/wearable/complications/ComplicationText.java
diff --git a/wear/watchface/watchface-complications-data-core/src/main/java/android/support/wearable/complications/ComplicationTextTemplate.java b/wear/watchface/watchface-complications-data/src/main/java/android/support/wearable/complications/ComplicationTextTemplate.java
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/java/android/support/wearable/complications/ComplicationTextTemplate.java
rename to wear/watchface/watchface-complications-data/src/main/java/android/support/wearable/complications/ComplicationTextTemplate.java
diff --git a/wear/watchface/watchface-complications-data-core/src/main/java/android/support/wearable/complications/IconSerializableHelper.java b/wear/watchface/watchface-complications-data/src/main/java/android/support/wearable/complications/IconSerializableHelper.java
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/java/android/support/wearable/complications/IconSerializableHelper.java
rename to wear/watchface/watchface-complications-data/src/main/java/android/support/wearable/complications/IconSerializableHelper.java
diff --git a/wear/watchface/watchface-complications-data-core/src/main/java/android/support/wearable/complications/TimeDependentText.java b/wear/watchface/watchface-complications-data/src/main/java/android/support/wearable/complications/TimeDependentText.java
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/java/android/support/wearable/complications/TimeDependentText.java
rename to wear/watchface/watchface-complications-data/src/main/java/android/support/wearable/complications/TimeDependentText.java
diff --git a/wear/watchface/watchface-complications-data-core/src/main/java/android/support/wearable/complications/TimeDifferenceText.java b/wear/watchface/watchface-complications-data/src/main/java/android/support/wearable/complications/TimeDifferenceText.java
similarity index 99%
rename from wear/watchface/watchface-complications-data-core/src/main/java/android/support/wearable/complications/TimeDifferenceText.java
rename to wear/watchface/watchface-complications-data/src/main/java/android/support/wearable/complications/TimeDifferenceText.java
index ba7122b..60d5669 100644
--- a/wear/watchface/watchface-complications-data-core/src/main/java/android/support/wearable/complications/TimeDifferenceText.java
+++ b/wear/watchface/watchface-complications-data/src/main/java/android/support/wearable/complications/TimeDifferenceText.java
@@ -23,7 +23,7 @@
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RestrictTo;
-import androidx.wear.watchface.complications.data.internal.R;
+import androidx.wear.watchface.complications.data.R;
import java.io.InvalidObjectException;
import java.io.ObjectInputStream;
diff --git a/wear/watchface/watchface-complications-data-core/src/main/java/android/support/wearable/complications/TimeFormatText.java b/wear/watchface/watchface-complications-data/src/main/java/android/support/wearable/complications/TimeFormatText.java
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/java/android/support/wearable/complications/TimeFormatText.java
rename to wear/watchface/watchface-complications-data/src/main/java/android/support/wearable/complications/TimeFormatText.java
diff --git a/wear/watchface/watchface-complications-data-core/src/main/java/android/support/wearable/complications/package-info.java b/wear/watchface/watchface-complications-data/src/main/java/android/support/wearable/complications/package-info.java
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/java/android/support/wearable/complications/package-info.java
rename to wear/watchface/watchface-complications-data/src/main/java/android/support/wearable/complications/package-info.java
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-af/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-af/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-af/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-af/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-am/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-am/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-am/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-am/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-ar/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-ar/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-ar/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-ar/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-as/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-as/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-as/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-as/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-az/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-az/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-az/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-az/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-b+sr+Latn/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-b+sr+Latn/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-b+sr+Latn/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-b+sr+Latn/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-be/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-be/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-be/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-be/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-bg/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-bg/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-bg/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-bg/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-bn/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-bn/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-bn/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-bn/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-bs/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-bs/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-bs/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-bs/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-ca/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-ca/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-ca/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-ca/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-cs/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-cs/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-cs/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-cs/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-da/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-da/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-da/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-da/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-de/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-de/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-de/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-de/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-el/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-el/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-el/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-el/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-en-rAU/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-en-rAU/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-en-rAU/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-en-rAU/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-en-rCA/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-en-rCA/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-en-rCA/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-en-rCA/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-en-rGB/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-en-rGB/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-en-rGB/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-en-rGB/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-en-rIN/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-en-rIN/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-en-rIN/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-en-rIN/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-en-rXC/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-en-rXC/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-en-rXC/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-en-rXC/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-es-rUS/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-es-rUS/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-es-rUS/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-es-rUS/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-es/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-es/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-es/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-es/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-et/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-et/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-et/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-et/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-eu/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-eu/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-eu/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-eu/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-fa/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-fa/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-fa/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-fa/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-fi/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-fi/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-fi/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-fi/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-fr-rCA/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-fr-rCA/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-fr-rCA/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-fr-rCA/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-fr/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-fr/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-fr/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-fr/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-gl/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-gl/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-gl/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-gl/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-gu/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-gu/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-gu/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-gu/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-hi/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-hi/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-hi/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-hi/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-hr/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-hr/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-hr/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-hr/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-hu/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-hu/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-hu/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-hu/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-hy/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-hy/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-hy/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-hy/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-in/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-in/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-in/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-in/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-is/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-is/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-is/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-is/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-it/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-it/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-it/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-it/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-iw/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-iw/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-iw/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-iw/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-ja/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-ja/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-ja/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-ja/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-ka/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-ka/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-ka/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-ka/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-kk/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-kk/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-kk/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-kk/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-km/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-km/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-km/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-km/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-kn/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-kn/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-kn/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-kn/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-ko/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-ko/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-ko/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-ko/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-ky/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-ky/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-ky/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-ky/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-lo/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-lo/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-lo/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-lo/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-lt/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-lt/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-lt/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-lt/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-lv/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-lv/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-lv/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-lv/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-mk/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-mk/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-mk/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-mk/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-ml/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-ml/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-ml/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-ml/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-mn/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-mn/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-mn/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-mn/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-mr/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-mr/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-mr/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-mr/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-ms/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-ms/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-ms/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-ms/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-my/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-my/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-my/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-my/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-nb/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-nb/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-nb/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-nb/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-ne/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-ne/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-ne/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-ne/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-nl/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-nl/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-nl/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-nl/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-or/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-or/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-or/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-or/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-pa/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-pa/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-pa/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-pa/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-pl/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-pl/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-pl/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-pl/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-pt-rBR/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-pt-rBR/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-pt-rBR/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-pt-rBR/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-pt-rPT/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-pt-rPT/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-pt-rPT/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-pt-rPT/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-pt/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-pt/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-pt/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-pt/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-ro/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-ro/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-ro/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-ro/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-ru/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-ru/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-ru/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-ru/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-si/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-si/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-si/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-si/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-sk/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-sk/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-sk/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-sk/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-sl/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-sl/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-sl/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-sl/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-sq/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-sq/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-sq/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-sq/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-sr/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-sr/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-sr/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-sr/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-sv/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-sv/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-sv/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-sv/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-sw/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-sw/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-sw/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-sw/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-ta/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-ta/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-ta/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-ta/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-te/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-te/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-te/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-te/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-th/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-th/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-th/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-th/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-tl/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-tl/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-tl/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-tl/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-tr/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-tr/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-tr/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-tr/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-uk/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-uk/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-uk/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-uk/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-ur/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-ur/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-ur/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-ur/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-uz/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-uz/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-uz/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-uz/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-vi/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-vi/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-vi/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-vi/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-zh-rCN/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-zh-rCN/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-zh-rCN/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-zh-rCN/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-zh-rHK/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-zh-rHK/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-zh-rHK/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-zh-rHK/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-zh-rTW/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-zh-rTW/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-zh-rTW/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-zh-rTW/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values-zu/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values-zu/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values-zu/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values-zu/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/main/res/values/complication_strings.xml b/wear/watchface/watchface-complications-data/src/main/res/values/complication_strings.xml
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/main/res/values/complication_strings.xml
rename to wear/watchface/watchface-complications-data/src/main/res/values/complication_strings.xml
diff --git a/wear/watchface/watchface-complications-data-core/src/test/java/android/support/wearable/complications/ComplicationDataTest.kt b/wear/watchface/watchface-complications-data/src/test/java/android/support/wearable/complications/ComplicationDataTest.kt
similarity index 99%
rename from wear/watchface/watchface-complications-data-core/src/test/java/android/support/wearable/complications/ComplicationDataTest.kt
rename to wear/watchface/watchface-complications-data/src/test/java/android/support/wearable/complications/ComplicationDataTest.kt
index 85a9927..dce3876 100644
--- a/wear/watchface/watchface-complications-data-core/src/test/java/android/support/wearable/complications/ComplicationDataTest.kt
+++ b/wear/watchface/watchface-complications-data/src/test/java/android/support/wearable/complications/ComplicationDataTest.kt
@@ -23,6 +23,7 @@
import android.support.wearable.complications.ComplicationText.TimeDifferenceBuilder
import android.support.wearable.complications.ComplicationText.TimeFormatBuilder
import androidx.test.core.app.ApplicationProvider
+import androidx.wear.watchface.complications.data.SharedRobolectricTestRunner
import com.google.common.truth.Truth
import org.junit.Assert
import org.junit.Assert.assertThrows
diff --git a/wear/watchface/watchface-complications-data-core/src/test/java/android/support/wearable/complications/ComplicationTextTemplateTest.kt b/wear/watchface/watchface-complications-data/src/test/java/android/support/wearable/complications/ComplicationTextTemplateTest.kt
similarity index 98%
rename from wear/watchface/watchface-complications-data-core/src/test/java/android/support/wearable/complications/ComplicationTextTemplateTest.kt
rename to wear/watchface/watchface-complications-data/src/test/java/android/support/wearable/complications/ComplicationTextTemplateTest.kt
index 9853608..1ceb670 100644
--- a/wear/watchface/watchface-complications-data-core/src/test/java/android/support/wearable/complications/ComplicationTextTemplateTest.kt
+++ b/wear/watchface/watchface-complications-data/src/test/java/android/support/wearable/complications/ComplicationTextTemplateTest.kt
@@ -20,6 +20,7 @@
import android.support.wearable.complications.ComplicationText.TimeDifferenceBuilder
import android.support.wearable.complications.ComplicationText.TimeFormatBuilder
import androidx.test.core.app.ApplicationProvider
+import androidx.wear.watchface.complications.data.SharedRobolectricTestRunner
import com.google.common.truth.Truth
import org.junit.Assert
import org.junit.Test
diff --git a/wear/watchface/watchface-complications-data-core/src/test/java/android/support/wearable/complications/ComplicationTextTest.kt b/wear/watchface/watchface-complications-data/src/test/java/android/support/wearable/complications/ComplicationTextTest.kt
similarity index 99%
rename from wear/watchface/watchface-complications-data-core/src/test/java/android/support/wearable/complications/ComplicationTextTest.kt
rename to wear/watchface/watchface-complications-data/src/test/java/android/support/wearable/complications/ComplicationTextTest.kt
index 4e662a5..2a85fef 100644
--- a/wear/watchface/watchface-complications-data-core/src/test/java/android/support/wearable/complications/ComplicationTextTest.kt
+++ b/wear/watchface/watchface-complications-data/src/test/java/android/support/wearable/complications/ComplicationTextTest.kt
@@ -21,6 +21,7 @@
import android.support.wearable.complications.ComplicationText.TimeDifferenceBuilder
import android.support.wearable.complications.ComplicationText.TimeFormatBuilder
import androidx.test.core.app.ApplicationProvider
+import androidx.wear.watchface.complications.data.SharedRobolectricTestRunner
import com.google.common.truth.Truth
import org.junit.Assert
import org.junit.Test
diff --git a/wear/watchface/watchface-complications-data-core/src/test/java/android/support/wearable/complications/Parcelables.kt b/wear/watchface/watchface-complications-data/src/test/java/android/support/wearable/complications/Parcelables.kt
similarity index 100%
rename from wear/watchface/watchface-complications-data-core/src/test/java/android/support/wearable/complications/Parcelables.kt
rename to wear/watchface/watchface-complications-data/src/test/java/android/support/wearable/complications/Parcelables.kt
diff --git a/wear/watchface/watchface-complications-data-core/src/test/java/android/support/wearable/complications/TimeDifferenceTextTest.kt b/wear/watchface/watchface-complications-data/src/test/java/android/support/wearable/complications/TimeDifferenceTextTest.kt
similarity index 99%
rename from wear/watchface/watchface-complications-data-core/src/test/java/android/support/wearable/complications/TimeDifferenceTextTest.kt
rename to wear/watchface/watchface-complications-data/src/test/java/android/support/wearable/complications/TimeDifferenceTextTest.kt
index fae2cc6..ef1d1a0 100644
--- a/wear/watchface/watchface-complications-data-core/src/test/java/android/support/wearable/complications/TimeDifferenceTextTest.kt
+++ b/wear/watchface/watchface-complications-data/src/test/java/android/support/wearable/complications/TimeDifferenceTextTest.kt
@@ -18,6 +18,7 @@
import android.content.Context
import androidx.test.core.app.ApplicationProvider
+import androidx.wear.watchface.complications.data.SharedRobolectricTestRunner
import com.google.common.truth.Truth
import org.junit.Assert
import org.junit.Test
diff --git a/wear/watchface/watchface-complications-data-core/src/test/java/android/support/wearable/complications/TimeFormatTextTest.kt b/wear/watchface/watchface-complications-data/src/test/java/android/support/wearable/complications/TimeFormatTextTest.kt
similarity index 99%
rename from wear/watchface/watchface-complications-data-core/src/test/java/android/support/wearable/complications/TimeFormatTextTest.kt
rename to wear/watchface/watchface-complications-data/src/test/java/android/support/wearable/complications/TimeFormatTextTest.kt
index cc83239..16ec776 100644
--- a/wear/watchface/watchface-complications-data-core/src/test/java/android/support/wearable/complications/TimeFormatTextTest.kt
+++ b/wear/watchface/watchface-complications-data/src/test/java/android/support/wearable/complications/TimeFormatTextTest.kt
@@ -18,6 +18,7 @@
import android.content.Context
import androidx.test.core.app.ApplicationProvider
+import androidx.wear.watchface.complications.data.SharedRobolectricTestRunner
import com.google.common.truth.Truth
import org.junit.Assert
import org.junit.Test
diff --git a/webkit/integration-tests/testapp/src/androidTest/java/com/example/androidx/webkit/AssetLoaderAjaxActivityTestAppTest.java b/webkit/integration-tests/testapp/src/androidTest/java/com/example/androidx/webkit/AssetLoaderAjaxActivityTestAppTest.java
index 8456ede..e472760 100644
--- a/webkit/integration-tests/testapp/src/androidTest/java/com/example/androidx/webkit/AssetLoaderAjaxActivityTestAppTest.java
+++ b/webkit/integration-tests/testapp/src/androidTest/java/com/example/androidx/webkit/AssetLoaderAjaxActivityTestAppTest.java
@@ -53,6 +53,7 @@
@Test
public void testAssetLoaderAjaxActivity() {
+ mRule.getScenario().onActivity(activity -> activity.loadUrl());
WebkitTestHelpers.assertHtmlElementContainsText(R.id.webview_asset_loader_webview,
"title", "Loaded HTML should appear below on success");
WebkitTestHelpers.assertHtmlElementContainsText(R.id.webview_asset_loader_webview,
diff --git a/webkit/integration-tests/testapp/src/main/java/com/example/androidx/webkit/AssetLoaderAjaxActivity.java b/webkit/integration-tests/testapp/src/main/java/com/example/androidx/webkit/AssetLoaderAjaxActivity.java
index eaab40e..07174269 100644
--- a/webkit/integration-tests/testapp/src/main/java/com/example/androidx/webkit/AssetLoaderAjaxActivity.java
+++ b/webkit/integration-tests/testapp/src/main/java/com/example/androidx/webkit/AssetLoaderAjaxActivity.java
@@ -111,15 +111,19 @@
// if your app is not using file:// or content:// URLs.
webViewSettings.setAllowFileAccess(false);
webViewSettings.setAllowContentAccess(false);
+ }
- Uri path = new Uri.Builder()
+ /**
+ * Load the url https://example.com/androidx_webkit/example/assets/www/ajax_requests.html.
+ */
+ public void loadUrl() {
+ String mainPageUrl = new Uri.Builder()
.scheme("https")
.authority("example.com")
.appendPath("androidx_webkit").appendPath("example").appendPath("assets")
.appendPath("www").appendPath("ajax_requests.html")
- .build();
- // Load the url https://example.com/androidx_webkit/example/assets/www/ajax_requests.html
- mWebView.loadUrl(path.toString());
+ .build().toString();
+ mWebView.loadUrl(mainPageUrl);
}
/**
diff --git a/work/integration-tests/testapp/src/main/java/androidx/work/integration/testapp/ForegroundWorker.kt b/work/integration-tests/testapp/src/main/java/androidx/work/integration/testapp/ForegroundWorker.kt
index b1fbac3..ef01729 100644
--- a/work/integration-tests/testapp/src/main/java/androidx/work/integration/testapp/ForegroundWorker.kt
+++ b/work/integration-tests/testapp/src/main/java/androidx/work/integration/testapp/ForegroundWorker.kt
@@ -16,6 +16,7 @@
package androidx.work.integration.testapp
+import android.annotation.SuppressLint
import android.app.Notification
import android.app.NotificationChannel
import android.app.NotificationManager
@@ -83,6 +84,7 @@
}
@RequiresApi(Build.VERSION_CODES.O)
+ @SuppressLint("ClassVerificationFailure")
private fun createChannel() {
val id = applicationContext.getString(R.string.channel_id)
val name = applicationContext.getString(R.string.channel_name)
diff --git a/work/integration-tests/testapp/src/main/java/androidx/work/integration/testapp/RemoteWorker.kt b/work/integration-tests/testapp/src/main/java/androidx/work/integration/testapp/RemoteWorker.kt
index 3efd2fe..7694892 100644
--- a/work/integration-tests/testapp/src/main/java/androidx/work/integration/testapp/RemoteWorker.kt
+++ b/work/integration-tests/testapp/src/main/java/androidx/work/integration/testapp/RemoteWorker.kt
@@ -16,9 +16,18 @@
package androidx.work.integration.testapp
+import android.annotation.SuppressLint
+import android.app.Notification
+import android.app.NotificationChannel
+import android.app.NotificationManager
import android.content.Context
+import android.os.Build
import android.util.Log
+import androidx.annotation.RequiresApi
import androidx.concurrent.futures.CallbackToFutureAdapter
+import androidx.core.app.NotificationCompat
+import androidx.work.Data
+import androidx.work.ForegroundInfo
import androidx.work.WorkerParameters
import androidx.work.await
import androidx.work.multiprocess.RemoteListenableWorker
@@ -32,16 +41,23 @@
class RemoteWorker(private val context: Context, private val parameters: WorkerParameters) :
RemoteListenableWorker(context, parameters) {
+
+ private val notificationManager =
+ context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
+
private var job: Job? = null
+ private var progress: Data = Data.EMPTY
+
override fun startRemoteWork(): ListenableFuture<Result> {
return CallbackToFutureAdapter.getFuture { completer ->
Log.d(TAG, "Starting Remote Worker.")
val scope = CoroutineScope(Dispatchers.Default)
job = scope.launch {
- for (i in 1..30) {
+ for (i in 1..10) {
delay(1000)
- val progressData = workDataOf(PROGRESS_INFO to i)
- setProgressAsync(progressData).await()
+ progress = workDataOf(Progress to i * 10)
+ setForegroundAsync(getForegroundInfo(NotificationId))
+ setProgressAsync(progress).await()
}
}
@@ -56,8 +72,41 @@
job?.cancel()
}
+ private fun getForegroundInfo(notificationId: Int): ForegroundInfo {
+ val percent = progress.getInt(Progress, 0)
+ val id = applicationContext.getString(R.string.channel_id)
+ val title = applicationContext.getString(R.string.notification_title)
+ val content = "Progress ($percent) %"
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
+ createChannel()
+ }
+
+ val notification = NotificationCompat.Builder(applicationContext, id)
+ .setContentTitle(title)
+ .setTicker(title)
+ .setContentText(content)
+ .setSmallIcon(R.drawable.ic_work_notification)
+ .setOngoing(true)
+ .build()
+
+ return ForegroundInfo(notificationId, notification)
+ }
+
+ @RequiresApi(Build.VERSION_CODES.O)
+ @SuppressLint("ClassVerificationFailure")
+ private fun createChannel() {
+ val id = applicationContext.getString(R.string.channel_id)
+ val name = applicationContext.getString(R.string.channel_name)
+ val description = applicationContext.getString(R.string.channel_description)
+ val channel = NotificationChannel(id, name, NotificationManager.IMPORTANCE_LOW)
+ channel.description = description
+ channel.lockscreenVisibility = Notification.VISIBILITY_PRIVATE
+ notificationManager.createNotificationChannel(channel)
+ }
+
companion object {
private const val TAG = "WM-RemoteWorker"
- private const val PROGRESS_INFO = "ProgressInformation"
+ private const val NotificationId = 20
+ private const val Progress = "Progress"
}
}
diff --git a/work/integration-tests/testapp/src/main/java/androidx/work/integration/testapp/TestApplication.java b/work/integration-tests/testapp/src/main/java/androidx/work/integration/testapp/TestApplication.java
index 3af4c26..54cff00 100644
--- a/work/integration-tests/testapp/src/main/java/androidx/work/integration/testapp/TestApplication.java
+++ b/work/integration-tests/testapp/src/main/java/androidx/work/integration/testapp/TestApplication.java
@@ -33,6 +33,7 @@
@Override
public Configuration getWorkManagerConfiguration() {
return new Configuration.Builder()
+ .setDefaultProcessName(getPackageName())
.setTaskExecutor(Executors.newCachedThreadPool())
.setMinimumLoggingLevel(Log.VERBOSE).build();
}
diff --git a/work/work-multiprocess/api/api_lint.ignore b/work/work-multiprocess/api/api_lint.ignore
index 07b6896..97e623e 100644
--- a/work/work-multiprocess/api/api_lint.ignore
+++ b/work/work-multiprocess/api/api_lint.ignore
@@ -5,3 +5,5 @@
Methods returning com.google.common.util.concurrent.ListenableFuture should have a suffix *Async to reserve unmodified name for a suspend function
AsyncSuffixFuture: androidx.work.multiprocess.RemoteListenableWorker#startWork():
Methods returning com.google.common.util.concurrent.ListenableFuture should have a suffix *Async to reserve unmodified name for a suspend function
+AsyncSuffixFuture: androidx.work.multiprocess.RemoteProgressUpdater#updateProgress(android.content.Context, java.util.UUID, androidx.work.Data):
+ Methods returning com.google.common.util.concurrent.ListenableFuture should have a suffix *Async to reserve unmodified name for a suspend function
diff --git a/work/work-multiprocess/src/androidTest/java/androidx/work/multiprocess/RemoteCoroutineWorkerTest.kt b/work/work-multiprocess/src/androidTest/java/androidx/work/multiprocess/RemoteCoroutineWorkerTest.kt
index 0ce7b03..aa0cf18 100644
--- a/work/work-multiprocess/src/androidTest/java/androidx/work/multiprocess/RemoteCoroutineWorkerTest.kt
+++ b/work/work-multiprocess/src/androidTest/java/androidx/work/multiprocess/RemoteCoroutineWorkerTest.kt
@@ -88,6 +88,7 @@
`when`(mWorkManager.schedulers).thenReturn(schedulers)
`when`(mWorkManager.processor).thenReturn(mProcessor)
WorkManagerImpl.setDelegate(mWorkManager)
+ RemoteWorkManagerInfo.clearInstance()
}
@Test
diff --git a/work/work-multiprocess/src/androidTest/java/androidx/work/multiprocess/RemoteListenableWorkerTest.kt b/work/work-multiprocess/src/androidTest/java/androidx/work/multiprocess/RemoteListenableWorkerTest.kt
index 9128c5d..5b5d81a 100644
--- a/work/work-multiprocess/src/androidTest/java/androidx/work/multiprocess/RemoteListenableWorkerTest.kt
+++ b/work/work-multiprocess/src/androidTest/java/androidx/work/multiprocess/RemoteListenableWorkerTest.kt
@@ -94,6 +94,7 @@
`when`(mWorkManager.schedulers).thenReturn(schedulers)
`when`(mWorkManager.processor).thenReturn(mProcessor)
WorkManagerImpl.setDelegate(mWorkManager)
+ RemoteWorkManagerInfo.clearInstance()
}
@Test
diff --git a/work/work-multiprocess/src/main/java/androidx/work/multiprocess/ListenableWorkerImpl.java b/work/work-multiprocess/src/main/java/androidx/work/multiprocess/ListenableWorkerImpl.java
index 6219a74..34ff4ad 100644
--- a/work/work-multiprocess/src/main/java/androidx/work/multiprocess/ListenableWorkerImpl.java
+++ b/work/work-multiprocess/src/main/java/androidx/work/multiprocess/ListenableWorkerImpl.java
@@ -24,10 +24,11 @@
import androidx.annotation.NonNull;
import androidx.annotation.RestrictTo;
import androidx.work.Configuration;
+import androidx.work.ForegroundUpdater;
import androidx.work.ListenableWorker;
import androidx.work.Logger;
+import androidx.work.ProgressUpdater;
import androidx.work.WorkerParameters;
-import androidx.work.impl.WorkManagerImpl;
import androidx.work.impl.utils.futures.SettableFuture;
import androidx.work.impl.utils.taskexecutor.TaskExecutor;
import androidx.work.multiprocess.parcelable.ParcelConverters;
@@ -59,19 +60,23 @@
// Synthetic access
final Context mContext;
// Synthetic access
- final WorkManagerImpl mWorkManager;
- // Synthetic access
final Configuration mConfiguration;
// Synthetic access
final TaskExecutor mTaskExecutor;
// Synthetic access
+ final ProgressUpdater mProgressUpdater;
+ // Synthetic access
+ final ForegroundUpdater mForegroundUpdater;
+ // Synthetic access
final Map<String, ListenableFuture<ListenableWorker.Result>> mFutureMap;
ListenableWorkerImpl(@NonNull Context context) {
mContext = context.getApplicationContext();
- mWorkManager = WorkManagerImpl.getInstance(mContext);
- mConfiguration = mWorkManager.getConfiguration();
- mTaskExecutor = mWorkManager.getWorkTaskExecutor();
+ RemoteWorkManagerInfo remoteInfo = RemoteWorkManagerInfo.getInstance(context);
+ mConfiguration = remoteInfo.getConfiguration();
+ mTaskExecutor = remoteInfo.getTaskExecutor();
+ mProgressUpdater = remoteInfo.getProgressUpdater();
+ mForegroundUpdater = remoteInfo.getForegroundUpdater();
mFutureMap = new HashMap<>();
}
@@ -87,7 +92,12 @@
parcelableRemoteWorkRequest.getParcelableWorkerParameters();
WorkerParameters workerParameters =
- parcelableWorkerParameters.toWorkerParameters(mWorkManager);
+ parcelableWorkerParameters.toWorkerParameters(
+ mConfiguration,
+ mTaskExecutor,
+ mProgressUpdater,
+ mForegroundUpdater
+ );
final String id = workerParameters.getId().toString();
final String workerClassName = parcelableRemoteWorkRequest.getWorkerClassName();
@@ -138,7 +148,7 @@
future = mFutureMap.remove(id);
}
if (future != null) {
- mWorkManager.getWorkTaskExecutor().getSerialTaskExecutor()
+ mTaskExecutor.getSerialTaskExecutor()
.execute(new Runnable() {
@Override
public void run() {
@@ -162,7 +172,7 @@
@NonNull WorkerParameters workerParameters) {
final SettableFuture<ListenableWorker.Result> future = SettableFuture.create();
- Logger.get().debug(TAG, "Tracking execution of " + id + " (" + workerClassName + ")");
+ Logger.get().debug(TAG, "Tracking execution of " + id + " (" + workerClassName + ")");
synchronized (sLock) {
mFutureMap.put(id, future);
diff --git a/work/work-multiprocess/src/main/java/androidx/work/multiprocess/RemoteForegroundUpdater.java b/work/work-multiprocess/src/main/java/androidx/work/multiprocess/RemoteForegroundUpdater.java
new file mode 100644
index 0000000..32cf08b
--- /dev/null
+++ b/work/work-multiprocess/src/main/java/androidx/work/multiprocess/RemoteForegroundUpdater.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package androidx.work.multiprocess;
+
+import android.content.Context;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.RestrictTo;
+import androidx.work.ForegroundInfo;
+import androidx.work.ForegroundUpdater;
+
+import com.google.common.util.concurrent.ListenableFuture;
+
+import java.util.UUID;
+
+/**
+ * Transitions a {@link androidx.work.multiprocess.RemoteListenableWorker} to run in the context
+ * of a foreground {@link android.app.Service}.
+ *
+ * @hide
+ */
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+public class RemoteForegroundUpdater implements ForegroundUpdater {
+ @NonNull
+ @Override
+ public ListenableFuture<Void> setForegroundAsync(
+ @NonNull Context context,
+ @NonNull UUID id,
+ @NonNull ForegroundInfo foregroundInfo) {
+ return RemoteWorkManager.getInstance(context)
+ .setForegroundAsync(id.toString(), foregroundInfo);
+ }
+}
diff --git a/work/work-multiprocess/src/main/java/androidx/work/multiprocess/RemoteListenableWorker.java b/work/work-multiprocess/src/main/java/androidx/work/multiprocess/RemoteListenableWorker.java
index 1ea26cb..bdae59a 100644
--- a/work/work-multiprocess/src/main/java/androidx/work/multiprocess/RemoteListenableWorker.java
+++ b/work/work-multiprocess/src/main/java/androidx/work/multiprocess/RemoteListenableWorker.java
@@ -38,8 +38,6 @@
import com.google.common.util.concurrent.ListenableFuture;
-import java.util.concurrent.Executor;
-
/**
* Is an implementation of a {@link ListenableWorker} that can bind to a remote process.
@@ -76,12 +74,6 @@
final WorkerParameters mWorkerParameters;
// Synthetic access
- final WorkManagerImpl mWorkManager;
-
- // Synthetic access
- final Executor mExecutor;
-
- // Synthetic access
final ListenableWorkerImplClient mClient;
// Synthetic access
@@ -100,9 +92,7 @@
@NonNull WorkerParameters workerParams) {
super(appContext, workerParams);
mWorkerParameters = workerParams;
- mWorkManager = WorkManagerImpl.getInstance(appContext);
- mExecutor = mWorkManager.getWorkTaskExecutor().getSerialTaskExecutor();
- mClient = new ListenableWorkerImplClient(getApplicationContext(), mExecutor);
+ mClient = new ListenableWorkerImplClient(appContext, getBackgroundExecutor());
}
@Override
@@ -130,6 +120,9 @@
mComponentName = new ComponentName(packageName, serviceClassName);
+ // This bit is safe, because we only run startWork() in the designated process.
+ final WorkManagerImpl workManager = WorkManagerImpl.getInstance(getApplicationContext());
+
ListenableFuture<byte[]> result = mClient.execute(
mComponentName,
new RemoteDispatcher<IListenableWorkerImpl>() {
@@ -138,7 +131,7 @@
@NonNull IListenableWorkerImpl listenableWorkerImpl,
@NonNull IWorkManagerImplCallback callback) throws RemoteException {
- WorkSpec workSpec = mWorkManager.getWorkDatabase()
+ WorkSpec workSpec = workManager.getWorkDatabase()
.workSpecDao()
.getWorkSpec(id);
@@ -161,7 +154,7 @@
mClient.unbindService();
return parcelableResult.getResult();
}
- }, mExecutor);
+ }, getBackgroundExecutor());
}
/**
@@ -208,16 +201,4 @@
});
}
}
-
- /**
- * {@inheritDoc}
- */
- @NonNull
- @Override
- public ListenableFuture<Void> setProgressAsync(@NonNull Data data) {
- // Delegate progress updates to the designated process.
- RemoteWorkManager remoteWorkManager =
- RemoteWorkManager.getInstance(getApplicationContext());
- return remoteWorkManager.setProgress(getId(), data);
- }
}
diff --git a/work/work-multiprocess/src/main/java/androidx/work/multiprocess/RemoteProgressUpdater.java b/work/work-multiprocess/src/main/java/androidx/work/multiprocess/RemoteProgressUpdater.java
new file mode 100644
index 0000000..75a1907
--- /dev/null
+++ b/work/work-multiprocess/src/main/java/androidx/work/multiprocess/RemoteProgressUpdater.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package androidx.work.multiprocess;
+
+import android.content.Context;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.RestrictTo;
+import androidx.work.Data;
+import androidx.work.ProgressUpdater;
+
+import com.google.common.util.concurrent.ListenableFuture;
+
+import java.util.UUID;
+
+/**
+ * Updates progress for a {@link androidx.work.multiprocess.RemoteListenableWorker}.
+ *
+ * @hide
+ */
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+public class RemoteProgressUpdater implements ProgressUpdater {
+ @NonNull
+ @Override
+ public ListenableFuture<Void> updateProgress(
+ @NonNull Context context,
+ @NonNull UUID id,
+ @NonNull Data data) {
+ return RemoteWorkManager.getInstance(context).setProgress(id, data);
+ }
+}
diff --git a/work/work-multiprocess/src/main/java/androidx/work/multiprocess/RemoteWorkManagerClient.java b/work/work-multiprocess/src/main/java/androidx/work/multiprocess/RemoteWorkManagerClient.java
index 649230e..30c4451 100644
--- a/work/work-multiprocess/src/main/java/androidx/work/multiprocess/RemoteWorkManagerClient.java
+++ b/work/work-multiprocess/src/main/java/androidx/work/multiprocess/RemoteWorkManagerClient.java
@@ -41,6 +41,7 @@
import androidx.work.Data;
import androidx.work.ExistingPeriodicWorkPolicy;
import androidx.work.ExistingWorkPolicy;
+import androidx.work.ForegroundInfo;
import androidx.work.Logger;
import androidx.work.OneTimeWorkRequest;
import androidx.work.PeriodicWorkRequest;
@@ -52,6 +53,7 @@
import androidx.work.impl.WorkManagerImpl;
import androidx.work.impl.utils.futures.SettableFuture;
import androidx.work.multiprocess.parcelable.ParcelConverters;
+import androidx.work.multiprocess.parcelable.ParcelableForegroundRequestInfo;
import androidx.work.multiprocess.parcelable.ParcelableUpdateRequest;
import androidx.work.multiprocess.parcelable.ParcelableWorkContinuationImpl;
import androidx.work.multiprocess.parcelable.ParcelableWorkInfos;
@@ -279,6 +281,24 @@
return map(result, sVoidMapper, mExecutor);
}
+ @NonNull
+ @Override
+ public ListenableFuture<Void> setForegroundAsync(
+ @NonNull String id,
+ @NonNull ForegroundInfo foregroundInfo) {
+ ListenableFuture<byte[]> result = execute(new RemoteDispatcher<IWorkManagerImpl>() {
+ @Override
+ public void execute(
+ @NonNull IWorkManagerImpl iWorkManagerImpl,
+ @NonNull IWorkManagerImplCallback callback) throws Throwable {
+ byte[] request = ParcelConverters.marshall(
+ new ParcelableForegroundRequestInfo(id, foregroundInfo));
+ iWorkManagerImpl.setForegroundAsync(request, callback);
+ }
+ });
+ return map(result, sVoidMapper, mExecutor);
+ }
+
/**
* Executes a {@link RemoteDispatcher} after having negotiated a service connection.
*
diff --git a/work/work-multiprocess/src/main/java/androidx/work/multiprocess/RemoteWorkManagerImpl.java b/work/work-multiprocess/src/main/java/androidx/work/multiprocess/RemoteWorkManagerImpl.java
index e5f0b13..a70f402 100644
--- a/work/work-multiprocess/src/main/java/androidx/work/multiprocess/RemoteWorkManagerImpl.java
+++ b/work/work-multiprocess/src/main/java/androidx/work/multiprocess/RemoteWorkManagerImpl.java
@@ -30,9 +30,11 @@
import androidx.work.impl.WorkContinuationImpl;
import androidx.work.impl.WorkDatabase;
import androidx.work.impl.WorkManagerImpl;
+import androidx.work.impl.utils.WorkForegroundUpdater;
import androidx.work.impl.utils.WorkProgressUpdater;
import androidx.work.impl.utils.taskexecutor.TaskExecutor;
import androidx.work.multiprocess.parcelable.ParcelConverters;
+import androidx.work.multiprocess.parcelable.ParcelableForegroundRequestInfo;
import androidx.work.multiprocess.parcelable.ParcelableUpdateRequest;
import androidx.work.multiprocess.parcelable.ParcelableWorkContinuationImpl;
import androidx.work.multiprocess.parcelable.ParcelableWorkInfos;
@@ -251,4 +253,37 @@
reportFailure(callback, throwable);
}
}
+
+ @Override
+ public void setForegroundAsync(
+ @NonNull byte[] request,
+ @NonNull IWorkManagerImplCallback callback) {
+ try {
+ ParcelableForegroundRequestInfo parcelled =
+ ParcelConverters.unmarshall(request, ParcelableForegroundRequestInfo.CREATOR);
+ TaskExecutor taskExecutor = mWorkManager.getWorkTaskExecutor();
+ Executor executor = taskExecutor.getSerialTaskExecutor();
+ WorkForegroundUpdater foregroundUpdater = new WorkForegroundUpdater(
+ mWorkManager.getWorkDatabase(),
+ mWorkManager.getProcessor(),
+ taskExecutor
+ );
+ final ListenableFuture<Void> future = foregroundUpdater.setForegroundAsync(
+ mWorkManager.getApplicationContext(),
+ UUID.fromString(parcelled.getId()),
+ parcelled.getForegroundInfo()
+ );
+ final ListenableCallback<Void> listenableCallback =
+ new ListenableCallback<Void>(executor, callback, future) {
+ @NonNull
+ @Override
+ public byte[] toByteArray(@NonNull Void result) {
+ return sEMPTY;
+ }
+ };
+ listenableCallback.dispatchCallbackSafely();
+ } catch (Throwable throwable) {
+ reportFailure(callback, throwable);
+ }
+ }
}
diff --git a/work/work-multiprocess/src/main/java/androidx/work/multiprocess/RemoteWorkManagerInfo.java b/work/work-multiprocess/src/main/java/androidx/work/multiprocess/RemoteWorkManagerInfo.java
new file mode 100644
index 0000000..fba67a3
--- /dev/null
+++ b/work/work-multiprocess/src/main/java/androidx/work/multiprocess/RemoteWorkManagerInfo.java
@@ -0,0 +1,137 @@
+/*
+ * Copyright 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package androidx.work.multiprocess;
+
+import android.content.Context;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.RestrictTo;
+import androidx.annotation.VisibleForTesting;
+import androidx.work.Configuration;
+import androidx.work.ForegroundUpdater;
+import androidx.work.ProgressUpdater;
+import androidx.work.WorkManager;
+import androidx.work.impl.WorkManagerImpl;
+import androidx.work.impl.utils.taskexecutor.TaskExecutor;
+import androidx.work.impl.utils.taskexecutor.WorkManagerTaskExecutor;
+
+/**
+ * Can keep track of WorkManager configuration and schedulers without having to fully
+ * initialize {@link androidx.work.WorkManager} in a remote process.
+ *
+ * @hide
+ */
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+public final class RemoteWorkManagerInfo {
+
+ private static final Object sLock = new Object();
+ private static volatile RemoteWorkManagerInfo sInstance;
+
+ private final Configuration mConfiguration;
+ private final TaskExecutor mTaskExecutor;
+ private final ProgressUpdater mProgressUpdater;
+ private final ForegroundUpdater mForegroundUpdater;
+
+ /**
+ * Returns an instance of {@link RemoteWorkManagerInfo}.
+ *
+ * @param context The application {@link Context}.
+ * @return an instance of {@link RemoteWorkManagerInfo} which tracks {@link WorkManager}
+ * configuration without having to initialize {@link WorkManager}.
+ */
+ @NonNull
+ public static RemoteWorkManagerInfo getInstance(@NonNull Context context) {
+ if (sInstance == null) {
+ synchronized (sLock) {
+ if (sInstance == null) {
+ sInstance = new RemoteWorkManagerInfo(context);
+ }
+ }
+ }
+ return sInstance;
+ }
+
+ /**
+ * Clears the instance of {@link RemoteWorkManagerInfo}.
+ */
+ @VisibleForTesting
+ public static void clearInstance() {
+ synchronized (sLock) {
+ sInstance = null;
+ }
+ }
+
+ @SuppressWarnings("deprecation")
+ private RemoteWorkManagerInfo(@NonNull Context context) {
+ WorkManagerImpl instance = WorkManagerImpl.getInstance();
+ if (instance != null) {
+ // WorkManager has been initialized in this process.
+ mConfiguration = instance.getConfiguration();
+ mTaskExecutor = instance.getWorkTaskExecutor();
+ } else {
+ Context appContext = context.getApplicationContext();
+ if (appContext instanceof Configuration.Provider) {
+ Configuration.Provider provider = (Configuration.Provider) appContext;
+ mConfiguration = provider.getWorkManagerConfiguration();
+ } else {
+ // Assume that the configuration to be used is the default configuration.
+ mConfiguration = new Configuration.Builder()
+ .setDefaultProcessName(appContext.getPackageName())
+ .build();
+ }
+ mTaskExecutor = new WorkManagerTaskExecutor(mConfiguration.getTaskExecutor());
+ }
+ mProgressUpdater = new RemoteProgressUpdater();
+ mForegroundUpdater = new RemoteForegroundUpdater();
+ }
+
+ /**
+ * @return The {@link Configuration} instance which can be used without having to initialize
+ * {@link WorkManager}.
+ */
+ @NonNull
+ public Configuration getConfiguration() {
+ return mConfiguration;
+ }
+
+ /**
+ * @return The {@link TaskExecutor} instance that can be used without having to initialize
+ * {@link WorkManager}.
+ */
+ @NonNull
+ public TaskExecutor getTaskExecutor() {
+ return mTaskExecutor;
+ }
+
+ /**
+ * @return The {@link androidx.work.ProgressUpdater} instance that can be use without
+ * having to initialize {@link WorkManager}.
+ */
+ @NonNull
+ public ProgressUpdater getProgressUpdater() {
+ return mProgressUpdater;
+ }
+
+ /**
+ * @return The {@link androidx.work.ForegroundUpdater} instance that can be use without
+ * having to initialize {@link WorkManager}.
+ */
+ @NonNull
+ public ForegroundUpdater getForegroundUpdater() {
+ return mForegroundUpdater;
+ }
+}
diff --git a/work/work-multiprocess/src/main/java/androidx/work/multiprocess/parcelable/ParcelableConstraints.java b/work/work-multiprocess/src/main/java/androidx/work/multiprocess/parcelable/ParcelableConstraints.java
index 520e7d5..7c2c149 100644
--- a/work/work-multiprocess/src/main/java/androidx/work/multiprocess/parcelable/ParcelableConstraints.java
+++ b/work/work-multiprocess/src/main/java/androidx/work/multiprocess/parcelable/ParcelableConstraints.java
@@ -16,10 +16,10 @@
package androidx.work.multiprocess.parcelable;
-import static androidx.work.impl.model.WorkTypeConverters.byteArrayToContentUriTriggers;
-import static androidx.work.impl.model.WorkTypeConverters.contentUriTriggersToByteArray;
+import static androidx.work.impl.model.WorkTypeConverters.byteArrayToSetOfTriggers;
import static androidx.work.impl.model.WorkTypeConverters.intToNetworkType;
import static androidx.work.impl.model.WorkTypeConverters.networkTypeToInt;
+import static androidx.work.impl.model.WorkTypeConverters.setOfTriggersToByteArray;
import static androidx.work.multiprocess.parcelable.ParcelUtils.readBooleanValue;
import static androidx.work.multiprocess.parcelable.ParcelUtils.writeBooleanValue;
@@ -31,9 +31,10 @@
import androidx.annotation.NonNull;
import androidx.annotation.RestrictTo;
import androidx.work.Constraints;
-import androidx.work.ContentUriTriggers;
+import androidx.work.Constraints.ContentUriTrigger;
import androidx.work.NetworkType;
+import java.util.Set;
import java.util.concurrent.TimeUnit;
/**
@@ -74,11 +75,11 @@
if (Build.VERSION.SDK_INT >= 24) {
boolean hasTriggers = readBooleanValue(in);
if (hasTriggers) {
- ContentUriTriggers contentUriTriggers =
- byteArrayToContentUriTriggers(in.createByteArray());
- for (ContentUriTriggers.Trigger trigger : contentUriTriggers.getTriggers()) {
+ Set<ContentUriTrigger> contentUriTriggers = byteArrayToSetOfTriggers(
+ in.createByteArray());
+ for (ContentUriTrigger trigger : contentUriTriggers) {
builder.addContentUriTrigger(trigger.getUri(),
- trigger.shouldTriggerForDescendants());
+ trigger.getTriggerForDescendants());
}
}
// triggerMaxContentDelay
@@ -129,8 +130,8 @@
boolean hasTriggers = mConstraints.hasContentUriTriggers();
writeBooleanValue(parcel, hasTriggers);
if (hasTriggers) {
- ContentUriTriggers contentUriTriggers = mConstraints.getContentUriTriggers();
- byte[] serializedTriggers = contentUriTriggersToByteArray(contentUriTriggers);
+ byte[] serializedTriggers =
+ setOfTriggersToByteArray(mConstraints.getContentUriTriggers());
parcel.writeByteArray(serializedTriggers);
}
// triggerMaxContentDelay
diff --git a/work/work-multiprocess/src/main/java/androidx/work/multiprocess/parcelable/ParcelableForegroundRequestInfo.java b/work/work-multiprocess/src/main/java/androidx/work/multiprocess/parcelable/ParcelableForegroundRequestInfo.java
new file mode 100644
index 0000000..904c732
--- /dev/null
+++ b/work/work-multiprocess/src/main/java/androidx/work/multiprocess/parcelable/ParcelableForegroundRequestInfo.java
@@ -0,0 +1,100 @@
+/*
+ * Copyright 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package androidx.work.multiprocess.parcelable;
+
+import android.annotation.SuppressLint;
+import android.app.Notification;
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.RestrictTo;
+import androidx.work.ForegroundInfo;
+
+/**
+ * ForegroundInfo but parcelable.
+ *
+ * @hide
+ */
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+@SuppressLint("BanParcelableUsage")
+public class ParcelableForegroundRequestInfo implements Parcelable {
+
+ private final String mId;
+ private final ForegroundInfo mForegroundInfo;
+
+ public ParcelableForegroundRequestInfo(
+ @NonNull String id,
+ @NonNull ForegroundInfo foregroundInfo) {
+ mId = id;
+ mForegroundInfo = foregroundInfo;
+ }
+
+ public ParcelableForegroundRequestInfo(@NonNull Parcel in) {
+ // id
+ mId = in.readString();
+ // notificationId
+ int notificationId = in.readInt();
+ // foregroundServiceType
+ int foregroundServiceType = in.readInt();
+ // notification
+ Notification notification = in.readParcelable(getClass().getClassLoader());
+ mForegroundInfo = new ForegroundInfo(notificationId, notification, foregroundServiceType);
+ }
+
+ public static final Creator<ParcelableForegroundRequestInfo> CREATOR =
+ new Creator<ParcelableForegroundRequestInfo>() {
+ @Override
+ public ParcelableForegroundRequestInfo createFromParcel(Parcel in) {
+ return new ParcelableForegroundRequestInfo(in);
+ }
+
+ @Override
+ public ParcelableForegroundRequestInfo[] newArray(int size) {
+ return new ParcelableForegroundRequestInfo[size];
+ }
+ };
+
+
+ @NonNull
+ public ForegroundInfo getForegroundInfo() {
+ return mForegroundInfo;
+ }
+
+ @NonNull
+ public String getId() {
+ return mId;
+ }
+
+ @Override
+ public int describeContents() {
+ // No file descriptors being returned.
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(@NonNull Parcel parcel, int flags) {
+ // id
+ parcel.writeString(mId);
+ // notificationId
+ parcel.writeInt(mForegroundInfo.getNotificationId());
+ // foregroundServiceType
+ parcel.writeInt(mForegroundInfo.getForegroundServiceType());
+ // notification
+ parcel.writeParcelable(mForegroundInfo.getNotification(), flags);
+ }
+}
diff --git a/work/work-multiprocess/src/main/java/androidx/work/multiprocess/parcelable/ParcelableWorkerParameters.java b/work/work-multiprocess/src/main/java/androidx/work/multiprocess/parcelable/ParcelableWorkerParameters.java
index 9b8f0f5..3d8f03e 100644
--- a/work/work-multiprocess/src/main/java/androidx/work/multiprocess/parcelable/ParcelableWorkerParameters.java
+++ b/work/work-multiprocess/src/main/java/androidx/work/multiprocess/parcelable/ParcelableWorkerParameters.java
@@ -24,10 +24,12 @@
import androidx.annotation.RestrictTo;
import androidx.work.Configuration;
import androidx.work.Data;
+import androidx.work.ForegroundUpdater;
+import androidx.work.ProgressUpdater;
import androidx.work.WorkerParameters;
+import androidx.work.impl.Processor;
import androidx.work.impl.WorkDatabase;
import androidx.work.impl.WorkManagerImpl;
-import androidx.work.impl.foreground.ForegroundProcessor;
import androidx.work.impl.utils.WorkForegroundUpdater;
import androidx.work.impl.utils.WorkProgressUpdater;
import androidx.work.impl.utils.taskexecutor.TaskExecutor;
@@ -145,7 +147,31 @@
Configuration configuration = workManager.getConfiguration();
WorkDatabase workDatabase = workManager.getWorkDatabase();
TaskExecutor taskExecutor = workManager.getWorkTaskExecutor();
- ForegroundProcessor foregroundProcessor = workManager.getProcessor();
+ Processor processor = workManager.getProcessor();
+ WorkProgressUpdater progressUpdater = new WorkProgressUpdater(workDatabase, taskExecutor);
+ WorkForegroundUpdater foregroundUpdater = new WorkForegroundUpdater(
+ workDatabase,
+ processor,
+ taskExecutor
+ );
+ return toWorkerParameters(
+ configuration,
+ taskExecutor,
+ progressUpdater,
+ foregroundUpdater
+ );
+ }
+
+ /**
+ * Converts {@link ParcelableWorkerParameters} to an instance of {@link WorkerParameters}
+ * lazily.
+ */
+ @NonNull
+ public WorkerParameters toWorkerParameters(
+ @NonNull Configuration configuration,
+ @NonNull TaskExecutor taskExecutor,
+ @NonNull ProgressUpdater progressUpdater,
+ @NonNull ForegroundUpdater foregroundUpdater) {
return new WorkerParameters(
mId,
mData,
@@ -155,8 +181,8 @@
configuration.getExecutor(),
taskExecutor,
configuration.getWorkerFactory(),
- new WorkProgressUpdater(workDatabase, taskExecutor),
- new WorkForegroundUpdater(workDatabase, foregroundProcessor, taskExecutor)
+ progressUpdater,
+ foregroundUpdater
);
}
}
diff --git a/work/work-runtime/api/current.txt b/work/work-runtime/api/current.txt
index 726f11b..88d8307 100644
--- a/work/work-runtime/api/current.txt
+++ b/work/work-runtime/api/current.txt
@@ -42,28 +42,33 @@
}
public final class Constraints {
- ctor public Constraints(androidx.work.Constraints);
+ ctor public Constraints(androidx.work.Constraints other);
method public androidx.work.NetworkType getRequiredNetworkType();
method public boolean requiresBatteryNotLow();
method public boolean requiresCharging();
method @RequiresApi(23) public boolean requiresDeviceIdle();
method public boolean requiresStorageNotLow();
+ property public final androidx.work.NetworkType requiredNetworkType;
+ field public static final androidx.work.Constraints.Companion Companion;
field public static final androidx.work.Constraints NONE;
}
public static final class Constraints.Builder {
ctor public Constraints.Builder();
- method @RequiresApi(24) public androidx.work.Constraints.Builder addContentUriTrigger(android.net.Uri, boolean);
+ method @RequiresApi(24) public androidx.work.Constraints.Builder addContentUriTrigger(android.net.Uri uri, boolean triggerForDescendants);
method public androidx.work.Constraints build();
- method public androidx.work.Constraints.Builder setRequiredNetworkType(androidx.work.NetworkType);
- method public androidx.work.Constraints.Builder setRequiresBatteryNotLow(boolean);
- method public androidx.work.Constraints.Builder setRequiresCharging(boolean);
- method @RequiresApi(23) public androidx.work.Constraints.Builder setRequiresDeviceIdle(boolean);
- method public androidx.work.Constraints.Builder setRequiresStorageNotLow(boolean);
- method @RequiresApi(24) public androidx.work.Constraints.Builder setTriggerContentMaxDelay(long, java.util.concurrent.TimeUnit);
- method @RequiresApi(26) public androidx.work.Constraints.Builder setTriggerContentMaxDelay(java.time.Duration!);
- method @RequiresApi(24) public androidx.work.Constraints.Builder setTriggerContentUpdateDelay(long, java.util.concurrent.TimeUnit);
- method @RequiresApi(26) public androidx.work.Constraints.Builder setTriggerContentUpdateDelay(java.time.Duration!);
+ method public androidx.work.Constraints.Builder setRequiredNetworkType(androidx.work.NetworkType networkType);
+ method public androidx.work.Constraints.Builder setRequiresBatteryNotLow(boolean requiresBatteryNotLow);
+ method public androidx.work.Constraints.Builder setRequiresCharging(boolean requiresCharging);
+ method @RequiresApi(23) public androidx.work.Constraints.Builder setRequiresDeviceIdle(boolean requiresDeviceIdle);
+ method public androidx.work.Constraints.Builder setRequiresStorageNotLow(boolean requiresStorageNotLow);
+ method @RequiresApi(24) public androidx.work.Constraints.Builder setTriggerContentMaxDelay(long duration, java.util.concurrent.TimeUnit timeUnit);
+ method @RequiresApi(26) public androidx.work.Constraints.Builder setTriggerContentMaxDelay(java.time.Duration duration);
+ method @RequiresApi(24) public androidx.work.Constraints.Builder setTriggerContentUpdateDelay(long duration, java.util.concurrent.TimeUnit timeUnit);
+ method @RequiresApi(26) public androidx.work.Constraints.Builder setTriggerContentUpdateDelay(java.time.Duration duration);
+ }
+
+ public static final class Constraints.Companion {
}
public final class Data {
diff --git a/work/work-runtime/api/public_plus_experimental_current.txt b/work/work-runtime/api/public_plus_experimental_current.txt
index 726f11b..88d8307 100644
--- a/work/work-runtime/api/public_plus_experimental_current.txt
+++ b/work/work-runtime/api/public_plus_experimental_current.txt
@@ -42,28 +42,33 @@
}
public final class Constraints {
- ctor public Constraints(androidx.work.Constraints);
+ ctor public Constraints(androidx.work.Constraints other);
method public androidx.work.NetworkType getRequiredNetworkType();
method public boolean requiresBatteryNotLow();
method public boolean requiresCharging();
method @RequiresApi(23) public boolean requiresDeviceIdle();
method public boolean requiresStorageNotLow();
+ property public final androidx.work.NetworkType requiredNetworkType;
+ field public static final androidx.work.Constraints.Companion Companion;
field public static final androidx.work.Constraints NONE;
}
public static final class Constraints.Builder {
ctor public Constraints.Builder();
- method @RequiresApi(24) public androidx.work.Constraints.Builder addContentUriTrigger(android.net.Uri, boolean);
+ method @RequiresApi(24) public androidx.work.Constraints.Builder addContentUriTrigger(android.net.Uri uri, boolean triggerForDescendants);
method public androidx.work.Constraints build();
- method public androidx.work.Constraints.Builder setRequiredNetworkType(androidx.work.NetworkType);
- method public androidx.work.Constraints.Builder setRequiresBatteryNotLow(boolean);
- method public androidx.work.Constraints.Builder setRequiresCharging(boolean);
- method @RequiresApi(23) public androidx.work.Constraints.Builder setRequiresDeviceIdle(boolean);
- method public androidx.work.Constraints.Builder setRequiresStorageNotLow(boolean);
- method @RequiresApi(24) public androidx.work.Constraints.Builder setTriggerContentMaxDelay(long, java.util.concurrent.TimeUnit);
- method @RequiresApi(26) public androidx.work.Constraints.Builder setTriggerContentMaxDelay(java.time.Duration!);
- method @RequiresApi(24) public androidx.work.Constraints.Builder setTriggerContentUpdateDelay(long, java.util.concurrent.TimeUnit);
- method @RequiresApi(26) public androidx.work.Constraints.Builder setTriggerContentUpdateDelay(java.time.Duration!);
+ method public androidx.work.Constraints.Builder setRequiredNetworkType(androidx.work.NetworkType networkType);
+ method public androidx.work.Constraints.Builder setRequiresBatteryNotLow(boolean requiresBatteryNotLow);
+ method public androidx.work.Constraints.Builder setRequiresCharging(boolean requiresCharging);
+ method @RequiresApi(23) public androidx.work.Constraints.Builder setRequiresDeviceIdle(boolean requiresDeviceIdle);
+ method public androidx.work.Constraints.Builder setRequiresStorageNotLow(boolean requiresStorageNotLow);
+ method @RequiresApi(24) public androidx.work.Constraints.Builder setTriggerContentMaxDelay(long duration, java.util.concurrent.TimeUnit timeUnit);
+ method @RequiresApi(26) public androidx.work.Constraints.Builder setTriggerContentMaxDelay(java.time.Duration duration);
+ method @RequiresApi(24) public androidx.work.Constraints.Builder setTriggerContentUpdateDelay(long duration, java.util.concurrent.TimeUnit timeUnit);
+ method @RequiresApi(26) public androidx.work.Constraints.Builder setTriggerContentUpdateDelay(java.time.Duration duration);
+ }
+
+ public static final class Constraints.Companion {
}
public final class Data {
diff --git a/work/work-runtime/api/restricted_current.txt b/work/work-runtime/api/restricted_current.txt
index 726f11b..88d8307 100644
--- a/work/work-runtime/api/restricted_current.txt
+++ b/work/work-runtime/api/restricted_current.txt
@@ -42,28 +42,33 @@
}
public final class Constraints {
- ctor public Constraints(androidx.work.Constraints);
+ ctor public Constraints(androidx.work.Constraints other);
method public androidx.work.NetworkType getRequiredNetworkType();
method public boolean requiresBatteryNotLow();
method public boolean requiresCharging();
method @RequiresApi(23) public boolean requiresDeviceIdle();
method public boolean requiresStorageNotLow();
+ property public final androidx.work.NetworkType requiredNetworkType;
+ field public static final androidx.work.Constraints.Companion Companion;
field public static final androidx.work.Constraints NONE;
}
public static final class Constraints.Builder {
ctor public Constraints.Builder();
- method @RequiresApi(24) public androidx.work.Constraints.Builder addContentUriTrigger(android.net.Uri, boolean);
+ method @RequiresApi(24) public androidx.work.Constraints.Builder addContentUriTrigger(android.net.Uri uri, boolean triggerForDescendants);
method public androidx.work.Constraints build();
- method public androidx.work.Constraints.Builder setRequiredNetworkType(androidx.work.NetworkType);
- method public androidx.work.Constraints.Builder setRequiresBatteryNotLow(boolean);
- method public androidx.work.Constraints.Builder setRequiresCharging(boolean);
- method @RequiresApi(23) public androidx.work.Constraints.Builder setRequiresDeviceIdle(boolean);
- method public androidx.work.Constraints.Builder setRequiresStorageNotLow(boolean);
- method @RequiresApi(24) public androidx.work.Constraints.Builder setTriggerContentMaxDelay(long, java.util.concurrent.TimeUnit);
- method @RequiresApi(26) public androidx.work.Constraints.Builder setTriggerContentMaxDelay(java.time.Duration!);
- method @RequiresApi(24) public androidx.work.Constraints.Builder setTriggerContentUpdateDelay(long, java.util.concurrent.TimeUnit);
- method @RequiresApi(26) public androidx.work.Constraints.Builder setTriggerContentUpdateDelay(java.time.Duration!);
+ method public androidx.work.Constraints.Builder setRequiredNetworkType(androidx.work.NetworkType networkType);
+ method public androidx.work.Constraints.Builder setRequiresBatteryNotLow(boolean requiresBatteryNotLow);
+ method public androidx.work.Constraints.Builder setRequiresCharging(boolean requiresCharging);
+ method @RequiresApi(23) public androidx.work.Constraints.Builder setRequiresDeviceIdle(boolean requiresDeviceIdle);
+ method public androidx.work.Constraints.Builder setRequiresStorageNotLow(boolean requiresStorageNotLow);
+ method @RequiresApi(24) public androidx.work.Constraints.Builder setTriggerContentMaxDelay(long duration, java.util.concurrent.TimeUnit timeUnit);
+ method @RequiresApi(26) public androidx.work.Constraints.Builder setTriggerContentMaxDelay(java.time.Duration duration);
+ method @RequiresApi(24) public androidx.work.Constraints.Builder setTriggerContentUpdateDelay(long duration, java.util.concurrent.TimeUnit timeUnit);
+ method @RequiresApi(26) public androidx.work.Constraints.Builder setTriggerContentUpdateDelay(java.time.Duration duration);
+ }
+
+ public static final class Constraints.Companion {
}
public final class Data {
diff --git a/work/work-runtime/lint-baseline.xml b/work/work-runtime/lint-baseline.xml
index 46da82e..2801628 100644
--- a/work/work-runtime/lint-baseline.xml
+++ b/work/work-runtime/lint-baseline.xml
@@ -136,28 +136,6 @@
<issue
id="BanSynchronizedMethods"
message="Use of synchronized methods is not recommended"
- errorLine1=" /**"
- errorLine2=" ^">
- <location
- file="src/main/java/androidx/work/impl/constraints/trackers/Trackers.java"
- line="34"
- column="5"/>
- </issue>
-
- <issue
- id="BanSynchronizedMethods"
- message="Use of synchronized methods is not recommended"
- errorLine1=" /**"
- errorLine2=" ^">
- <location
- file="src/main/java/androidx/work/impl/constraints/trackers/Trackers.java"
- line="48"
- column="5"/>
- </issue>
-
- <issue
- id="BanSynchronizedMethods"
- message="Use of synchronized methods is not recommended"
errorLine1=" @VisibleForTesting"
errorLine2=" ^">
<location
@@ -179,61 +157,6 @@
<issue
id="KotlinPropertyAccess"
- message="This method should be called `getState` such that `state` can be accessed as a property from Kotlin; see https://android.github.io/kotlin-guides/interop.html#property-prefixes"
- errorLine1=" public abstract T getInitialState();"
- errorLine2=" ~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/constraints/trackers/ConstraintTracker.java"
- line="123"
- column="23"/>
- </issue>
-
- <issue
- id="KotlinPropertyAccess"
- message="This method should be called `getRequiresCharging` such that `requiresCharging` can be accessed as a property from Kotlin; see https://android.github.io/kotlin-guides/interop.html#property-prefixes"
- errorLine1=" public boolean requiresCharging() {"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/work/Constraints.java"
- line="120"
- column="20"/>
- </issue>
-
- <issue
- id="KotlinPropertyAccess"
- message="This method should be called `getRequiresDeviceIdle` such that `requiresDeviceIdle` can be accessed as a property from Kotlin; see https://android.github.io/kotlin-guides/interop.html#property-prefixes"
- errorLine1=" public boolean requiresDeviceIdle() {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/work/Constraints.java"
- line="137"
- column="20"/>
- </issue>
-
- <issue
- id="KotlinPropertyAccess"
- message="This method should be called `getRequiresBatteryNotLow` such that `requiresBatteryNotLow` can be accessed as a property from Kotlin; see https://android.github.io/kotlin-guides/interop.html#property-prefixes"
- errorLine1=" public boolean requiresBatteryNotLow() {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/work/Constraints.java"
- line="154"
- column="20"/>
- </issue>
-
- <issue
- id="KotlinPropertyAccess"
- message="This method should be called `getRequiresStorageNotLow` such that `requiresStorageNotLow` can be accessed as a property from Kotlin; see https://android.github.io/kotlin-guides/interop.html#property-prefixes"
- errorLine1=" public boolean requiresStorageNotLow() {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/work/Constraints.java"
- line="170"
- column="20"/>
- </issue>
-
- <issue
- id="KotlinPropertyAccess"
message="The getter return type (`LiveData<State>`) and setter parameter type (`State`) getter and setter methods for property `state` should have exactly the same type to allow be accessed as a property from Kotlin; see https://android.github.io/kotlin-guides/interop.html#property-prefixes"
errorLine1=" public @NonNull LiveData<State> getState() {"
errorLine2=" ~~~~~~~~">
@@ -249,22 +172,6 @@
</issue>
<issue
- id="KotlinPropertyAccess"
- message="The getter return type (`boolean`) and setter parameter type (`long`) getter and setter methods for property `periodic` should have exactly the same type to allow be accessed as a property from Kotlin; see https://android.github.io/kotlin-guides/interop.html#property-prefixes"
- errorLine1=" public boolean isPeriodic() {"
- errorLine2=" ~~~~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/model/WorkSpec.java"
- line="188"
- column="20"/>
- <location
- file="src/main/java/androidx/work/impl/model/WorkSpec.java"
- line="201"
- column="17"
- message="Setter here"/>
- </issue>
-
- <issue
id="LambdaLast"
message="Functional interface parameters (such as parameter 2, "mappingMethod", in androidx.work.impl.utils.LiveDataUtils.dedupedMappedLiveDataFor) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions"
errorLine1=" @NonNull final TaskExecutor workTaskExecutor) {"
@@ -333,138 +240,6 @@
<issue
id="UnknownNullness"
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public BatteryChargingController(Context context, TaskExecutor taskExecutor) {"
- errorLine2=" ~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/constraints/controllers/BatteryChargingController.java"
- line="30"
- column="38"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public BatteryChargingController(Context context, TaskExecutor taskExecutor) {"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/constraints/controllers/BatteryChargingController.java"
- line="30"
- column="55"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public Boolean getInitialState() {"
- errorLine2=" ~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/constraints/trackers/BatteryChargingTracker.java"
- line="48"
- column="12"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public IntentFilter getIntentFilter() {"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/constraints/trackers/BatteryChargingTracker.java"
- line="61"
- column="12"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public void onBroadcastReceive(Context context, @NonNull Intent intent) {"
- errorLine2=" ~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/constraints/trackers/BatteryChargingTracker.java"
- line="74"
- column="36"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public BatteryNotLowController(Context context, TaskExecutor taskExecutor) {"
- errorLine2=" ~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/constraints/controllers/BatteryNotLowController.java"
- line="30"
- column="36"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public BatteryNotLowController(Context context, TaskExecutor taskExecutor) {"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/constraints/controllers/BatteryNotLowController.java"
- line="30"
- column="53"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public Boolean getInitialState() {"
- errorLine2=" ~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/constraints/trackers/BatteryNotLowTracker.java"
- line="58"
- column="12"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public IntentFilter getIntentFilter() {"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/constraints/trackers/BatteryNotLowTracker.java"
- line="78"
- column="12"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public void onBroadcastReceive(Context context, @NonNull Intent intent) {"
- errorLine2=" ~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/constraints/trackers/BatteryNotLowTracker.java"
- line="86"
- column="36"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public abstract void onBroadcastReceive(Context context, @NonNull Intent intent);"
- errorLine2=" ~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/constraints/trackers/BroadcastReceiverConstraintTracker.java"
- line="61"
- column="45"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public abstract IntentFilter getIntentFilter();"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/constraints/trackers/BroadcastReceiverConstraintTracker.java"
- line="66"
- column="21"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
errorLine1=" public Operation getOperation() {"
errorLine2=" ~~~~~~~~~">
<location
@@ -542,127 +317,6 @@
<issue
id="UnknownNullness"
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public void addListener(ConstraintListener<T> listener) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/constraints/trackers/ConstraintTracker.java"
- line="63"
- column="29"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public void removeListener(ConstraintListener<T> listener) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/constraints/trackers/ConstraintTracker.java"
- line="82"
- column="32"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public Builder setTriggerContentUpdateDelay(Duration duration) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/work/Constraints.java"
- line="428"
- column="53"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public Builder setTriggerContentMaxDelay(Duration duration) {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/work/Constraints.java"
- line="463"
- column="50"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" void insertDependency(Dependency dependency);"
- errorLine2=" ~~~~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/model/DependencyDao.java"
- line="38"
- column="27"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" boolean hasCompletedAllPrerequisites(String id);"
- errorLine2=" ~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/model/DependencyDao.java"
- line="49"
- column="42"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" List<String> getPrerequisites(String id);"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/model/DependencyDao.java"
- line="58"
- column="5"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" List<String> getPrerequisites(String id);"
- errorLine2=" ~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/model/DependencyDao.java"
- line="58"
- column="35"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" List<String> getDependentWorkIds(String id);"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/model/DependencyDao.java"
- line="67"
- column="5"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" List<String> getDependentWorkIds(String id);"
- errorLine2=" ~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/model/DependencyDao.java"
- line="67"
- column="38"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" boolean hasDependents(String id);"
- errorLine2=" ~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/model/DependencyDao.java"
- line="76"
- column="27"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
errorLine1=" public static InputMerger fromClassName(String className) {"
errorLine2=" ~~~~~~~~~~~">
<location
@@ -729,83 +383,6 @@
<issue
id="UnknownNullness"
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public NetworkConnectedController(Context context, TaskExecutor taskExecutor) {"
- errorLine2=" ~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/constraints/controllers/NetworkConnectedController.java"
- line="40"
- column="39"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public NetworkConnectedController(Context context, TaskExecutor taskExecutor) {"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/constraints/controllers/NetworkConnectedController.java"
- line="40"
- column="56"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public NetworkMeteredController(Context context, TaskExecutor taskExecutor) {"
- errorLine2=" ~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/constraints/controllers/NetworkMeteredController.java"
- line="38"
- column="37"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public NetworkMeteredController(Context context, TaskExecutor taskExecutor) {"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/constraints/controllers/NetworkMeteredController.java"
- line="38"
- column="54"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public NetworkNotRoamingController(Context context, TaskExecutor taskExecutor) {"
- errorLine2=" ~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/constraints/controllers/NetworkNotRoamingController.java"
- line="38"
- column="40"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public NetworkNotRoamingController(Context context, TaskExecutor taskExecutor) {"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/constraints/controllers/NetworkNotRoamingController.java"
- line="38"
- column="57"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public NetworkState getInitialState() {"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/constraints/trackers/NetworkStateTracker.java"
- line="80"
- column="12"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
errorLine1=" public static boolean isComponentExplicitlyEnabled(Context context, Class<?> klazz) {"
errorLine2=" ~~~~~~~">
<location
@@ -971,39 +548,6 @@
<issue
id="UnknownNullness"
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public Boolean getInitialState() {"
- errorLine2=" ~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/constraints/trackers/StorageNotLowTracker.java"
- line="46"
- column="12"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public IntentFilter getIntentFilter() {"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/constraints/trackers/StorageNotLowTracker.java"
- line="70"
- column="12"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public void onBroadcastReceive(Context context, @NonNull Intent intent) {"
- errorLine2=" ~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/constraints/trackers/StorageNotLowTracker.java"
- line="81"
- column="36"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
errorLine1=" public int onStartCommand(Intent intent, int flags, int startId) {"
errorLine2=" ~~~~~~">
<location
@@ -1114,28 +658,6 @@
<issue
id="UnknownNullness"
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public static synchronized Trackers getInstance(Context context, TaskExecutor taskExecutor) {"
- errorLine2=" ~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/constraints/trackers/Trackers.java"
- line="41"
- column="53"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public static synchronized Trackers getInstance(Context context, TaskExecutor taskExecutor) {"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/constraints/trackers/Trackers.java"
- line="41"
- column="70"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
errorLine1=" public static PowerManager.WakeLock newWakeLock("
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -1224,292 +746,6 @@
<issue
id="UnknownNullness"
message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" void insert(WorkName workName);"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/model/WorkNameDao.java"
- line="40"
- column="17"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" List<String> getWorkSpecIdsWithName(String name);"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/model/WorkNameDao.java"
- line="49"
- column="5"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" List<String> getWorkSpecIdsWithName(String name);"
- errorLine2=" ~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/model/WorkNameDao.java"
- line="49"
- column="41"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public String inputMergerClassName;"
- errorLine2=" ~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/model/WorkSpec.java"
- line="77"
- column="12"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public String id;"
- errorLine2=" ~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/model/WorkSpec.java"
- line="371"
- column="16"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public WorkInfo.State state;"
- errorLine2=" ~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/model/WorkSpec.java"
- line="374"
- column="16"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public String id;"
- errorLine2=" ~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/model/WorkSpec.java"
- line="401"
- column="16"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public WorkInfo.State state;"
- errorLine2=" ~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/model/WorkSpec.java"
- line="404"
- column="16"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public Data output;"
- errorLine2=" ~~~~">
- <location
- file="src/main/java/androidx/work/impl/model/WorkSpec.java"
- line="407"
- column="16"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public List<String> tags;"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/model/WorkSpec.java"
- line="417"
- column="16"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public List<Data> progress;"
- errorLine2=" ~~~~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/model/WorkSpec.java"
- line="426"
- column="16"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" void insert(WorkTag workTag);"
- errorLine2=" ~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/model/WorkTagDao.java"
- line="39"
- column="17"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" List<String> getWorkSpecIdsWithTag(String tag);"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/model/WorkTagDao.java"
- line="48"
- column="5"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" List<String> getWorkSpecIdsWithTag(String tag);"
- errorLine2=" ~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/model/WorkTagDao.java"
- line="48"
- column="40"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" List<String> getTagsForWorkSpecId(String id);"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/model/WorkTagDao.java"
- line="57"
- column="5"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" List<String> getTagsForWorkSpecId(String id);"
- errorLine2=" ~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/model/WorkTagDao.java"
- line="57"
- column="39"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public static int stateToInt(WorkInfo.State state) {"
- errorLine2=" ~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/model/WorkTypeConverters.java"
- line="100"
- column="34"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public static WorkInfo.State intToState(int value) {"
- errorLine2=" ~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/model/WorkTypeConverters.java"
- line="133"
- column="19"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public static int backoffPolicyToInt(BackoffPolicy backoffPolicy) {"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/model/WorkTypeConverters.java"
- line="166"
- column="42"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public static BackoffPolicy intToBackoffPolicy(int value) {"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/model/WorkTypeConverters.java"
- line="187"
- column="19"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public static int networkTypeToInt(NetworkType networkType) {"
- errorLine2=" ~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/model/WorkTypeConverters.java"
- line="208"
- column="40"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public static NetworkType intToNetworkType(int value) {"
- errorLine2=" ~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/model/WorkTypeConverters.java"
- line="243"
- column="19"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public static byte[] contentUriTriggersToByteArray(ContentUriTriggers triggers) {"
- errorLine2=" ~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/model/WorkTypeConverters.java"
- line="315"
- column="19"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public static byte[] contentUriTriggersToByteArray(ContentUriTriggers triggers) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/model/WorkTypeConverters.java"
- line="315"
- column="56"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public static ContentUriTriggers byteArrayToContentUriTriggers(byte[] bytes) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/model/WorkTypeConverters.java"
- line="354"
- column="19"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
- errorLine1=" public static ContentUriTriggers byteArrayToContentUriTriggers(byte[] bytes) {"
- errorLine2=" ~~~~~~">
- <location
- file="src/main/java/androidx/work/impl/model/WorkTypeConverters.java"
- line="354"
- column="68"/>
- </issue>
-
- <issue
- id="UnknownNullness"
- message="Unknown nullability; explicitly declare as `@Nullable` or `@NonNull` to improve Kotlin interoperability; see https://android.github.io/kotlin-guides/interop.html#nullability-annotations"
errorLine1=" public Network network;"
errorLine2=" ~~~~~~~">
<location
diff --git a/work/work-runtime/src/androidTest/java/androidx/work/WorkDatabaseMigrationTest.java b/work/work-runtime/src/androidTest/java/androidx/work/WorkDatabaseMigrationTest.java
index 39c636d..7ca794b 100644
--- a/work/work-runtime/src/androidTest/java/androidx/work/WorkDatabaseMigrationTest.java
+++ b/work/work-runtime/src/androidTest/java/androidx/work/WorkDatabaseMigrationTest.java
@@ -23,6 +23,7 @@
import static androidx.work.impl.WorkDatabaseVersions.VERSION_10;
import static androidx.work.impl.WorkDatabaseVersions.VERSION_11;
import static androidx.work.impl.WorkDatabaseVersions.VERSION_12;
+import static androidx.work.impl.WorkDatabaseVersions.VERSION_14;
import static androidx.work.impl.WorkDatabaseVersions.VERSION_2;
import static androidx.work.impl.WorkDatabaseVersions.VERSION_3;
import static androidx.work.impl.WorkDatabaseVersions.VERSION_4;
@@ -46,17 +47,19 @@
import android.content.SharedPreferences;
import android.database.Cursor;
import android.database.sqlite.SQLiteException;
+import android.net.Uri;
import android.os.Build;
import androidx.annotation.NonNull;
import androidx.room.testing.MigrationTestHelper;
import androidx.sqlite.db.SupportSQLiteDatabase;
-import androidx.sqlite.db.framework.FrameworkSQLiteOpenHelperFactory;
import androidx.test.core.app.ApplicationProvider;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.MediumTest;
import androidx.test.platform.app.InstrumentationRegistry;
+import androidx.work.Constraints.ContentUriTrigger;
import androidx.work.impl.Migration_11_12;
+import androidx.work.impl.Migration_12_13;
import androidx.work.impl.Migration_1_2;
import androidx.work.impl.Migration_3_4;
import androidx.work.impl.Migration_4_5;
@@ -78,7 +81,8 @@
import java.io.File;
import java.io.IOException;
-import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Set;
import java.util.UUID;
@RunWith(AndroidJUnit4.class)
@@ -113,16 +117,14 @@
private static final String NAME = "name";
private static final String TRIGGER_CONTENT_UPDATE_DELAY = "trigger_content_update_delay";
private static final String TRIGGER_MAX_CONTENT_DELAY = "trigger_max_content_delay";
-
+ private static final String REQUIRED_NETWORK_TYPE = "required_network_type";
+ private static final String CONTENT_URI_TRIGGERS = "content_uri_triggers";
private Context mContext;
private File mDatabasePath;
@Rule
public MigrationTestHelper mMigrationTestHelper = new MigrationTestHelper(
- InstrumentationRegistry.getInstrumentation(),
- WorkDatabase.class,
- new ArrayList<>(),
- new FrameworkSQLiteOpenHelperFactory());
+ InstrumentationRegistry.getInstrumentation(), WorkDatabase.class);
@Before
public void setUp() {
@@ -145,7 +147,7 @@
UUID.randomUUID().toString()
};
for (String workSpecId : prepopulatedWorkSpecIds) {
- ContentValues contentValues = contentValues(workSpecId);
+ ContentValues contentValues = contentValuesPre8(workSpecId);
database.insert("workspec", CONFLICT_FAIL, contentValues);
if (workSpecId.equals(prepopulatedWorkSpecIds[0])) {
@@ -236,11 +238,11 @@
String oneTimeWorkSpecId = UUID.randomUUID().toString();
long scheduleRequestedAt = System.currentTimeMillis();
- ContentValues oneTimeWorkSpecContentValues = contentValues(oneTimeWorkSpecId);
+ ContentValues oneTimeWorkSpecContentValues = contentValuesPre8(oneTimeWorkSpecId);
oneTimeWorkSpecContentValues.put("schedule_requested_at", scheduleRequestedAt);
String periodicWorkSpecId = UUID.randomUUID().toString();
- ContentValues periodicWorkSpecContentValues = contentValues(periodicWorkSpecId);
+ ContentValues periodicWorkSpecContentValues = contentValuesPre8(periodicWorkSpecId);
periodicWorkSpecContentValues.put("interval_duration", 15 * 60 * 1000L);
database.insert("workspec", CONFLICT_FAIL, oneTimeWorkSpecContentValues);
@@ -458,8 +460,61 @@
database.close();
}
+ @Test
+ @MediumTest
+ public void testMigrationVersion12To14Network() throws IOException {
+ SupportSQLiteDatabase database =
+ mMigrationTestHelper.createDatabase(TEST_DATABASE, VERSION_12);
+ String nullNetworkTypeRequestId = UUID.randomUUID().toString();
+ ContentValues nullRequiredNetworkTypeRequest = contentValues(nullNetworkTypeRequestId);
+ nullRequiredNetworkTypeRequest.put(REQUIRED_NETWORK_TYPE, (String) null);
+
+ String connectedRequestId = UUID.randomUUID().toString();
+ ContentValues connectedRequest = contentValues(connectedRequestId);
+ connectedRequest.put(REQUIRED_NETWORK_TYPE, 1);
+
+ database.insert("workspec", CONFLICT_FAIL, nullRequiredNetworkTypeRequest);
+ database.insert("workspec", CONFLICT_FAIL, connectedRequest);
+
+ mMigrationTestHelper.runMigrationsAndValidate(TEST_DATABASE, VERSION_14,
+ true, Migration_12_13.INSTANCE);
+
+ assertThat(queryRequiredNetworkType(database, nullNetworkTypeRequestId), is(0));
+ assertThat(queryRequiredNetworkType(database, connectedRequestId), is(1));
+ database.close();
+ }
+
+
+ @Test
+ @MediumTest
+ public void testMigrationVersion12To14NetworkContentUris() throws IOException {
+ SupportSQLiteDatabase database =
+ mMigrationTestHelper.createDatabase(TEST_DATABASE, VERSION_12);
+ String nullContentUrisId = UUID.randomUUID().toString();
+ ContentValues nullContentUris = contentValues(nullContentUrisId);
+ nullContentUris.put(CONTENT_URI_TRIGGERS, (String) null);
+
+ String contentUrisId = UUID.randomUUID().toString();
+ Set<ContentUriTrigger> triggers = new HashSet<>();
+ triggers.add(new ContentUriTrigger(Uri.parse("http://cs.android.com"), false));
+ ContentValues contentUrisRequest = contentValues(contentUrisId);
+ contentUrisRequest.put(CONTENT_URI_TRIGGERS,
+ WorkTypeConverters.setOfTriggersToByteArray(triggers));
+
+ database.insert("workspec", CONFLICT_FAIL, nullContentUris);
+ database.insert("workspec", CONFLICT_FAIL, contentUrisRequest);
+
+ mMigrationTestHelper.runMigrationsAndValidate(TEST_DATABASE, VERSION_14,
+ true, Migration_12_13.INSTANCE);
+
+ assertThat(queryContentUris(database, nullContentUrisId).size(), is(0));
+ assertThat(queryContentUris(database, contentUrisId), is(triggers));
+ database.close();
+ }
+
+ // doesn't have COLUMN_RUN_IN_FOREGROUND
@NonNull
- private ContentValues contentValues(String workSpecId) {
+ private ContentValues contentValuesPre8(String workSpecId) {
ContentValues contentValues = new ContentValues();
contentValues.put("id", workSpecId);
contentValues.put("state", WorkTypeConverters.StateIds.ENQUEUED);
@@ -475,8 +530,7 @@
contentValues.put("requires_device_idle", false);
contentValues.put("requires_battery_not_low", false);
contentValues.put("requires_storage_not_low", false);
- contentValues.put("content_uri_triggers",
- WorkTypeConverters.contentUriTriggersToByteArray(new ContentUriTriggers()));
+ contentValues.put("content_uri_triggers", new byte[0]);
contentValues.put("run_attempt_count", 0);
contentValues.put("backoff_policy",
WorkTypeConverters.backoffPolicyToInt(BackoffPolicy.EXPONENTIAL));
@@ -487,6 +541,16 @@
return contentValues;
}
+ private ContentValues contentValues(String workSpecId) {
+ ContentValues contentValues = contentValuesPre8(workSpecId);
+ contentValues.put(REQUIRED_NETWORK_TYPE, 0);
+ contentValues.put(COLUMN_RUN_IN_FOREGROUND, false);
+ contentValues.put(COLUMN_OUT_OF_QUOTA_POLICY, 0);
+ contentValues.put(TRIGGER_CONTENT_UPDATE_DELAY, -1);
+ contentValues.put(TRIGGER_MAX_CONTENT_DELAY, -1);
+ return contentValues;
+ }
+
private boolean checkExists(SupportSQLiteDatabase database, String tableName) {
Cursor cursor = null;
try {
@@ -553,4 +617,25 @@
}
}
}
+
+ private static int queryRequiredNetworkType(SupportSQLiteDatabase db, String workSpecId) {
+ Cursor migratedNull = db.query(
+ "SELECT required_network_type FROM workspec where id = ?",
+ new Object[]{workSpecId});
+ migratedNull.moveToFirst();
+ int networkType = migratedNull.getInt(migratedNull.getColumnIndex(REQUIRED_NETWORK_TYPE));
+ migratedNull.close();
+ return networkType;
+ }
+
+ private static Set<ContentUriTrigger> queryContentUris(
+ SupportSQLiteDatabase db, String workSpecId) {
+ Cursor migratedNull = db.query(
+ "SELECT content_uri_triggers FROM workspec where id = ?",
+ new Object[]{workSpecId});
+ migratedNull.moveToFirst();
+ byte[] blob = migratedNull.getBlob(migratedNull.getColumnIndex(CONTENT_URI_TRIGGERS));
+ migratedNull.close();
+ return WorkTypeConverters.byteArrayToSetOfTriggers(blob);
+ }
}
diff --git a/work/work-runtime/src/androidTest/java/androidx/work/impl/ControlledWorkerWrapperTest.kt b/work/work-runtime/src/androidTest/java/androidx/work/impl/ControlledWorkerWrapperTest.kt
index 63e7b08..a120b4f 100644
--- a/work/work-runtime/src/androidTest/java/androidx/work/impl/ControlledWorkerWrapperTest.kt
+++ b/work/work-runtime/src/androidTest/java/androidx/work/impl/ControlledWorkerWrapperTest.kt
@@ -169,6 +169,10 @@
override fun stopForeground(workSpecId: String) {
}
+
+ override fun isEnqueuedInForeground(workSpecId: String): Boolean {
+ return false
+ }
}
class ManualExecutor : Executor {
diff --git a/work/work-runtime/src/androidTest/java/androidx/work/impl/WorkManagerImplTest.java b/work/work-runtime/src/androidTest/java/androidx/work/impl/WorkManagerImplTest.java
index 69fab95..6466a6c 100644
--- a/work/work-runtime/src/androidTest/java/androidx/work/impl/WorkManagerImplTest.java
+++ b/work/work-runtime/src/androidTest/java/androidx/work/impl/WorkManagerImplTest.java
@@ -81,7 +81,7 @@
import androidx.work.BackoffPolicy;
import androidx.work.Configuration;
import androidx.work.Constraints;
-import androidx.work.ContentUriTriggers;
+import androidx.work.Constraints.ContentUriTrigger;
import androidx.work.Data;
import androidx.work.ExistingPeriodicWorkPolicy;
import androidx.work.OneTimeWorkRequest;
@@ -116,7 +116,9 @@
import java.util.Arrays;
import java.util.Collections;
+import java.util.HashSet;
import java.util.List;
+import java.util.Set;
import java.util.UUID;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Executors;
@@ -375,9 +377,9 @@
WorkSpec workSpec0 = mDatabase.workSpecDao().getWorkSpec(work0.getStringId());
WorkSpec workSpec1 = mDatabase.workSpecDao().getWorkSpec(work1.getStringId());
- ContentUriTriggers expectedTriggers = new ContentUriTriggers();
- expectedTriggers.add(testUri1, true);
- expectedTriggers.add(testUri2, false);
+ Set<ContentUriTrigger> expectedTriggers = new HashSet<>();
+ expectedTriggers.add(new ContentUriTrigger(testUri1, true));
+ expectedTriggers.add(new ContentUriTrigger(testUri2, false));
Constraints constraints = workSpec0.constraints;
assertThat(constraints, is(notNullValue()));
@@ -389,7 +391,7 @@
if (Build.VERSION.SDK_INT >= 24) {
assertThat(constraints.getContentUriTriggers(), is(expectedTriggers));
} else {
- assertThat(constraints.getContentUriTriggers(), is(new ContentUriTriggers()));
+ assertThat(constraints.getContentUriTriggers(), is(new HashSet<ContentUriTrigger>()));
}
constraints = workSpec1.constraints;
diff --git a/work/work-runtime/src/androidTest/java/androidx/work/impl/workers/ConstraintTrackingWorkerTest.java b/work/work-runtime/src/androidTest/java/androidx/work/impl/workers/ConstraintTrackingWorkerTest.java
index 532c261..d1ed219 100644
--- a/work/work-runtime/src/androidTest/java/androidx/work/impl/workers/ConstraintTrackingWorkerTest.java
+++ b/work/work-runtime/src/androidTest/java/androidx/work/impl/workers/ConstraintTrackingWorkerTest.java
@@ -306,7 +306,7 @@
mWorkerWrapper.interrupt();
executorService.shutdown();
- assertThat(mWorker.isRunInForeground(), is(true));
+ verify(mForegroundProcessor).isEnqueuedInForeground(mWork.getStringId());
assertThat(mWorker.isStopped(), is(true));
assertThat(mWorker.getDelegate(), is(notNullValue()));
assertThat(mWorker.getDelegate().isStopped(), is(true));
diff --git a/work/work-runtime/src/main/aidl/androidx/work/multiprocess/IWorkManagerImpl.aidl b/work/work-runtime/src/main/aidl/androidx/work/multiprocess/IWorkManagerImpl.aidl
index 84da29b..d80672d 100644
--- a/work/work-runtime/src/main/aidl/androidx/work/multiprocess/IWorkManagerImpl.aidl
+++ b/work/work-runtime/src/main/aidl/androidx/work/multiprocess/IWorkManagerImpl.aidl
@@ -37,4 +37,6 @@
void queryWorkInfo(in byte[] request, IWorkManagerImplCallback callback);
// Progress APIs
void setProgress(in byte[] request, IWorkManagerImplCallback callback);
+ // Foreground Info APIs
+ void setForegroundAsync(in byte[] request, IWorkManagerImplCallback callback);
}
diff --git a/work/work-runtime/src/main/java/androidx/work/Constraints.java b/work/work-runtime/src/main/java/androidx/work/Constraints.java
deleted file mode 100644
index a039538..0000000
--- a/work/work-runtime/src/main/java/androidx/work/Constraints.java
+++ /dev/null
@@ -1,478 +0,0 @@
-/*
- * Copyright 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package androidx.work;
-
-import static androidx.work.NetworkType.NOT_REQUIRED;
-
-import android.net.Uri;
-import android.os.Build;
-
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-import androidx.annotation.RequiresApi;
-import androidx.annotation.RestrictTo;
-import androidx.room.ColumnInfo;
-import androidx.work.impl.utils.DurationApi26Impl;
-
-import java.time.Duration;
-import java.util.concurrent.TimeUnit;
-
-/**
- * A specification of the requirements that need to be met before a {@link WorkRequest} can run. By
- * default, WorkRequests do not have any requirements and can run immediately. By adding
- * requirements, you can make sure that work only runs in certain situations - for example, when you
- * have an unmetered network and are charging.
- */
-
-public final class Constraints {
-
- /**
- * Represents a Constraints object with no requirements.
- */
- public static final Constraints NONE = new Constraints.Builder().build();
-
- // NOTE: this is effectively a @NonNull, but changing the annotation would result in a really
- // annoying database migration that we can deal with later.
- @ColumnInfo(name = "required_network_type")
- private NetworkType mRequiredNetworkType = NOT_REQUIRED;
-
- @ColumnInfo(name = "requires_charging")
- private boolean mRequiresCharging;
-
- @ColumnInfo(name = "requires_device_idle")
- private boolean mRequiresDeviceIdle;
-
- @ColumnInfo(name = "requires_battery_not_low")
- private boolean mRequiresBatteryNotLow;
-
- @ColumnInfo(name = "requires_storage_not_low")
- private boolean mRequiresStorageNotLow;
-
- @ColumnInfo(name = "trigger_content_update_delay")
- private long mTriggerContentUpdateDelay = -1;
-
- @ColumnInfo(name = "trigger_max_content_delay")
- private long mTriggerMaxContentDelay = -1;
-
- // NOTE: this is effectively a @NonNull, but changing the annotation would result in a really
- // annoying database migration that we can deal with later.
- @ColumnInfo(name = "content_uri_triggers")
- private ContentUriTriggers mContentUriTriggers = new ContentUriTriggers();
-
- /**
- * @hide
- */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
- public Constraints() { // stub required for room
- }
-
- Constraints(Builder builder) {
- mRequiresCharging = builder.mRequiresCharging;
- mRequiresDeviceIdle = Build.VERSION.SDK_INT >= 23 && builder.mRequiresDeviceIdle;
- mRequiredNetworkType = builder.mRequiredNetworkType;
- mRequiresBatteryNotLow = builder.mRequiresBatteryNotLow;
- mRequiresStorageNotLow = builder.mRequiresStorageNotLow;
- if (Build.VERSION.SDK_INT >= 24) {
- mContentUriTriggers = builder.mContentUriTriggers;
- mTriggerContentUpdateDelay = builder.mTriggerContentUpdateDelay;
- mTriggerMaxContentDelay = builder.mTriggerContentMaxDelay;
- }
- }
-
- public Constraints(@NonNull Constraints other) {
- mRequiresCharging = other.mRequiresCharging;
- mRequiresDeviceIdle = other.mRequiresDeviceIdle;
- mRequiredNetworkType = other.mRequiredNetworkType;
- mRequiresBatteryNotLow = other.mRequiresBatteryNotLow;
- mRequiresStorageNotLow = other.mRequiresStorageNotLow;
- mContentUriTriggers = other.mContentUriTriggers;
- }
-
- public @NonNull NetworkType getRequiredNetworkType() {
- return mRequiredNetworkType;
- }
-
- /**
- * Needed by Room.
- * @hide
- */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
- public void setRequiredNetworkType(@NonNull NetworkType requiredNetworkType) {
- mRequiredNetworkType = requiredNetworkType;
- }
-
- /**
- * @return {@code true} if the work should only execute while the device is charging
- */
- public boolean requiresCharging() {
- return mRequiresCharging;
- }
-
- /**
- * Needed by Room.
- * @hide
- */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
- public void setRequiresCharging(boolean requiresCharging) {
- mRequiresCharging = requiresCharging;
- }
-
- /**
- * @return {@code true} if the work should only execute while the device is idle
- */
- @RequiresApi(23)
- public boolean requiresDeviceIdle() {
- return mRequiresDeviceIdle;
- }
-
- /**
- * Needed by Room.
- * @hide
- */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
- @RequiresApi(23)
- public void setRequiresDeviceIdle(boolean requiresDeviceIdle) {
- mRequiresDeviceIdle = requiresDeviceIdle;
- }
-
- /**
- * @return {@code true} if the work should only execute when the battery isn't low
- */
- public boolean requiresBatteryNotLow() {
- return mRequiresBatteryNotLow;
- }
-
- /**
- * Needed by Room.
- * @hide
- */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
- public void setRequiresBatteryNotLow(boolean requiresBatteryNotLow) {
- mRequiresBatteryNotLow = requiresBatteryNotLow;
- }
-
- /**
- * @return {@code true} if the work should only execute when the storage isn't low
- */
- public boolean requiresStorageNotLow() {
- return mRequiresStorageNotLow;
- }
-
- /**
- * Needed by Room.
- * @hide
- */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
- public void setRequiresStorageNotLow(boolean requiresStorageNotLow) {
- mRequiresStorageNotLow = requiresStorageNotLow;
- }
-
- /**
- * Needed by Room.
- * @hide
- */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
- public long getTriggerContentUpdateDelay() {
- return mTriggerContentUpdateDelay;
- }
-
- /**
- * Needed by Room.
- * @hide
- */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
- public void setTriggerContentUpdateDelay(long triggerContentUpdateDelay) {
- mTriggerContentUpdateDelay = triggerContentUpdateDelay;
- }
-
- /**
- * Needed by Room.
- * @hide
- */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
- public long getTriggerMaxContentDelay() {
- return mTriggerMaxContentDelay;
- }
-
- /**
- * Needed by Room.
- * @hide
- */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
- public void setTriggerMaxContentDelay(long triggerMaxContentDelay) {
- mTriggerMaxContentDelay = triggerMaxContentDelay;
- }
-
- /**
- * Needed by Room.
- * @hide
- */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
- @RequiresApi(24)
- public void setContentUriTriggers(@Nullable ContentUriTriggers mContentUriTriggers) {
- this.mContentUriTriggers = mContentUriTriggers;
- }
-
- /**
- * @hide
- */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
- @RequiresApi(24)
- public @NonNull ContentUriTriggers getContentUriTriggers() {
- return mContentUriTriggers;
- }
-
- /**
- * @return {@code true} if {@link ContentUriTriggers} is not empty
- * @hide
- */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
- @RequiresApi(24)
- public boolean hasContentUriTriggers() {
- return mContentUriTriggers.size() > 0;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
-
- Constraints that = (Constraints) o;
-
- if (mRequiresCharging != that.mRequiresCharging) return false;
- if (mRequiresDeviceIdle != that.mRequiresDeviceIdle) return false;
- if (mRequiresBatteryNotLow != that.mRequiresBatteryNotLow) return false;
- if (mRequiresStorageNotLow != that.mRequiresStorageNotLow) return false;
- if (mTriggerContentUpdateDelay != that.mTriggerContentUpdateDelay) return false;
- if (mTriggerMaxContentDelay != that.mTriggerMaxContentDelay) return false;
- if (mRequiredNetworkType != that.mRequiredNetworkType) return false;
- return mContentUriTriggers.equals(that.mContentUriTriggers);
- }
-
- @Override
- public int hashCode() {
- int result = mRequiredNetworkType.hashCode();
- result = 31 * result + (mRequiresCharging ? 1 : 0);
- result = 31 * result + (mRequiresDeviceIdle ? 1 : 0);
- result = 31 * result + (mRequiresBatteryNotLow ? 1 : 0);
- result = 31 * result + (mRequiresStorageNotLow ? 1 : 0);
- result = 31 * result + (int) (mTriggerContentUpdateDelay ^ (mTriggerContentUpdateDelay
- >>> 32));
- result = 31 * result + (int) (mTriggerMaxContentDelay ^ (mTriggerMaxContentDelay >>> 32));
- result = 31 * result + mContentUriTriggers.hashCode();
- return result;
- }
-
- /**
- * A Builder for a {@link Constraints} object.
- */
- public static final class Builder {
- boolean mRequiresCharging = false;
- boolean mRequiresDeviceIdle = false;
- NetworkType mRequiredNetworkType = NOT_REQUIRED;
- boolean mRequiresBatteryNotLow = false;
- boolean mRequiresStorageNotLow = false;
- // Same defaults as JobInfo
- long mTriggerContentUpdateDelay = -1;
- long mTriggerContentMaxDelay = -1;
- ContentUriTriggers mContentUriTriggers = new ContentUriTriggers();
-
- public Builder() {
- // default public constructor
- }
-
- /**
- * @hide
- */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
- public Builder(@NonNull Constraints constraints) {
- mRequiresCharging = constraints.requiresCharging();
- mRequiresDeviceIdle = Build.VERSION.SDK_INT >= 23 && constraints.requiresDeviceIdle();
- mRequiredNetworkType = constraints.getRequiredNetworkType();
- mRequiresBatteryNotLow = constraints.requiresBatteryNotLow();
- mRequiresStorageNotLow = constraints.requiresStorageNotLow();
- if (Build.VERSION.SDK_INT >= 24) {
- mTriggerContentUpdateDelay = constraints.getTriggerContentUpdateDelay();
- mTriggerContentMaxDelay = constraints.getTriggerMaxContentDelay();
- mContentUriTriggers = constraints.getContentUriTriggers();
- }
- }
-
- /**
- * Sets whether device should be charging for the {@link WorkRequest} to run. The
- * default value is {@code false}.
- *
- * @param requiresCharging {@code true} if device must be charging for the work to run
- * @return The current {@link Builder}
- */
- public @NonNull Builder setRequiresCharging(boolean requiresCharging) {
- this.mRequiresCharging = requiresCharging;
- return this;
- }
-
- /**
- * Sets whether device should be idle for the {@link WorkRequest} to run. The default
- * value is {@code false}.
- *
- * @param requiresDeviceIdle {@code true} if device must be idle for the work to run
- * @return The current {@link Builder}
- */
- @RequiresApi(23)
- public @NonNull Builder setRequiresDeviceIdle(boolean requiresDeviceIdle) {
- this.mRequiresDeviceIdle = requiresDeviceIdle;
- return this;
- }
-
- /**
- * Sets whether device should have a particular {@link NetworkType} for the
- * {@link WorkRequest} to run. The default value is {@link NetworkType#NOT_REQUIRED}.
- *
- * @param networkType The type of network required for the work to run
- * @return The current {@link Builder}
- */
- public @NonNull Builder setRequiredNetworkType(@NonNull NetworkType networkType) {
- this.mRequiredNetworkType = networkType;
- return this;
- }
-
- /**
- * Sets whether device battery should be at an acceptable level for the
- * {@link WorkRequest} to run. The default value is {@code false}.
- *
- * @param requiresBatteryNotLow {@code true} if the battery should be at an acceptable level
- * for the work to run
- * @return The current {@link Builder}
- */
- public @NonNull Builder setRequiresBatteryNotLow(boolean requiresBatteryNotLow) {
- this.mRequiresBatteryNotLow = requiresBatteryNotLow;
- return this;
- }
-
- /**
- * Sets whether the device's available storage should be at an acceptable level for the
- * {@link WorkRequest} to run. The default value is {@code false}.
- *
- * @param requiresStorageNotLow {@code true} if the available storage should not be below a
- * a critical threshold for the work to run
- * @return The current {@link Builder}
- */
- public @NonNull Builder setRequiresStorageNotLow(boolean requiresStorageNotLow) {
- this.mRequiresStorageNotLow = requiresStorageNotLow;
- return this;
- }
-
- /**
- * Sets whether the {@link WorkRequest} should run when a local {@code content:} {@link Uri}
- * is updated. This functionality is identical to the one found in {@code JobScheduler} and
- * is described in
- * {@code JobInfo.Builder#addTriggerContentUri(android.app.job.JobInfo.TriggerContentUri)}.
- *
- * @param uri The local {@code content:} Uri to observe
- * @param triggerForDescendants {@code true} if any changes in descendants cause this
- * {@link WorkRequest} to run
- * @return The current {@link Builder}
- */
- @RequiresApi(24)
- public @NonNull Builder addContentUriTrigger(
- @NonNull Uri uri,
- boolean triggerForDescendants) {
- mContentUriTriggers.add(uri, triggerForDescendants);
- return this;
- }
-
- /**
- * Sets the delay that is allowed from the time a {@code content:} {@link Uri}
- * change is detected to the time when the {@link WorkRequest} is scheduled. If there are
- * more changes during this time, the delay will be reset to the start of the most recent
- * change. This functionality is identical to the one found in {@code JobScheduler} and
- * is described in {@code JobInfo.Builder#setTriggerContentUpdateDelay(long)}.
- *
- * @param duration The length of the delay in {@code timeUnit} units
- * @param timeUnit The units of time for {@code duration}
- * @return The current {@link Builder}
- */
- @RequiresApi(24)
- @NonNull
- public Builder setTriggerContentUpdateDelay(
- long duration,
- @NonNull TimeUnit timeUnit) {
- mTriggerContentUpdateDelay = timeUnit.toMillis(duration);
- return this;
- }
-
- /**
- * Sets the delay that is allowed from the time a {@code content:} {@link Uri} change
- * is detected to the time when the {@link WorkRequest} is scheduled. If there are more
- * changes during this time, the delay will be reset to the start of the most recent change.
- * This functionality is identical to the one found in {@code JobScheduler} and
- * is described in {@code JobInfo.Builder#setTriggerContentUpdateDelay(long)}.
- *
- * @param duration The length of the delay
- * @return The current {@link Builder}
- */
- @RequiresApi(26)
- @NonNull
- public Builder setTriggerContentUpdateDelay(Duration duration) {
- mTriggerContentUpdateDelay = DurationApi26Impl.toMillisCompat(duration);
- return this;
- }
-
- /**
- * Sets the maximum delay that is allowed from the first time a {@code content:}
- * {@link Uri} change is detected to the time when the {@link WorkRequest} is scheduled.
- * This functionality is identical to the one found in {@code JobScheduler} and
- * is described in {@code JobInfo.Builder#setTriggerContentMaxDelay(long)}.
- *
- * @param duration The length of the delay in {@code timeUnit} units
- * @param timeUnit The units of time for {@code duration}
- * @return The current {@link Builder}
- */
- @RequiresApi(24)
- @NonNull
- public Builder setTriggerContentMaxDelay(
- long duration,
- @NonNull TimeUnit timeUnit) {
- mTriggerContentMaxDelay = timeUnit.toMillis(duration);
- return this;
- }
-
- /**
- * Sets the maximum delay that is allowed from the first time a {@code content:} {@link Uri}
- * change is detected to the time when the {@link WorkRequest} is scheduled. This
- * functionality is identical to the one found in {@code JobScheduler} and is described
- * in {@code JobInfo.Builder#setTriggerContentMaxDelay(long)}.
- *
- * @param duration The length of the delay
- * @return The current {@link Builder}
- */
- @RequiresApi(26)
- @NonNull
- public Builder setTriggerContentMaxDelay(Duration duration) {
- mTriggerContentMaxDelay = DurationApi26Impl.toMillisCompat(duration);
- return this;
- }
-
- /**
- * Generates the {@link Constraints} from this Builder.
- *
- * @return The {@link Constraints} specified by this Builder
- */
- public @NonNull Constraints build() {
- return new Constraints(this);
- }
- }
-}
diff --git a/work/work-runtime/src/main/java/androidx/work/Constraints.kt b/work/work-runtime/src/main/java/androidx/work/Constraints.kt
new file mode 100644
index 0000000..904eedd
--- /dev/null
+++ b/work/work-runtime/src/main/java/androidx/work/Constraints.kt
@@ -0,0 +1,387 @@
+/*
+ * Copyright 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package androidx.work
+
+import android.net.Uri
+import android.os.Build
+import androidx.annotation.RequiresApi
+import androidx.annotation.RestrictTo
+import androidx.room.ColumnInfo
+import androidx.work.impl.utils.toMillisCompat
+import java.time.Duration
+import java.util.concurrent.TimeUnit
+
+/**
+ * A specification of the requirements that need to be met before a [WorkRequest] can run. By
+ * default, WorkRequests do not have any requirements and can run immediately. By adding
+ * requirements, you can make sure that work only runs in certain situations - for example, when you
+ * have an unmetered network and are charging.
+ */
+class Constraints
+@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+constructor(
+ @ColumnInfo(name = "required_network_type")
+ val requiredNetworkType: NetworkType = NetworkType.NOT_REQUIRED,
+ @ColumnInfo(name = "requires_charging")
+ private val requiresCharging: Boolean = false,
+ @ColumnInfo(name = "requires_device_idle")
+ private val requiresDeviceIdle: Boolean = false,
+ @ColumnInfo(name = "requires_battery_not_low")
+ private val requiresBatteryNotLow: Boolean = false,
+ @ColumnInfo(name = "requires_storage_not_low")
+ private val requiresStorageNotLow: Boolean,
+ /**
+ * Needed by Room.
+ * @hide
+ */
+ @get:RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+ @ColumnInfo(name = "trigger_content_update_delay")
+ val triggerContentUpdateDelay: Long = -1,
+ /**
+ * Needed by Room.
+ * @hide
+ */
+ @get:RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+ @ColumnInfo(name = "trigger_max_content_delay")
+ val triggerMaxContentDelay: Long = -1,
+ @get:RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+ @ColumnInfo(name = "content_uri_triggers")
+ val contentUriTriggers: Set<ContentUriTrigger> = setOf(),
+) {
+ constructor(other: Constraints) : this(
+ requiresCharging = other.requiresCharging,
+ requiresDeviceIdle = other.requiresDeviceIdle,
+ requiredNetworkType = other.requiredNetworkType,
+ requiresBatteryNotLow = other.requiresBatteryNotLow,
+ requiresStorageNotLow = other.requiresStorageNotLow,
+ contentUriTriggers = other.contentUriTriggers,
+ triggerContentUpdateDelay = other.triggerContentUpdateDelay,
+ triggerMaxContentDelay = other.triggerMaxContentDelay,
+ )
+
+ /**
+ * @return `true` if the work should only execute while the device is charging
+ */
+ fun requiresCharging(): Boolean {
+ return requiresCharging
+ }
+ /**
+ * @return `true` if the work should only execute while the device is idle
+ */
+ @RequiresApi(23)
+ fun requiresDeviceIdle(): Boolean {
+ return requiresDeviceIdle
+ }
+
+ /**
+ * @return `true` if the work should only execute when the battery isn't low
+ */
+ fun requiresBatteryNotLow(): Boolean {
+ return requiresBatteryNotLow
+ }
+
+ /**
+ * @return `true` if the work should only execute when the storage isn't low
+ */
+ fun requiresStorageNotLow(): Boolean {
+ return requiresStorageNotLow
+ }
+
+ /**
+ * @return `true` if [ContentUriTrigger] is not empty
+ * @hide
+ */
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+ fun hasContentUriTriggers(): Boolean {
+ return contentUriTriggers.isNotEmpty()
+ }
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) return true
+ if (other == null || javaClass != other.javaClass) return false
+ val that = other as Constraints
+ if (requiresCharging != that.requiresCharging) return false
+ if (requiresDeviceIdle != that.requiresDeviceIdle) return false
+ if (requiresBatteryNotLow != that.requiresBatteryNotLow) return false
+ if (requiresStorageNotLow != that.requiresStorageNotLow) return false
+ if (triggerContentUpdateDelay != that.triggerContentUpdateDelay) return false
+ if (triggerMaxContentDelay != that.triggerMaxContentDelay) return false
+ return if (requiredNetworkType != that.requiredNetworkType) false
+ else contentUriTriggers == that.contentUriTriggers
+ }
+
+ override fun hashCode(): Int {
+ var result = requiredNetworkType.hashCode()
+ result = 31 * result + if (requiresCharging) 1 else 0
+ result = 31 * result + if (requiresDeviceIdle) 1 else 0
+ result = 31 * result + if (requiresBatteryNotLow) 1 else 0
+ result = 31 * result + if (requiresStorageNotLow) 1 else 0
+ result = 31 * result + (triggerContentUpdateDelay xor (triggerContentUpdateDelay
+ ushr 32)).toInt()
+ result = 31 * result + (triggerMaxContentDelay xor (triggerMaxContentDelay ushr 32)).toInt()
+ result = 31 * result + contentUriTriggers.hashCode()
+ return result
+ }
+
+ /**
+ * A Builder for a [Constraints] object.
+ */
+ class Builder {
+ private var requiresCharging = false
+ private var requiresDeviceIdle = false
+ private var requiredNetworkType = NetworkType.NOT_REQUIRED
+ private var requiresBatteryNotLow = false
+ private var requiresStorageNotLow = false
+ // Same defaults as JobInfo
+ private var triggerContentUpdateDelay: Long = -1
+ private var triggerContentMaxDelay: Long = -1
+ private var contentUriTriggers = mutableSetOf<ContentUriTrigger>()
+
+ constructor() {
+ // default public constructor
+ }
+
+ /**
+ * @hide
+ */
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+ constructor(constraints: Constraints) {
+ requiresCharging = constraints.requiresCharging()
+ requiresDeviceIdle = Build.VERSION.SDK_INT >= 23 && constraints.requiresDeviceIdle()
+ requiredNetworkType = constraints.requiredNetworkType
+ requiresBatteryNotLow = constraints.requiresBatteryNotLow()
+ requiresStorageNotLow = constraints.requiresStorageNotLow()
+ if (Build.VERSION.SDK_INT >= 24) {
+ triggerContentUpdateDelay = constraints.triggerContentUpdateDelay
+ triggerContentMaxDelay = constraints.triggerMaxContentDelay
+ contentUriTriggers = constraints.contentUriTriggers.toMutableSet()
+ }
+ }
+
+ /**
+ * Sets whether device should be charging for the [WorkRequest] to run. The
+ * default value is `false`.
+ *
+ * @param requiresCharging `true` if device must be charging for the work to run
+ * @return The current [Builder]
+ */
+ fun setRequiresCharging(requiresCharging: Boolean): Builder {
+ this.requiresCharging = requiresCharging
+ return this
+ }
+
+ /**
+ * Sets whether device should be idle for the [WorkRequest] to run. The default
+ * value is `false`.
+ *
+ * @param requiresDeviceIdle `true` if device must be idle for the work to run
+ * @return The current [Builder]
+ */
+ @RequiresApi(23)
+ fun setRequiresDeviceIdle(requiresDeviceIdle: Boolean): Builder {
+ this.requiresDeviceIdle = requiresDeviceIdle
+ return this
+ }
+
+ /**
+ * Sets whether device should have a particular [NetworkType] for the
+ * [WorkRequest] to run. The default value is [NetworkType.NOT_REQUIRED].
+ *
+ * @param networkType The type of network required for the work to run
+ * @return The current [Builder]
+ */
+ fun setRequiredNetworkType(networkType: NetworkType): Builder {
+ requiredNetworkType = networkType
+ return this
+ }
+
+ /**
+ * Sets whether device battery should be at an acceptable level for the
+ * [WorkRequest] to run. The default value is `false`.
+ *
+ * @param requiresBatteryNotLow `true` if the battery should be at an acceptable level
+ * for the work to run
+ * @return The current [Builder]
+ */
+ fun setRequiresBatteryNotLow(requiresBatteryNotLow: Boolean): Builder {
+ this.requiresBatteryNotLow = requiresBatteryNotLow
+ return this
+ }
+
+ /**
+ * Sets whether the device's available storage should be at an acceptable level for the
+ * [WorkRequest] to run. The default value is `false`.
+ *
+ * @param requiresStorageNotLow `true` if the available storage should not be below a
+ * a critical threshold for the work to run
+ * @return The current [Builder]
+ */
+ fun setRequiresStorageNotLow(requiresStorageNotLow: Boolean): Builder {
+ this.requiresStorageNotLow = requiresStorageNotLow
+ return this
+ }
+
+ /**
+ * Sets whether the [WorkRequest] should run when a local `content:` [Uri]
+ * is updated. This functionality is identical to the one found in `JobScheduler` and
+ * is described in
+ * `JobInfo.Builder#addTriggerContentUri(android.app.job.JobInfo.TriggerContentUri)`.
+ *
+ * @param uri The local `content:` Uri to observe
+ * @param triggerForDescendants `true` if any changes in descendants cause this
+ * [WorkRequest] to run
+ * @return The current [Builder]
+ */
+ @RequiresApi(24)
+ fun addContentUriTrigger(uri: Uri, triggerForDescendants: Boolean): Builder {
+ contentUriTriggers.add(ContentUriTrigger(uri, triggerForDescendants))
+ return this
+ }
+
+ /**
+ * Sets the delay that is allowed from the time a `content:` [Uri]
+ * change is detected to the time when the [WorkRequest] is scheduled. If there are
+ * more changes during this time, the delay will be reset to the start of the most recent
+ * change. This functionality is identical to the one found in `JobScheduler` and
+ * is described in `JobInfo.Builder#setTriggerContentUpdateDelay(long)`.
+ *
+ * @param duration The length of the delay in `timeUnit` units
+ * @param timeUnit The units of time for `duration`
+ * @return The current [Builder]
+ */
+ @RequiresApi(24)
+ fun setTriggerContentUpdateDelay(duration: Long, timeUnit: TimeUnit): Builder {
+ triggerContentUpdateDelay = timeUnit.toMillis(duration)
+ return this
+ }
+
+ /**
+ * Sets the delay that is allowed from the time a `content:` [Uri] change
+ * is detected to the time when the [WorkRequest] is scheduled. If there are more
+ * changes during this time, the delay will be reset to the start of the most recent change.
+ * This functionality is identical to the one found in `JobScheduler` and
+ * is described in `JobInfo.Builder#setTriggerContentUpdateDelay(long)`.
+ *
+ * @param duration The length of the delay
+ * @return The current [Builder]
+ */
+ @RequiresApi(26)
+ fun setTriggerContentUpdateDelay(duration: Duration): Builder {
+ triggerContentUpdateDelay = duration.toMillisCompat()
+ return this
+ }
+
+ /**
+ * Sets the maximum delay that is allowed from the first time a `content:`
+ * [Uri] change is detected to the time when the [WorkRequest] is scheduled.
+ * This functionality is identical to the one found in `JobScheduler` and
+ * is described in `JobInfo.Builder#setTriggerContentMaxDelay(long)`.
+ *
+ * @param duration The length of the delay in `timeUnit` units
+ * @param timeUnit The units of time for `duration`
+ * @return The current [Builder]
+ */
+ @RequiresApi(24)
+ fun setTriggerContentMaxDelay(duration: Long, timeUnit: TimeUnit): Builder {
+ triggerContentMaxDelay = timeUnit.toMillis(duration)
+ return this
+ }
+
+ /**
+ * Sets the maximum delay that is allowed from the first time a `content:` [Uri]
+ * change is detected to the time when the [WorkRequest] is scheduled. This
+ * functionality is identical to the one found in `JobScheduler` and is described
+ * in `JobInfo.Builder#setTriggerContentMaxDelay(long)`.
+ *
+ * @param duration The length of the delay
+ * @return The current [Builder]
+ */
+ @RequiresApi(26)
+ fun setTriggerContentMaxDelay(duration: Duration): Builder {
+ triggerContentMaxDelay = duration.toMillisCompat()
+ return this
+ }
+
+ /**
+ * Generates the [Constraints] from this Builder.
+ *
+ * @return The [Constraints] specified by this Builder
+ */
+ fun build(): Constraints {
+ val contentUriTriggers: Set<ContentUriTrigger>
+ val triggerContentUpdateDelay: Long
+ val triggerMaxContentDelay: Long
+ if (Build.VERSION.SDK_INT >= 24) {
+ contentUriTriggers = this.contentUriTriggers.toSet()
+ triggerContentUpdateDelay = this.triggerContentUpdateDelay
+ triggerMaxContentDelay = triggerContentMaxDelay
+ } else {
+ contentUriTriggers = emptySet()
+ triggerContentUpdateDelay = -1
+ triggerMaxContentDelay = -1
+ }
+
+ return Constraints(
+ requiresCharging = requiresCharging,
+ requiresDeviceIdle = Build.VERSION.SDK_INT >= 23 && requiresDeviceIdle,
+ requiredNetworkType = requiredNetworkType,
+ requiresBatteryNotLow = requiresBatteryNotLow,
+ requiresStorageNotLow = requiresStorageNotLow,
+ triggerMaxContentDelay = triggerMaxContentDelay,
+ triggerContentUpdateDelay = triggerContentUpdateDelay,
+ contentUriTriggers = contentUriTriggers,
+ )
+ }
+ }
+
+ /**
+ * This class describes a content uri trigger on the [WorkRequest]: it should run when a local
+ * `content:` [Uri] is updated. This functionality is identical to the one found
+ * in `JobScheduler` and is described in
+ * `JobInfo.Builder#addTriggerContentUri(android.app.job.JobInfo.TriggerContentUri)`.
+ *
+ * @property uri The local `content:` Uri to observe
+ * @property triggerForDescendants `true` if trigger also applies to descendants of the [Uri]
+ */
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+ class ContentUriTrigger(val uri: Uri, val triggerForDescendants: Boolean) {
+ override fun equals(other: Any?): Boolean {
+ if (this === other) return true
+ if (javaClass != other?.javaClass) return false
+
+ other as ContentUriTrigger
+
+ if (uri != other.uri) return false
+ if (triggerForDescendants != other.triggerForDescendants) return false
+
+ return true
+ }
+
+ override fun hashCode(): Int {
+ var result = uri.hashCode()
+ result = 31 * result + triggerForDescendants.hashCode()
+ return result
+ }
+ }
+
+ companion object {
+ /**
+ * Represents a Constraints object with no requirements.
+ */
+ @JvmField
+ val NONE = Builder().build()
+ }
+}
diff --git a/work/work-runtime/src/main/java/androidx/work/ContentUriTriggers.java b/work/work-runtime/src/main/java/androidx/work/ContentUriTriggers.java
deleted file mode 100644
index a903dd0..0000000
--- a/work/work-runtime/src/main/java/androidx/work/ContentUriTriggers.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package androidx.work;
-
-import android.net.Uri;
-
-import androidx.annotation.NonNull;
-import androidx.annotation.RestrictTo;
-
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * A container for {@link Uri} {@link Trigger}s that caused a worker's {@link Constraints} to be
- * met.
- * <p>
- * When enqueuing work, you can add Uris or content authorities that should trigger the worker upon
- * update (see {@link Constraints.Builder#addContentUriTrigger(Uri, boolean)}). This class is an
- * encapsulation of those triggers.
- * <p>
- * This class and its behavior is intrinsically tied to {@code JobScheduler}.
- * @hide
- */
-@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
-public final class ContentUriTriggers {
-
- private final Set<Trigger> mTriggers = new HashSet<>();
-
- /**
- * Adds a content {@link Uri} for system observation
- *
- * @param uri {@link Uri} to observe
- * @param triggerForDescendants {@code true} if any changes in descendants cause this
- * {@link WorkRequest} to run
- */
- public void add(@NonNull Uri uri, boolean triggerForDescendants) {
- Trigger trigger = new Trigger(uri, triggerForDescendants);
- mTriggers.add(trigger);
- }
-
- public @NonNull Set<Trigger> getTriggers() {
- return mTriggers;
- }
-
- /**
- * @return number of {@link Trigger} objects
- */
- public int size() {
- return mTriggers.size();
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
-
- ContentUriTriggers that = (ContentUriTriggers) o;
-
- return mTriggers.equals(that.mTriggers);
- }
-
- @Override
- public int hashCode() {
- return mTriggers.hashCode();
- }
-
- /**
- * Defines a content {@link Uri} trigger for a {@link WorkRequest}.
- */
- public static final class Trigger {
- private final @NonNull Uri mUri;
- private final boolean mTriggerForDescendants;
-
- Trigger(@NonNull Uri uri, boolean triggerForDescendants) {
- mUri = uri;
- mTriggerForDescendants = triggerForDescendants;
- }
-
- /**
- * @return The {@link Uri} associated with this trigger
- */
- public @NonNull Uri getUri() {
- return mUri;
- }
-
- /**
- * @return {@code true} if trigger also applies to descendants of the {@link Uri}
- */
- public boolean shouldTriggerForDescendants() {
- return mTriggerForDescendants;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
-
- Trigger trigger = (Trigger) o;
-
- return mTriggerForDescendants == trigger.mTriggerForDescendants
- && mUri.equals(trigger.mUri);
- }
-
- @Override
- public int hashCode() {
- int result = mUri.hashCode();
- result = 31 * result + (mTriggerForDescendants ? 1 : 0);
- return result;
- }
- }
-}
diff --git a/work/work-runtime/src/main/java/androidx/work/ListenableWorker.java b/work/work-runtime/src/main/java/androidx/work/ListenableWorker.java
index 59c6aa3..9d5ff6e 100644
--- a/work/work-runtime/src/main/java/androidx/work/ListenableWorker.java
+++ b/work/work-runtime/src/main/java/androidx/work/ListenableWorker.java
@@ -66,7 +66,6 @@
private volatile boolean mStopped;
private boolean mUsed;
- private boolean mRunInForeground;
/**
* @param appContext The application {@link Context}
@@ -226,7 +225,6 @@
*/
@NonNull
public final ListenableFuture<Void> setForegroundAsync(@NonNull ForegroundInfo foregroundInfo) {
- mRunInForeground = true;
return mWorkerParams.getForegroundUpdater()
.setForegroundAsync(getApplicationContext(), getId(), foregroundInfo);
}
@@ -314,24 +312,6 @@
}
/**
- * @return {@code true} if the {@link ListenableWorker} is running in the context of a
- * foreground {@link android.app.Service}.
- * @hide
- */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
- public boolean isRunInForeground() {
- return mRunInForeground;
- }
-
- /**
- * @hide
- */
- @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
- public void setRunInForeground(boolean runInForeground) {
- mRunInForeground = runInForeground;
- }
-
- /**
* @hide
*/
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
@@ -489,6 +469,7 @@
return 31 * name.hashCode() + mOutputData.hashCode();
}
+ @NonNull
@Override
public String toString() {
return "Success {" + "mOutputData=" + mOutputData + '}';
@@ -541,6 +522,7 @@
return 31 * name.hashCode() + mOutputData.hashCode();
}
+ @NonNull
@Override
public String toString() {
return "Failure {" + "mOutputData=" + mOutputData + '}';
@@ -579,6 +561,8 @@
return Data.EMPTY;
}
+
+ @NonNull
@Override
public String toString() {
return "Retry";
diff --git a/work/work-runtime/src/main/java/androidx/work/Logger.java b/work/work-runtime/src/main/java/androidx/work/Logger.java
index fb01315..ba7865f 100644
--- a/work/work-runtime/src/main/java/androidx/work/Logger.java
+++ b/work/work-runtime/src/main/java/androidx/work/Logger.java
@@ -31,7 +31,8 @@
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
public abstract class Logger {
- private static Logger sLogger;
+ private static final Object sLock = new Object();
+ private static volatile Logger sLogger;
// tagging
private static final String TAG_PREFIX = "WM-";
@@ -41,14 +42,17 @@
/**
* @param logger The {@link Logger} to use for all {@link WorkManager} logging.
*/
- public static synchronized void setLogger(Logger logger) {
- sLogger = logger;
+ public static void setLogger(@NonNull Logger logger) {
+ synchronized (sLock) {
+ sLogger = logger;
+ }
}
/**
* @param tag The {@link String} tag to use when logging
* @return The prefixed {@link String} tag to use when logging
*/
+ @NonNull
public static String tagWithPrefix(@NonNull String tag) {
int length = tag.length();
StringBuilder withPrefix = new StringBuilder(MAX_TAG_LENGTH);
@@ -65,17 +69,20 @@
/**
* @return The current {@link Logger}.
*/
- public static synchronized Logger get() {
+ @NonNull
+ public static Logger get() {
// Logger may not be explicitly initialized by some tests which do not instantiate
// WorkManagerImpl directly.
//
// This is not being initialized on the field directly to avoid a
// class loading deadlock; when the parent class, Logger tries to reference an inner
// class, LogcatLogger and there might be another Thread trying to do the same.
- if (sLogger == null) {
- sLogger = new LogcatLogger(Log.DEBUG);
+ synchronized (sLock) {
+ if (sLogger == null) {
+ sLogger = new LogcatLogger(Log.DEBUG);
+ }
+ return sLogger;
}
- return sLogger;
}
public Logger(int loggingLevel) {
@@ -143,7 +150,7 @@
*/
public static class LogcatLogger extends Logger {
- private int mLoggingLevel;
+ private final int mLoggingLevel;
public LogcatLogger(int loggingLevel) {
super(loggingLevel);
diff --git a/work/work-runtime/src/main/java/androidx/work/OutOfQuotaPolicy.java b/work/work-runtime/src/main/java/androidx/work/OutOfQuotaPolicy.java
index c82568a..aaa7b25 100644
--- a/work/work-runtime/src/main/java/androidx/work/OutOfQuotaPolicy.java
+++ b/work/work-runtime/src/main/java/androidx/work/OutOfQuotaPolicy.java
@@ -29,7 +29,7 @@
/**
* When the app does not have any expedited job quota, the expedited work request will
- * we dropped and no work requests are enqueued.
+ * be dropped and no work requests are enqueued.
*/
DROP_WORK_REQUEST;
}
diff --git a/work/work-runtime/src/main/java/androidx/work/impl/Processor.java b/work/work-runtime/src/main/java/androidx/work/impl/Processor.java
index 64f383b..16b5661 100644
--- a/work/work-runtime/src/main/java/androidx/work/impl/Processor.java
+++ b/work/work-runtime/src/main/java/androidx/work/impl/Processor.java
@@ -274,6 +274,7 @@
* @param workSpecId The {@link androidx.work.impl.model.WorkSpec} id
* @return {@code true} if the id was enqueued as foreground work in the processor.
*/
+ @Override
public boolean isEnqueuedInForeground(@NonNull String workSpecId) {
synchronized (mLock) {
return mForegroundWorkMap.containsKey(workSpecId);
diff --git a/work/work-runtime/src/main/java/androidx/work/impl/WorkDatabase.kt b/work/work-runtime/src/main/java/androidx/work/impl/WorkDatabase.kt
index e2e3c89..8178bef 100644
--- a/work/work-runtime/src/main/java/androidx/work/impl/WorkDatabase.kt
+++ b/work/work-runtime/src/main/java/androidx/work/impl/WorkDatabase.kt
@@ -17,6 +17,7 @@
import android.content.Context
import androidx.annotation.RestrictTo
+import androidx.room.AutoMigration
import androidx.room.Database
import androidx.room.Room
import androidx.room.RoomDatabase
@@ -60,7 +61,8 @@
@Database(
entities = [Dependency::class, WorkSpec::class, WorkTag::class, SystemIdInfo::class,
WorkName::class, WorkProgress::class, Preference::class],
- version = 12
+ autoMigrations = [AutoMigration(from = 13, to = 14)],
+ version = 14
)
@TypeConverters(value = [Data::class, WorkTypeConverters::class])
abstract class WorkDatabase : RoomDatabase() {
@@ -147,6 +149,7 @@
.addMigrations(WorkMigration9To10(context))
.addMigrations(RescheduleMigration(context, VERSION_10, VERSION_11))
.addMigrations(Migration_11_12)
+ .addMigrations(Migration_12_13)
.fallbackToDestructiveMigration()
.build()
}
diff --git a/work/work-runtime/src/main/java/androidx/work/impl/WorkDatabaseMigrations.kt b/work/work-runtime/src/main/java/androidx/work/impl/WorkDatabaseMigrations.kt
index 17fbb18..1b68aa5 100644
--- a/work/work-runtime/src/main/java/androidx/work/impl/WorkDatabaseMigrations.kt
+++ b/work/work-runtime/src/main/java/androidx/work/impl/WorkDatabaseMigrations.kt
@@ -23,6 +23,7 @@
import androidx.work.impl.WorkDatabaseVersions.VERSION_10
import androidx.work.impl.WorkDatabaseVersions.VERSION_11
import androidx.work.impl.WorkDatabaseVersions.VERSION_12
+import androidx.work.impl.WorkDatabaseVersions.VERSION_13
import androidx.work.impl.WorkDatabaseVersions.VERSION_2
import androidx.work.impl.WorkDatabaseVersions.VERSION_3
import androidx.work.impl.WorkDatabaseVersions.VERSION_4
@@ -53,6 +54,8 @@
const val VERSION_10 = 10
const val VERSION_11 = 11
const val VERSION_12 = 12
+ const val VERSION_13 = 13
+ const val VERSION_14 = 14
}
private const val CREATE_SYSTEM_ID_INFO =
@@ -93,6 +96,12 @@
private const val CREATE_OUT_OF_QUOTA_POLICY =
"ALTER TABLE workspec ADD COLUMN `out_of_quota_policy` INTEGER NOT NULL DEFAULT 0"
+private const val SET_DEFAULT_NETWORK_TYPE =
+ "UPDATE workspec SET required_network_type = 0 WHERE required_network_type IS NULL "
+
+private const val SET_DEFAULT_CONTENT_URI_TRIGGERS =
+ "UPDATE workspec SET content_uri_triggers = x'' WHERE content_uri_triggers is NULL"
+
/**
* Removes the `alarmInfo` table and substitutes it for a more general
* `SystemIdInfo` table.
@@ -170,6 +179,13 @@
}
}
+object Migration_12_13 : Migration(VERSION_12, VERSION_13) {
+ override fun migrate(database: SupportSQLiteDatabase) {
+ database.execSQL(SET_DEFAULT_NETWORK_TYPE)
+ database.execSQL(SET_DEFAULT_CONTENT_URI_TRIGGERS)
+ }
+}
+
/**
* A [WorkDatabase] migration that reschedules all eligible Workers.
*/
diff --git a/work/work-runtime/src/main/java/androidx/work/impl/WorkerWrapper.java b/work/work-runtime/src/main/java/androidx/work/impl/WorkerWrapper.java
index 9e55818..845cce4 100644
--- a/work/work-runtime/src/main/java/androidx/work/impl/WorkerWrapper.java
+++ b/work/work-runtime/src/main/java/androidx/work/impl/WorkerWrapper.java
@@ -460,8 +460,11 @@
mWorkSpecDao.setState(ENQUEUED, mWorkSpecId);
mWorkSpecDao.markWorkSpecScheduled(mWorkSpecId, SCHEDULE_NOT_REQUESTED_YET);
}
- if (mWorkSpec != null && mWorker != null && mWorker.isRunInForeground()) {
- mForegroundProcessor.stopForeground(mWorkSpecId);
+ if (mWorkSpec != null && mWorker != null) {
+ boolean isInForeground = mForegroundProcessor.isEnqueuedInForeground(mWorkSpecId);
+ if (isInForeground) {
+ mForegroundProcessor.stopForeground(mWorkSpecId);
+ }
}
mWorkDatabase.setTransactionSuccessful();
} finally {
diff --git a/work/work-runtime/src/main/java/androidx/work/impl/background/systemjob/SystemJobInfoConverter.java b/work/work-runtime/src/main/java/androidx/work/impl/background/systemjob/SystemJobInfoConverter.java
index 527c6d6..7f193f71 100644
--- a/work/work-runtime/src/main/java/androidx/work/impl/background/systemjob/SystemJobInfoConverter.java
+++ b/work/work-runtime/src/main/java/androidx/work/impl/background/systemjob/SystemJobInfoConverter.java
@@ -33,7 +33,6 @@
import androidx.annotation.VisibleForTesting;
import androidx.work.BackoffPolicy;
import androidx.work.Constraints;
-import androidx.work.ContentUriTriggers;
import androidx.work.Logger;
import androidx.work.NetworkType;
import androidx.work.impl.WorkManagerImpl;
@@ -109,8 +108,8 @@
}
if (Build.VERSION.SDK_INT >= 24 && constraints.hasContentUriTriggers()) {
- ContentUriTriggers contentUriTriggers = constraints.getContentUriTriggers();
- for (ContentUriTriggers.Trigger trigger : contentUriTriggers.getTriggers()) {
+ //noinspection ConstantConditions
+ for (Constraints.ContentUriTrigger trigger : constraints.getContentUriTriggers()) {
builder.addTriggerContentUri(convertContentUriTrigger(trigger));
}
builder.setTriggerContentUpdateDelay(constraints.getTriggerContentUpdateDelay());
@@ -136,8 +135,8 @@
@RequiresApi(24)
private static JobInfo.TriggerContentUri convertContentUriTrigger(
- ContentUriTriggers.Trigger trigger) {
- int flag = trigger.shouldTriggerForDescendants()
+ Constraints.ContentUriTrigger trigger) {
+ int flag = trigger.getTriggerForDescendants()
? JobInfo.TriggerContentUri.FLAG_NOTIFY_FOR_DESCENDANTS : 0;
return new JobInfo.TriggerContentUri(trigger.getUri(), flag);
}
diff --git a/work/work-runtime/src/main/java/androidx/work/impl/foreground/ForegroundProcessor.java b/work/work-runtime/src/main/java/androidx/work/impl/foreground/ForegroundProcessor.java
index 93fd7c8..9da6667 100644
--- a/work/work-runtime/src/main/java/androidx/work/impl/foreground/ForegroundProcessor.java
+++ b/work/work-runtime/src/main/java/androidx/work/impl/foreground/ForegroundProcessor.java
@@ -19,6 +19,7 @@
import androidx.annotation.NonNull;
import androidx.annotation.RestrictTo;
import androidx.work.ForegroundInfo;
+import androidx.work.ListenableWorker;
/**
* An interface that provides {@link androidx.work.impl.WorkerWrapper} the hooks to move a
@@ -43,4 +44,10 @@
* @param workSpecId The {@link androidx.work.impl.model.WorkSpec} id
*/
void stopForeground(@NonNull String workSpecId);
+
+ /**
+ * @return {@code true} if the {@link ListenableWorker} is running in the context of a
+ * foreground {@link android.app.Service}.
+ */
+ boolean isEnqueuedInForeground(@NonNull String workSpecId);
}
diff --git a/work/work-runtime/src/main/java/androidx/work/impl/model/WorkTypeConverters.kt b/work/work-runtime/src/main/java/androidx/work/impl/model/WorkTypeConverters.kt
index 2d4ab79..c254b5ce 100644
--- a/work/work-runtime/src/main/java/androidx/work/impl/model/WorkTypeConverters.kt
+++ b/work/work-runtime/src/main/java/androidx/work/impl/model/WorkTypeConverters.kt
@@ -19,7 +19,8 @@
import android.os.Build
import androidx.room.TypeConverter
import androidx.work.BackoffPolicy
-import androidx.work.ContentUriTriggers
+import androidx.work.Constraints
+import androidx.work.Constraints.ContentUriTrigger
import androidx.work.NetworkType
import androidx.work.OutOfQuotaPolicy
import androidx.work.WorkInfo
@@ -226,40 +227,39 @@
}
/**
- * Converts a list of [ContentUriTriggers.Trigger]s to byte array representation
- * @param triggers the list of [ContentUriTriggers.Trigger]s to convert
+ * Converts a set of [Constraints.ContentUriTrigger]s to byte array representation
+ * @param triggers the list of [Constraints.ContentUriTrigger]s to convert
* @return corresponding byte array representation
*/
@JvmStatic
@TypeConverter
- fun contentUriTriggersToByteArray(triggers: ContentUriTriggers): ByteArray? {
- if (triggers.size() == 0) {
- return null
+ fun setOfTriggersToByteArray(triggers: Set<ContentUriTrigger>): ByteArray {
+ if (triggers.isEmpty()) {
+ return ByteArray(0)
}
val outputStream = ByteArrayOutputStream()
outputStream.use {
ObjectOutputStream(outputStream).use { objectOutputStream ->
- objectOutputStream.writeInt(triggers.size())
- for (trigger in triggers.triggers) {
+ objectOutputStream.writeInt(triggers.size)
+ for (trigger in triggers) {
objectOutputStream.writeUTF(trigger.uri.toString())
- objectOutputStream.writeBoolean(trigger.shouldTriggerForDescendants())
+ objectOutputStream.writeBoolean(trigger.triggerForDescendants)
}
}
}
-
return outputStream.toByteArray()
}
/**
- * Converts a byte array to list of [ContentUriTriggers.Trigger]s
+ * Converts a byte array to set of [ContentUriTrigger]s
* @param bytes byte array representation to convert
- * @return list of [ContentUriTriggers.Trigger]s
+ * @return set of [ContentUriTrigger]
*/
@JvmStatic
@TypeConverter
- fun byteArrayToContentUriTriggers(bytes: ByteArray?): ContentUriTriggers {
- val triggers = ContentUriTriggers()
- if (bytes == null) {
+ fun byteArrayToSetOfTriggers(bytes: ByteArray): Set<ContentUriTrigger> {
+ val triggers = mutableSetOf<ContentUriTrigger>()
+ if (bytes.isEmpty()) {
// bytes will be null if there are no Content Uri Triggers
return triggers
}
@@ -270,7 +270,7 @@
repeat(objectInputStream.readInt()) {
val uri = Uri.parse(objectInputStream.readUTF())
val triggersForDescendants = objectInputStream.readBoolean()
- triggers.add(uri, triggersForDescendants)
+ triggers.add(ContentUriTrigger(uri, triggersForDescendants))
}
}
} catch (e: IOException) {
diff --git a/work/work-runtime/src/main/java/androidx/work/impl/utils/WorkForegroundRunnable.java b/work/work-runtime/src/main/java/androidx/work/impl/utils/WorkForegroundRunnable.java
index 8207898..714afec 100644
--- a/work/work-runtime/src/main/java/androidx/work/impl/utils/WorkForegroundRunnable.java
+++ b/work/work-runtime/src/main/java/androidx/work/impl/utils/WorkForegroundRunnable.java
@@ -107,8 +107,6 @@
}
Logger.get().debug(TAG,
"Updating notification for " + mWorkSpec.workerClassName);
- // Mark as running in the foreground
- mWorker.setRunInForeground(true);
mFuture.setFuture(
mForegroundUpdater.setForegroundAsync(
mContext, mWorker.getId(), foregroundInfo));
diff --git a/work/work-runtime/src/main/java/androidx/work/impl/workers/ConstraintTrackingWorker.java b/work/work-runtime/src/main/java/androidx/work/impl/workers/ConstraintTrackingWorker.java
index f584adb..10c3d99 100644
--- a/work/work-runtime/src/main/java/androidx/work/impl/workers/ConstraintTrackingWorker.java
+++ b/work/work-runtime/src/main/java/androidx/work/impl/workers/ConstraintTrackingWorker.java
@@ -183,11 +183,6 @@
}
}
- @Override
- public boolean isRunInForeground() {
- return mDelegate != null && mDelegate.isRunInForeground();
- }
-
/**
* @return The instance of {@link WorkDatabase}
* @hide
diff --git a/work/work-runtime/src/main/java/androidx/work/multiprocess/RemoteWorkManager.java b/work/work-runtime/src/main/java/androidx/work/multiprocess/RemoteWorkManager.java
index f4f2647..fb1b174 100644
--- a/work/work-runtime/src/main/java/androidx/work/multiprocess/RemoteWorkManager.java
+++ b/work/work-runtime/src/main/java/androidx/work/multiprocess/RemoteWorkManager.java
@@ -23,6 +23,7 @@
import androidx.work.Data;
import androidx.work.ExistingPeriodicWorkPolicy;
import androidx.work.ExistingWorkPolicy;
+import androidx.work.ForegroundInfo;
import androidx.work.ListenableWorker;
import androidx.work.OneTimeWorkRequest;
import androidx.work.PeriodicWorkRequest;
@@ -335,6 +336,22 @@
public abstract ListenableFuture<Void> setProgress(@NonNull UUID id, @NonNull Data data);
/**
+ * Delegates the call to {@link ListenableWorker#setForegroundAsync(ForegroundInfo)} to the
+ * designated process.
+ *
+ * @param id The {@link WorkRequest} id
+ * @param foregroundInfo THe {@link ForegroundInfo} instance
+ * @return A {@link ListenableFuture} that can be used to determine when the setForeground
+ * has completed.
+ * @hide
+ */
+ @NonNull
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+ public abstract ListenableFuture<Void> setForegroundAsync(
+ @NonNull String id,
+ @NonNull ForegroundInfo foregroundInfo);
+
+ /**
* Gets the instance of {@link RemoteWorkManager} which provides a subset of
* {@link WorkManager} APIs that are safe to use for apps that use multiple processes.
*
diff --git a/work/work-runtime/src/schemas/androidx.work.impl.WorkDatabase/13.json b/work/work-runtime/src/schemas/androidx.work.impl.WorkDatabase/13.json
new file mode 100644
index 0000000..4e648fb
--- /dev/null
+++ b/work/work-runtime/src/schemas/androidx.work.impl.WorkDatabase/13.json
@@ -0,0 +1,466 @@
+{
+ "formatVersion": 1,
+ "database": {
+ "version": 13,
+ "identityHash": "c103703e120ae8cc73c9248622f3cd1e",
+ "entities": [
+ {
+ "tableName": "Dependency",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`work_spec_id` TEXT NOT NULL, `prerequisite_id` TEXT NOT NULL, PRIMARY KEY(`work_spec_id`, `prerequisite_id`), FOREIGN KEY(`work_spec_id`) REFERENCES `WorkSpec`(`id`) ON UPDATE CASCADE ON DELETE CASCADE , FOREIGN KEY(`prerequisite_id`) REFERENCES `WorkSpec`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )",
+ "fields": [
+ {
+ "fieldPath": "workSpecId",
+ "columnName": "work_spec_id",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "prerequisiteId",
+ "columnName": "prerequisite_id",
+ "affinity": "TEXT",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "columnNames": [
+ "work_spec_id",
+ "prerequisite_id"
+ ],
+ "autoGenerate": false
+ },
+ "indices": [
+ {
+ "name": "index_Dependency_work_spec_id",
+ "unique": false,
+ "columnNames": [
+ "work_spec_id"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_Dependency_work_spec_id` ON `${TABLE_NAME}` (`work_spec_id`)"
+ },
+ {
+ "name": "index_Dependency_prerequisite_id",
+ "unique": false,
+ "columnNames": [
+ "prerequisite_id"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_Dependency_prerequisite_id` ON `${TABLE_NAME}` (`prerequisite_id`)"
+ }
+ ],
+ "foreignKeys": [
+ {
+ "table": "WorkSpec",
+ "onDelete": "CASCADE",
+ "onUpdate": "CASCADE",
+ "columns": [
+ "work_spec_id"
+ ],
+ "referencedColumns": [
+ "id"
+ ]
+ },
+ {
+ "table": "WorkSpec",
+ "onDelete": "CASCADE",
+ "onUpdate": "CASCADE",
+ "columns": [
+ "prerequisite_id"
+ ],
+ "referencedColumns": [
+ "id"
+ ]
+ }
+ ]
+ },
+ {
+ "tableName": "WorkSpec",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `state` INTEGER NOT NULL, `worker_class_name` TEXT NOT NULL, `input_merger_class_name` TEXT, `input` BLOB NOT NULL, `output` BLOB NOT NULL, `initial_delay` INTEGER NOT NULL, `interval_duration` INTEGER NOT NULL, `flex_duration` INTEGER NOT NULL, `run_attempt_count` INTEGER NOT NULL, `backoff_policy` INTEGER NOT NULL, `backoff_delay_duration` INTEGER NOT NULL, `period_start_time` INTEGER NOT NULL, `minimum_retention_duration` INTEGER NOT NULL, `schedule_requested_at` INTEGER NOT NULL, `run_in_foreground` INTEGER NOT NULL, `out_of_quota_policy` INTEGER NOT NULL, `required_network_type` INTEGER, `requires_charging` INTEGER NOT NULL, `requires_device_idle` INTEGER NOT NULL, `requires_battery_not_low` INTEGER NOT NULL, `requires_storage_not_low` INTEGER NOT NULL, `trigger_content_update_delay` INTEGER NOT NULL, `trigger_max_content_delay` INTEGER NOT NULL, `content_uri_triggers` BLOB, PRIMARY KEY(`id`))",
+ "fields": [
+ {
+ "fieldPath": "id",
+ "columnName": "id",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "state",
+ "columnName": "state",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "workerClassName",
+ "columnName": "worker_class_name",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "inputMergerClassName",
+ "columnName": "input_merger_class_name",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "input",
+ "columnName": "input",
+ "affinity": "BLOB",
+ "notNull": true
+ },
+ {
+ "fieldPath": "output",
+ "columnName": "output",
+ "affinity": "BLOB",
+ "notNull": true
+ },
+ {
+ "fieldPath": "initialDelay",
+ "columnName": "initial_delay",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "intervalDuration",
+ "columnName": "interval_duration",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "flexDuration",
+ "columnName": "flex_duration",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "runAttemptCount",
+ "columnName": "run_attempt_count",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "backoffPolicy",
+ "columnName": "backoff_policy",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "backoffDelayDuration",
+ "columnName": "backoff_delay_duration",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "periodStartTime",
+ "columnName": "period_start_time",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "minimumRetentionDuration",
+ "columnName": "minimum_retention_duration",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "scheduleRequestedAt",
+ "columnName": "schedule_requested_at",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "expedited",
+ "columnName": "run_in_foreground",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "outOfQuotaPolicy",
+ "columnName": "out_of_quota_policy",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "constraints.mRequiredNetworkType",
+ "columnName": "required_network_type",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "constraints.mRequiresCharging",
+ "columnName": "requires_charging",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "constraints.mRequiresDeviceIdle",
+ "columnName": "requires_device_idle",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "constraints.mRequiresBatteryNotLow",
+ "columnName": "requires_battery_not_low",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "constraints.mRequiresStorageNotLow",
+ "columnName": "requires_storage_not_low",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "constraints.mTriggerContentUpdateDelay",
+ "columnName": "trigger_content_update_delay",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "constraints.mTriggerMaxContentDelay",
+ "columnName": "trigger_max_content_delay",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "constraints.mContentUriTriggers",
+ "columnName": "content_uri_triggers",
+ "affinity": "BLOB",
+ "notNull": false
+ }
+ ],
+ "primaryKey": {
+ "columnNames": [
+ "id"
+ ],
+ "autoGenerate": false
+ },
+ "indices": [
+ {
+ "name": "index_WorkSpec_schedule_requested_at",
+ "unique": false,
+ "columnNames": [
+ "schedule_requested_at"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_WorkSpec_schedule_requested_at` ON `${TABLE_NAME}` (`schedule_requested_at`)"
+ },
+ {
+ "name": "index_WorkSpec_period_start_time",
+ "unique": false,
+ "columnNames": [
+ "period_start_time"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_WorkSpec_period_start_time` ON `${TABLE_NAME}` (`period_start_time`)"
+ }
+ ],
+ "foreignKeys": []
+ },
+ {
+ "tableName": "WorkTag",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`tag` TEXT NOT NULL, `work_spec_id` TEXT NOT NULL, PRIMARY KEY(`tag`, `work_spec_id`), FOREIGN KEY(`work_spec_id`) REFERENCES `WorkSpec`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )",
+ "fields": [
+ {
+ "fieldPath": "tag",
+ "columnName": "tag",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "workSpecId",
+ "columnName": "work_spec_id",
+ "affinity": "TEXT",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "columnNames": [
+ "tag",
+ "work_spec_id"
+ ],
+ "autoGenerate": false
+ },
+ "indices": [
+ {
+ "name": "index_WorkTag_work_spec_id",
+ "unique": false,
+ "columnNames": [
+ "work_spec_id"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_WorkTag_work_spec_id` ON `${TABLE_NAME}` (`work_spec_id`)"
+ }
+ ],
+ "foreignKeys": [
+ {
+ "table": "WorkSpec",
+ "onDelete": "CASCADE",
+ "onUpdate": "CASCADE",
+ "columns": [
+ "work_spec_id"
+ ],
+ "referencedColumns": [
+ "id"
+ ]
+ }
+ ]
+ },
+ {
+ "tableName": "SystemIdInfo",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`work_spec_id` TEXT NOT NULL, `system_id` INTEGER NOT NULL, PRIMARY KEY(`work_spec_id`), FOREIGN KEY(`work_spec_id`) REFERENCES `WorkSpec`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )",
+ "fields": [
+ {
+ "fieldPath": "workSpecId",
+ "columnName": "work_spec_id",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "systemId",
+ "columnName": "system_id",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "columnNames": [
+ "work_spec_id"
+ ],
+ "autoGenerate": false
+ },
+ "indices": [],
+ "foreignKeys": [
+ {
+ "table": "WorkSpec",
+ "onDelete": "CASCADE",
+ "onUpdate": "CASCADE",
+ "columns": [
+ "work_spec_id"
+ ],
+ "referencedColumns": [
+ "id"
+ ]
+ }
+ ]
+ },
+ {
+ "tableName": "WorkName",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`name` TEXT NOT NULL, `work_spec_id` TEXT NOT NULL, PRIMARY KEY(`name`, `work_spec_id`), FOREIGN KEY(`work_spec_id`) REFERENCES `WorkSpec`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )",
+ "fields": [
+ {
+ "fieldPath": "name",
+ "columnName": "name",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "workSpecId",
+ "columnName": "work_spec_id",
+ "affinity": "TEXT",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "columnNames": [
+ "name",
+ "work_spec_id"
+ ],
+ "autoGenerate": false
+ },
+ "indices": [
+ {
+ "name": "index_WorkName_work_spec_id",
+ "unique": false,
+ "columnNames": [
+ "work_spec_id"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_WorkName_work_spec_id` ON `${TABLE_NAME}` (`work_spec_id`)"
+ }
+ ],
+ "foreignKeys": [
+ {
+ "table": "WorkSpec",
+ "onDelete": "CASCADE",
+ "onUpdate": "CASCADE",
+ "columns": [
+ "work_spec_id"
+ ],
+ "referencedColumns": [
+ "id"
+ ]
+ }
+ ]
+ },
+ {
+ "tableName": "WorkProgress",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`work_spec_id` TEXT NOT NULL, `progress` BLOB NOT NULL, PRIMARY KEY(`work_spec_id`), FOREIGN KEY(`work_spec_id`) REFERENCES `WorkSpec`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )",
+ "fields": [
+ {
+ "fieldPath": "workSpecId",
+ "columnName": "work_spec_id",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "progress",
+ "columnName": "progress",
+ "affinity": "BLOB",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "columnNames": [
+ "work_spec_id"
+ ],
+ "autoGenerate": false
+ },
+ "indices": [],
+ "foreignKeys": [
+ {
+ "table": "WorkSpec",
+ "onDelete": "CASCADE",
+ "onUpdate": "CASCADE",
+ "columns": [
+ "work_spec_id"
+ ],
+ "referencedColumns": [
+ "id"
+ ]
+ }
+ ]
+ },
+ {
+ "tableName": "Preference",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`key` TEXT NOT NULL, `long_value` INTEGER, PRIMARY KEY(`key`))",
+ "fields": [
+ {
+ "fieldPath": "key",
+ "columnName": "key",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "value",
+ "columnName": "long_value",
+ "affinity": "INTEGER",
+ "notNull": false
+ }
+ ],
+ "primaryKey": {
+ "columnNames": [
+ "key"
+ ],
+ "autoGenerate": false
+ },
+ "indices": [],
+ "foreignKeys": []
+ }
+ ],
+ "views": [],
+ "setupQueries": [
+ "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
+ "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'c103703e120ae8cc73c9248622f3cd1e')"
+ ]
+ }
+}
\ No newline at end of file
diff --git a/work/work-runtime/src/schemas/androidx.work.impl.WorkDatabase/14.json b/work/work-runtime/src/schemas/androidx.work.impl.WorkDatabase/14.json
new file mode 100644
index 0000000..690a41b
--- /dev/null
+++ b/work/work-runtime/src/schemas/androidx.work.impl.WorkDatabase/14.json
@@ -0,0 +1,466 @@
+{
+ "formatVersion": 1,
+ "database": {
+ "version": 14,
+ "identityHash": "d7d0af82be76967267b25b916861b907",
+ "entities": [
+ {
+ "tableName": "Dependency",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`work_spec_id` TEXT NOT NULL, `prerequisite_id` TEXT NOT NULL, PRIMARY KEY(`work_spec_id`, `prerequisite_id`), FOREIGN KEY(`work_spec_id`) REFERENCES `WorkSpec`(`id`) ON UPDATE CASCADE ON DELETE CASCADE , FOREIGN KEY(`prerequisite_id`) REFERENCES `WorkSpec`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )",
+ "fields": [
+ {
+ "fieldPath": "workSpecId",
+ "columnName": "work_spec_id",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "prerequisiteId",
+ "columnName": "prerequisite_id",
+ "affinity": "TEXT",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "columnNames": [
+ "work_spec_id",
+ "prerequisite_id"
+ ],
+ "autoGenerate": false
+ },
+ "indices": [
+ {
+ "name": "index_Dependency_work_spec_id",
+ "unique": false,
+ "columnNames": [
+ "work_spec_id"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_Dependency_work_spec_id` ON `${TABLE_NAME}` (`work_spec_id`)"
+ },
+ {
+ "name": "index_Dependency_prerequisite_id",
+ "unique": false,
+ "columnNames": [
+ "prerequisite_id"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_Dependency_prerequisite_id` ON `${TABLE_NAME}` (`prerequisite_id`)"
+ }
+ ],
+ "foreignKeys": [
+ {
+ "table": "WorkSpec",
+ "onDelete": "CASCADE",
+ "onUpdate": "CASCADE",
+ "columns": [
+ "work_spec_id"
+ ],
+ "referencedColumns": [
+ "id"
+ ]
+ },
+ {
+ "table": "WorkSpec",
+ "onDelete": "CASCADE",
+ "onUpdate": "CASCADE",
+ "columns": [
+ "prerequisite_id"
+ ],
+ "referencedColumns": [
+ "id"
+ ]
+ }
+ ]
+ },
+ {
+ "tableName": "WorkSpec",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `state` INTEGER NOT NULL, `worker_class_name` TEXT NOT NULL, `input_merger_class_name` TEXT, `input` BLOB NOT NULL, `output` BLOB NOT NULL, `initial_delay` INTEGER NOT NULL, `interval_duration` INTEGER NOT NULL, `flex_duration` INTEGER NOT NULL, `run_attempt_count` INTEGER NOT NULL, `backoff_policy` INTEGER NOT NULL, `backoff_delay_duration` INTEGER NOT NULL, `period_start_time` INTEGER NOT NULL, `minimum_retention_duration` INTEGER NOT NULL, `schedule_requested_at` INTEGER NOT NULL, `run_in_foreground` INTEGER NOT NULL, `out_of_quota_policy` INTEGER NOT NULL, `required_network_type` INTEGER NOT NULL, `requires_charging` INTEGER NOT NULL, `requires_device_idle` INTEGER NOT NULL, `requires_battery_not_low` INTEGER NOT NULL, `requires_storage_not_low` INTEGER NOT NULL, `trigger_content_update_delay` INTEGER NOT NULL, `trigger_max_content_delay` INTEGER NOT NULL, `content_uri_triggers` BLOB NOT NULL, PRIMARY KEY(`id`))",
+ "fields": [
+ {
+ "fieldPath": "id",
+ "columnName": "id",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "state",
+ "columnName": "state",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "workerClassName",
+ "columnName": "worker_class_name",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "inputMergerClassName",
+ "columnName": "input_merger_class_name",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "input",
+ "columnName": "input",
+ "affinity": "BLOB",
+ "notNull": true
+ },
+ {
+ "fieldPath": "output",
+ "columnName": "output",
+ "affinity": "BLOB",
+ "notNull": true
+ },
+ {
+ "fieldPath": "initialDelay",
+ "columnName": "initial_delay",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "intervalDuration",
+ "columnName": "interval_duration",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "flexDuration",
+ "columnName": "flex_duration",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "runAttemptCount",
+ "columnName": "run_attempt_count",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "backoffPolicy",
+ "columnName": "backoff_policy",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "backoffDelayDuration",
+ "columnName": "backoff_delay_duration",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "periodStartTime",
+ "columnName": "period_start_time",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "minimumRetentionDuration",
+ "columnName": "minimum_retention_duration",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "scheduleRequestedAt",
+ "columnName": "schedule_requested_at",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "expedited",
+ "columnName": "run_in_foreground",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "outOfQuotaPolicy",
+ "columnName": "out_of_quota_policy",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "constraints.mRequiredNetworkType",
+ "columnName": "required_network_type",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "constraints.mRequiresCharging",
+ "columnName": "requires_charging",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "constraints.mRequiresDeviceIdle",
+ "columnName": "requires_device_idle",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "constraints.mRequiresBatteryNotLow",
+ "columnName": "requires_battery_not_low",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "constraints.mRequiresStorageNotLow",
+ "columnName": "requires_storage_not_low",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "constraints.mTriggerContentUpdateDelay",
+ "columnName": "trigger_content_update_delay",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "constraints.mTriggerMaxContentDelay",
+ "columnName": "trigger_max_content_delay",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "constraints.mContentUriTriggers",
+ "columnName": "content_uri_triggers",
+ "affinity": "BLOB",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "columnNames": [
+ "id"
+ ],
+ "autoGenerate": false
+ },
+ "indices": [
+ {
+ "name": "index_WorkSpec_schedule_requested_at",
+ "unique": false,
+ "columnNames": [
+ "schedule_requested_at"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_WorkSpec_schedule_requested_at` ON `${TABLE_NAME}` (`schedule_requested_at`)"
+ },
+ {
+ "name": "index_WorkSpec_period_start_time",
+ "unique": false,
+ "columnNames": [
+ "period_start_time"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_WorkSpec_period_start_time` ON `${TABLE_NAME}` (`period_start_time`)"
+ }
+ ],
+ "foreignKeys": []
+ },
+ {
+ "tableName": "WorkTag",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`tag` TEXT NOT NULL, `work_spec_id` TEXT NOT NULL, PRIMARY KEY(`tag`, `work_spec_id`), FOREIGN KEY(`work_spec_id`) REFERENCES `WorkSpec`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )",
+ "fields": [
+ {
+ "fieldPath": "tag",
+ "columnName": "tag",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "workSpecId",
+ "columnName": "work_spec_id",
+ "affinity": "TEXT",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "columnNames": [
+ "tag",
+ "work_spec_id"
+ ],
+ "autoGenerate": false
+ },
+ "indices": [
+ {
+ "name": "index_WorkTag_work_spec_id",
+ "unique": false,
+ "columnNames": [
+ "work_spec_id"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_WorkTag_work_spec_id` ON `${TABLE_NAME}` (`work_spec_id`)"
+ }
+ ],
+ "foreignKeys": [
+ {
+ "table": "WorkSpec",
+ "onDelete": "CASCADE",
+ "onUpdate": "CASCADE",
+ "columns": [
+ "work_spec_id"
+ ],
+ "referencedColumns": [
+ "id"
+ ]
+ }
+ ]
+ },
+ {
+ "tableName": "SystemIdInfo",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`work_spec_id` TEXT NOT NULL, `system_id` INTEGER NOT NULL, PRIMARY KEY(`work_spec_id`), FOREIGN KEY(`work_spec_id`) REFERENCES `WorkSpec`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )",
+ "fields": [
+ {
+ "fieldPath": "workSpecId",
+ "columnName": "work_spec_id",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "systemId",
+ "columnName": "system_id",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "columnNames": [
+ "work_spec_id"
+ ],
+ "autoGenerate": false
+ },
+ "indices": [],
+ "foreignKeys": [
+ {
+ "table": "WorkSpec",
+ "onDelete": "CASCADE",
+ "onUpdate": "CASCADE",
+ "columns": [
+ "work_spec_id"
+ ],
+ "referencedColumns": [
+ "id"
+ ]
+ }
+ ]
+ },
+ {
+ "tableName": "WorkName",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`name` TEXT NOT NULL, `work_spec_id` TEXT NOT NULL, PRIMARY KEY(`name`, `work_spec_id`), FOREIGN KEY(`work_spec_id`) REFERENCES `WorkSpec`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )",
+ "fields": [
+ {
+ "fieldPath": "name",
+ "columnName": "name",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "workSpecId",
+ "columnName": "work_spec_id",
+ "affinity": "TEXT",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "columnNames": [
+ "name",
+ "work_spec_id"
+ ],
+ "autoGenerate": false
+ },
+ "indices": [
+ {
+ "name": "index_WorkName_work_spec_id",
+ "unique": false,
+ "columnNames": [
+ "work_spec_id"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_WorkName_work_spec_id` ON `${TABLE_NAME}` (`work_spec_id`)"
+ }
+ ],
+ "foreignKeys": [
+ {
+ "table": "WorkSpec",
+ "onDelete": "CASCADE",
+ "onUpdate": "CASCADE",
+ "columns": [
+ "work_spec_id"
+ ],
+ "referencedColumns": [
+ "id"
+ ]
+ }
+ ]
+ },
+ {
+ "tableName": "WorkProgress",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`work_spec_id` TEXT NOT NULL, `progress` BLOB NOT NULL, PRIMARY KEY(`work_spec_id`), FOREIGN KEY(`work_spec_id`) REFERENCES `WorkSpec`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )",
+ "fields": [
+ {
+ "fieldPath": "workSpecId",
+ "columnName": "work_spec_id",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "progress",
+ "columnName": "progress",
+ "affinity": "BLOB",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "columnNames": [
+ "work_spec_id"
+ ],
+ "autoGenerate": false
+ },
+ "indices": [],
+ "foreignKeys": [
+ {
+ "table": "WorkSpec",
+ "onDelete": "CASCADE",
+ "onUpdate": "CASCADE",
+ "columns": [
+ "work_spec_id"
+ ],
+ "referencedColumns": [
+ "id"
+ ]
+ }
+ ]
+ },
+ {
+ "tableName": "Preference",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`key` TEXT NOT NULL, `long_value` INTEGER, PRIMARY KEY(`key`))",
+ "fields": [
+ {
+ "fieldPath": "key",
+ "columnName": "key",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "value",
+ "columnName": "long_value",
+ "affinity": "INTEGER",
+ "notNull": false
+ }
+ ],
+ "primaryKey": {
+ "columnNames": [
+ "key"
+ ],
+ "autoGenerate": false
+ },
+ "indices": [],
+ "foreignKeys": []
+ }
+ ],
+ "views": [],
+ "setupQueries": [
+ "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
+ "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'd7d0af82be76967267b25b916861b907')"
+ ]
+ }
+}
\ No newline at end of file