Merge "Use emptyList for NavGraphBuilder.composable()" into androidx-master-dev
diff --git a/ads/ads-identifier-benchmark/lint-baseline.xml b/ads/ads-identifier-benchmark/lint-baseline.xml
deleted file mode 100644
index f67a956..0000000
--- a/ads/ads-identifier-benchmark/lint-baseline.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<issues format="5" by="lint 4.2.0-alpha06" client="gradle" variant="debug" version="4.2.0-alpha06">
-
-</issues>
diff --git a/ads/ads-identifier-provider/lint-baseline.xml b/ads/ads-identifier-provider/lint-baseline.xml
deleted file mode 100644
index f67a956..0000000
--- a/ads/ads-identifier-provider/lint-baseline.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<issues format="5" by="lint 4.2.0-alpha06" client="gradle" variant="debug" version="4.2.0-alpha06">
-
-</issues>
diff --git a/ads/ads-identifier-testing/lint-baseline.xml b/ads/ads-identifier-testing/lint-baseline.xml
deleted file mode 100644
index f67a956..0000000
--- a/ads/ads-identifier-testing/lint-baseline.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<issues format="5" by="lint 4.2.0-alpha06" client="gradle" variant="debug" version="4.2.0-alpha06">
-
-</issues>
diff --git a/ads/ads-identifier/lint-baseline.xml b/ads/ads-identifier/lint-baseline.xml
deleted file mode 100644
index f67a956..0000000
--- a/ads/ads-identifier/lint-baseline.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<issues format="5" by="lint 4.2.0-alpha06" client="gradle" variant="debug" version="4.2.0-alpha06">
-
-</issues>
diff --git a/appcompat/appcompat-resources/lint-baseline.xml b/appcompat/appcompat-resources/lint-baseline.xml
index 5bce133..73b1850 100644
--- a/appcompat/appcompat-resources/lint-baseline.xml
+++ b/appcompat/appcompat-resources/lint-baseline.xml
@@ -123,6 +123,17 @@
</issue>
<issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" final Object insets = getOpticalInsetsMethod.invoke(drawable);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/appcompat/widget/DrawableUtils.java"
+ line="90"
+ column="39"/>
+ </issue>
+
+ <issue
id="UnsafeNewApiCall"
message="This call is to a method from API 18, the call containing class androidx.appcompat.graphics.drawable.AnimatedStateListDrawableCompat.AnimationDrawableTransition is not annotated with @RequiresApi(x) where x is at least 18. Either annotate the containing class with at least @RequiresApi(18) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(18)."
errorLine1=" anim.setAutoCancel(true);"
diff --git a/appcompat/appcompat/lint-baseline.xml b/appcompat/appcompat/lint-baseline.xml
index b76f920..7717e2d 100644
--- a/appcompat/appcompat/lint-baseline.xml
+++ b/appcompat/appcompat/lint-baseline.xml
@@ -112,6 +112,149 @@
</issue>
<issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" info.setHomeAsUpIndicator.invoke(actionBar, drawable);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/appcompat/app/ActionBarDrawerToggleHoneycomb.java"
+ line="55"
+ column="17"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" info.setHomeActionContentDescription.invoke(actionBar, contentDescRes);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/appcompat/app/ActionBarDrawerToggleHoneycomb.java"
+ line="56"
+ column="17"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" info.setHomeActionContentDescription.invoke(actionBar, contentDescRes);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/appcompat/app/ActionBarDrawerToggleHoneycomb.java"
+ line="76"
+ column="17"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" method.invoke(mTextView);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/appcompat/widget/AppCompatTextViewAutoSizeHelper.java"
+ line="675"
+ column="25"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" result = (T) method.invoke(object);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/appcompat/widget/AppCompatTextViewAutoSizeHelper.java"
+ line="847"
+ column="26"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" mResolvedMethod.invoke(mResolvedContext, v);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/appcompat/app/AppCompatViewInflater.java"
+ line="409"
+ column="17"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" mSetExclusiveCheckableMethod.invoke(mWrappedObject, checkable);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/appcompat/view/menu/MenuItemWrapperICS.java"
+ line="391"
+ column="13"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" mDoBeforeTextChanged.invoke(view);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/appcompat/widget/SearchView.java"
+ line="2073"
+ column="21"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" mDoAfterTextChanged.invoke(view);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/appcompat/widget/SearchView.java"
+ line="2083"
+ column="21"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" mEnsureImeVisible.invoke(view, /* visible = */ true);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/appcompat/widget/SearchView.java"
+ line="2093"
+ column="21"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" return (Boolean) mMethod.invoke(mRealOwner, item);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/appcompat/view/SupportMenuInflater.java"
+ line="265"
+ column="38"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" mMethod.invoke(mRealOwner, item);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/appcompat/view/SupportMenuInflater.java"
+ line="267"
+ column="21"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" sComputeFitSystemWindowsMethod.invoke(view, inoutInsets, outLocalInsets);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/appcompat/widget/ViewUtils.java"
+ line="68"
+ column="17"/>
+ </issue>
+
+ <issue
id="UnsafeNewApiCall"
message="This call is to a method from API 21, the call containing class androidx.appcompat.widget.ActionBarBackgroundDrawable is not annotated with @RequiresApi(x) where x is at least 21. Either annotate the containing class with at least @RequiresApi(21) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(21)."
errorLine1=" mContainer.mSplitBackground.getOutline(outline);"
@@ -888,7 +1031,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/appcompat/widget/SwitchCompat.java"
- line="1053"
+ line="1059"
column="31"/>
</issue>
@@ -11985,7 +12128,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/appcompat/widget/SwitchCompat.java"
- line="785"
+ line="788"
column="12"/>
</issue>
@@ -11996,7 +12139,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/appcompat/widget/SwitchCompat.java"
- line="794"
+ line="797"
column="28"/>
</issue>
@@ -12007,7 +12150,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/appcompat/widget/SwitchCompat.java"
- line="889"
+ line="895"
column="46"/>
</issue>
@@ -12018,7 +12161,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/appcompat/widget/SwitchCompat.java"
- line="930"
+ line="936"
column="33"/>
</issue>
@@ -12029,7 +12172,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/appcompat/widget/SwitchCompat.java"
- line="1157"
+ line="1169"
column="22"/>
</issue>
@@ -12040,7 +12183,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/appcompat/widget/SwitchCompat.java"
- line="1222"
+ line="1234"
column="27"/>
</issue>
@@ -12051,7 +12194,7 @@
errorLine2=" ~~~~~">
<location
file="src/main/java/androidx/appcompat/widget/SwitchCompat.java"
- line="1346"
+ line="1358"
column="15"/>
</issue>
@@ -12062,7 +12205,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/appcompat/widget/SwitchCompat.java"
- line="1392"
+ line="1404"
column="38"/>
</issue>
@@ -12073,7 +12216,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/appcompat/widget/SwitchCompat.java"
- line="1415"
+ line="1427"
column="48"/>
</issue>
@@ -12084,7 +12227,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/appcompat/widget/SwitchCompat.java"
- line="1421"
+ line="1433"
column="51"/>
</issue>
@@ -12095,7 +12238,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/appcompat/widget/SwitchCompat.java"
- line="1442"
+ line="1443"
column="54"/>
</issue>
diff --git a/appsearch/appsearch/src/main/java/androidx/appsearch/app/SearchSpec.java b/appsearch/appsearch/src/main/java/androidx/appsearch/app/SearchSpec.java
index 26b1017..b8c5199 100644
--- a/appsearch/appsearch/src/main/java/androidx/appsearch/app/SearchSpec.java
+++ b/appsearch/appsearch/src/main/java/androidx/appsearch/app/SearchSpec.java
@@ -382,8 +382,7 @@
/**
* Sets {@code snippetCountPerProperty}. Only the first {@code snippetCountPerProperty}
- * snippets for a every property of {@link GenericDocument} will contain snippet
- * information.
+ * snippets for each property of {@link GenericDocument} will contain snippet information.
*
* <p>If set to 0, snippeting is disabled and {@link SearchResult#getMatches}
* will return {@code null} for that result.
diff --git a/arch/core-common/lint-baseline.xml b/arch/core-common/lint-baseline.xml
index 5f3bddd..ff8ca54 100644
--- a/arch/core-common/lint-baseline.xml
+++ b/arch/core-common/lint-baseline.xml
@@ -136,17 +136,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=" protected Entry<K, V> put(@NonNull K key, @NonNull V v) {"
- errorLine2=" ~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/arch/core/internal/SafeIterableMap.java"
- line="74"
- column="15"/>
- </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 V remove(@NonNull K key) {"
errorLine2=" ~">
<location
@@ -199,4 +188,15 @@
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 Map.Entry<K, V> next() {"
+ errorLine2=" ~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/arch/core/internal/SafeIterableMap.java"
+ line="344"
+ column="16"/>
+ </issue>
+
</issues>
diff --git a/benchmark/benchmark/build.gradle b/benchmark/benchmark/build.gradle
index 98a9387..b0d1aa1 100644
--- a/benchmark/benchmark/build.gradle
+++ b/benchmark/benchmark/build.gradle
@@ -22,17 +22,8 @@
id("androidx.benchmark")
}
-android {
- defaultConfig {
- // 18 needed for UI automator dependency, via benchmark-perfetto
- minSdkVersion 18
- }
-}
-
dependencies {
androidTestImplementation(project(":benchmark:benchmark-junit4"))
- androidTestImplementation(project(":benchmark:benchmark-perfetto"))
- androidTestImplementation(project(":tracing:tracing-ktx"))
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ANDROIDX_TEST_RULES)
androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT)
diff --git a/benchmark/benchmark/src/androidTest/java/androidx/benchmark/benchmark/PerfettoOverheadBenchmark.kt b/benchmark/benchmark/src/androidTest/java/androidx/benchmark/benchmark/PerfettoOverheadBenchmark.kt
deleted file mode 100644
index f3f224c..0000000
--- a/benchmark/benchmark/src/androidTest/java/androidx/benchmark/benchmark/PerfettoOverheadBenchmark.kt
+++ /dev/null
@@ -1,71 +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 androidx.benchmark.benchmark
-
-import android.os.Trace
-import androidx.benchmark.junit4.BenchmarkRule
-import androidx.benchmark.junit4.measureRepeated
-import androidx.benchmark.perfetto.PerfettoRule
-import androidx.test.ext.junit.runners.AndroidJUnit4
-import androidx.test.filters.LargeTest
-import androidx.tracing.trace
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-
-@LargeTest
-@RunWith(AndroidJUnit4::class)
-class PerfettoOverheadBenchmark {
- @get:Rule
- val benchmarkRule = BenchmarkRule()
-
- @get:Rule
- val perfettoRule = PerfettoRule()
-
- /**
- * Empty baseline, no tracing. Expect similar results to [TrivialJavaBenchmark.nothing].
- */
- @Test
- fun empty() = benchmarkRule.measureRepeated {}
-
- /**
- * The trace section within runWithTimingDisabled, even though not measured, can impact the
- * results of a small benchmark significantly.
- */
- @Test
- fun runWithTimingDisabled() = benchmarkRule.measureRepeated {
- runWithTimingDisabled { /* nothing*/ }
- }
-
- /**
- * Trace section adds ~5us (depending on many factors) in this ideal case, but will be
- * significantly worse in a real benchmark, as there's more computation to interfere with.
- */
- @Test
- fun traceBeginEnd() = benchmarkRule.measureRepeated {
- Trace.beginSection("foo")
- Trace.endSection()
- }
-
- /**
- * Dupe of [traceBeginEnd], just using [trace].
- */
- @Test
- fun traceBlock() = benchmarkRule.measureRepeated {
- trace("foo") { /* nothing */ }
- }
-}
diff --git a/biometric/biometric/api/1.1.0-rc01.txt b/biometric/biometric/api/1.1.0-rc01.txt
new file mode 100644
index 0000000..2d2401f
--- /dev/null
+++ b/biometric/biometric/api/1.1.0-rc01.txt
@@ -0,0 +1,96 @@
+// Signature format: 4.0
+package androidx.biometric {
+
+ public class BiometricManager {
+ method @Deprecated public int canAuthenticate();
+ method public int canAuthenticate(int);
+ method public static androidx.biometric.BiometricManager from(android.content.Context);
+ field public static final int BIOMETRIC_ERROR_HW_UNAVAILABLE = 1; // 0x1
+ field public static final int BIOMETRIC_ERROR_NONE_ENROLLED = 11; // 0xb
+ field public static final int BIOMETRIC_ERROR_NO_HARDWARE = 12; // 0xc
+ field public static final int BIOMETRIC_ERROR_SECURITY_UPDATE_REQUIRED = 15; // 0xf
+ field public static final int BIOMETRIC_ERROR_UNSUPPORTED = -2; // 0xfffffffe
+ field public static final int BIOMETRIC_STATUS_UNKNOWN = -1; // 0xffffffff
+ field public static final int BIOMETRIC_SUCCESS = 0; // 0x0
+ }
+
+ public static interface BiometricManager.Authenticators {
+ field public static final int BIOMETRIC_STRONG = 15; // 0xf
+ field public static final int BIOMETRIC_WEAK = 255; // 0xff
+ field public static final int DEVICE_CREDENTIAL = 32768; // 0x8000
+ }
+
+ public class BiometricPrompt {
+ ctor public BiometricPrompt(androidx.fragment.app.FragmentActivity, androidx.biometric.BiometricPrompt.AuthenticationCallback);
+ ctor public BiometricPrompt(androidx.fragment.app.Fragment, androidx.biometric.BiometricPrompt.AuthenticationCallback);
+ ctor public BiometricPrompt(androidx.fragment.app.FragmentActivity, java.util.concurrent.Executor, androidx.biometric.BiometricPrompt.AuthenticationCallback);
+ ctor public BiometricPrompt(androidx.fragment.app.Fragment, java.util.concurrent.Executor, androidx.biometric.BiometricPrompt.AuthenticationCallback);
+ method public void authenticate(androidx.biometric.BiometricPrompt.PromptInfo, androidx.biometric.BiometricPrompt.CryptoObject);
+ method public void authenticate(androidx.biometric.BiometricPrompt.PromptInfo);
+ method public void cancelAuthentication();
+ field public static final int AUTHENTICATION_RESULT_TYPE_BIOMETRIC = 2; // 0x2
+ field public static final int AUTHENTICATION_RESULT_TYPE_DEVICE_CREDENTIAL = 1; // 0x1
+ field public static final int AUTHENTICATION_RESULT_TYPE_UNKNOWN = -1; // 0xffffffff
+ field public static final int ERROR_CANCELED = 5; // 0x5
+ field public static final int ERROR_HW_NOT_PRESENT = 12; // 0xc
+ field public static final int ERROR_HW_UNAVAILABLE = 1; // 0x1
+ field public static final int ERROR_LOCKOUT = 7; // 0x7
+ field public static final int ERROR_LOCKOUT_PERMANENT = 9; // 0x9
+ field public static final int ERROR_NEGATIVE_BUTTON = 13; // 0xd
+ field public static final int ERROR_NO_BIOMETRICS = 11; // 0xb
+ field public static final int ERROR_NO_DEVICE_CREDENTIAL = 14; // 0xe
+ field public static final int ERROR_NO_SPACE = 4; // 0x4
+ field public static final int ERROR_SECURITY_UPDATE_REQUIRED = 15; // 0xf
+ field public static final int ERROR_TIMEOUT = 3; // 0x3
+ field public static final int ERROR_UNABLE_TO_PROCESS = 2; // 0x2
+ field public static final int ERROR_USER_CANCELED = 10; // 0xa
+ field public static final int ERROR_VENDOR = 8; // 0x8
+ }
+
+ public abstract static class BiometricPrompt.AuthenticationCallback {
+ ctor public BiometricPrompt.AuthenticationCallback();
+ method public void onAuthenticationError(int, CharSequence);
+ method public void onAuthenticationFailed();
+ method public void onAuthenticationSucceeded(androidx.biometric.BiometricPrompt.AuthenticationResult);
+ }
+
+ public static class BiometricPrompt.AuthenticationResult {
+ method public int getAuthenticationType();
+ method public androidx.biometric.BiometricPrompt.CryptoObject? getCryptoObject();
+ }
+
+ public static class BiometricPrompt.CryptoObject {
+ ctor public BiometricPrompt.CryptoObject(java.security.Signature);
+ ctor public BiometricPrompt.CryptoObject(javax.crypto.Cipher);
+ ctor public BiometricPrompt.CryptoObject(javax.crypto.Mac);
+ ctor @RequiresApi(android.os.Build.VERSION_CODES.R) public BiometricPrompt.CryptoObject(android.security.identity.IdentityCredential);
+ method public javax.crypto.Cipher? getCipher();
+ method @RequiresApi(android.os.Build.VERSION_CODES.R) public android.security.identity.IdentityCredential? getIdentityCredential();
+ method public javax.crypto.Mac? getMac();
+ method public java.security.Signature? getSignature();
+ }
+
+ public static class BiometricPrompt.PromptInfo {
+ method public int getAllowedAuthenticators();
+ method public CharSequence? getDescription();
+ method public CharSequence getNegativeButtonText();
+ method public CharSequence? getSubtitle();
+ method public CharSequence getTitle();
+ method public boolean isConfirmationRequired();
+ method @Deprecated public boolean isDeviceCredentialAllowed();
+ }
+
+ public static class BiometricPrompt.PromptInfo.Builder {
+ ctor public BiometricPrompt.PromptInfo.Builder();
+ method public androidx.biometric.BiometricPrompt.PromptInfo build();
+ method public androidx.biometric.BiometricPrompt.PromptInfo.Builder setAllowedAuthenticators(int);
+ method public androidx.biometric.BiometricPrompt.PromptInfo.Builder setConfirmationRequired(boolean);
+ method public androidx.biometric.BiometricPrompt.PromptInfo.Builder setDescription(CharSequence?);
+ method @Deprecated public androidx.biometric.BiometricPrompt.PromptInfo.Builder setDeviceCredentialAllowed(boolean);
+ method public androidx.biometric.BiometricPrompt.PromptInfo.Builder setNegativeButtonText(CharSequence);
+ method public androidx.biometric.BiometricPrompt.PromptInfo.Builder setSubtitle(CharSequence?);
+ method public androidx.biometric.BiometricPrompt.PromptInfo.Builder setTitle(CharSequence);
+ }
+
+}
+
diff --git a/biometric/biometric/api/public_plus_experimental_1.1.0-rc01.txt b/biometric/biometric/api/public_plus_experimental_1.1.0-rc01.txt
new file mode 100644
index 0000000..2d2401f
--- /dev/null
+++ b/biometric/biometric/api/public_plus_experimental_1.1.0-rc01.txt
@@ -0,0 +1,96 @@
+// Signature format: 4.0
+package androidx.biometric {
+
+ public class BiometricManager {
+ method @Deprecated public int canAuthenticate();
+ method public int canAuthenticate(int);
+ method public static androidx.biometric.BiometricManager from(android.content.Context);
+ field public static final int BIOMETRIC_ERROR_HW_UNAVAILABLE = 1; // 0x1
+ field public static final int BIOMETRIC_ERROR_NONE_ENROLLED = 11; // 0xb
+ field public static final int BIOMETRIC_ERROR_NO_HARDWARE = 12; // 0xc
+ field public static final int BIOMETRIC_ERROR_SECURITY_UPDATE_REQUIRED = 15; // 0xf
+ field public static final int BIOMETRIC_ERROR_UNSUPPORTED = -2; // 0xfffffffe
+ field public static final int BIOMETRIC_STATUS_UNKNOWN = -1; // 0xffffffff
+ field public static final int BIOMETRIC_SUCCESS = 0; // 0x0
+ }
+
+ public static interface BiometricManager.Authenticators {
+ field public static final int BIOMETRIC_STRONG = 15; // 0xf
+ field public static final int BIOMETRIC_WEAK = 255; // 0xff
+ field public static final int DEVICE_CREDENTIAL = 32768; // 0x8000
+ }
+
+ public class BiometricPrompt {
+ ctor public BiometricPrompt(androidx.fragment.app.FragmentActivity, androidx.biometric.BiometricPrompt.AuthenticationCallback);
+ ctor public BiometricPrompt(androidx.fragment.app.Fragment, androidx.biometric.BiometricPrompt.AuthenticationCallback);
+ ctor public BiometricPrompt(androidx.fragment.app.FragmentActivity, java.util.concurrent.Executor, androidx.biometric.BiometricPrompt.AuthenticationCallback);
+ ctor public BiometricPrompt(androidx.fragment.app.Fragment, java.util.concurrent.Executor, androidx.biometric.BiometricPrompt.AuthenticationCallback);
+ method public void authenticate(androidx.biometric.BiometricPrompt.PromptInfo, androidx.biometric.BiometricPrompt.CryptoObject);
+ method public void authenticate(androidx.biometric.BiometricPrompt.PromptInfo);
+ method public void cancelAuthentication();
+ field public static final int AUTHENTICATION_RESULT_TYPE_BIOMETRIC = 2; // 0x2
+ field public static final int AUTHENTICATION_RESULT_TYPE_DEVICE_CREDENTIAL = 1; // 0x1
+ field public static final int AUTHENTICATION_RESULT_TYPE_UNKNOWN = -1; // 0xffffffff
+ field public static final int ERROR_CANCELED = 5; // 0x5
+ field public static final int ERROR_HW_NOT_PRESENT = 12; // 0xc
+ field public static final int ERROR_HW_UNAVAILABLE = 1; // 0x1
+ field public static final int ERROR_LOCKOUT = 7; // 0x7
+ field public static final int ERROR_LOCKOUT_PERMANENT = 9; // 0x9
+ field public static final int ERROR_NEGATIVE_BUTTON = 13; // 0xd
+ field public static final int ERROR_NO_BIOMETRICS = 11; // 0xb
+ field public static final int ERROR_NO_DEVICE_CREDENTIAL = 14; // 0xe
+ field public static final int ERROR_NO_SPACE = 4; // 0x4
+ field public static final int ERROR_SECURITY_UPDATE_REQUIRED = 15; // 0xf
+ field public static final int ERROR_TIMEOUT = 3; // 0x3
+ field public static final int ERROR_UNABLE_TO_PROCESS = 2; // 0x2
+ field public static final int ERROR_USER_CANCELED = 10; // 0xa
+ field public static final int ERROR_VENDOR = 8; // 0x8
+ }
+
+ public abstract static class BiometricPrompt.AuthenticationCallback {
+ ctor public BiometricPrompt.AuthenticationCallback();
+ method public void onAuthenticationError(int, CharSequence);
+ method public void onAuthenticationFailed();
+ method public void onAuthenticationSucceeded(androidx.biometric.BiometricPrompt.AuthenticationResult);
+ }
+
+ public static class BiometricPrompt.AuthenticationResult {
+ method public int getAuthenticationType();
+ method public androidx.biometric.BiometricPrompt.CryptoObject? getCryptoObject();
+ }
+
+ public static class BiometricPrompt.CryptoObject {
+ ctor public BiometricPrompt.CryptoObject(java.security.Signature);
+ ctor public BiometricPrompt.CryptoObject(javax.crypto.Cipher);
+ ctor public BiometricPrompt.CryptoObject(javax.crypto.Mac);
+ ctor @RequiresApi(android.os.Build.VERSION_CODES.R) public BiometricPrompt.CryptoObject(android.security.identity.IdentityCredential);
+ method public javax.crypto.Cipher? getCipher();
+ method @RequiresApi(android.os.Build.VERSION_CODES.R) public android.security.identity.IdentityCredential? getIdentityCredential();
+ method public javax.crypto.Mac? getMac();
+ method public java.security.Signature? getSignature();
+ }
+
+ public static class BiometricPrompt.PromptInfo {
+ method public int getAllowedAuthenticators();
+ method public CharSequence? getDescription();
+ method public CharSequence getNegativeButtonText();
+ method public CharSequence? getSubtitle();
+ method public CharSequence getTitle();
+ method public boolean isConfirmationRequired();
+ method @Deprecated public boolean isDeviceCredentialAllowed();
+ }
+
+ public static class BiometricPrompt.PromptInfo.Builder {
+ ctor public BiometricPrompt.PromptInfo.Builder();
+ method public androidx.biometric.BiometricPrompt.PromptInfo build();
+ method public androidx.biometric.BiometricPrompt.PromptInfo.Builder setAllowedAuthenticators(int);
+ method public androidx.biometric.BiometricPrompt.PromptInfo.Builder setConfirmationRequired(boolean);
+ method public androidx.biometric.BiometricPrompt.PromptInfo.Builder setDescription(CharSequence?);
+ method @Deprecated public androidx.biometric.BiometricPrompt.PromptInfo.Builder setDeviceCredentialAllowed(boolean);
+ method public androidx.biometric.BiometricPrompt.PromptInfo.Builder setNegativeButtonText(CharSequence);
+ method public androidx.biometric.BiometricPrompt.PromptInfo.Builder setSubtitle(CharSequence?);
+ method public androidx.biometric.BiometricPrompt.PromptInfo.Builder setTitle(CharSequence);
+ }
+
+}
+
diff --git a/biometric/biometric/api/res-1.1.0-rc01.txt b/biometric/biometric/api/res-1.1.0-rc01.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/biometric/biometric/api/res-1.1.0-rc01.txt
diff --git a/biometric/biometric/api/restricted_1.1.0-rc01.txt b/biometric/biometric/api/restricted_1.1.0-rc01.txt
new file mode 100644
index 0000000..2d2401f
--- /dev/null
+++ b/biometric/biometric/api/restricted_1.1.0-rc01.txt
@@ -0,0 +1,96 @@
+// Signature format: 4.0
+package androidx.biometric {
+
+ public class BiometricManager {
+ method @Deprecated public int canAuthenticate();
+ method public int canAuthenticate(int);
+ method public static androidx.biometric.BiometricManager from(android.content.Context);
+ field public static final int BIOMETRIC_ERROR_HW_UNAVAILABLE = 1; // 0x1
+ field public static final int BIOMETRIC_ERROR_NONE_ENROLLED = 11; // 0xb
+ field public static final int BIOMETRIC_ERROR_NO_HARDWARE = 12; // 0xc
+ field public static final int BIOMETRIC_ERROR_SECURITY_UPDATE_REQUIRED = 15; // 0xf
+ field public static final int BIOMETRIC_ERROR_UNSUPPORTED = -2; // 0xfffffffe
+ field public static final int BIOMETRIC_STATUS_UNKNOWN = -1; // 0xffffffff
+ field public static final int BIOMETRIC_SUCCESS = 0; // 0x0
+ }
+
+ public static interface BiometricManager.Authenticators {
+ field public static final int BIOMETRIC_STRONG = 15; // 0xf
+ field public static final int BIOMETRIC_WEAK = 255; // 0xff
+ field public static final int DEVICE_CREDENTIAL = 32768; // 0x8000
+ }
+
+ public class BiometricPrompt {
+ ctor public BiometricPrompt(androidx.fragment.app.FragmentActivity, androidx.biometric.BiometricPrompt.AuthenticationCallback);
+ ctor public BiometricPrompt(androidx.fragment.app.Fragment, androidx.biometric.BiometricPrompt.AuthenticationCallback);
+ ctor public BiometricPrompt(androidx.fragment.app.FragmentActivity, java.util.concurrent.Executor, androidx.biometric.BiometricPrompt.AuthenticationCallback);
+ ctor public BiometricPrompt(androidx.fragment.app.Fragment, java.util.concurrent.Executor, androidx.biometric.BiometricPrompt.AuthenticationCallback);
+ method public void authenticate(androidx.biometric.BiometricPrompt.PromptInfo, androidx.biometric.BiometricPrompt.CryptoObject);
+ method public void authenticate(androidx.biometric.BiometricPrompt.PromptInfo);
+ method public void cancelAuthentication();
+ field public static final int AUTHENTICATION_RESULT_TYPE_BIOMETRIC = 2; // 0x2
+ field public static final int AUTHENTICATION_RESULT_TYPE_DEVICE_CREDENTIAL = 1; // 0x1
+ field public static final int AUTHENTICATION_RESULT_TYPE_UNKNOWN = -1; // 0xffffffff
+ field public static final int ERROR_CANCELED = 5; // 0x5
+ field public static final int ERROR_HW_NOT_PRESENT = 12; // 0xc
+ field public static final int ERROR_HW_UNAVAILABLE = 1; // 0x1
+ field public static final int ERROR_LOCKOUT = 7; // 0x7
+ field public static final int ERROR_LOCKOUT_PERMANENT = 9; // 0x9
+ field public static final int ERROR_NEGATIVE_BUTTON = 13; // 0xd
+ field public static final int ERROR_NO_BIOMETRICS = 11; // 0xb
+ field public static final int ERROR_NO_DEVICE_CREDENTIAL = 14; // 0xe
+ field public static final int ERROR_NO_SPACE = 4; // 0x4
+ field public static final int ERROR_SECURITY_UPDATE_REQUIRED = 15; // 0xf
+ field public static final int ERROR_TIMEOUT = 3; // 0x3
+ field public static final int ERROR_UNABLE_TO_PROCESS = 2; // 0x2
+ field public static final int ERROR_USER_CANCELED = 10; // 0xa
+ field public static final int ERROR_VENDOR = 8; // 0x8
+ }
+
+ public abstract static class BiometricPrompt.AuthenticationCallback {
+ ctor public BiometricPrompt.AuthenticationCallback();
+ method public void onAuthenticationError(int, CharSequence);
+ method public void onAuthenticationFailed();
+ method public void onAuthenticationSucceeded(androidx.biometric.BiometricPrompt.AuthenticationResult);
+ }
+
+ public static class BiometricPrompt.AuthenticationResult {
+ method public int getAuthenticationType();
+ method public androidx.biometric.BiometricPrompt.CryptoObject? getCryptoObject();
+ }
+
+ public static class BiometricPrompt.CryptoObject {
+ ctor public BiometricPrompt.CryptoObject(java.security.Signature);
+ ctor public BiometricPrompt.CryptoObject(javax.crypto.Cipher);
+ ctor public BiometricPrompt.CryptoObject(javax.crypto.Mac);
+ ctor @RequiresApi(android.os.Build.VERSION_CODES.R) public BiometricPrompt.CryptoObject(android.security.identity.IdentityCredential);
+ method public javax.crypto.Cipher? getCipher();
+ method @RequiresApi(android.os.Build.VERSION_CODES.R) public android.security.identity.IdentityCredential? getIdentityCredential();
+ method public javax.crypto.Mac? getMac();
+ method public java.security.Signature? getSignature();
+ }
+
+ public static class BiometricPrompt.PromptInfo {
+ method public int getAllowedAuthenticators();
+ method public CharSequence? getDescription();
+ method public CharSequence getNegativeButtonText();
+ method public CharSequence? getSubtitle();
+ method public CharSequence getTitle();
+ method public boolean isConfirmationRequired();
+ method @Deprecated public boolean isDeviceCredentialAllowed();
+ }
+
+ public static class BiometricPrompt.PromptInfo.Builder {
+ ctor public BiometricPrompt.PromptInfo.Builder();
+ method public androidx.biometric.BiometricPrompt.PromptInfo build();
+ method public androidx.biometric.BiometricPrompt.PromptInfo.Builder setAllowedAuthenticators(int);
+ method public androidx.biometric.BiometricPrompt.PromptInfo.Builder setConfirmationRequired(boolean);
+ method public androidx.biometric.BiometricPrompt.PromptInfo.Builder setDescription(CharSequence?);
+ method @Deprecated public androidx.biometric.BiometricPrompt.PromptInfo.Builder setDeviceCredentialAllowed(boolean);
+ method public androidx.biometric.BiometricPrompt.PromptInfo.Builder setNegativeButtonText(CharSequence);
+ method public androidx.biometric.BiometricPrompt.PromptInfo.Builder setSubtitle(CharSequence?);
+ method public androidx.biometric.BiometricPrompt.PromptInfo.Builder setTitle(CharSequence);
+ }
+
+}
+
diff --git a/biometric/biometric/build.gradle b/biometric/biometric/build.gradle
index fd6b3ad..31321cf 100644
--- a/biometric/biometric/build.gradle
+++ b/biometric/biometric/build.gradle
@@ -26,7 +26,7 @@
dependencies {
// Public API dependencies
api("androidx.annotation:annotation:1.1.0")
- api("androidx.core:core:1.3.1")
+ api("androidx.core:core:1.3.2")
api("androidx.fragment:fragment:1.2.5")
// Internal dependencies
diff --git a/biometric/biometric/lint-baseline.xml b/biometric/biometric/lint-baseline.xml
index c3dfc0b..3eb3abe 100644
--- a/biometric/biometric/lint-baseline.xml
+++ b/biometric/biometric/lint-baseline.xml
@@ -2,6 +2,17 @@
<issues format="5" by="lint 4.2.0-alpha06" client="gradle" variant="debug" version="4.2.0-alpha06">
<issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" canAuthenticateWithCrypto.invoke(mBiometricManager, crypto);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/biometric/BiometricManager.java"
+ line="426"
+ column="29"/>
+ </issue>
+
+ <issue
id="UnsafeNewApiCall"
message="This call is to a method from API 28, the call containing class null is not annotated with @RequiresApi(x) where x is at least 28. Either annotate the containing class with at least @RequiresApi(28) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(28)."
errorLine1=" ? CryptoObjectUtils.unwrapFromBiometricPrompt(result.getCryptoObject())"
@@ -12,15 +23,4 @@
column="82"/>
</issue>
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 19, the call containing class androidx.biometric.BiometricFragment is not annotated with @RequiresApi(x) where x is at least 19. Either annotate the containing class with at least @RequiresApi(19) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(19)."
- errorLine1=" Objects.requireNonNull(CryptoObjectUtils.wrapForBiometricPrompt(crypto));"
- errorLine2=" ~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/biometric/BiometricFragment.java"
- line="534"
- column="29"/>
- </issue>
-
</issues>
diff --git a/biometric/integration-tests/testapp/build.gradle b/biometric/integration-tests/testapp/build.gradle
index 6670d07..4a89a76 100644
--- a/biometric/integration-tests/testapp/build.gradle
+++ b/biometric/integration-tests/testapp/build.gradle
@@ -54,7 +54,7 @@
dependencies {
implementation(project(":biometric:biometric"))
implementation("androidx.activity:activity-ktx:1.1.0")
- implementation("androidx.core:core-ktx:1.3.1")
+ implementation("androidx.core:core-ktx:1.3.2")
implementation("androidx.fragment:fragment-ktx:1.2.5")
implementation(KOTLIN_STDLIB)
diff --git a/biometric/integration-tests/testapp/lint-baseline.xml b/biometric/integration-tests/testapp/lint-baseline.xml
index abdad0e..58808f3 100644
--- a/biometric/integration-tests/testapp/lint-baseline.xml
+++ b/biometric/integration-tests/testapp/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="5" by="lint 4.2.0-dev" client="gradle" variant="debug" version="4.2.0-dev">
+<issues format="5" by="lint 4.2.0-alpha06" client="gradle" variant="debug" version="4.2.0-alpha06">
<issue
id="UnsafeNewApiCall"
@@ -47,17 +47,6 @@
<issue
id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.biometric.integration.testapp.BiometricTestActivity is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" setUserAuthenticationParameters(0 /* timeout */, keyType)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/biometric/integration/testapp/BiometricTestActivity.kt"
- line="219"
- column="21"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
message="This call is to a method from API 23, the call containing class androidx.biometric.integration.testapp.BiometricTestActivity is not annotated with @RequiresApi(x) where x is at least 23. Either annotate the containing class with at least @RequiresApi(23) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(23)."
errorLine1=" setUserAuthenticationValidityDurationSeconds(-1)"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
diff --git a/buildSrc/src/main/kotlin/androidx/build/AndroidXPlugin.kt b/buildSrc/src/main/kotlin/androidx/build/AndroidXPlugin.kt
index 56b5c9d..ceb8bb8 100644
--- a/buildSrc/src/main/kotlin/androidx/build/AndroidXPlugin.kt
+++ b/buildSrc/src/main/kotlin/androidx/build/AndroidXPlugin.kt
@@ -160,6 +160,10 @@
} else {
task.testLogging.apply {
showExceptions = false
+ // Disable all output, including the names of the failing tests, by specifying
+ // that the minimum granularity we're interested in is this very high number
+ // (which is higher than the current maximum granularity that Gradle offers (3))
+ minGranularity = 1000
}
val htmlReport = task.reports.html
diff --git a/buildSrc/src/main/kotlin/androidx/build/LibraryVersions.kt b/buildSrc/src/main/kotlin/androidx/build/LibraryVersions.kt
index 8de6ef0..ca8e239 100644
--- a/buildSrc/src/main/kotlin/androidx/build/LibraryVersions.kt
+++ b/buildSrc/src/main/kotlin/androidx/build/LibraryVersions.kt
@@ -32,7 +32,7 @@
val ASYNCLAYOUTINFLATER = Version("1.1.0-alpha01")
val AUTOFILL = Version("1.1.0-rc01")
val BENCHMARK = Version("1.1.0-alpha02")
- val BIOMETRIC = Version("1.1.0-beta02")
+ val BIOMETRIC = Version("1.1.0-rc01")
val BROWSER = Version("1.3.0-beta01")
val BUILDSRC_TESTS = Version("1.0.0-alpha01")
val CAMERA = Version("1.0.0-beta12")
@@ -82,7 +82,7 @@
val MEDIA2 = Version("1.1.0-rc01")
val MEDIAROUTER = Version("1.3.0-alpha01")
val NAVIGATION = Version("2.4.0-alpha01")
- val NAVIGATION_COMPOSE = Version("1.0.0-alpha01")
+ val NAVIGATION_COMPOSE = Version("1.0.0-alpha02")
val PAGING = Version("3.0.0-alpha09")
val PAGING_COMPOSE = Version("1.0.0-alpha01")
val PALETTE = Version("1.1.0-alpha01")
@@ -90,7 +90,7 @@
val PERCENTLAYOUT = Version("1.1.0-alpha01")
val PREFERENCE = Version("1.2.0-alpha01")
val RECOMMENDATION = Version("1.1.0-alpha01")
- val RECYCLERVIEW = Version("1.2.0-alpha06")
+ val RECYCLERVIEW = Version("1.2.0-beta01")
val RECYCLERVIEW_SELECTION = Version("2.0.0-alpha01")
val REMOTECALLBACK = Version("1.0.0-alpha02")
val ROOM = Version("2.3.0-alpha03")
diff --git a/camera/camera-camera2-pipe-integration/src/main/java/androidx/camera/camera2/pipe/integration/impl/CameraPipeDeviceSurfaceManager.kt b/camera/camera-camera2-pipe-integration/src/main/java/androidx/camera/camera2/pipe/integration/impl/CameraPipeDeviceSurfaceManager.kt
index 4a8807e..4c06e7c 100644
--- a/camera/camera-camera2-pipe-integration/src/main/java/androidx/camera/camera2/pipe/integration/impl/CameraPipeDeviceSurfaceManager.kt
+++ b/camera/camera-camera2-pipe-integration/src/main/java/androidx/camera/camera2/pipe/integration/impl/CameraPipeDeviceSurfaceManager.kt
@@ -58,10 +58,6 @@
TODO("Not implemented.")
}
- override fun getMaxOutputSize(cameraId: String, imageFormat: Int): Size? {
- TODO("Not implemented.")
- }
-
override fun getSuggestedResolutions(
cameraId: String,
existingSurfaces: List<SurfaceConfig>,
@@ -69,8 +65,4 @@
): Map<UseCaseConfig<*>, Size> {
TODO("Not implemented.")
}
-
- override fun getPreviewSize(): Size {
- TODO("Not implemented.")
- }
}
\ No newline at end of file
diff --git a/camera/camera-camera2-pipe/lint-baseline.xml b/camera/camera-camera2-pipe/lint-baseline.xml
index 5abc72e..b0e1679 100644
--- a/camera/camera-camera2-pipe/lint-baseline.xml
+++ b/camera/camera-camera2-pipe/lint-baseline.xml
@@ -8,7 +8,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/camera/camera2/pipe/wrapper/CameraDevice.kt"
- line="157"
+ line="159"
column="22"/>
</issue>
@@ -19,7 +19,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/camera/camera2/pipe/wrapper/CameraDevice.kt"
- line="175"
+ line="177"
column="22"/>
</issue>
@@ -30,7 +30,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/camera/camera2/pipe/wrapper/CameraDevice.kt"
- line="192"
+ line="194"
column="22"/>
</issue>
@@ -41,7 +41,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/camera/camera2/pipe/wrapper/CameraDevice.kt"
- line="210"
+ line="212"
column="22"/>
</issue>
@@ -52,250 +52,41 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/camera/camera2/pipe/wrapper/CameraDevice.kt"
- line="211"
+ line="213"
column="13"/>
</issue>
<issue
id="UnsafeNewApiCall"
- message="This call is to a method from API 28, the call containing class androidx.camera.camera2.pipe.wrapper.AndroidCameraDevice is not annotated with @RequiresApi(x) where x is at least 28. Either annotate the containing class with at least @RequiresApi(28) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(28)."
- errorLine1=" val sessionConfig = SessionConfiguration("
- errorLine2=" ^">
+ message="This call is to a method from API 28, the call containing class androidx.camera.camera2.pipe.impl.CameraMetadataImpl is not annotated with @RequiresApi(x) where x is at least 28. Either annotate the containing class with at least @RequiresApi(28) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(28)."
+ errorLine1=" characteristics.physicalCameraIds.orEmpty().map { CameraId(it) }.toSet()"
+ errorLine2=" ~~~~~~~~~~~~~~~~~">
<location
- file="src/main/java/androidx/camera/camera2/pipe/wrapper/CameraDevice.kt"
- line="220"
- column="29"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 23, the call containing class androidx.camera.camera2.pipe.wrapper.AndroidCameraDevice is not annotated with @RequiresApi(x) where x is at least 23. Either annotate the containing class with at least @RequiresApi(23) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(23)."
- errorLine1=" sessionConfig.inputConfiguration = InputConfiguration("
- errorLine2=" ^">
- <location
- file="src/main/java/androidx/camera/camera2/pipe/wrapper/CameraDevice.kt"
- line="228"
- column="48"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 23, the call containing class androidx.camera.camera2.pipe.wrapper.AndroidCameraDevice is not annotated with @RequiresApi(x) where x is at least 23. Either annotate the containing class with at least @RequiresApi(23) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(23)."
- errorLine1=" sessionConfig.inputConfiguration = InputConfiguration("
- errorLine2=" ^">
- <location
- file="src/main/java/androidx/camera/camera2/pipe/wrapper/CameraDevice.kt"
- line="228"
- column="48"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 28, the call containing class androidx.camera.camera2.pipe.wrapper.AndroidCameraDevice is not annotated with @RequiresApi(x) where x is at least 28. Either annotate the containing class with at least @RequiresApi(28) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(28)."
- errorLine1=" sessionConfig.inputConfiguration = InputConfiguration("
- errorLine2=" ~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/camera2/pipe/wrapper/CameraDevice.kt"
- line="228"
- column="27"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 28, the call containing class androidx.camera.camera2.pipe.wrapper.AndroidCameraDevice is not annotated with @RequiresApi(x) where x is at least 28. Either annotate the containing class with at least @RequiresApi(28) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(28)."
- errorLine1=" sessionConfig.sessionParameters = requestBuilder.build()"
- errorLine2=" ~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/camera2/pipe/wrapper/CameraDevice.kt"
- line="248"
- column="23"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 28, the call containing class androidx.camera.camera2.pipe.wrapper.AndroidCameraDevice is not annotated with @RequiresApi(x) where x is at least 28. Either annotate the containing class with at least @RequiresApi(28) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(28)."
- errorLine1=" cameraDevice.createCaptureSession(sessionConfig)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/camera2/pipe/wrapper/CameraDevice.kt"
- line="250"
- column="22"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 23, the call containing class androidx.camera.camera2.pipe.wrapper.AndroidCameraDevice is not annotated with @RequiresApi(x) where x is at least 23. Either annotate the containing class with at least @RequiresApi(23) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(23)."
- errorLine1=" cameraDevice.createReprocessCaptureRequest(inputResult)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/camera2/pipe/wrapper/CameraDevice.kt"
- line="262"
- column="22"/>
+ file="src/main/java/androidx/camera/camera2/pipe/impl/CameraMetadataImpl.kt"
+ line="108"
+ column="41"/>
</issue>
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 28, the call containing class androidx.camera.camera2.pipe.impl.CameraMetadataImpl is not annotated with @RequiresApi(x) where x is at least 28. Either annotate the containing class with at least @RequiresApi(28) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(28)."
- errorLine1=" characteristics.physicalCameraIds.orEmpty().map { CameraId(it) }.toSet()"
- errorLine2=" ~~~~~~~~~~~~~~~~~">
+ errorLine1=" characteristics.availablePhysicalCameraRequestKeys.orEmpty().toSet()"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/camera/camera2/pipe/impl/CameraMetadataImpl.kt"
- line="100"
- column="37"/>
+ line="124"
+ column="41"/>
</issue>
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 28, the call containing class androidx.camera.camera2.pipe.impl.CameraMetadataImpl is not annotated with @RequiresApi(x) where x is at least 28. Either annotate the containing class with at least @RequiresApi(28) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(28)."
- errorLine1=" characteristics.availablePhysicalCameraRequestKeys.orEmpty().toSet()"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ errorLine1=" characteristics.availableSessionKeys.orEmpty().toSet()"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/camera/camera2/pipe/impl/CameraMetadataImpl.kt"
- line="114"
- column="37"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 28, the call containing class androidx.camera.camera2.pipe.impl.CameraMetadataImpl is not annotated with @RequiresApi(x) where x is at least 28. Either annotate the containing class with at least @RequiresApi(28) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(28)."
- errorLine1=" characteristics.availableSessionKeys.orEmpty().toSet()"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/camera2/pipe/impl/CameraMetadataImpl.kt"
- line="128"
- column="37"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 23, the call containing class androidx.camera.camera2.pipe.wrapper.AndroidCameraCaptureSession is not annotated with @RequiresApi(x) where x is at least 23. Either annotate the containing class with at least @RequiresApi(23) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(23)."
- errorLine1=" return cameraCaptureSession.isReprocessable"
- errorLine2=" ~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/camera2/pipe/wrapper/CaptureSession.kt"
- line="296"
- column="45"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 23, the call containing class androidx.camera.camera2.pipe.wrapper.AndroidCameraCaptureSession is not annotated with @RequiresApi(x) where x is at least 23. Either annotate the containing class with at least @RequiresApi(23) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(23)."
- errorLine1=" return cameraCaptureSession.inputSurface"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/camera2/pipe/wrapper/CaptureSession.kt"
- line="305"
- column="45"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 26, the call containing class androidx.camera.camera2.pipe.wrapper.AndroidCameraCaptureSession is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
- errorLine1=" cameraCaptureSession.finalizeOutputConfigurations(outputConfigs.map { it.unwrap() })"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/camera2/pipe/wrapper/CaptureSession.kt"
- line="321"
- column="34"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 24, the call containing class androidx.camera.camera2.pipe.wrapper.AndroidOutputConfiguration.Companion is not annotated with @RequiresApi(x) where x is at least 24. Either annotate the containing class with at least @RequiresApi(24) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(24)."
- errorLine1=" OutputConfiguration(surfaceGroupId, surface)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/camera2/pipe/wrapper/Configuration.kt"
- line="144"
- column="21"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 24, the call containing class androidx.camera.camera2.pipe.wrapper.AndroidOutputConfiguration.Companion is not annotated with @RequiresApi(x) where x is at least 24. Either annotate the containing class with at least @RequiresApi(24) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(24)."
- errorLine1=" OutputConfiguration(surface)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/camera2/pipe/wrapper/Configuration.kt"
- line="146"
- column="21"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 26, the call containing class androidx.camera.camera2.pipe.wrapper.AndroidOutputConfiguration.Companion is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
- errorLine1=" configuration = OutputConfiguration("
- errorLine2=" ^">
- <location
- file="src/main/java/androidx/camera/camera2/pipe/wrapper/Configuration.kt"
- line="160"
- column="33"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 28, the call containing class androidx.camera.camera2.pipe.wrapper.AndroidOutputConfiguration.Companion is not annotated with @RequiresApi(x) where x is at least 28. Either annotate the containing class with at least @RequiresApi(28) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(28)."
- errorLine1=" configuration.maxSharedSurfaceCount"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/camera2/pipe/wrapper/Configuration.kt"
- line="187"
- column="35"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 26, the call containing class androidx.camera.camera2.pipe.wrapper.AndroidOutputConfiguration.Companion is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
- errorLine1=" this.enableSurfaceSharing()"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/camera2/pipe/wrapper/Configuration.kt"
- line="198"
- column="22"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 28, the call containing class androidx.camera.camera2.pipe.wrapper.AndroidOutputConfiguration.Companion is not annotated with @RequiresApi(x) where x is at least 28. Either annotate the containing class with at least @RequiresApi(28) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(28)."
- errorLine1=" this.setPhysicalCameraId(physicalCameraId.value)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/camera2/pipe/wrapper/Configuration.kt"
- line="205"
- column="22"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 26, the call containing class androidx.camera.camera2.pipe.wrapper.AndroidOutputConfiguration is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
- errorLine1=" return output.surfaces"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/camera2/pipe/wrapper/Configuration.kt"
- line="214"
- column="31"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 26, the call containing class androidx.camera.camera2.pipe.wrapper.AndroidOutputConfiguration is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
- errorLine1=" output.addSurface(surface)"
- errorLine2=" ~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/camera2/pipe/wrapper/Configuration.kt"
- line="226"
- column="20"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 28, the call containing class androidx.camera.camera2.pipe.wrapper.AndroidOutputConfiguration is not annotated with @RequiresApi(x) where x is at least 28. Either annotate the containing class with at least @RequiresApi(28) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(28)."
- errorLine1=" output.removeSurface(surface)"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/camera2/pipe/wrapper/Configuration.kt"
- line="233"
- column="20"/>
+ line="140"
+ column="41"/>
</issue>
<issue
@@ -311,28 +102,6 @@
<issue
id="UnsafeNewApiCall"
- message="This call is to a method from API 23, the call containing class androidx.camera.camera2.pipe.impl.Permissions is not annotated with @RequiresApi(x) where x is at least 23. Either annotate the containing class with at least @RequiresApi(23) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(23)."
- errorLine1=" context.checkSelfPermission(Manifest.permission.CAMERA) == PERMISSION_GRANTED"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/camera2/pipe/impl/Permissions.kt"
- line="53"
- column="21"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 23, the call containing class androidx.camera.camera2.pipe.impl.AndroidMSessionFactory is not annotated with @RequiresApi(x) where x is at least 23. Either annotate the containing class with at least @RequiresApi(23) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(23)."
- errorLine1=" InputConfiguration("
- errorLine2=" ^">
- <location
- file="src/main/java/androidx/camera/camera2/pipe/impl/SessionFactory.kt"
- line="129"
- column="21"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
message="This call is to a method from API 28, the call containing class androidx.camera.camera2.pipe.impl.VirtualCameraManager is not annotated with @RequiresApi(x) where x is at least 28. Either annotate the containing class with at least @RequiresApi(28) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(28)."
errorLine1=" instance.openCamera("
errorLine2=" ~~~~~~~~~~">
@@ -342,15 +111,4 @@
column="34"/>
</issue>
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 28, the call containing class androidx.camera.camera2.pipe.impl.VirtualCameraManager is not annotated with @RequiresApi(x) where x is at least 28. Either annotate the containing class with at least @RequiresApi(28) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(28)."
- errorLine1=" manager.registerAvailabilityCallback(threads.defaultExecutor, availabilityCallback)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/camera2/pipe/impl/VirtualCameraManager.kt"
- line="318"
- column="21"/>
- </issue>
-
</issues>
diff --git a/camera/camera-camera2-pipe/src/main/java/androidx/camera/camera2/pipe/impl/GraphProcessor.kt b/camera/camera-camera2-pipe/src/main/java/androidx/camera/camera2/pipe/impl/GraphProcessor.kt
index 9baef49..c3910b4 100644
--- a/camera/camera-camera2-pipe/src/main/java/androidx/camera/camera2/pipe/impl/GraphProcessor.kt
+++ b/camera/camera-camera2-pipe/src/main/java/androidx/camera/camera2/pipe/impl/GraphProcessor.kt
@@ -354,10 +354,15 @@
burst = nullableBurst
} else if (!dirty) {
+ debug { "Failed to submit $burst, and the queue is not dirty." }
// If we did not submit, and we are also not dirty, then exit the loop
submitting = false
return
} else {
+ debug {
+ "Failed to submit $burst but the request queue or processor is " +
+ "dirty. Clearing dirty flag and attempting retry."
+ }
dirty = false
// One possible situation is that the _requestProcessor was replaced or
diff --git a/camera/camera-camera2-pipe/src/test/java/androidx/camera/camera2/pipe/impl/GraphProcessorTest.kt b/camera/camera-camera2-pipe/src/test/java/androidx/camera/camera2/pipe/impl/GraphProcessorTest.kt
index ac6b117..abdc307 100644
--- a/camera/camera-camera2-pipe/src/test/java/androidx/camera/camera2/pipe/impl/GraphProcessorTest.kt
+++ b/camera/camera-camera2-pipe/src/test/java/androidx/camera/camera2/pipe/impl/GraphProcessorTest.kt
@@ -152,14 +152,19 @@
graphProcessor.attach(fakeProcessor1)
graphProcessor.submit(request1)
- assertThat(fakeProcessor1.nextEvent().rejected).isTrue()
+ val event1 = fakeProcessor1.nextEvent()
+ assertThat(event1.rejected).isTrue()
+ assertThat(event1.request!!.burst[0]).isSameInstanceAs(request1)
graphProcessor.submit(request2)
- assertThat(fakeProcessor1.nextEvent().rejected).isTrue()
+ val event2 = fakeProcessor1.nextEvent()
+ assertThat(event2.rejected).isTrue()
+ assertThat(event2.request!!.burst[0]).isSameInstanceAs(request1)
graphProcessor.attach(fakeProcessor2)
assertThat(fakeProcessor2.nextEvent().request!!.burst[0]).isSameInstanceAs(request1)
assertThat(fakeProcessor2.nextEvent().request!!.burst[0]).isSameInstanceAs(request2)
+ assertThat(fakeProcessor2.requestQueue).hasSize(2)
}
assertThat(fakeProcessor1.requestQueue).hasSize(0)
diff --git a/camera/camera-camera2-pipe/src/test/java/androidx/camera/camera2/pipe/testing/FakeRequestProcessor.kt b/camera/camera-camera2-pipe/src/test/java/androidx/camera/camera2/pipe/testing/FakeRequestProcessor.kt
index a0eb857..f7e3bed 100644
--- a/camera/camera-camera2-pipe/src/test/java/androidx/camera/camera2/pipe/testing/FakeRequestProcessor.kt
+++ b/camera/camera-camera2-pipe/src/test/java/androidx/camera/camera2/pipe/testing/FakeRequestProcessor.kt
@@ -74,12 +74,12 @@
FakeRequest(listOf(request), extraRequestParameters, requireSurfacesForAllStreams)
if (rejectRequests || closeInvoked) {
- eventChannel.offer(Event(request = fakeRequest, rejected = true))
+ check(eventChannel.offer(Event(request = fakeRequest, rejected = true)))
return false
}
requestQueue.add(fakeRequest)
- eventChannel.offer(Event(request = fakeRequest, submit = true))
+ check(eventChannel.offer(Event(request = fakeRequest, submit = true)))
return true
}
@@ -92,12 +92,12 @@
val fakeRequest =
FakeRequest(requests, extraRequestParameters, requireSurfacesForAllStreams)
if (rejectRequests || closeInvoked) {
- eventChannel.offer(Event(request = fakeRequest, rejected = true))
+ check(eventChannel.offer(Event(request = fakeRequest, rejected = true)))
return false
}
requestQueue.add(fakeRequest)
- eventChannel.offer(Event(request = fakeRequest, submit = true))
+ check(eventChannel.offer(Event(request = fakeRequest, submit = true)))
return true
}
@@ -110,34 +110,34 @@
val fakeRequest =
FakeRequest(listOf(request), extraRequestParameters, requireSurfacesForAllStreams)
if (rejectRequests || closeInvoked) {
- eventChannel.offer(Event(request = fakeRequest, rejected = true))
+ check(eventChannel.offer(Event(request = fakeRequest, rejected = true)))
return false
}
repeatingRequest = fakeRequest
- eventChannel.offer(Event(request = fakeRequest, setRepeating = true))
+ check(eventChannel.offer(Event(request = fakeRequest, setRepeating = true)))
return true
}
override fun abortCaptures() {
abortInvoked = true
- eventChannel.offer(Event(abort = true))
+ check(eventChannel.offer(Event(abort = true)))
}
override fun stopRepeating() {
stopInvoked = true
- eventChannel.offer(Event(stop = true))
+ check(eventChannel.offer(Event(stop = true)))
}
override fun close() {
closeInvoked = true
- eventChannel.offer(Event(close = true))
+ check(eventChannel.offer(Event(close = true)))
}
/**
* Get the next event from queue with an option to specify a timeout for tests.
*/
- suspend fun nextEvent(timeMillis: Long = 25): Event = withTimeout(timeMillis) {
+ suspend fun nextEvent(timeMillis: Long = 100): Event = withTimeout(timeMillis) {
eventChannel.receive()
}
}
diff --git a/camera/camera-camera2/api/public_plus_experimental_1.0.0-beta12.txt b/camera/camera-camera2/api/public_plus_experimental_1.0.0-beta12.txt
index 5a0843c..9777f11 100644
--- a/camera/camera-camera2/api/public_plus_experimental_1.0.0-beta12.txt
+++ b/camera/camera-camera2/api/public_plus_experimental_1.0.0-beta12.txt
@@ -18,7 +18,7 @@
}
@androidx.camera.camera2.interop.ExperimentalCamera2Interop public final class Camera2CameraInfo {
- method public static androidx.camera.camera2.interop.Camera2CameraInfo fromCameraInfo(androidx.camera.core.CameraInfo);
+ 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();
}
diff --git a/camera/camera-camera2/api/public_plus_experimental_current.txt b/camera/camera-camera2/api/public_plus_experimental_current.txt
index 5a0843c..9777f11 100644
--- a/camera/camera-camera2/api/public_plus_experimental_current.txt
+++ b/camera/camera-camera2/api/public_plus_experimental_current.txt
@@ -18,7 +18,7 @@
}
@androidx.camera.camera2.interop.ExperimentalCamera2Interop public final class Camera2CameraInfo {
- method public static androidx.camera.camera2.interop.Camera2CameraInfo fromCameraInfo(androidx.camera.core.CameraInfo);
+ 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();
}
diff --git a/camera/camera-camera2/lint-baseline.xml b/camera/camera-camera2/lint-baseline.xml
index d136fc7..9c280b7 100644
--- a/camera/camera-camera2/lint-baseline.xml
+++ b/camera/camera-camera2/lint-baseline.xml
@@ -2,6 +2,39 @@
<issues format="5" by="lint 4.2.0-alpha06" client="gradle" variant="debug" version="4.2.0-alpha06">
<issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" return (Size) getSurfaceSize.invoke(null, surface);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/camera/camera2/internal/compat/params/OutputConfigurationCompatBaseImpl.java"
+ line="236"
+ column="31"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" return (int) detectSurfaceType.invoke(null, surface);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/camera/camera2/internal/compat/params/OutputConfigurationCompatBaseImpl.java"
+ line="256"
+ column="30"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" return (int) getGenerationId.invoke(surface);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/camera/camera2/internal/compat/params/OutputConfigurationCompatBaseImpl.java"
+ line="272"
+ column="30"/>
+ </issue>
+
+ <issue
id="UnsafeNewApiCall"
message="This call is to a method from API 24, the call containing class androidx.camera.camera2.internal.Camera2CaptureCallbacks.ComboSessionCaptureCallback is not annotated with @RequiresApi(x) where x is at least 24. Either annotate the containing class with at least @RequiresApi(24) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(24)."
errorLine1=" callback.onCaptureBufferLost(session, request, surface, frame);"
@@ -85,7 +118,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/camera/camera2/internal/compat/CameraManagerCompat.java"
- line="264"
+ line="272"
column="46"/>
</issue>
diff --git a/camera/camera-camera2/src/androidTest/java/androidx/camera/camera2/interop/Camera2InteropDeviceTest.java b/camera/camera-camera2/src/androidTest/java/androidx/camera/camera2/interop/Camera2InteropDeviceTest.java
index 58eb8d2..074e01d 100644
--- a/camera/camera-camera2/src/androidTest/java/androidx/camera/camera2/interop/Camera2InteropDeviceTest.java
+++ b/camera/camera-camera2/src/androidTest/java/androidx/camera/camera2/interop/Camera2InteropDeviceTest.java
@@ -231,7 +231,7 @@
ImageAnalysis imageAnalysis = new ImageAnalysis.Builder().build();
mCamera = CameraUtil.createCameraAndAttachUseCase(mContext, mCameraSelector, imageAnalysis);
- String cameraId = Camera2CameraInfo.fromCameraInfo(mCamera.getCameraInfo()).getCameraId();
+ String cameraId = Camera2CameraInfo.from(mCamera.getCameraInfo()).getCameraId();
cameraIdRef.set(cameraId);
InstrumentationRegistry.getInstrumentation().runOnMainSync(() ->
diff --git a/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/Camera2DeviceSurfaceManager.java b/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/Camera2DeviceSurfaceManager.java
index bd51a5e..e5eb1ff 100644
--- a/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/Camera2DeviceSurfaceManager.java
+++ b/camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/Camera2DeviceSurfaceManager.java
@@ -29,7 +29,6 @@
import androidx.camera.core.CameraUnavailableException;
import androidx.camera.core.impl.CameraDeviceSurfaceManager;
import androidx.camera.core.impl.SurfaceConfig;
-import androidx.camera.core.impl.SurfaceSizeDefinition;
import androidx.camera.core.impl.UseCaseConfig;
import androidx.core.util.Preconditions;
@@ -50,7 +49,6 @@
*/
public final class Camera2DeviceSurfaceManager implements CameraDeviceSurfaceManager {
private static final String TAG = "Camera2DeviceSurfaceManager";
- private static final Size MAXIMUM_PREVIEW_SIZE = new Size(1920, 1080);
private final Map<String, SupportedSurfaceCombination> mCameraSupportedSurfaceCombinationMap =
new HashMap<>();
private final CamcorderProfileHelper mCamcorderProfileHelper;
@@ -206,52 +204,4 @@
return supportedSurfaceCombination.getSuggestedResolutions(existingSurfaces,
newUseCaseConfigs);
}
-
- /**
- * Get max supported output size for specific camera device and image format
- *
- * @param cameraId the camera Id
- * @param imageFormat the image format info
- * @return the max supported output size for the image format
- * @throws IllegalStateException if not initialized
- */
- @NonNull
- @Override
- public Size getMaxOutputSize(@NonNull String cameraId, int imageFormat) {
- SupportedSurfaceCombination supportedSurfaceCombination =
- mCameraSupportedSurfaceCombinationMap.get(cameraId);
-
- if (supportedSurfaceCombination == null) {
- throw new IllegalArgumentException(
- "Fail to find supported surface info - CameraId:" + cameraId);
- }
-
- return supportedSurfaceCombination.getMaxOutputSizeByFormat(imageFormat);
- }
-
- /**
- * Retrieves the preview size, choosing the smaller of the display size and 1080P.
- *
- * @return preview size from {@link SurfaceSizeDefinition}
- * @throws IllegalStateException if not initialized
- */
- @NonNull
- @Override
- public Size getPreviewSize() {
- // 1920x1080 is maximum preview size
- Size previewSize = MAXIMUM_PREVIEW_SIZE;
-
- if (!mCameraSupportedSurfaceCombinationMap.isEmpty()) {
- // Preview size depends on the display size and 1080P. Therefore, we can get the first
- // camera device's preview size to return it.
- String cameraId = (String) mCameraSupportedSurfaceCombinationMap.keySet().toArray()[0];
- previewSize =
- mCameraSupportedSurfaceCombinationMap
- .get(cameraId)
- .getSurfaceSizeDefinition()
- .getPreviewSize();
- }
-
- return previewSize;
- }
}
diff --git a/camera/camera-camera2/src/main/java/androidx/camera/camera2/interop/Camera2CameraInfo.java b/camera/camera-camera2/src/main/java/androidx/camera/camera2/interop/Camera2CameraInfo.java
index 8f89ece1..eaff42a 100644
--- a/camera/camera-camera2/src/main/java/androidx/camera/camera2/interop/Camera2CameraInfo.java
+++ b/camera/camera-camera2/src/main/java/androidx/camera/camera2/interop/Camera2CameraInfo.java
@@ -49,13 +49,13 @@
*
* @param cameraInfo The {@link CameraInfo} to get from.
* @return The camera information with Camera2 implementation.
- * @throws IllegalStateException if the camera info does not contain the camera2 information
+ * @throws IllegalArgumentException if the camera info does not contain the camera2 information
* (e.g., if CameraX was not initialized with a
* {@link androidx.camera.camera2.Camera2Config}).
*/
@NonNull
- public static Camera2CameraInfo fromCameraInfo(@NonNull CameraInfo cameraInfo) {
- Preconditions.checkState(cameraInfo instanceof Camera2CameraInfoImpl,
+ public static Camera2CameraInfo from(@NonNull CameraInfo cameraInfo) {
+ Preconditions.checkArgument(cameraInfo instanceof Camera2CameraInfoImpl,
"CameraInfo doesn't contain Camera2 implementation.");
return ((Camera2CameraInfoImpl) cameraInfo).getCamera2CameraInfo();
}
diff --git a/camera/camera-camera2/src/test/java/androidx/camera/camera2/internal/Camera2DeviceSurfaceManagerTest.java b/camera/camera-camera2/src/test/java/androidx/camera/camera2/internal/Camera2DeviceSurfaceManagerTest.java
index c72afb9..b248170 100644
--- a/camera/camera-camera2/src/test/java/androidx/camera/camera2/internal/Camera2DeviceSurfaceManagerTest.java
+++ b/camera/camera-camera2/src/test/java/androidx/camera/camera2/internal/Camera2DeviceSurfaceManagerTest.java
@@ -513,15 +513,6 @@
assertEquals(expectedSurfaceConfig, surfaceConfig);
}
- @Test
- public void getMaximumSizeForImageFormat() {
- Size maximumYUVSize =
- mSurfaceManager.getMaxOutputSize(LEGACY_CAMERA_ID, ImageFormat.YUV_420_888);
- assertEquals(mMaximumSize, maximumYUVSize);
- Size maximumJPEGSize = mSurfaceManager.getMaxOutputSize(LEGACY_CAMERA_ID, ImageFormat.JPEG);
- assertEquals(mMaximumSize, maximumJPEGSize);
- }
-
private void setupCamera() {
mCameraFactory = new FakeCameraFactory();
diff --git a/camera/camera-camera2/src/test/java/androidx/camera/camera2/interop/Camera2CameraInfoTest.java b/camera/camera-camera2/src/test/java/androidx/camera/camera2/interop/Camera2CameraInfoTest.java
index 4c16aba..9e3f9b4 100644
--- a/camera/camera-camera2/src/test/java/androidx/camera/camera2/interop/Camera2CameraInfoTest.java
+++ b/camera/camera-camera2/src/test/java/androidx/camera/camera2/interop/Camera2CameraInfoTest.java
@@ -27,9 +27,7 @@
import androidx.annotation.experimental.UseExperimental;
import androidx.camera.camera2.internal.Camera2CameraInfoImpl;
import androidx.camera.camera2.internal.compat.CameraCharacteristicsCompat;
-import androidx.camera.core.Camera;
import androidx.camera.core.impl.CameraInfoInternal;
-import androidx.camera.testing.fakes.FakeCamera;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -76,20 +74,15 @@
public void canGetCamera2CameraInfo() {
Camera2CameraInfo camera2CameraInfo = mock(Camera2CameraInfo.class);
Camera2CameraInfoImpl cameraInfoImpl = mock(Camera2CameraInfoImpl.class);
- when(cameraInfoImpl.getCamera2CameraInfo()).thenAnswer(
- ignored -> camera2CameraInfo);
- Camera camera = new FakeCamera(null, cameraInfoImpl);
- Camera2CameraInfo resultCamera2CameraInfo = Camera2CameraInfo.fromCameraInfo(
- camera.getCameraInfo());
+ when(cameraInfoImpl.getCamera2CameraInfo()).thenAnswer(ignored -> camera2CameraInfo);
+ Camera2CameraInfo resultCamera2CameraInfo = Camera2CameraInfo.from(cameraInfoImpl);
assertThat(resultCamera2CameraInfo).isEqualTo(camera2CameraInfo);
}
- @Test(expected = IllegalStateException.class)
- public void getCameraInfoThrows_whenNotCamera2Impl() {
+ @Test(expected = IllegalArgumentException.class)
+ public void fromCameraInfoThrows_whenNotCamera2Impl() {
CameraInfoInternal wrongCameraInfo = mock(CameraInfoInternal.class);
- Camera camera = new FakeCamera(null, wrongCameraInfo);
-
- Camera2CameraInfo.fromCameraInfo(camera.getCameraInfo());
+ Camera2CameraInfo.from(wrongCameraInfo);
}
}
diff --git a/camera/camera-core/lint-baseline.xml b/camera/camera-core/lint-baseline.xml
index 0d8d2d8..d717cfa 100644
--- a/camera/camera-core/lint-baseline.xml
+++ b/camera/camera-core/lint-baseline.xml
@@ -503,7 +503,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/camera/core/impl/CameraDeviceSurfaceManager.java"
- line="59"
+ line="61"
column="28"/>
</issue>
@@ -514,7 +514,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/camera/core/impl/CameraDeviceSurfaceManager.java"
- line="59"
+ line="61"
column="45"/>
</issue>
@@ -525,7 +525,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/camera/core/impl/CameraDeviceSurfaceManager.java"
- line="69"
+ line="71"
column="5"/>
</issue>
@@ -536,7 +536,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/camera/core/impl/CameraDeviceSurfaceManager.java"
- line="69"
+ line="71"
column="42"/>
</issue>
@@ -547,35 +547,13 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/camera/core/impl/CameraDeviceSurfaceManager.java"
- line="69"
+ line="71"
column="76"/>
</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=" Size getMaxOutputSize(String cameraId, int imageFormat);"
- errorLine2=" ~~~~~~">
- <location
- file="src/main/java/androidx/camera/core/impl/CameraDeviceSurfaceManager.java"
- line="79"
- 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=" Size getPreviewSize();"
- errorLine2=" ~~~~">
- <location
- file="src/main/java/androidx/camera/core/impl/CameraDeviceSurfaceManager.java"
- line="107"
- 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=" public CameraInfoUnavailableException(String s, Throwable e) {"
errorLine2=" ~~~~~~">
<location
@@ -903,15 +881,4 @@
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 UseCaseConfig<?> getUseCaseConfig() {"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/core/UseCase.java"
- line="455"
- column="12"/>
- </issue>
-
</issues>
diff --git a/camera/camera-core/src/main/java/androidx/camera/core/SurfaceRequest.java b/camera/camera-core/src/main/java/androidx/camera/core/SurfaceRequest.java
index 1a04002..6b1ff6e 100644
--- a/camera/camera-core/src/main/java/androidx/camera/core/SurfaceRequest.java
+++ b/camera/camera-core/src/main/java/androidx/camera/core/SurfaceRequest.java
@@ -79,7 +79,7 @@
// cancellation listeners.
private final CallbackToFutureAdapter.Completer<Void> mRequestCancellationCompleter;
- private DeferrableSurface mInternalDeferrableSurface;
+ private final DeferrableSurface mInternalDeferrableSurface;
@Nullable
private TransformationInfo mTransformationInfo;
diff --git a/camera/camera-core/src/main/java/androidx/camera/core/impl/CameraDeviceSurfaceManager.java b/camera/camera-core/src/main/java/androidx/camera/core/impl/CameraDeviceSurfaceManager.java
index d46d01c..d0a633d 100644
--- a/camera/camera-core/src/main/java/androidx/camera/core/impl/CameraDeviceSurfaceManager.java
+++ b/camera/camera-core/src/main/java/androidx/camera/core/impl/CameraDeviceSurfaceManager.java
@@ -71,16 +71,6 @@
SurfaceConfig transformSurfaceConfig(String cameraId, int imageFormat, Size size);
/**
- * Get max supported output size for specific camera device and image format
- *
- * @param cameraId the camera Id
- * @param imageFormat the image format info
- * @return the max supported output size for the image format
- */
- @Nullable
- Size getMaxOutputSize(String cameraId, int imageFormat);
-
- /**
* Retrieves a map of suggested resolutions for the given list of use cases.
*
* @param cameraId the camera id of the camera device used by the use cases
@@ -100,11 +90,4 @@
@NonNull String cameraId,
@NonNull List<SurfaceConfig> existingSurfaces,
@NonNull List<UseCaseConfig<?>> newUseCaseConfigs);
-
- /**
- * Retrieves the preview size, choosing the smaller of the display size and 1080P.
- *
- * @return the size used for the on screen preview
- */
- Size getPreviewSize();
}
diff --git a/camera/camera-core/src/main/java/androidx/camera/core/impl/DeferrableSurface.java b/camera/camera-core/src/main/java/androidx/camera/core/impl/DeferrableSurface.java
index bcf9409..e030b45 100644
--- a/camera/camera-core/src/main/java/androidx/camera/core/impl/DeferrableSurface.java
+++ b/camera/camera-core/src/main/java/androidx/camera/core/impl/DeferrableSurface.java
@@ -85,10 +85,10 @@
private static final boolean DEBUG = Logger.isDebugEnabled(TAG);
// Debug only, used to track total count of surfaces in use.
- private static AtomicInteger sUsedCount = new AtomicInteger(0);
+ private static final AtomicInteger USED_COUNT = new AtomicInteger(0);
// Debug only, used to track total count of surfaces, including those not in use. Will be
// decremented once surface is cleaned.
- private static AtomicInteger sTotalCount = new AtomicInteger(0);
+ private static final AtomicInteger TOTAL_COUNT = new AtomicInteger(0);
// Lock used for accessing states.
private final Object mLock = new Object();
@@ -116,20 +116,24 @@
});
if (Logger.isDebugEnabled(TAG)) {
- printGlobalDebugCounts("Surface created", sTotalCount.incrementAndGet(),
- sUsedCount.get());
+ printGlobalDebugCounts("Surface created", TOTAL_COUNT.incrementAndGet(),
+ USED_COUNT.get());
String creationStackTrace = Log.getStackTraceString(new Exception());
mTerminationFuture.addListener(() -> {
try {
mTerminationFuture.get();
- printGlobalDebugCounts("Surface terminated", sTotalCount.decrementAndGet(),
- sUsedCount.get());
+ printGlobalDebugCounts("Surface terminated", TOTAL_COUNT.decrementAndGet(),
+ USED_COUNT.get());
} catch (Exception e) {
Logger.e(TAG, "Unexpected surface termination for " + DeferrableSurface.this
+ "\nStack Trace:\n" + creationStackTrace);
- throw new IllegalArgumentException("DeferrableSurface terminated with "
- + "unexpected exception.", e);
+ synchronized (mLock) {
+ throw new IllegalArgumentException(String.format(
+ "DeferrableSurface %s [closed: %b, use_count: %s] terminated with"
+ + " unexpected exception.",
+ DeferrableSurface.this, mClosed, mUseCount), e);
+ }
}
}, CameraXExecutors.directExecutor());
}
@@ -206,8 +210,8 @@
if (Logger.isDebugEnabled(TAG)) {
if (mUseCount == 1) {
- printGlobalDebugCounts("New surface in use", sTotalCount.get(),
- sUsedCount.incrementAndGet());
+ printGlobalDebugCounts("New surface in use", TOTAL_COUNT.get(),
+ USED_COUNT.incrementAndGet());
}
Logger.d(TAG, "use count+1, useCount=" + mUseCount + " " + this);
}
@@ -277,8 +281,8 @@
+ " " + this);
if (mUseCount == 0) {
- printGlobalDebugCounts("Surface no longer in use", sTotalCount.get(),
- sUsedCount.decrementAndGet());
+ printGlobalDebugCounts("Surface no longer in use", TOTAL_COUNT.get(),
+ USED_COUNT.decrementAndGet());
}
}
}
diff --git a/camera/camera-extensions/src/main/java/androidx/camera/extensions/ExtensionCameraFilter.java b/camera/camera-extensions/src/main/java/androidx/camera/extensions/ExtensionCameraFilter.java
index c08082a..8a82169 100644
--- a/camera/camera-extensions/src/main/java/androidx/camera/extensions/ExtensionCameraFilter.java
+++ b/camera/camera-extensions/src/main/java/androidx/camera/extensions/ExtensionCameraFilter.java
@@ -68,7 +68,7 @@
Preconditions.checkState(camera instanceof CameraInternal,
"The camera doesn't contain internal implementation.");
CameraInfo cameraInfo = camera.getCameraInfo();
- String cameraId = Camera2CameraInfo.fromCameraInfo(cameraInfo).getCameraId();
+ String cameraId = Camera2CameraInfo.from(cameraInfo).getCameraId();
CameraCharacteristics cameraCharacteristics =
Camera2CameraInfo.extractCameraCharacteristics(cameraInfo);
diff --git a/camera/camera-extensions/src/main/java/androidx/camera/extensions/ImageCaptureExtender.java b/camera/camera-extensions/src/main/java/androidx/camera/extensions/ImageCaptureExtender.java
index 77f04c7..7b17e0c 100644
--- a/camera/camera-extensions/src/main/java/androidx/camera/extensions/ImageCaptureExtender.java
+++ b/camera/camera-extensions/src/main/java/androidx/camera/extensions/ImageCaptureExtender.java
@@ -245,7 +245,7 @@
@Override
public void onAttach(@NonNull CameraInfo cameraInfo) {
if (mActive.get()) {
- String cameraId = Camera2CameraInfo.fromCameraInfo(cameraInfo).getCameraId();
+ String cameraId = Camera2CameraInfo.from(cameraInfo).getCameraId();
CameraCharacteristics cameraCharacteristics =
Camera2CameraInfo.extractCameraCharacteristics(cameraInfo);
mImpl.onInit(cameraId, cameraCharacteristics, mContext);
diff --git a/camera/camera-extensions/src/main/java/androidx/camera/extensions/PreviewExtender.java b/camera/camera-extensions/src/main/java/androidx/camera/extensions/PreviewExtender.java
index c12dbcd..17730a0 100644
--- a/camera/camera-extensions/src/main/java/androidx/camera/extensions/PreviewExtender.java
+++ b/camera/camera-extensions/src/main/java/androidx/camera/extensions/PreviewExtender.java
@@ -257,7 +257,7 @@
public void onAttach(@NonNull CameraInfo cameraInfo) {
synchronized (mLock) {
if (mActive) {
- String cameraId = Camera2CameraInfo.fromCameraInfo(cameraInfo).getCameraId();
+ String cameraId = Camera2CameraInfo.from(cameraInfo).getCameraId();
CameraCharacteristics cameraCharacteristics =
Camera2CameraInfo.extractCameraCharacteristics(cameraInfo);
mImpl.onInit(cameraId, cameraCharacteristics, mContext);
diff --git a/camera/camera-extensions/src/main/java/androidx/camera/extensions/internal/ImageCaptureConfigProvider.java b/camera/camera-extensions/src/main/java/androidx/camera/extensions/internal/ImageCaptureConfigProvider.java
index 92050c3..5c400ef 100644
--- a/camera/camera-extensions/src/main/java/androidx/camera/extensions/internal/ImageCaptureConfigProvider.java
+++ b/camera/camera-extensions/src/main/java/androidx/camera/extensions/internal/ImageCaptureConfigProvider.java
@@ -80,7 +80,7 @@
}
mContext = context;
- String cameraId = Camera2CameraInfo.fromCameraInfo(cameraInfo).getCameraId();
+ String cameraId = Camera2CameraInfo.from(cameraInfo).getCameraId();
CameraCharacteristics cameraCharacteristics =
Camera2CameraInfo.extractCameraCharacteristics(cameraInfo);
mImpl.init(cameraId, cameraCharacteristics);
diff --git a/camera/camera-extensions/src/main/java/androidx/camera/extensions/internal/PreviewConfigProvider.java b/camera/camera-extensions/src/main/java/androidx/camera/extensions/internal/PreviewConfigProvider.java
index ae6be35..76cd238 100644
--- a/camera/camera-extensions/src/main/java/androidx/camera/extensions/internal/PreviewConfigProvider.java
+++ b/camera/camera-extensions/src/main/java/androidx/camera/extensions/internal/PreviewConfigProvider.java
@@ -80,7 +80,7 @@
}
mContext = context;
- String cameraId = Camera2CameraInfo.fromCameraInfo(cameraInfo).getCameraId();
+ String cameraId = Camera2CameraInfo.from(cameraInfo).getCameraId();
CameraCharacteristics cameraCharacteristics =
Camera2CameraInfo.extractCameraCharacteristics(cameraInfo);
mImpl.init(cameraId, cameraCharacteristics);
diff --git a/camera/camera-testing/lint-baseline.xml b/camera/camera-testing/lint-baseline.xml
index b2f4853..24adcb2 100644
--- a/camera/camera-testing/lint-baseline.xml
+++ b/camera/camera-testing/lint-baseline.xml
@@ -19,7 +19,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/camera/testing/CameraUtil.java"
- line="255"
+ line="257"
column="19"/>
</issue>
@@ -107,7 +107,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/camera/testing/fakes/FakeCameraDeviceSurfaceManager.java"
- line="43"
+ line="41"
column="40"/>
</issue>
@@ -118,7 +118,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/camera/testing/fakes/FakeCameraDeviceSurfaceManager.java"
- line="43"
+ line="41"
column="57"/>
</issue>
@@ -129,7 +129,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/camera/testing/fakes/FakeCameraDeviceSurfaceManager.java"
- line="44"
+ line="42"
column="13"/>
</issue>
@@ -140,7 +140,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/camera/testing/fakes/FakeCameraDeviceSurfaceManager.java"
- line="56"
+ line="54"
column="35"/>
</issue>
@@ -151,7 +151,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/camera/testing/fakes/FakeCameraDeviceSurfaceManager.java"
- line="56"
+ line="54"
column="52"/>
</issue>
@@ -162,7 +162,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/camera/testing/fakes/FakeCameraDeviceSurfaceManager.java"
- line="61"
+ line="59"
column="12"/>
</issue>
@@ -173,7 +173,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/camera/testing/fakes/FakeCameraDeviceSurfaceManager.java"
- line="61"
+ line="59"
column="49"/>
</issue>
@@ -184,35 +184,13 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/camera/testing/fakes/FakeCameraDeviceSurfaceManager.java"
- line="61"
+ line="59"
column="83"/>
</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 Size getMaxOutputSize(String cameraId, int imageFormat) {"
- errorLine2=" ~~~~~~">
- <location
- file="src/main/java/androidx/camera/testing/fakes/FakeCameraDeviceSurfaceManager.java"
- line="67"
- 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 Size getPreviewSize() {"
- errorLine2=" ~~~~">
- <location
- file="src/main/java/androidx/camera/testing/fakes/FakeCameraDeviceSurfaceManager.java"
- line="96"
- 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 FakeCaptureStage(int id, CaptureConfig captureConfig) {"
errorLine2=" ~~~~~~~~~~~~~">
<location
@@ -309,48 +287,4 @@
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 static StreamConfigurationMap generateFakeStreamConfigurationMap() {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/testing/StreamConfigurationMapUtil.java"
- line="40"
- 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 StreamConfigurationMap generateFakeStreamConfigurationMap("
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/testing/StreamConfigurationMapUtil.java"
- line="74"
- 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=" int[] supportedFormats, Size[] supportedSizes) {"
- errorLine2=" ~~~~~">
- <location
- file="src/main/java/androidx/camera/testing/StreamConfigurationMapUtil.java"
- line="75"
- column="13"/>
- </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=" int[] supportedFormats, Size[] supportedSizes) {"
- errorLine2=" ~~~~~~">
- <location
- file="src/main/java/androidx/camera/testing/StreamConfigurationMapUtil.java"
- line="75"
- column="37"/>
- </issue>
-
</issues>
diff --git a/camera/camera-testing/src/main/java/androidx/camera/testing/fakes/FakeCameraDeviceSurfaceManager.java b/camera/camera-testing/src/main/java/androidx/camera/testing/fakes/FakeCameraDeviceSurfaceManager.java
index 9faed42a..49f1c47 100644
--- a/camera/camera-testing/src/main/java/androidx/camera/testing/fakes/FakeCameraDeviceSurfaceManager.java
+++ b/camera/camera-testing/src/main/java/androidx/camera/testing/fakes/FakeCameraDeviceSurfaceManager.java
@@ -19,7 +19,6 @@
import android.util.Size;
import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
import androidx.camera.core.impl.CameraDeviceSurfaceManager;
import androidx.camera.core.impl.SurfaceConfig;
import androidx.camera.core.impl.UseCaseConfig;
@@ -32,7 +31,6 @@
public final class FakeCameraDeviceSurfaceManager implements CameraDeviceSurfaceManager {
public static final Size MAX_OUTPUT_SIZE = new Size(4032, 3024); // 12.2 MP
- private static final Size PREVIEW_SIZE = new Size(1920, 1080);
private Map<String, Map<Class<? extends UseCaseConfig<?>>, Size>> mDefinedResolutions =
new HashMap<>();
@@ -62,12 +60,6 @@
return null;
}
- @Nullable
- @Override
- public Size getMaxOutputSize(String cameraId, int imageFormat) {
- return MAX_OUTPUT_SIZE;
- }
-
@Override
@NonNull
public Map<UseCaseConfig<?>, Size> getSuggestedResolutions(
@@ -91,9 +83,4 @@
return suggestedSizes;
}
-
- @Override
- public Size getPreviewSize() {
- return PREVIEW_SIZE;
- }
}
diff --git a/camera/camera-view/lint-baseline.xml b/camera/camera-view/lint-baseline.xml
index d676298..1e56e2d 100644
--- a/camera/camera-view/lint-baseline.xml
+++ b/camera/camera-view/lint-baseline.xml
@@ -19,7 +19,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/camera/view/PreviewView.java"
- line="220"
+ line="226"
column="13"/>
</issue>
diff --git a/camera/integration-tests/camerapipetestapp/lint-baseline.xml b/camera/integration-tests/camerapipetestapp/lint-baseline.xml
index 58396a5..5d58f1b 100644
--- a/camera/integration-tests/camerapipetestapp/lint-baseline.xml
+++ b/camera/integration-tests/camerapipetestapp/lint-baseline.xml
@@ -8,7 +8,7 @@
errorLine2=" ^">
<location
file="src/main/java/androidx/camera/integration/camera2/pipe/Viewfinder.kt"
- line="311"
+ line="314"
column="9"/>
</issue>
@@ -19,7 +19,7 @@
errorLine2=" ^">
<location
file="src/main/java/androidx/camera/integration/camera2/pipe/Viewfinder.kt"
- line="379"
+ line="382"
column="9"/>
</issue>
@@ -30,7 +30,7 @@
errorLine2=" ^">
<location
file="src/main/java/androidx/camera/integration/camera2/pipe/Viewfinder.kt"
- line="405"
+ line="408"
column="9"/>
</issue>
@@ -52,7 +52,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/camera/integration/camera2/pipe/CameraPipeApplication.kt"
- line="44"
+ line="47"
column="43"/>
</issue>
@@ -135,61 +135,6 @@
<issue
id="UnusedResources"
- message="The resource `R.color.cameraPipeThemeBgOverlayDark100` appears to be unused"
- errorLine1=" <color name="cameraPipeThemeBgOverlayDark100">#DD101010</color>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/res/values/colors.xml"
- line="34"
- column="12"/>
- </issue>
-
- <issue
- id="UnusedResources"
- message="The resource `R.color.cameraPipeThemeBgRecord` appears to be unused"
- errorLine1=" <color name="cameraPipeThemeBgRecord">#FFD00000</color>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/res/values/colors.xml"
- line="36"
- column="12"/>
- </issue>
-
- <issue
- id="UnusedResources"
- message="The resource `R.color.cameraPipeThemeBgRecordRipple` appears to be unused"
- errorLine1=" <color name="cameraPipeThemeBgRecordRipple">#FFE00000</color>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/res/values/colors.xml"
- line="37"
- column="12"/>
- </issue>
-
- <issue
- id="UnusedResources"
- message="The resource `R.color.cameraPipeThemeBtnOverlay100` appears to be unused"
- errorLine1=" <color name="cameraPipeThemeBtnOverlay100">#33404040</color>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/res/values/colors.xml"
- line="39"
- column="12"/>
- </issue>
-
- <issue
- id="UnusedResources"
- message="The resource `R.color.cameraPipeThemeBtnOverlay200` appears to be unused"
- errorLine1=" <color name="cameraPipeThemeBtnOverlay200">#33FFFFFF</color>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/res/values/colors.xml"
- line="40"
- column="12"/>
- </issue>
-
- <issue
- id="UnusedResources"
message="The resource `R.color.cameraPipeThemeFgLight700` appears to be unused"
errorLine1=" <color name="cameraPipeThemeFgLight700">#FFD0D0D0</color>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -201,17 +146,6 @@
<issue
id="UnusedResources"
- message="The resource `R.color.cameraPipeThemeFgLight800` appears to be unused"
- errorLine1=" <color name="cameraPipeThemeFgLight800">#FFF8F8F8</color>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/res/values/colors.xml"
- line="43"
- column="12"/>
- </issue>
-
- <issue
- id="UnusedResources"
message="The resource `R.color.cameraPipeThemeFgLight900` appears to be unused"
errorLine1=" <color name="cameraPipeThemeFgLight900">#FFFCFCFC</color>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -223,17 +157,6 @@
<issue
id="UnusedResources"
- message="The resource `R.color.cameraPipeThemeFgOverlay` appears to be unused"
- errorLine1=" <color name="cameraPipeThemeFgOverlay">#33000000</color>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/res/values/colors.xml"
- line="46"
- column="12"/>
- </issue>
-
- <issue
- id="UnusedResources"
message="The resource `R.color.cameraPipeThemeFgAccent` appears to be unused"
errorLine1=" <color name="cameraPipeThemeFgAccent">#FF0090D0</color>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -265,26 +188,4 @@
column="12"/>
</issue>
- <issue
- id="SyntheticAccessor"
- message="Access to `private` field `defaultResolution` of class `SimpleCamera` requires synthetic accessor"
- errorLine1=" ((it.width * it.height) - (defaultResolution.width *"
- errorLine2=" ~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/integration/camera2/pipe/SimpleCamera.kt"
- line="70"
- column="44"/>
- </issue>
-
- <issue
- id="SyntheticAccessor"
- message="Access to `private` field `defaultResolution` of class `SimpleCamera` requires synthetic accessor"
- errorLine1=" defaultResolution.height)).absoluteValue"
- errorLine2=" ~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/integration/camera2/pipe/SimpleCamera.kt"
- line="71"
- column="25"/>
- </issue>
-
</issues>
diff --git a/camera/integration-tests/extensionstestapp/lint-baseline.xml b/camera/integration-tests/extensionstestapp/lint-baseline.xml
index 6a15c61..2efc14d 100644
--- a/camera/integration-tests/extensionstestapp/lint-baseline.xml
+++ b/camera/integration-tests/extensionstestapp/lint-baseline.xml
@@ -2,35 +2,13 @@
<issues format="5" by="lint 4.2.0-alpha06" client="gradle" variant="debug" version="4.2.0-alpha06">
<issue
- id="SyntheticAccessor"
- message="Access to `private` field `mPreviewCaptureSessionConfigured` of class `CameraExtensionsActivity` requires synthetic accessor"
- errorLine1=" mPreviewCaptureSessionConfigured.countDown();"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/integration/extensions/CameraExtensionsActivity.java"
- line="170"
- column="25"/>
- </issue>
-
- <issue
- id="SyntheticAccessor"
- message="Access to `private` method `createUseCases` of class `CameraExtensionsActivity` requires synthetic accessor"
- errorLine1=" createUseCases();"
- errorLine2=" ~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/integration/extensions/CameraExtensionsActivity.java"
- line="451"
- column="25"/>
- </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=" protected void onCreate(Bundle savedInstanceState) {"
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/camera/integration/extensions/CameraExtensionsActivity.java"
- line="399"
+ line="261"
column="29"/>
</issue>
diff --git a/camera/integration-tests/timingtestapp/lint-baseline.xml b/camera/integration-tests/timingtestapp/lint-baseline.xml
index 1922480..1fddb04 100644
--- a/camera/integration-tests/timingtestapp/lint-baseline.xml
+++ b/camera/integration-tests/timingtestapp/lint-baseline.xml
@@ -8,7 +8,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/camera/integration/antelope/CameraUtils.kt"
- line="176"
+ line="180"
column="51"/>
</issue>
@@ -19,7 +19,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/camera/integration/antelope/cameracontrollers/CameraXController.kt"
- line="274"
+ line="279"
column="28"/>
</issue>
diff --git a/camera/integration-tests/uiwidgetstestapp/lint-baseline.xml b/camera/integration-tests/uiwidgetstestapp/lint-baseline.xml
index 6ca24fd..1c82182 100644
--- a/camera/integration-tests/uiwidgetstestapp/lint-baseline.xml
+++ b/camera/integration-tests/uiwidgetstestapp/lint-baseline.xml
@@ -2,28 +2,6 @@
<issues format="5" by="lint 4.2.0-alpha06" client="gradle" variant="debug" version="4.2.0-alpha06">
<issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 23, the call containing class androidx.camera.integration.uiwidgets.ViewPager2Activity is not annotated with @RequiresApi(x) where x is at least 23. Either annotate the containing class with at least @RequiresApi(23) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(23)."
- errorLine1=" requestPermissions("
- errorLine2=" ~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/integration/uiwidgets/ViewPager2Activity.kt"
- line="51"
- column="17"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 23, the call containing class androidx.camera.integration.uiwidgets.ViewPagerActivity is not annotated with @RequiresApi(x) where x is at least 23. Either annotate the containing class with at least @RequiresApi(23) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(23)."
- errorLine1=" requestPermissions("
- errorLine2=" ~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/integration/uiwidgets/ViewPagerActivity.kt"
- line="55"
- column="17"/>
- </issue>
-
- <issue
id="SyntheticAccessor"
message="Access to `private` method `getMDisplayManager` of class `OrientationConfigChangesOverriddenActivity` requires synthetic accessor"
errorLine1=" val display = mDisplayManager.getDisplay(displayId)"
diff --git a/camera/integration-tests/viewtestapp/lint-baseline.xml b/camera/integration-tests/viewtestapp/lint-baseline.xml
index 6ceb126..32ca7f0 100644
--- a/camera/integration-tests/viewtestapp/lint-baseline.xml
+++ b/camera/integration-tests/viewtestapp/lint-baseline.xml
@@ -19,7 +19,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/camera/integration/view/CaptureViewOnTouchListener.java"
- line="79"
+ line="82"
column="45"/>
</issue>
@@ -30,7 +30,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/camera/integration/view/CaptureViewOnTouchListener.java"
- line="80"
+ line="83"
column="78"/>
</issue>
@@ -41,7 +41,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/camera/integration/view/CaptureViewOnTouchListener.java"
- line="192"
+ line="198"
column="41"/>
</issue>
@@ -52,7 +52,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/camera/integration/view/CaptureViewOnTouchListener.java"
- line="193"
+ line="199"
column="64"/>
</issue>
@@ -63,7 +63,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/camera/integration/view/CaptureViewOnTouchListener.java"
- line="202"
+ line="208"
column="41"/>
</issue>
@@ -74,7 +74,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/camera/integration/view/CaptureViewOnTouchListener.java"
- line="203"
+ line="209"
column="64"/>
</issue>
@@ -96,7 +96,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/strings.xml"
- line="37"
+ line="41"
column="13"/>
</issue>
@@ -107,106 +107,18 @@
errorLine2=" ~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/strings.xml"
- line="38"
+ line="42"
column="13"/>
</issue>
<issue
id="SyntheticAccessor"
- message="Access to `private` field `mCameraView` of class `CameraViewFragment` requires synthetic accessor"
- errorLine1=" mCameraView.setCameraLensFacing("
- errorLine2=" ~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/integration/view/CameraViewFragment.java"
- line="214"
- column="29"/>
- </issue>
-
- <issue
- id="SyntheticAccessor"
- message="Access to `private` field `mCameraView` of class `CameraViewFragment` requires synthetic accessor"
- errorLine1=" if (mCameraView.isRecording()) {"
- errorLine2=" ~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/integration/view/CameraViewFragment.java"
- line="238"
- column="33"/>
- </issue>
-
- <issue
- id="SyntheticAccessor"
- message="Access to `private` field `mCameraView` of class `CameraViewFragment` requires synthetic accessor"
- errorLine1=" if (mCameraView.getCaptureMode() == CaptureMode.MIXED) {"
- errorLine2=" ~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/integration/view/CameraViewFragment.java"
- line="247"
- column="33"/>
- </issue>
-
- <issue
- id="SyntheticAccessor"
- message="Access to `private` field `mCameraView` of class `CameraViewFragment` requires synthetic accessor"
- errorLine1=" mCameraView.setCaptureMode(CaptureMode.IMAGE);"
- errorLine2=" ~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/integration/view/CameraViewFragment.java"
- line="248"
- column="33"/>
- </issue>
-
- <issue
- id="SyntheticAccessor"
- message="Access to `private` field `mCameraView` of class `CameraViewFragment` requires synthetic accessor"
- errorLine1=" } else if (mCameraView.getCaptureMode() == CaptureMode.IMAGE) {"
- errorLine2=" ~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/integration/view/CameraViewFragment.java"
- line="249"
- column="40"/>
- </issue>
-
- <issue
- id="SyntheticAccessor"
- message="Access to `private` field `mCameraView` of class `CameraViewFragment` requires synthetic accessor"
- errorLine1=" mCameraView.setCaptureMode(CaptureMode.VIDEO);"
- errorLine2=" ~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/integration/view/CameraViewFragment.java"
- line="250"
- column="33"/>
- </issue>
-
- <issue
- id="SyntheticAccessor"
- message="Access to `private` field `mCameraView` of class `CameraViewFragment` requires synthetic accessor"
- errorLine1=" mCameraView.setCaptureMode(CaptureMode.MIXED);"
- errorLine2=" ~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/integration/view/CameraViewFragment.java"
- line="252"
- column="33"/>
- </issue>
-
- <issue
- id="SyntheticAccessor"
- message="Access to `private` method `updateModeButtonIcon` of class `CameraViewFragment` requires synthetic accessor"
- errorLine1=" CameraViewFragment.this.updateModeButtonIcon();"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/camera/integration/view/CameraViewFragment.java"
- line="255"
- column="29"/>
- </issue>
-
- <issue
- id="SyntheticAccessor"
message="Access to `private` method `onTap` of class `CaptureViewOnTouchListener` requires synthetic accessor"
errorLine1=" onTap();"
errorLine2=" ~~~~~">
<location
file="src/main/java/androidx/camera/integration/view/CaptureViewOnTouchListener.java"
- line="75"
+ line="78"
column="29"/>
</issue>
@@ -217,7 +129,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/camera/integration/view/CaptureViewOnTouchListener.java"
- line="78"
+ line="81"
column="29"/>
</issue>
@@ -228,7 +140,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/camera/integration/view/CaptureViewOnTouchListener.java"
- line="79"
+ line="82"
column="33"/>
</issue>
@@ -239,7 +151,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/camera/integration/view/CaptureViewOnTouchListener.java"
- line="80"
+ line="83"
column="66"/>
</issue>
@@ -250,7 +162,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/camera/integration/view/CaptureViewOnTouchListener.java"
- line="84"
+ line="87"
column="29"/>
</issue>
@@ -261,24 +173,13 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/camera/integration/view/PreviewViewFragment.java"
- line="305"
+ line="306"
column="46"/>
</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 View onCreateView("
- errorLine2=" ~~~~">
- <location
- file="src/main/java/androidx/camera/integration/view/CameraViewFragment.java"
- line="272"
- 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=" protected void onCreate(Bundle savedInstanceState) {"
errorLine2=" ~~~~~~">
<location
diff --git a/car/app/app/lint-baseline.xml b/car/app/app/lint-baseline.xml
new file mode 100644
index 0000000..8e8956b
--- /dev/null
+++ b/car/app/app/lint-baseline.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<issues format="5" by="lint 4.2.0-alpha06" client="gradle" variant="debug" version="4.2.0-alpha06">
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" enumName = (String) nameMethod.invoke(obj);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/car/app/serialization/Bundler.java"
+ line="322"
+ column="33"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" Object obj = converter.invoke(null, binder);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/car/app/serialization/Bundler.java"
+ line="405"
+ column="26"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" return nameMethod.invoke(null, enumName);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/car/app/serialization/Bundler.java"
+ line="483"
+ column="20"/>
+ </issue>
+
+</issues>
diff --git a/compose/androidview/androidview/lint-baseline.xml b/compose/androidview/androidview/lint-baseline.xml
new file mode 100644
index 0000000..b6c08b1
--- /dev/null
+++ b/compose/androidview/androidview/lint-baseline.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<issues format="5" by="lint 4.2.0-alpha06" client="gradle" variant="debug" version="4.2.0-alpha06">
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" val lp = prev ?: genDefaultLayoutParams.invoke(parent) as? ViewGroup.LayoutParams"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/compose/androidview/adapters/LayoutBuilder.kt"
+ line="93"
+ column="26"/>
+ </issue>
+
+</issues>
diff --git a/compose/animation/animation/lint-baseline.xml b/compose/animation/animation/lint-baseline.xml
index a808ae2..c8e378e 100644
--- a/compose/animation/animation/lint-baseline.xml
+++ b/compose/animation/animation/lint-baseline.xml
@@ -8,7 +8,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/commonMain/kotlin/androidx/compose/animation/AnimationModifier.kt"
- line="61"
+ line="62"
column="15"/>
</issue>
diff --git a/compose/foundation/foundation-layout/lint-baseline.xml b/compose/foundation/foundation-layout/lint-baseline.xml
index 4420f4d..83a7624 100644
--- a/compose/foundation/foundation-layout/lint-baseline.xml
+++ b/compose/foundation/foundation-layout/lint-baseline.xml
@@ -19,7 +19,7 @@
errorLine2=" ~~~~~~">
<location
file="src/commonMain/kotlin/androidx/compose/foundation/layout/Intrinsic.kt"
- line="49"
+ line="47"
column="61"/>
</issue>
@@ -30,7 +30,7 @@
errorLine2=" ~~~~~~">
<location
file="src/commonMain/kotlin/androidx/compose/foundation/layout/Intrinsic.kt"
- line="70"
+ line="68"
column="62"/>
</issue>
diff --git a/compose/foundation/foundation-layout/src/androidAndroidTest/kotlin/androidx/compose/foundation/layout/ConstraintLayoutTest.kt b/compose/foundation/foundation-layout/src/androidAndroidTest/kotlin/androidx/compose/foundation/layout/ConstraintLayoutTest.kt
index 8d0bb69..7844ac4 100644
--- a/compose/foundation/foundation-layout/src/androidAndroidTest/kotlin/androidx/compose/foundation/layout/ConstraintLayoutTest.kt
+++ b/compose/foundation/foundation-layout/src/androidAndroidTest/kotlin/androidx/compose/foundation/layout/ConstraintLayoutTest.kt
@@ -781,6 +781,27 @@
}
}
+ fun listAnchors(box: ConstrainedLayoutReference): List<ConstrainScope.() -> Unit> {
+ // TODO(172055763) directly construct an immutable list when Lint supports it
+ val anchors = mutableListOf<ConstrainScope.() -> Unit>()
+ anchors.add({ start.linkTo(box.start) })
+ anchors.add({ absoluteLeft.linkTo(box.start) })
+ anchors.add({ start.linkTo(box.absoluteLeft) })
+ anchors.add({ absoluteLeft.linkTo(box.absoluteLeft) })
+ anchors.add({ end.linkTo(box.start) })
+ anchors.add({ absoluteRight.linkTo(box.start) })
+ anchors.add({ end.linkTo(box.absoluteLeft) })
+ anchors.add({ absoluteRight.linkTo(box.absoluteLeft) })
+ anchors.add({ start.linkTo(box.end) })
+ anchors.add({ absoluteLeft.linkTo(box.end) })
+ anchors.add({ start.linkTo(box.absoluteRight) })
+ anchors.add({ absoluteLeft.linkTo(box.absoluteRight) })
+ anchors.add({ end.linkTo(box.end) })
+ anchors.add({ absoluteRight.linkTo(box.end) })
+ anchors.add({ end.linkTo(box.absoluteRight) })
+ anchors.add({ absoluteRight.linkTo(box.absoluteRight) })
+ return anchors
+ }
@Test
fun testConstraintLayout_anchors_ltr() = with(density) {
val size = 200.toDp()
@@ -798,24 +819,7 @@
}
)
- val anchors = listOf<ConstrainScope.() -> Unit>(
- { start.linkTo(box.start) },
- { absoluteLeft.linkTo(box.start) },
- { start.linkTo(box.absoluteLeft) },
- { absoluteLeft.linkTo(box.absoluteLeft) },
- { end.linkTo(box.start) },
- { absoluteRight.linkTo(box.start) },
- { end.linkTo(box.absoluteLeft) },
- { absoluteRight.linkTo(box.absoluteLeft) },
- { start.linkTo(box.end) },
- { absoluteLeft.linkTo(box.end) },
- { start.linkTo(box.absoluteRight) },
- { absoluteLeft.linkTo(box.absoluteRight) },
- { end.linkTo(box.end) },
- { absoluteRight.linkTo(box.end) },
- { end.linkTo(box.absoluteRight) },
- { absoluteRight.linkTo(box.absoluteRight) }
- )
+ val anchors = listAnchors(box)
anchors.forEachIndexed { index, anchor ->
val ref = createRef()
@@ -869,24 +873,7 @@
}
)
- val anchors = listOf<ConstrainScope.() -> Unit>(
- { start.linkTo(box.start) },
- { absoluteLeft.linkTo(box.start) },
- { start.linkTo(box.absoluteLeft) },
- { absoluteLeft.linkTo(box.absoluteLeft) },
- { end.linkTo(box.start) },
- { absoluteRight.linkTo(box.start) },
- { end.linkTo(box.absoluteLeft) },
- { absoluteRight.linkTo(box.absoluteLeft) },
- { start.linkTo(box.end) },
- { absoluteLeft.linkTo(box.end) },
- { start.linkTo(box.absoluteRight) },
- { absoluteLeft.linkTo(box.absoluteRight) },
- { end.linkTo(box.end) },
- { absoluteRight.linkTo(box.end) },
- { end.linkTo(box.absoluteRight) },
- { absoluteRight.linkTo(box.absoluteRight) }
- )
+ val anchors = listAnchors(box)
anchors.forEachIndexed { index, anchor ->
val ref = createRef()
diff --git a/compose/foundation/foundation-text/lint-baseline.xml b/compose/foundation/foundation-text/lint-baseline.xml
index 414280b..ec5b618 100644
--- a/compose/foundation/foundation-text/lint-baseline.xml
+++ b/compose/foundation/foundation-text/lint-baseline.xml
@@ -8,7 +8,7 @@
errorLine2=" ^">
<location
file="src/commonMain/kotlin/androidx/compose/foundation/text/CoreTextField.kt"
- line="626"
+ line="630"
column="12"/>
</issue>
@@ -19,7 +19,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/commonMain/kotlin/androidx/compose/foundation/text/CoreTextField.kt"
- line="667"
+ line="671"
column="5"/>
</issue>
diff --git a/compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/LazyColumnForTest.kt b/compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/LazyColumnForTest.kt
index 7f2e174..41d5767 100644
--- a/compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/LazyColumnForTest.kt
+++ b/compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/LazyColumnForTest.kt
@@ -71,6 +71,7 @@
import com.google.common.truth.IntegerSubject
import com.google.common.truth.Truth.assertThat
import com.google.common.truth.Truth.assertWithMessage
+import kotlinx.coroutines.runBlocking
import org.junit.Ignore
import org.junit.Rule
import org.junit.Test
@@ -747,7 +748,7 @@
rule.runOnIdle {
with(rule.density) {
- state.onScroll(110.dp.toPx())
+ state.onScroll(-110.dp.toPx())
}
}
@@ -947,6 +948,30 @@
.assertIsDisplayed()
}
+ @Test
+ fun snapToItemIndex() {
+ val items by mutableStateOf((1..20).toList())
+ lateinit var state: LazyListState
+ rule.setContent {
+ state = rememberLazyListState()
+ LazyColumnFor(
+ items = items,
+ modifier = Modifier.size(100.dp).testTag(LazyColumnForTag),
+ state = state
+ ) {
+ Spacer(Modifier.size(20.dp).testTag("$it"))
+ }
+ }
+
+ rule.runOnIdle {
+ runBlocking {
+ state.snapToItemIndex(3, 10)
+ }
+ assertThat(state.firstVisibleItemIndex).isEqualTo(3)
+ assertThat(state.firstVisibleItemScrollOffset).isEqualTo(10)
+ }
+ }
+
private fun SemanticsNodeInteraction.assertTopPositionIsAlmost(expected: Dp) {
getUnclippedBoundsInRoot().top.assertIsEqualTo(expected, tolerance = 1.dp)
}
diff --git a/compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/LazyColumnTest.kt b/compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/LazyColumnTest.kt
index 64f2577..7e629eb3 100644
--- a/compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/LazyColumnTest.kt
+++ b/compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/LazyColumnTest.kt
@@ -184,7 +184,7 @@
@Test
fun lazyColumnScrollHidesItem() {
- val items = (1..3).map { it.toString() }
+ val items = (1..4).map { it.toString() }
rule.setContent {
LazyColumn(Modifier.preferredHeight(200.dp).testTag(LazyColumnTag)) {
@@ -195,7 +195,7 @@
}
rule.onNodeWithTag(LazyColumnTag)
- .scrollBy(y = 102.dp, density = rule.density)
+ .scrollBy(y = 103.dp, density = rule.density)
rule.onNodeWithTag("1")
.assertDoesNotExist()
diff --git a/compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/LazyGridTest.kt b/compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/LazyGridTest.kt
index f01a731..c3b1ac8 100644
--- a/compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/LazyGridTest.kt
+++ b/compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/LazyGridTest.kt
@@ -144,7 +144,7 @@
}
rule.onNodeWithTag(LazyGridTag)
- .scrollBy(y = 102.dp, density = rule.density)
+ .scrollBy(y = 103.dp, density = rule.density)
rule.onNodeWithTag("1")
.assertDoesNotExist()
diff --git a/compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/LazyNestedScrollingTest.kt b/compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/LazyNestedScrollingTest.kt
new file mode 100644
index 0000000..6b5902a
--- /dev/null
+++ b/compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/LazyNestedScrollingTest.kt
@@ -0,0 +1,326 @@
+/*
+ * 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 androidx.compose.foundation.lazy
+
+import androidx.compose.foundation.gestures.draggable
+import androidx.compose.foundation.layout.Box
+import androidx.compose.foundation.layout.Spacer
+import androidx.compose.foundation.layout.size
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.geometry.Offset
+import androidx.compose.ui.gesture.scrollorientationlocking.Orientation
+import androidx.compose.ui.platform.testTag
+import androidx.compose.ui.test.down
+import androidx.compose.ui.test.junit4.createComposeRule
+import androidx.compose.ui.test.moveBy
+import androidx.compose.ui.test.onNodeWithTag
+import androidx.compose.ui.test.performGesture
+import androidx.compose.ui.test.up
+import androidx.compose.ui.unit.dp
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.filters.MediumTest
+import com.google.common.truth.Truth
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+
+@MediumTest
+@RunWith(AndroidJUnit4::class)
+class LazyNestedScrollingTest {
+ private val LazyTag = "LazyTag"
+
+ @get:Rule
+ val rule = createComposeRule()
+
+ @Test
+ fun column_nestedScrollingBackwardInitially() {
+ val items = (1..3).toList()
+ var draggedOffset = 0f
+ rule.setContent {
+ Box(
+ Modifier.draggable(Orientation.Vertical) {
+ draggedOffset += it
+ }
+ ) {
+ LazyColumnFor(
+ items = items,
+ modifier = Modifier.size(100.dp).testTag(LazyTag)
+ ) {
+ Spacer(Modifier.size(50.dp).testTag("$it"))
+ }
+ }
+ }
+
+ rule.onNodeWithTag(LazyTag)
+ .performGesture {
+ down(Offset(x = 10f, y = 10f))
+ moveBy(Offset(x = 0f, y = 100f))
+ up()
+ }
+
+ rule.runOnIdle {
+ Truth.assertThat(draggedOffset).isEqualTo(100f)
+ }
+ }
+
+ @Test
+ fun column_nestedScrollingBackwardOnceWeScrolledForwardPreviously() {
+ val items = (1..3).toList()
+ var draggedOffset = 0f
+ rule.setContent {
+ Box(
+ Modifier.draggable(Orientation.Vertical) {
+ draggedOffset += it
+ }
+ ) {
+ LazyColumnFor(
+ items = items,
+ modifier = Modifier.size(100.dp).testTag(LazyTag)
+ ) {
+ Spacer(Modifier.size(50.dp).testTag("$it"))
+ }
+ }
+ }
+
+ // scroll forward
+ rule.onNodeWithTag(LazyTag)
+ .scrollBy(y = 20.dp, density = rule.density)
+
+ // scroll back so we again on 0 position
+ // we scroll one extra dp to prevent rounding issues
+ rule.onNodeWithTag(LazyTag)
+ .scrollBy(y = -(21.dp), density = rule.density)
+
+ rule.onNodeWithTag(LazyTag)
+ .performGesture {
+ draggedOffset = 0f
+ down(Offset(x = 10f, y = 10f))
+ moveBy(Offset(x = 0f, y = 50f))
+ up()
+ }
+
+ rule.runOnIdle {
+ Truth.assertThat(draggedOffset).isEqualTo(50f)
+ }
+ }
+
+ @Test
+ fun column_nestedScrollingForwardWhenTheFullContentIsInitiallyVisible() {
+ val items = (1..2).toList()
+ var draggedOffset = 0f
+ rule.setContent {
+ Box(
+ Modifier.draggable(Orientation.Vertical) {
+ draggedOffset += it
+ }
+ ) {
+ LazyColumnFor(
+ items = items,
+ modifier = Modifier.size(100.dp).testTag(LazyTag)
+ ) {
+ Spacer(Modifier.size(40.dp).testTag("$it"))
+ }
+ }
+ }
+
+ rule.onNodeWithTag(LazyTag)
+ .performGesture {
+ down(Offset(x = 10f, y = 10f))
+ moveBy(Offset(x = 0f, y = -50f))
+ up()
+ }
+
+ rule.runOnIdle {
+ Truth.assertThat(draggedOffset).isEqualTo(-50f)
+ }
+ }
+
+ @Test
+ fun column_nestedScrollingForwardWhenScrolledToTheEnd() {
+ val items = (1..3).toList()
+ var draggedOffset = 0f
+ rule.setContent {
+ Box(
+ Modifier.draggable(Orientation.Vertical) {
+ draggedOffset += it
+ }
+ ) {
+ LazyColumnFor(
+ items = items,
+ modifier = Modifier.size(100.dp).testTag(LazyTag)
+ ) {
+ Spacer(Modifier.size(50.dp).testTag("$it"))
+ }
+ }
+ }
+
+ // scroll forward
+ rule.onNodeWithTag(LazyTag)
+ .scrollBy(y = 50.dp, density = rule.density)
+
+ rule.onNodeWithTag(LazyTag)
+ .performGesture {
+ draggedOffset = 0f
+ down(Offset(x = 10f, y = 10f))
+ moveBy(Offset(x = 0f, y = -50f))
+ up()
+ }
+
+ rule.runOnIdle {
+ Truth.assertThat(draggedOffset).isEqualTo(-50f)
+ }
+ }
+
+ @Test
+ fun row_nestedScrollingBackwardInitially() {
+ val items = (1..3).toList()
+ var draggedOffset = 0f
+ rule.setContent {
+ Box(
+ Modifier.draggable(Orientation.Horizontal) {
+ draggedOffset += it
+ }
+ ) {
+ LazyRowFor(
+ items = items,
+ modifier = Modifier.size(100.dp).testTag(LazyTag)
+ ) {
+ Spacer(Modifier.size(50.dp).testTag("$it"))
+ }
+ }
+ }
+
+ rule.onNodeWithTag(LazyTag)
+ .performGesture {
+ down(Offset(x = 10f, y = 10f))
+ moveBy(Offset(x = 100f, y = 0f))
+ up()
+ }
+
+ rule.runOnIdle {
+ Truth.assertThat(draggedOffset).isEqualTo(100f)
+ }
+ }
+
+ @Test
+ fun row_nestedScrollingBackwardOnceWeScrolledForwardPreviously() {
+ val items = (1..3).toList()
+ var draggedOffset = 0f
+ rule.setContent {
+ Box(
+ Modifier.draggable(Orientation.Horizontal) {
+ draggedOffset += it
+ }
+ ) {
+ LazyRowFor(
+ items = items,
+ modifier = Modifier.size(100.dp).testTag(LazyTag)
+ ) {
+ Spacer(Modifier.size(50.dp).testTag("$it"))
+ }
+ }
+ }
+
+ // scroll forward
+ rule.onNodeWithTag(LazyTag)
+ .scrollBy(x = 20.dp, density = rule.density)
+
+ // scroll back so we again on 0 position
+ // we scroll one extra dp to prevent rounding issues
+ rule.onNodeWithTag(LazyTag)
+ .scrollBy(x = -(21.dp), density = rule.density)
+
+ rule.onNodeWithTag(LazyTag)
+ .performGesture {
+ draggedOffset = 0f
+ down(Offset(x = 10f, y = 10f))
+ moveBy(Offset(x = 50f, y = 0f))
+ up()
+ }
+
+ rule.runOnIdle {
+ Truth.assertThat(draggedOffset).isEqualTo(50f)
+ }
+ }
+
+ @Test
+ fun row_nestedScrollingForwardWhenTheFullContentIsInitiallyVisible() {
+ val items = (1..2).toList()
+ var draggedOffset = 0f
+ rule.setContent {
+ Box(
+ Modifier.draggable(Orientation.Horizontal) {
+ draggedOffset += it
+ }
+ ) {
+ LazyRowFor(
+ items = items,
+ modifier = Modifier.size(100.dp).testTag(LazyTag)
+ ) {
+ Spacer(Modifier.size(40.dp).testTag("$it"))
+ }
+ }
+ }
+
+ rule.onNodeWithTag(LazyTag)
+ .performGesture {
+ down(Offset(x = 10f, y = 10f))
+ moveBy(Offset(x = -50f, y = 0f))
+ up()
+ }
+
+ rule.runOnIdle {
+ Truth.assertThat(draggedOffset).isEqualTo(-50f)
+ }
+ }
+
+ @Test
+ fun row_nestedScrollingForwardWhenScrolledToTheEnd() {
+ val items = (1..3).toList()
+ var draggedOffset = 0f
+ rule.setContent {
+ Box(
+ Modifier.draggable(Orientation.Horizontal) {
+ draggedOffset += it
+ }
+ ) {
+ LazyRowFor(
+ items = items,
+ modifier = Modifier.size(100.dp).testTag(LazyTag)
+ ) {
+ Spacer(Modifier.size(50.dp).testTag("$it"))
+ }
+ }
+ }
+
+ // scroll forward
+ rule.onNodeWithTag(LazyTag)
+ .scrollBy(x = 50.dp, density = rule.density)
+
+ rule.onNodeWithTag(LazyTag)
+ .performGesture {
+ draggedOffset = 0f
+ down(Offset(x = 10f, y = 10f))
+ moveBy(Offset(x = -50f, y = 0f))
+ up()
+ }
+
+ rule.runOnIdle {
+ Truth.assertThat(draggedOffset).isEqualTo(-50f)
+ }
+ }
+}
diff --git a/compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/LazyRowForTest.kt b/compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/LazyRowForTest.kt
index 3f7439d..0d0e062 100644
--- a/compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/LazyRowForTest.kt
+++ b/compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/LazyRowForTest.kt
@@ -51,6 +51,7 @@
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
import com.google.common.truth.Truth.assertThat
+import kotlinx.coroutines.runBlocking
import org.junit.Ignore
import org.junit.Rule
import org.junit.Test
@@ -611,7 +612,7 @@
rule.runOnIdle {
with(rule.density) {
- state.onScroll(110.dp.toPx())
+ state.onScroll(-110.dp.toPx())
}
}
@@ -742,4 +743,28 @@
assertThat(state!!.firstVisibleItemScrollOffset).isEqualTo(scrollOffset)
}
}
+
+ @Test
+ fun snapToItemIndex() {
+ val items by mutableStateOf((1..20).toList())
+ lateinit var state: LazyListState
+ rule.setContent {
+ state = rememberLazyListState()
+ LazyRowFor(
+ items = items,
+ modifier = Modifier.size(100.dp).testTag(LazyRowForTag),
+ state = state
+ ) {
+ Spacer(Modifier.size(20.dp).testTag("$it"))
+ }
+ }
+
+ rule.runOnIdle {
+ runBlocking {
+ state.snapToItemIndex(3, 10)
+ }
+ assertThat(state.firstVisibleItemIndex).isEqualTo(3)
+ assertThat(state.firstVisibleItemScrollOffset).isEqualTo(10)
+ }
+ }
}
diff --git a/compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/LazyRowTest.kt b/compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/LazyRowTest.kt
index ff6dbd9..fe720d7 100644
--- a/compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/LazyRowTest.kt
+++ b/compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/LazyRowTest.kt
@@ -195,7 +195,7 @@
}
rule.onNodeWithTag(LazyRowTag)
- .scrollBy(x = 102.dp, density = rule.density)
+ .scrollBy(x = 103.dp, density = rule.density)
rule.onNodeWithTag("1")
.assertDoesNotExist()
diff --git a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/LazyListState.kt b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/LazyListState.kt
index 4a3ec68..0c7ef38 100644
--- a/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/LazyListState.kt
+++ b/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/LazyListState.kt
@@ -32,15 +32,16 @@
import androidx.compose.runtime.savedinstancestate.listSaver
import androidx.compose.runtime.savedinstancestate.rememberSavedInstanceState
import androidx.compose.ui.Alignment
+import androidx.compose.ui.layout.MeasureResult
import androidx.compose.ui.layout.Placeable
import androidx.compose.ui.layout.Remeasurement
import androidx.compose.ui.layout.RemeasurementModifier
-import androidx.compose.ui.layout.MeasureResult
import androidx.compose.ui.layout.SubcomposeMeasureScope
import androidx.compose.ui.platform.AnimationClockAmbient
import androidx.compose.ui.unit.Constraints
import androidx.compose.ui.unit.constrainHeight
import androidx.compose.ui.unit.constrainWidth
+import androidx.compose.ui.util.annotation.IntRange
import androidx.compose.ui.util.annotation.VisibleForTesting
import androidx.compose.ui.util.fastForEach
import androidx.compose.ui.util.fastMap
@@ -180,10 +181,30 @@
}
}
+ // currently used by the desktop for scrollbars. to be made public
+ internal suspend fun snapToItemIndex(
+ @IntRange(from = 0) index: Int,
+ @IntRange(from = 0) scrollOffset: Int = 0
+ ) {
+ scrollPosition.update(
+ index = DataIndex(index),
+ // scrollOffset can only be positive
+ scrollOffset = maxOf(scrollOffset, 0),
+ // `true` will be replaced with the real value during the forceRemeasure() execution
+ canScrollForward = true
+ )
+ remeasurement.forceRemeasure()
+ }
+
// TODO: Coroutine scrolling APIs will allow this to be private again once we have more
// fine-grained control over scrolling
@VisibleForTesting
internal fun onScroll(distance: Float): Float {
+ if (distance < 0 && !scrollPosition.canScrollForward ||
+ distance > 0 && !scrollPosition.canScrollBackward
+ ) {
+ return 0f
+ }
check(abs(scrollToBeConsumed) < 0.5f) {
"entered drag with non-zero pending scroll: $scrollToBeConsumed"
}
@@ -227,16 +248,16 @@
constraints.assertNotNestingScrollableContainers(isVertical)
if (itemsCount <= 0) {
// empty data set. reset the current scroll and report zero size
- scrollPosition.update(DataIndex(0), 0)
+ scrollPosition.update(
+ index = DataIndex(0),
+ scrollOffset = 0,
+ canScrollForward = false
+ )
layout(constraints.constrainWidth(0), constraints.constrainHeight(0)) {}
} else {
var currentFirstItemIndex = scrollPosition.index
var currentFirstItemScrollOffset = scrollPosition.scrollOffset
- // assert for the incorrect initial state
- require(currentFirstItemScrollOffset >= 0f)
- require(currentFirstItemIndex.value >= 0f)
-
if (currentFirstItemIndex.value >= itemsCount) {
// the data set has been updated and now we have less items that we were
// scrolled to before
@@ -381,7 +402,11 @@
)
// update state with the new calculated scroll position
- scrollPosition.update(currentFirstItemIndex, currentFirstItemScrollOffset)
+ scrollPosition.update(
+ index = currentFirstItemIndex,
+ scrollOffset = currentFirstItemScrollOffset,
+ canScrollForward = mainAxisUsed > maxMainAxis
+ )
return layout(layoutWidth, layoutHeight) {
var currentMainAxis = -currentFirstItemScrollOffset
@@ -442,7 +467,10 @@
* once we update the values in the end of the measure block. Abstracting the variables
* duplication into a separate class allows us maintain the contract of keeping them in sync.
*/
-private class ItemRelativeScrollPosition(initialIndex: Int = 0, initialScrollOffset: Int = 0) {
+private class ItemRelativeScrollPosition(
+ initialIndex: Int = 0,
+ initialScrollOffset: Int = 0
+) {
var index = DataIndex(initialIndex)
private set
@@ -455,10 +483,17 @@
private val scrollOffsetState = mutableStateOf(scrollOffset)
val observableScrollOffset get() = scrollOffsetState.value
- fun update(index: DataIndex, scrollOffset: Int) {
+ val canScrollBackward: Boolean get() = index.value != 0 || scrollOffset != 0
+ var canScrollForward: Boolean = false
+ private set
+
+ fun update(index: DataIndex, scrollOffset: Int, canScrollForward: Boolean) {
+ require(index.value >= 0f) { "Index should be non-negative (${index.value})" }
+ require(scrollOffset >= 0f) { "scrollOffset should be non-negative ($scrollOffset)" }
this.index = index
indexState.value = index.value
this.scrollOffset = scrollOffset
scrollOffsetState.value = scrollOffset
+ this.canScrollForward = canScrollForward
}
}
diff --git a/compose/integration-tests/lint-baseline.xml b/compose/integration-tests/lint-baseline.xml
new file mode 100644
index 0000000..6355478
--- /dev/null
+++ b/compose/integration-tests/lint-baseline.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<issues format="5" by="lint 4.2.0-alpha06" client="gradle" variant="debug" version="4.2.0-alpha06">
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" freeCaches.invoke(null)"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/ui/integration/test/TextBenchmarkTestRule.kt"
+ line="82"
+ column="13"/>
+ </issue>
+
+</issues>
diff --git a/compose/material/material/lint-baseline.xml b/compose/material/material/lint-baseline.xml
index 6420db6..7d9e2d4 100644
--- a/compose/material/material/lint-baseline.xml
+++ b/compose/material/material/lint-baseline.xml
@@ -4,39 +4,6 @@
<issue
id="ModifierInspectorInfo"
message="Modifiers should include inspectorInfo for the Layout Inspector"
- errorLine1=" DefaultIconSizeModifier"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/commonMain/kotlin/androidx/compose/material/Icon.kt"
- line="102"
- column="13"/>
- </issue>
-
- <issue
- id="ModifierInspectorInfo"
- message="These lambda arguments are missing in the InspectorInfo: `borderParams`"
- errorLine1="): Modifier = drawBehind {"
- errorLine2=" ~~~~~~~~~~">
- <location
- file="src/commonMain/kotlin/androidx/compose/material/OutlinedTextField.kt"
- line="580"
- column="15"/>
- </issue>
-
- <issue
- id="ModifierInspectorInfo"
- message="These lambda arguments are missing in the InspectorInfo: `onValueChange`, `position`, `steps`, `value`, `valueRange`"
- errorLine1=" return semantics {"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/commonMain/kotlin/androidx/compose/material/Slider.kt"
- line="360"
- column="12"/>
- </issue>
-
- <issue
- id="ModifierInspectorInfo"
- message="Modifiers should include inspectorInfo for the Layout Inspector"
errorLine1=") = composed {"
errorLine2=" ~~~~~~~~">
<location
@@ -52,29 +19,18 @@
errorLine2=" ~~~~~~~~">
<location
file="src/commonMain/kotlin/androidx/compose/material/Tab.kt"
- line="223"
+ line="221"
column="19"/>
</issue>
<issue
id="ModifierInspectorInfo"
- message="These lambda arguments are missing in the InspectorInfo: `color`, `lineWidth`"
- errorLine1=" return drawBehind {"
- errorLine2=" ~~~~~~~~~~">
- <location
- file="src/commonMain/kotlin/androidx/compose/material/TextField.kt"
- line="622"
- column="12"/>
- </issue>
-
- <issue
- id="ModifierInspectorInfo"
message="Modifiers should include inspectorInfo for the Layout Inspector"
errorLine1=" this.then(object : LayoutModifier {"
errorLine2=" ^">
<location
file="src/commonMain/kotlin/androidx/compose/material/TextFieldImpl.kt"
- line="381"
+ line="383"
column="15"/>
</issue>
diff --git a/compose/runtime/runtime/api/current.txt b/compose/runtime/runtime/api/current.txt
index 107d4a0..dfb5e59 100644
--- a/compose/runtime/runtime/api/current.txt
+++ b/compose/runtime/runtime/api/current.txt
@@ -148,17 +148,6 @@
method public void setContent(kotlin.jvm.functions.Function0<kotlin.Unit> content);
}
- @Deprecated public interface CompositionFrameClock extends androidx.compose.runtime.dispatch.MonotonicFrameClock {
- method @Deprecated public default suspend <R> Object? awaitFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R> p);
- }
-
- public final class CompositionFrameClockKt {
- method @Deprecated public static suspend inline <R> Object? awaitFrameMillis(androidx.compose.runtime.CompositionFrameClock, kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R> p);
- method @Deprecated public static suspend Object? awaitFrameMillis(androidx.compose.runtime.CompositionFrameClock, kotlin.coroutines.Continuation<? super java.lang.Long> p);
- method @Deprecated public static suspend Object? awaitFrameNanos(androidx.compose.runtime.CompositionFrameClock, kotlin.coroutines.Continuation<? super java.lang.Long> p);
- method @Deprecated public static suspend inline <R> Object? withFrameMillis(androidx.compose.runtime.CompositionFrameClock, kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R> p);
- }
-
public final class CompositionKt {
method @androidx.compose.runtime.ExperimentalComposeApi public static androidx.compose.runtime.Composition compositionFor(Object key, androidx.compose.runtime.Applier<?> applier, androidx.compose.runtime.CompositionReference parent, optional kotlin.jvm.functions.Function0<kotlin.Unit> onCreated);
}
@@ -196,10 +185,6 @@
method @androidx.compose.runtime.Composable public static <V1, V2> void onCommit(V1? v1, V2? v2, kotlin.jvm.functions.Function1<? super androidx.compose.runtime.CommitScope,kotlin.Unit> callback);
method @androidx.compose.runtime.Composable public static void onCommit(Object![]? inputs, kotlin.jvm.functions.Function1<? super androidx.compose.runtime.CommitScope,kotlin.Unit> callback);
method @androidx.compose.runtime.Composable public static void onDispose(kotlin.jvm.functions.Function0<kotlin.Unit> callback);
- method @Deprecated @androidx.compose.runtime.Composable public static inline void onPreCommit(kotlin.jvm.functions.Function1<? super androidx.compose.runtime.CommitScope,kotlin.Unit> callback);
- method @Deprecated @androidx.compose.runtime.Composable public static <V1> void onPreCommit(V1? v1, kotlin.jvm.functions.Function1<? super androidx.compose.runtime.CommitScope,kotlin.Unit> callback);
- method @Deprecated @androidx.compose.runtime.Composable public static <V1, V2> void onPreCommit(V1? v1, V2? v2, kotlin.jvm.functions.Function1<? super androidx.compose.runtime.CommitScope,kotlin.Unit> callback);
- method @Deprecated @androidx.compose.runtime.Composable public static void onPreCommit(Object![]? inputs, kotlin.jvm.functions.Function1<? super androidx.compose.runtime.CommitScope,kotlin.Unit> callback);
}
public interface EmbeddingContext {
@@ -271,9 +256,6 @@
}
public final class MutableStateKt {
- method @Deprecated public static kotlin.jvm.functions.Function2<java.lang.Object,java.lang.Object,java.lang.Boolean> getNeverEqual();
- method @Deprecated public static kotlin.jvm.functions.Function2<java.lang.Object,java.lang.Object,java.lang.Boolean> getReferentiallyEqual();
- method @Deprecated public static kotlin.jvm.functions.Function2<java.lang.Object,java.lang.Object,java.lang.Boolean> getStructurallyEqual();
method public static inline operator <T> T! getValue(androidx.compose.runtime.State<T>, Object? thisObj, kotlin.reflect.KProperty<?> property);
method public static <T> androidx.compose.runtime.snapshots.SnapshotStateList<T> mutableStateListOf();
method public static <T> androidx.compose.runtime.snapshots.SnapshotStateList<T> mutableStateListOf(T?... elements);
@@ -283,10 +265,6 @@
method public static <T> androidx.compose.runtime.SnapshotMutationPolicy<T> neverEqualPolicy();
method public static <T> androidx.compose.runtime.SnapshotMutationPolicy<T> referentialEqualityPolicy();
method public static inline operator <T> void setValue(androidx.compose.runtime.MutableState<T>, Object? thisObj, kotlin.reflect.KProperty<?> property, T? value);
- method @Deprecated @androidx.compose.runtime.Composable public static inline <T> androidx.compose.runtime.MutableState<T> state(optional androidx.compose.runtime.SnapshotMutationPolicy<T> policy, kotlin.jvm.functions.Function0<? extends T> init);
- method @Deprecated @androidx.compose.runtime.Composable public static inline <T, V1> androidx.compose.runtime.MutableState<T> stateFor(V1? v1, kotlin.jvm.functions.Function0<? extends T> init);
- method @androidx.compose.runtime.Composable public static inline <T> androidx.compose.runtime.MutableState<T> stateFor(Object![]? inputs, kotlin.jvm.functions.Function0<? extends T> init);
- method @androidx.compose.runtime.Composable public static inline <T, reified V1, reified V2> androidx.compose.runtime.MutableState<T>! stateFor(V1? v1, V2? v2, kotlin.jvm.functions.Function0<? extends T> init);
method public static <T> androidx.compose.runtime.SnapshotMutationPolicy<T> structuralEqualityPolicy();
method public static <T> androidx.compose.runtime.snapshots.SnapshotStateList<T> toMutableStateList(java.util.Collection<? extends T>);
method public static <K, V> androidx.compose.runtime.snapshots.SnapshotStateMap<K,V> toMutableStateMap(Iterable<? extends kotlin.Pair<? extends K,? extends V>>);
@@ -664,140 +642,6 @@
}
-package androidx.compose.runtime.frames {
-
- @Deprecated public abstract class AbstractRecord implements androidx.compose.runtime.frames.Record {
- ctor @Deprecated public AbstractRecord();
- method @Deprecated public int getFrameId();
- method @Deprecated public androidx.compose.runtime.frames.Record? getNext();
- method @Deprecated public void setFrameId(int p);
- method @Deprecated public void setNext(androidx.compose.runtime.frames.Record? p);
- property public int frameId;
- property public androidx.compose.runtime.frames.Record? next;
- }
-
- public final class Frame {
- method public int getId();
- method public boolean getReadonly();
- method public boolean hasPendingChanges();
- property public final int id;
- property public final boolean readonly;
- }
-
- @Deprecated public final class FrameAborted extends java.lang.RuntimeException {
- ctor @Deprecated public FrameAborted(androidx.compose.runtime.frames.Frame frame);
- method @Deprecated public androidx.compose.runtime.frames.Frame getFrame();
- property public final androidx.compose.runtime.frames.Frame frame;
- }
-
- public final class FrameContainersKt {
- method @Deprecated public static <T> androidx.compose.runtime.frames.ModelList<T> modelListOf();
- method @Deprecated public static <T> androidx.compose.runtime.frames.ModelList<T> modelListOf(T? element);
- method @Deprecated public static <T> androidx.compose.runtime.frames.ModelList<T> modelListOf(T?... elements);
- method @Deprecated public static <K, V> androidx.compose.runtime.frames.ModelMap<K,V> modelMapOf();
- method @Deprecated public static <K, V> androidx.compose.runtime.frames.ModelMap<K,V> modelMapOf(kotlin.Pair<? extends K,? extends V>... pairs);
- }
-
- public final class FrameIdSetKt {
- }
-
- @Deprecated public interface Framed {
- method @Deprecated public androidx.compose.runtime.frames.Record getFirstFrameRecord();
- method @Deprecated public void prependFrameRecord(androidx.compose.runtime.frames.Record value);
- property public abstract androidx.compose.runtime.frames.Record firstFrameRecord;
- }
-
- public final class FramesKt {
- method @Deprecated public static void _created(androidx.compose.runtime.frames.Framed framed);
- method @Deprecated public static androidx.compose.runtime.frames.Record _readable(androidx.compose.runtime.frames.Record r, androidx.compose.runtime.frames.Framed framed);
- method @Deprecated public static androidx.compose.runtime.frames.Record _writable(androidx.compose.runtime.frames.Record r, androidx.compose.runtime.frames.Framed framed);
- method @Deprecated public static void abort();
- method @Deprecated public static void abort(androidx.compose.runtime.frames.Frame frame);
- method @Deprecated public static void abortHandler();
- method @Deprecated public static void abortHandler(androidx.compose.runtime.frames.Frame frame);
- method @Deprecated public static void commit();
- method @Deprecated public static void commit(androidx.compose.runtime.frames.Frame frame);
- method @Deprecated public static void commitHandler();
- method @Deprecated public static androidx.compose.runtime.frames.Frame currentFrame();
- method @Deprecated public static boolean getInFrame();
- method @Deprecated public static void observeAllReads(kotlin.jvm.functions.Function1<java.lang.Object,kotlin.Unit> readObserver, kotlin.jvm.functions.Function0<kotlin.Unit> block);
- method @Deprecated public static void open(optional boolean readOnly);
- method @Deprecated public static void open(optional kotlin.jvm.functions.Function1<java.lang.Object,kotlin.Unit>? readObserver, optional kotlin.jvm.functions.Function2<java.lang.Object,? super java.lang.Boolean,kotlin.Unit>? writeObserver);
- method @Deprecated public static <T extends androidx.compose.runtime.frames.Record> T readable(T, androidx.compose.runtime.frames.Framed framed);
- method @Deprecated public static kotlin.jvm.functions.Function0<kotlin.Unit> registerCommitObserver(kotlin.jvm.functions.Function2<? super java.util.Set<?>,? super androidx.compose.runtime.frames.Frame,kotlin.Unit> observer);
- method @Deprecated public static void restore(androidx.compose.runtime.frames.Frame frame);
- method @Deprecated public static androidx.compose.runtime.frames.Frame suspend();
- method @Deprecated public static boolean wasModified(Object value);
- method @Deprecated public static inline <T extends androidx.compose.runtime.frames.Record> T withCurrent(T, kotlin.jvm.functions.Function1<? super T,kotlin.Unit> block);
- method @Deprecated public static <T extends androidx.compose.runtime.frames.Record> T writable(T, androidx.compose.runtime.frames.Framed framed);
- method @Deprecated public static <T extends androidx.compose.runtime.frames.Record> T writable(T, androidx.compose.runtime.frames.Framed framed, androidx.compose.runtime.frames.Frame frame);
- }
-
- @Deprecated public final class ModelList<T> implements androidx.compose.runtime.frames.Framed kotlin.jvm.internal.markers.KMutableList java.util.List<T> {
- ctor @Deprecated public ModelList();
- method @Deprecated public boolean add(T? element);
- method @Deprecated public void add(int index, T? element);
- method @Deprecated public boolean addAll(int index, java.util.Collection<? extends T> elements);
- method @Deprecated public boolean addAll(java.util.Collection<? extends T> elements);
- method @Deprecated public void clear();
- method @Deprecated public boolean contains(Object? element);
- method @Deprecated public boolean containsAll(java.util.Collection<?> elements);
- method @Deprecated public T! get(int index);
- method @Deprecated public androidx.compose.runtime.frames.Record getFirstFrameRecord();
- method @Deprecated public int getSize();
- method @Deprecated public int indexOf(Object? element);
- method @Deprecated public boolean isEmpty();
- method @Deprecated public java.util.Iterator<T> iterator();
- method @Deprecated public int lastIndexOf(Object? element);
- method @Deprecated public java.util.ListIterator<T> listIterator();
- method @Deprecated public java.util.ListIterator<T> listIterator(int index);
- method @Deprecated public void prependFrameRecord(androidx.compose.runtime.frames.Record value);
- method @Deprecated public boolean remove(Object? element);
- method @Deprecated public boolean removeAll(java.util.Collection<?> elements);
- method @Deprecated public T! removeAt(int index);
- method @Deprecated public boolean retainAll(java.util.Collection<?> elements);
- method @Deprecated public T! set(int index, T? element);
- method @Deprecated public java.util.List<T> subList(int fromIndex, int toIndex);
- property public androidx.compose.runtime.frames.Record firstFrameRecord;
- property public int size;
- }
-
- @Deprecated public final class ModelMap<K, V> implements androidx.compose.runtime.frames.Framed kotlin.jvm.internal.markers.KMutableMap java.util.Map<K,V> {
- ctor @Deprecated public ModelMap();
- method @Deprecated public void clear();
- method @Deprecated public boolean containsKey(Object? key);
- method @Deprecated public boolean containsValue(Object? value);
- method @Deprecated public V? get(Object? key);
- method @Deprecated public java.util.Set<java.util.Map.Entry<K,V>> getEntries();
- method @Deprecated public androidx.compose.runtime.frames.Record getFirstFrameRecord();
- method @Deprecated public java.util.Set<K> getKeys();
- method @Deprecated public int getSize();
- method @Deprecated public java.util.Collection<V> getValues();
- method @Deprecated public boolean isEmpty();
- method @Deprecated public void prependFrameRecord(androidx.compose.runtime.frames.Record value);
- method @Deprecated public V? put(K? key, V? value);
- method @Deprecated public void putAll(java.util.Map<? extends K,? extends V> from);
- method @Deprecated public V? remove(Object? key);
- property public java.util.Set<java.util.Map.Entry<K,V>> entries;
- property public androidx.compose.runtime.frames.Record firstFrameRecord;
- property public java.util.Set<K> keys;
- property public int size;
- property public java.util.Collection<V> values;
- }
-
- @Deprecated public interface Record {
- method @Deprecated public void assign(androidx.compose.runtime.frames.Record value);
- method @Deprecated public androidx.compose.runtime.frames.Record create();
- method @Deprecated public int getFrameId();
- method @Deprecated public androidx.compose.runtime.frames.Record? getNext();
- method @Deprecated public void setFrameId(int p);
- method @Deprecated public void setNext(androidx.compose.runtime.frames.Record? p);
- property public abstract int frameId;
- property public abstract androidx.compose.runtime.frames.Record? next;
- }
-
-}
-
package androidx.compose.runtime.internal {
@androidx.compose.runtime.ComposeCompilerApi @androidx.compose.runtime.Stable public final class ComposableLambda<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, R> implements kotlin.jvm.functions.Function10<P1,P2,P3,P4,P5,P6,P7,P8,androidx.compose.runtime.Composer<?>,java.lang.Integer,R> kotlin.jvm.functions.Function11<P1,P2,P3,P4,P5,P6,P7,P8,P9,androidx.compose.runtime.Composer<?>,java.lang.Integer,R> kotlin.jvm.functions.Function13<P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,androidx.compose.runtime.Composer<?>,java.lang.Integer,java.lang.Integer,R> kotlin.jvm.functions.Function14<P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,androidx.compose.runtime.Composer<?>,java.lang.Integer,java.lang.Integer,R> kotlin.jvm.functions.Function15<P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,androidx.compose.runtime.Composer<?>,java.lang.Integer,java.lang.Integer,R> kotlin.jvm.functions.Function16<P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,androidx.compose.runtime.Composer<?>,java.lang.Integer,java.lang.Integer,R> kotlin.jvm.functions.Function17<P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,androidx.compose.runtime.Composer<?>,java.lang.Integer,java.lang.Integer,R> kotlin.jvm.functions.Function18<P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,androidx.compose.runtime.Composer<?>,java.lang.Integer,java.lang.Integer,R> kotlin.jvm.functions.Function19<P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,androidx.compose.runtime.Composer<?>,java.lang.Integer,java.lang.Integer,R> kotlin.jvm.functions.Function2<androidx.compose.runtime.Composer<?>,java.lang.Integer,R> kotlin.jvm.functions.Function20<P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,androidx.compose.runtime.Composer<?>,java.lang.Integer,java.lang.Integer,R> kotlin.jvm.functions.Function21<P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,androidx.compose.runtime.Composer<?>,java.lang.Integer,java.lang.Integer,R> kotlin.jvm.functions.Function3<P1,androidx.compose.runtime.Composer<?>,java.lang.Integer,R> kotlin.jvm.functions.Function4<P1,P2,androidx.compose.runtime.Composer<?>,java.lang.Integer,R> kotlin.jvm.functions.Function5<P1,P2,P3,androidx.compose.runtime.Composer<?>,java.lang.Integer,R> kotlin.jvm.functions.Function6<P1,P2,P3,P4,androidx.compose.runtime.Composer<?>,java.lang.Integer,R> kotlin.jvm.functions.Function7<P1,P2,P3,P4,P5,androidx.compose.runtime.Composer<?>,java.lang.Integer,R> kotlin.jvm.functions.Function8<P1,P2,P3,P4,P5,P6,androidx.compose.runtime.Composer<?>,java.lang.Integer,R> kotlin.jvm.functions.Function9<P1,P2,P3,P4,P5,P6,P7,androidx.compose.runtime.Composer<?>,java.lang.Integer,R> {
diff --git a/compose/runtime/runtime/api/public_plus_experimental_current.txt b/compose/runtime/runtime/api/public_plus_experimental_current.txt
index 107d4a0..dfb5e59 100644
--- a/compose/runtime/runtime/api/public_plus_experimental_current.txt
+++ b/compose/runtime/runtime/api/public_plus_experimental_current.txt
@@ -148,17 +148,6 @@
method public void setContent(kotlin.jvm.functions.Function0<kotlin.Unit> content);
}
- @Deprecated public interface CompositionFrameClock extends androidx.compose.runtime.dispatch.MonotonicFrameClock {
- method @Deprecated public default suspend <R> Object? awaitFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R> p);
- }
-
- public final class CompositionFrameClockKt {
- method @Deprecated public static suspend inline <R> Object? awaitFrameMillis(androidx.compose.runtime.CompositionFrameClock, kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R> p);
- method @Deprecated public static suspend Object? awaitFrameMillis(androidx.compose.runtime.CompositionFrameClock, kotlin.coroutines.Continuation<? super java.lang.Long> p);
- method @Deprecated public static suspend Object? awaitFrameNanos(androidx.compose.runtime.CompositionFrameClock, kotlin.coroutines.Continuation<? super java.lang.Long> p);
- method @Deprecated public static suspend inline <R> Object? withFrameMillis(androidx.compose.runtime.CompositionFrameClock, kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R> p);
- }
-
public final class CompositionKt {
method @androidx.compose.runtime.ExperimentalComposeApi public static androidx.compose.runtime.Composition compositionFor(Object key, androidx.compose.runtime.Applier<?> applier, androidx.compose.runtime.CompositionReference parent, optional kotlin.jvm.functions.Function0<kotlin.Unit> onCreated);
}
@@ -196,10 +185,6 @@
method @androidx.compose.runtime.Composable public static <V1, V2> void onCommit(V1? v1, V2? v2, kotlin.jvm.functions.Function1<? super androidx.compose.runtime.CommitScope,kotlin.Unit> callback);
method @androidx.compose.runtime.Composable public static void onCommit(Object![]? inputs, kotlin.jvm.functions.Function1<? super androidx.compose.runtime.CommitScope,kotlin.Unit> callback);
method @androidx.compose.runtime.Composable public static void onDispose(kotlin.jvm.functions.Function0<kotlin.Unit> callback);
- method @Deprecated @androidx.compose.runtime.Composable public static inline void onPreCommit(kotlin.jvm.functions.Function1<? super androidx.compose.runtime.CommitScope,kotlin.Unit> callback);
- method @Deprecated @androidx.compose.runtime.Composable public static <V1> void onPreCommit(V1? v1, kotlin.jvm.functions.Function1<? super androidx.compose.runtime.CommitScope,kotlin.Unit> callback);
- method @Deprecated @androidx.compose.runtime.Composable public static <V1, V2> void onPreCommit(V1? v1, V2? v2, kotlin.jvm.functions.Function1<? super androidx.compose.runtime.CommitScope,kotlin.Unit> callback);
- method @Deprecated @androidx.compose.runtime.Composable public static void onPreCommit(Object![]? inputs, kotlin.jvm.functions.Function1<? super androidx.compose.runtime.CommitScope,kotlin.Unit> callback);
}
public interface EmbeddingContext {
@@ -271,9 +256,6 @@
}
public final class MutableStateKt {
- method @Deprecated public static kotlin.jvm.functions.Function2<java.lang.Object,java.lang.Object,java.lang.Boolean> getNeverEqual();
- method @Deprecated public static kotlin.jvm.functions.Function2<java.lang.Object,java.lang.Object,java.lang.Boolean> getReferentiallyEqual();
- method @Deprecated public static kotlin.jvm.functions.Function2<java.lang.Object,java.lang.Object,java.lang.Boolean> getStructurallyEqual();
method public static inline operator <T> T! getValue(androidx.compose.runtime.State<T>, Object? thisObj, kotlin.reflect.KProperty<?> property);
method public static <T> androidx.compose.runtime.snapshots.SnapshotStateList<T> mutableStateListOf();
method public static <T> androidx.compose.runtime.snapshots.SnapshotStateList<T> mutableStateListOf(T?... elements);
@@ -283,10 +265,6 @@
method public static <T> androidx.compose.runtime.SnapshotMutationPolicy<T> neverEqualPolicy();
method public static <T> androidx.compose.runtime.SnapshotMutationPolicy<T> referentialEqualityPolicy();
method public static inline operator <T> void setValue(androidx.compose.runtime.MutableState<T>, Object? thisObj, kotlin.reflect.KProperty<?> property, T? value);
- method @Deprecated @androidx.compose.runtime.Composable public static inline <T> androidx.compose.runtime.MutableState<T> state(optional androidx.compose.runtime.SnapshotMutationPolicy<T> policy, kotlin.jvm.functions.Function0<? extends T> init);
- method @Deprecated @androidx.compose.runtime.Composable public static inline <T, V1> androidx.compose.runtime.MutableState<T> stateFor(V1? v1, kotlin.jvm.functions.Function0<? extends T> init);
- method @androidx.compose.runtime.Composable public static inline <T> androidx.compose.runtime.MutableState<T> stateFor(Object![]? inputs, kotlin.jvm.functions.Function0<? extends T> init);
- method @androidx.compose.runtime.Composable public static inline <T, reified V1, reified V2> androidx.compose.runtime.MutableState<T>! stateFor(V1? v1, V2? v2, kotlin.jvm.functions.Function0<? extends T> init);
method public static <T> androidx.compose.runtime.SnapshotMutationPolicy<T> structuralEqualityPolicy();
method public static <T> androidx.compose.runtime.snapshots.SnapshotStateList<T> toMutableStateList(java.util.Collection<? extends T>);
method public static <K, V> androidx.compose.runtime.snapshots.SnapshotStateMap<K,V> toMutableStateMap(Iterable<? extends kotlin.Pair<? extends K,? extends V>>);
@@ -664,140 +642,6 @@
}
-package androidx.compose.runtime.frames {
-
- @Deprecated public abstract class AbstractRecord implements androidx.compose.runtime.frames.Record {
- ctor @Deprecated public AbstractRecord();
- method @Deprecated public int getFrameId();
- method @Deprecated public androidx.compose.runtime.frames.Record? getNext();
- method @Deprecated public void setFrameId(int p);
- method @Deprecated public void setNext(androidx.compose.runtime.frames.Record? p);
- property public int frameId;
- property public androidx.compose.runtime.frames.Record? next;
- }
-
- public final class Frame {
- method public int getId();
- method public boolean getReadonly();
- method public boolean hasPendingChanges();
- property public final int id;
- property public final boolean readonly;
- }
-
- @Deprecated public final class FrameAborted extends java.lang.RuntimeException {
- ctor @Deprecated public FrameAborted(androidx.compose.runtime.frames.Frame frame);
- method @Deprecated public androidx.compose.runtime.frames.Frame getFrame();
- property public final androidx.compose.runtime.frames.Frame frame;
- }
-
- public final class FrameContainersKt {
- method @Deprecated public static <T> androidx.compose.runtime.frames.ModelList<T> modelListOf();
- method @Deprecated public static <T> androidx.compose.runtime.frames.ModelList<T> modelListOf(T? element);
- method @Deprecated public static <T> androidx.compose.runtime.frames.ModelList<T> modelListOf(T?... elements);
- method @Deprecated public static <K, V> androidx.compose.runtime.frames.ModelMap<K,V> modelMapOf();
- method @Deprecated public static <K, V> androidx.compose.runtime.frames.ModelMap<K,V> modelMapOf(kotlin.Pair<? extends K,? extends V>... pairs);
- }
-
- public final class FrameIdSetKt {
- }
-
- @Deprecated public interface Framed {
- method @Deprecated public androidx.compose.runtime.frames.Record getFirstFrameRecord();
- method @Deprecated public void prependFrameRecord(androidx.compose.runtime.frames.Record value);
- property public abstract androidx.compose.runtime.frames.Record firstFrameRecord;
- }
-
- public final class FramesKt {
- method @Deprecated public static void _created(androidx.compose.runtime.frames.Framed framed);
- method @Deprecated public static androidx.compose.runtime.frames.Record _readable(androidx.compose.runtime.frames.Record r, androidx.compose.runtime.frames.Framed framed);
- method @Deprecated public static androidx.compose.runtime.frames.Record _writable(androidx.compose.runtime.frames.Record r, androidx.compose.runtime.frames.Framed framed);
- method @Deprecated public static void abort();
- method @Deprecated public static void abort(androidx.compose.runtime.frames.Frame frame);
- method @Deprecated public static void abortHandler();
- method @Deprecated public static void abortHandler(androidx.compose.runtime.frames.Frame frame);
- method @Deprecated public static void commit();
- method @Deprecated public static void commit(androidx.compose.runtime.frames.Frame frame);
- method @Deprecated public static void commitHandler();
- method @Deprecated public static androidx.compose.runtime.frames.Frame currentFrame();
- method @Deprecated public static boolean getInFrame();
- method @Deprecated public static void observeAllReads(kotlin.jvm.functions.Function1<java.lang.Object,kotlin.Unit> readObserver, kotlin.jvm.functions.Function0<kotlin.Unit> block);
- method @Deprecated public static void open(optional boolean readOnly);
- method @Deprecated public static void open(optional kotlin.jvm.functions.Function1<java.lang.Object,kotlin.Unit>? readObserver, optional kotlin.jvm.functions.Function2<java.lang.Object,? super java.lang.Boolean,kotlin.Unit>? writeObserver);
- method @Deprecated public static <T extends androidx.compose.runtime.frames.Record> T readable(T, androidx.compose.runtime.frames.Framed framed);
- method @Deprecated public static kotlin.jvm.functions.Function0<kotlin.Unit> registerCommitObserver(kotlin.jvm.functions.Function2<? super java.util.Set<?>,? super androidx.compose.runtime.frames.Frame,kotlin.Unit> observer);
- method @Deprecated public static void restore(androidx.compose.runtime.frames.Frame frame);
- method @Deprecated public static androidx.compose.runtime.frames.Frame suspend();
- method @Deprecated public static boolean wasModified(Object value);
- method @Deprecated public static inline <T extends androidx.compose.runtime.frames.Record> T withCurrent(T, kotlin.jvm.functions.Function1<? super T,kotlin.Unit> block);
- method @Deprecated public static <T extends androidx.compose.runtime.frames.Record> T writable(T, androidx.compose.runtime.frames.Framed framed);
- method @Deprecated public static <T extends androidx.compose.runtime.frames.Record> T writable(T, androidx.compose.runtime.frames.Framed framed, androidx.compose.runtime.frames.Frame frame);
- }
-
- @Deprecated public final class ModelList<T> implements androidx.compose.runtime.frames.Framed kotlin.jvm.internal.markers.KMutableList java.util.List<T> {
- ctor @Deprecated public ModelList();
- method @Deprecated public boolean add(T? element);
- method @Deprecated public void add(int index, T? element);
- method @Deprecated public boolean addAll(int index, java.util.Collection<? extends T> elements);
- method @Deprecated public boolean addAll(java.util.Collection<? extends T> elements);
- method @Deprecated public void clear();
- method @Deprecated public boolean contains(Object? element);
- method @Deprecated public boolean containsAll(java.util.Collection<?> elements);
- method @Deprecated public T! get(int index);
- method @Deprecated public androidx.compose.runtime.frames.Record getFirstFrameRecord();
- method @Deprecated public int getSize();
- method @Deprecated public int indexOf(Object? element);
- method @Deprecated public boolean isEmpty();
- method @Deprecated public java.util.Iterator<T> iterator();
- method @Deprecated public int lastIndexOf(Object? element);
- method @Deprecated public java.util.ListIterator<T> listIterator();
- method @Deprecated public java.util.ListIterator<T> listIterator(int index);
- method @Deprecated public void prependFrameRecord(androidx.compose.runtime.frames.Record value);
- method @Deprecated public boolean remove(Object? element);
- method @Deprecated public boolean removeAll(java.util.Collection<?> elements);
- method @Deprecated public T! removeAt(int index);
- method @Deprecated public boolean retainAll(java.util.Collection<?> elements);
- method @Deprecated public T! set(int index, T? element);
- method @Deprecated public java.util.List<T> subList(int fromIndex, int toIndex);
- property public androidx.compose.runtime.frames.Record firstFrameRecord;
- property public int size;
- }
-
- @Deprecated public final class ModelMap<K, V> implements androidx.compose.runtime.frames.Framed kotlin.jvm.internal.markers.KMutableMap java.util.Map<K,V> {
- ctor @Deprecated public ModelMap();
- method @Deprecated public void clear();
- method @Deprecated public boolean containsKey(Object? key);
- method @Deprecated public boolean containsValue(Object? value);
- method @Deprecated public V? get(Object? key);
- method @Deprecated public java.util.Set<java.util.Map.Entry<K,V>> getEntries();
- method @Deprecated public androidx.compose.runtime.frames.Record getFirstFrameRecord();
- method @Deprecated public java.util.Set<K> getKeys();
- method @Deprecated public int getSize();
- method @Deprecated public java.util.Collection<V> getValues();
- method @Deprecated public boolean isEmpty();
- method @Deprecated public void prependFrameRecord(androidx.compose.runtime.frames.Record value);
- method @Deprecated public V? put(K? key, V? value);
- method @Deprecated public void putAll(java.util.Map<? extends K,? extends V> from);
- method @Deprecated public V? remove(Object? key);
- property public java.util.Set<java.util.Map.Entry<K,V>> entries;
- property public androidx.compose.runtime.frames.Record firstFrameRecord;
- property public java.util.Set<K> keys;
- property public int size;
- property public java.util.Collection<V> values;
- }
-
- @Deprecated public interface Record {
- method @Deprecated public void assign(androidx.compose.runtime.frames.Record value);
- method @Deprecated public androidx.compose.runtime.frames.Record create();
- method @Deprecated public int getFrameId();
- method @Deprecated public androidx.compose.runtime.frames.Record? getNext();
- method @Deprecated public void setFrameId(int p);
- method @Deprecated public void setNext(androidx.compose.runtime.frames.Record? p);
- property public abstract int frameId;
- property public abstract androidx.compose.runtime.frames.Record? next;
- }
-
-}
-
package androidx.compose.runtime.internal {
@androidx.compose.runtime.ComposeCompilerApi @androidx.compose.runtime.Stable public final class ComposableLambda<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, R> implements kotlin.jvm.functions.Function10<P1,P2,P3,P4,P5,P6,P7,P8,androidx.compose.runtime.Composer<?>,java.lang.Integer,R> kotlin.jvm.functions.Function11<P1,P2,P3,P4,P5,P6,P7,P8,P9,androidx.compose.runtime.Composer<?>,java.lang.Integer,R> kotlin.jvm.functions.Function13<P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,androidx.compose.runtime.Composer<?>,java.lang.Integer,java.lang.Integer,R> kotlin.jvm.functions.Function14<P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,androidx.compose.runtime.Composer<?>,java.lang.Integer,java.lang.Integer,R> kotlin.jvm.functions.Function15<P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,androidx.compose.runtime.Composer<?>,java.lang.Integer,java.lang.Integer,R> kotlin.jvm.functions.Function16<P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,androidx.compose.runtime.Composer<?>,java.lang.Integer,java.lang.Integer,R> kotlin.jvm.functions.Function17<P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,androidx.compose.runtime.Composer<?>,java.lang.Integer,java.lang.Integer,R> kotlin.jvm.functions.Function18<P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,androidx.compose.runtime.Composer<?>,java.lang.Integer,java.lang.Integer,R> kotlin.jvm.functions.Function19<P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,androidx.compose.runtime.Composer<?>,java.lang.Integer,java.lang.Integer,R> kotlin.jvm.functions.Function2<androidx.compose.runtime.Composer<?>,java.lang.Integer,R> kotlin.jvm.functions.Function20<P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,androidx.compose.runtime.Composer<?>,java.lang.Integer,java.lang.Integer,R> kotlin.jvm.functions.Function21<P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,androidx.compose.runtime.Composer<?>,java.lang.Integer,java.lang.Integer,R> kotlin.jvm.functions.Function3<P1,androidx.compose.runtime.Composer<?>,java.lang.Integer,R> kotlin.jvm.functions.Function4<P1,P2,androidx.compose.runtime.Composer<?>,java.lang.Integer,R> kotlin.jvm.functions.Function5<P1,P2,P3,androidx.compose.runtime.Composer<?>,java.lang.Integer,R> kotlin.jvm.functions.Function6<P1,P2,P3,P4,androidx.compose.runtime.Composer<?>,java.lang.Integer,R> kotlin.jvm.functions.Function7<P1,P2,P3,P4,P5,androidx.compose.runtime.Composer<?>,java.lang.Integer,R> kotlin.jvm.functions.Function8<P1,P2,P3,P4,P5,P6,androidx.compose.runtime.Composer<?>,java.lang.Integer,R> kotlin.jvm.functions.Function9<P1,P2,P3,P4,P5,P6,P7,androidx.compose.runtime.Composer<?>,java.lang.Integer,R> {
diff --git a/compose/runtime/runtime/api/restricted_current.txt b/compose/runtime/runtime/api/restricted_current.txt
index d420922..a61a7b4 100644
--- a/compose/runtime/runtime/api/restricted_current.txt
+++ b/compose/runtime/runtime/api/restricted_current.txt
@@ -162,17 +162,6 @@
method public void setContent(kotlin.jvm.functions.Function0<kotlin.Unit> content);
}
- @Deprecated public interface CompositionFrameClock extends androidx.compose.runtime.dispatch.MonotonicFrameClock {
- method @Deprecated public default suspend <R> Object? awaitFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R> p);
- }
-
- public final class CompositionFrameClockKt {
- method @Deprecated public static suspend inline <R> Object? awaitFrameMillis(androidx.compose.runtime.CompositionFrameClock, kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R> p);
- method @Deprecated public static suspend Object? awaitFrameMillis(androidx.compose.runtime.CompositionFrameClock, kotlin.coroutines.Continuation<? super java.lang.Long> p);
- method @Deprecated public static suspend Object? awaitFrameNanos(androidx.compose.runtime.CompositionFrameClock, kotlin.coroutines.Continuation<? super java.lang.Long> p);
- method @Deprecated public static suspend inline <R> Object? withFrameMillis(androidx.compose.runtime.CompositionFrameClock, kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R> p);
- }
-
public final class CompositionKt {
method @androidx.compose.runtime.ExperimentalComposeApi public static androidx.compose.runtime.Composition compositionFor(Object key, androidx.compose.runtime.Applier<?> applier, androidx.compose.runtime.CompositionReference parent, optional kotlin.jvm.functions.Function0<kotlin.Unit> onCreated);
}
@@ -216,10 +205,6 @@
method @androidx.compose.runtime.Composable public static <V1, V2> void onCommit(V1? v1, V2? v2, kotlin.jvm.functions.Function1<? super androidx.compose.runtime.CommitScope,kotlin.Unit> callback);
method @androidx.compose.runtime.Composable public static void onCommit(Object![]? inputs, kotlin.jvm.functions.Function1<? super androidx.compose.runtime.CommitScope,kotlin.Unit> callback);
method @androidx.compose.runtime.Composable public static void onDispose(kotlin.jvm.functions.Function0<kotlin.Unit> callback);
- method @Deprecated @androidx.compose.runtime.Composable public static inline void onPreCommit(kotlin.jvm.functions.Function1<? super androidx.compose.runtime.CommitScope,kotlin.Unit> callback);
- method @Deprecated @androidx.compose.runtime.Composable public static <V1> void onPreCommit(V1? v1, kotlin.jvm.functions.Function1<? super androidx.compose.runtime.CommitScope,kotlin.Unit> callback);
- method @Deprecated @androidx.compose.runtime.Composable public static <V1, V2> void onPreCommit(V1? v1, V2? v2, kotlin.jvm.functions.Function1<? super androidx.compose.runtime.CommitScope,kotlin.Unit> callback);
- method @Deprecated @androidx.compose.runtime.Composable public static void onPreCommit(Object![]? inputs, kotlin.jvm.functions.Function1<? super androidx.compose.runtime.CommitScope,kotlin.Unit> callback);
}
public interface EmbeddingContext {
@@ -292,9 +277,6 @@
}
public final class MutableStateKt {
- method @Deprecated public static kotlin.jvm.functions.Function2<java.lang.Object,java.lang.Object,java.lang.Boolean> getNeverEqual();
- method @Deprecated public static kotlin.jvm.functions.Function2<java.lang.Object,java.lang.Object,java.lang.Boolean> getReferentiallyEqual();
- method @Deprecated public static kotlin.jvm.functions.Function2<java.lang.Object,java.lang.Object,java.lang.Boolean> getStructurallyEqual();
method public static inline operator <T> T! getValue(androidx.compose.runtime.State<T>, Object? thisObj, kotlin.reflect.KProperty<?> property);
method public static <T> androidx.compose.runtime.snapshots.SnapshotStateList<T> mutableStateListOf();
method public static <T> androidx.compose.runtime.snapshots.SnapshotStateList<T> mutableStateListOf(T?... elements);
@@ -304,10 +286,6 @@
method public static <T> androidx.compose.runtime.SnapshotMutationPolicy<T> neverEqualPolicy();
method public static <T> androidx.compose.runtime.SnapshotMutationPolicy<T> referentialEqualityPolicy();
method public static inline operator <T> void setValue(androidx.compose.runtime.MutableState<T>, Object? thisObj, kotlin.reflect.KProperty<?> property, T? value);
- method @Deprecated @androidx.compose.runtime.Composable public static inline <T> androidx.compose.runtime.MutableState<T> state(optional androidx.compose.runtime.SnapshotMutationPolicy<T> policy, kotlin.jvm.functions.Function0<? extends T> init);
- method @Deprecated @androidx.compose.runtime.Composable public static inline <T, V1> androidx.compose.runtime.MutableState<T> stateFor(V1? v1, kotlin.jvm.functions.Function0<? extends T> init);
- method @androidx.compose.runtime.Composable public static inline <T> androidx.compose.runtime.MutableState<T> stateFor(Object![]? inputs, kotlin.jvm.functions.Function0<? extends T> init);
- method @androidx.compose.runtime.Composable public static inline <T, reified V1, reified V2> androidx.compose.runtime.MutableState<T>! stateFor(V1? v1, V2? v2, kotlin.jvm.functions.Function0<? extends T> init);
method public static <T> androidx.compose.runtime.SnapshotMutationPolicy<T> structuralEqualityPolicy();
method public static <T> androidx.compose.runtime.snapshots.SnapshotStateList<T> toMutableStateList(java.util.Collection<? extends T>);
method public static <K, V> androidx.compose.runtime.snapshots.SnapshotStateMap<K,V> toMutableStateMap(Iterable<? extends kotlin.Pair<? extends K,? extends V>>);
@@ -694,141 +672,6 @@
}
-package androidx.compose.runtime.frames {
-
- @Deprecated public abstract class AbstractRecord implements androidx.compose.runtime.frames.Record {
- ctor @Deprecated public AbstractRecord();
- method @Deprecated public int getFrameId();
- method @Deprecated public androidx.compose.runtime.frames.Record? getNext();
- method @Deprecated public void setFrameId(int p);
- method @Deprecated public void setNext(androidx.compose.runtime.frames.Record? p);
- property public int frameId;
- property public androidx.compose.runtime.frames.Record? next;
- }
-
- public final class Frame {
- method public int getId();
- method public boolean getReadonly();
- method public boolean hasPendingChanges();
- property public final int id;
- property public final boolean readonly;
- }
-
- @Deprecated public final class FrameAborted extends java.lang.RuntimeException {
- ctor @Deprecated public FrameAborted(androidx.compose.runtime.frames.Frame frame);
- method @Deprecated public androidx.compose.runtime.frames.Frame getFrame();
- property public final androidx.compose.runtime.frames.Frame frame;
- }
-
- public final class FrameContainersKt {
- method @Deprecated public static <T> androidx.compose.runtime.frames.ModelList<T> modelListOf();
- method @Deprecated public static <T> androidx.compose.runtime.frames.ModelList<T> modelListOf(T? element);
- method @Deprecated public static <T> androidx.compose.runtime.frames.ModelList<T> modelListOf(T?... elements);
- method @Deprecated public static <K, V> androidx.compose.runtime.frames.ModelMap<K,V> modelMapOf();
- method @Deprecated public static <K, V> androidx.compose.runtime.frames.ModelMap<K,V> modelMapOf(kotlin.Pair<? extends K,? extends V>... pairs);
- }
-
- public final class FrameIdSetKt {
- }
-
- @Deprecated public interface Framed {
- method @Deprecated public androidx.compose.runtime.frames.Record getFirstFrameRecord();
- method @Deprecated public void prependFrameRecord(androidx.compose.runtime.frames.Record value);
- property public abstract androidx.compose.runtime.frames.Record firstFrameRecord;
- }
-
- public final class FramesKt {
- method @Deprecated public static void _created(androidx.compose.runtime.frames.Framed framed);
- method @Deprecated public static androidx.compose.runtime.frames.Record _readable(androidx.compose.runtime.frames.Record r, androidx.compose.runtime.frames.Framed framed);
- method @Deprecated public static androidx.compose.runtime.frames.Record _writable(androidx.compose.runtime.frames.Record r, androidx.compose.runtime.frames.Framed framed);
- method @Deprecated public static void abort();
- method @Deprecated public static void abort(androidx.compose.runtime.frames.Frame frame);
- method @Deprecated public static void abortHandler();
- method @Deprecated public static void abortHandler(androidx.compose.runtime.frames.Frame frame);
- method @Deprecated public static void commit();
- method @Deprecated public static void commit(androidx.compose.runtime.frames.Frame frame);
- method @Deprecated public static void commitHandler();
- method @kotlin.PublishedApi internal static <T extends androidx.compose.runtime.frames.Record> T current(T r, androidx.compose.runtime.frames.Frame frame);
- method @Deprecated public static androidx.compose.runtime.frames.Frame currentFrame();
- method @Deprecated public static boolean getInFrame();
- method @Deprecated public static void observeAllReads(kotlin.jvm.functions.Function1<java.lang.Object,kotlin.Unit> readObserver, kotlin.jvm.functions.Function0<kotlin.Unit> block);
- method @Deprecated public static void open(optional boolean readOnly);
- method @Deprecated public static void open(optional kotlin.jvm.functions.Function1<java.lang.Object,kotlin.Unit>? readObserver, optional kotlin.jvm.functions.Function2<java.lang.Object,? super java.lang.Boolean,kotlin.Unit>? writeObserver);
- method @Deprecated public static <T extends androidx.compose.runtime.frames.Record> T readable(T, androidx.compose.runtime.frames.Framed framed);
- method @Deprecated public static kotlin.jvm.functions.Function0<kotlin.Unit> registerCommitObserver(kotlin.jvm.functions.Function2<? super java.util.Set<?>,? super androidx.compose.runtime.frames.Frame,kotlin.Unit> observer);
- method @Deprecated public static void restore(androidx.compose.runtime.frames.Frame frame);
- method @Deprecated public static androidx.compose.runtime.frames.Frame suspend();
- method @Deprecated public static boolean wasModified(Object value);
- method @Deprecated public static inline <T extends androidx.compose.runtime.frames.Record> T withCurrent(T, kotlin.jvm.functions.Function1<? super T,kotlin.Unit> block);
- method @Deprecated public static <T extends androidx.compose.runtime.frames.Record> T writable(T, androidx.compose.runtime.frames.Framed framed);
- method @Deprecated public static <T extends androidx.compose.runtime.frames.Record> T writable(T, androidx.compose.runtime.frames.Framed framed, androidx.compose.runtime.frames.Frame frame);
- }
-
- @Deprecated public final class ModelList<T> implements androidx.compose.runtime.frames.Framed kotlin.jvm.internal.markers.KMutableList java.util.List<T> {
- ctor @Deprecated public ModelList();
- method @Deprecated public boolean add(T? element);
- method @Deprecated public void add(int index, T? element);
- method @Deprecated public boolean addAll(int index, java.util.Collection<? extends T> elements);
- method @Deprecated public boolean addAll(java.util.Collection<? extends T> elements);
- method @Deprecated public void clear();
- method @Deprecated public boolean contains(Object? element);
- method @Deprecated public boolean containsAll(java.util.Collection<?> elements);
- method @Deprecated public T! get(int index);
- method @Deprecated public androidx.compose.runtime.frames.Record getFirstFrameRecord();
- method @Deprecated public int getSize();
- method @Deprecated public int indexOf(Object? element);
- method @Deprecated public boolean isEmpty();
- method @Deprecated public java.util.Iterator<T> iterator();
- method @Deprecated public int lastIndexOf(Object? element);
- method @Deprecated public java.util.ListIterator<T> listIterator();
- method @Deprecated public java.util.ListIterator<T> listIterator(int index);
- method @Deprecated public void prependFrameRecord(androidx.compose.runtime.frames.Record value);
- method @Deprecated public boolean remove(Object? element);
- method @Deprecated public boolean removeAll(java.util.Collection<?> elements);
- method @Deprecated public T! removeAt(int index);
- method @Deprecated public boolean retainAll(java.util.Collection<?> elements);
- method @Deprecated public T! set(int index, T? element);
- method @Deprecated public java.util.List<T> subList(int fromIndex, int toIndex);
- property public androidx.compose.runtime.frames.Record firstFrameRecord;
- property public int size;
- }
-
- @Deprecated public final class ModelMap<K, V> implements androidx.compose.runtime.frames.Framed kotlin.jvm.internal.markers.KMutableMap java.util.Map<K,V> {
- ctor @Deprecated public ModelMap();
- method @Deprecated public void clear();
- method @Deprecated public boolean containsKey(Object? key);
- method @Deprecated public boolean containsValue(Object? value);
- method @Deprecated public V? get(Object? key);
- method @Deprecated public java.util.Set<java.util.Map.Entry<K,V>> getEntries();
- method @Deprecated public androidx.compose.runtime.frames.Record getFirstFrameRecord();
- method @Deprecated public java.util.Set<K> getKeys();
- method @Deprecated public int getSize();
- method @Deprecated public java.util.Collection<V> getValues();
- method @Deprecated public boolean isEmpty();
- method @Deprecated public void prependFrameRecord(androidx.compose.runtime.frames.Record value);
- method @Deprecated public V? put(K? key, V? value);
- method @Deprecated public void putAll(java.util.Map<? extends K,? extends V> from);
- method @Deprecated public V? remove(Object? key);
- property public java.util.Set<java.util.Map.Entry<K,V>> entries;
- property public androidx.compose.runtime.frames.Record firstFrameRecord;
- property public java.util.Set<K> keys;
- property public int size;
- property public java.util.Collection<V> values;
- }
-
- @Deprecated public interface Record {
- method @Deprecated public void assign(androidx.compose.runtime.frames.Record value);
- method @Deprecated public androidx.compose.runtime.frames.Record create();
- method @Deprecated public int getFrameId();
- method @Deprecated public androidx.compose.runtime.frames.Record? getNext();
- method @Deprecated public void setFrameId(int p);
- method @Deprecated public void setNext(androidx.compose.runtime.frames.Record? p);
- property public abstract int frameId;
- property public abstract androidx.compose.runtime.frames.Record? next;
- }
-
-}
-
package androidx.compose.runtime.internal {
@androidx.compose.runtime.ComposeCompilerApi @androidx.compose.runtime.Stable public final class ComposableLambda<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, R> implements kotlin.jvm.functions.Function10<P1,P2,P3,P4,P5,P6,P7,P8,androidx.compose.runtime.Composer<?>,java.lang.Integer,R> kotlin.jvm.functions.Function11<P1,P2,P3,P4,P5,P6,P7,P8,P9,androidx.compose.runtime.Composer<?>,java.lang.Integer,R> kotlin.jvm.functions.Function13<P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,androidx.compose.runtime.Composer<?>,java.lang.Integer,java.lang.Integer,R> kotlin.jvm.functions.Function14<P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,androidx.compose.runtime.Composer<?>,java.lang.Integer,java.lang.Integer,R> kotlin.jvm.functions.Function15<P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,androidx.compose.runtime.Composer<?>,java.lang.Integer,java.lang.Integer,R> kotlin.jvm.functions.Function16<P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,androidx.compose.runtime.Composer<?>,java.lang.Integer,java.lang.Integer,R> kotlin.jvm.functions.Function17<P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,androidx.compose.runtime.Composer<?>,java.lang.Integer,java.lang.Integer,R> kotlin.jvm.functions.Function18<P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,androidx.compose.runtime.Composer<?>,java.lang.Integer,java.lang.Integer,R> kotlin.jvm.functions.Function19<P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,androidx.compose.runtime.Composer<?>,java.lang.Integer,java.lang.Integer,R> kotlin.jvm.functions.Function2<androidx.compose.runtime.Composer<?>,java.lang.Integer,R> kotlin.jvm.functions.Function20<P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,androidx.compose.runtime.Composer<?>,java.lang.Integer,java.lang.Integer,R> kotlin.jvm.functions.Function21<P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,androidx.compose.runtime.Composer<?>,java.lang.Integer,java.lang.Integer,R> kotlin.jvm.functions.Function3<P1,androidx.compose.runtime.Composer<?>,java.lang.Integer,R> kotlin.jvm.functions.Function4<P1,P2,androidx.compose.runtime.Composer<?>,java.lang.Integer,R> kotlin.jvm.functions.Function5<P1,P2,P3,androidx.compose.runtime.Composer<?>,java.lang.Integer,R> kotlin.jvm.functions.Function6<P1,P2,P3,P4,androidx.compose.runtime.Composer<?>,java.lang.Integer,R> kotlin.jvm.functions.Function7<P1,P2,P3,P4,P5,androidx.compose.runtime.Composer<?>,java.lang.Integer,R> kotlin.jvm.functions.Function8<P1,P2,P3,P4,P5,P6,androidx.compose.runtime.Composer<?>,java.lang.Integer,R> kotlin.jvm.functions.Function9<P1,P2,P3,P4,P5,P6,P7,androidx.compose.runtime.Composer<?>,java.lang.Integer,R> {
diff --git a/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/CompositionFrameClock.kt b/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/CompositionFrameClock.kt
deleted file mode 100644
index afb5fe3..0000000
--- a/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/CompositionFrameClock.kt
+++ /dev/null
@@ -1,128 +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.
- */
-
-// TODO(b/158105080): make part of ComposeRuntime
-package androidx.compose.runtime
-
-import androidx.compose.runtime.dispatch.MonotonicFrameClock
-import androidx.compose.runtime.dispatch.withFrameMillis as withFrameMillisDispatch
-
-/**
- * Provides a time source for display frames for use in composition.
- * This may be used for matching timing with the refresh rate of a display
- * or otherwise synchronizing with a desired frame rate of composition updates.
- */
-@Deprecated("Moved and renamed to MonotonicFrameClock")
-interface CompositionFrameClock : MonotonicFrameClock {
- /**
- * Suspends until a new frame is requested, immediately invokes [onFrame] with the frame time
- * in nanoseconds in the calling context of frame dispatch, then resumes with the result from
- * [onFrame].
- *
- * `frameTimeNanos` should be used when calculating animation time deltas from frame to frame
- * as it may be normalized to the target time for the frame, not necessarily a direct,
- * "now" value.
- *
- * The time base of the value provided by [withFrameNanos] is implementation defined.
- * Time values provided are monotonically increasing; after a call to [withFrameNanos]
- * completes it must not provide the same value again for a subsequent call.
- */
- @Deprecated("renamed to withFrameNanos", ReplaceWith("withFrameNanos(onFrame)"))
- suspend fun <R> awaitFrameNanos(onFrame: (frameTimeNanos: Long) -> R): R =
- withFrameNanos(onFrame)
-}
-
-/**
- * Suspends until a new frame is requested, immediately invokes [onFrame] with the frame time
- * in nanoseconds in the calling context of frame dispatch, then resumes with the result from
- * [onFrame].
- *
- * `frameTimeNanos` should be used when calculating animation time deltas from frame to frame
- * as it may be normalized to the target time for the frame, not necessarily a direct,
- * "now" value.
- *
- * The time base of the value provided by [CompositionFrameClock.withFrameMillis] is
- * implementation defined. Time values provided are monotonically increasing; after a call to
- * [CompositionFrameClock.withFrameMillis] completes it must not provide the same value again for
- * a subsequent call.
- */
-@Deprecated(
- "CompositionFrameClock moved and renamed to MonotonicFrameClock",
- ReplaceWith(
- "withFrameMillis(onFrame)",
- "androidx.compose.runtime.dispatch.withFrameMillis"
- )
-)
-@Suppress("UnnecessaryLambdaCreation", "DEPRECATION")
-suspend inline fun <R> CompositionFrameClock.withFrameMillis(
- crossinline onFrame: (frameTimeMillis: Long) -> R
-): R = withFrameMillisDispatch(onFrame)
-
-/**
- * Suspends until a new frame is requested, immediately invokes [onFrame] with the frame time
- * in nanoseconds in the calling context of frame dispatch, then resumes with the result from
- * [onFrame].
- *
- * `frameTimeNanos` should be used when calculating animation time deltas from frame to frame
- * as it may be normalized to the target time for the frame, not necessarily a direct,
- * "now" value.
- *
- * The time base of the value provided by [awaitFrameNanos] is implementation defined.
- * Time values provided are monotonically increasing; after a call to [awaitFrameNanos]
- * completes it must not provide the same value again for a subsequent call.
- */
-@Suppress("DEPRECATION")
-@Deprecated(
- "renamed to withFrameMillis",
- ReplaceWith("withFrameMillis(onFrame)", "androidx.compose.runtime.withFrameMillis")
-)
-suspend inline fun <R> CompositionFrameClock.awaitFrameMillis(
- crossinline onFrame: (frameTimeMillis: Long) -> R
-): R = withFrameMillis(onFrame)
-
-/**
- * Suspends until a new frame is requested, returning the frame time in nanoseconds.
- * This value should be used when calculating animation time deltas from frame to frame
- * as it may be normalized to the target time for the frame, not necessarily a direct,
- * "now" value.
- *
- * The time base of the value returned by [awaitFrameNanos] is implementation defined.
- * Time values returned are monotonically increasing; after a call to [awaitFrameNanos]
- * returns it must not return the same value again for a subsequent call.
- */
-@Suppress("DEPRECATION")
-@Deprecated(
- "callers will resume after missing the frame on most dispatchers",
- ReplaceWith("withFrameNanos { it }")
-)
-suspend fun CompositionFrameClock.awaitFrameNanos(): Long = withFrameNanos { it }
-
-/**
- * Suspends until a new frame is requested, returning the frame time in milliseconds.
- * This value should be used when calculating animation time deltas from frame to frame
- * as it may be normalized to the target time for the frame, not necessarily a direct,
- * "now" value.
- *
- * The time base of the value returned by [awaitFrameMillis] is implementation defined.
- * Time values returned are monotonically increasing; after a call to [awaitFrameMillis]
- * returns it must not return the same value again for a subsequent call.
- */
-@Suppress("DEPRECATION")
-@Deprecated(
- "callers will resume after missing the frame on most dispatchers",
- ReplaceWith("withFrameMillis { it }", "androidx.compose.runtime.withFrameMillis")
-)
-suspend fun CompositionFrameClock.awaitFrameMillis(): Long = withFrameMillis { it }
diff --git a/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Effects.kt b/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Effects.kt
index 177c269..3782e00 100644
--- a/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Effects.kt
+++ b/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Effects.kt
@@ -173,96 +173,6 @@
}
/**
- * The onPreCommit effect is a lifecycle effect that will execute [callback] every time the composition commits,
- * but before those changes have been reflected on the screen. It is useful for executing code that needs to
- * update in response to a composition and it is critical that the previous results are never seen by the user.
- * If it is not critical, [onCommit] is recommended instead. The [callback] will get executed with a receiver scope that has an
- * [onDispose][CommitScope.onDispose] method which can be used to schedule a callback to schedule code that cleans up the code in the
- * callback.
- *
- * @param callback The lambda to be executed when the effect is committed to the composition.
- *
- * @see [onDispose]
- * @see [onActive]
- */
-@Suppress("NOTHING_TO_INLINE")
-@OptIn(ComposeCompilerApi::class)
-@Composable
-@Deprecated("onCommit now has onPreCommit's behavior", ReplaceWith("onCommit(callback)"))
-inline fun onPreCommit(noinline callback: CommitScope.() -> Unit) = onCommit(callback)
-
-/**
- * The onPreCommit effect is a lifecycle effect that will execute [callback] every time the inputs to the
- * effect have changed, but before those changes have been reflected on the screen. It is useful for executing
- * code that needs to update in response to a composition and it is critical that the previous results are
- * never seen by the user. If it is not critical, [onCommit] is recommended instead. The [callback] will get
- * executed with a receiver scope that has an [onDispose][CommitScope.onDispose] method which can be used to
- * schedule a callback to schedule code that cleans up the code in the callback.
- *
- * @param v1 The input which will be compared across compositions to determine if [callback] will get executed.
- * @param callback The lambda to be executed when the effect is committed to the composition.
- *
- * @see [onDispose]
- * @see [onCommit]
- * @see [onActive]
- */
-@Composable
-@Deprecated("onCommit now has onPreCommit's behavior", ReplaceWith("onCommit(v1, callback)"))
-/*inline*/ fun </*reified*/ V1> onPreCommit(
- v1: V1,
- /*noinline*/
- callback: CommitScope.() -> Unit
-) = onCommit(v1, callback)
-
-/**
- * The onPreCommit effect is a lifecycle effect that will execute [callback] every time the inputs to the
- * effect have changed, but before those changes have been reflected on the screen. It is useful for executing
- * code that needs to update in response to a composition and it is critical that the previous results are
- * never seen by the user. If it is not critical, [onCommit] is recommended instead. The [callback] will get
- * executed with a receiver scope that has an [onDispose][CommitScope.onDispose] method which can be used to
- * schedule a callback to schedule code that cleans up the code in the callback.
- *
- * @param v1 An input value which will be compared across compositions to determine if [callback] will get executed.
- * @param v2 An input value which will be compared across compositions to determine if [callback] will get executed.
- * @param callback The lambda to be executed when the effect is committed to the composition.
- *
- * @see [onDispose]
- * @see [onCommit]
- * @see [onActive]
- */
-@Composable
-@Deprecated("onCommit now has onPreCommit's behavior", ReplaceWith("onCommit(v1, v2, callback)"))
-/*inline*/ fun </*reified*/ V1, /*reified*/ V2> onPreCommit(
- v1: V1,
- v2: V2,
- /*noinline*/
- callback: CommitScope.() -> Unit
-) = onCommit(v1, v2, callback)
-
-/**
- * The onPreCommit effect is a lifecycle effect that will execute [callback] every time the inputs to the
- * effect have changed, but before those changes have been reflected on the screen. It is useful for executing
- * code that needs to update in response to a composition and it is critical that the previous results are
- * never seen by the user. If it is not critical, [onCommit] is recommended instead. The [callback] will get
- * executed with a receiver scope that has an [onDispose][CommitScope.onDispose] method which can be used to
- * schedule a callback to schedule code that cleans up the code in the callback.
- *
- * @param inputs A set of inputs which will be compared across compositions to determine if [callback] will get executed.
- * @param callback The lambda to be executed when the effect is committed to the composition.
- *
- * @see [onDispose]
- * @see [onCommit]
- * @see [onActive]
- */
-@Composable
-@Deprecated(
- "onCommit now has onPreCommit's behavior",
- ReplaceWith("onCommit(*inputs, callback = callback)")
-)
-fun onPreCommit(vararg inputs: Any?, callback: CommitScope.() -> Unit) =
- onCommit(*inputs, callback = callback)
-
-/**
* The model effect is an alias to the `memo` effect, but the semantics behind how it is used are different from
* memoization, so we provide new named functions for the different use cases.
*
diff --git a/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/MutableState.kt b/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/MutableState.kt
index 91dd85d..a700f18 100644
--- a/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/MutableState.kt
+++ b/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/MutableState.kt
@@ -29,148 +29,19 @@
import kotlin.reflect.KProperty
/**
- * A composable used to introduce a state value of type [T] into a composition.
- *
- * This is useful when you have a value that you would like to locally mutate and use in the
- * context of a composition. Since the returned [MutableState] instance implements snapshot
- * changes to the [MutableState.value] property will be automatically tracked in composition and
- * schedule a recompose.
- *
- * The [MutableState] class can be used several different ways. For example, the most basic way
- * is to store the returned state value into a local immutable variable, and then set the
- * [MutableState.value] property on it.
- *
- * @sample androidx.compose.runtime.samples.SimpleStateSample
- *
- * @sample androidx.compose.runtime.samples.stateSample
- *
- * In this example, `LoginScreen` is recomposed every time the username and password of the model
- * updates, keeping the UI synchronized with the state.
- *
- * Additionally, you can destructure the [MutableState] object into a value and a "setter" function.
- *
- * @sample androidx.compose.runtime.samples.DestructuredStateSample
- *
- * Finally, the [MutableState] instance can be used as a variable delegate to a local mutable
- * variable.
- *
- * @sample androidx.compose.runtime.samples.DelegatedStateSample
- *
- * @param policy a policy to control how changes are handled in mutable snapshots.
-
- * @return An instance of [MutableState] that wraps the value.
- *
- * @see [stateFor]
- * @see [remember]
- * @see [SnapshotMutationPolicy]
- */
-@Deprecated(
- "Replace with explicit use of remember {}",
- ReplaceWith("remember { mutableStateOf(init(), policy) }")
-)
-@Composable
-inline fun <T> state(
- policy: SnapshotMutationPolicy<T> = structuralEqualityPolicy(),
- init: @ComposableContract(preventCapture = true) () -> T
-) = remember { mutableStateOf(init(), policy) }
-
-/**
- * An effect to introduce a state value of type [T] into a composition that will last as long as
- * the input [v1] does not change.
- *
- * This is useful when you have a value that you would like to locally mutate and use in the
- * context of a composition, and its value is scoped to another value and you want it to be reset
- * every time the other value changes.
- *
- * The returned [MutableState] instance implements snapshot so that changes to the
- * [MutableState.value] property will be automatically tracked in composition and schedule a
- * recompose.
- *
- * @param v1 An input value that, when changed, will cause the state to reset and [init] to be rerun
- * @param init A factory function to create the initial value of this state
- * @return An instance of [MutableState] that wraps the value.
- *
- * @sample androidx.compose.runtime.samples.observeUserSample
- *
- * @see [state]
- * @see [remember]
- */
-@Deprecated(
- "Replace with explicit use of remember {}",
- ReplaceWith("remember(v1) { mutableStateOf(init()) }")
-)
-@Composable
-inline fun <T, /*reified*/ V1> stateFor(
- v1: V1,
- init: @ComposableContract(preventCapture = true) () -> T
-) = remember(v1) { mutableStateOf(init()) }
-
-/**
- * An effect to introduce a state value of type [T] into a composition that will last as long as
- * the inputs [v1] and [v2] do not change.
- *
- * This is useful when you have a value that you would like to locally mutate and use in the
- * context of a composition, and its value is scoped to another value and you want it to be reset
- * every time the other value changes.
- *
- * The returned [MutableState] instance implements snapshots such that changes to the
- * [MutableState.value] property will be automatically tracked in composition and schedule a
- * recompose.
- *
- * @param v1 An input value that, when changed, will cause the state to reset and [init] to be rerun
- * @param v2 An input value that, when changed, will cause the state to reset and [init] to be rerun
- * @param init A factory function to create the initial value of this state
- * @return An instance of [MutableState] that wraps the value.
- *
- * @see [state]
- * @see [remember]
- */
-@Composable
-inline fun <T, reified V1, reified V2> stateFor(
- v1: V1,
- v2: V2,
- init: @ComposableContract(preventCapture = true) () -> T
-) = remember(v1, v2) { mutableStateOf(init()) }
-
-/**
- * An effect to introduce a state value of type [T] into a composition that will last as long as
- * the inputs [inputs] do not change.
- *
- * This is useful when you have a value that you would like to locally mutate and use in the
- * context of a composition, and its value is scoped to another value and you want it to be reset
- * every time the other value changes.
- *
- * The returned [MutableState] instance implements snapshots so that changes to the
- * [MutableState.value] property will be automatically tracked in composition and schedule a
- * recompose.
- *
- * @param inputs A set of inputs such that, when any of them have changed, will cause the state
- * to reset and [init] to be rerun
- * @param init A factory function to create the initial value of this state
- * @return An instance of [MutableState] that wraps the value.
- *
- * @see [state]
- * @see [remember]
- */
-@Composable
-inline fun <T> stateFor(
- vararg inputs: Any?,
- init: @ComposableContract(preventCapture = true) () -> T
-) = remember(*inputs) { mutableStateOf(init()) }
-
-/**
* Return a new [MutableState] initialized with the passed in [value]
*
* The MutableState class is a single value holder whose reads and writes are observed by
* Compose. Additionally, writes to it are transacted as part of the [Snapshot] system.
- * During composition, you will likely want to use the [state] and [stateFor] composables instead
- * of this factory function.
*
* @param value the initial value for the [MutableState]
* @param policy a policy to controls how changes are handled in mutable snapshots.
*
- * @see state
- * @see stateFor
+ * @sample androidx.compose.runtime.samples.SimpleStateSample
+ * @sample androidx.compose.runtime.samples.DestructuredStateSample
+ * @sample androidx.compose.runtime.samples.observeUserSample
+ * @sample androidx.compose.runtime.samples.stateSample
+ *
* @see State
* @see MutableState
* @see SnapshotMutationPolicy
@@ -181,50 +52,9 @@
): MutableState<T> = SnapshotMutableState(value, policy)
/**
- * Simple comparison callback using referential `===` equality
- */
-@Deprecated(
- "areEquivalent callbacks have been replaced by MutableStateSnapshotPolicy",
- ReplaceWith(
- "referentialEqualityPolicy()",
- "androidx.compose.runtime.referentialEqualityPolicy"
- )
-)
-val ReferentiallyEqual = fun(old: Any?, new: Any?) = old === new
-
-/**
- * Simple comparison callback using structural [Any.equals] equality
- */
-@Deprecated(
- "areEquivalent callbacks have been replaced by MutableStateSnapshotPolicy",
- ReplaceWith(
- "structuralEqualityPolicy()",
- "androidx.compose.runtime.structuralEqualityPolicy"
- )
-)
-val StructurallyEqual = fun(old: Any?, new: Any?) = old == new
-
-/**
- * Simple comparison callback that always returns false, for mutable objects that will be
- * compared with the same reference.
- *
- * In this case we cannot correctly compare for equality, and so we trust that something else
- * correctly triggered a recomposition.
- */
-@Deprecated(
- "areEquivalent callbacks have been replaced by MutableStateSnapshotPolicy",
- ReplaceWith(
- "neverEqualPolicy()",
- "androidx.compose.runtime.neverEqualPolicy"
- )
-)
-val NeverEqual = fun(_: Any?, _: Any?) = false
-
-/**
* A value holder where reads to the [value] property during the execution of a [Composable]
* function, the current [RecomposeScope] will be subscribed to changes of that value.
*
- * @see [state]
* @see [MutableState]
* @see [mutableStateOf]
*/
@@ -248,7 +78,6 @@
* will be scheduled. If [value] is written to with the same value, no recompositions will be
* scheduled.
*
- * @see [state]
* @see [State]
* @see [mutableStateOf]
*/
@@ -279,8 +108,6 @@
* @property value the wrapped value
* @property policy a policy to control how changes are handled in a mutable snapshot.
*
- * @see state
- * @see stateFor
* @see mutableStateOf
* @see SnapshotMutationPolicy
*/
@@ -360,10 +187,10 @@
}
/**
- * A policy to control how the result of [mutableStateOf] and [state] report and merge changes to
+ * A policy to control how the result of [mutableStateOf] report and merge changes to
* the state object.
*
- * A mutation policy can be passed as an parameter to [state], [mutableStateOf], and [ambientOf].
+ * A mutation policy can be passed as an parameter to [mutableStateOf], and [ambientOf].
*
* Typically, one of the stock policies should be used such as [referentialEqualityPolicy],
* [structuralEqualityPolicy], or [neverEqualPolicy]. However, a custom mutation policy can be
diff --git a/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/frames/FrameContainers.kt b/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/frames/FrameContainers.kt
deleted file mode 100644
index 97776b1..0000000
--- a/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/frames/FrameContainers.kt
+++ /dev/null
@@ -1,286 +0,0 @@
-/*
- * 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.
- */
-
-@file:Suppress("DEPRECATION", "UNUSED_PARAMETER")
-
-package androidx.compose.runtime.frames
-
-import kotlin.jvm.JvmField
-
-@Deprecated(
- "Frames have been replaced by snapshots",
- ReplaceWith(
- "StableMutableList<T>",
- "androidx.compose.runtime.StableMutableList"
- )
-)
-class ModelList<T>
-@Deprecated(
- "Frames have been replaced by snapshots",
- ReplaceWith(
- "mutableStateListOf()",
- "androidx.compose.runtime.mutableStateListOf"
- )
-)
-constructor() : MutableList<T>, Framed {
- private var myFirst: Record =
- ArrayContainer<T>()
- override val firstFrameRecord: Record get() = myFirst
-
- override fun prependFrameRecord(value: Record) {
- value.next = myFirst
- myFirst = value
- }
-
- @Suppress("UNCHECKED_CAST") private val readable: ArrayContainer<T>
- get() = deprecated()
- @Suppress("UNCHECKED_CAST") private val writable: ArrayContainer<T>
- get() = deprecated()
-
- override val size: Int get() = readable.list.size
- override fun add(element: T): Boolean = writable.list.add(element)
- override fun add(index: Int, element: T) = writable.list.add(index, element)
- override fun addAll(index: Int, elements: Collection<T>): Boolean =
- writable.list.addAll(index, elements)
- override fun addAll(elements: Collection<T>): Boolean = writable.list.addAll(elements)
- override fun clear() = writable.list.clear()
- override fun contains(element: T): Boolean = readable.list.contains(element)
- override fun containsAll(elements: Collection<T>): Boolean = readable.list.containsAll(elements)
- override fun get(index: Int): T = readable.list.get(index)
- override fun indexOf(element: T): Int = readable.list.indexOf(element)
- override fun isEmpty(): Boolean = readable.list.isEmpty()
- override fun iterator(): MutableIterator<T> = ModelListIterator(this, 0)
- override fun lastIndexOf(element: T): Int = readable.list.lastIndexOf(element)
- override fun listIterator(): MutableListIterator<T> = ModelListIterator(this, 0)
- override fun listIterator(index: Int): MutableListIterator<T> = ModelListIterator(this, index)
- override fun remove(element: T): Boolean = writable.list.remove(element)
- override fun removeAll(elements: Collection<T>): Boolean = writable.list.removeAll(elements)
- override fun removeAt(index: Int): T = writable.list.removeAt(index)
- override fun retainAll(elements: Collection<T>): Boolean = writable.list.retainAll(elements)
- override fun set(index: Int, element: T): T = writable.list.set(index, element)
- override fun subList(fromIndex: Int, toIndex: Int): MutableList<T> =
- writable.list.subList(fromIndex, toIndex)
-
- private class ArrayContainer<T> : AbstractRecord() {
- @JvmField
- var list: ArrayList<T> = arrayListOf<T>()
-
- override fun assign(value: Record) {
- @Suppress("UNCHECKED_CAST")
- (value as? ArrayContainer<T>)?.let {
- this.list = it.list.toMutableList() as ArrayList<T>
- }
- }
-
- override fun create() = ArrayContainer<T>()
- }
-
- private class ModelListIterator<T>(val modelList: ModelList<T>, val index: Int) :
- MutableIterator<T>,
- MutableListIterator<T> {
-
- private var nextCount = 0
- private var readId: Int = deprecated()
- private var currentIterator = modelList.readable.list.listIterator(index)
-
- private fun ensureMutable(): ModelListIterator<T> = deprecated()
-
- override fun hasNext(): Boolean = currentIterator.hasNext()
- override fun next(): T = currentIterator.next().also { nextCount++ }
- override fun remove() = ensureMutable().currentIterator.remove()
- override fun hasPrevious(): Boolean = currentIterator.hasPrevious()
- override fun nextIndex(): Int = currentIterator.nextIndex().also { nextCount++ }
- override fun previous(): T = currentIterator.previous().also { nextCount-- }
- override fun previousIndex(): Int = currentIterator.previousIndex().also { nextCount-- }
- override fun add(element: T) = ensureMutable().currentIterator.add(element)
- override fun set(element: T) = ensureMutable().currentIterator.set(element)
- }
-}
-
-@Deprecated(
- "Frames have been replaced by snapshots",
- ReplaceWith(
- "mutableStateListOf()",
- "androidx.compose.runtime.mutableStateListOf"
- ),
- DeprecationLevel.ERROR
-)
-fun <T> modelListOf(): ModelList<T> = deprecated()
-
-@Deprecated(
- "Frames have been replaced by snapshots",
- ReplaceWith(
- "mutableStateListOf(element)",
- "androidx.compose.runtime.mutableStateListOf"
- ),
- DeprecationLevel.ERROR
-)
-fun <T> modelListOf(element: T) = ModelList<T>().apply { add(element) }
-
-@Deprecated(
- "Frames have been replaced by snapshots",
- ReplaceWith(
- "mutableStateListOf(*elements)",
- "androidx.compose.runtime.mutableStateListOf"
- ),
- DeprecationLevel.ERROR
-)
-fun <T> modelListOf(vararg elements: T) = ModelList<T>().apply { addAll(elements) }
-
-@Deprecated(
- "Frames have been replaced by snapshots",
- ReplaceWith(
- "StableMutableMap<K, V>",
- "androidx.compose.runtime.StableMutableMap"
- )
-)
-class ModelMap<K, V>
-@Deprecated(
- "Frames have been replaced by snapshots",
- ReplaceWith(
- "mutableStateMapOf()",
- "androidx.compose.runtime.StableMutableMap"
- )
-)
-constructor() : MutableMap<K, V>, Framed {
- private var myFirst: Record =
- MapContainer<K, V>()
- override val firstFrameRecord: Record get() = myFirst
-
- override fun prependFrameRecord(value: Record) {
- value.next = myFirst
- myFirst = value
- }
-
- @Suppress("UNCHECKED_CAST")
- private val readable: MapContainer<K, V>
- get() = deprecated()
- @Suppress("UNCHECKED_CAST")
- private val writable: MapContainer<K, V>
- get() = deprecated()
-
- override val size: Int get() = readable.map.size
- override fun containsKey(key: K): Boolean = readable.map.containsKey(key)
- override fun containsValue(value: V): Boolean = readable.map.containsValue(value)
- override fun get(key: K): V? = readable.map.get(key)
- override fun isEmpty(): Boolean = readable.map.isEmpty()
-
- override val entries: MutableSet<MutableMap.MutableEntry<K, V>>
- get() = immutableSet(readable.map.entries)
- override val keys: MutableSet<K>
- get() = immutableSet(readable.map.keys)
- override val values: MutableCollection<V>
- get() = immutableCollection(readable.map.values)
-
- override fun clear() = writable.map.clear()
-
- override fun put(key: K, value: V): V? = writable.map.put(key, value)
- override fun putAll(from: Map<out K, V>) = writable.map.putAll(from)
- override fun remove(key: K): V? = writable.map.remove(key)
-
- private class MapContainer<K, V> : AbstractRecord() {
- @JvmField var map = mutableMapOf<K, V>()
-
- override fun assign(value: Record) {
- @Suppress("UNCHECKED_CAST")
- (value as? MapContainer<K, V>)?.let {
- this.map = LinkedHashMap<K, V>(it.map)
- }
- }
-
- override fun create() = MapContainer<K, V>()
- }
-}
-
-@Deprecated(
- "Frames have been replaced by snapshots",
- ReplaceWith(
- "mutableStateMapOf()",
- "androidx.compose.runtime.mutableStateMapOf"
- ),
- DeprecationLevel.ERROR
-)
-fun <K, V> modelMapOf(): ModelMap<K, V> = deprecated()
-
-@Deprecated(
- "Frames have been replaced by snapshots",
- ReplaceWith(
- "mutableStateMapOf(*pairs)",
- "androidx.compose.runtime.mutableStateMapOf"
- ),
- DeprecationLevel.ERROR
-)
-fun <K, V> modelMapOf(vararg pairs: Pair<K, V>): ModelMap<K, V> = deprecated()
-
-private fun error(): Nothing =
- error("Model sub-collection, iterators, lists and sets are immutable, use asMutable() first")
-
-private class ImmutableSetImpl<T>(
- private val set: MutableSet<T>
-) : MutableSet<T> by set {
- override fun add(element: T): Boolean = error()
- override fun addAll(elements: Collection<T>): Boolean = error()
- override fun clear() = error()
- override fun iterator(): MutableIterator<T> =
- immutableIterator(set.iterator())
- override fun remove(element: T): Boolean = error()
- override fun removeAll(elements: Collection<T>): Boolean = error()
- override fun retainAll(elements: Collection<T>): Boolean = error()
-}
-
-private fun <T> immutableSet(set: MutableSet<T>): MutableSet<T> = ImmutableSetImpl(set)
-
-private class ImmutableIteratorImpl<T>(
- private val iterator: MutableIterator<T>
-) : MutableIterator<T> by iterator {
- override fun remove() = error()
-}
-
-// TODO delete the explicit type after https://youtrack.jetbrains.com/issue/KT-20996
-private fun <T> immutableIterator(
- iterator: MutableIterator<T>
-): MutableIterator<T> = ImmutableIteratorImpl(iterator)
-
-private class ImmutableListIteratorImpl<T>(
- private val iterator: MutableListIterator<T>
-) : MutableListIterator<T> by iterator {
- override fun add(element: T) = error()
- override fun remove() = error()
- override fun set(element: T) = error()
-}
-
-// TODO delete the explicit type after https://youtrack.jetbrains.com/issue/KT-20996
-private fun <T> immutableListIterator(
- iterator: MutableListIterator<T>
-): MutableListIterator<T> = ImmutableListIteratorImpl(iterator)
-
-private class ImmutableCollectionImpl<T>(
- private val collection: MutableCollection<T>
-) : MutableCollection<T> by collection {
- override fun add(element: T): Boolean = error()
- override fun addAll(elements: Collection<T>): Boolean = error()
- override fun clear() = error()
- override fun iterator(): MutableIterator<T> =
- immutableIterator(collection.iterator())
- override fun remove(element: T): Boolean = error()
- override fun removeAll(elements: Collection<T>): Boolean = error()
- override fun retainAll(elements: Collection<T>): Boolean = error()
-}
-
-// TODO delete the explicit type after https://youtrack.jetbrains.com/issue/KT-20996
-private fun <T> immutableCollection(
- collection: MutableCollection<T>
-): MutableCollection<T> = ImmutableCollectionImpl(collection)
diff --git a/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/frames/FrameIdSet.kt b/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/frames/FrameIdSet.kt
deleted file mode 100644
index 7c1fed0..0000000
--- a/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/frames/FrameIdSet.kt
+++ /dev/null
@@ -1,245 +0,0 @@
-/*
- * 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.runtime.frames
-
-import androidx.compose.runtime.Immutable
-
-/**
- * An implementation of a bit set that that is optimized around for the top 128 bits and
- * sparse access for bits below that. Is is O(1) to set, clear and get the bit value of the top 128
- * values of the set. Below lowerBound it is O(log N) to get a bit and O(N) to set or clear a bit
- * where N is the number of bits set below lowerBound. Clearing a cleared bit or setting a set bit
- * is the same complexity of get.
- *
- * The set is immutable and calling the set or clear methods produce the modified set, leaving the
- * previous set unmodified. If the operation does not modify the set, such as setting a set bit or
- * clearing a clear bit, returns the same instance.
- *
- * This class is highly biased to a bits being set at the top 128 values of the range and bits lower
- * than the that range to be mostly or completely clear.
- *
- * This class does not implement equals intentionally. Equals is hard and expensive as a normal form
- * for a particular set is not guaranteed (that is, two sets that compare equal might have
- * different field values). As Frames does not need this, it is not implemented.
- */
-@Immutable
-internal class FrameIdSet private constructor(
- // Bit set from (lowerBound + 64)-(lowerBound+127) of the set
- private val upperSet: Long,
- // Bit set from (lowerBound)-(lowerBound+63) of the set
- private val lowerSet: Long,
- // Lower bound of the bit set. All values above lowerBound+127 are clear.
- // Values between lowerBound and lowerBound+127 are recorded in lowerSet and upperSet
- private val lowerBound: Int,
- // A sorted array of the index of bits set below lowerBound
- private val belowBound: IntArray?
-) {
-
- /**
- * The the value of the bit at index [bit]
- */
- fun get(bit: Int): Boolean {
- val offset = bit - lowerBound
- if (offset >= 0 && offset < Long.SIZE_BITS) {
- return (1L shl offset) and lowerSet != 0L
- } else if (offset >= Long.SIZE_BITS && offset < Long.SIZE_BITS * 2) {
- return (1L shl (offset - Long.SIZE_BITS)) and upperSet != 0L
- } else if (offset > 0) {
- return false
- } else return belowBound?.let {
- it.binarySearch(bit) >= 0
- } ?: false
- }
-
- /**
- * Produce a copy of this set with the addition of the bit at index [bit] set.
- */
- fun set(bit: Int): FrameIdSet {
- val offset = bit - lowerBound
- if (offset >= 0 && offset < Long.SIZE_BITS) {
- val mask = 1L shl offset
- if (lowerSet and mask == 0L) {
- return FrameIdSet(
- upperSet = upperSet,
- lowerSet = lowerSet or mask,
- lowerBound = lowerBound,
- belowBound = belowBound
- )
- }
- } else if (offset >= Long.SIZE_BITS && offset < Long.SIZE_BITS * 2) {
- val mask = 1L shl (offset - Long.SIZE_BITS)
- if (upperSet and mask == 0L) {
- return FrameIdSet(
- upperSet = upperSet or mask,
- lowerSet = lowerSet,
- lowerBound = lowerBound,
- belowBound = belowBound
- )
- }
- } else if (offset >= Long.SIZE_BITS * 2) {
- if (!get(bit)) {
- // Shift the bit array down
- var newUpperSet = upperSet
- var newLowerSet = lowerSet
- var newLowerBound = lowerBound
- var newBelowBound: MutableList<Int>? = null
- val targetLowerBound = (bit + 1) / Long.SIZE_BITS * Long.SIZE_BITS
- while (newLowerBound < targetLowerBound) {
- // Shift the lower set into the array
- if (newLowerSet != 0L) {
- if (newBelowBound == null)
- newBelowBound = mutableListOf<Int>().apply {
- belowBound?.let {
- it.forEach { this.add(it) }
- }
- }
- repeat(Long.SIZE_BITS) { bitOffset ->
- if (newLowerSet and (1L shl bitOffset) != 0L) {
- newBelowBound.add(bitOffset + newLowerBound)
- }
- }
- }
- if (newUpperSet == 0L) {
- newLowerBound = targetLowerBound
- newLowerSet = 0L
- break
- }
- newLowerSet = newUpperSet
- newUpperSet = 0
- newLowerBound += Long.SIZE_BITS
- }
-
- return FrameIdSet(
- newUpperSet,
- newLowerSet,
- newLowerBound,
- newBelowBound?.toIntArray() ?: belowBound
- ).set(bit)
- }
- } else {
- val array = belowBound
- ?: return FrameIdSet(upperSet, lowerSet, lowerBound, intArrayOf(bit))
-
- val location = array.binarySearch(bit)
- if (location < 0) {
- val insertLocation = -(location + 1)
- val newSize = array.size + 1
- val newBelowBound = IntArray(newSize)
- array.copyInto(
- destination = newBelowBound,
- destinationOffset = 0,
- startIndex = 0,
- endIndex = insertLocation
- )
- array.copyInto(
- destination = newBelowBound,
- destinationOffset = insertLocation + 1,
- startIndex = insertLocation,
- endIndex = newSize - 1
- )
- newBelowBound[insertLocation] = bit
- return FrameIdSet(upperSet, lowerSet, lowerBound, newBelowBound)
- }
- }
-
- // No changes
- return this
- }
-
- /**
- * Produce a copy of this set with the addition of the bit at index [bit] cleared.
- */
- fun clear(bit: Int): FrameIdSet {
- val offset = bit - lowerBound
- if (offset >= 0 && offset < Long.SIZE_BITS) {
- val mask = 1L shl offset
- if (lowerSet and mask != 0L) {
- return FrameIdSet(
- upperSet = upperSet,
- lowerSet = lowerSet and mask.inv(),
- lowerBound = lowerBound,
- belowBound = belowBound
- )
- }
- } else if (offset >= Long.SIZE_BITS && offset < Long.SIZE_BITS * 2) {
- val mask = 1L shl (offset - Long.SIZE_BITS)
- if (upperSet and mask != 0L) {
- return FrameIdSet(
- upperSet = upperSet and mask.inv(),
- lowerSet = lowerSet,
- lowerBound = lowerBound,
- belowBound = belowBound
- )
- }
- } else if (offset < 0) {
- val array = belowBound
- if (array != null) {
- val location = array.binarySearch(bit)
- if (location >= 0) {
- val newSize = array.size - 1
- if (newSize == 0) {
- return FrameIdSet(upperSet, lowerSet, lowerBound, null)
- }
- val newBelowBound = IntArray(newSize)
- if (location > 0) {
- array.copyInto(
- destination = newBelowBound,
- destinationOffset = 0,
- startIndex = 0,
- endIndex = location
- )
- }
- if (location < newSize) {
- array.copyInto(
- destination = newBelowBound,
- destinationOffset = location,
- startIndex = location + 1,
- endIndex = newSize + 1
- )
- }
- return FrameIdSet(upperSet, lowerSet, lowerBound, newBelowBound)
- }
- }
- }
-
- return this
- }
-
- companion object {
- /**
- * An empty frame it set
- */
- val EMPTY = FrameIdSet(0, 0, 0, null)
- }
-}
-
-internal fun IntArray.binarySearch(value: Int): Int {
- var low = 0
- var high = size - 1
-
- while (low <= high) {
- val mid = (low + high).ushr(1)
- val midVal = get(mid)
- if (value > midVal)
- low = mid + 1
- else if (value < midVal)
- high = mid - 1
- else
- return mid
- }
- return -(low + 1)
-}
diff --git a/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/frames/Frames.kt b/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/frames/Frames.kt
deleted file mode 100644
index 9d1a51f..0000000
--- a/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/frames/Frames.kt
+++ /dev/null
@@ -1,404 +0,0 @@
-/*
- * 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.
- */
-
-@file:Suppress("DEPRECATION", "UNUSED_PARAMETER")
-
-package androidx.compose.runtime.frames
-
-@Deprecated(
- "Frames has been replaced by snapshots",
- ReplaceWith(
- "SnapshotApplyConflictException",
- "androidx.compose.runtime.snapshots.SnapshotApplyConflictException"
- ),
- DeprecationLevel.ERROR
-)
-class FrameAborted(val frame: Frame) : RuntimeException("Frame aborted")
-
-/**
- * Base implementation of a frame record
- */
-@Deprecated(
- "Frames has been replaced by snapshots",
- ReplaceWith(
- "StateRecord",
- "androidx.compose.runtime.snapshots.StateRecord"
- )
-)
-abstract class AbstractRecord : Record {
- override var frameId: Int = deprecated()
- override var next: Record? = null
-}
-
-/**
- * Frame local values of a framed object.
- */
-@Deprecated(
- "Frames has been replaced by snapshots",
- ReplaceWith(
- "StateRecord",
- "androidx.compose.runtime.snapshots.StateRecord"
- )
-)
-interface Record {
- /**
- * The frame id of the frame in which the record was created.
- */
- var frameId: Int
-
- /**
- * Reference of the next frame record. Frame records are stored in a linked list.
- */
- var next: Record?
-
- /**
- * Copy the value into this frame record from another for the same framed object.
- */
- fun assign(value: Record)
-
- /**
- * Create a new frame record for the same framed object.
- */
- fun create(): Record
-}
-
-/**
- * Interface implemented by all model objects. Used by this module to maintain the state records
- * of a model object.
- */
-@Deprecated(
- "Frames has been replaced by snapshots",
- ReplaceWith(
- "StateObject",
- "androidx.compose.runtime.snapshots.StateObject"
- )
-)
-interface Framed {
- /**
- * The first state record in a linked list of state records.
- */
- val firstFrameRecord: Record
-
- /**
- * Add a new state record to the beginning of a list. After this call [firstFrameRecord] should
- * be [value].
- */
- fun prependFrameRecord(value: Record)
-}
-
-typealias FrameReadObserver = (read: Any) -> Unit
-typealias FrameWriteObserver = (write: Any, isNew: Boolean) -> Unit
-typealias FrameCommitObserver = (committed: Set<Any>, frame: Frame) -> Unit
-
-/**
- * Information about a frame including the frame id and whether or not it is read only.
- */
-class Frame internal constructor(
- /**
- * The id of the frame. This value is monotonically increasing for each frame created.
- */
- val id: Int,
-
- /**
- * A set of all the frames that should be treated as invalid. That is the set of all frames open
- * or aborted.
- */
- internal val invalid: FrameIdSet,
-
- /**
- * True if the frame is read only
- */
- readOnly: Boolean,
-
- /**
- * Observe a frame read
- */
- internal val readObserver: FrameReadObserver?,
-
- /**
- * Observe a frame write
- */
- internal val writeObserver: FrameWriteObserver?
-) {
- internal val modified = if (readOnly) null else HashSet<Framed>()
-
- /**
- * True if any change to a frame object will throw.
- */
- val readonly: Boolean
- get() = modified == null
-
- /**
- * Whether there are any pending changes in this frame.
- */
- fun hasPendingChanges(): Boolean = (modified?.size ?: 0) > 0
-}
-
-/**
- * [FrameReadObserver] will be called for every frame read happened on the current
- * thread during execution of the [block].
- */
-@Deprecated(
- "Frames has been replaced by snapshots",
- ReplaceWith(
- "Snapshot.observe(readObserver, null, block)",
- "androidx.compose.runtime.snapshots.Snapshot"
- )
-)
-fun observeAllReads(readObserver: FrameReadObserver, block: () -> Unit): Unit = deprecated()
-
-/**
- * Return the thread's active frame. This will throw if no frame is active for the thread.
- */
-@Deprecated(
- "Frames has been replaced by snapshots",
- ReplaceWith(
- "Snapshot.current",
- "androidx.compose.runtime.snapshots.Snapshot"
- ),
- DeprecationLevel.ERROR
-)
-fun currentFrame(): Frame = deprecated()
-
-@Deprecated(
- "Frames has been replaced by snapshots. There is no equivalent with snapshots, it is" +
- " always valid to read and write to a state object.",
- level = DeprecationLevel.ERROR
-)
-val inFrame: Boolean get(): Boolean = deprecated()
-
-/**
- * Open a frame
- *
- * @param readOnly true if the frame can only be read from
- * @return the newly created frame's data
- */
-@Deprecated(
- "Frames has been replaced by snapshots",
- ReplaceWith(
- "takeMutableSnapshot()",
- "androidx.compose.runtime.snapshots.takeMutableSnapshot"
- ),
- DeprecationLevel.ERROR
-)
-fun open(readOnly: Boolean = false): Unit = deprecated()
-
-/**
- * Open a frame with observers
- */
-@Deprecated(
- "Frames has been replaced by snapshots",
- ReplaceWith(
- "takeMutableSnapshot(readObserver, writeObserver)",
- "androidx.compose.runtime.snapshots.takeMutableSnapshot"
- ),
- DeprecationLevel.ERROR
-)
-fun open(readObserver: FrameReadObserver? = null, writeObserver: FrameWriteObserver? = null) {
- deprecated()
-}
-
-/*
- * Commits the pending frame if there one is open. Intended to be used in a `finally` clause
- */
-@Deprecated(
- "Frames has been replaced by snapshots",
- ReplaceWith("snapshot.apply()"),
- DeprecationLevel.ERROR
-)
-fun commitHandler(): Unit = deprecated()
-
-/**
- * Commit the current pending frame. Throws FrameAborted if changes in the frame collides with the
- * current committed frame. Throws IllegalStateException no frame is open (use `commitHandler()` to
- * commit a frame if one is open).
- */
-@Deprecated(
- "Frames has been replaced by snapshots",
- ReplaceWith("snapshot.apply()"),
- DeprecationLevel.ERROR
-)
-fun commit(): Unit = deprecated()
-
-/**
- * Returns true if the given object framed object mutated in the the frame
- */
-@Deprecated(
- "Frames has been replaced by snapshots",
- level = DeprecationLevel.ERROR
-)
-fun wasModified(value: Any): Boolean = error("deprecated")
-
-@Deprecated(
- "Frames has been replaced by snapshots",
- ReplaceWith(
- "Snapshot.registerApplyObserver",
- "androidx.compose.runtime.snapshots.Snapshot"
- ),
- DeprecationLevel.ERROR
-)
-fun registerCommitObserver(observer: FrameCommitObserver): () -> Unit = deprecated()
-
-/**
- * Commit the given frame. Throws FrameAborted if changes in the frame collides with the current
- * committed frame.
- */
-@Deprecated(
- "Frames has been replaced by snapshots",
- ReplaceWith("frame.apply().check()"),
- DeprecationLevel.ERROR
-)
-fun commit(frame: Frame): Unit = error("deprecated")
-
-/**
- * Abort the current frame. Throws FrameAborted if a frame is open. Throws IllegalStateException if
- * no frame is open (use `abortHandler` to abort a frame without throwing an exception or to abort a
- * frame if one is open).
- */
-@Deprecated(
- "Frames has been replaced by snapshots",
- ReplaceWith("snapshot.dispose()"),
- DeprecationLevel.ERROR
-)
-fun abort(): Unit = deprecated()
-
-/**
- * Abort the given frame and throw a FrameAborted exception.
- */
-@Deprecated(
- "Frames has been replaced by snapshots",
- ReplaceWith("frame.dispose()"),
- DeprecationLevel.ERROR
-)
-fun abort(frame: Frame): Unit = deprecated()
-
-/**
- * Abort the current frame if one is open. This is intended to be used in a catch handler to abort
- * the frame and then rethrow the exception.
- */
-@Deprecated(
- "Frames has been replaced by snapshots",
- ReplaceWith("snapshot.dispose()"),
- DeprecationLevel.ERROR
-)
-fun abortHandler(): Unit = deprecated()
-
-/**
- * Abort the given frame.
- */
-@Deprecated(
- "Frames has been replaced by snapshots",
- ReplaceWith("frame.dispose()"),
- DeprecationLevel.ERROR
-)
-fun abortHandler(frame: Frame): Unit = deprecated()
-
-/**
- * Suspend the given frame. After calling suspend() the thread's no longer has an open frame. Call
- * `restore()` to restore a suspended thread.
- */
-@Deprecated(
- "Frames has been replaced by snapshots.",
- ReplaceWith(
- "Snapshot.global",
- "androidx.compose.runtime.snapshots.Snapshot"
- ),
- level = DeprecationLevel.ERROR
-)
-fun suspend(): Frame = error("deprecated")
-
-/**
- * Restore the given frame to the thread.
- */
-@Deprecated(
- "Frames has been replaced by snapshots.",
- ReplaceWith(
- "Snapshot.global",
- "androidx.compose.runtime.snapshots.Snapshot"
- ),
- level = DeprecationLevel.ERROR
-)
-fun restore(frame: Frame): Unit = deprecated()
-
-@Deprecated(
- "Frames has been replaced by snapshots.",
- ReplaceWith("readable"),
- level = DeprecationLevel.ERROR
-)
-fun <T : Record> T.readable(framed: Framed): T = error("deprecated")
-
-@Deprecated(
- "Frames has been replaced by snapshots.",
- level = DeprecationLevel.ERROR
-)
-fun _readable(r: Record, framed: Framed): Record = error("deprecated")
-
-@Deprecated(
- "Frames has been replaced by snapshots.",
- level = DeprecationLevel.ERROR
-)
-fun _writable(r: Record, framed: Framed): Record = error("deprecated")
-
-@Deprecated(
- "Frames has been replaced by snapshots.",
- level = DeprecationLevel.ERROR
-)
-fun _created(framed: Framed): Unit = error("deprecated")
-
-@Deprecated(
- "Frames has been replaced by snapshots.",
- ReplaceWith("writable"),
- level = DeprecationLevel.ERROR
-)
-fun <T : Record> T.writable(framed: Framed): T = deprecated()
-
-/**
- * Return a writable frame record for the given record. It is assumed that this is called for the
- * first framed record in a frame object. If the frame is read-only calling this will throw. A
- * record is writable if it was created in the current writable frame. A writable record will always
- * be the readable record (as all newer records are invalid it must be the newest valid record).
- * This means that if the readable record is not from the current frame, a new record must be
- * created. To create a new writable record, a record can be reused, if possible, and the readable
- * record is applied to it. If a record cannot be reused, a new record is created and the readable
- * record is applied to it. Once the values are correct the record is made live by giving it the
- * current frame id.
- */
-@Deprecated(
- "Frames has been replaced by snapshots.",
- ReplaceWith("writable"),
- level = DeprecationLevel.ERROR
-)
-fun <T : Record> T.writable(framed: Framed, frame: Frame): T = deprecated()
-
-/**
- * Returns the current record without notifying any [Frame.readObserver]s.
- */
-@PublishedApi
-internal fun <T : Record> current(r: T, frame: Frame): T = deprecated()
-
-/**
- * Provides a [block] with the current record, without notifying any [Frame.readObserver]s.
- *
- * @see [Record.readable]
- */
-@Deprecated(
- "Frames has been replaced by snapshots.",
- ReplaceWith("withCurrent"),
- level = DeprecationLevel.ERROR
-)
-inline fun <T : Record> T.withCurrent(block: (r: T) -> Unit): T = error("deprecated")
-
-internal fun deprecated(): Nothing = error("deprecated")
\ No newline at end of file
diff --git a/compose/test-utils/lint-baseline.xml b/compose/test-utils/lint-baseline.xml
index f07f740..e7b573b 100644
--- a/compose/test-utils/lint-baseline.xml
+++ b/compose/test-utils/lint-baseline.xml
@@ -19,7 +19,7 @@
errorLine2="~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/androidMain/kotlin/androidx/compose/testutils/AndroidComposeTestCaseRunner.kt"
- line="346"
+ line="348"
column="1"/>
</issue>
@@ -52,7 +52,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/androidMain/kotlin/androidx/compose/testutils/AndroidComposeTestCaseRunner.kt"
- line="275"
+ line="277"
column="29"/>
</issue>
@@ -63,7 +63,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="src/androidMain/kotlin/androidx/compose/testutils/AndroidComposeTestCaseRunner.kt"
- line="348"
+ line="350"
column="30"/>
</issue>
@@ -74,7 +74,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/androidMain/kotlin/androidx/compose/testutils/AndroidComposeTestCaseRunner.kt"
- line="351"
+ line="353"
column="20"/>
</issue>
@@ -85,7 +85,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="src/androidMain/kotlin/androidx/compose/testutils/AndroidComposeTestCaseRunner.kt"
- line="352"
+ line="354"
column="27"/>
</issue>
@@ -96,7 +96,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/androidMain/kotlin/androidx/compose/testutils/AndroidComposeTestCaseRunner.kt"
- line="356"
+ line="358"
column="20"/>
</issue>
diff --git a/compose/ui/ui-test/api/current.txt b/compose/ui/ui-test/api/current.txt
index c99f2e2..3071cae 100644
--- a/compose/ui/ui-test/api/current.txt
+++ b/compose/ui/ui-test/api/current.txt
@@ -121,6 +121,7 @@
public final class FindersKt {
method public static androidx.compose.ui.test.SemanticsNodeInteractionCollection onAllNodesWithLabel(androidx.compose.ui.test.SemanticsNodeInteractionsProvider, String label, optional boolean ignoreCase, optional boolean useUnmergedTree);
+ method public static androidx.compose.ui.test.SemanticsNodeInteractionCollection onAllNodesWithSubstring(androidx.compose.ui.test.SemanticsNodeInteractionsProvider, String text, optional boolean ignoreCase, optional boolean useUnmergedTree);
method public static androidx.compose.ui.test.SemanticsNodeInteractionCollection onAllNodesWithTag(androidx.compose.ui.test.SemanticsNodeInteractionsProvider, String testTag, optional boolean useUnmergedTree);
method public static androidx.compose.ui.test.SemanticsNodeInteractionCollection onAllNodesWithText(androidx.compose.ui.test.SemanticsNodeInteractionsProvider, String text, optional boolean ignoreCase, optional boolean useUnmergedTree);
method public static androidx.compose.ui.test.SemanticsNodeInteraction onNodeWithLabel(androidx.compose.ui.test.SemanticsNodeInteractionsProvider, String label, optional boolean ignoreCase, optional boolean useUnmergedTree);
@@ -276,6 +277,17 @@
public final class TestContext {
}
+ @kotlinx.coroutines.ExperimentalCoroutinesApi public final class TestMonotonicFrameClock implements androidx.compose.runtime.dispatch.MonotonicFrameClock {
+ ctor public TestMonotonicFrameClock(kotlinx.coroutines.CoroutineScope coroutineScope, kotlinx.coroutines.test.DelayController delayController, long frameDelayNanos);
+ method public long getFrameDelayNanos();
+ method public suspend <R> Object? withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R> p);
+ property public final long frameDelayNanos;
+ }
+
+ public final class TestMonotonicFrameClockKt {
+ method @kotlinx.coroutines.ExperimentalCoroutinesApi public static androidx.compose.ui.test.TestMonotonicFrameClock TestMonotonicFrameClock(kotlinx.coroutines.CoroutineScope coroutineScope, optional long frameDelayNanos);
+ }
+
@androidx.compose.ui.test.InternalTestingApi public interface TestOwner {
method public java.util.Set<androidx.compose.ui.node.Owner> getOwners();
method public <T> T! runOnUiThread(kotlin.jvm.functions.Function0<? extends T> action);
diff --git a/compose/ui/ui-test/api/public_plus_experimental_current.txt b/compose/ui/ui-test/api/public_plus_experimental_current.txt
index c99f2e2..3071cae 100644
--- a/compose/ui/ui-test/api/public_plus_experimental_current.txt
+++ b/compose/ui/ui-test/api/public_plus_experimental_current.txt
@@ -121,6 +121,7 @@
public final class FindersKt {
method public static androidx.compose.ui.test.SemanticsNodeInteractionCollection onAllNodesWithLabel(androidx.compose.ui.test.SemanticsNodeInteractionsProvider, String label, optional boolean ignoreCase, optional boolean useUnmergedTree);
+ method public static androidx.compose.ui.test.SemanticsNodeInteractionCollection onAllNodesWithSubstring(androidx.compose.ui.test.SemanticsNodeInteractionsProvider, String text, optional boolean ignoreCase, optional boolean useUnmergedTree);
method public static androidx.compose.ui.test.SemanticsNodeInteractionCollection onAllNodesWithTag(androidx.compose.ui.test.SemanticsNodeInteractionsProvider, String testTag, optional boolean useUnmergedTree);
method public static androidx.compose.ui.test.SemanticsNodeInteractionCollection onAllNodesWithText(androidx.compose.ui.test.SemanticsNodeInteractionsProvider, String text, optional boolean ignoreCase, optional boolean useUnmergedTree);
method public static androidx.compose.ui.test.SemanticsNodeInteraction onNodeWithLabel(androidx.compose.ui.test.SemanticsNodeInteractionsProvider, String label, optional boolean ignoreCase, optional boolean useUnmergedTree);
@@ -276,6 +277,17 @@
public final class TestContext {
}
+ @kotlinx.coroutines.ExperimentalCoroutinesApi public final class TestMonotonicFrameClock implements androidx.compose.runtime.dispatch.MonotonicFrameClock {
+ ctor public TestMonotonicFrameClock(kotlinx.coroutines.CoroutineScope coroutineScope, kotlinx.coroutines.test.DelayController delayController, long frameDelayNanos);
+ method public long getFrameDelayNanos();
+ method public suspend <R> Object? withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R> p);
+ property public final long frameDelayNanos;
+ }
+
+ public final class TestMonotonicFrameClockKt {
+ method @kotlinx.coroutines.ExperimentalCoroutinesApi public static androidx.compose.ui.test.TestMonotonicFrameClock TestMonotonicFrameClock(kotlinx.coroutines.CoroutineScope coroutineScope, optional long frameDelayNanos);
+ }
+
@androidx.compose.ui.test.InternalTestingApi public interface TestOwner {
method public java.util.Set<androidx.compose.ui.node.Owner> getOwners();
method public <T> T! runOnUiThread(kotlin.jvm.functions.Function0<? extends T> action);
diff --git a/compose/ui/ui-test/api/restricted_current.txt b/compose/ui/ui-test/api/restricted_current.txt
index c99f2e2..3071cae 100644
--- a/compose/ui/ui-test/api/restricted_current.txt
+++ b/compose/ui/ui-test/api/restricted_current.txt
@@ -121,6 +121,7 @@
public final class FindersKt {
method public static androidx.compose.ui.test.SemanticsNodeInteractionCollection onAllNodesWithLabel(androidx.compose.ui.test.SemanticsNodeInteractionsProvider, String label, optional boolean ignoreCase, optional boolean useUnmergedTree);
+ method public static androidx.compose.ui.test.SemanticsNodeInteractionCollection onAllNodesWithSubstring(androidx.compose.ui.test.SemanticsNodeInteractionsProvider, String text, optional boolean ignoreCase, optional boolean useUnmergedTree);
method public static androidx.compose.ui.test.SemanticsNodeInteractionCollection onAllNodesWithTag(androidx.compose.ui.test.SemanticsNodeInteractionsProvider, String testTag, optional boolean useUnmergedTree);
method public static androidx.compose.ui.test.SemanticsNodeInteractionCollection onAllNodesWithText(androidx.compose.ui.test.SemanticsNodeInteractionsProvider, String text, optional boolean ignoreCase, optional boolean useUnmergedTree);
method public static androidx.compose.ui.test.SemanticsNodeInteraction onNodeWithLabel(androidx.compose.ui.test.SemanticsNodeInteractionsProvider, String label, optional boolean ignoreCase, optional boolean useUnmergedTree);
@@ -276,6 +277,17 @@
public final class TestContext {
}
+ @kotlinx.coroutines.ExperimentalCoroutinesApi public final class TestMonotonicFrameClock implements androidx.compose.runtime.dispatch.MonotonicFrameClock {
+ ctor public TestMonotonicFrameClock(kotlinx.coroutines.CoroutineScope coroutineScope, kotlinx.coroutines.test.DelayController delayController, long frameDelayNanos);
+ method public long getFrameDelayNanos();
+ method public suspend <R> Object? withFrameNanos(kotlin.jvm.functions.Function1<? super java.lang.Long,? extends R> onFrame, kotlin.coroutines.Continuation<? super R> p);
+ property public final long frameDelayNanos;
+ }
+
+ public final class TestMonotonicFrameClockKt {
+ method @kotlinx.coroutines.ExperimentalCoroutinesApi public static androidx.compose.ui.test.TestMonotonicFrameClock TestMonotonicFrameClock(kotlinx.coroutines.CoroutineScope coroutineScope, optional long frameDelayNanos);
+ }
+
@androidx.compose.ui.test.InternalTestingApi public interface TestOwner {
method public java.util.Set<androidx.compose.ui.node.Owner> getOwners();
method public <T> T! runOnUiThread(kotlin.jvm.functions.Function0<? extends T> action);
diff --git a/compose/ui/ui-test/build.gradle b/compose/ui/ui-test/build.gradle
index 26e83a3..47e78fb 100644
--- a/compose/ui/ui-test/build.gradle
+++ b/compose/ui/ui-test/build.gradle
@@ -43,6 +43,7 @@
api project(":compose:ui:ui-unit")
api project(":compose:ui:ui-util")
api project(":compose:runtime:runtime")
+ api(KOTLIN_COROUTINES_TEST)
implementation(KOTLIN_STDLIB)
implementation(ESPRESSO_CORE)
@@ -84,6 +85,8 @@
api project(":compose:ui:ui-unit")
api project(":compose:ui:ui-util")
+ api(KOTLIN_COROUTINES_TEST)
+
implementation(KOTLIN_STDLIB_COMMON)
implementation project(":compose:runtime:runtime")
}
diff --git a/compose/ui/ui-test/src/androidAndroidTest/kotlin/androidx/compose/ui/test/FindersTest.kt b/compose/ui/ui-test/src/androidAndroidTest/kotlin/androidx/compose/ui/test/FindersTest.kt
index 22223d4..6537c45 100644
--- a/compose/ui/ui-test/src/androidAndroidTest/kotlin/androidx/compose/ui/test/FindersTest.kt
+++ b/compose/ui/ui-test/src/androidAndroidTest/kotlin/androidx/compose/ui/test/FindersTest.kt
@@ -125,6 +125,19 @@
}
}
+ @Test
+ fun findAllBySubstring() {
+ rule.setContent {
+ BoundaryNode { text = AnnotatedString("Hello World") }
+ BoundaryNode { text = AnnotatedString("Wello Horld") }
+ }
+
+ rule.onAllNodesWithSubstring("Yellow World").assertCountEquals(0)
+ rule.onAllNodesWithSubstring("Hello").assertCountEquals(1)
+ rule.onAllNodesWithSubstring("Wello").assertCountEquals(1)
+ rule.onAllNodesWithSubstring("ello").assertCountEquals(2)
+ }
+
@Composable
fun BoundaryNode(props: (SemanticsPropertyReceiver.() -> Unit)) {
Column(Modifier.semantics(properties = props)) {}
diff --git a/compose/ui/ui-test/src/androidAndroidTest/kotlin/androidx/compose/ui/test/TestMonotonicFrameClockTest.kt b/compose/ui/ui-test/src/androidAndroidTest/kotlin/androidx/compose/ui/test/TestMonotonicFrameClockTest.kt
new file mode 100644
index 0000000..b7dca95
--- /dev/null
+++ b/compose/ui/ui-test/src/androidAndroidTest/kotlin/androidx/compose/ui/test/TestMonotonicFrameClockTest.kt
@@ -0,0 +1,70 @@
+/*
+ * 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 androidx.compose.ui.test
+
+import androidx.compose.runtime.dispatch.withFrameNanos
+import androidx.test.filters.SmallTest
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.launch
+import kotlinx.coroutines.test.runBlockingTest
+import kotlinx.coroutines.withContext
+import org.junit.Assert.assertEquals
+import org.junit.Assert.fail
+import org.junit.Test
+
+@ExperimentalCoroutinesApi
+@SmallTest
+class TestMonotonicFrameClockTest {
+ @Test
+ fun testMonotonicFrameClockRunsFrame() = runBlockingTest {
+ val frameDelayNanos = 16_000_000L
+ withContext(TestMonotonicFrameClock(this, frameDelayNanos)) {
+ val startTime = currentTime
+ val expectedFrameTime = startTime + frameDelayNanos
+ val counter = TestCounter()
+ launch {
+ withFrameNanos {
+ counter.expect(2, "in frame callback 1")
+ assertEquals("frame time 1", expectedFrameTime, currentTime)
+ }
+ counter.expect(4, "after resuming frame callback 1")
+ }
+ launch {
+ withFrameNanos {
+ counter.expect(3, "in frame callback 2")
+ assertEquals("frame time 2", expectedFrameTime, currentTime)
+ }
+ counter.expect(5, "after resuming frame callback 2")
+ }
+ counter.expect(1)
+ advanceUntilIdle()
+ counter.expect(6, "final result")
+ }
+ }
+}
+
+private class TestCounter {
+ private var count = 0
+
+ fun expect(checkpoint: Int, message: String = "(no message)") {
+ val expected = count + 1
+ if (checkpoint != expected) {
+ fail("out of order event $checkpoint, expected $expected, $message")
+ }
+ count = expected
+ }
+}
diff --git a/compose/ui/ui-test/src/androidMain/kotlin/androidx/compose/ui/test/TestMonotonicFrameClock.kt b/compose/ui/ui-test/src/androidMain/kotlin/androidx/compose/ui/test/TestMonotonicFrameClock.kt
new file mode 100644
index 0000000..db40d45
--- /dev/null
+++ b/compose/ui/ui-test/src/androidMain/kotlin/androidx/compose/ui/test/TestMonotonicFrameClock.kt
@@ -0,0 +1,111 @@
+/*
+ * 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 androidx.compose.ui.test
+
+import androidx.compose.runtime.dispatch.MonotonicFrameClock
+import kotlinx.coroutines.CancellableContinuation
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.delay
+import kotlinx.coroutines.launch
+import kotlinx.coroutines.suspendCancellableCoroutine
+import kotlinx.coroutines.test.DelayController
+import kotlin.coroutines.ContinuationInterceptor
+
+private const val DefaultFrameDelay = 16_000_000L
+
+/**
+ * Construct a [TestMonotonicFrameClock] for [coroutineScope], obtaining the [DelayController]
+ * from the scope's [context][CoroutineScope.coroutineContext]. This frame clock may be used to
+ * consistently drive time under controlled tests.
+ *
+ * Calls to [TestMonotonicFrameClock.withFrameNanos] will schedule an upcoming frame
+ * [frameDelayNanos] nanoseconds in the future by launching into [coroutineScope] if such a frame
+ * has not yet been scheduled.
+ */
+@Suppress("MethodNameUnits") // Nanos for high-precision animation clocks
+@ExperimentalCoroutinesApi
+fun TestMonotonicFrameClock(
+ coroutineScope: CoroutineScope,
+ frameDelayNanos: Long = DefaultFrameDelay
+): TestMonotonicFrameClock = TestMonotonicFrameClock(
+ coroutineScope = coroutineScope,
+ delayController = coroutineScope.coroutineContext[ContinuationInterceptor].let { interceptor ->
+ requireNotNull(interceptor as? DelayController) {
+ "ContinuationInterceptor $interceptor of supplied scope must implement DelayController"
+ }
+ },
+ frameDelayNanos = frameDelayNanos
+)
+
+/**
+ * A [MonotonicFrameClock] with a time source controlled by a `kotlinx-coroutines-test`
+ * [DelayController]. This frame clock may be used to consistently drive time under controlled
+ * tests.
+ *
+ * Calls to [withFrameNanos] will schedule an upcoming frame [frameDelayNanos] nanoseconds in the
+ * future by launching into [coroutineScope] if such a frame has not yet been scheduled. The
+ * current frame time for [withFrameNanos] is provided by [delayController]. It is strongly
+ * suggested that [coroutineScope] contain the test dispatcher controlled by [delayController].
+ */
+@ExperimentalCoroutinesApi
+class TestMonotonicFrameClock(
+ private val coroutineScope: CoroutineScope,
+ private val delayController: DelayController,
+ @get:Suppress("MethodNameUnits") // Nanos for high-precision animation clocks
+ val frameDelayNanos: Long = DefaultFrameDelay
+) : MonotonicFrameClock {
+ private val lock = Any()
+ private val awaiters = mutableListOf<Awaiter<*>>()
+ private var posted = false
+
+ private class Awaiter<R>(
+ private val onFrame: (Long) -> R,
+ private val continuation: CancellableContinuation<R>
+ ) {
+ fun runFrame(frameTimeNanos: Long): () -> Unit {
+ val result = runCatching { onFrame(frameTimeNanos) }
+ return { continuation.resumeWith(result) }
+ }
+ }
+
+ override suspend fun <R> withFrameNanos(onFrame: (frameTimeNanos: Long) -> R): R =
+ suspendCancellableCoroutine { co ->
+ synchronized(lock) {
+ awaiters.add(Awaiter(onFrame, co))
+ maybeLaunchTickRunner()
+ }
+ }
+
+ private fun maybeLaunchTickRunner() {
+ if (!posted) {
+ posted = true
+ coroutineScope.launch {
+ delay(frameDelayNanos)
+ synchronized(lock) {
+ posted = false
+ val toRun = awaiters.toList()
+ awaiters.clear()
+ val frameTime = delayController.currentTime
+ // In case of awaiters on an immediate dispatcher, run all frame callbacks
+ // before resuming any associated continuations with the results.
+ toRun.map { it.runFrame(frameTime) }.forEach { it() }
+ }
+ }
+ }
+ }
+}
diff --git a/compose/ui/ui-test/src/commonMain/kotlin/androidx/compose/ui/test/Finders.kt b/compose/ui/ui-test/src/commonMain/kotlin/androidx/compose/ui/test/Finders.kt
index 5eaf79e..6d67243 100644
--- a/compose/ui/ui-test/src/commonMain/kotlin/androidx/compose/ui/test/Finders.kt
+++ b/compose/ui/ui-test/src/commonMain/kotlin/androidx/compose/ui/test/Finders.kt
@@ -95,6 +95,8 @@
* For usage patterns and semantics concepts see [SemanticsNodeInteraction]
*
* @param useUnmergedTree Find within merged composables like Buttons.
+ * @see onAllNodesWithSubstring to search by substring instead of via exact match.
+ * @see SemanticsNodeInteractionsProvider.onAllNodes for general find method.
*/
fun SemanticsNodeInteractionsProvider.onAllNodesWithText(
text: String,
@@ -108,6 +110,7 @@
* For usage patterns and semantics concepts see [SemanticsNodeInteraction]
*
* @param useUnmergedTree Find within merged composables like Buttons.
+ * @see SemanticsNodeInteractionsProvider.onAllNodes for general find method.
*/
fun SemanticsNodeInteractionsProvider.onAllNodesWithLabel(
label: String,
@@ -116,6 +119,21 @@
): SemanticsNodeInteractionCollection = onAllNodes(hasLabel(label, ignoreCase), useUnmergedTree)
/**
+ * Finds all semantics nodes with text that contains the given substring.
+ *
+ * For usage patterns and semantics concepts see [SemanticsNodeInteraction]
+ *
+ * @param useUnmergedTree Find within merged composables like Buttons.
+ * @see onAllNodesWithText to perform exact matches.
+ * @see SemanticsNodeInteractionsProvider.onAllNodes for general find method.
+ */
+fun SemanticsNodeInteractionsProvider.onAllNodesWithSubstring(
+ text: String,
+ ignoreCase: Boolean = false,
+ useUnmergedTree: Boolean = false
+): SemanticsNodeInteractionCollection = onAllNodes(hasSubstring(text, ignoreCase), useUnmergedTree)
+
+/**
* Finds the root semantics node of the Compose tree.
*
* Useful for example for screenshot tests of the entire scene.
diff --git a/compose/ui/ui/api/current.txt b/compose/ui/ui/api/current.txt
index 131f9b6..62005ed 100644
--- a/compose/ui/ui/api/current.txt
+++ b/compose/ui/ui/api/current.txt
@@ -1,34 +1,24 @@
// Signature format: 4.0
package androidx.compose.ui {
- @androidx.compose.runtime.Immutable public final class AbsoluteAlignment implements androidx.compose.ui.Alignment {
- method public long align-rlJ4snA(long size, androidx.compose.ui.unit.LayoutDirection layoutDirection);
- method @androidx.compose.runtime.Immutable public androidx.compose.ui.AbsoluteAlignment copy(float verticalBias, float horizontalBias);
- field public static final androidx.compose.ui.AbsoluteAlignment.Companion Companion;
- }
-
- public static final class AbsoluteAlignment.Companion {
- method public androidx.compose.ui.AbsoluteAlignment getBottomLeft();
- method public androidx.compose.ui.AbsoluteAlignment getBottomRight();
- method public androidx.compose.ui.AbsoluteAlignment getCenterLeft();
- method public androidx.compose.ui.AbsoluteAlignment getCenterRight();
- method public androidx.compose.ui.AbsoluteAlignment.Horizontal getLeft();
- method public androidx.compose.ui.AbsoluteAlignment.Horizontal getRight();
- method public androidx.compose.ui.AbsoluteAlignment getTopLeft();
- method public androidx.compose.ui.AbsoluteAlignment getTopRight();
- property public final androidx.compose.ui.AbsoluteAlignment BottomLeft;
- property public final androidx.compose.ui.AbsoluteAlignment BottomRight;
- property public final androidx.compose.ui.AbsoluteAlignment CenterLeft;
- property public final androidx.compose.ui.AbsoluteAlignment CenterRight;
- property public final androidx.compose.ui.AbsoluteAlignment.Horizontal Left;
- property public final androidx.compose.ui.AbsoluteAlignment.Horizontal Right;
- property public final androidx.compose.ui.AbsoluteAlignment TopLeft;
- property public final androidx.compose.ui.AbsoluteAlignment TopRight;
- }
-
- @androidx.compose.runtime.Immutable public static final class AbsoluteAlignment.Horizontal implements androidx.compose.ui.Alignment.Horizontal {
- method public int align(int size, androidx.compose.ui.unit.LayoutDirection layoutDirection);
- method @androidx.compose.runtime.Immutable public androidx.compose.ui.AbsoluteAlignment.Horizontal copy(float bias);
+ public final class AbsoluteAlignment {
+ method public androidx.compose.ui.Alignment getBottomLeft();
+ method public androidx.compose.ui.Alignment getBottomRight();
+ method public androidx.compose.ui.Alignment getCenterLeft();
+ method public androidx.compose.ui.Alignment getCenterRight();
+ method public androidx.compose.ui.Alignment.Horizontal getLeft();
+ method public androidx.compose.ui.Alignment.Horizontal getRight();
+ method public androidx.compose.ui.Alignment getTopLeft();
+ method public androidx.compose.ui.Alignment getTopRight();
+ property public final androidx.compose.ui.Alignment BottomLeft;
+ property public final androidx.compose.ui.Alignment BottomRight;
+ property public final androidx.compose.ui.Alignment CenterLeft;
+ property public final androidx.compose.ui.Alignment CenterRight;
+ property public final androidx.compose.ui.Alignment.Horizontal Left;
+ property public final androidx.compose.ui.Alignment.Horizontal Right;
+ property public final androidx.compose.ui.Alignment TopLeft;
+ property public final androidx.compose.ui.Alignment TopRight;
+ field public static final androidx.compose.ui.AbsoluteAlignment INSTANCE;
}
@androidx.compose.runtime.Immutable public interface Alignment {
@@ -77,6 +67,41 @@
method public int align(int size);
}
+ @androidx.compose.runtime.Immutable public final class BiasAbsoluteAlignment implements androidx.compose.ui.Alignment {
+ method public long align-rlJ4snA(long size, androidx.compose.ui.unit.LayoutDirection layoutDirection);
+ method @androidx.compose.runtime.Immutable public androidx.compose.ui.BiasAbsoluteAlignment copy(float horizontalBias, float verticalBias);
+ }
+
+ @androidx.compose.runtime.Immutable public static final class BiasAbsoluteAlignment.Horizontal implements androidx.compose.ui.Alignment.Horizontal {
+ ctor public BiasAbsoluteAlignment.Horizontal(float bias);
+ method public int align(int size, androidx.compose.ui.unit.LayoutDirection layoutDirection);
+ method @androidx.compose.runtime.Immutable public androidx.compose.ui.BiasAbsoluteAlignment.Horizontal copy(float bias);
+ }
+
+ @androidx.compose.runtime.Immutable public final class BiasAlignment implements androidx.compose.ui.Alignment {
+ ctor public BiasAlignment(float horizontalBias, float verticalBias);
+ method public long align-rlJ4snA(long size, androidx.compose.ui.unit.LayoutDirection layoutDirection);
+ method public float component1();
+ method public float component2();
+ method @androidx.compose.runtime.Immutable public androidx.compose.ui.BiasAlignment copy(float horizontalBias, float verticalBias);
+ method public float getHorizontalBias();
+ method public float getVerticalBias();
+ property public final float horizontalBias;
+ property public final float verticalBias;
+ }
+
+ @androidx.compose.runtime.Immutable public static final class BiasAlignment.Horizontal implements androidx.compose.ui.Alignment.Horizontal {
+ ctor public BiasAlignment.Horizontal(float bias);
+ method public int align(int size, androidx.compose.ui.unit.LayoutDirection layoutDirection);
+ method @androidx.compose.runtime.Immutable public androidx.compose.ui.BiasAlignment.Horizontal copy(float bias);
+ }
+
+ @androidx.compose.runtime.Immutable public static final class BiasAlignment.Vertical implements androidx.compose.ui.Alignment.Vertical {
+ ctor public BiasAlignment.Vertical(float bias);
+ method public int align(int size);
+ method @androidx.compose.runtime.Immutable public androidx.compose.ui.BiasAlignment.Vertical copy(float bias);
+ }
+
public final class CacheDrawScope implements androidx.compose.ui.unit.Density {
method public float getDensity();
method public float getFontScale();
@@ -1895,16 +1920,6 @@
method public static androidx.compose.ui.node.LayoutNode? findClosestParentNode(androidx.compose.ui.node.LayoutNode, kotlin.jvm.functions.Function1<? super androidx.compose.ui.node.LayoutNode,java.lang.Boolean> selector);
}
- @Deprecated public final class ModelObserver {
- ctor @Deprecated public ModelObserver(kotlin.jvm.functions.Function1<? super kotlin.jvm.functions.Function0<kotlin.Unit>,kotlin.Unit> commitExecutor);
- method @Deprecated public void clear(Object target);
- method @Deprecated public void enableModelUpdatesObserving(boolean enabled);
- method @Deprecated @androidx.compose.ui.node.InternalCoreApi public kotlin.jvm.functions.Function2<java.util.Set<?>,androidx.compose.runtime.frames.Frame,kotlin.Unit> getFrameCommitObserver();
- method @Deprecated public <T> void observeReads(T target, kotlin.jvm.functions.Function1<? super T,kotlin.Unit> onCommit, kotlin.jvm.functions.Function0<kotlin.Unit> block);
- method @Deprecated public void pauseObservingReads(kotlin.jvm.functions.Function0<kotlin.Unit> block);
- property @androidx.compose.ui.node.InternalCoreApi public final kotlin.jvm.functions.Function2<java.util.Set<?>,androidx.compose.runtime.frames.Frame,kotlin.Unit> frameCommitObserver;
- }
-
public final class ModifierInfo {
ctor public ModifierInfo(androidx.compose.ui.Modifier modifier, androidx.compose.ui.layout.LayoutCoordinates coordinates, Object? extra);
method public androidx.compose.ui.layout.LayoutCoordinates getCoordinates();
diff --git a/compose/ui/ui/api/public_plus_experimental_current.txt b/compose/ui/ui/api/public_plus_experimental_current.txt
index 131f9b6..62005ed 100644
--- a/compose/ui/ui/api/public_plus_experimental_current.txt
+++ b/compose/ui/ui/api/public_plus_experimental_current.txt
@@ -1,34 +1,24 @@
// Signature format: 4.0
package androidx.compose.ui {
- @androidx.compose.runtime.Immutable public final class AbsoluteAlignment implements androidx.compose.ui.Alignment {
- method public long align-rlJ4snA(long size, androidx.compose.ui.unit.LayoutDirection layoutDirection);
- method @androidx.compose.runtime.Immutable public androidx.compose.ui.AbsoluteAlignment copy(float verticalBias, float horizontalBias);
- field public static final androidx.compose.ui.AbsoluteAlignment.Companion Companion;
- }
-
- public static final class AbsoluteAlignment.Companion {
- method public androidx.compose.ui.AbsoluteAlignment getBottomLeft();
- method public androidx.compose.ui.AbsoluteAlignment getBottomRight();
- method public androidx.compose.ui.AbsoluteAlignment getCenterLeft();
- method public androidx.compose.ui.AbsoluteAlignment getCenterRight();
- method public androidx.compose.ui.AbsoluteAlignment.Horizontal getLeft();
- method public androidx.compose.ui.AbsoluteAlignment.Horizontal getRight();
- method public androidx.compose.ui.AbsoluteAlignment getTopLeft();
- method public androidx.compose.ui.AbsoluteAlignment getTopRight();
- property public final androidx.compose.ui.AbsoluteAlignment BottomLeft;
- property public final androidx.compose.ui.AbsoluteAlignment BottomRight;
- property public final androidx.compose.ui.AbsoluteAlignment CenterLeft;
- property public final androidx.compose.ui.AbsoluteAlignment CenterRight;
- property public final androidx.compose.ui.AbsoluteAlignment.Horizontal Left;
- property public final androidx.compose.ui.AbsoluteAlignment.Horizontal Right;
- property public final androidx.compose.ui.AbsoluteAlignment TopLeft;
- property public final androidx.compose.ui.AbsoluteAlignment TopRight;
- }
-
- @androidx.compose.runtime.Immutable public static final class AbsoluteAlignment.Horizontal implements androidx.compose.ui.Alignment.Horizontal {
- method public int align(int size, androidx.compose.ui.unit.LayoutDirection layoutDirection);
- method @androidx.compose.runtime.Immutable public androidx.compose.ui.AbsoluteAlignment.Horizontal copy(float bias);
+ public final class AbsoluteAlignment {
+ method public androidx.compose.ui.Alignment getBottomLeft();
+ method public androidx.compose.ui.Alignment getBottomRight();
+ method public androidx.compose.ui.Alignment getCenterLeft();
+ method public androidx.compose.ui.Alignment getCenterRight();
+ method public androidx.compose.ui.Alignment.Horizontal getLeft();
+ method public androidx.compose.ui.Alignment.Horizontal getRight();
+ method public androidx.compose.ui.Alignment getTopLeft();
+ method public androidx.compose.ui.Alignment getTopRight();
+ property public final androidx.compose.ui.Alignment BottomLeft;
+ property public final androidx.compose.ui.Alignment BottomRight;
+ property public final androidx.compose.ui.Alignment CenterLeft;
+ property public final androidx.compose.ui.Alignment CenterRight;
+ property public final androidx.compose.ui.Alignment.Horizontal Left;
+ property public final androidx.compose.ui.Alignment.Horizontal Right;
+ property public final androidx.compose.ui.Alignment TopLeft;
+ property public final androidx.compose.ui.Alignment TopRight;
+ field public static final androidx.compose.ui.AbsoluteAlignment INSTANCE;
}
@androidx.compose.runtime.Immutable public interface Alignment {
@@ -77,6 +67,41 @@
method public int align(int size);
}
+ @androidx.compose.runtime.Immutable public final class BiasAbsoluteAlignment implements androidx.compose.ui.Alignment {
+ method public long align-rlJ4snA(long size, androidx.compose.ui.unit.LayoutDirection layoutDirection);
+ method @androidx.compose.runtime.Immutable public androidx.compose.ui.BiasAbsoluteAlignment copy(float horizontalBias, float verticalBias);
+ }
+
+ @androidx.compose.runtime.Immutable public static final class BiasAbsoluteAlignment.Horizontal implements androidx.compose.ui.Alignment.Horizontal {
+ ctor public BiasAbsoluteAlignment.Horizontal(float bias);
+ method public int align(int size, androidx.compose.ui.unit.LayoutDirection layoutDirection);
+ method @androidx.compose.runtime.Immutable public androidx.compose.ui.BiasAbsoluteAlignment.Horizontal copy(float bias);
+ }
+
+ @androidx.compose.runtime.Immutable public final class BiasAlignment implements androidx.compose.ui.Alignment {
+ ctor public BiasAlignment(float horizontalBias, float verticalBias);
+ method public long align-rlJ4snA(long size, androidx.compose.ui.unit.LayoutDirection layoutDirection);
+ method public float component1();
+ method public float component2();
+ method @androidx.compose.runtime.Immutable public androidx.compose.ui.BiasAlignment copy(float horizontalBias, float verticalBias);
+ method public float getHorizontalBias();
+ method public float getVerticalBias();
+ property public final float horizontalBias;
+ property public final float verticalBias;
+ }
+
+ @androidx.compose.runtime.Immutable public static final class BiasAlignment.Horizontal implements androidx.compose.ui.Alignment.Horizontal {
+ ctor public BiasAlignment.Horizontal(float bias);
+ method public int align(int size, androidx.compose.ui.unit.LayoutDirection layoutDirection);
+ method @androidx.compose.runtime.Immutable public androidx.compose.ui.BiasAlignment.Horizontal copy(float bias);
+ }
+
+ @androidx.compose.runtime.Immutable public static final class BiasAlignment.Vertical implements androidx.compose.ui.Alignment.Vertical {
+ ctor public BiasAlignment.Vertical(float bias);
+ method public int align(int size);
+ method @androidx.compose.runtime.Immutable public androidx.compose.ui.BiasAlignment.Vertical copy(float bias);
+ }
+
public final class CacheDrawScope implements androidx.compose.ui.unit.Density {
method public float getDensity();
method public float getFontScale();
@@ -1895,16 +1920,6 @@
method public static androidx.compose.ui.node.LayoutNode? findClosestParentNode(androidx.compose.ui.node.LayoutNode, kotlin.jvm.functions.Function1<? super androidx.compose.ui.node.LayoutNode,java.lang.Boolean> selector);
}
- @Deprecated public final class ModelObserver {
- ctor @Deprecated public ModelObserver(kotlin.jvm.functions.Function1<? super kotlin.jvm.functions.Function0<kotlin.Unit>,kotlin.Unit> commitExecutor);
- method @Deprecated public void clear(Object target);
- method @Deprecated public void enableModelUpdatesObserving(boolean enabled);
- method @Deprecated @androidx.compose.ui.node.InternalCoreApi public kotlin.jvm.functions.Function2<java.util.Set<?>,androidx.compose.runtime.frames.Frame,kotlin.Unit> getFrameCommitObserver();
- method @Deprecated public <T> void observeReads(T target, kotlin.jvm.functions.Function1<? super T,kotlin.Unit> onCommit, kotlin.jvm.functions.Function0<kotlin.Unit> block);
- method @Deprecated public void pauseObservingReads(kotlin.jvm.functions.Function0<kotlin.Unit> block);
- property @androidx.compose.ui.node.InternalCoreApi public final kotlin.jvm.functions.Function2<java.util.Set<?>,androidx.compose.runtime.frames.Frame,kotlin.Unit> frameCommitObserver;
- }
-
public final class ModifierInfo {
ctor public ModifierInfo(androidx.compose.ui.Modifier modifier, androidx.compose.ui.layout.LayoutCoordinates coordinates, Object? extra);
method public androidx.compose.ui.layout.LayoutCoordinates getCoordinates();
diff --git a/compose/ui/ui/api/restricted_current.txt b/compose/ui/ui/api/restricted_current.txt
index 7bf7306..eee4efa 100644
--- a/compose/ui/ui/api/restricted_current.txt
+++ b/compose/ui/ui/api/restricted_current.txt
@@ -1,34 +1,24 @@
// Signature format: 4.0
package androidx.compose.ui {
- @androidx.compose.runtime.Immutable public final class AbsoluteAlignment implements androidx.compose.ui.Alignment {
- method public long align-rlJ4snA(long size, androidx.compose.ui.unit.LayoutDirection layoutDirection);
- method @androidx.compose.runtime.Immutable public androidx.compose.ui.AbsoluteAlignment copy(float verticalBias, float horizontalBias);
- field public static final androidx.compose.ui.AbsoluteAlignment.Companion Companion;
- }
-
- public static final class AbsoluteAlignment.Companion {
- method public androidx.compose.ui.AbsoluteAlignment getBottomLeft();
- method public androidx.compose.ui.AbsoluteAlignment getBottomRight();
- method public androidx.compose.ui.AbsoluteAlignment getCenterLeft();
- method public androidx.compose.ui.AbsoluteAlignment getCenterRight();
- method public androidx.compose.ui.AbsoluteAlignment.Horizontal getLeft();
- method public androidx.compose.ui.AbsoluteAlignment.Horizontal getRight();
- method public androidx.compose.ui.AbsoluteAlignment getTopLeft();
- method public androidx.compose.ui.AbsoluteAlignment getTopRight();
- property public final androidx.compose.ui.AbsoluteAlignment BottomLeft;
- property public final androidx.compose.ui.AbsoluteAlignment BottomRight;
- property public final androidx.compose.ui.AbsoluteAlignment CenterLeft;
- property public final androidx.compose.ui.AbsoluteAlignment CenterRight;
- property public final androidx.compose.ui.AbsoluteAlignment.Horizontal Left;
- property public final androidx.compose.ui.AbsoluteAlignment.Horizontal Right;
- property public final androidx.compose.ui.AbsoluteAlignment TopLeft;
- property public final androidx.compose.ui.AbsoluteAlignment TopRight;
- }
-
- @androidx.compose.runtime.Immutable public static final class AbsoluteAlignment.Horizontal implements androidx.compose.ui.Alignment.Horizontal {
- method public int align(int size, androidx.compose.ui.unit.LayoutDirection layoutDirection);
- method @androidx.compose.runtime.Immutable public androidx.compose.ui.AbsoluteAlignment.Horizontal copy(float bias);
+ public final class AbsoluteAlignment {
+ method public androidx.compose.ui.Alignment getBottomLeft();
+ method public androidx.compose.ui.Alignment getBottomRight();
+ method public androidx.compose.ui.Alignment getCenterLeft();
+ method public androidx.compose.ui.Alignment getCenterRight();
+ method public androidx.compose.ui.Alignment.Horizontal getLeft();
+ method public androidx.compose.ui.Alignment.Horizontal getRight();
+ method public androidx.compose.ui.Alignment getTopLeft();
+ method public androidx.compose.ui.Alignment getTopRight();
+ property public final androidx.compose.ui.Alignment BottomLeft;
+ property public final androidx.compose.ui.Alignment BottomRight;
+ property public final androidx.compose.ui.Alignment CenterLeft;
+ property public final androidx.compose.ui.Alignment CenterRight;
+ property public final androidx.compose.ui.Alignment.Horizontal Left;
+ property public final androidx.compose.ui.Alignment.Horizontal Right;
+ property public final androidx.compose.ui.Alignment TopLeft;
+ property public final androidx.compose.ui.Alignment TopRight;
+ field public static final androidx.compose.ui.AbsoluteAlignment INSTANCE;
}
@androidx.compose.runtime.Immutable public interface Alignment {
@@ -77,6 +67,41 @@
method public int align(int size);
}
+ @androidx.compose.runtime.Immutable public final class BiasAbsoluteAlignment implements androidx.compose.ui.Alignment {
+ method public long align-rlJ4snA(long size, androidx.compose.ui.unit.LayoutDirection layoutDirection);
+ method @androidx.compose.runtime.Immutable public androidx.compose.ui.BiasAbsoluteAlignment copy(float horizontalBias, float verticalBias);
+ }
+
+ @androidx.compose.runtime.Immutable public static final class BiasAbsoluteAlignment.Horizontal implements androidx.compose.ui.Alignment.Horizontal {
+ ctor public BiasAbsoluteAlignment.Horizontal(float bias);
+ method public int align(int size, androidx.compose.ui.unit.LayoutDirection layoutDirection);
+ method @androidx.compose.runtime.Immutable public androidx.compose.ui.BiasAbsoluteAlignment.Horizontal copy(float bias);
+ }
+
+ @androidx.compose.runtime.Immutable public final class BiasAlignment implements androidx.compose.ui.Alignment {
+ ctor public BiasAlignment(float horizontalBias, float verticalBias);
+ method public long align-rlJ4snA(long size, androidx.compose.ui.unit.LayoutDirection layoutDirection);
+ method public float component1();
+ method public float component2();
+ method @androidx.compose.runtime.Immutable public androidx.compose.ui.BiasAlignment copy(float horizontalBias, float verticalBias);
+ method public float getHorizontalBias();
+ method public float getVerticalBias();
+ property public final float horizontalBias;
+ property public final float verticalBias;
+ }
+
+ @androidx.compose.runtime.Immutable public static final class BiasAlignment.Horizontal implements androidx.compose.ui.Alignment.Horizontal {
+ ctor public BiasAlignment.Horizontal(float bias);
+ method public int align(int size, androidx.compose.ui.unit.LayoutDirection layoutDirection);
+ method @androidx.compose.runtime.Immutable public androidx.compose.ui.BiasAlignment.Horizontal copy(float bias);
+ }
+
+ @androidx.compose.runtime.Immutable public static final class BiasAlignment.Vertical implements androidx.compose.ui.Alignment.Vertical {
+ ctor public BiasAlignment.Vertical(float bias);
+ method public int align(int size);
+ method @androidx.compose.runtime.Immutable public androidx.compose.ui.BiasAlignment.Vertical copy(float bias);
+ }
+
public final class CacheDrawScope implements androidx.compose.ui.unit.Density {
method public float getDensity();
method public float getFontScale();
@@ -1957,16 +1982,6 @@
method public static androidx.compose.ui.node.LayoutNode? findClosestParentNode(androidx.compose.ui.node.LayoutNode, kotlin.jvm.functions.Function1<? super androidx.compose.ui.node.LayoutNode,java.lang.Boolean> selector);
}
- @Deprecated public final class ModelObserver {
- ctor @Deprecated public ModelObserver(kotlin.jvm.functions.Function1<? super kotlin.jvm.functions.Function0<kotlin.Unit>,kotlin.Unit> commitExecutor);
- method @Deprecated public void clear(Object target);
- method @Deprecated public void enableModelUpdatesObserving(boolean enabled);
- method @Deprecated @androidx.compose.ui.node.InternalCoreApi public kotlin.jvm.functions.Function2<java.util.Set<?>,androidx.compose.runtime.frames.Frame,kotlin.Unit> getFrameCommitObserver();
- method @Deprecated public <T> void observeReads(T target, kotlin.jvm.functions.Function1<? super T,kotlin.Unit> onCommit, kotlin.jvm.functions.Function0<kotlin.Unit> block);
- method @Deprecated public void pauseObservingReads(kotlin.jvm.functions.Function0<kotlin.Unit> block);
- property @androidx.compose.ui.node.InternalCoreApi public final kotlin.jvm.functions.Function2<java.util.Set<?>,androidx.compose.runtime.frames.Frame,kotlin.Unit> frameCommitObserver;
- }
-
public final class ModifierInfo {
ctor public ModifierInfo(androidx.compose.ui.Modifier modifier, androidx.compose.ui.layout.LayoutCoordinates coordinates, Object? extra);
method public androidx.compose.ui.layout.LayoutCoordinates getCoordinates();
diff --git a/compose/ui/ui/lint-baseline.xml b/compose/ui/ui/lint-baseline.xml
index 33f6d28..1ce1838 100644
--- a/compose/ui/ui/lint-baseline.xml
+++ b/compose/ui/ui/lint-baseline.xml
@@ -13,6 +13,28 @@
</issue>
<issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" getBooleanMethod?.invoke(null, "debug.layout", false) as? Boolean ?: false"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeView.kt"
+ line="729"
+ column="13"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" updateDisplayListIfDirtyMethod?.invoke(view)"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/androidMain/kotlin/androidx/compose/ui/platform/ViewLayer.kt"
+ line="287"
+ column="13"/>
+ </issue>
+
+ <issue
id="UnsafeNewApiCall"
message="This call is to a method from API 23, the call containing class androidx.compose.ui.autofill.AndroidAutofillKt is not annotated with @RequiresApi(x) where x is at least 23. Either annotate the containing class with at least @RequiresApi(23) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(23)."
errorLine1=" var index = root.addChildCount(autofillTree.children.count())"
@@ -184,7 +206,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeView.kt"
- line="302"
+ line="304"
column="13"/>
</issue>
@@ -195,7 +217,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeView.kt"
- line="304"
+ line="306"
column="13"/>
</issue>
@@ -250,7 +272,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/androidMain/kotlin/androidx/compose/ui/platform/RenderNodeLayer.kt"
- line="163"
+ line="164"
column="31"/>
</issue>
@@ -327,41 +349,41 @@
errorLine2=" ^">
<location
file="src/commonMain/kotlin/androidx/compose/ui/DrawModifier.kt"
- line="170"
+ line="182"
column="25"/>
</issue>
<issue
id="ModifierInspectorInfo"
message="Modifiers should include inspectorInfo for the Layout Inspector"
- errorLine1=") = if (elevation > 0.dp || clip || opacity != 1f) {"
+ errorLine1=") = if (elevation > 0.dp || clip) {"
errorLine2=" ^">
<location
file="src/commonMain/kotlin/androidx/compose/ui/draw/DrawShadow.kt"
- line="53"
+ line="50"
column="5"/>
</issue>
<issue
id="ModifierInspectorInfo"
message="Modifiers should include inspectorInfo for the Layout Inspector"
- errorLine1="fun Modifier.focusObserver(onFocusChange: (FocusState) -> Unit): Modifier = composed {"
- errorLine2=" ~~~~~~~~">
+ errorLine1=" return this.then(FocusObserverModifierImpl(onFocusChange))"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/commonMain/kotlin/androidx/compose/ui/FocusObserverModifier.kt"
- line="42"
- column="77"/>
+ line="43"
+ column="22"/>
</issue>
<issue
id="ModifierInspectorInfo"
message="Modifiers should include inspectorInfo for the Layout Inspector"
- errorLine1="fun Modifier.focusRequester(focusRequester: FocusRequester): Modifier = composed {"
- errorLine2=" ~~~~~~~~">
+ errorLine1=" return this.then(FocusRequesterModifierImpl(focusRequester))"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/commonMain/kotlin/androidx/compose/ui/FocusRequesterModifier.kt"
- line="45"
- column="73"/>
+ line="46"
+ column="22"/>
</issue>
<issue
@@ -444,17 +466,6 @@
<issue
id="ModifierInspectorInfo"
message="Modifiers should include inspectorInfo for the Layout Inspector"
- errorLine1=" return this.then(filter)"
- errorLine2=" ~~~~~~">
- <location
- file="src/androidMain/kotlin/androidx/compose/ui/input/pointer/PointerInteropFilter.kt"
- line="94"
- column="22"/>
- </issue>
-
- <issue
- id="ModifierInspectorInfo"
- message="Modifiers should include inspectorInfo for the Layout Inspector"
errorLine1="): Modifier = composed {"
errorLine2=" ~~~~~~~~">
<location
@@ -573,15 +584,4 @@
column="15"/>
</issue>
- <issue
- id="ModifierInspectorInfo"
- message="These lambda arguments are missing in the InspectorInfo: `tag`"
- errorLine1="fun Modifier.testTag(tag: String) = semantics("
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/commonMain/kotlin/androidx/compose/ui/platform/TestTag.kt"
- line="31"
- column="37"/>
- </issue>
-
</issues>
diff --git a/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/Alignment.kt b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/Alignment.kt
index 91676db..0c29b16 100644
--- a/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/Alignment.kt
+++ b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/Alignment.kt
@@ -26,6 +26,10 @@
/**
* An interface to position a point inside a 2D box. [Alignment] is often used to define
* the alignment of a box inside a parent container.
+ *
+ * @see AbsoluteAlignment
+ * @see BiasAlignment
+ * @see BiasAbsoluteAlignment
*/
@Immutable
interface Alignment {
@@ -66,56 +70,87 @@
fun align(size: Int, layoutDirection: LayoutDirection = LayoutDirection.Ltr): Int
}
+ /**
+ * A collection of common [Alignment]s aware of layout direction.
+ */
companion object {
// 2D Alignments.
@Stable
- val TopStart: Alignment = DirectionalAlignment(-1f, -1f)
+ val TopStart: Alignment = BiasAlignment(-1f, -1f)
@Stable
- val TopCenter: Alignment = DirectionalAlignment(-1f, 0f)
+ val TopCenter: Alignment = BiasAlignment(0f, -1f)
@Stable
- val TopEnd: Alignment = DirectionalAlignment(-1f, 1f)
+ val TopEnd: Alignment = BiasAlignment(1f, -1f)
@Stable
- val CenterStart: Alignment = DirectionalAlignment(0f, -1f)
+ val CenterStart: Alignment = BiasAlignment(-1f, 0f)
@Stable
- val Center: Alignment = DirectionalAlignment(0f, 0f)
+ val Center: Alignment = BiasAlignment(0f, 0f)
@Stable
- val CenterEnd: Alignment = DirectionalAlignment(0f, 1f)
+ val CenterEnd: Alignment = BiasAlignment(1f, 0f)
@Stable
- val BottomStart: Alignment = DirectionalAlignment(1f, -1f)
+ val BottomStart: Alignment = BiasAlignment(-1f, 1f)
@Stable
- val BottomCenter: Alignment = DirectionalAlignment(1f, 0f)
+ val BottomCenter: Alignment = BiasAlignment(0f, 1f)
@Stable
- val BottomEnd: Alignment = DirectionalAlignment(1f, 1f)
+ val BottomEnd: Alignment = BiasAlignment(1f, 1f)
// 1D Alignment.Verticals.
@Stable
- val Top: Vertical = DirectionalAlignment.Vertical(-1f)
+ val Top: Vertical = BiasAlignment.Vertical(-1f)
@Stable
- val CenterVertically: Vertical = DirectionalAlignment.Vertical(0f)
+ val CenterVertically: Vertical = BiasAlignment.Vertical(0f)
@Stable
- val Bottom: Vertical = DirectionalAlignment.Vertical(1f)
+ val Bottom: Vertical = BiasAlignment.Vertical(1f)
// 1D Alignment.Horizontals.
@Stable
- val Start: Horizontal = DirectionalAlignment.Horizontal(-1f)
+ val Start: Horizontal = BiasAlignment.Horizontal(-1f)
@Stable
- val CenterHorizontally: Horizontal = DirectionalAlignment.Horizontal(0f)
+ val CenterHorizontally: Horizontal = BiasAlignment.Horizontal(0f)
@Stable
- val End: Horizontal = DirectionalAlignment.Horizontal(1f)
+ val End: Horizontal = BiasAlignment.Horizontal(1f)
}
}
/**
- * Represents a positioning of a point inside a 2D box.
- * The coordinate space of the 2D box is the continuous [-1f, 1f] range in both dimensions,
- * and (verticalBias, horizontalBias) will be points in this space. (verticalBias=0f,
- * horizontalBias=0f) represents the center of the box, (verticalBias=-1f, horizontalBias=1f)
- * will be the top end, etc.
+ * A collection of common [Alignment]s unaware of the layout direction.
+ */
+object AbsoluteAlignment {
+ // 2D AbsoluteAlignments.
+ @Stable
+ val TopLeft: Alignment = BiasAbsoluteAlignment(-1f, -1f)
+ @Stable
+ val TopRight: Alignment = BiasAbsoluteAlignment(1f, -1f)
+ @Stable
+ val CenterLeft: Alignment = BiasAbsoluteAlignment(-1f, 0f)
+ @Stable
+ val CenterRight: Alignment = BiasAbsoluteAlignment(1f, 0f)
+ @Stable
+ val BottomLeft: Alignment = BiasAbsoluteAlignment(-1f, 1f)
+ @Stable
+ val BottomRight: Alignment = BiasAbsoluteAlignment(1f, 1f)
+
+ // 1D BiasAbsoluteAlignment.Horizontals.
+ @Stable
+ val Left: Alignment.Horizontal = BiasAbsoluteAlignment.Horizontal(-1f)
+ @Stable
+ val Right: Alignment.Horizontal = BiasAbsoluteAlignment.Horizontal(1f)
+}
+
+/**
+ * An [Alignment] specified by bias: for example, a bias of -1 represents alignment to the
+ * start/top, a bias of 0 will represent centering, and a bias of 1 will represent end/bottom.
+ * Any value can be specified to obtain an alignment. Inside the [-1, 1] range, the obtained
+ * alignment will position the aligned size fully inside the available space, while outside the
+ * range it will the aligned size will be positioned partially or completely outside.
+ *
+ * @see BiasAbsoluteAlignment
+ * @see Alignment
*/
@Immutable
-private data class DirectionalAlignment(
- val verticalBias: Float,
- val horizontalBias: Float
+data class BiasAlignment(
+ val horizontalBias: Float,
+ val verticalBias: Float
) : Alignment {
override fun align(
size: IntSize,
@@ -136,16 +171,16 @@
return IntOffset(x.roundToInt(), y.roundToInt())
}
- @Immutable
- data class Vertical(private val bias: Float) : Alignment.Vertical {
- override fun align(size: Int): Int {
- // Convert to Px first and only round at the end, to avoid rounding twice while
- // calculating the new positions
- val center = size.toFloat() / 2f
- return (center * (1 + bias)).roundToInt()
- }
- }
-
+ /**
+ * An [Alignment.Horizontal] specified by bias: for example, a bias of -1 represents alignment
+ * to the start, a bias of 0 will represent centering, and a bias of 1 will represent end.
+ * Any value can be specified to obtain an alignment. Inside the [-1, 1] range, the obtained
+ * alignment will position the aligned size fully inside the available space, while outside the
+ * range it will the aligned size will be positioned partially or completely outside.
+ *
+ * @see BiasAbsoluteAlignment.Horizontal
+ * @see Vertical
+ */
@Immutable
data class Horizontal(private val bias: Float) : Alignment.Horizontal {
override fun align(size: Int, layoutDirection: LayoutDirection): Int {
@@ -156,20 +191,45 @@
return (center * (1 + resolvedBias)).roundToInt()
}
}
+
+ /**
+ * An [Alignment.Vertical] specified by bias: for example, a bias of -1 represents alignment
+ * to the top, a bias of 0 will represent centering, and a bias of 1 will represent bottom.
+ * Any value can be specified to obtain an alignment. Inside the [-1, 1] range, the obtained
+ * alignment will position the aligned size fully inside the available space, while outside the
+ * range it will the aligned size will be positioned partially or completely outside.
+ *
+ * @see Horizontal
+ */
+ @Immutable
+ data class Vertical(private val bias: Float) : Alignment.Vertical {
+ override fun align(size: Int): Int {
+ // Convert to Px first and only round at the end, to avoid rounding twice while
+ // calculating the new positions
+ val center = size.toFloat() / 2f
+ return (center * (1 + bias)).roundToInt()
+ }
+ }
}
/**
- * Represents an absolute positioning of a point inside a 2D box. The position will not be
- * automatically mirrored in Rtl context.
+ * An [Alignment] specified by bias: for example, a bias of -1 represents alignment to the
+ * left/top, a bias of 0 will represent centering, and a bias of 1 will represent right/bottom.
+ * Any value can be specified to obtain an alignment. Inside the [-1, 1] range, the obtained
+ * alignment will position the aligned size fully inside the available space, while outside the
+ * range it will the aligned size will be positioned partially or completely outside.
+ *
+ * @see AbsoluteAlignment
+ * @see Alignment
*/
@Immutable
-data class AbsoluteAlignment internal constructor(
- private val verticalBias: Float,
- private val horizontalBias: Float
+data class BiasAbsoluteAlignment internal constructor(
+ private val horizontalBias: Float,
+ private val verticalBias: Float
) : Alignment {
/**
* Returns the position of a 2D point in a container of a given size, according to this
- * [AbsoluteAlignment]. The position will not be mirrored in Rtl context.
+ * [BiasAbsoluteAlignment]. The position will not be mirrored in Rtl context.
*/
override fun align(size: IntSize, layoutDirection: LayoutDirection): IntOffset {
// Convert to Px first and only round at the end, to avoid rounding twice while calculating
@@ -183,15 +243,20 @@
}
/**
- * Represents a absolute positioning of a point on a 1D horizontal finite line. The position
- * will not be mirrored in Rtl context.
+ * An [Alignment.Horizontal] specified by bias: for example, a bias of -1 represents alignment
+ * to the left, a bias of 0 will represent centering, and a bias of 1 will represent right.
+ * Any value can be specified to obtain an alignment. Inside the [-1, 1] range, the obtained
+ * alignment will position the aligned size fully inside the available space, while outside the
+ * range it will the aligned size will be positioned partially or completely outside.
+ *
+ * @see BiasAlignment.Horizontal
*/
@Immutable
- data class Horizontal internal constructor(private val bias: Float) : Alignment.Horizontal {
+ data class Horizontal(private val bias: Float) : Alignment.Horizontal {
/**
* Returns the position of a 2D point in a container of a given size,
- * according to this [AbsoluteAlignment.Horizontal]. This position will not be mirrored in
- * Rtl context.
+ * according to this [BiasAbsoluteAlignment.Horizontal]. This position will not be
+ * mirrored in Rtl context.
*/
override fun align(size: Int, layoutDirection: LayoutDirection): Int {
// Convert to Px first and only round at the end, to avoid rounding twice while
@@ -200,26 +265,4 @@
return (center * (1 + bias)).roundToInt()
}
}
-
- companion object {
- // 2D AbsoluteAlignments.
- @Stable
- val TopLeft = AbsoluteAlignment(-1f, -1f)
- @Stable
- val TopRight = AbsoluteAlignment(-1f, 1f)
- @Stable
- val CenterLeft = AbsoluteAlignment(0f, -1f)
- @Stable
- val CenterRight = AbsoluteAlignment(0f, 1f)
- @Stable
- val BottomLeft = AbsoluteAlignment(1f, -1f)
- @Stable
- val BottomRight = AbsoluteAlignment(1f, 1f)
-
- // 1D AbsoluteAlignment.Horizontals.
- @Stable
- val Left: Horizontal = Horizontal(-1f)
- @Stable
- val Right: Horizontal = Horizontal(1f)
- }
}
diff --git a/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/ModelObserver.kt b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/ModelObserver.kt
deleted file mode 100644
index 0ef6d4f..0000000
--- a/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/ModelObserver.kt
+++ /dev/null
@@ -1,241 +0,0 @@
-/*
- * 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.
- */
-
-@file:Suppress("DEPRECATION", "UNUSED_PARAMETER")
-
-package androidx.compose.ui.node
-
-import androidx.compose.runtime.ObserverMap
-import androidx.compose.runtime.frames.FrameCommitObserver
-import androidx.compose.runtime.frames.FrameReadObserver
-import androidx.compose.runtime.frames.observeAllReads
-import androidx.compose.ui.util.fastForEach
-
-/**
- * Allows for easy model read observation. To begin observe a change, you must pass a
- * non-lambda `onCommit` listener to the [observeReads] method.
- *
- * When a state change has been committed, the `onCommit` listener will be called
- * with the `targetObject` as the argument. There are no order guarantees for
- * `onCommit` listener calls. Commit callbacks are made on the thread that model changes
- * are committed, so the [commitExecutor] allows the developer to control the thread on which the
- * `onCommit`calls are made. An example use would be to have the executor shift to the
- * the UI thread for the `onCommit` callbacks to be made.
- *
- * A different ModelObserver should be used with each thread that [observeReads] is called on.
- *
- * @param commitExecutor The executor on which all `onCommit` calls will be made.
- */
-@Deprecated(
- "Frames have been replaced by snapshots",
- ReplaceWith(
- "SnapshotStateObserver",
- "androidx.compose.runtime.snapshots"
- )
-)
-class ModelObserver(private val commitExecutor: (command: () -> Unit) -> Unit) {
- private val commitObserver: FrameCommitObserver = { committed, _ ->
- var hasValues = false
- // This array is in the same order as commitMaps
- @Suppress("DEPRECATION_ERROR")
- val targetsArray = synchronized(commitMaps) {
- Array(commitMaps.size) { index ->
- commitMaps[index].map.get(committed).apply {
- if (isNotEmpty())
- hasValues = true
- }
- }
- }
- if (hasValues) {
- commitExecutor {
- callOnCommit(targetsArray)
- }
- }
- }
-
- /**
- * The [FrameReadObserver] used by this [ModelObserver] during [observeReads].
- */
- private val readObserver: FrameReadObserver = { model ->
- if (!isPaused) {
- @Suppress("DEPRECATION_ERROR")
- synchronized(commitMaps) {
- currentMap!!.add(model, currentTarget!!)
- }
- }
- }
-
- /**
- * List of all [CommitMap]s. When [observeReads] is called, there will be
- * a [CommitMap] associated with its `onCommit` callback in this list. The list
- * only grows.
- */
- private val commitMaps = mutableListOf<CommitMap<*>>()
-
- /**
- * Method to call when unsubscribing from the commit observer.
- */
- private var commitUnsubscribe: (() -> Unit)? = null
-
- /**
- * `true` when an [observeReads] is in progress and [readObserver] is active and
- * `false` when [readObserver] is no longer observing changes.
- */
- private var isObserving = false
-
- /**
- * `true` when [pauseObservingReads] is called and read observations should no
- * longer be considered invalidations for the `onCommit` callback.
- */
- private var isPaused = false
-
- /**
- * The [ObserverMap] that should be added to when a model is read during [observeReads].
- */
- private var currentMap: ObserverMap<Any, Any>? = null
-
- /**
- * The target associated with the active [observeReads] call.
- */
- private var currentTarget: Any? = null
-
- /**
- * Test-only access to the internal commit listener. This is used for benchmarking
- * the commit notification callback.
- *
- * @suppress
- */
- val frameCommitObserver: FrameCommitObserver
- @InternalCoreApi
- get() = commitObserver
-
- /**
- * Executes [block], observing model reads during its execution.
- * The [target] is stored as a weak reference to be passed to [onCommit] when a change to the
- * model has been detected.
- *
- * Observation for [target] will be paused when a new [observeReads] call is made or when
- * [pauseObservingReads] is called.
- *
- * Any previous observation with the given [target] and [onCommit] will be
- * cleared and only the new observation on [block] will be stored. It is important that
- * the same instance of [onCommit] is used between calls or previous references will
- * not be cleared.
- *
- * The [onCommit] will be called when a model that was accessed during [block] has been
- * committed, and it will be called with [commitExecutor].
- */
- fun <T : Any> observeReads(target: T, onCommit: (T) -> Unit, block: () -> Unit) {
- val oldMap = currentMap
- val oldTarget = currentTarget
- val oldPaused = isPaused
-
- currentMap = @Suppress("DEPRECATION_ERROR") synchronized(commitMaps) {
- ensureMap(onCommit).apply { removeValue(target) }
- }
- currentTarget = target
- isPaused = false
- if (!isObserving) {
- isObserving = true
- observeAllReads(readObserver, block)
- isObserving = false
- } else {
- block()
- }
- currentMap = oldMap
- currentTarget = oldTarget
- isPaused = oldPaused
- }
-
- /**
- * Stops observing model reads while executing [block]. Model reads may be restarted
- * by calling [observeReads] inside [block].
- */
- fun pauseObservingReads(block: () -> Unit) {
- val oldPaused = isPaused
- isPaused = true
- block()
- isPaused = oldPaused
- }
-
- /**
- * Clears all model read observations for a given [target]. This clears values for all
- * `onCommit` methods passed in [observeReads].
- */
- fun clear(target: Any) {
- @Suppress("DEPRECATION_ERROR")
- synchronized(commitMaps) {
- commitMaps.fastForEach { commitMap ->
- commitMap.map.removeValue(target)
- }
- }
- }
-
- /**
- * Starts or stops watching for model commits based on [enabled].
- */
- fun enableModelUpdatesObserving(enabled: Boolean): Unit = error("deprecated")
-
- /**
- * Calls the `onCommit` callback for the given targets.
- */
- private fun callOnCommit(targetsArray: Array<List<Any>>) {
- for (i in 0..targetsArray.lastIndex) {
- val targets = targetsArray[i]
- if (targets.isNotEmpty()) {
- @Suppress("DEPRECATION_ERROR")
- val commitCaller = synchronized(commitMaps) { commitMaps[i] }
- commitCaller.callOnCommit(targets)
- }
- }
- }
-
- /**
- * Returns the [ObserverMap] within [commitMaps] associated with [onCommit] or a newly-
- * inserted one if it doesn't exist.
- */
- private fun <T : Any> ensureMap(onCommit: (T) -> Unit): ObserverMap<Any, Any> {
- val index = commitMaps.indexOfFirst { it. onCommit }
- if (index == -1) {
- val commitMap = CommitMap(onCommit)
- commitMaps.add(commitMap)
- return commitMap.map
- }
- return commitMaps[index].map
- }
-
- /**
- * Used to tie an `onCommit` to its target by type. This works around some difficulties in
- * unchecked casts with kotlin.
- */
- @Suppress("UNCHECKED_CAST")
- private class CommitMap<T : Any>(val onCommit: (T) -> Unit) {
- /**
- * ObserverMap (key = model, value = target). These are the models that have been
- * read during the target's [ModelObserver.observeReads].
- */
- val map = ObserverMap<Any, Any>()
-
- /**
- * Calls the `onCommit` callback for targets affected by the given committed values.
- */
- fun callOnCommit(targets: List<Any>) {
- targets.forEach { target ->
- onCommit(target as T)
- }
- }
- }
-}
diff --git a/compose/ui/ui/src/test/kotlin/androidx/compose/ui/layout/AlignmentTest.kt b/compose/ui/ui/src/test/kotlin/androidx/compose/ui/layout/AlignmentTest.kt
index 51ae907..cef2bf0 100644
--- a/compose/ui/ui/src/test/kotlin/androidx/compose/ui/layout/AlignmentTest.kt
+++ b/compose/ui/ui/src/test/kotlin/androidx/compose/ui/layout/AlignmentTest.kt
@@ -18,6 +18,8 @@
import androidx.compose.ui.AbsoluteAlignment
import androidx.compose.ui.Alignment
+import androidx.compose.ui.BiasAbsoluteAlignment
+import androidx.compose.ui.BiasAlignment
import androidx.compose.ui.unit.IntOffset
import androidx.compose.ui.unit.IntSize
import androidx.compose.ui.unit.LayoutDirection
@@ -200,6 +202,35 @@
}
@Test
+ fun testAlign_custom2D() {
+ val alignment = BiasAlignment(-0.5f, 0.5f)
+ assertEquals(
+ IntOffset(25, 75),
+ alignment.align(space)
+ )
+ assertEquals(
+ IntOffset(75, 75),
+ alignment.align(space, LayoutDirection.Rtl)
+ )
+ }
+
+ @Test
+ fun testAlign_custom1D() {
+ assertEquals(
+ 75,
+ BiasAlignment.Horizontal(0.5f).align(space1D)
+ )
+ assertEquals(
+ 25,
+ BiasAlignment.Horizontal(0.5f).align(space1D, LayoutDirection.Rtl)
+ )
+ assertEquals(
+ 25,
+ BiasAlignment.Vertical(-0.5f).align(space1D)
+ )
+ }
+
+ @Test
fun testAbsoluteAlign_left() {
assertEquals(
0,
@@ -294,4 +325,29 @@
AbsoluteAlignment.BottomRight.align(space, LayoutDirection.Rtl)
)
}
+
+ @Test
+ fun testAbsoluteAlign_custom2D() {
+ val alignment = BiasAbsoluteAlignment(-0.5f, 0.5f)
+ assertEquals(
+ IntOffset(25, 75),
+ alignment.align(space)
+ )
+ assertEquals(
+ IntOffset(25, 75),
+ alignment.align(space, LayoutDirection.Rtl)
+ )
+ }
+
+ @Test
+ fun testAbsoluteAlign_custom1D() {
+ assertEquals(
+ 75,
+ BiasAbsoluteAlignment.Horizontal(0.5f).align(space1D)
+ )
+ assertEquals(
+ 75,
+ BiasAbsoluteAlignment.Horizontal(0.5f).align(space1D, LayoutDirection.Rtl)
+ )
+ }
}
\ No newline at end of file
diff --git a/core/core-animation/lint-baseline.xml b/core/core-animation/lint-baseline.xml
index dc0710e..4303df1 100644
--- a/core/core-animation/lint-baseline.xml
+++ b/core/core-animation/lint-baseline.xml
@@ -2,6 +2,83 @@
<issues format="5" by="lint 4.2.0-alpha06" client="gradle" variant="debug" version="4.2.0-alpha06">
<issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" Object value = convertBack(mGetter.invoke(target));"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/animation/PropertyValuesHolder.java"
+ line="895"
+ column="52"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" Object value = convertBack(mGetter.invoke(target));"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/animation/PropertyValuesHolder.java"
+ line="941"
+ column="44"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" mSetter.invoke(target, mTmpValueArray);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/animation/PropertyValuesHolder.java"
+ line="1012"
+ column="17"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" mSetter.invoke(target, mTmpValueArray);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/animation/PropertyValuesHolder.java"
+ line="1242"
+ column="17"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" mSetter.invoke(target, mTmpValueArray);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/animation/PropertyValuesHolder.java"
+ line="1341"
+ column="21"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" mSetter.invoke(target, boxedValues);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/animation/PropertyValuesHolder.java"
+ line="1386"
+ column="21"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" mSetter.invoke(target, boxedValues);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/animation/PropertyValuesHolder.java"
+ line="1485"
+ column="21"/>
+ </issue>
+
+ <issue
id="UnsafeNewApiCall"
message="This call is to a method from API 26, the call containing class androidx.core.animation.PathUtils is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
errorLine1=" return path.approximate(precision);"
diff --git a/core/core-appdigest/build.gradle b/core/core-appdigest/build.gradle
index 56ac4ec..b96a585 100644
--- a/core/core-appdigest/build.gradle
+++ b/core/core-appdigest/build.gradle
@@ -25,8 +25,9 @@
}
android {
- defaultConfig {
- minSdkVersion 17
+ compileOptions {
+ sourceCompatibility = JavaVersion.VERSION_1_7
+ targetCompatibility = JavaVersion.VERSION_1_7
}
}
diff --git a/core/core-appdigest/src/androidTest/java/androidx/core/appdigest/ChecksumsTest.java b/core/core-appdigest/src/androidTest/java/androidx/core/appdigest/ChecksumsTest.java
index 785fd6d..6d09208 100644
--- a/core/core-appdigest/src/androidTest/java/androidx/core/appdigest/ChecksumsTest.java
+++ b/core/core-appdigest/src/androidTest/java/androidx/core/appdigest/ChecksumsTest.java
@@ -63,10 +63,11 @@
import java.io.OutputStream;
import java.security.cert.Certificate;
import java.util.Arrays;
+import java.util.Comparator;
import java.util.List;
-import java.util.Objects;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
+import java.util.function.Predicate;
@SuppressWarnings("deprecation") /* WHOLE_MD5, WHOLE_SHA1 */
@RunWith(AndroidJUnit4.class)
@@ -335,19 +336,22 @@
Checksum[] checksums = Checksums.getChecksums(context, packageName, includeSplits,
required, trustedInstallers, executor).get();
- Arrays.sort(checksums, (Checksum lhs, Checksum rhs) -> {
- final String lhsSplit = lhs.getSplitName();
- final String rhsSplit = rhs.getSplitName();
- if (Objects.equals(lhsSplit, rhsSplit)) {
- return Integer.signum(lhs.getType() - rhs.getType());
+ Arrays.sort(checksums, new Comparator<Checksum>() {
+ @Override
+ public int compare(Checksum lhs, Checksum rhs) {
+ final String lhsSplit = lhs.getSplitName();
+ final String rhsSplit = rhs.getSplitName();
+ if ((lhsSplit == rhsSplit) || (lhsSplit != null && lhsSplit.equals(rhsSplit))) {
+ return Integer.signum(lhs.getType() - rhs.getType());
+ }
+ if (lhsSplit == null) {
+ return -1;
+ }
+ if (rhsSplit == null) {
+ return +1;
+ }
+ return lhsSplit.compareTo(rhsSplit);
}
- if (lhsSplit == null) {
- return -1;
- }
- if (rhsSplit == null) {
- return +1;
- }
- return lhsSplit.compareTo(rhsSplit);
});
return checksums;
@@ -402,7 +406,7 @@
}
private void commitSession(PackageInstaller.Session session) throws Exception {
- ResolvableFuture<Intent> result = ResolvableFuture.create();
+ final ResolvableFuture<Intent> result = ResolvableFuture.create();
// Create a single-use broadcast receiver
BroadcastReceiver broadcastReceiver = new BroadcastReceiver() {
@@ -445,11 +449,16 @@
}
}
- static boolean isAppInstalled(String packageName) throws IOException {
+ static boolean isAppInstalled(final String packageName) throws IOException {
final String commandResult = executeShellCommand("pm list packages");
final int prefixLength = "package:".length();
return Arrays.stream(commandResult.split("\\r?\\n"))
- .anyMatch(line -> line.substring(prefixLength).equals(packageName));
+ .anyMatch(new Predicate<String>() {
+ @Override
+ public boolean test(String line) {
+ return line.substring(prefixLength).equals(packageName);
+ }
+ });
}
}
diff --git a/core/core-appdigest/src/main/java/androidx/core/appdigest/Checksums.java b/core/core-appdigest/src/main/java/androidx/core/appdigest/Checksums.java
index 63ea5ccc..2cc30c3 100644
--- a/core/core-appdigest/src/main/java/androidx/core/appdigest/Checksums.java
+++ b/core/core-appdigest/src/main/java/androidx/core/appdigest/Checksums.java
@@ -106,8 +106,9 @@
* @throws PackageManager.NameNotFoundException if a package with the given name cannot be
* found on the system.
*/
+ @SuppressWarnings("SyntheticAccessor") /* getChecksumsSync */
public static @NonNull ListenableFuture<Checksum[]> getChecksums(@NonNull Context context,
- @NonNull String packageName, boolean includeSplits, @Checksum.Type int required,
+ @NonNull String packageName, boolean includeSplits, final @Checksum.Type int required,
@NonNull List<Certificate> trustedInstallers, @NonNull Executor executor)
throws CertificateEncodingException, PackageManager.NameNotFoundException {
Preconditions.checkNotNull(context);
@@ -121,17 +122,18 @@
throw new PackageManager.NameNotFoundException(packageName);
}
- ResolvableFuture<Checksum[]> result = ResolvableFuture.create();
+ final ResolvableFuture<Checksum[]> result = ResolvableFuture.create();
if (required == 0) {
result.set(new Checksum[0]);
return result;
}
- List<Pair<String, File>> filesToChecksum = new ArrayList<>();
+ final List<Pair<String, File>> filesToChecksum = new ArrayList<>();
// Adding base split.
- filesToChecksum.add(Pair.create(null, new File(applicationInfo.sourceDir)));
+ final String baseSplitName = null;
+ filesToChecksum.add(Pair.create(baseSplitName, new File(applicationInfo.sourceDir)));
// Adding other splits.
if (Build.VERSION.SDK_INT >= 26 && includeSplits && applicationInfo.splitNames != null) {
@@ -148,7 +150,12 @@
}
}
- executor.execute(() -> getChecksumsSync(filesToChecksum, required, result));
+ executor.execute(new Runnable() {
+ @Override
+ public void run() {
+ getChecksumsSync(filesToChecksum, required, result);
+ }
+ });
return result;
}
@@ -235,18 +242,24 @@
}
private static byte[] getApkChecksum(File file, int type) {
- try (FileInputStream fis = new FileInputStream(file);
- BufferedInputStream bis = new BufferedInputStream(fis)) {
- byte[] dataBytes = new byte[READ_CHUNK_SIZE];
- int nread = 0;
+ try {
+ FileInputStream fis = new FileInputStream(file);
+ BufferedInputStream bis = new BufferedInputStream(fis);
+ try {
+ byte[] dataBytes = new byte[READ_CHUNK_SIZE];
+ int nread = 0;
- final String algo = getMessageDigestAlgoForChecksumType(type);
- MessageDigest md = MessageDigest.getInstance(algo);
- while ((nread = bis.read(dataBytes)) != -1) {
- md.update(dataBytes, 0, nread);
+ final String algo = getMessageDigestAlgoForChecksumType(type);
+ MessageDigest md = MessageDigest.getInstance(algo);
+ while ((nread = bis.read(dataBytes)) != -1) {
+ md.update(dataBytes, 0, nread);
+ }
+
+ return md.digest();
+ } finally {
+ bis.close();
+ fis.close();
}
-
- return md.digest();
} catch (IOException e) {
Log.e(TAG, "Error reading " + file.getAbsolutePath() + " to compute hash.", e);
return null;
diff --git a/core/core-appdigest/src/main/java/androidx/core/appdigest/VerityTreeBuilder.java b/core/core-appdigest/src/main/java/androidx/core/appdigest/VerityTreeBuilder.java
index 4f3bc37..575c85d 100644
--- a/core/core-appdigest/src/main/java/androidx/core/appdigest/VerityTreeBuilder.java
+++ b/core/core-appdigest/src/main/java/androidx/core/appdigest/VerityTreeBuilder.java
@@ -49,10 +49,13 @@
static byte[] computeChunkVerityTreeAndDigest(@NonNull String apkPath)
throws IOException, NoSuchAlgorithmException {
- try (RandomAccessFile apk = new RandomAccessFile(apkPath, "r")) {
+ RandomAccessFile apk = new RandomAccessFile(apkPath, "r");
+ try {
final MessageDigest md = getNewMessageDigest();
ByteBuffer tree = generateVerityTree(md, apk);
return getRootHashFromTree(md, tree);
+ } finally {
+ apk.close();
}
}
@@ -84,7 +87,7 @@
* The tree is currently stored only in memory and is never written out. Nevertheless, it is
* the actual verity tree format on disk, and is supposed to be re-generated on device.
*/
- private static ByteBuffer generateVerityTree(MessageDigest md, RandomAccessFile file)
+ private static ByteBuffer generateVerityTree(MessageDigest md, final RandomAccessFile file)
throws IOException {
int digestSize = md.getDigestLength();
@@ -102,51 +105,58 @@
if (i == levelOffset.length - 2) {
srcSize = file.length();
final FileChannel channel = file.getChannel();
- digestDataByChunks(md, srcSize, (offset, size, dest) -> {
- if (size == 0) {
- return;
- }
- if (size > dest.remaining()) {
- throw new IOException();
- }
-
- long offsetInFile = offset;
- int remaining = size;
- int prevLimit = dest.limit();
- try {
- // FileChannel.read(ByteBuffer) reads up to dest.remaining(). Thus, we
- // need to adjust the buffer's limit to avoid reading more than size bytes.
- dest.limit(dest.position() + size);
- while (remaining > 0) {
- int chunkSize;
- synchronized (file) {
- channel.position(offsetInFile);
- chunkSize = channel.read(dest);
- }
- offsetInFile += chunkSize;
- remaining -= chunkSize;
+ digestDataByChunks(md, srcSize, new DataSource() {
+ @Override
+ public void copyTo(long offset, int size, ByteBuffer dest) throws IOException {
+ if (size == 0) {
+ return;
}
- } finally {
- dest.limit(prevLimit);
+ if (size > dest.remaining()) {
+ throw new IOException();
+ }
+
+ long offsetInFile = offset;
+ int remaining = size;
+ int prevLimit = dest.limit();
+ try {
+ // FileChannel.read(ByteBuffer) reads up to dest.remaining(). Thus,
+ // we need to adjust the buffer's limit to avoid reading more than
+ // size bytes.
+ dest.limit(dest.position() + size);
+ while (remaining > 0) {
+ int chunkSize;
+ synchronized (file) {
+ channel.position(offsetInFile);
+ chunkSize = channel.read(dest);
+ }
+ offsetInFile += chunkSize;
+ remaining -= chunkSize;
+ }
+ } finally {
+ dest.limit(prevLimit);
+ }
}
}, middleBuffer);
} else {
srcSize = (long) levelOffset[i + 2] - levelOffset[i + 1];
- ByteBuffer srcBuffer = slice(verityBuffer.asReadOnlyBuffer(), levelOffset[i + 1],
- levelOffset[i + 2]).asReadOnlyBuffer();
- digestDataByChunks(md, srcSize, (offset, size, dest) -> {
- int chunkPosition = (int) offset;
- int chunkLimit = chunkPosition + size;
+ final ByteBuffer srcBuffer = slice(verityBuffer.asReadOnlyBuffer(),
+ levelOffset[i + 1], levelOffset[i + 2]).asReadOnlyBuffer();
+ digestDataByChunks(md, srcSize, new DataSource() {
+ @Override
+ public void copyTo(long offset, int size, ByteBuffer dest) throws IOException {
+ int chunkPosition = (int) offset;
+ int chunkLimit = chunkPosition + size;
- final ByteBuffer slice;
- synchronized (srcBuffer) {
- srcBuffer.position(0); // to ensure position <= limit invariant
- srcBuffer.limit(chunkLimit);
- srcBuffer.position(chunkPosition);
- slice = srcBuffer.slice();
+ final ByteBuffer slice;
+ synchronized (srcBuffer) {
+ srcBuffer.position(0); // to ensure position <= limit invariant
+ srcBuffer.limit(chunkLimit);
+ srcBuffer.position(chunkPosition);
+ slice = srcBuffer.slice();
+ }
+
+ dest.put(slice);
}
-
- dest.put(slice);
}, middleBuffer);
}
diff --git a/core/core-ktx/lint-baseline.xml b/core/core-ktx/lint-baseline.xml
index c4beed8f..205b7fa 100644
--- a/core/core-ktx/lint-baseline.xml
+++ b/core/core-ktx/lint-baseline.xml
@@ -8,7 +8,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/animation/Animator.kt"
- line="112"
+ line="124"
column="5"/>
</issue>
@@ -48,12 +48,12 @@
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 17, the call containing class androidx.core.util.AtomicFileKt is not annotated with @RequiresApi(x) where x is at least 17. Either annotate the containing class with at least @RequiresApi(17) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(17)."
- errorLine1="inline fun AtomicFile.readBytes(): ByteArray = readFully()"
- errorLine2=" ~~~~~~~~~">
+ errorLine1="public inline fun AtomicFile.readBytes(): ByteArray = readFully()"
+ errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/core/util/AtomicFile.kt"
line="71"
- column="48"/>
+ column="55"/>
</issue>
<issue
@@ -74,7 +74,7 @@
errorLine2=" ~~~">
<location
file="src/main/java/androidx/core/graphics/Bitmap.kt"
- line="112"
+ line="116"
column="41"/>
</issue>
@@ -85,7 +85,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/graphics/Bitmap.kt"
- line="114"
+ line="118"
column="19"/>
</issue>
@@ -96,7 +96,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/core/os/Bundle.kt"
- line="92"
+ line="93"
column="21"/>
</issue>
@@ -107,7 +107,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/core/os/Bundle.kt"
- line="94"
+ line="95"
column="21"/>
</issue>
@@ -118,426 +118,426 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/core/os/Bundle.kt"
- line="96"
+ line="97"
column="21"/>
</issue>
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
- errorLine1="inline operator fun Color.component1() = getComponent(0)"
- errorLine2=" ~~~~~~~~~~~~">
+ errorLine1="public inline operator fun Color.component1(): Float = getComponent(0)"
+ errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/graphics/Color.kt"
line="39"
- column="42"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
- errorLine1="inline operator fun Color.component2() = getComponent(1)"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/Color.kt"
- line="53"
- column="42"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
- errorLine1="inline operator fun Color.component3() = getComponent(2)"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/Color.kt"
- line="67"
- column="42"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
- errorLine1="inline operator fun Color.component4() = getComponent(3)"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/Color.kt"
- line="81"
- column="42"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 24, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 24. Either annotate the containing class with at least @RequiresApi(24) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(24)."
- errorLine1="inline val @receiver:ColorInt Int.luminance get() = Color.luminance(this)"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/Color.kt"
- line="199"
- column="59"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
- errorLine1="inline fun @receiver:ColorInt Int.toColor(): Color = Color.valueOf(this)"
- errorLine2=" ~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/Color.kt"
- line="206"
- column="60"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
- errorLine1="inline fun @receiver:ColorInt Int.toColorLong() = Color.pack(this)"
- errorLine2=" ~~~~">
- <location
- file="src/main/java/androidx/core/graphics/Color.kt"
- line="214"
- column="57"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
- errorLine1="inline operator fun @receiver:ColorLong Long.component1() = Color.red(this)"
- errorLine2=" ~~~">
- <location
- file="src/main/java/androidx/core/graphics/Color.kt"
- line="228"
- column="67"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
- errorLine1="inline operator fun @receiver:ColorLong Long.component2() = Color.green(this)"
- errorLine2=" ~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/Color.kt"
- line="242"
- column="67"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
- errorLine1="inline operator fun @receiver:ColorLong Long.component3() = Color.blue(this)"
- errorLine2=" ~~~~">
- <location
- file="src/main/java/androidx/core/graphics/Color.kt"
- line="256"
- column="67"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
- errorLine1="inline operator fun @receiver:ColorLong Long.component4() = Color.alpha(this)"
- errorLine2=" ~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/Color.kt"
- line="270"
- column="67"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
- errorLine1="inline val @receiver:ColorLong Long.alpha get() = Color.alpha(this)"
- errorLine2=" ~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/Color.kt"
- line="279"
- column="57"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
- errorLine1="inline val @receiver:ColorLong Long.red get() = Color.red(this)"
- errorLine2=" ~~~">
- <location
- file="src/main/java/androidx/core/graphics/Color.kt"
- line="288"
- column="55"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
- errorLine1="inline val @receiver:ColorLong Long.green get() = Color.green(this)"
- errorLine2=" ~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/Color.kt"
- line="297"
- column="57"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
- errorLine1="inline val @receiver:ColorLong Long.blue get() = Color.blue(this)"
- errorLine2=" ~~~~">
- <location
- file="src/main/java/androidx/core/graphics/Color.kt"
- line="306"
column="56"/>
</issue>
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
- errorLine1="inline val @receiver:ColorLong Long.luminance get() = Color.luminance(this)"
- errorLine2=" ~~~~~~~~~">
+ errorLine1="public inline operator fun Color.component2(): Float = getComponent(1)"
+ errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/graphics/Color.kt"
- line="313"
- column="61"/>
+ line="53"
+ column="56"/>
</issue>
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
- errorLine1="inline fun @receiver:ColorLong Long.toColor(): Color = Color.valueOf(this)"
- errorLine2=" ~~~~~~~">
+ errorLine1="public inline operator fun Color.component3(): Float = getComponent(2)"
+ errorLine2=" ~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/graphics/Color.kt"
+ line="67"
+ column="56"/>
+ </issue>
+
+ <issue
+ id="UnsafeNewApiCall"
+ message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
+ errorLine1="public inline operator fun Color.component4(): Float = getComponent(3)"
+ errorLine2=" ~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/graphics/Color.kt"
+ line="81"
+ column="56"/>
+ </issue>
+
+ <issue
+ id="UnsafeNewApiCall"
+ message="This call is to a method from API 24, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 24. Either annotate the containing class with at least @RequiresApi(24) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(24)."
+ errorLine1=" get() = Color.luminance(this)"
+ errorLine2=" ~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/graphics/Color.kt"
+ line="200"
+ column="19"/>
+ </issue>
+
+ <issue
+ id="UnsafeNewApiCall"
+ message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
+ errorLine1="public inline fun @receiver:ColorInt Int.toColor(): Color = Color.valueOf(this)"
+ errorLine2=" ~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/graphics/Color.kt"
+ line="207"
+ column="67"/>
+ </issue>
+
+ <issue
+ id="UnsafeNewApiCall"
+ message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
+ errorLine1="public inline fun @receiver:ColorInt Int.toColorLong(): Long = Color.pack(this)"
+ errorLine2=" ~~~~">
+ <location
+ file="src/main/java/androidx/core/graphics/Color.kt"
+ line="215"
+ column="70"/>
+ </issue>
+
+ <issue
+ id="UnsafeNewApiCall"
+ message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
+ errorLine1="public inline operator fun @receiver:ColorLong Long.component1(): Float = Color.red(this)"
+ errorLine2=" ~~~">
+ <location
+ file="src/main/java/androidx/core/graphics/Color.kt"
+ line="229"
+ column="81"/>
+ </issue>
+
+ <issue
+ id="UnsafeNewApiCall"
+ message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
+ errorLine1="public inline operator fun @receiver:ColorLong Long.component2(): Float = Color.green(this)"
+ errorLine2=" ~~~~~">
+ <location
+ file="src/main/java/androidx/core/graphics/Color.kt"
+ line="243"
+ column="81"/>
+ </issue>
+
+ <issue
+ id="UnsafeNewApiCall"
+ message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
+ errorLine1="public inline operator fun @receiver:ColorLong Long.component3(): Float = Color.blue(this)"
+ errorLine2=" ~~~~">
+ <location
+ file="src/main/java/androidx/core/graphics/Color.kt"
+ line="257"
+ column="81"/>
+ </issue>
+
+ <issue
+ id="UnsafeNewApiCall"
+ message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
+ errorLine1="public inline operator fun @receiver:ColorLong Long.component4(): Float = Color.alpha(this)"
+ errorLine2=" ~~~~~">
+ <location
+ file="src/main/java/androidx/core/graphics/Color.kt"
+ line="271"
+ column="81"/>
+ </issue>
+
+ <issue
+ id="UnsafeNewApiCall"
+ message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
+ errorLine1=" get() = Color.alpha(this)"
+ errorLine2=" ~~~~~">
+ <location
+ file="src/main/java/androidx/core/graphics/Color.kt"
+ line="281"
+ column="19"/>
+ </issue>
+
+ <issue
+ id="UnsafeNewApiCall"
+ message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
+ errorLine1=" get() = Color.red(this)"
+ errorLine2=" ~~~">
+ <location
+ file="src/main/java/androidx/core/graphics/Color.kt"
+ line="291"
+ column="19"/>
+ </issue>
+
+ <issue
+ id="UnsafeNewApiCall"
+ message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
+ errorLine1=" get() = Color.green(this)"
+ errorLine2=" ~~~~~">
+ <location
+ file="src/main/java/androidx/core/graphics/Color.kt"
+ line="301"
+ column="19"/>
+ </issue>
+
+ <issue
+ id="UnsafeNewApiCall"
+ message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
+ errorLine1=" get() = Color.blue(this)"
+ errorLine2=" ~~~~">
+ <location
+ file="src/main/java/androidx/core/graphics/Color.kt"
+ line="311"
+ column="19"/>
+ </issue>
+
+ <issue
+ id="UnsafeNewApiCall"
+ message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
+ errorLine1=" get() = Color.luminance(this)"
+ errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/core/graphics/Color.kt"
line="319"
- column="62"/>
+ column="19"/>
</issue>
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
- errorLine1="inline fun @receiver:ColorLong Long.toColorInt() = Color.toArgb(this)"
- errorLine2=" ~~~~~~">
+ errorLine1="public inline fun @receiver:ColorLong Long.toColor(): Color = Color.valueOf(this)"
+ errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/core/graphics/Color.kt"
- line="326"
- column="58"/>
+ line="325"
+ column="69"/>
</issue>
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
- errorLine1="inline val @receiver:ColorLong Long.isSrgb get() = Color.isSrgb(this)"
- errorLine2=" ~~~~~~">
+ errorLine1="public inline fun @receiver:ColorLong Long.toColorInt(): Int = Color.toArgb(this)"
+ errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/core/graphics/Color.kt"
- line="333"
- column="58"/>
+ line="332"
+ column="70"/>
</issue>
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
- errorLine1="inline val @receiver:ColorLong Long.isWideGamut get() = Color.isWideGamut(this)"
- errorLine2=" ~~~~~~~~~~~">
+ errorLine1=" get() = Color.isSrgb(this)"
+ errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/core/graphics/Color.kt"
- line="339"
- column="63"/>
+ line="340"
+ column="19"/>
</issue>
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
- errorLine1="inline val @receiver:ColorLong Long.colorSpace: ColorSpace get() = Color.colorSpace(this)"
- errorLine2=" ~~~~~~~~~~">
+ errorLine1=" get() = Color.isWideGamut(this)"
+ errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/graphics/Color.kt"
- line="345"
+ line="347"
+ column="19"/>
+ </issue>
+
+ <issue
+ id="UnsafeNewApiCall"
+ message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
+ errorLine1="public inline val @receiver:ColorLong Long.colorSpace: ColorSpace get() = Color.colorSpace(this)"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/graphics/Color.kt"
+ line="353"
+ column="81"/>
+ </issue>
+
+ <issue
+ id="UnsafeNewApiCall"
+ message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
+ errorLine1=" Color.convert(this, ColorSpace.get(colorSpace))"
+ errorLine2=" ~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/graphics/Color.kt"
+ line="365"
+ column="11"/>
+ </issue>
+
+ <issue
+ id="UnsafeNewApiCall"
+ message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
+ errorLine1=" Color.convert(this, ColorSpace.get(colorSpace))"
+ errorLine2=" ~~~">
+ <location
+ file="src/main/java/androidx/core/graphics/Color.kt"
+ line="365"
+ column="36"/>
+ </issue>
+
+ <issue
+ id="UnsafeNewApiCall"
+ message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
+ errorLine1=" Color.convert(this, colorSpace)"
+ errorLine2=" ~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/graphics/Color.kt"
+ line="377"
+ column="11"/>
+ </issue>
+
+ <issue
+ id="UnsafeNewApiCall"
+ message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
+ errorLine1=" Color.convert(this, ColorSpace.get(colorSpace))"
+ errorLine2=" ~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/graphics/Color.kt"
+ line="389"
+ column="11"/>
+ </issue>
+
+ <issue
+ id="UnsafeNewApiCall"
+ message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
+ errorLine1=" Color.convert(this, ColorSpace.get(colorSpace))"
+ errorLine2=" ~~~">
+ <location
+ file="src/main/java/androidx/core/graphics/Color.kt"
+ line="389"
+ column="36"/>
+ </issue>
+
+ <issue
+ id="UnsafeNewApiCall"
+ message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
+ errorLine1=" Color.convert(this, colorSpace)"
+ errorLine2=" ~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/graphics/Color.kt"
+ line="401"
+ column="11"/>
+ </issue>
+
+ <issue
+ id="UnsafeNewApiCall"
+ message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
+ errorLine1=" convert(ColorSpace.get(colorSpace))"
+ errorLine2=" ~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/graphics/Color.kt"
+ line="412"
+ column="5"/>
+ </issue>
+
+ <issue
+ id="UnsafeNewApiCall"
+ message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
+ errorLine1=" convert(ColorSpace.get(colorSpace))"
+ errorLine2=" ~~~">
+ <location
+ file="src/main/java/androidx/core/graphics/Color.kt"
+ line="412"
+ column="24"/>
+ </issue>
+
+ <issue
+ id="UnsafeNewApiCall"
+ message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
+ errorLine1="public inline infix fun Color.convertTo(colorSpace: ColorSpace): Color = convert(colorSpace)"
+ errorLine2=" ~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/graphics/Color.kt"
+ line="422"
column="74"/>
</issue>
<issue
id="UnsafeNewApiCall"
- message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
- errorLine1=" Color.convert(this, ColorSpace.get(colorSpace))"
- errorLine2=" ~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/Color.kt"
- line="357"
- column="15"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
- errorLine1=" Color.convert(this, ColorSpace.get(colorSpace))"
- errorLine2=" ~~~">
- <location
- file="src/main/java/androidx/core/graphics/Color.kt"
- line="357"
- column="40"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
- errorLine1=" Color.convert(this, colorSpace)"
- errorLine2=" ~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/Color.kt"
- line="369"
- column="15"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
- errorLine1=" Color.convert(this, ColorSpace.get(colorSpace))"
- errorLine2=" ~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/Color.kt"
- line="381"
- column="15"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
- errorLine1=" Color.convert(this, ColorSpace.get(colorSpace))"
- errorLine2=" ~~~">
- <location
- file="src/main/java/androidx/core/graphics/Color.kt"
- line="381"
- column="40"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
- errorLine1=" Color.convert(this, colorSpace)"
- errorLine2=" ~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/Color.kt"
- line="393"
- column="15"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
- errorLine1="inline infix fun Color.convertTo(colorSpace: ColorSpace.Named) = convert(ColorSpace.get(colorSpace))"
- errorLine2=" ~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/Color.kt"
- line="403"
- column="66"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
- errorLine1="inline infix fun Color.convertTo(colorSpace: ColorSpace.Named) = convert(ColorSpace.get(colorSpace))"
- errorLine2=" ~~~">
- <location
- file="src/main/java/androidx/core/graphics/Color.kt"
- line="403"
- column="85"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 26, the call containing class androidx.core.graphics.ColorKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
- errorLine1="inline infix fun Color.convertTo(colorSpace: ColorSpace) = convert(colorSpace)"
- errorLine2=" ~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/Color.kt"
- line="413"
- column="60"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
message="This call is to a method from API 26, the call containing class androidx.core.graphics.drawable.ColorDrawableKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
- errorLine1="inline fun Color.toDrawable() = ColorDrawable(toArgb())"
- errorLine2=" ~~~~~~">
+ errorLine1="public inline fun Color.toDrawable(): ColorDrawable = ColorDrawable(toArgb())"
+ errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/ColorDrawable.kt"
line="31"
+ column="69"/>
+ </issue>
+
+ <issue
+ id="UnsafeNewApiCall"
+ message="This call is to a method from API 26, the call containing class androidx.core.util.HalfKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
+ errorLine1="public inline fun @receiver:HalfFloat Short.toHalf(): Half = Half.valueOf(this)"
+ errorLine2=" ~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/util/Half.kt"
+ line="33"
+ column="67"/>
+ </issue>
+
+ <issue
+ id="UnsafeNewApiCall"
+ message="This call is to a method from API 26, the call containing class androidx.core.util.HalfKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
+ errorLine1="public inline fun Float.toHalf(): Half = Half.valueOf(this)"
+ errorLine2=" ~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/util/Half.kt"
+ line="41"
column="47"/>
</issue>
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 26, the call containing class androidx.core.util.HalfKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
- errorLine1="inline fun @receiver:HalfFloat Short.toHalf(): Half = Half.valueOf(this)"
- errorLine2=" ~~~~~~~">
- <location
- file="src/main/java/androidx/core/util/Half.kt"
- line="33"
- column="60"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 26, the call containing class androidx.core.util.HalfKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
- errorLine1="inline fun Float.toHalf(): Half = Half.valueOf(this)"
- errorLine2=" ~~~~~~~">
- <location
- file="src/main/java/androidx/core/util/Half.kt"
- line="41"
- column="40"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 26, the call containing class androidx.core.util.HalfKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
- errorLine1="inline fun String.toHalf(): Half = Half.valueOf(this)"
- errorLine2=" ~~~~~~~">
+ errorLine1="public inline fun String.toHalf(): Half = Half.valueOf(this)"
+ errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/core/util/Half.kt"
line="57"
- column="41"/>
+ column="48"/>
</issue>
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 26, the call containing class androidx.core.graphics.drawable.IconKt is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
- errorLine1="inline fun Bitmap.toAdaptiveIcon(): Icon = Icon.createWithAdaptiveBitmap(this)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
+ errorLine1="public inline fun Bitmap.toAdaptiveIcon(): Icon = Icon.createWithAdaptiveBitmap(this)"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/Icon.kt"
line="32"
- column="49"/>
+ column="56"/>
</issue>
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 23, the call containing class androidx.core.graphics.drawable.IconKt is not annotated with @RequiresApi(x) where x is at least 23. Either annotate the containing class with at least @RequiresApi(23) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(23)."
- errorLine1="inline fun Bitmap.toIcon(): Icon = Icon.createWithBitmap(this)"
- errorLine2=" ~~~~~~~~~~~~~~~~">
+ errorLine1="public inline fun Bitmap.toIcon(): Icon = Icon.createWithBitmap(this)"
+ errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/Icon.kt"
line="40"
- column="41"/>
+ column="48"/>
</issue>
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 23, the call containing class androidx.core.graphics.drawable.IconKt is not annotated with @RequiresApi(x) where x is at least 23. Either annotate the containing class with at least @RequiresApi(23) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(23)."
- errorLine1="inline fun Uri.toIcon(): Icon = Icon.createWithContentUri(this)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
+ errorLine1="public inline fun Uri.toIcon(): Icon = Icon.createWithContentUri(this)"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/Icon.kt"
line="48"
- column="38"/>
+ column="45"/>
</issue>
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 23, the call containing class androidx.core.graphics.drawable.IconKt is not annotated with @RequiresApi(x) where x is at least 23. Either annotate the containing class with at least @RequiresApi(23) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(23)."
- errorLine1="inline fun ByteArray.toIcon(): Icon = Icon.createWithData(this, 0, size)"
- errorLine2=" ~~~~~~~~~~~~~~">
+ errorLine1="public inline fun ByteArray.toIcon(): Icon = Icon.createWithData(this, 0, size)"
+ errorLine2=" ~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/Icon.kt"
line="56"
- column="44"/>
+ column="51"/>
</issue>
<issue
@@ -576,34 +576,34 @@
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 16, the call containing class androidx.core.util.LongSparseArrayKt is not annotated with @RequiresApi(x) where x is at least 16. Either annotate the containing class with at least @RequiresApi(16) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(16)."
- errorLine1="inline val <T> LongSparseArray<T>.size get() = size()"
- errorLine2=" ~~~~">
+ errorLine1="public inline val <T> LongSparseArray<T>.size: Int get() = size()"
+ errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/util/LongSparseArray.kt"
line="26"
- column="48"/>
+ column="60"/>
</issue>
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 16, the call containing class androidx.core.util.LongSparseArrayKt is not annotated with @RequiresApi(x) where x is at least 16. Either annotate the containing class with at least @RequiresApi(16) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(16)."
- errorLine1="inline operator fun <T> LongSparseArray<T>.contains(key: Long) = indexOfKey(key) >= 0"
- errorLine2=" ~~~~~~~~~~">
+ errorLine1=" indexOfKey(key) >= 0"
+ errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/core/util/LongSparseArray.kt"
- line="30"
- column="66"/>
+ line="31"
+ column="5"/>
</issue>
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 16, the call containing class androidx.core.util.LongSparseArrayKt is not annotated with @RequiresApi(x) where x is at least 16. Either annotate the containing class with at least @RequiresApi(16) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(16)."
- errorLine1="inline operator fun <T> LongSparseArray<T>.set(key: Long, value: T) = put(key, value)"
- errorLine2=" ~~~">
+ errorLine1="public inline operator fun <T> LongSparseArray<T>.set(key: Long, value: T): Unit = put(key, value)"
+ errorLine2=" ~~~">
<location
file="src/main/java/androidx/core/util/LongSparseArray.kt"
- line="34"
- column="71"/>
+ line="35"
+ column="84"/>
</issue>
<issue
@@ -613,7 +613,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/util/LongSparseArray.kt"
- line="39"
+ line="40"
column="15"/>
</issue>
@@ -624,7 +624,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/util/LongSparseArray.kt"
- line="39"
+ line="40"
column="34"/>
</issue>
@@ -635,30 +635,30 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/util/LongSparseArray.kt"
- line="39"
+ line="40"
column="49"/>
</issue>
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 16, the call containing class androidx.core.util.LongSparseArrayKt is not annotated with @RequiresApi(x) where x is at least 16. Either annotate the containing class with at least @RequiresApi(16) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(16)."
- errorLine1="inline fun <T> LongSparseArray<T>.containsKey(key: Long) = indexOfKey(key) >= 0"
- errorLine2=" ~~~~~~~~~~">
+ errorLine1="public inline fun <T> LongSparseArray<T>.containsKey(key: Long): Boolean = indexOfKey(key) >= 0"
+ errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/core/util/LongSparseArray.kt"
- line="47"
- column="60"/>
+ line="48"
+ column="76"/>
</issue>
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 16, the call containing class androidx.core.util.LongSparseArrayKt is not annotated with @RequiresApi(x) where x is at least 16. Either annotate the containing class with at least @RequiresApi(16) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(16)."
- errorLine1="inline fun <T> LongSparseArray<T>.containsValue(value: T) = indexOfValue(value) >= 0"
- errorLine2=" ~~~~~~~~~~~~">
+ errorLine1=" indexOfValue(value) >= 0"
+ errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/util/LongSparseArray.kt"
- line="51"
- column="61"/>
+ line="53"
+ column="5"/>
</issue>
<issue
@@ -668,7 +668,7 @@
errorLine2=" ~~~">
<location
file="src/main/java/androidx/core/util/LongSparseArray.kt"
- line="56"
+ line="58"
column="5"/>
</issue>
@@ -679,30 +679,30 @@
errorLine2=" ~~~">
<location
file="src/main/java/androidx/core/util/LongSparseArray.kt"
- line="61"
+ line="63"
column="5"/>
</issue>
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 16, the call containing class androidx.core.util.LongSparseArrayKt is not annotated with @RequiresApi(x) where x is at least 16. Either annotate the containing class with at least @RequiresApi(16) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(16)."
- errorLine1="inline fun <T> LongSparseArray<T>.isEmpty() = size() == 0"
- errorLine2=" ~~~~">
+ errorLine1="public inline fun <T> LongSparseArray<T>.isEmpty(): Boolean = size() == 0"
+ errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/util/LongSparseArray.kt"
- line="65"
- column="47"/>
+ line="67"
+ column="63"/>
</issue>
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 16, the call containing class androidx.core.util.LongSparseArrayKt is not annotated with @RequiresApi(x) where x is at least 16. Either annotate the containing class with at least @RequiresApi(16) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(16)."
- errorLine1="inline fun <T> LongSparseArray<T>.isNotEmpty() = size() != 0"
- errorLine2=" ~~~~">
+ errorLine1="public inline fun <T> LongSparseArray<T>.isNotEmpty(): Boolean = size() != 0"
+ errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/util/LongSparseArray.kt"
- line="69"
- column="50"/>
+ line="71"
+ column="66"/>
</issue>
<issue
@@ -712,7 +712,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/core/util/LongSparseArray.kt"
- line="74"
+ line="76"
column="17"/>
</issue>
@@ -723,7 +723,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/core/util/LongSparseArray.kt"
- line="75"
+ line="77"
column="32"/>
</issue>
@@ -734,7 +734,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/core/util/LongSparseArray.kt"
- line="76"
+ line="78"
column="9"/>
</issue>
@@ -745,7 +745,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/util/LongSparseArray.kt"
- line="89"
+ line="91"
column="27"/>
</issue>
@@ -756,7 +756,7 @@
errorLine2=" ~~~~~">
<location
file="src/main/java/androidx/core/util/LongSparseArray.kt"
- line="90"
+ line="92"
column="16"/>
</issue>
@@ -767,7 +767,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/core/util/LongSparseArray.kt"
- line="90"
+ line="92"
column="30"/>
</issue>
@@ -778,7 +778,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/util/LongSparseArray.kt"
- line="98"
+ line="100"
column="38"/>
</issue>
@@ -789,7 +789,7 @@
errorLine2=" ~~~~~">
<location
file="src/main/java/androidx/core/util/LongSparseArray.kt"
- line="99"
+ line="101"
column="31"/>
</issue>
@@ -800,7 +800,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/util/LongSparseArray.kt"
- line="106"
+ line="108"
column="38"/>
</issue>
@@ -811,7 +811,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/core/util/LongSparseArray.kt"
- line="107"
+ line="109"
column="27"/>
</issue>
@@ -822,7 +822,7 @@
errorLine2=" ~~">
<location
file="src/main/java/androidx/core/graphics/Path.kt"
- line="42"
+ line="43"
column="9"/>
</issue>
@@ -833,7 +833,7 @@
errorLine2=" ~~">
<location
file="src/main/java/androidx/core/graphics/Path.kt"
- line="52"
+ line="53"
column="9"/>
</issue>
@@ -844,7 +844,7 @@
errorLine2=" ~~">
<location
file="src/main/java/androidx/core/graphics/Path.kt"
- line="69"
+ line="70"
column="9"/>
</issue>
@@ -855,19 +855,19 @@
errorLine2=" ~~">
<location
file="src/main/java/androidx/core/graphics/Path.kt"
- line="79"
+ line="80"
column="9"/>
</issue>
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 21, the call containing class androidx.core.os.PersistableBundleKt is not annotated with @RequiresApi(x) where x is at least 21. Either annotate the containing class with at least @RequiresApi(21) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(21)."
- errorLine1="fun persistableBundleOf(vararg pairs: Pair<String, Any?>) = PersistableBundle(pairs.size).apply {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ errorLine1="): PersistableBundle = PersistableBundle(pairs.size).apply {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/os/PersistableBundle.kt"
- line="29"
- column="61"/>
+ line="31"
+ column="24"/>
</issue>
<issue
@@ -877,7 +877,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/core/os/PersistableBundle.kt"
- line="32"
+ line="34"
column="21"/>
</issue>
@@ -888,7 +888,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/core/os/PersistableBundle.kt"
- line="37"
+ line="39"
column="21"/>
</issue>
@@ -899,7 +899,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/core/os/PersistableBundle.kt"
- line="42"
+ line="44"
column="26"/>
</issue>
@@ -910,7 +910,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/core/os/PersistableBundle.kt"
- line="43"
+ line="45"
column="23"/>
</issue>
@@ -921,7 +921,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/core/os/PersistableBundle.kt"
- line="44"
+ line="46"
column="24"/>
</issue>
@@ -932,7 +932,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/core/os/PersistableBundle.kt"
- line="47"
+ line="49"
column="26"/>
</issue>
@@ -943,7 +943,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/os/PersistableBundle.kt"
- line="52"
+ line="54"
column="21"/>
</issue>
@@ -954,7 +954,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/os/PersistableBundle.kt"
- line="57"
+ line="59"
column="31"/>
</issue>
@@ -965,7 +965,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/os/PersistableBundle.kt"
- line="58"
+ line="60"
column="28"/>
</issue>
@@ -976,7 +976,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/os/PersistableBundle.kt"
- line="59"
+ line="61"
column="29"/>
</issue>
@@ -987,52 +987,52 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/os/PersistableBundle.kt"
- line="67"
+ line="69"
column="25"/>
</issue>
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 21, the call containing class androidx.core.util.RangeKt is not annotated with @RequiresApi(x) where x is at least 21. Either annotate the containing class with at least @RequiresApi(21) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(21)."
- errorLine1="inline infix fun <T : Comparable<T>> T.rangeTo(that: T): Range<T> = Range(this, that)"
- errorLine2=" ~~~~~~~~~~~~~~~~~">
+ errorLine1="public inline infix fun <T : Comparable<T>> T.rangeTo(that: T): Range<T> = Range(this, that)"
+ errorLine2=" ~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/util/Range.kt"
line="30"
- column="69"/>
+ column="76"/>
</issue>
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 21, the call containing class androidx.core.util.RangeKt is not annotated with @RequiresApi(x) where x is at least 21. Either annotate the containing class with at least @RequiresApi(21) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(21)."
- errorLine1="inline operator fun <T : Comparable<T>> Range<T>.plus(value: T): Range<T> = extend(value)"
- errorLine2=" ~~~~~~">
- <location
- file="src/main/java/androidx/core/util/Range.kt"
- line="34"
- column="77"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 21, the call containing class androidx.core.util.RangeKt is not annotated with @RequiresApi(x) where x is at least 21. Either annotate the containing class with at least @RequiresApi(21) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(21)."
- errorLine1="inline operator fun <T : Comparable<T>> Range<T>.plus(other: Range<T>): Range<T> = extend(other)"
+ errorLine1="public inline operator fun <T : Comparable<T>> Range<T>.plus(value: T): Range<T> = extend(value)"
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/core/util/Range.kt"
- line="38"
+ line="34"
column="84"/>
</issue>
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 21, the call containing class androidx.core.util.RangeKt is not annotated with @RequiresApi(x) where x is at least 21. Either annotate the containing class with at least @RequiresApi(21) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(21)."
- errorLine1="inline infix fun <T : Comparable<T>> Range<T>.and(other: Range<T>): Range<T> = intersect(other)"
- errorLine2=" ~~~~~~~~~">
+ errorLine1=" extend(other)"
+ errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/core/util/Range.kt"
- line="46"
- column="80"/>
+ line="39"
+ column="5"/>
+ </issue>
+
+ <issue
+ id="UnsafeNewApiCall"
+ message="This call is to a method from API 21, the call containing class androidx.core.util.RangeKt is not annotated with @RequiresApi(x) where x is at least 21. Either annotate the containing class with at least @RequiresApi(21) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(21)."
+ errorLine1=" intersect(other)"
+ errorLine2=" ~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/util/Range.kt"
+ line="48"
+ column="5"/>
</issue>
<issue
@@ -1042,7 +1042,7 @@
errorLine2=" ~~~~~">
<location
file="src/main/java/androidx/core/util/Range.kt"
- line="51"
+ line="53"
column="39"/>
</issue>
@@ -1053,96 +1053,96 @@
errorLine2=" ~~~~~">
<location
file="src/main/java/androidx/core/util/Range.kt"
- line="52"
+ line="54"
column="32"/>
</issue>
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 21, the call containing class androidx.core.util.RangeKt is not annotated with @RequiresApi(x) where x is at least 21. Either annotate the containing class with at least @RequiresApi(21) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(21)."
- errorLine1="fun <T : Comparable<T>> ClosedRange<T>.toRange(): Range<T> = Range(start, endInclusive)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ errorLine1="public fun <T : Comparable<T>> ClosedRange<T>.toRange(): Range<T> = Range(start, endInclusive)"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/util/Range.kt"
- line="57"
- column="62"/>
+ line="59"
+ column="69"/>
</issue>
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 21, the call containing class androidx.core.util.SizeKt is not annotated with @RequiresApi(x) where x is at least 21. Either annotate the containing class with at least @RequiresApi(21) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(21)."
- errorLine1="inline operator fun Size.component1() = width"
- errorLine2=" ~~~~~">
+ errorLine1="public inline operator fun Size.component1(): Int = width"
+ errorLine2=" ~~~~~">
<location
file="src/main/java/androidx/core/util/Size.kt"
line="35"
- column="41"/>
+ column="53"/>
</issue>
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 21, the call containing class androidx.core.util.SizeKt is not annotated with @RequiresApi(x) where x is at least 21. Either annotate the containing class with at least @RequiresApi(21) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(21)."
- errorLine1="inline operator fun Size.component2() = height"
- errorLine2=" ~~~~~~">
+ errorLine1="public inline operator fun Size.component2(): Int = height"
+ errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/core/util/Size.kt"
line="47"
- column="41"/>
+ column="53"/>
</issue>
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 21, the call containing class androidx.core.util.SizeKt is not annotated with @RequiresApi(x) where x is at least 21. Either annotate the containing class with at least @RequiresApi(21) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(21)."
- errorLine1="inline operator fun SizeF.component1() = width"
- errorLine2=" ~~~~~">
+ errorLine1="public inline operator fun SizeF.component1(): Float = width"
+ errorLine2=" ~~~~~">
<location
file="src/main/java/androidx/core/util/Size.kt"
line="59"
- column="42"/>
+ column="56"/>
</issue>
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 21, the call containing class androidx.core.util.SizeKt is not annotated with @RequiresApi(x) where x is at least 21. Either annotate the containing class with at least @RequiresApi(21) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(21)."
- errorLine1="inline operator fun SizeF.component2() = height"
- errorLine2=" ~~~~~~">
+ errorLine1="public inline operator fun SizeF.component2(): Float = height"
+ errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/core/util/Size.kt"
line="71"
- column="42"/>
+ column="56"/>
</issue>
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 18, the call containing class androidx.core.util.SparseLongArrayKt is not annotated with @RequiresApi(x) where x is at least 18. Either annotate the containing class with at least @RequiresApi(18) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(18)."
- errorLine1="inline val SparseLongArray.size get() = size()"
- errorLine2=" ~~~~">
+ errorLine1="public inline val SparseLongArray.size: Int get() = size()"
+ errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/util/SparseLongArray.kt"
line="26"
- column="41"/>
+ column="53"/>
</issue>
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 18, the call containing class androidx.core.util.SparseLongArrayKt is not annotated with @RequiresApi(x) where x is at least 18. Either annotate the containing class with at least @RequiresApi(18) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(18)."
- errorLine1="inline operator fun SparseLongArray.contains(key: Int) = indexOfKey(key) >= 0"
- errorLine2=" ~~~~~~~~~~">
+ errorLine1="public inline operator fun SparseLongArray.contains(key: Int): Boolean = indexOfKey(key) >= 0"
+ errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/core/util/SparseLongArray.kt"
line="30"
- column="58"/>
+ column="74"/>
</issue>
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 18, the call containing class androidx.core.util.SparseLongArrayKt is not annotated with @RequiresApi(x) where x is at least 18. Either annotate the containing class with at least @RequiresApi(18) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(18)."
- errorLine1="inline operator fun SparseLongArray.set(key: Int, value: Long) = put(key, value)"
- errorLine2=" ~~~">
+ errorLine1="public inline operator fun SparseLongArray.set(key: Int, value: Long): Unit = put(key, value)"
+ errorLine2=" ~~~">
<location
file="src/main/java/androidx/core/util/SparseLongArray.kt"
line="34"
- column="66"/>
+ column="79"/>
</issue>
<issue
@@ -1181,34 +1181,34 @@
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 18, the call containing class androidx.core.util.SparseLongArrayKt is not annotated with @RequiresApi(x) where x is at least 18. Either annotate the containing class with at least @RequiresApi(18) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(18)."
- errorLine1="inline fun SparseLongArray.containsKey(key: Int) = indexOfKey(key) >= 0"
- errorLine2=" ~~~~~~~~~~">
+ errorLine1="public inline fun SparseLongArray.containsKey(key: Int): Boolean = indexOfKey(key) >= 0"
+ errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/core/util/SparseLongArray.kt"
line="47"
- column="52"/>
+ column="68"/>
</issue>
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 18, the call containing class androidx.core.util.SparseLongArrayKt is not annotated with @RequiresApi(x) where x is at least 18. Either annotate the containing class with at least @RequiresApi(18) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(18)."
- errorLine1="inline fun SparseLongArray.containsValue(value: Long) = indexOfValue(value) >= 0"
- errorLine2=" ~~~~~~~~~~~~">
+ errorLine1="public inline fun SparseLongArray.containsValue(value: Long): Boolean = indexOfValue(value) >= 0"
+ errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/util/SparseLongArray.kt"
line="51"
- column="57"/>
+ column="73"/>
</issue>
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 18, the call containing class androidx.core.util.SparseLongArrayKt is not annotated with @RequiresApi(x) where x is at least 18. Either annotate the containing class with at least @RequiresApi(18) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(18)."
- errorLine1="inline fun SparseLongArray.getOrDefault(key: Int, defaultValue: Long) = get(key, defaultValue)"
- errorLine2=" ~~~">
+ errorLine1=" get(key, defaultValue)"
+ errorLine2=" ~~~">
<location
file="src/main/java/androidx/core/util/SparseLongArray.kt"
- line="55"
- column="73"/>
+ line="56"
+ column="5"/>
</issue>
<issue
@@ -1218,7 +1218,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/core/util/SparseLongArray.kt"
- line="60"
+ line="61"
column="5"/>
</issue>
@@ -1229,30 +1229,30 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/core/util/SparseLongArray.kt"
- line="60"
+ line="61"
column="40"/>
</issue>
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 18, the call containing class androidx.core.util.SparseLongArrayKt is not annotated with @RequiresApi(x) where x is at least 18. Either annotate the containing class with at least @RequiresApi(18) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(18)."
- errorLine1="inline fun SparseLongArray.isEmpty() = size() == 0"
- errorLine2=" ~~~~">
+ errorLine1="public inline fun SparseLongArray.isEmpty(): Boolean = size() == 0"
+ errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/util/SparseLongArray.kt"
- line="64"
- column="40"/>
+ line="65"
+ column="56"/>
</issue>
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 18, the call containing class androidx.core.util.SparseLongArrayKt is not annotated with @RequiresApi(x) where x is at least 18. Either annotate the containing class with at least @RequiresApi(18) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(18)."
- errorLine1="inline fun SparseLongArray.isNotEmpty() = size() != 0"
- errorLine2=" ~~~~">
+ errorLine1="public inline fun SparseLongArray.isNotEmpty(): Boolean = size() != 0"
+ errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/util/SparseLongArray.kt"
- line="68"
- column="43"/>
+ line="69"
+ column="59"/>
</issue>
<issue
@@ -1262,7 +1262,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/core/util/SparseLongArray.kt"
- line="73"
+ line="74"
column="17"/>
</issue>
@@ -1273,7 +1273,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/core/util/SparseLongArray.kt"
- line="74"
+ line="75"
column="32"/>
</issue>
@@ -1284,7 +1284,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/core/util/SparseLongArray.kt"
- line="75"
+ line="76"
column="9"/>
</issue>
@@ -1295,7 +1295,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/util/SparseLongArray.kt"
- line="88"
+ line="89"
column="27"/>
</issue>
@@ -1306,7 +1306,7 @@
errorLine2=" ~~~~~">
<location
file="src/main/java/androidx/core/util/SparseLongArray.kt"
- line="89"
+ line="90"
column="16"/>
</issue>
@@ -1317,7 +1317,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/core/util/SparseLongArray.kt"
- line="89"
+ line="90"
column="30"/>
</issue>
@@ -1328,7 +1328,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/util/SparseLongArray.kt"
- line="97"
+ line="98"
column="38"/>
</issue>
@@ -1339,7 +1339,7 @@
errorLine2=" ~~~~~">
<location
file="src/main/java/androidx/core/util/SparseLongArray.kt"
- line="98"
+ line="99"
column="30"/>
</issue>
@@ -1350,7 +1350,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/util/SparseLongArray.kt"
- line="105"
+ line="106"
column="38"/>
</issue>
@@ -1361,7 +1361,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/core/util/SparseLongArray.kt"
- line="106"
+ line="107"
column="31"/>
</issue>
@@ -1372,7 +1372,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/transition/Transition.kt"
- line="75"
+ line="80"
column="5"/>
</issue>
diff --git a/core/core-role/lint-baseline.xml b/core/core-role/lint-baseline.xml
deleted file mode 100644
index f67a956..0000000
--- a/core/core-role/lint-baseline.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<issues format="5" by="lint 4.2.0-alpha06" client="gradle" variant="debug" version="4.2.0-alpha06">
-
-</issues>
diff --git a/core/core/lint-baseline.xml b/core/core/lint-baseline.xml
index d57fdc1..d97d370 100644
--- a/core/core/lint-baseline.xml
+++ b/core/core/lint-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="5" by="lint 4.2.0-dev" client="gradle" variant="debug" version="4.2.0-dev">
+<issues format="5" by="lint 4.2.0-alpha06" client="gradle" variant="debug" version="4.2.0-alpha06">
<issue
id="BanSynchronizedMethods"
@@ -35,6 +35,358 @@
</issue>
<issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" requestRelaunchActivityMethod.invoke(activityThread,"
+ errorLine2=" ^">
+ <location
+ file="src/main/java/androidx/core/app/ActivityRecreator.java"
+ line="152"
+ column="21"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" performStopActivity3ParamsMethod.invoke(activityThread,"
+ errorLine2=" ^">
+ <location
+ file="src/main/java/androidx/core/app/ActivityRecreator.java"
+ line="274"
+ column="29"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" performStopActivity2ParamsMethod.invoke(activityThread,"
+ errorLine2=" ^">
+ <location
+ file="src/main/java/androidx/core/app/ActivityRecreator.java"
+ line="277"
+ column="29"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" return (IBinder) sGetIBinderMethod.invoke(bundle, key);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/app/BundleCompat.java"
+ line="60"
+ column="38"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" sPutIBinderMethod.invoke(bundle, key, binder);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/app/BundleCompat.java"
+ line="84"
+ column="21"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" return (String) getMethod.invoke(systemProperties, name);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/view/DisplayCompat.java"
+ line="129"
+ column="29"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" return (String) sGetScriptMethod.invoke(null, args);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/text/ICUCompat.java"
+ line="116"
+ column="33"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" return (String) sAddLikelySubtagsMethod.invoke(null, args);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/text/ICUCompat.java"
+ line="133"
+ column="33"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" return (int) icon.getClass().getMethod("getType").invoke(icon);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
+ line="1104"
+ column="26"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" return (String) icon.getClass().getMethod("getResPackage").invoke(icon);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
+ line="1132"
+ column="29"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" return (int) icon.getClass().getMethod("getResId").invoke(icon);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
+ line="1161"
+ column="26"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" return (Uri) icon.getClass().getMethod("getUri").invoke(icon);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
+ line="1189"
+ column="26"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" return (Boolean) sActionBarOnMenuKeyMethod.invoke(actionBar, event);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/view/KeyEventDispatcher.java"
+ line="106"
+ column="34"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" sSetWindowLayoutTypeMethod.invoke(popupWindow, layoutType);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/widget/PopupWindowCompat.java"
+ line="170"
+ column="17"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" return (Integer) sGetWindowLayoutTypeMethod.invoke(popupWindow);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/widget/PopupWindowCompat.java"
+ line="199"
+ column="34"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" Boolean result = (Boolean) sMethodUserHandleIsAppMethod.invoke(null, uid);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/os/ProcessCompat.java"
+ line="104"
+ column="48"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" Boolean result = (Boolean) sMethodUserIdIsAppMethod.invoke(null, uid);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/os/ProcessCompat.java"
+ line="141"
+ column="48"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" sRebaseMethod.invoke(theme);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/content/res/ResourcesCompat.java"
+ line="541"
+ column="29"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" removeItemAtMethod.invoke(menu, i);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/widget/TextViewCompat.java"
+ line="605"
+ column="25"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" return (Typeface) sCreateFromFamiliesWithDefault.invoke("
+ errorLine2=" ^">
+ <location
+ file="src/main/java/androidx/core/graphics/TypefaceCompatApi21Impl.java"
+ line="127"
+ column="31"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" final Boolean result = (Boolean) sAddFontWeightStyle.invoke("
+ errorLine2=" ^">
+ <location
+ file="src/main/java/androidx/core/graphics/TypefaceCompatApi21Impl.java"
+ line="138"
+ column="46"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" final Boolean result = (Boolean) sAddFontWeightStyle.invoke("
+ errorLine2=" ^">
+ <location
+ file="src/main/java/androidx/core/graphics/TypefaceCompatApi24Impl.java"
+ line="112"
+ column="46"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" return (Typeface) sCreateFromFamiliesWithDefault.invoke("
+ errorLine2=" ^">
+ <location
+ file="src/main/java/androidx/core/graphics/TypefaceCompatApi24Impl.java"
+ line="124"
+ column="31"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" return (Boolean) mAddFontFromAssetManager.invoke(family,"
+ errorLine2=" ^">
+ <location
+ file="src/main/java/androidx/core/graphics/TypefaceCompatApi26Impl.java"
+ line="140"
+ column="30"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" return (Boolean) mAddFontFromBuffer.invoke(family,"
+ errorLine2=" ^">
+ <location
+ file="src/main/java/androidx/core/graphics/TypefaceCompatApi26Impl.java"
+ line="155"
+ column="30"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" return (Typeface) mCreateFromFamiliesWithDefault.invoke(null /* static method */,"
+ errorLine2=" ^">
+ <location
+ file="src/main/java/androidx/core/graphics/TypefaceCompatApi26Impl.java"
+ line="171"
+ column="31"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" return (Boolean) mFreeze.invoke(family);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/graphics/TypefaceCompatApi26Impl.java"
+ line="183"
+ column="30"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" mAbortCreation.invoke(family);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/graphics/TypefaceCompatApi26Impl.java"
+ line="194"
+ column="13"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" return (Typeface) mCreateFromFamiliesWithDefault.invoke(null /* static method */,"
+ errorLine2=" ^">
+ <location
+ file="src/main/java/androidx/core/graphics/TypefaceCompatApi28Impl.java"
+ line="51"
+ column="31"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" sChildrenDrawingOrderMethod.invoke(viewGroup, enabled);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/view/ViewCompat.java"
+ line="2451"
+ column="13"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" Object viewRootImpl = sGetViewRootImplMethod.invoke(rootView);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/view/WindowInsetsCompat.java"
+ line="1128"
+ column="39"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" return (Boolean) sIsProjectedDrawableMethod.invoke(mDrawable);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/core/graphics/drawable/WrappedDrawableApi21.java"
+ line="131"
+ column="34"/>
+ </issue>
+
+ <issue
id="PrivateConstructorForUtilityClass"
message="Utility class with non private constructor"
errorLine1="public class AppLaunchChecker {"
@@ -107,7 +459,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/core/content/pm/ShortcutManagerCompat.java"
- line="758"
+ line="762"
column="26"/>
</issue>
@@ -118,7 +470,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/core/view/WindowCompat.java"
- line="123"
+ line="143"
column="26"/>
</issue>
@@ -129,7 +481,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/core/view/WindowCompat.java"
- line="139"
+ line="159"
column="26"/>
</issue>
@@ -828,17 +1180,6 @@
<issue
id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" return mInfo.getStateDescription();"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"
- line="2813"
- column="26"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
message="This call is to a method from API 19, the call containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is not annotated with @RequiresApi(x) where x is at least 19. Either annotate the containing class with at least @RequiresApi(19) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(19)."
errorLine1=" return mInfo.getExtras().getCharSequence(STATE_DESCRIPTION_KEY);"
errorLine2=" ~~~~~~~~~">
@@ -850,17 +1191,6 @@
<issue
id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" mInfo.setStateDescription(stateDescription);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java"
- line="2848"
- column="19"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
message="This call is to a method from API 19, the call containing class androidx.core.view.accessibility.AccessibilityNodeInfoCompat is not annotated with @RequiresApi(x) where x is at least 19. Either annotate the containing class with at least @RequiresApi(19) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(19)."
errorLine1=" mInfo.getExtras().putCharSequence(STATE_DESCRIPTION_KEY, stateDescription);"
errorLine2=" ~~~~~~~~~">
@@ -3083,17 +3413,6 @@
<issue
id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.core.view.DisplayCutoutCompat is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" return new DisplayCutout(safeInsets.toPlatformInsets(), boundLeft,"
- errorLine2=" ~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/DisplayCutoutCompat.java"
- line="85"
- column="20"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
message="This call is to a method from API 29, the call containing class androidx.core.view.DisplayCutoutCompat is not annotated with @RequiresApi(x) where x is at least 29. Either annotate the containing class with at least @RequiresApi(29) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(29)."
errorLine1=" return new DisplayCutout(safeInsets.toPlatformInsets(), boundLeft,"
errorLine2=" ~~~~~~~~~~~~~~~~~">
@@ -3171,17 +3490,6 @@
<issue
id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.core.view.DisplayCutoutCompat is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" return Insets.toCompatInsets(((DisplayCutout) mDisplayCutout).getWaterfallInsets());"
- errorLine2=" ~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/DisplayCutoutCompat.java"
- line="183"
- column="75"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
message="This call is to a method from API 17, the call containing class androidx.core.hardware.display.DisplayManagerCompat is not annotated with @RequiresApi(x) where x is at least 17. Either annotate the containing class with at least @RequiresApi(17) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(17)."
errorLine1=" .getDisplay(displayId);"
errorLine2=" ~~~~~~~~~~">
@@ -3451,7 +3759,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/content/FileProvider.java"
- line="666"
+ line="702"
column="56"/>
</issue>
@@ -3803,7 +4111,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/os/HandlerCompat.java"
- line="53"
+ line="52"
column="28"/>
</issue>
@@ -3814,7 +4122,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/os/HandlerCompat.java"
- line="94"
+ line="93"
column="28"/>
</issue>
@@ -3825,7 +4133,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/os/HandlerCompat.java"
- line="145"
+ line="144"
column="28"/>
</issue>
@@ -3924,7 +4232,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
- line="533"
+ line="546"
column="29"/>
</issue>
@@ -3935,7 +4243,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
- line="537"
+ line="550"
column="33"/>
</issue>
@@ -3946,7 +4254,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
- line="539"
+ line="552"
column="33"/>
</issue>
@@ -3957,7 +4265,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
- line="544"
+ line="557"
column="29"/>
</issue>
@@ -3968,7 +4276,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
- line="547"
+ line="560"
column="29"/>
</issue>
@@ -3979,29 +4287,18 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
- line="550"
+ line="563"
column="29"/>
</issue>
<issue
id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.core.graphics.drawable.IconCompat is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" icon = Icon.createWithAdaptiveBitmapContentUri(getUri());"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
- line="554"
- column="33"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
message="This call is to a method from API 26, the call containing class androidx.core.graphics.drawable.IconCompat is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
errorLine1=" icon = Icon.createWithAdaptiveBitmap(BitmapFactory.decodeStream(is));"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
- line="567"
+ line="580"
column="33"/>
</issue>
@@ -4012,7 +4309,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
- line="569"
+ line="582"
column="33"/>
</issue>
@@ -4023,7 +4320,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
- line="577"
+ line="590"
column="18"/>
</issue>
@@ -4034,7 +4331,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
- line="580"
+ line="593"
column="18"/>
</issue>
@@ -4045,7 +4342,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
- line="628"
+ line="641"
column="36"/>
</issue>
@@ -4056,7 +4353,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
- line="681"
+ line="694"
column="32"/>
</issue>
@@ -4067,7 +4364,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
- line="1088"
+ line="1101"
column="25"/>
</issue>
@@ -4078,7 +4375,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
- line="1116"
+ line="1129"
column="25"/>
</issue>
@@ -4089,7 +4386,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
- line="1145"
+ line="1158"
column="25"/>
</issue>
@@ -4100,7 +4397,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
- line="1173"
+ line="1186"
column="25"/>
</issue>
@@ -4342,29 +4639,18 @@
errorLine2=" ~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/location/LocationManagerCompat.java"
- line="60"
+ line="71"
column="36"/>
</issue>
<issue
id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.core.location.LocationManagerCompat is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" if (locationManager.registerGnssStatusCallback(executor, transport)) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/location/LocationManagerCompat.java"
- line="139"
- column="37"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
message="This call is to a method from API 24, the call containing class androidx.core.location.LocationManagerCompat is not annotated with @RequiresApi(x) where x is at least 24. Either annotate the containing class with at least @RequiresApi(24) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(24)."
errorLine1=" if (locationManager.registerGnssStatusCallback(transport, baseHandler)) {"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/location/LocationManagerCompat.java"
- line="158"
+ line="189"
column="37"/>
</issue>
@@ -4375,7 +4661,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/location/LocationManagerCompat.java"
- line="223"
+ line="274"
column="37"/>
</issue>
@@ -4386,7 +4672,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/location/LocationManagerCompat.java"
- line="232"
+ line="283"
column="37"/>
</issue>
@@ -4953,28 +5239,6 @@
<issue
id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.core.app.NotificationChannelCompat is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" mParentId = channel.getParentChannelId();"
- errorLine2=" ~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationChannelCompat.java"
- line="297"
- column="33"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.core.app.NotificationChannelCompat is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" mConversationId = channel.getConversationId();"
- errorLine2=" ~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationChannelCompat.java"
- line="298"
- column="39"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
message="This call is to a method from API 26, the call containing class androidx.core.app.NotificationChannelCompat is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
errorLine1=" mBypassDnd = channel.canBypassDnd();"
errorLine2=" ~~~~~~~~~~~~">
@@ -5008,17 +5272,6 @@
<issue
id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.core.app.NotificationChannelCompat is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" mImportantConversation = channel.isImportantConversation();"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationChannelCompat.java"
- line="307"
- column="46"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
message="This call is to a method from API 26, the call containing class androidx.core.app.NotificationChannelCompat is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
errorLine1=" NotificationChannel channel = new NotificationChannel(mId, mName, mImportance);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
@@ -5118,17 +5371,6 @@
<issue
id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.core.app.NotificationChannelCompat is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" channel.setConversationId(mParentId, mConversationId);"
- errorLine2=" ~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationChannelCompat.java"
- line="330"
- column="21"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
message="This call is to a method from API 26, the call containing class androidx.core.app.NotificationChannelGroupCompat is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
errorLine1=" this(group.getId());"
errorLine2=" ~~~~~">
@@ -6009,210 +6251,12 @@
<issue
id="UnsafeNewApiCall"
- message="This call is to a method from API 29, the call containing class androidx.core.app.NotificationCompat.BubbleMetadata is not annotated with @RequiresApi(x) where x is at least 29. Either annotate the containing class with at least @RequiresApi(29) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(29)."
- errorLine1=" new android.app.Notification.BubbleMetadata.Builder()"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="6636"
- column="21"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 29, the call containing class androidx.core.app.NotificationCompat.BubbleMetadata is not annotated with @RequiresApi(x) where x is at least 29. Either annotate the containing class with at least @RequiresApi(29) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(29)."
- errorLine1=" .setAutoExpandBubble(compatMetadata.getAutoExpandBubble())"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="6637"
- column="30"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 29, the call containing class androidx.core.app.NotificationCompat.BubbleMetadata is not annotated with @RequiresApi(x) where x is at least 29. Either annotate the containing class with at least @RequiresApi(29) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(29)."
- errorLine1=" .setDeleteIntent(compatMetadata.getDeleteIntent())"
- errorLine2=" ~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="6638"
- column="30"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 29, the call containing class androidx.core.app.NotificationCompat.BubbleMetadata is not annotated with @RequiresApi(x) where x is at least 29. Either annotate the containing class with at least @RequiresApi(29) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(29)."
- errorLine1=" .setIcon(compatMetadata.getIcon().toIcon())"
- errorLine2=" ~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="6639"
- column="30"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 29, the call containing class androidx.core.app.NotificationCompat.BubbleMetadata is not annotated with @RequiresApi(x) where x is at least 29. Either annotate the containing class with at least @RequiresApi(29) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(29)."
- errorLine1=" .setIntent(compatMetadata.getIntent())"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="6640"
- column="30"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 29, the call containing class androidx.core.app.NotificationCompat.BubbleMetadata is not annotated with @RequiresApi(x) where x is at least 29. Either annotate the containing class with at least @RequiresApi(29) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(29)."
- errorLine1=" .setSuppressNotification("
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="6641"
- column="30"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 29, the call containing class androidx.core.app.NotificationCompat.BubbleMetadata is not annotated with @RequiresApi(x) where x is at least 29. Either annotate the containing class with at least @RequiresApi(29) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(29)."
- errorLine1=" platformMetadataBuilder.setDesiredHeight(compatMetadata.getDesiredHeight());"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="6645"
- column="41"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 29, the call containing class androidx.core.app.NotificationCompat.BubbleMetadata is not annotated with @RequiresApi(x) where x is at least 29. Either annotate the containing class with at least @RequiresApi(29) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(29)."
- errorLine1=" platformMetadataBuilder.setDesiredHeightResId("
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="6649"
- column="41"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 29, the call containing class androidx.core.app.NotificationCompat.BubbleMetadata is not annotated with @RequiresApi(x) where x is at least 29. Either annotate the containing class with at least @RequiresApi(29) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(29)."
- errorLine1=" return platformMetadataBuilder.build();"
- errorLine2=" ~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="6653"
- column="44"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 29, the call containing class androidx.core.app.NotificationCompat.BubbleMetadata is not annotated with @RequiresApi(x) where x is at least 29. Either annotate the containing class with at least @RequiresApi(29) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(29)."
- errorLine1=" .setAutoExpandBubble(platformMetadata.getAutoExpandBubble())"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="6672"
- column="59"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 29, the call containing class androidx.core.app.NotificationCompat.BubbleMetadata is not annotated with @RequiresApi(x) where x is at least 29. Either annotate the containing class with at least @RequiresApi(29) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(29)."
- errorLine1=" .setDeleteIntent(platformMetadata.getDeleteIntent())"
- errorLine2=" ~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="6673"
- column="55"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 29, the call containing class androidx.core.app.NotificationCompat.BubbleMetadata is not annotated with @RequiresApi(x) where x is at least 29. Either annotate the containing class with at least @RequiresApi(29) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(29)."
- errorLine1=" .setIcon(IconCompat.createFromIcon(platformMetadata.getIcon()))"
- errorLine2=" ~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="6674"
- column="73"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 29, the call containing class androidx.core.app.NotificationCompat.BubbleMetadata is not annotated with @RequiresApi(x) where x is at least 29. Either annotate the containing class with at least @RequiresApi(29) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(29)."
- errorLine1=" .setIntent(platformMetadata.getIntent())"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="6675"
- column="49"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 29, the call containing class androidx.core.app.NotificationCompat.BubbleMetadata is not annotated with @RequiresApi(x) where x is at least 29. Either annotate the containing class with at least @RequiresApi(29) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(29)."
- errorLine1=" platformMetadata.isNotificationSuppressed());"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="6677"
- column="46"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 29, the call containing class androidx.core.app.NotificationCompat.BubbleMetadata is not annotated with @RequiresApi(x) where x is at least 29. Either annotate the containing class with at least @RequiresApi(29) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(29)."
- errorLine1=" if (platformMetadata.getDesiredHeight() != 0) {"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="6679"
- column="34"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 29, the call containing class androidx.core.app.NotificationCompat.BubbleMetadata is not annotated with @RequiresApi(x) where x is at least 29. Either annotate the containing class with at least @RequiresApi(29) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(29)."
- errorLine1=" compatBuilder.setDesiredHeight(platformMetadata.getDesiredHeight());"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="6680"
- column="65"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 29, the call containing class androidx.core.app.NotificationCompat.BubbleMetadata is not annotated with @RequiresApi(x) where x is at least 29. Either annotate the containing class with at least @RequiresApi(29) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(29)."
- errorLine1=" if (platformMetadata.getDesiredHeightResId() != 0) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="6683"
- column="34"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 29, the call containing class androidx.core.app.NotificationCompat.BubbleMetadata is not annotated with @RequiresApi(x) where x is at least 29. Either annotate the containing class with at least @RequiresApi(29) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(29)."
- errorLine1=" compatBuilder.setDesiredHeightResId(platformMetadata.getDesiredHeightResId());"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="6684"
- column="70"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
message="This call is to a method from API 29, the call containing class androidx.core.app.NotificationCompat is not annotated with @RequiresApi(x) where x is at least 29. Either annotate the containing class with at least @RequiresApi(29) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(29)."
errorLine1=" return BubbleMetadata.fromPlatform(notification.getBubbleMetadata());"
errorLine2=" ~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="6945"
+ line="7185"
column="61"/>
</issue>
@@ -6223,7 +6267,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="6955"
+ line="7195"
column="59"/>
</issue>
@@ -6234,7 +6278,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="6963"
+ line="7203"
column="29"/>
</issue>
@@ -6245,7 +6289,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="6964"
+ line="7204"
column="29"/>
</issue>
@@ -6256,7 +6300,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="6965"
+ line="7205"
column="29"/>
</issue>
@@ -6267,7 +6311,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="6966"
+ line="7206"
column="29"/>
</issue>
@@ -6278,7 +6322,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="6968"
+ line="7208"
column="39"/>
</issue>
@@ -6289,7 +6333,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="6970"
+ line="7210"
column="29"/>
</issue>
@@ -6300,7 +6344,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="6977"
+ line="7217"
column="44"/>
</issue>
@@ -6311,7 +6355,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="6979"
+ line="7219"
column="31"/>
</issue>
@@ -6322,7 +6366,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="6981"
+ line="7221"
column="44"/>
</issue>
@@ -6333,7 +6377,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="6986"
+ line="7226"
column="24"/>
</issue>
@@ -6344,7 +6388,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="6990"
+ line="7230"
column="37"/>
</issue>
@@ -6355,7 +6399,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="6992"
+ line="7232"
column="37"/>
</issue>
@@ -6366,7 +6410,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="6996"
+ line="7236"
column="75"/>
</issue>
@@ -6377,7 +6421,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="6999"
+ line="7239"
column="24"/>
</issue>
@@ -6388,7 +6432,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="7001"
+ line="7241"
column="32"/>
</issue>
@@ -6399,7 +6443,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="7004"
+ line="7244"
column="38"/>
</issue>
@@ -6410,7 +6454,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="7005"
+ line="7245"
column="80"/>
</issue>
@@ -6421,7 +6465,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="7006"
+ line="7246"
column="79"/>
</issue>
@@ -6432,7 +6476,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="7010"
+ line="7250"
column="86"/>
</issue>
@@ -6443,7 +6487,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="7126"
+ line="7366"
column="33"/>
</issue>
@@ -6454,7 +6498,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="7234"
+ line="7474"
column="33"/>
</issue>
@@ -6465,7 +6509,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="7250"
+ line="7490"
column="33"/>
</issue>
@@ -6476,7 +6520,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="7262"
+ line="7502"
column="33"/>
</issue>
@@ -6487,7 +6531,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="7275"
+ line="7515"
column="33"/>
</issue>
@@ -6498,7 +6542,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="7287"
+ line="7527"
column="33"/>
</issue>
@@ -6509,7 +6553,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="7298"
+ line="7538"
column="33"/>
</issue>
@@ -6520,7 +6564,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="7314"
+ line="7554"
column="44"/>
</issue>
@@ -6531,7 +6575,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="7329"
+ line="7569"
column="33"/>
</issue>
@@ -6542,7 +6586,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/app/NotificationCompat.java"
- line="7342"
+ line="7582"
column="33"/>
</issue>
@@ -7307,17 +7351,6 @@
<issue
id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.core.app.NotificationManagerCompat is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" && channelIds.contains(channel.getParentChannelId())) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationManagerCompat.java"
- line="456"
- column="56"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
message="This call is to a method from API 26, the call containing class androidx.core.app.NotificationManagerCompat is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
errorLine1=" mNotificationManager.deleteNotificationChannel(channel.getId());"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -7351,17 +7384,6 @@
<issue
id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.core.app.NotificationManagerCompat is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" return mNotificationManager.getNotificationChannel(channelId, conversationId);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/app/NotificationManagerCompat.java"
- line="505"
- column="41"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
message="This call is to a method from API 28, the call containing class androidx.core.app.NotificationManagerCompat is not annotated with @RequiresApi(x) where x is at least 28. Either annotate the containing class with at least @RequiresApi(28) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(28)."
errorLine1=" return mNotificationManager.getNotificationChannelGroup(channelGroupId);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
@@ -9276,17 +9298,6 @@
<issue
id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.core.content.pm.ShortcutInfoCompat.Builder is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" mInfo.mIsCached = shortcutInfo.isCached();"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/pm/ShortcutInfoCompat.java"
- line="568"
- column="48"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
message="This call is to a method from API 25, the call containing class androidx.core.content.pm.ShortcutInfoCompat.Builder is not annotated with @RequiresApi(x) where x is at least 25. Either annotate the containing class with at least @RequiresApi(25) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(25)."
errorLine1=" mInfo.mIsDynamic = shortcutInfo.isDynamic();"
errorLine2=" ~~~~~~~~~">
@@ -9452,17 +9463,6 @@
<issue
id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.core.content.pm.ShortcutManagerCompat is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" context.getSystemService(ShortcutManager.class).getShortcuts(matchFlags);"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/pm/ShortcutManagerCompat.java"
- line="259"
- column="69"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
message="This call is to a method from API 23, the call containing class androidx.core.content.pm.ShortcutManagerCompat is not annotated with @RequiresApi(x) where x is at least 23. Either annotate the containing class with at least @RequiresApi(23) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(23)."
errorLine1=" final ShortcutManager manager = context.getSystemService(ShortcutManager.class);"
errorLine2=" ~~~~~~~~~~~~~~~~">
@@ -9710,7 +9710,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/content/pm/ShortcutManagerCompat.java"
- line="550"
+ line="554"
column="21"/>
</issue>
@@ -9721,7 +9721,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/content/pm/ShortcutManagerCompat.java"
- line="551"
+ line="555"
column="22"/>
</issue>
@@ -9732,7 +9732,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/content/pm/ShortcutManagerCompat.java"
- line="578"
+ line="582"
column="21"/>
</issue>
@@ -9743,7 +9743,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/content/pm/ShortcutManagerCompat.java"
- line="578"
+ line="582"
column="61"/>
</issue>
@@ -9754,7 +9754,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/content/pm/ShortcutManagerCompat.java"
- line="590"
+ line="594"
column="21"/>
</issue>
@@ -9765,7 +9765,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/content/pm/ShortcutManagerCompat.java"
- line="590"
+ line="594"
column="61"/>
</issue>
@@ -9776,7 +9776,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/content/pm/ShortcutManagerCompat.java"
- line="601"
+ line="605"
column="21"/>
</issue>
@@ -9787,7 +9787,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/content/pm/ShortcutManagerCompat.java"
- line="601"
+ line="605"
column="61"/>
</issue>
@@ -9798,51 +9798,29 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/content/pm/ShortcutManagerCompat.java"
- line="625"
+ line="629"
column="17"/>
</issue>
<issue
id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.core.content.pm.ShortcutManagerCompat is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" context.getSystemService(ShortcutManager.class).removeLongLivedShortcuts(shortcutIds);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/pm/ShortcutManagerCompat.java"
- line="625"
- column="57"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
message="This call is to a method from API 23, the call containing class androidx.core.content.pm.ShortcutManagerCompat is not annotated with @RequiresApi(x) where x is at least 23. Either annotate the containing class with at least @RequiresApi(23) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(23)."
errorLine1=" context.getSystemService(ShortcutManager.class).pushDynamicShortcut("
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/content/pm/ShortcutManagerCompat.java"
- line="675"
+ line="679"
column="21"/>
</issue>
<issue
id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.core.content.pm.ShortcutManagerCompat is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" context.getSystemService(ShortcutManager.class).pushDynamicShortcut("
- errorLine2=" ~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/pm/ShortcutManagerCompat.java"
- line="675"
- column="61"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
message="This call is to a method from API 23, the call containing class androidx.core.content.pm.ShortcutManagerCompat is not annotated with @RequiresApi(x) where x is at least 23. Either annotate the containing class with at least @RequiresApi(23) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(23)."
errorLine1=" final ShortcutManager sm = context.getSystemService(ShortcutManager.class);"
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/content/pm/ShortcutManagerCompat.java"
- line="678"
+ line="682"
column="48"/>
</issue>
@@ -9853,7 +9831,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/content/pm/ShortcutManagerCompat.java"
- line="679"
+ line="683"
column="20"/>
</issue>
@@ -9864,7 +9842,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/content/pm/ShortcutManagerCompat.java"
- line="682"
+ line="686"
column="53"/>
</issue>
@@ -9875,7 +9853,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/content/pm/ShortcutManagerCompat.java"
- line="684"
+ line="688"
column="20"/>
</issue>
@@ -9886,7 +9864,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/content/pm/ShortcutManagerCompat.java"
- line="687"
+ line="691"
column="16"/>
</issue>
@@ -9897,7 +9875,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/content/pm/ShortcutManagerCompat.java"
- line="727"
+ line="731"
column="64"/>
</issue>
@@ -10469,7 +10447,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="754"
+ line="757"
column="15"/>
</issue>
@@ -10480,7 +10458,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="775"
+ line="778"
column="22"/>
</issue>
@@ -10491,7 +10469,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="819"
+ line="822"
column="15"/>
</issue>
@@ -10502,7 +10480,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="888"
+ line="891"
column="22"/>
</issue>
@@ -10513,7 +10491,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="938"
+ line="941"
column="22"/>
</issue>
@@ -10524,7 +10502,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="981"
+ line="984"
column="25"/>
</issue>
@@ -10535,7 +10513,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="995"
+ line="998"
column="18"/>
</issue>
@@ -10546,7 +10524,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1010"
+ line="1013"
column="18"/>
</issue>
@@ -10557,7 +10535,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1032"
+ line="1035"
column="18"/>
</issue>
@@ -10568,7 +10546,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1050"
+ line="1053"
column="18"/>
</issue>
@@ -10579,7 +10557,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1072"
+ line="1075"
column="18"/>
</issue>
@@ -10590,7 +10568,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1094"
+ line="1097"
column="25"/>
</issue>
@@ -10601,7 +10579,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1121"
+ line="1124"
column="18"/>
</issue>
@@ -10612,7 +10590,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1130"
+ line="1133"
column="18"/>
</issue>
@@ -10623,7 +10601,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1172"
+ line="1175"
column="25"/>
</issue>
@@ -10634,7 +10612,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1194"
+ line="1197"
column="25"/>
</issue>
@@ -10645,7 +10623,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1429"
+ line="1432"
column="55"/>
</issue>
@@ -10656,7 +10634,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1524"
+ line="1527"
column="25"/>
</issue>
@@ -10667,7 +10645,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1538"
+ line="1541"
column="18"/>
</issue>
@@ -10678,7 +10656,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1574"
+ line="1577"
column="18"/>
</issue>
@@ -10689,7 +10667,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1597"
+ line="1600"
column="25"/>
</issue>
@@ -10700,7 +10678,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1621"
+ line="1624"
column="18"/>
</issue>
@@ -10711,7 +10689,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1635"
+ line="1638"
column="25"/>
</issue>
@@ -10722,7 +10700,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1658"
+ line="1661"
column="25"/>
</issue>
@@ -10733,7 +10711,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1775"
+ line="1778"
column="25"/>
</issue>
@@ -10744,7 +10722,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1811"
+ line="1814"
column="18"/>
</issue>
@@ -10755,7 +10733,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1826"
+ line="1829"
column="25"/>
</issue>
@@ -10766,7 +10744,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1842"
+ line="1845"
column="25"/>
</issue>
@@ -10777,7 +10755,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1863"
+ line="1866"
column="18"/>
</issue>
@@ -10788,7 +10766,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1886"
+ line="1889"
column="18"/>
</issue>
@@ -10799,7 +10777,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1909"
+ line="1912"
column="18"/>
</issue>
@@ -10810,7 +10788,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1986"
+ line="1989"
column="25"/>
</issue>
@@ -10821,7 +10799,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2020"
+ line="2023"
column="25"/>
</issue>
@@ -10832,7 +10810,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2327"
+ line="2330"
column="18"/>
</issue>
@@ -10843,7 +10821,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2338"
+ line="2341"
column="25"/>
</issue>
@@ -10854,7 +10832,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2348"
+ line="2351"
column="18"/>
</issue>
@@ -10865,7 +10843,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2359"
+ line="2362"
column="25"/>
</issue>
@@ -10876,7 +10854,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2373"
+ line="2376"
column="18"/>
</issue>
@@ -10887,7 +10865,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2395"
+ line="2398"
column="25"/>
</issue>
@@ -10898,7 +10876,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2408"
+ line="2411"
column="25"/>
</issue>
@@ -10909,7 +10887,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2419"
+ line="2422"
column="18"/>
</issue>
@@ -10920,7 +10898,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2421"
+ line="2424"
column="18"/>
</issue>
@@ -10931,7 +10909,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2464"
+ line="2467"
column="22"/>
</issue>
@@ -10942,7 +10920,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2504"
+ line="2507"
column="19"/>
</issue>
@@ -10953,7 +10931,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2508"
+ line="2511"
column="15"/>
</issue>
@@ -10964,7 +10942,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2538"
+ line="2541"
column="44"/>
</issue>
@@ -10975,7 +10953,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2566"
+ line="2569"
column="50"/>
</issue>
@@ -10986,7 +10964,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2590"
+ line="2593"
column="18"/>
</issue>
@@ -10997,7 +10975,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2605"
+ line="2608"
column="25"/>
</issue>
@@ -11008,7 +10986,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2692"
+ line="2716"
column="25"/>
</issue>
@@ -11019,7 +10997,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2705"
+ line="2729"
column="25"/>
</issue>
@@ -11030,7 +11008,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2718"
+ line="2742"
column="18"/>
</issue>
@@ -11041,7 +11019,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2732"
+ line="2756"
column="25"/>
</issue>
@@ -11052,7 +11030,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2748"
+ line="2772"
column="18"/>
</issue>
@@ -11063,7 +11041,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2754"
+ line="2778"
column="41"/>
</issue>
@@ -11074,7 +11052,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2755"
+ line="2779"
column="34"/>
</issue>
@@ -11085,7 +11063,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2760"
+ line="2784"
column="26"/>
</issue>
@@ -11096,7 +11074,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2777"
+ line="2801"
column="25"/>
</issue>
@@ -11107,7 +11085,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2795"
+ line="2819"
column="18"/>
</issue>
@@ -11118,7 +11096,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2801"
+ line="2825"
column="41"/>
</issue>
@@ -11129,7 +11107,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2802"
+ line="2826"
column="34"/>
</issue>
@@ -11140,7 +11118,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2807"
+ line="2831"
column="26"/>
</issue>
@@ -11151,7 +11129,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2833"
+ line="2857"
column="18"/>
</issue>
@@ -11162,7 +11140,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2856"
+ line="2880"
column="25"/>
</issue>
@@ -11173,7 +11151,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2878"
+ line="2902"
column="25"/>
</issue>
@@ -11184,7 +11162,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2897"
+ line="2921"
column="18"/>
</issue>
@@ -11195,7 +11173,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2914"
+ line="2938"
column="25"/>
</issue>
@@ -11206,7 +11184,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2943"
+ line="2967"
column="25"/>
</issue>
@@ -11217,7 +11195,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2974"
+ line="2998"
column="25"/>
</issue>
@@ -11228,7 +11206,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3198"
+ line="3222"
column="25"/>
</issue>
@@ -11239,7 +11217,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3241"
+ line="3265"
column="25"/>
</issue>
@@ -11250,7 +11228,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3263"
+ line="3287"
column="25"/>
</issue>
@@ -11261,7 +11239,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3274"
+ line="3298"
column="25"/>
</issue>
@@ -11272,7 +11250,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3291"
+ line="3315"
column="25"/>
</issue>
@@ -11283,7 +11261,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3305"
+ line="3329"
column="25"/>
</issue>
@@ -11294,7 +11272,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3324"
+ line="3348"
column="18"/>
</issue>
@@ -11305,7 +11283,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3443"
+ line="3467"
column="18"/>
</issue>
@@ -11316,7 +11294,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3458"
+ line="3482"
column="25"/>
</issue>
@@ -11327,7 +11305,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3468"
+ line="3492"
column="25"/>
</issue>
@@ -11338,7 +11316,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3480"
+ line="3504"
column="25"/>
</issue>
@@ -11349,7 +11327,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3498"
+ line="3522"
column="18"/>
</issue>
@@ -11360,7 +11338,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3532"
+ line="3556"
column="18"/>
</issue>
@@ -11371,7 +11349,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3550"
+ line="3574"
column="25"/>
</issue>
@@ -11382,7 +11360,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3561"
+ line="3585"
column="18"/>
</issue>
@@ -11393,7 +11371,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3580"
+ line="3604"
column="25"/>
</issue>
@@ -11404,7 +11382,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3600"
+ line="3624"
column="18"/>
</issue>
@@ -11415,7 +11393,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3610"
+ line="3634"
column="22"/>
</issue>
@@ -11426,7 +11404,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3621"
+ line="3645"
column="15"/>
</issue>
@@ -11437,7 +11415,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3630"
+ line="3654"
column="15"/>
</issue>
@@ -11448,7 +11426,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3642"
+ line="3666"
column="25"/>
</issue>
@@ -11459,7 +11437,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3656"
+ line="3680"
column="18"/>
</issue>
@@ -11470,7 +11448,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3668"
+ line="3692"
column="25"/>
</issue>
@@ -11481,7 +11459,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3682"
+ line="3706"
column="18"/>
</issue>
@@ -11492,7 +11470,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3697"
+ line="3721"
column="25"/>
</issue>
@@ -11503,7 +11481,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3716"
+ line="3740"
column="18"/>
</issue>
@@ -11514,7 +11492,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3734"
+ line="3758"
column="25"/>
</issue>
@@ -11525,7 +11503,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3750"
+ line="3774"
column="18"/>
</issue>
@@ -11536,7 +11514,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3764"
+ line="3788"
column="25"/>
</issue>
@@ -11547,7 +11525,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3786"
+ line="3810"
column="25"/>
</issue>
@@ -11558,7 +11536,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3799"
+ line="3823"
column="25"/>
</issue>
@@ -11569,7 +11547,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3996"
+ line="4020"
column="29"/>
</issue>
@@ -11580,7 +11558,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="4002"
+ line="4026"
column="22"/>
</issue>
@@ -11591,7 +11569,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="4068"
+ line="4092"
column="29"/>
</issue>
@@ -11602,29 +11580,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="4074"
- column="22"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class null is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" return view.getStateDescription();"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"
- line="4091"
- column="29"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class null is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" view.setStateDescription(value);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/view/ViewCompat.java"
- line="4097"
+ line="4098"
column="22"/>
</issue>
@@ -11635,7 +11591,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="4148"
+ line="4172"
column="29"/>
</issue>
@@ -11646,7 +11602,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="4154"
+ line="4178"
column="22"/>
</issue>
@@ -11657,7 +11613,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="4249"
+ line="4273"
column="19"/>
</issue>
@@ -11668,7 +11624,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="4259"
+ line="4283"
column="19"/>
</issue>
@@ -11679,7 +11635,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="4266"
+ line="4290"
column="34"/>
</issue>
@@ -11690,7 +11646,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="4326"
+ line="4350"
column="22"/>
</issue>
@@ -11701,7 +11657,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="4357"
+ line="4381"
column="40"/>
</issue>
@@ -11998,7 +11954,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/WindowCompat.java"
- line="87"
+ line="89"
column="27"/>
</issue>
@@ -12217,7 +12173,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/os/HandlerCompat.java"
- line="143"
+ line="142"
column="37"/>
</issue>
@@ -12250,7 +12206,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1070"
+ line="1073"
column="13"/>
</issue>
@@ -15165,7 +15121,7 @@
errorLine2=" ~~~">
<location
file="src/main/java/androidx/core/content/FileProvider.java"
- line="435"
+ line="439"
column="19"/>
</issue>
@@ -15176,7 +15132,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/core/content/FileProvider.java"
- line="470"
+ line="504"
column="12"/>
</issue>
@@ -15187,7 +15143,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/core/content/FileProvider.java"
- line="511"
+ line="546"
column="12"/>
</issue>
@@ -15198,7 +15154,7 @@
errorLine2=" ~~~">
<location
file="src/main/java/androidx/core/content/FileProvider.java"
- line="532"
+ line="567"
column="12"/>
</issue>
@@ -15209,7 +15165,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/content/FileProvider.java"
- line="532"
+ line="567"
column="41"/>
</issue>
@@ -15220,24 +15176,13 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/content/FileProvider.java"
- line="541"
+ line="576"
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 ParcelFileDescriptor openFile(@NonNull Uri uri, @NonNull String mode)"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/core/content/FileProvider.java"
- line="581"
- 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 AuthenticationResult(CryptoObject crypto) {"
errorLine2=" ~~~~~~~~~~~~">
<location
@@ -15605,7 +15550,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
- line="169"
+ line="176"
column="12"/>
</issue>
@@ -15616,7 +15561,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
- line="175"
+ line="182"
column="12"/>
</issue>
@@ -15627,7 +15572,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
- line="199"
+ line="206"
column="12"/>
</issue>
@@ -15638,7 +15583,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
- line="209"
+ line="216"
column="12"/>
</issue>
@@ -15649,7 +15594,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
- line="216"
+ line="223"
column="12"/>
</issue>
@@ -15660,7 +15605,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
- line="225"
+ line="232"
column="19"/>
</issue>
@@ -15671,7 +15616,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
- line="225"
+ line="232"
column="49"/>
</issue>
@@ -15682,7 +15627,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
- line="236"
+ line="243"
column="19"/>
</issue>
@@ -15693,7 +15638,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
- line="236"
+ line="243"
column="49"/>
</issue>
@@ -15704,7 +15649,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
- line="236"
+ line="243"
column="62"/>
</issue>
@@ -15715,7 +15660,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
- line="263"
+ line="270"
column="19"/>
</issue>
@@ -15726,7 +15671,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
- line="263"
+ line="270"
column="47"/>
</issue>
@@ -15737,7 +15682,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
- line="278"
+ line="285"
column="19"/>
</issue>
@@ -15748,7 +15693,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
- line="278"
+ line="285"
column="55"/>
</issue>
@@ -15759,7 +15704,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
- line="296"
+ line="303"
column="19"/>
</issue>
@@ -15770,7 +15715,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
- line="296"
+ line="303"
column="45"/>
</issue>
@@ -15781,7 +15726,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
- line="313"
+ line="320"
column="19"/>
</issue>
@@ -15792,7 +15737,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
- line="313"
+ line="320"
column="51"/>
</issue>
@@ -15803,7 +15748,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
- line="328"
+ line="335"
column="19"/>
</issue>
@@ -15814,7 +15759,7 @@
errorLine2=" ~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
- line="328"
+ line="335"
column="51"/>
</issue>
@@ -15825,7 +15770,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
- line="483"
+ line="496"
column="12"/>
</issue>
@@ -15836,7 +15781,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
- line="493"
+ line="506"
column="12"/>
</issue>
@@ -15847,7 +15792,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
- line="493"
+ line="506"
column="35"/>
</issue>
@@ -15858,7 +15803,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
- line="504"
+ line="517"
column="12"/>
</issue>
@@ -15869,7 +15814,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/graphics/drawable/IconCompat.java"
- line="504"
+ line="517"
column="35"/>
</issue>
@@ -18355,7 +18300,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/core/content/res/ResourcesCompat.java"
- line="277"
+ line="306"
column="54"/>
</issue>
@@ -18366,7 +18311,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/core/content/res/ResourcesCompat.java"
- line="345"
+ line="374"
column="19"/>
</issue>
@@ -18377,7 +18322,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/core/content/res/ResourcesCompat.java"
- line="345"
+ line="374"
column="79"/>
</issue>
@@ -19455,7 +19400,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/core/graphics/TypefaceCompat.java"
- line="145"
+ line="146"
column="77"/>
</issue>
@@ -20016,7 +19961,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="530"
+ line="533"
column="49"/>
</issue>
@@ -20027,7 +19972,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="544"
+ line="547"
column="47"/>
</issue>
@@ -20038,7 +19983,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="561"
+ line="564"
column="41"/>
</issue>
@@ -20049,7 +19994,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="581"
+ line="584"
column="42"/>
</issue>
@@ -20060,7 +20005,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="621"
+ line="624"
column="53"/>
</issue>
@@ -20071,7 +20016,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="621"
+ line="624"
column="61"/>
</issue>
@@ -20082,7 +20027,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="653"
+ line="656"
column="55"/>
</issue>
@@ -20093,7 +20038,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="653"
+ line="656"
column="63"/>
</issue>
@@ -20104,7 +20049,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="685"
+ line="688"
column="13"/>
</issue>
@@ -20115,7 +20060,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="715"
+ line="718"
column="30"/>
</issue>
@@ -20126,7 +20071,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1048"
+ line="1051"
column="60"/>
</issue>
@@ -20137,7 +20082,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1069"
+ line="1072"
column="67"/>
</issue>
@@ -20148,7 +20093,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1192"
+ line="1195"
column="13"/>
</issue>
@@ -20159,7 +20104,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1398"
+ line="1401"
column="61"/>
</issue>
@@ -20170,7 +20115,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1427"
+ line="1430"
column="19"/>
</issue>
@@ -20181,7 +20126,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1447"
+ line="1450"
column="34"/>
</issue>
@@ -20192,7 +20137,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1486"
+ line="1489"
column="37"/>
</issue>
@@ -20203,7 +20148,7 @@
errorLine2=" ~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1486"
+ line="1489"
column="74"/>
</issue>
@@ -20214,7 +20159,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1510"
+ line="1513"
column="36"/>
</issue>
@@ -20225,7 +20170,7 @@
errorLine2=" ~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1572"
+ line="1575"
column="58"/>
</issue>
@@ -20236,7 +20181,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1633"
+ line="1636"
column="19"/>
</issue>
@@ -20247,7 +20192,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1677"
+ line="1680"
column="36"/>
</issue>
@@ -20258,7 +20203,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1714"
+ line="1717"
column="48"/>
</issue>
@@ -20269,7 +20214,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1731"
+ line="1734"
column="49"/>
</issue>
@@ -20280,7 +20225,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1745"
+ line="1748"
column="40"/>
</issue>
@@ -20291,7 +20236,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1937"
+ line="1940"
column="41"/>
</issue>
@@ -20302,7 +20247,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1951"
+ line="1954"
column="41"/>
</issue>
@@ -20313,7 +20258,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="1973"
+ line="1976"
column="36"/>
</issue>
@@ -20324,7 +20269,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2075"
+ line="2078"
column="40"/>
</issue>
@@ -20335,7 +20280,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2092"
+ line="2095"
column="40"/>
</issue>
@@ -20346,7 +20291,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2109"
+ line="2112"
column="33"/>
</issue>
@@ -20357,7 +20302,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2124"
+ line="2127"
column="29"/>
</issue>
@@ -20368,7 +20313,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2139"
+ line="2142"
column="29"/>
</issue>
@@ -20379,7 +20324,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2152"
+ line="2155"
column="36"/>
</issue>
@@ -20390,7 +20335,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2166"
+ line="2169"
column="37"/>
</issue>
@@ -20401,7 +20346,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2180"
+ line="2183"
column="37"/>
</issue>
@@ -20412,7 +20357,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2193"
+ line="2196"
column="34"/>
</issue>
@@ -20423,7 +20368,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2206"
+ line="2209"
column="34"/>
</issue>
@@ -20434,7 +20379,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2217"
+ line="2220"
column="35"/>
</issue>
@@ -20445,7 +20390,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2233"
+ line="2236"
column="34"/>
</issue>
@@ -20456,7 +20401,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2246"
+ line="2249"
column="35"/>
</issue>
@@ -20467,7 +20412,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2262"
+ line="2265"
column="34"/>
</issue>
@@ -20478,7 +20423,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2270"
+ line="2273"
column="37"/>
</issue>
@@ -20489,7 +20434,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2278"
+ line="2281"
column="38"/>
</issue>
@@ -20500,7 +20445,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2286"
+ line="2289"
column="38"/>
</issue>
@@ -20511,7 +20456,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2294"
+ line="2297"
column="35"/>
</issue>
@@ -20522,7 +20467,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2302"
+ line="2305"
column="35"/>
</issue>
@@ -20533,7 +20478,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2310"
+ line="2313"
column="30"/>
</issue>
@@ -20544,7 +20489,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2318"
+ line="2321"
column="30"/>
</issue>
@@ -20555,7 +20500,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2371"
+ line="2374"
column="62"/>
</issue>
@@ -20566,7 +20511,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2437"
+ line="2440"
column="55"/>
</issue>
@@ -20577,7 +20522,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2478"
+ line="2481"
column="45"/>
</issue>
@@ -20588,7 +20533,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2492"
+ line="2495"
column="52"/>
</issue>
@@ -20599,7 +20544,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2656"
+ line="2680"
column="49"/>
</issue>
@@ -20610,7 +20555,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2672"
+ line="2696"
column="37"/>
</issue>
@@ -20621,7 +20566,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2730"
+ line="2754"
column="19"/>
</issue>
@@ -20632,7 +20577,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2746"
+ line="2770"
column="66"/>
</issue>
@@ -20643,7 +20588,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2775"
+ line="2799"
column="19"/>
</issue>
@@ -20654,7 +20599,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="2793"
+ line="2817"
column="66"/>
</issue>
@@ -20665,7 +20610,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3441"
+ line="3465"
column="58"/>
</issue>
@@ -20676,7 +20621,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3559"
+ line="3583"
column="59"/>
</issue>
@@ -20687,7 +20632,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3607"
+ line="3631"
column="61"/>
</issue>
@@ -20698,7 +20643,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3608"
+ line="3632"
column="13"/>
</issue>
@@ -20709,7 +20654,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3608"
+ line="3632"
column="51"/>
</issue>
@@ -20720,7 +20665,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3628"
+ line="3652"
column="58"/>
</issue>
@@ -20731,7 +20676,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3731"
+ line="3755"
column="19"/>
</issue>
@@ -20742,7 +20687,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3731"
+ line="3755"
column="76"/>
</issue>
@@ -20753,7 +20698,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3929"
+ line="3953"
column="37"/>
</issue>
@@ -20764,7 +20709,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3929"
+ line="3953"
column="45"/>
</issue>
@@ -20775,7 +20720,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3965"
+ line="3989"
column="49"/>
</issue>
@@ -20786,7 +20731,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="3984"
+ line="4008"
column="51"/>
</issue>
@@ -20797,7 +20742,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="4031"
+ line="4055"
column="50"/>
</issue>
@@ -20808,7 +20753,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="4031"
+ line="4055"
column="61"/>
</issue>
@@ -20819,7 +20764,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="4057"
+ line="4081"
column="19"/>
</issue>
@@ -20830,7 +20775,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="4057"
+ line="4081"
column="58"/>
</issue>
@@ -20841,7 +20786,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="4120"
+ line="4144"
column="50"/>
</issue>
@@ -20852,7 +20797,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/core/view/ViewCompat.java"
- line="4137"
+ line="4161"
column="48"/>
</issue>
diff --git a/emoji/bundled/lint-baseline.xml b/emoji/bundled/lint-baseline.xml
deleted file mode 100644
index f67a956..0000000
--- a/emoji/bundled/lint-baseline.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<issues format="5" by="lint 4.2.0-alpha06" client="gradle" variant="debug" version="4.2.0-alpha06">
-
-</issues>
diff --git a/emoji/core/lint-baseline.xml b/emoji/core/lint-baseline.xml
index 9dbfa8e..5ebe9a9 100644
--- a/emoji/core/lint-baseline.xml
+++ b/emoji/core/lint-baseline.xml
@@ -8,7 +8,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/emoji/text/EmojiProcessor.java"
- line="665"
+ line="654"
column="32"/>
</issue>
@@ -74,7 +74,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/emoji/text/EmojiProcessor.java"
- line="713"
+ line="702"
column="32"/>
</issue>
@@ -85,7 +85,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/emoji/text/EmojiProcessor.java"
- line="770"
+ line="759"
column="32"/>
</issue>
@@ -254,7 +254,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/emoji/text/EmojiCompat.java"
- line="294"
+ line="302"
column="19"/>
</issue>
@@ -265,7 +265,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/emoji/text/EmojiCompat.java"
- line="314"
+ line="322"
column="19"/>
</issue>
@@ -276,7 +276,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/emoji/text/EmojiCompat.java"
- line="329"
+ line="337"
column="19"/>
</issue>
@@ -287,7 +287,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/emoji/text/EmojiCompat.java"
- line="329"
+ line="337"
column="43"/>
</issue>
@@ -298,7 +298,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/emoji/text/EmojiCompat.java"
- line="355"
+ line="352"
column="19"/>
</issue>
@@ -309,7 +309,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/emoji/text/EmojiCompat.java"
- line="544"
+ line="541"
column="19"/>
</issue>
@@ -320,7 +320,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/emoji/text/EmojiCompat.java"
- line="628"
+ line="625"
column="12"/>
</issue>
@@ -331,7 +331,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/emoji/text/EmojiCompat.java"
- line="664"
+ line="661"
column="12"/>
</issue>
@@ -342,7 +342,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/emoji/text/EmojiCompat.java"
- line="699"
+ line="696"
column="12"/>
</issue>
@@ -353,7 +353,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/emoji/text/EmojiCompat.java"
- line="739"
+ line="736"
column="12"/>
</issue>
@@ -364,7 +364,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/emoji/text/EmojiCompat.java"
- line="929"
+ line="979"
column="16"/>
</issue>
@@ -375,7 +375,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/emoji/text/EmojiCompat.java"
- line="947"
+ line="997"
column="16"/>
</issue>
@@ -386,7 +386,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/emoji/text/EmojiCompat.java"
- line="964"
+ line="1014"
column="16"/>
</issue>
@@ -397,7 +397,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/emoji/text/EmojiCompat.java"
- line="984"
+ line="1034"
column="16"/>
</issue>
@@ -408,7 +408,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/emoji/text/EmojiCompat.java"
- line="1003"
+ line="1053"
column="16"/>
</issue>
@@ -419,7 +419,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/emoji/text/EmojiCompat.java"
- line="1027"
+ line="1077"
column="16"/>
</issue>
@@ -430,7 +430,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/emoji/text/EmojiCompat.java"
- line="1038"
+ line="1088"
column="16"/>
</issue>
@@ -441,7 +441,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/emoji/text/EmojiCompat.java"
- line="1079"
+ line="1129"
column="16"/>
</issue>
@@ -452,7 +452,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/emoji/text/EmojiCompat.java"
- line="1087"
+ line="1150"
column="25"/>
</issue>
@@ -767,17 +767,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 hasGlyph(final CharSequence charSequence, int start, final int end) {"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/emoji/text/EmojiProcessor.java"
- line="822"
- 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 int getSize(@NonNull final Paint paint, final CharSequence text, final int start,"
errorLine2=" ~~~~~~~~~~~~">
<location
diff --git a/enterprise/feedback/lint-baseline.xml b/enterprise/feedback/lint-baseline.xml
deleted file mode 100644
index f67a956..0000000
--- a/enterprise/feedback/lint-baseline.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<issues format="5" by="lint 4.2.0-alpha06" client="gradle" variant="debug" version="4.2.0-alpha06">
-
-</issues>
diff --git a/enterprise/feedback/testing/lint-baseline.xml b/enterprise/feedback/testing/lint-baseline.xml
deleted file mode 100644
index f67a956..0000000
--- a/enterprise/feedback/testing/lint-baseline.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<issues format="5" by="lint 4.2.0-alpha06" client="gradle" variant="debug" version="4.2.0-alpha06">
-
-</issues>
diff --git a/exifinterface/exifinterface/lint-baseline.xml b/exifinterface/exifinterface/lint-baseline.xml
index 8644ccd..99dbed9 100644
--- a/exifinterface/exifinterface/lint-baseline.xml
+++ b/exifinterface/exifinterface/lint-baseline.xml
@@ -8,7 +8,7 @@
errorLine2=" ^">
<location
file="src/main/java/androidx/exifinterface/media/ExifInterface.java"
- line="7852"
+ line="7930"
column="9"/>
</issue>
@@ -19,7 +19,7 @@
errorLine2=" ~~~">
<location
file="src/main/java/androidx/exifinterface/media/ExifInterface.java"
- line="3950"
+ line="3973"
column="37"/>
</issue>
@@ -30,52 +30,63 @@
errorLine2=" ~~~~~">
<location
file="src/main/java/androidx/exifinterface/media/ExifInterface.java"
- line="4610"
+ line="4655"
column="20"/>
</issue>
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 21, the call containing class androidx.exifinterface.media.ExifInterface is not annotated with @RequiresApi(x) where x is at least 21. Either annotate the containing class with at least @RequiresApi(21) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(21)."
- errorLine1=" Os.lseek(mSeekableFileDescriptor, 0, OsConstants.SEEK_SET);"
- errorLine2=" ~~~~~">
+ errorLine1=" Os.lseek(mSeekableFileDescriptor, 0, OsConstants.SEEK_SET);"
+ errorLine2=" ~~~~~">
<location
file="src/main/java/androidx/exifinterface/media/ExifInterface.java"
- line="4687"
- column="20"/>
+ line="4725"
+ column="24"/>
</issue>
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 21, the call containing class androidx.exifinterface.media.ExifInterface is not annotated with @RequiresApi(x) where x is at least 21. Either annotate the containing class with at least @RequiresApi(21) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(21)."
- errorLine1=" Os.lseek(mSeekableFileDescriptor, 0, OsConstants.SEEK_SET);"
- errorLine2=" ~~~~~">
+ errorLine1=" Os.lseek(mSeekableFileDescriptor, 0, OsConstants.SEEK_SET);"
+ errorLine2=" ~~~~~">
<location
file="src/main/java/androidx/exifinterface/media/ExifInterface.java"
- line="4709"
- column="20"/>
+ line="4752"
+ column="24"/>
</issue>
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 21, the call containing class androidx.exifinterface.media.ExifInterface is not annotated with @RequiresApi(x) where x is at least 21. Either annotate the containing class with at least @RequiresApi(21) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(21)."
- errorLine1=" newFileDescriptor = Os.dup(mSeekableFileDescriptor);"
- errorLine2=" ~~~">
+ errorLine1=" Os.lseek(mSeekableFileDescriptor, 0, OsConstants.SEEK_SET);"
+ errorLine2=" ~~~~~">
<location
file="src/main/java/androidx/exifinterface/media/ExifInterface.java"
- line="4797"
- column="40"/>
+ line="4775"
+ column="28"/>
</issue>
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 21, the call containing class androidx.exifinterface.media.ExifInterface is not annotated with @RequiresApi(x) where x is at least 21. Either annotate the containing class with at least @RequiresApi(21) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(21)."
- errorLine1=" Os.lseek(newFileDescriptor, 0, OsConstants.SEEK_SET);"
- errorLine2=" ~~~~~">
+ errorLine1=" newFileDescriptor = Os.dup(mSeekableFileDescriptor);"
+ errorLine2=" ~~~">
<location
file="src/main/java/androidx/exifinterface/media/ExifInterface.java"
- line="4798"
- column="20"/>
+ line="4862"
+ column="44"/>
+ </issue>
+
+ <issue
+ id="UnsafeNewApiCall"
+ message="This call is to a method from API 21, the call containing class androidx.exifinterface.media.ExifInterface is not annotated with @RequiresApi(x) where x is at least 21. Either annotate the containing class with at least @RequiresApi(21) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(21)."
+ errorLine1=" Os.lseek(newFileDescriptor, 0, OsConstants.SEEK_SET);"
+ errorLine2=" ~~~~~">
+ <location
+ file="src/main/java/androidx/exifinterface/media/ExifInterface.java"
+ line="4863"
+ column="24"/>
</issue>
<issue
@@ -85,7 +96,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/exifinterface/media/ExifInterface.java"
- line="5748"
+ line="5826"
column="27"/>
</issue>
@@ -96,7 +107,7 @@
errorLine2=" ~~~~~">
<location
file="src/main/java/androidx/exifinterface/media/ExifInterface.java"
- line="7989"
+ line="8067"
column="20"/>
</issue>
@@ -107,7 +118,7 @@
errorLine2=" ~~~~~">
<location
file="src/main/java/androidx/exifinterface/media/ExifInterface.java"
- line="4962"
+ line="5028"
column="31"/>
</issue>
@@ -118,7 +129,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/exifinterface/media/ExifInterface.java"
- line="5007"
+ line="5073"
column="28"/>
</issue>
diff --git a/exifinterface/exifinterface/src/androidTest/java/androidx/exifinterface/media/ExifInterfaceTest.java b/exifinterface/exifinterface/src/androidTest/java/androidx/exifinterface/media/ExifInterfaceTest.java
index 9646ab1..5899803 100644
--- a/exifinterface/exifinterface/src/androidTest/java/androidx/exifinterface/media/ExifInterfaceTest.java
+++ b/exifinterface/exifinterface/src/androidTest/java/androidx/exifinterface/media/ExifInterfaceTest.java
@@ -93,18 +93,23 @@
private static final String WEBP_WITHOUT_EXIF = "webp_without_exif.webp";
private static final String WEBP_WITHOUT_EXIF_WITH_LOSSLESS_ENCODING =
"webp_lossless_without_exif.webp";
- private static final String JPEG_WITH_DATETIME_TAG = "jpeg_with_datetime_tag.jpg";
+ private static final String JPEG_WITH_DATETIME_TAG_PRIMARY_FORMAT =
+ "jpeg_with_datetime_tag_primary_format.jpg";
+ private static final String JPEG_WITH_DATETIME_TAG_SECONDARY_FORMAT =
+ "jpeg_with_datetime_tag_secondary_format.jpg";
private static final int[] IMAGE_RESOURCES = new int[] {
R.raw.jpeg_with_exif_byte_order_ii, R.raw.jpeg_with_exif_byte_order_mm,
R.raw.dng_with_exif_with_xmp, R.raw.jpeg_with_exif_with_xmp,
R.raw.png_with_exif_byte_order_ii, R.raw.png_without_exif, R.raw.webp_with_exif,
R.raw.webp_with_anim_without_exif, R.raw.webp_without_exif,
- R.raw.webp_lossless_without_exif, R.raw.jpeg_with_datetime_tag};
+ R.raw.webp_lossless_without_exif, R.raw.jpeg_with_datetime_tag_primary_format,
+ R.raw.jpeg_with_datetime_tag_secondary_format};
private static final String[] IMAGE_FILENAMES = new String[] {
JPEG_WITH_EXIF_BYTE_ORDER_II, JPEG_WITH_EXIF_BYTE_ORDER_MM, DNG_WITH_EXIF_WITH_XMP,
JPEG_WITH_EXIF_WITH_XMP, PNG_WITH_EXIF_BYTE_ORDER_II, PNG_WITHOUT_EXIF,
WEBP_WITH_EXIF, WEBP_WITHOUT_EXIF_WITH_ANIM_DATA, WEBP_WITHOUT_EXIF,
- WEBP_WITHOUT_EXIF_WITH_LOSSLESS_ENCODING, JPEG_WITH_DATETIME_TAG};
+ WEBP_WITHOUT_EXIF_WITH_LOSSLESS_ENCODING, JPEG_WITH_DATETIME_TAG_PRIMARY_FORMAT,
+ JPEG_WITH_DATETIME_TAG_SECONDARY_FORMAT};
private static final int USER_READ_WRITE = 0600;
private static final String TEST_TEMP_FILE_NAME = "testImage";
@@ -632,7 +637,7 @@
final String dateTimeValue = "2017:02:02 22:22:22";
final String dateTimeOriginalValue = "2017:01:01 11:11:11";
- File imageFile = getFileFromExternalDir(JPEG_WITH_DATETIME_TAG);
+ File imageFile = getFileFromExternalDir(JPEG_WITH_DATETIME_TAG_PRIMARY_FORMAT);
ExifInterface exif = new ExifInterface(imageFile.getAbsolutePath());
assertEquals(expectedDatetimeValue, (long) exif.getDateTime());
assertEquals(expectedDatetimeValue, (long) exif.getDateTimeOriginal());
@@ -670,6 +675,42 @@
assertEquals(currentTimeStamp - expectedDatetimeOffsetLongValue, (long) exif.getDateTime());
}
+ /**
+ * Test whether ExifInterface can correctly get and set datetime value for a secondary format:
+ * Primary format example: 2020:01:01 00:00:00
+ * Secondary format example: 2020-01-01 00:00:00
+ *
+ * Getting a datetime tag value with the secondary format should work for both
+ * {@link ExifInterface#getAttribute(String)} and {@link ExifInterface#getDateTime()}.
+ * Setting a datetime tag value with the secondary format with
+ * {@link ExifInterface#setAttribute(String, String)} should automatically convert it to the
+ * primary format.
+ */
+ @Test
+ @SmallTest
+ public void testGetSetDateTimeForSecondaryFormat() throws Exception {
+ final long dateTimePrimaryFormatLongValue = 1604075491000L;
+ final String dateTimePrimaryFormatStringValue = "2020-10-30 16:31:31";
+ File imageFile = getFileFromExternalDir(JPEG_WITH_DATETIME_TAG_SECONDARY_FORMAT);
+
+ // Check that secondary format value is read correctly.
+ ExifInterface exif = new ExifInterface(imageFile.getAbsolutePath());
+ assertEquals(dateTimePrimaryFormatStringValue,
+ exif.getAttribute(ExifInterface.TAG_DATETIME));
+ assertEquals(dateTimePrimaryFormatLongValue, (long) exif.getDateTime());
+
+ final long dateTimeSecondaryFormatLongValue = 1577836800000L;
+ final String dateTimeSecondaryFormatStringValue = "2020-01-01 00:00:00";
+ final String modifiedDateTimeSecondaryFormatStringValue = "2020:01:01 00:00:00";
+
+ // Check that secondary format value is written correctly.
+ exif.setAttribute(ExifInterface.TAG_DATETIME, dateTimeSecondaryFormatStringValue);
+ exif.saveAttributes();
+ assertEquals(modifiedDateTimeSecondaryFormatStringValue,
+ exif.getAttribute(ExifInterface.TAG_DATETIME));
+ assertEquals(dateTimeSecondaryFormatLongValue, (long) exif.getDateTime());
+ }
+
@Test
@LargeTest
public void testRotation() throws IOException {
diff --git a/exifinterface/exifinterface/src/androidTest/res/raw/jpeg_with_datetime_tag.jpg b/exifinterface/exifinterface/src/androidTest/res/raw/jpeg_with_datetime_tag_primary_format.jpg
similarity index 100%
rename from exifinterface/exifinterface/src/androidTest/res/raw/jpeg_with_datetime_tag.jpg
rename to exifinterface/exifinterface/src/androidTest/res/raw/jpeg_with_datetime_tag_primary_format.jpg
Binary files differ
diff --git a/exifinterface/exifinterface/src/androidTest/res/raw/jpeg_with_datetime_tag_secondary_format.jpg b/exifinterface/exifinterface/src/androidTest/res/raw/jpeg_with_datetime_tag_secondary_format.jpg
new file mode 100644
index 0000000..53ad4e9
--- /dev/null
+++ b/exifinterface/exifinterface/src/androidTest/res/raw/jpeg_with_datetime_tag_secondary_format.jpg
Binary files differ
diff --git a/exifinterface/exifinterface/src/main/java/androidx/exifinterface/media/ExifInterface.java b/exifinterface/exifinterface/src/main/java/androidx/exifinterface/media/ExifInterface.java
index 9766912..c0347c4 100644
--- a/exifinterface/exifinterface/src/main/java/androidx/exifinterface/media/ExifInterface.java
+++ b/exifinterface/exifinterface/src/main/java/androidx/exifinterface/media/ExifInterface.java
@@ -67,7 +67,6 @@
import java.util.Map;
import java.util.Set;
import java.util.TimeZone;
-import java.util.UUID;
import java.util.concurrent.TimeUnit;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -454,6 +453,10 @@
* <li>Length = 19</li>
* <li>Default = None</li>
* </ul>
+ *
+ * <p>Note: The format "YYYY-MM-DD HH:MM:SS" is also supported for reading. For writing,
+ * however, calling {@link #setAttribute(String, String)} with the "YYYY-MM-DD HH:MM:SS"
+ * format will automatically convert it to the primary format, "YYYY:MM:DD HH:MM:SS".
*/
public static final String TAG_DATETIME = "DateTime";
/**
@@ -745,6 +748,10 @@
* <li>Length = 19</li>
* <li>Default = None</li>
* </ul>
+ *
+ * <p>Note: The format "YYYY-MM-DD HH:MM:SS" is also supported for reading. For writing,
+ * however, calling {@link #setAttribute(String, String)} with the "YYYY-MM-DD HH:MM:SS"
+ * format will automatically convert it to the primary format, "YYYY:MM:DD HH:MM:SS".
*/
public static final String TAG_DATETIME_ORIGINAL = "DateTimeOriginal";
/**
@@ -763,6 +770,10 @@
* <li>Length = 19</li>
* <li>Default = None</li>
* </ul>
+ *
+ * <p>Note: The format "YYYY-MM-DD HH:MM:SS" is also supported for reading. For writing,
+ * however, calling {@link #setAttribute(String, String)} with the "YYYY-MM-DD HH:MM:SS"
+ * format will automatically convert it to the primary format, "YYYY:MM:DD HH:MM:SS".
*/
public static final String TAG_DATETIME_DIGITIZED = "DateTimeDigitized";
/**
@@ -2999,7 +3010,8 @@
private static final int WEBP_CHUNK_TYPE_BYTE_LENGTH = 4;
private static final int WEBP_CHUNK_SIZE_BYTE_LENGTH = 4;
- private static SimpleDateFormat sFormatter;
+ private static SimpleDateFormat sFormatterPrimary;
+ private static SimpleDateFormat sFormatterSecondary;
// See Exchangeable image file format for digital still cameras: Exif version 2.2.
// The following values are for parsing EXIF data area. There are tag groups in EXIF data area.
@@ -3840,8 +3852,10 @@
private static final int IMAGE_TYPE_WEBP = 14;
static {
- sFormatter = new SimpleDateFormat("yyyy:MM:dd HH:mm:ss", Locale.US);
- sFormatter.setTimeZone(TimeZone.getTimeZone("UTC"));
+ sFormatterPrimary = new SimpleDateFormat("yyyy:MM:dd HH:mm:ss", Locale.US);
+ sFormatterPrimary.setTimeZone(TimeZone.getTimeZone("UTC"));
+ sFormatterSecondary = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.US);
+ sFormatterSecondary.setTimeZone(TimeZone.getTimeZone("UTC"));
// Build up the hash tables to look up Exif tags for reading Exif tags.
for (int ifdType = 0; ifdType < EXIF_TAGS.length; ++ifdType) {
@@ -3890,10 +3904,17 @@
private boolean mXmpIsFromSeparateMarker;
// Pattern to check non zero timestamp
- private static final Pattern sNonZeroTimePattern = Pattern.compile(".*[1-9].*");
+ private static final Pattern NON_ZERO_TIME_PATTERN = Pattern.compile(".*[1-9].*");
// Pattern to check gps timestamp
- private static final Pattern sGpsTimestampPattern =
- Pattern.compile("^([0-9][0-9]):([0-9][0-9]):([0-9][0-9])$");
+ private static final Pattern GPS_TIMESTAMP_PATTERN =
+ Pattern.compile("^(\\d{2}):(\\d{2}):(\\d{2})$");
+ // Pattern to check date time primary format (e.g. 2020:01:01 00:00:00)
+ private static final Pattern DATETIME_PRIMARY_FORMAT_PATTERN =
+ Pattern.compile("^(\\d{4}):(\\d{2}):(\\d{2})\\s(\\d{2}):(\\d{2}):(\\d{2})$");
+ // Pattern to check date time secondary format (e.g. 2020-01-01 00:00:00)
+ private static final Pattern DATETIME_SECONDARY_FORMAT_PATTERN =
+ Pattern.compile("^(\\d{4})-(\\d{2})-(\\d{2})\\s(\\d{2}):(\\d{2}):(\\d{2})$");
+ private static final int DATETIME_VALUE_STRING_LENGTH = 19;
/**
* Reads Exif tags from the specified image file.
@@ -4192,6 +4213,28 @@
if (tag == null) {
throw new NullPointerException("tag shouldn't be null");
}
+ // Validate and convert if necessary.
+ if (TAG_DATETIME.equals(tag) || TAG_DATETIME_ORIGINAL.equals(tag)
+ || TAG_DATETIME_DIGITIZED.equals(tag)) {
+ if (value != null) {
+ boolean isPrimaryFormat = DATETIME_PRIMARY_FORMAT_PATTERN.matcher(value).find();
+ boolean isSecondaryFormat = DATETIME_SECONDARY_FORMAT_PATTERN.matcher(value).find();
+ // Validate
+ if (value.length() != DATETIME_VALUE_STRING_LENGTH
+ || (!isPrimaryFormat && !isSecondaryFormat)) {
+ Log.w(TAG, "Invalid value for " + tag + " : " + value);
+ return;
+ }
+ // If datetime value has secondary format (e.g. 2020-01-01 00:00:00), convert it to
+ // primary format (e.g. 2020:01:01 00:00:00) since it is the format in the
+ // official documentation.
+ // See JEITA CP-3451C Section 4.6.4. D. Other Tags, DateTime
+ if (isSecondaryFormat) {
+ // Replace "-" with ":" to match the primary format.
+ value = value.replaceAll("-", ":");
+ }
+ }
+ }
// Maintain compatibility.
if (TAG_ISO_SPEED_RATINGS.equals(tag)) {
if (DEBUG) {
@@ -4203,7 +4246,7 @@
// Convert the given value to rational values for backwards compatibility.
if (value != null && sTagSetForCompatibility.contains(tag)) {
if (tag.equals(TAG_GPS_TIMESTAMP)) {
- Matcher m = sGpsTimestampPattern.matcher(value);
+ Matcher m = GPS_TIMESTAMP_PATTERN.matcher(value);
if (!m.find()) {
Log.w(TAG, "Invalid value for " + tag + " : " + value);
return;
@@ -4669,28 +4712,22 @@
FileInputStream in = null;
FileOutputStream out = null;
- File originalFile = null;
- if (mFilename != null) {
- originalFile = new File(mFilename);
- }
File tempFile = null;
try {
- // Move the original file to temporary file.
+ // Copy the original file to temporary file.
+ tempFile = File.createTempFile("temp", "tmp");
if (mFilename != null) {
- String parent = originalFile.getParent();
- String name = originalFile.getName();
- String tempPrefix = UUID.randomUUID().toString() + "_";
- tempFile = new File(parent, tempPrefix + name);
- if (!originalFile.renameTo(tempFile)) {
- throw new IOException("Couldn't rename to " + tempFile.getAbsolutePath());
+ in = new FileInputStream(mFilename);
+ } else {
+ // mSeekableFileDescriptor will be non-null only for SDK_INT >= 21, but this check
+ // is needed to prevent calling Os.lseek at runtime for SDK < 21.
+ if (Build.VERSION.SDK_INT >= 21) {
+ Os.lseek(mSeekableFileDescriptor, 0, OsConstants.SEEK_SET);
+ in = new FileInputStream(mSeekableFileDescriptor);
}
- } else if (Build.VERSION.SDK_INT >= 21 && mSeekableFileDescriptor != null) {
- tempFile = File.createTempFile("temp", "tmp");
- Os.lseek(mSeekableFileDescriptor, 0, OsConstants.SEEK_SET);
- in = new FileInputStream(mSeekableFileDescriptor);
- out = new FileOutputStream(tempFile);
- copy(in, out);
}
+ out = new FileOutputStream(tempFile);
+ copy(in, out);
} catch (Exception e) {
throw new IOException("Failed to copy original file to temp file", e);
} finally {
@@ -4702,14 +4739,19 @@
out = null;
BufferedInputStream bufferedIn = null;
BufferedOutputStream bufferedOut = null;
+ boolean shouldKeepTempFile = false;
try {
// Save the new file.
in = new FileInputStream(tempFile);
if (mFilename != null) {
out = new FileOutputStream(mFilename);
- } else if (Build.VERSION.SDK_INT >= 21 && mSeekableFileDescriptor != null) {
- Os.lseek(mSeekableFileDescriptor, 0, OsConstants.SEEK_SET);
- out = new FileOutputStream(mSeekableFileDescriptor);
+ } else {
+ // mSeekableFileDescriptor will be non-null only for SDK_INT >= 21, but this check
+ // is needed to prevent calling Os.lseek at runtime for SDK < 21.
+ if (Build.VERSION.SDK_INT >= 21) {
+ Os.lseek(mSeekableFileDescriptor, 0, OsConstants.SEEK_SET);
+ out = new FileOutputStream(mSeekableFileDescriptor);
+ }
}
bufferedIn = new BufferedInputStream(in);
bufferedOut = new BufferedOutputStream(out);
@@ -4721,17 +4763,35 @@
saveWebpAttributes(bufferedIn, bufferedOut);
}
} catch (Exception e) {
- if (mFilename != null) {
- if (!tempFile.renameTo(originalFile)) {
- throw new IOException("Couldn't restore original file: "
- + originalFile.getAbsolutePath());
+ try {
+ // Restore original file
+ in = new FileInputStream(tempFile);
+ if (mFilename != null) {
+ out = new FileOutputStream(mFilename);
+ } else {
+ // mSeekableFileDescriptor will be non-null only for SDK_INT >= 21, but this
+ // check is needed to prevent calling Os.lseek at runtime for SDK < 21.
+ if (Build.VERSION.SDK_INT >= 21) {
+ Os.lseek(mSeekableFileDescriptor, 0, OsConstants.SEEK_SET);
+ out = new FileOutputStream(mSeekableFileDescriptor);
+ }
}
+ copy(in, out);
+ } catch (Exception exception) {
+ shouldKeepTempFile = true;
+ throw new IOException("Failed to save new file. Original file is stored in "
+ + tempFile.getAbsolutePath(), exception);
+ } finally {
+ closeQuietly(in);
+ closeQuietly(out);
}
throw new IOException("Failed to save new file", e);
} finally {
closeQuietly(bufferedIn);
closeQuietly(bufferedOut);
- tempFile.delete();
+ if (!shouldKeepTempFile) {
+ tempFile.delete();
+ }
}
// Discard the thumbnail in memory
@@ -4795,10 +4855,14 @@
}
} else if (mFilename != null) {
in = new FileInputStream(mFilename);
- } else if (Build.VERSION.SDK_INT >= 21 && mSeekableFileDescriptor != null) {
- newFileDescriptor = Os.dup(mSeekableFileDescriptor);
- Os.lseek(newFileDescriptor, 0, OsConstants.SEEK_SET);
- in = new FileInputStream(newFileDescriptor);
+ } else {
+ // mSeekableFileDescriptor will be non-null only for SDK_INT >= 21, but this check
+ // is needed to prevent calling Os.lseek and Os.dup at runtime for SDK < 21.
+ if (Build.VERSION.SDK_INT >= 21) {
+ newFileDescriptor = Os.dup(mSeekableFileDescriptor);
+ Os.lseek(newFileDescriptor, 0, OsConstants.SEEK_SET);
+ in = new FileInputStream(newFileDescriptor);
+ }
}
if (in == null) {
// Should not be reached this.
@@ -5017,7 +5081,8 @@
setAttribute(TAG_GPS_SPEED_REF, "K");
setAttribute(TAG_GPS_SPEED, new Rational(location.getSpeed()
* TimeUnit.HOURS.toSeconds(1) / 1000).toString());
- String[] dateTime = sFormatter.format(new Date(location.getTime())).split("\\s+", -1);
+ String[] dateTime = sFormatterPrimary.format(
+ new Date(location.getTime())).split("\\s+", -1);
setAttribute(ExifInterface.TAG_GPS_DATESTAMP, dateTime[0]);
setAttribute(ExifInterface.TAG_GPS_TIMESTAMP, dateTime[1]);
}
@@ -5080,7 +5145,7 @@
@RestrictTo(RestrictTo.Scope.LIBRARY)
public void setDateTime(@NonNull Long timeStamp) {
long sub = timeStamp % 1000;
- setAttribute(TAG_DATETIME, sFormatter.format(new Date(timeStamp)));
+ setAttribute(TAG_DATETIME, sFormatterPrimary.format(new Date(timeStamp)));
setAttribute(TAG_SUBSEC_TIME, Long.toString(sub));
}
@@ -5131,16 +5196,22 @@
private static Long parseDateTime(@Nullable String dateTimeString, @Nullable String subSecs,
@Nullable String offsetString) {
- if (dateTimeString == null
- || !sNonZeroTimePattern.matcher(dateTimeString).matches()) return null;
+ if (dateTimeString == null || !NON_ZERO_TIME_PATTERN.matcher(dateTimeString).matches()) {
+ return null;
+ }
ParsePosition pos = new ParsePosition(0);
try {
// The exif field is in local time. Parsing it as if it is UTC will yield time
// since 1/1/1970 local time
- Date datetime = sFormatter.parse(dateTimeString, pos);
- if (datetime == null) return null;
- long msecs = datetime.getTime();
+ Date dateTime = sFormatterPrimary.parse(dateTimeString, pos);
+ if (dateTime == null) {
+ dateTime = sFormatterSecondary.parse(dateTimeString, pos);
+ if (dateTime == null) {
+ return null;
+ }
+ }
+ long msecs = dateTime.getTime();
if (offsetString != null) {
String sign = offsetString.substring(0, 1);
int hour = Integer.parseInt(offsetString.substring(1, 3));
@@ -5179,8 +5250,8 @@
String date = getAttribute(TAG_GPS_DATESTAMP);
String time = getAttribute(TAG_GPS_TIMESTAMP);
if (date == null || time == null
- || (!sNonZeroTimePattern.matcher(date).matches()
- && !sNonZeroTimePattern.matcher(time).matches())) {
+ || (!NON_ZERO_TIME_PATTERN.matcher(date).matches()
+ && !NON_ZERO_TIME_PATTERN.matcher(time).matches())) {
return null;
}
@@ -5188,9 +5259,14 @@
ParsePosition pos = new ParsePosition(0);
try {
- Date datetime = sFormatter.parse(dateTimeString, pos);
- if (datetime == null) return null;
- return datetime.getTime();
+ Date dateTime = sFormatterPrimary.parse(dateTimeString, pos);
+ if (dateTime == null) {
+ dateTime = sFormatterSecondary.parse(dateTimeString, pos);
+ if (dateTime == null) {
+ return null;
+ }
+ }
+ return dateTime.getTime();
} catch (IllegalArgumentException e) {
return null;
}
diff --git a/fragment/fragment/lint-baseline.xml b/fragment/fragment/lint-baseline.xml
index 13cc14e..8526c0b 100644
--- a/fragment/fragment/lint-baseline.xml
+++ b/fragment/fragment/lint-baseline.xml
@@ -8,7 +8,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/fragment/app/Fragment.java"
- line="2927"
+ line="2929"
column="35"/>
</issue>
diff --git a/heifwriter/heifwriter/lint-baseline.xml b/heifwriter/heifwriter/lint-baseline.xml
index fc43d54..b26aa9e 100644
--- a/heifwriter/heifwriter/lint-baseline.xml
+++ b/heifwriter/heifwriter/lint-baseline.xml
@@ -8,7 +8,7 @@
errorLine2=" ^">
<location
file="src/main/java/androidx/heifwriter/HeifEncoder.java"
- line="826"
+ line="836"
column="9"/>
</issue>
@@ -19,7 +19,7 @@
errorLine2=" ^">
<location
file="src/main/java/androidx/heifwriter/HeifEncoder.java"
- line="841"
+ line="851"
column="9"/>
</issue>
@@ -30,7 +30,7 @@
errorLine2=" ^">
<location
file="src/main/java/androidx/heifwriter/HeifEncoder.java"
- line="854"
+ line="864"
column="9"/>
</issue>
@@ -41,7 +41,7 @@
errorLine2=" ^">
<location
file="src/main/java/androidx/heifwriter/HeifWriter.java"
- line="663"
+ line="666"
column="9"/>
</issue>
@@ -52,7 +52,7 @@
errorLine2=" ^">
<location
file="src/main/java/androidx/heifwriter/HeifWriter.java"
- line="693"
+ line="696"
column="9"/>
</issue>
@@ -151,7 +151,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/heifwriter/HeifEncoder.java"
- line="448"
+ line="444"
column="34"/>
</issue>
@@ -162,7 +162,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/heifwriter/HeifWriter.java"
- line="208"
+ line="206"
column="16"/>
</issue>
@@ -173,7 +173,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/heifwriter/HeifWriter.java"
- line="223"
+ line="221"
column="16"/>
</issue>
@@ -184,7 +184,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/heifwriter/HeifWriter.java"
- line="235"
+ line="233"
column="16"/>
</issue>
@@ -195,7 +195,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/heifwriter/HeifWriter.java"
- line="254"
+ line="252"
column="16"/>
</issue>
@@ -206,7 +206,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/heifwriter/HeifWriter.java"
- line="269"
+ line="267"
column="16"/>
</issue>
@@ -217,7 +217,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/heifwriter/HeifWriter.java"
- line="285"
+ line="283"
column="16"/>
</issue>
@@ -228,7 +228,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/heifwriter/HeifWriter.java"
- line="297"
+ line="295"
column="16"/>
</issue>
diff --git a/leanback/leanback/lint-baseline.xml b/leanback/leanback/lint-baseline.xml
index be6f1ed..6d0b2b5 100644
--- a/leanback/leanback/lint-baseline.xml
+++ b/leanback/leanback/lint-baseline.xml
@@ -8090,7 +8090,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/leanback/widget/GuidanceStylist.java"
- line="228"
+ line="229"
column="12"/>
</issue>
@@ -8101,7 +8101,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/leanback/widget/GuidanceStylist.java"
- line="236"
+ line="237"
column="12"/>
</issue>
@@ -8112,7 +8112,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/leanback/widget/GuidanceStylist.java"
- line="244"
+ line="245"
column="12"/>
</issue>
@@ -8123,7 +8123,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/leanback/widget/GuidanceStylist.java"
- line="252"
+ line="253"
column="12"/>
</issue>
diff --git a/lifecycle/lifecycle-extensions/lint-baseline.xml b/lifecycle/lifecycle-extensions/lint-baseline.xml
index d5b1c0f..31eaa5d 100644
--- a/lifecycle/lifecycle-extensions/lint-baseline.xml
+++ b/lifecycle/lifecycle-extensions/lint-baseline.xml
@@ -8,7 +8,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/lifecycle/ViewModelProviders.java"
- line="34"
+ line="33"
column="14"/>
</issue>
diff --git a/lifecycle/lifecycle-runtime/lint-baseline.xml b/lifecycle/lifecycle-runtime/lint-baseline.xml
index 9cd5f9b..4da5f56 100644
--- a/lifecycle/lifecycle-runtime/lint-baseline.xml
+++ b/lifecycle/lifecycle-runtime/lint-baseline.xml
@@ -48,12 +48,12 @@
<issue
id="RestrictedApi"
message="FastSafeIterableMap.ceil can only be called from within the same library group prefix (referenced groupId=`androidx.arch.core` with prefix androidx.arch from groupId=`androidx.lifecycle`)"
- errorLine1=" Entry<LifecycleObserver, ObserverWithState> previous = mObserverMap.ceil(observer);"
- errorLine2=" ~~~~">
+ errorLine1=" Map.Entry<LifecycleObserver, ObserverWithState> previous = mObserverMap.ceil(observer);"
+ errorLine2=" ~~~~">
<location
file="src/main/java/androidx/lifecycle/LifecycleRegistry.java"
line="162"
- column="77"/>
+ column="81"/>
</issue>
<issue
@@ -158,12 +158,12 @@
<issue
id="RestrictedApi"
message="SafeIterableMap.newest can only be called from within the same library group prefix (referenced groupId=`androidx.arch.core` with prefix androidx.arch from groupId=`androidx.lifecycle`)"
- errorLine1=" Entry<LifecycleObserver, ObserverWithState> newest = mObserverMap.newest();"
- errorLine2=" ~~~~~~">
+ errorLine1=" Map.Entry<LifecycleObserver, ObserverWithState> newest = mObserverMap.newest();"
+ errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/lifecycle/LifecycleRegistry.java"
line="304"
- column="79"/>
+ column="83"/>
</issue>
</issues>
diff --git a/lint-checks/src/main/java/androidx/build/lint/AndroidXIssueRegistry.kt b/lint-checks/src/main/java/androidx/build/lint/AndroidXIssueRegistry.kt
index e3f9194..b894031f6 100644
--- a/lint-checks/src/main/java/androidx/build/lint/AndroidXIssueRegistry.kt
+++ b/lint-checks/src/main/java/androidx/build/lint/AndroidXIssueRegistry.kt
@@ -43,6 +43,7 @@
TestSizeAnnotationEnforcer.MISSING_TEST_SIZE_ANNOTATION,
TestSizeAnnotationEnforcer.UNEXPECTED_TEST_SIZE_ANNOTATION,
TestSizeAnnotationEnforcer.UNSUPPORTED_TEST_RUNNER,
+ BanUncheckedReflection.ISSUE,
ObsoleteBuildCompatUsageDetector.ISSUE,
BanSynchronizedMethods.ISSUE,
MetadataTagInsideApplicationTagDetector.ISSUE,
diff --git a/lint-checks/src/main/java/androidx/build/lint/BanUncheckedReflection.kt b/lint-checks/src/main/java/androidx/build/lint/BanUncheckedReflection.kt
new file mode 100644
index 0000000..33c2ea5
--- /dev/null
+++ b/lint-checks/src/main/java/androidx/build/lint/BanUncheckedReflection.kt
@@ -0,0 +1,67 @@
+/*
+ * 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.build.lint
+import com.android.tools.lint.detector.api.Category
+import com.android.tools.lint.detector.api.Detector
+import com.android.tools.lint.detector.api.Implementation
+import com.android.tools.lint.detector.api.Issue
+import com.android.tools.lint.detector.api.JavaContext
+import com.android.tools.lint.detector.api.Scope
+import com.android.tools.lint.checks.VersionChecks.Companion.isWithinVersionCheckConditional
+import com.android.sdklib.SdkVersionInfo
+import com.android.tools.lint.detector.api.Severity
+import com.android.tools.lint.detector.api.SourceCodeScanner
+import com.intellij.psi.PsiMethod
+import org.jetbrains.uast.UCallExpression
+const val METHOD_REFLECTION_CLASS = "java.lang.reflect.Method"
+class BanUncheckedReflection : Detector(), SourceCodeScanner {
+ override fun getApplicableMethodNames() = listOf("invoke")
+ override fun visitMethodCall(context: JavaContext, node: UCallExpression, method: PsiMethod) {
+ // We are not really monitoring if the reflection call is within the right API check
+ // we leave that to the user, and so we check for any API check really. That means
+ // any check with an upper bound of the highest known API or a with a lower bound of 1
+ // (which should technically include every check) is good enough.
+ // Return if not reflection
+ if (!context.evaluator.isMemberInClass(method, METHOD_REFLECTION_CLASS)) return
+ // If not within an SDK check, flag
+ if (!isWithinVersionCheckConditional(
+ context.evaluator, node, SdkVersionInfo.HIGHEST_KNOWN_API, false
+ ) && !isWithinVersionCheckConditional(
+ context.evaluator, node, 1, true
+ )
+ ) {
+
+ context.report(
+ ISSUE, node, context.getLocation(node),
+ "Calling Method.invoke without an SDK check"
+ )
+ }
+ }
+ companion object {
+ val ISSUE = Issue.create(
+ "BanUncheckedReflection",
+ "Reflection that is not within an SDK check",
+ "Use of reflection can be risky and there is never a" +
+ " reason to use reflection without" +
+ " having to check for the device's SDK (either through SDK_INT comparison or " +
+ "methods such as isAtLeastP etc...)" +
+ ". Please surround the Method.invoke" +
+ " call with the appropriate SDK_INT check.",
+ Category.CORRECTNESS, 5, Severity.ERROR,
+ Implementation(BanUncheckedReflection::class.java, Scope.JAVA_FILE_SCOPE)
+ )
+ }
+}
diff --git a/media/media/lint-baseline.xml b/media/media/lint-baseline.xml
index 2f932d3..142e1b9 100644
--- a/media/media/lint-baseline.xml
+++ b/media/media/lint-baseline.xml
@@ -239,7 +239,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/media/session/MediaButtonReceiver.java"
- line="294"
+ line="297"
column="21"/>
</issue>
@@ -569,7 +569,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="602"
+ line="603"
column="20"/>
</issue>
@@ -580,7 +580,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="604"
+ line="605"
column="20"/>
</issue>
@@ -591,7 +591,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="2219"
+ line="2220"
column="24"/>
</issue>
@@ -602,7 +602,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="2240"
+ line="2241"
column="50"/>
</issue>
@@ -613,7 +613,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="2243"
+ line="2244"
column="36"/>
</issue>
@@ -624,56 +624,12 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="3948"
+ line="3963"
column="29"/>
</issue>
<issue
id="UnsafeNewApiCall"
- message="This call is to a method from API 28, the call containing class androidx.media.MediaSessionManagerImplApi28.RemoteUserInfoImplApi28 is not annotated with @RequiresApi(x) where x is at least 28. Either annotate the containing class with at least @RequiresApi(28) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(28)."
- errorLine1=" mObject = new android.media.session.MediaSessionManager.RemoteUserInfo("
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/media/MediaSessionManagerImplApi28.java"
- line="68"
- column="23"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 28, the call containing class androidx.media.MediaSessionManagerImplApi28.RemoteUserInfoImplApi28 is not annotated with @RequiresApi(x) where x is at least 28. Either annotate the containing class with at least @RequiresApi(28) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(28)."
- errorLine1=" super(remoteUserInfo.getPackageName(), remoteUserInfo.getPid(),"
- errorLine2=" ~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/media/MediaSessionManagerImplApi28.java"
- line="74"
- column="34"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 28, the call containing class androidx.media.MediaSessionManagerImplApi28.RemoteUserInfoImplApi28 is not annotated with @RequiresApi(x) where x is at least 28. Either annotate the containing class with at least @RequiresApi(28) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(28)."
- errorLine1=" super(remoteUserInfo.getPackageName(), remoteUserInfo.getPid(),"
- errorLine2=" ~~~~~~">
- <location
- file="src/main/java/androidx/media/MediaSessionManagerImplApi28.java"
- line="74"
- column="67"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 28, the call containing class androidx.media.MediaSessionManagerImplApi28.RemoteUserInfoImplApi28 is not annotated with @RequiresApi(x) where x is at least 28. Either annotate the containing class with at least @RequiresApi(28) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(28)."
- errorLine1=" remoteUserInfo.getUid());"
- errorLine2=" ~~~~~~">
- <location
- file="src/main/java/androidx/media/MediaSessionManagerImplApi28.java"
- line="75"
- column="36"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
message="This call is to a method from API 16, the call containing class androidx.media.app.NotificationCompat.MediaStyle is not annotated with @RequiresApi(x) where x is at least 16. Either annotate the containing class with at least @RequiresApi(16) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(16)."
errorLine1=" builder.getBuilder().setStyle("
errorLine2=" ~~~~~~~~">
@@ -1614,7 +1570,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/media/MediaBrowserServiceCompat.java"
- line="1305"
+ line="1306"
column="37"/>
</issue>
@@ -1625,7 +1581,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/media/MediaBrowserServiceCompat.java"
- line="1327"
+ line="1328"
column="12"/>
</issue>
@@ -1636,7 +1592,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/media/MediaBrowserServiceCompat.java"
- line="1327"
+ line="1328"
column="27"/>
</issue>
@@ -1647,7 +1603,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/media/MediaBrowserServiceCompat.java"
- line="1332"
+ line="1333"
column="22"/>
</issue>
@@ -1658,7 +1614,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/media/MediaBrowserServiceCompat.java"
- line="1332"
+ line="1333"
column="41"/>
</issue>
@@ -1669,7 +1625,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/media/MediaBrowserServiceCompat.java"
- line="1332"
+ line="1333"
column="61"/>
</issue>
@@ -1680,7 +1636,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/media/MediaBrowserServiceCompat.java"
- line="1423"
+ line="1424"
column="29"/>
</issue>
@@ -1691,7 +1647,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/media/MediaBrowserServiceCompat.java"
- line="1423"
+ line="1424"
column="40"/>
</issue>
@@ -1702,7 +1658,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/media/MediaBrowserServiceCompat.java"
- line="1433"
+ line="1434"
column="31"/>
</issue>
@@ -1713,7 +1669,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/media/MediaBrowserServiceCompat.java"
- line="1454"
+ line="1455"
column="28"/>
</issue>
@@ -1724,7 +1680,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/media/MediaBrowserServiceCompat.java"
- line="1480"
+ line="1481"
column="49"/>
</issue>
@@ -1735,7 +1691,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/media/MediaBrowserServiceCompat.java"
- line="1505"
+ line="1506"
column="56"/>
</issue>
@@ -1746,7 +1702,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/media/MediaBrowserServiceCompat.java"
- line="1518"
+ line="1519"
column="33"/>
</issue>
@@ -1757,7 +1713,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/media/MediaBrowserServiceCompat.java"
- line="1553"
+ line="1554"
column="18"/>
</issue>
@@ -1768,7 +1724,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/media/MediaBrowserServiceCompat.java"
- line="1961"
+ line="1962"
column="16"/>
</issue>
@@ -1779,7 +1735,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/media/MediaBrowserServiceCompat.java"
- line="1968"
+ line="1969"
column="16"/>
</issue>
@@ -1900,7 +1856,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/media/session/MediaButtonReceiver.java"
- line="276"
+ line="279"
column="19"/>
</issue>
@@ -1911,7 +1867,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/media/session/MediaButtonReceiver.java"
- line="276"
+ line="279"
column="65"/>
</issue>
@@ -2967,7 +2923,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="618"
+ line="619"
column="29"/>
</issue>
@@ -2978,7 +2934,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="634"
+ line="635"
column="29"/>
</issue>
@@ -2989,7 +2945,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="634"
+ line="635"
column="48"/>
</issue>
@@ -3000,7 +2956,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="650"
+ line="651"
column="36"/>
</issue>
@@ -3011,7 +2967,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="667"
+ line="668"
column="40"/>
</issue>
@@ -3022,7 +2978,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="709"
+ line="710"
column="37"/>
</issue>
@@ -3033,7 +2989,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="753"
+ line="754"
column="34"/>
</issue>
@@ -3044,7 +3000,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="753"
+ line="754"
column="48"/>
</issue>
@@ -3055,7 +3011,7 @@
errorLine2=" ~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="783"
+ line="784"
column="12"/>
</issue>
@@ -3066,7 +3022,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="793"
+ line="794"
column="12"/>
</issue>
@@ -3077,7 +3033,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="802"
+ line="803"
column="34"/>
</issue>
@@ -3088,7 +3044,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="814"
+ line="815"
column="29"/>
</issue>
@@ -3099,7 +3055,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="830"
+ line="831"
column="26"/>
</issue>
@@ -3110,7 +3066,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="854"
+ line="855"
column="31"/>
</issue>
@@ -3121,7 +3077,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="923"
+ line="924"
column="27"/>
</issue>
@@ -3132,7 +3088,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="937"
+ line="938"
column="12"/>
</issue>
@@ -3143,7 +3099,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="951"
+ line="952"
column="12"/>
</issue>
@@ -3154,7 +3110,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="987"
+ line="988"
column="12"/>
</issue>
@@ -3165,7 +3121,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="998"
+ line="999"
column="43"/>
</issue>
@@ -3176,7 +3132,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="1011"
+ line="1012"
column="46"/>
</issue>
@@ -3187,7 +3143,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="1034"
+ line="1035"
column="19"/>
</issue>
@@ -3198,7 +3154,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="1034"
+ line="1035"
column="55"/>
</issue>
@@ -3209,7 +3165,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="1034"
+ line="1035"
column="72"/>
</issue>
@@ -3220,7 +3176,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="1167"
+ line="1168"
column="31"/>
</issue>
@@ -3231,7 +3187,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="1167"
+ line="1168"
column="47"/>
</issue>
@@ -3242,7 +3198,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="1167"
+ line="1168"
column="62"/>
</issue>
@@ -3253,7 +3209,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="1181"
+ line="1182"
column="43"/>
</issue>
@@ -3264,7 +3220,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="1274"
+ line="1275"
column="42"/>
</issue>
@@ -3275,7 +3231,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="1274"
+ line="1275"
column="58"/>
</issue>
@@ -3286,7 +3242,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="1284"
+ line="1285"
column="41"/>
</issue>
@@ -3297,7 +3253,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="1284"
+ line="1285"
column="55"/>
</issue>
@@ -3308,7 +3264,7 @@
errorLine2=" ~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="1292"
+ line="1293"
column="38"/>
</issue>
@@ -3319,7 +3275,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="1292"
+ line="1293"
column="47"/>
</issue>
@@ -3330,7 +3286,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="1305"
+ line="1306"
column="39"/>
</issue>
@@ -3341,7 +3297,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="1305"
+ line="1306"
column="55"/>
</issue>
@@ -3352,7 +3308,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="1314"
+ line="1315"
column="38"/>
</issue>
@@ -3363,7 +3319,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="1314"
+ line="1315"
column="52"/>
</issue>
@@ -3374,7 +3330,7 @@
errorLine2=" ~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="1320"
+ line="1321"
column="35"/>
</issue>
@@ -3385,7 +3341,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="1320"
+ line="1321"
column="44"/>
</issue>
@@ -3396,7 +3352,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="1379"
+ line="1380"
column="33"/>
</issue>
@@ -3407,7 +3363,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="1388"
+ line="1389"
column="33"/>
</issue>
@@ -3418,7 +3374,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="1388"
+ line="1389"
column="54"/>
</issue>
@@ -3429,7 +3385,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="1459"
+ line="1460"
column="36"/>
</issue>
@@ -3440,7 +3396,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="1459"
+ line="1460"
column="51"/>
</issue>
@@ -3451,7 +3407,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="1469"
+ line="1470"
column="36"/>
</issue>
@@ -3462,7 +3418,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="1481"
+ line="1482"
column="36"/>
</issue>
@@ -3473,7 +3429,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="1492"
+ line="1493"
column="39"/>
</issue>
@@ -3484,7 +3440,7 @@
errorLine2=" ~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="1952"
+ line="1953"
column="23"/>
</issue>
@@ -3495,7 +3451,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="1952"
+ line="1953"
column="39"/>
</issue>
@@ -3506,7 +3462,7 @@
errorLine2=" ~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="1970"
+ line="1971"
column="23"/>
</issue>
@@ -3517,7 +3473,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="1970"
+ line="1971"
column="39"/>
</issue>
@@ -3528,7 +3484,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="1970"
+ line="1971"
column="53"/>
</issue>
@@ -3539,7 +3495,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="1987"
+ line="1988"
column="35"/>
</issue>
@@ -3550,7 +3506,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="2031"
+ line="2032"
column="16"/>
</issue>
@@ -3561,7 +3517,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="2039"
+ line="2040"
column="16"/>
</issue>
@@ -3572,7 +3528,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="2049"
+ line="2050"
column="36"/>
</issue>
@@ -3583,7 +3539,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="2059"
+ line="2060"
column="16"/>
</issue>
@@ -3594,7 +3550,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="2069"
+ line="2070"
column="38"/>
</issue>
@@ -3605,7 +3561,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="2079"
+ line="2080"
column="16"/>
</issue>
@@ -3616,7 +3572,7 @@
errorLine2=" ~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="2101"
+ line="2102"
column="23"/>
</issue>
@@ -3627,7 +3583,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="2101"
+ line="2102"
column="40"/>
</issue>
@@ -3638,7 +3594,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="2156"
+ line="2157"
column="26"/>
</issue>
@@ -3649,7 +3605,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="2183"
+ line="2184"
column="16"/>
</issue>
@@ -3660,7 +3616,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="2195"
+ line="2196"
column="35"/>
</issue>
@@ -3671,7 +3627,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="2215"
+ line="2216"
column="16"/>
</issue>
@@ -3682,7 +3638,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="2235"
+ line="2236"
column="23"/>
</issue>
@@ -3693,7 +3649,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="2235"
+ line="2236"
column="47"/>
</issue>
@@ -3704,7 +3660,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="2257"
+ line="2258"
column="23"/>
</issue>
@@ -3715,7 +3671,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/android/support/v4/media/session/MediaSessionCompat.java"
- line="2257"
+ line="2258"
column="57"/>
</issue>
@@ -3726,7 +3682,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/media/MediaSessionManager.java"
- line="176"
+ line="184"
column="17"/>
</issue>
diff --git a/media2/player/lint-baseline.xml b/media2/player/lint-baseline.xml
index 8fe0e51..649f869 100644
--- a/media2/player/lint-baseline.xml
+++ b/media2/player/lint-baseline.xml
@@ -46,6 +46,39 @@
</issue>
<issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" return (FileDescriptor) method.invoke(object, fileDescriptor);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/player/FileDescriptorUtil.java"
+ line="100"
+ column="37"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" method.invoke(object, fileDescriptor, position, /* whence= */ SEEK_SET);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/player/FileDescriptorUtil.java"
+ line="125"
+ column="13"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" return (FileDescriptor) method.invoke(object, fileDescriptor);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/media2/player/FileDescriptorUtil.java"
+ line="150"
+ column="37"/>
+ </issue>
+
+ <issue
id="UnsafeNewApiCall"
message="This call is to a method from API 21, the call containing class androidx.media2.player.ExoPlayerWrapper is not annotated with @RequiresApi(x) where x is at least 21. Either annotate the containing class with at least @RequiresApi(21) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(21)."
errorLine1=" PersistableBundle bundle = new PersistableBundle();"
diff --git a/media2/widget/lint-baseline.xml b/media2/widget/lint-baseline.xml
index a844da6..3830510 100644
--- a/media2/widget/lint-baseline.xml
+++ b/media2/widget/lint-baseline.xml
@@ -327,7 +327,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/media2/widget/VideoView.java"
- line="572"
+ line="571"
column="12"/>
</issue>
diff --git a/mediarouter/mediarouter/lint-baseline.xml b/mediarouter/mediarouter/lint-baseline.xml
index 4da6344..9223937 100644
--- a/mediarouter/mediarouter/lint-baseline.xml
+++ b/mediarouter/mediarouter/lint-baseline.xml
@@ -1,433 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="5" by="lint 4.2.0-dev" client="gradle" variant="debug" version="4.2.0-dev">
+<issues format="5" by="lint 4.2.0-alpha06" client="gradle" variant="debug" version="4.2.0-alpha06">
<issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.mediarouter.media.MediaRoute2Provider.TransferCallback is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" if (newController == mMediaRouter2.getSystemController()) {"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~">
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" mSelectRouteIntMethod.invoke(router, types, route);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
- file="src/main/java/androidx/mediarouter/media/MediaRoute2Provider.java"
- line="366"
- column="48"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.mediarouter.media.MediaRoute2Provider.TransferCallback is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" List<MediaRoute2Info> selectedRoutes = newController.getSelectedRoutes();"
- errorLine2=" ~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRoute2Provider.java"
- line="369"
- column="70"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.mediarouter.media.MediaRoute2Provider.TransferCallback is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" String routeId = selectedRoutes.get(0).getId();"
- errorLine2=" ~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRoute2Provider.java"
- line="375"
- column="56"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.mediarouter.media.MediaRoute2Provider.GroupRouteController is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" mRoutingController.setVolume(volume);"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRoute2Provider.java"
- line="471"
- column="32"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.mediarouter.media.MediaRoute2Provider.GroupRouteController is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" int volumeBefore = mOptimisticVolume < 0 ? mRoutingController.getVolume() :"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRoute2Provider.java"
- line="481"
- column="75"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.mediarouter.media.MediaRoute2Provider.GroupRouteController is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" mRoutingController.getVolumeMax()));"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRoute2Provider.java"
- line="484"
- column="40"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.mediarouter.media.MediaRoute2Provider.GroupRouteController is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" mRoutingController.setVolume(mOptimisticVolume);"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRoute2Provider.java"
- line="485"
- column="32"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.mediarouter.media.MediaRoute2Provider.GroupRouteController is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" if (mRoutingController == null || mRoutingController.isReleased()"
- errorLine2=" ~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRoute2Provider.java"
- line="491"
- column="66"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.mediarouter.media.MediaRoute2Provider.GroupRouteController is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" mRoutingController.release();"
- errorLine2=" ~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRoute2Provider.java"
- line="519"
- column="32"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.mediarouter.media.MediaRoute2Provider.GroupRouteController is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" mMediaRouter2.transferTo(route);"
- errorLine2=" ~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRoute2Provider.java"
- line="537"
- column="27"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.mediarouter.media.MediaRoute2Provider.GroupRouteController is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" mRoutingController.selectRoute(route);"
- errorLine2=" ~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRoute2Provider.java"
- line="553"
- column="32"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.mediarouter.media.MediaRoute2Provider.GroupRouteController is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" mRoutingController.deselectRoute(route);"
- errorLine2=" ~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRoute2Provider.java"
- line="569"
- column="32"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.mediarouter.media.MediaRoute2ProviderServiceAdapter.SessionRecord is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" RoutingSessionInfo.Builder builder = new RoutingSessionInfo.Builder(sessionInfo);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRoute2ProviderServiceAdapter.java"
- line="678"
- column="50"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.mediarouter.media.MediaRoute2ProviderServiceAdapter.SessionRecord is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" sessionInfo.getName() != null ? sessionInfo.getName().toString() : null);"
- errorLine2=" ~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRoute2ProviderServiceAdapter.java"
- line="683"
- column="33"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.mediarouter.media.MediaRoute2ProviderServiceAdapter.SessionRecord is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" sessionInfo.getName() != null ? sessionInfo.getName().toString() : null);"
- errorLine2=" ~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRoute2ProviderServiceAdapter.java"
- line="683"
- column="65"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.mediarouter.media.MediaRoute2ProviderServiceAdapter.SessionRecord is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" mSessionInfo = builder.setControlHints(controlHints).build();"
- errorLine2=" ~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRoute2ProviderServiceAdapter.java"
- line="685"
- column="36"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.mediarouter.media.MediaRoute2ProviderServiceAdapter.SessionRecord is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" mSessionInfo = builder.setControlHints(controlHints).build();"
- errorLine2=" ~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRoute2ProviderServiceAdapter.java"
- line="685"
- column="66"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.mediarouter.media.MediaRoute2ProviderServiceAdapter.SessionRecord is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" RoutingSessionInfo.Builder builder = new RoutingSessionInfo.Builder(sessionInfo);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRoute2ProviderServiceAdapter.java"
- line="702"
- column="50"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.mediarouter.media.MediaRoute2ProviderServiceAdapter.SessionRecord is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" builder.setName(groupRoute.getName())"
- errorLine2=" ~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRoute2ProviderServiceAdapter.java"
- line="705"
+ file="jellybean/androidx/mediarouter/media/MediaRouterJellybean.java"
+ line="327"
column="25"/>
</issue>
<issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.mediarouter.media.MediaRoute2ProviderServiceAdapter.SessionRecord is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" .setVolume(groupRoute.getVolume())"
- errorLine2=" ~~~~~~~~~">
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" return mGetSystemAudioRouteMethod.invoke(router);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
- file="src/main/java/androidx/mediarouter/media/MediaRoute2ProviderServiceAdapter.java"
- line="706"
- column="26"/>
+ file="jellybean/androidx/mediarouter/media/MediaRouterJellybean.java"
+ line="371"
+ column="28"/>
</issue>
<issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.mediarouter.media.MediaRoute2ProviderServiceAdapter.SessionRecord is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" .setVolumeMax(groupRoute.getVolumeMax())"
- errorLine2=" ~~~~~~~~~~~~">
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" mScanWifiDisplaysMethod.invoke(mDisplayManager);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
- file="src/main/java/androidx/mediarouter/media/MediaRoute2ProviderServiceAdapter.java"
- line="707"
- column="26"/>
+ file="jellybean-mr1/androidx/mediarouter/media/MediaRouterJellybeanMr1.java"
+ line="123"
+ column="21"/>
</issue>
<issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.mediarouter.media.MediaRoute2ProviderServiceAdapter.SessionRecord is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" .setVolumeHandling(groupRoute.getVolumeHandling());"
- errorLine2=" ~~~~~~~~~~~~~~~~~">
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" int statusCode = (Integer)mGetStatusCodeMethod.invoke(route);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
- file="src/main/java/androidx/mediarouter/media/MediaRoute2ProviderServiceAdapter.java"
- line="708"
- column="26"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.mediarouter.media.MediaRoute2ProviderServiceAdapter.SessionRecord is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" Bundle controlHints = sessionInfo.getControlHints();"
- errorLine2=" ~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRoute2ProviderServiceAdapter.java"
- line="710"
- column="51"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.mediarouter.media.MediaRoute2ProviderServiceAdapter.SessionRecord is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" builder.setControlHints(controlHints);"
- errorLine2=" ~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRoute2ProviderServiceAdapter.java"
- line="718"
- column="25"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.mediarouter.media.MediaRoute2ProviderServiceAdapter.SessionRecord is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" mSessionInfo = builder.build();"
- errorLine2=" ~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRoute2ProviderServiceAdapter.java"
- line="721"
- column="36"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.mediarouter.media.MediaRoute2ProviderServiceAdapter.SessionRecord is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" builder.clearSelectedRoutes();"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRoute2ProviderServiceAdapter.java"
- line="726"
- column="25"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.mediarouter.media.MediaRoute2ProviderServiceAdapter.SessionRecord is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" builder.clearSelectableRoutes();"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRoute2ProviderServiceAdapter.java"
- line="727"
- column="25"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.mediarouter.media.MediaRoute2ProviderServiceAdapter.SessionRecord is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" builder.clearDeselectableRoutes();"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRoute2ProviderServiceAdapter.java"
- line="728"
- column="25"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.mediarouter.media.MediaRoute2ProviderServiceAdapter.SessionRecord is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" builder.clearTransferableRoutes();"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRoute2ProviderServiceAdapter.java"
- line="729"
- column="25"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.mediarouter.media.MediaRoute2ProviderServiceAdapter.SessionRecord is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" builder.addSelectedRoute(routeId);"
- errorLine2=" ~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRoute2ProviderServiceAdapter.java"
- line="735"
- column="33"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.mediarouter.media.MediaRoute2ProviderServiceAdapter.SessionRecord is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" builder.addSelectableRoute(routeId);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRoute2ProviderServiceAdapter.java"
- line="739"
- column="33"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.mediarouter.media.MediaRoute2ProviderServiceAdapter.SessionRecord is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" builder.addDeselectableRoute(routeId);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRoute2ProviderServiceAdapter.java"
- line="742"
- column="33"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.mediarouter.media.MediaRoute2ProviderServiceAdapter.SessionRecord is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" builder.addTransferableRoute(routeId);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRoute2ProviderServiceAdapter.java"
- line="745"
- column="33"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.mediarouter.media.MediaRoute2ProviderServiceAdapter.SessionRecord is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" mSessionInfo = builder.build();"
- errorLine2=" ~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRoute2ProviderServiceAdapter.java"
- line="751"
- column="44"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.mediarouter.media.MediaRoute2ProviderServiceAdapter.SessionRecord is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" notifySessionUpdated(mSessionInfo);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRoute2ProviderServiceAdapter.java"
- line="763"
- column="17"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.mediarouter.media.MediaRoute2ProviderServiceAdapter.SessionRecord is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" notifySessionReleased(mSessionId);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRoute2ProviderServiceAdapter.java"
- line="791"
- column="17"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.mediarouter.media.MediaRoute2ProviderServiceAdapter.SessionRecord is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" oldSession.getSelectedRoutes();"
- errorLine2=" ~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRoute2ProviderServiceAdapter.java"
- line="798"
- column="32"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.mediarouter.media.MediaRoute2ProviderServiceAdapter.SessionRecord is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" newSession.getSelectedRoutes();"
- errorLine2=" ~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRoute2ProviderServiceAdapter.java"
- line="800"
- column="32"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.mediarouter.media.MediaRoute2ProviderServiceAdapter.SessionRecord is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" MediaRoute2ProviderServiceAdapter.this.notifySessionCreated(mRequestId, mSessionInfo);"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRoute2ProviderServiceAdapter.java"
- line="822"
- column="52"/>
+ file="jellybean-mr1/androidx/mediarouter/media/MediaRouterJellybeanMr1.java"
+ line="165"
+ column="47"/>
</issue>
<issue
@@ -1130,7 +745,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/app/MediaRouteButton.java"
- line="146"
+ line="147"
column="29"/>
</issue>
@@ -1141,7 +756,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/app/MediaRouteButton.java"
- line="150"
+ line="151"
column="29"/>
</issue>
@@ -1152,7 +767,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/app/MediaRouteButton.java"
- line="150"
+ line="151"
column="46"/>
</issue>
@@ -1163,7 +778,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/app/MediaRouteButton.java"
- line="154"
+ line="155"
column="29"/>
</issue>
@@ -1174,7 +789,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/app/MediaRouteButton.java"
- line="154"
+ line="155"
column="46"/>
</issue>
@@ -1185,7 +800,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/app/MediaRouteButton.java"
- line="232"
+ line="233"
column="34"/>
</issue>
@@ -1196,7 +811,7 @@
errorLine2=" ~~~~~">
<location
file="src/main/java/androidx/mediarouter/app/MediaRouteButton.java"
- line="460"
+ line="461"
column="15"/>
</issue>
@@ -1207,7 +822,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/app/MediaRouteButton.java"
- line="492"
+ line="493"
column="44"/>
</issue>
@@ -1218,7 +833,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/app/MediaRouteButton.java"
- line="517"
+ line="518"
column="38"/>
</issue>
@@ -1229,7 +844,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/mediarouter/app/MediaRouteButton.java"
- line="612"
+ line="613"
column="27"/>
</issue>
@@ -1240,7 +855,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/app/MediaRouteChooserDialog.java"
- line="93"
+ line="94"
column="36"/>
</issue>
@@ -1251,7 +866,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/app/MediaRouteChooserDialog.java"
- line="97"
+ line="98"
column="36"/>
</issue>
@@ -1262,7 +877,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/app/MediaRouteChooserDialog.java"
- line="173"
+ line="174"
column="26"/>
</issue>
@@ -1273,7 +888,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/mediarouter/app/MediaRouteChooserDialog.java"
- line="183"
+ line="184"
column="29"/>
</issue>
@@ -2758,7 +2373,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/media/MediaRouter.java"
- line="299"
+ line="312"
column="12"/>
</issue>
@@ -2769,7 +2384,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/media/MediaRouter.java"
- line="313"
+ line="321"
column="12"/>
</issue>
@@ -2780,40 +2395,18 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/media/MediaRouter.java"
- line="337"
+ line="345"
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 addMemberToDynamicGroup(RouteInfo route) {"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRouter.java"
- line="475"
- 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 void removeMemberFromDynamicGroup(RouteInfo route) {"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/mediarouter/media/MediaRouter.java"
- line="485"
- column="46"/>
- </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 addCallback(MediaRouteSelector selector, Callback callback) {"
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/media/MediaRouter.java"
- line="544"
+ line="562"
column="29"/>
</issue>
@@ -2824,7 +2417,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/media/MediaRouter.java"
- line="544"
+ line="562"
column="58"/>
</issue>
@@ -2835,7 +2428,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/mediarouter/media/MediaRouter.java"
- line="844"
+ line="863"
column="33"/>
</issue>
@@ -2846,7 +2439,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/media/MediaRouter.java"
- line="859"
+ line="879"
column="39"/>
</issue>
@@ -2857,7 +2450,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/media/MediaRouter.java"
- line="866"
+ line="887"
column="12"/>
</issue>
@@ -2868,7 +2461,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/media/MediaRouter.java"
- line="1103"
+ line="1125"
column="16"/>
</issue>
@@ -2879,7 +2472,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/mediarouter/media/MediaRouter.java"
- line="1132"
+ line="1154"
column="16"/>
</issue>
@@ -2890,7 +2483,7 @@
errorLine2=" ~~~">
<location
file="src/main/java/androidx/mediarouter/media/MediaRouter.java"
- line="1158"
+ line="1180"
column="16"/>
</issue>
@@ -2901,7 +2494,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/media/MediaRouter.java"
- line="1259"
+ line="1281"
column="16"/>
</issue>
@@ -2912,7 +2505,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/media/MediaRouter.java"
- line="1627"
+ line="1649"
column="55"/>
</issue>
@@ -2923,7 +2516,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/media/MediaRouter.java"
- line="1858"
+ line="1884"
column="16"/>
</issue>
@@ -2934,7 +2527,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/media/MediaRouter.java"
- line="1967"
+ line="1991"
column="16"/>
</issue>
@@ -2945,7 +2538,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/mediarouter/media/MediaRouter.java"
- line="1975"
+ line="1999"
column="16"/>
</issue>
@@ -2956,7 +2549,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/media/MediaRouter.java"
- line="1982"
+ line="2006"
column="16"/>
</issue>
@@ -2967,7 +2560,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/media/MediaRouter.java"
- line="1989"
+ line="2013"
column="16"/>
</issue>
@@ -2978,7 +2571,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/media/MediaRouter.java"
- line="2069"
+ line="2078"
column="37"/>
</issue>
@@ -2989,7 +2582,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/media/MediaRouter.java"
- line="2069"
+ line="2078"
column="57"/>
</issue>
@@ -3000,7 +2593,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/media/MediaRouter.java"
- line="2122"
+ line="2131"
column="39"/>
</issue>
@@ -3011,7 +2604,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/media/MediaRouter.java"
- line="2122"
+ line="2131"
column="59"/>
</issue>
@@ -3022,7 +2615,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/media/MediaRouter.java"
- line="2141"
+ line="2150"
column="39"/>
</issue>
@@ -3033,7 +2626,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/media/MediaRouter.java"
- line="2141"
+ line="2150"
column="59"/>
</issue>
@@ -3044,7 +2637,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/media/MediaRouter.java"
- line="2152"
+ line="2161"
column="34"/>
</issue>
@@ -3055,7 +2648,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/media/MediaRouter.java"
- line="2152"
+ line="2161"
column="54"/>
</issue>
@@ -3066,7 +2659,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/media/MediaRouter.java"
- line="2161"
+ line="2170"
column="36"/>
</issue>
@@ -3077,7 +2670,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/media/MediaRouter.java"
- line="2161"
+ line="2170"
column="56"/>
</issue>
@@ -3088,7 +2681,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/media/MediaRouter.java"
- line="2170"
+ line="2179"
column="36"/>
</issue>
@@ -3099,7 +2692,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/media/MediaRouter.java"
- line="2170"
+ line="2179"
column="56"/>
</issue>
@@ -3110,7 +2703,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/media/MediaRouter.java"
- line="2179"
+ line="2188"
column="42"/>
</issue>
@@ -3121,7 +2714,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/media/MediaRouter.java"
- line="2179"
+ line="2188"
column="62"/>
</issue>
@@ -3132,7 +2725,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/media/MediaRouter.java"
- line="2194"
+ line="2203"
column="55"/>
</issue>
@@ -3143,7 +2736,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/media/MediaRouter.java"
- line="2194"
+ line="2203"
column="75"/>
</issue>
@@ -3154,7 +2747,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/media/MediaRouter.java"
- line="2203"
+ line="2212"
column="37"/>
</issue>
@@ -3165,7 +2758,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/media/MediaRouter.java"
- line="2203"
+ line="2212"
column="57"/>
</issue>
@@ -3176,7 +2769,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/media/MediaRouter.java"
- line="2212"
+ line="2221"
column="39"/>
</issue>
@@ -3187,7 +2780,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/media/MediaRouter.java"
- line="2212"
+ line="2221"
column="59"/>
</issue>
@@ -3198,7 +2791,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/media/MediaRouter.java"
- line="2221"
+ line="2230"
column="39"/>
</issue>
@@ -3209,7 +2802,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/mediarouter/media/MediaRouter.java"
- line="2221"
+ line="2230"
column="59"/>
</issue>
@@ -3220,7 +2813,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/mediarouter/media/MediaRouter.java"
- line="2271"
+ line="2280"
column="30"/>
</issue>
diff --git a/navigation/integration-tests/testapp/build.gradle b/navigation/integration-tests/testapp/build.gradle
index 244628b..046b096 100644
--- a/navigation/integration-tests/testapp/build.gradle
+++ b/navigation/integration-tests/testapp/build.gradle
@@ -34,7 +34,9 @@
implementation("androidx.appcompat:appcompat:1.1.0")
implementation(project(":navigation:navigation-fragment-ktx"))
implementation(project(":navigation:navigation-ui-ktx"))
- implementation(project(":internal-testutils-navigation"))
+ implementation(project(":internal-testutils-navigation"), {
+ exclude group: 'androidx.navigation', module: 'navigation-common-ktx'
+ })
}
tasks['check'].dependsOn(tasks['connectedCheck'])
diff --git a/navigation/integration-tests/testapp/lint-baseline.xml b/navigation/integration-tests/testapp/lint-baseline.xml
index d8f00a3..822c3df 100644
--- a/navigation/integration-tests/testapp/lint-baseline.xml
+++ b/navigation/integration-tests/testapp/lint-baseline.xml
@@ -4,23 +4,23 @@
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 26, the call containing class androidx.navigation.testapp.AndroidFragment is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
- errorLine1=" notificationManager.createNotificationChannel(NotificationChannel("
+ errorLine1=" notificationManager.createNotificationChannel("
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/navigation/testapp/AndroidFragment.kt"
- line="64"
+ line="65"
column="37"/>
</issue>
<issue
id="UnsafeNewApiCall"
message="This call is to a method from API 26, the call containing class androidx.navigation.testapp.AndroidFragment is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
- errorLine1=" notificationManager.createNotificationChannel(NotificationChannel("
- errorLine2=" ^">
+ errorLine1=" NotificationChannel("
+ errorLine2=" ^">
<location
file="src/main/java/androidx/navigation/testapp/AndroidFragment.kt"
- line="64"
- column="63"/>
+ line="66"
+ column="21"/>
</issue>
<issue
diff --git a/navigation/navigation-common-ktx/lint-baseline.xml b/navigation/navigation-common-ktx/lint-baseline.xml
new file mode 100644
index 0000000..ba26677
--- /dev/null
+++ b/navigation/navigation-common-ktx/lint-baseline.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<issues format="5" by="lint 4.2.0-alpha06" client="gradle" variant="debug" version="4.2.0-alpha06">
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" args = method.invoke(null, arguments) as Args"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/navigation/NavArgsLazy.kt"
+ line="52"
+ column="24"/>
+ </issue>
+
+</issues>
diff --git a/navigation/navigation-compose/api/current.txt b/navigation/navigation-compose/api/current.txt
index 7a62bba..e9c9ce1 100644
--- a/navigation/navigation-compose/api/current.txt
+++ b/navigation/navigation-compose/api/current.txt
@@ -21,12 +21,13 @@
public final class NavGraphBuilderKt {
method public static void composable(androidx.navigation.NavGraphBuilder, String route, optional java.util.List<androidx.navigation.compose.NamedNavArgument> arguments, optional java.util.List<androidx.navigation.NavDeepLink> deepLinks, kotlin.jvm.functions.Function1<? super androidx.navigation.NavBackStackEntry,kotlin.Unit> content);
+ method public static void navigation(androidx.navigation.NavGraphBuilder, String startDestination, String route, kotlin.jvm.functions.Function1<? super androidx.navigation.NavGraphBuilder,kotlin.Unit> builder);
}
public final class NavHostControllerKt {
method public static androidx.navigation.NavGraph createGraph(androidx.navigation.NavController, String startDestination, optional String? route, kotlin.jvm.functions.Function1<? super androidx.navigation.NavGraphBuilder,kotlin.Unit> builder);
method @androidx.compose.runtime.Composable public static androidx.compose.runtime.State<androidx.navigation.NavBackStackEntry> currentBackStackEntryAsState(androidx.navigation.NavController);
- method public static void navigate(androidx.navigation.NavController, String route);
+ method public static void navigate(androidx.navigation.NavController, String route, optional kotlin.jvm.functions.Function1<? super androidx.navigation.NavOptionsBuilder,kotlin.Unit> builder);
method @androidx.compose.runtime.Composable public static androidx.navigation.NavHostController rememberNavController();
field public static final String KEY_ROUTE = "android-support-nav:controller:route";
}
@@ -36,5 +37,9 @@
method @androidx.compose.runtime.Composable public static void NavHost(androidx.navigation.NavHostController navController, androidx.navigation.NavGraph graph);
}
+ public final class NavOptionsBuilderKt {
+ method public static void popUpTo(androidx.navigation.NavOptionsBuilder, String route, kotlin.jvm.functions.Function1<? super androidx.navigation.PopUpToBuilder,kotlin.Unit> popUpToBuilder);
+ }
+
}
diff --git a/navigation/navigation-compose/api/public_plus_experimental_current.txt b/navigation/navigation-compose/api/public_plus_experimental_current.txt
index 7a62bba..e9c9ce1 100644
--- a/navigation/navigation-compose/api/public_plus_experimental_current.txt
+++ b/navigation/navigation-compose/api/public_plus_experimental_current.txt
@@ -21,12 +21,13 @@
public final class NavGraphBuilderKt {
method public static void composable(androidx.navigation.NavGraphBuilder, String route, optional java.util.List<androidx.navigation.compose.NamedNavArgument> arguments, optional java.util.List<androidx.navigation.NavDeepLink> deepLinks, kotlin.jvm.functions.Function1<? super androidx.navigation.NavBackStackEntry,kotlin.Unit> content);
+ method public static void navigation(androidx.navigation.NavGraphBuilder, String startDestination, String route, kotlin.jvm.functions.Function1<? super androidx.navigation.NavGraphBuilder,kotlin.Unit> builder);
}
public final class NavHostControllerKt {
method public static androidx.navigation.NavGraph createGraph(androidx.navigation.NavController, String startDestination, optional String? route, kotlin.jvm.functions.Function1<? super androidx.navigation.NavGraphBuilder,kotlin.Unit> builder);
method @androidx.compose.runtime.Composable public static androidx.compose.runtime.State<androidx.navigation.NavBackStackEntry> currentBackStackEntryAsState(androidx.navigation.NavController);
- method public static void navigate(androidx.navigation.NavController, String route);
+ method public static void navigate(androidx.navigation.NavController, String route, optional kotlin.jvm.functions.Function1<? super androidx.navigation.NavOptionsBuilder,kotlin.Unit> builder);
method @androidx.compose.runtime.Composable public static androidx.navigation.NavHostController rememberNavController();
field public static final String KEY_ROUTE = "android-support-nav:controller:route";
}
@@ -36,5 +37,9 @@
method @androidx.compose.runtime.Composable public static void NavHost(androidx.navigation.NavHostController navController, androidx.navigation.NavGraph graph);
}
+ public final class NavOptionsBuilderKt {
+ method public static void popUpTo(androidx.navigation.NavOptionsBuilder, String route, kotlin.jvm.functions.Function1<? super androidx.navigation.PopUpToBuilder,kotlin.Unit> popUpToBuilder);
+ }
+
}
diff --git a/navigation/navigation-compose/api/restricted_current.txt b/navigation/navigation-compose/api/restricted_current.txt
index 7a62bba..e9c9ce1 100644
--- a/navigation/navigation-compose/api/restricted_current.txt
+++ b/navigation/navigation-compose/api/restricted_current.txt
@@ -21,12 +21,13 @@
public final class NavGraphBuilderKt {
method public static void composable(androidx.navigation.NavGraphBuilder, String route, optional java.util.List<androidx.navigation.compose.NamedNavArgument> arguments, optional java.util.List<androidx.navigation.NavDeepLink> deepLinks, kotlin.jvm.functions.Function1<? super androidx.navigation.NavBackStackEntry,kotlin.Unit> content);
+ method public static void navigation(androidx.navigation.NavGraphBuilder, String startDestination, String route, kotlin.jvm.functions.Function1<? super androidx.navigation.NavGraphBuilder,kotlin.Unit> builder);
}
public final class NavHostControllerKt {
method public static androidx.navigation.NavGraph createGraph(androidx.navigation.NavController, String startDestination, optional String? route, kotlin.jvm.functions.Function1<? super androidx.navigation.NavGraphBuilder,kotlin.Unit> builder);
method @androidx.compose.runtime.Composable public static androidx.compose.runtime.State<androidx.navigation.NavBackStackEntry> currentBackStackEntryAsState(androidx.navigation.NavController);
- method public static void navigate(androidx.navigation.NavController, String route);
+ method public static void navigate(androidx.navigation.NavController, String route, optional kotlin.jvm.functions.Function1<? super androidx.navigation.NavOptionsBuilder,kotlin.Unit> builder);
method @androidx.compose.runtime.Composable public static androidx.navigation.NavHostController rememberNavController();
field public static final String KEY_ROUTE = "android-support-nav:controller:route";
}
@@ -36,5 +37,9 @@
method @androidx.compose.runtime.Composable public static void NavHost(androidx.navigation.NavHostController navController, androidx.navigation.NavGraph graph);
}
+ public final class NavOptionsBuilderKt {
+ method public static void popUpTo(androidx.navigation.NavOptionsBuilder, String route, kotlin.jvm.functions.Function1<? super androidx.navigation.PopUpToBuilder,kotlin.Unit> popUpToBuilder);
+ }
+
}
diff --git a/navigation/navigation-compose/build.gradle b/navigation/navigation-compose/build.gradle
index 3beca1c..0f3208c 100644
--- a/navigation/navigation-compose/build.gradle
+++ b/navigation/navigation-compose/build.gradle
@@ -39,6 +39,9 @@
api "androidx.navigation:navigation-runtime-ktx:2.3.1"
androidTestImplementation 'androidx.navigation:navigation-testing:2.3.1'
+ androidTestImplementation project(path: ':internal-testutils-navigation'), {
+ exclude group: 'androidx.navigation', module: 'navigation-common-ktx'
+ }
androidTestImplementation project(':ui:ui-test')
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(JUNIT)
diff --git a/navigation/navigation-compose/integration-tests/navigation-demos/src/main/java/androidx/navigation/compose/demos/BottomBarNavDemo.kt b/navigation/navigation-compose/integration-tests/navigation-demos/src/main/java/androidx/navigation/compose/demos/BottomBarNavDemo.kt
index 31ff4ad..5367b9f 100644
--- a/navigation/navigation-compose/integration-tests/navigation-demos/src/main/java/androidx/navigation/compose/demos/BottomBarNavDemo.kt
+++ b/navigation/navigation-compose/integration-tests/navigation-demos/src/main/java/androidx/navigation/compose/demos/BottomBarNavDemo.kt
@@ -56,7 +56,12 @@
icon = { Icon(Icons.Filled.Favorite) },
label = { Text(name) },
selected = entryRoute == route,
- navController.navigate(route) }
+ >
+ navController.navigate(route) {
+ launchSingleTop = true
+ popUpTo = navController.graph.startDestination
+ }
+ }
)
}
}
diff --git a/navigation/navigation-compose/integration-tests/navigation-demos/src/main/java/androidx/navigation/compose/demos/NavigationDemos.kt b/navigation/navigation-compose/integration-tests/navigation-demos/src/main/java/androidx/navigation/compose/demos/NavigationDemos.kt
index 8c8b507..e1d2725 100644
--- a/navigation/navigation-compose/integration-tests/navigation-demos/src/main/java/androidx/navigation/compose/demos/NavigationDemos.kt
+++ b/navigation/navigation-compose/integration-tests/navigation-demos/src/main/java/androidx/navigation/compose/demos/NavigationDemos.kt
@@ -23,6 +23,7 @@
"Navigation",
listOf(
ComposableDemo("Basic Nav Demo") { BasicNavDemo() },
+ ComposableDemo("Nested Nav Demo") { NestNavDemo() },
ComposableDemo("Bottom Bar Nav Demo") { BottomBarNavDemo() },
ComposableDemo("Navigation with Args") { NavWithArgsDemo() },
ComposableDemo("Navigation by DeepLink") { NavByDeepLinkDemo() }
diff --git a/navigation/navigation-compose/integration-tests/navigation-demos/src/main/java/androidx/navigation/compose/demos/NestedNavDemo.kt b/navigation/navigation-compose/integration-tests/navigation-demos/src/main/java/androidx/navigation/compose/demos/NestedNavDemo.kt
new file mode 100644
index 0000000..c2790f1
--- /dev/null
+++ b/navigation/navigation-compose/integration-tests/navigation-demos/src/main/java/androidx/navigation/compose/demos/NestedNavDemo.kt
@@ -0,0 +1,25 @@
+/*
+ * 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 androidx.navigation.compose.demos
+
+import androidx.compose.runtime.Composable
+import androidx.navigation.compose.samples.NestedNav
+
+@Composable
+fun NestNavDemo() {
+ NestedNav()
+}
\ No newline at end of file
diff --git a/navigation/navigation-compose/samples/src/main/java/androidx/navigation/compose/samples/NavigationSamples.kt b/navigation/navigation-compose/samples/src/main/java/androidx/navigation/compose/samples/NavigationSamples.kt
index 470c252..bb68ba3 100644
--- a/navigation/navigation-compose/samples/src/main/java/androidx/navigation/compose/samples/NavigationSamples.kt
+++ b/navigation/navigation-compose/samples/src/main/java/androidx/navigation/compose/samples/NavigationSamples.kt
@@ -40,6 +40,7 @@
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import androidx.navigation.compose.navigate
+import androidx.navigation.compose.navigation
import androidx.navigation.compose.rememberNavController
sealed class Screen(val route: String, @StringRes val resourceId: Int) {
@@ -59,6 +60,19 @@
}
}
+@Sampled
+@Composable
+fun NestedNav() {
+ val navController = rememberNavController()
+ NavHost(navController, startDestination = "nested") {
+ navigation(startDestination = Screen.Profile.route, route = "nested") {
+ composable(Screen.Profile.route) { Profile(navController) }
+ }
+ composable(Screen.Dashboard.route) { Dashboard(navController) }
+ composable(Screen.Scrollable.route) { Scrollable(navController) }
+ }
+}
+
@Composable
fun Profile(navController: NavHostController) {
Column(Modifier.fillMaxSize().then(Modifier.padding(8.dp))) {
diff --git a/navigation/navigation-compose/src/androidTest/java/androidx/navigation/compose/ComposeNavigatorTest.kt b/navigation/navigation-compose/src/androidTest/java/androidx/navigation/compose/ComposeNavigatorTest.kt
new file mode 100644
index 0000000..072bccd
--- /dev/null
+++ b/navigation/navigation-compose/src/androidTest/java/androidx/navigation/compose/ComposeNavigatorTest.kt
@@ -0,0 +1,116 @@
+/*
+ * 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 androidx.navigation.compose
+
+import androidx.navigation.navOptions
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.filters.LargeTest
+import androidx.ui.test.createComposeRule
+import com.google.common.truth.Truth.assertThat
+import com.google.common.truth.Truth.assertWithMessage
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+
+@LargeTest
+@RunWith(AndroidJUnit4::class)
+class ComposeNavigatorTest {
+ @get:Rule
+ val composeTestRule = createComposeRule()
+
+ @Test
+ fun testNavigateWithPopUpToThenPop() {
+ val navigator = ComposeNavigator()
+ val destination = navigator.createDestination()
+ destination.id = FIRST_DESTINATION_ID
+
+ assertThat(navigator.navigate(destination, null, null, null))
+ .isEqualTo(destination)
+
+ destination.id = SECOND_DESTINATION_ID
+ assertThat(navigator.navigate(destination, null, null, null))
+ .isEqualTo(destination)
+
+ assertWithMessage("ComposeNavigator should return true when popping the third destination")
+ .that(navigator.popBackStack())
+ .isTrue()
+ destination.id = THIRD_DESTINATION_ID
+ assertThat(
+ navigator.navigate(
+ destination, null,
+ navOptions { popUpTo(FIRST_DESTINATION_ID) { inclusive = false } }, null
+ )
+ ).isEqualTo(destination)
+
+ assertWithMessage("ComposeNavigator should return true when popping the third destination")
+ .that(navigator.popBackStack())
+ .isTrue()
+ }
+
+ @Test
+ fun testSingleTopInitial() {
+ val navigator = ComposeNavigator()
+ val destination = navigator.createDestination()
+ destination.id = FIRST_DESTINATION_ID
+
+ navigator.navigate(destination, null, null, null)
+
+ assertThat(
+ navigator.navigate(
+ destination, null,
+ navOptions { launchSingleTop = true }, null
+ )
+ ).isNull()
+ }
+
+ @Test
+ fun testSingleTop() {
+ val navigator = ComposeNavigator()
+ val destination = navigator.createDestination()
+ destination.id = FIRST_DESTINATION_ID
+
+ assertThat(navigator.navigate(destination, null, null, null))
+ .isEqualTo(destination)
+
+ destination.id = SECOND_DESTINATION_ID
+ assertThat(navigator.navigate(destination, null, null, null))
+ .isEqualTo(destination)
+
+ assertThat(
+ navigator.navigate(
+ destination, null,
+ navOptions { launchSingleTop = true }, null
+ )
+ ).isNull()
+
+ destination.id = FIRST_DESTINATION_ID
+ assertThat(
+ navigator.navigate(
+ destination, null,
+ navOptions { launchSingleTop = true }, null
+ )
+ ).isEqualTo(destination)
+
+ assertWithMessage("ComposeNavigator should return true when popping the first destination")
+ .that(navigator.popBackStack())
+ .isTrue()
+ }
+}
+
+private const val FIRST_DESTINATION_ID = 1
+private const val SECOND_DESTINATION_ID = 2
+private const val THIRD_DESTINATION_ID = 3
diff --git a/navigation/navigation-compose/src/androidTest/java/androidx/navigation/compose/NavGraphBuilderTest.kt b/navigation/navigation-compose/src/androidTest/java/androidx/navigation/compose/NavGraphBuilderTest.kt
index d487ce2..8c82eae 100644
--- a/navigation/navigation-compose/src/androidTest/java/androidx/navigation/compose/NavGraphBuilderTest.kt
+++ b/navigation/navigation-compose/src/androidTest/java/androidx/navigation/compose/NavGraphBuilderTest.kt
@@ -26,6 +26,7 @@
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.LargeTest
import com.google.common.truth.Truth.assertThat
+import com.google.common.truth.Truth.assertWithMessage
import kotlinx.coroutines.ExperimentalCoroutinesApi
import org.junit.Rule
import org.junit.Test
@@ -109,6 +110,27 @@
.isTrue()
}
}
+
+ @Test
+ fun testNavigationNested() {
+ lateinit var navController: TestNavHostController
+ composeTestRule.setContent {
+ navController = TestNavHostController(ContextAmbient.current)
+ navController.navigatorProvider.addNavigator(ComposeNavigator())
+
+ NavHost(navController, startDestination = firstRoute) {
+ navigation(startDestination = secondRoute, route = firstRoute) {
+ composable(secondRoute) { }
+ }
+ }
+ }
+
+ composeTestRule.runOnUiThread {
+ assertWithMessage("Destination should be added to the graph")
+ .that(firstRoute in navController.graph)
+ .isTrue()
+ }
+ }
}
private const val firstRoute = "first"
diff --git a/navigation/navigation-compose/src/androidTest/java/androidx/navigation/compose/NavHostControllerTest.kt b/navigation/navigation-compose/src/androidTest/java/androidx/navigation/compose/NavHostControllerTest.kt
index 921e230..e4f454b7 100644
--- a/navigation/navigation-compose/src/androidTest/java/androidx/navigation/compose/NavHostControllerTest.kt
+++ b/navigation/navigation-compose/src/androidTest/java/androidx/navigation/compose/NavHostControllerTest.kt
@@ -29,13 +29,13 @@
import androidx.navigation.testing.TestNavHostController
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.LargeTest
+import androidx.testutils.TestNavigator
+import com.google.common.truth.Truth.assertThat
import com.google.common.truth.Truth.assertWithMessage
-import kotlinx.coroutines.ExperimentalCoroutinesApi
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
-@ExperimentalCoroutinesApi
@LargeTest
@RunWith(AndroidJUnit4::class)
class NavHostControllerTest {
@@ -112,6 +112,83 @@
.that(currentBackStackEntry.value?.arguments?.getString(KEY_ROUTE))
.isEqualTo(FIRST_DESTINATION)
}
+
+ @Test
+ fun testNavigateThenNavigateWithPop() {
+ var currentBackStackEntry: State<NavBackStackEntry?> = mutableStateOf(null)
+ lateinit var navController: NavController
+ val navigator = TestNavigator()
+ composeTestRule.setContent {
+ navController = TestNavHostController(ContextAmbient.current)
+ navController.navigatorProvider.addNavigator(navigator)
+
+ navController.graph = navController.createGraph(startDestination = FIRST_DESTINATION) {
+ test(FIRST_DESTINATION)
+ test(SECOND_DESTINATION)
+ }
+
+ currentBackStackEntry = navController.currentBackStackEntryAsState()
+ }
+
+ assertWithMessage("the currentBackStackEntry should be set with the graph")
+ .that(currentBackStackEntry.value?.arguments?.getString(KEY_ROUTE))
+ .isEqualTo(FIRST_DESTINATION)
+ assertThat(navigator.backStack.size).isEqualTo(1)
+
+ composeTestRule.runOnUiThread {
+ navController.navigate(SECOND_DESTINATION) {
+ popUpTo("first") { inclusive = true }
+ }
+ }
+
+ assertWithMessage("the currentBackStackEntry should be after navigate")
+ .that(currentBackStackEntry.value?.arguments?.getString(KEY_ROUTE))
+ .isEqualTo(SECOND_DESTINATION)
+ assertWithMessage("the second destination should be the only one on the back stack")
+ .that(navigator.backStack.size)
+ .isEqualTo(1)
+ }
+
+ @Test
+ fun testNavigateOptionSingleTop() {
+ var currentBackStackEntry: State<NavBackStackEntry?> = mutableStateOf(null)
+ lateinit var navController: NavController
+ val navigator = TestNavigator()
+ composeTestRule.setContent {
+ navController = TestNavHostController(ContextAmbient.current)
+ navController.navigatorProvider.addNavigator(navigator)
+
+ navController.graph = navController.createGraph(startDestination = FIRST_DESTINATION) {
+ test(FIRST_DESTINATION)
+ test(SECOND_DESTINATION)
+ }
+
+ currentBackStackEntry = navController.currentBackStackEntryAsState()
+ }
+
+ assertWithMessage("the currentBackStackEntry should be set with the graph")
+ .that(currentBackStackEntry.value?.arguments?.getString(KEY_ROUTE))
+ .isEqualTo(FIRST_DESTINATION)
+ assertThat(navigator.backStack.size).isEqualTo(1)
+
+ composeTestRule.runOnUiThread {
+ navController.navigate(SECOND_DESTINATION)
+ }
+
+ assertWithMessage("there should be 2 destinations on the back stack after navigate")
+ .that(navigator.backStack.size)
+ .isEqualTo(2)
+
+ composeTestRule.runOnUiThread {
+ navController.navigate(SECOND_DESTINATION) {
+ launchSingleTop = true
+ }
+ }
+
+ assertWithMessage("there should be 2 destination on back stack when using singleTop")
+ .that(navigator.backStack.size)
+ .isEqualTo(2)
+ }
}
internal inline fun NavGraphBuilder.test(
diff --git a/navigation/navigation-compose/src/main/java/androidx/navigation/compose/ComposeNavigator.kt b/navigation/navigation-compose/src/main/java/androidx/navigation/compose/ComposeNavigator.kt
index ba23fb5..4b8f293 100644
--- a/navigation/navigation-compose/src/main/java/androidx/navigation/compose/ComposeNavigator.kt
+++ b/navigation/navigation-compose/src/main/java/androidx/navigation/compose/ComposeNavigator.kt
@@ -20,7 +20,6 @@
import androidx.compose.runtime.Composable
import androidx.navigation.NavBackStackEntry
import androidx.navigation.NavDestination
-import androidx.navigation.NavHostController
import androidx.navigation.NavOptions
import androidx.navigation.Navigator
@@ -31,6 +30,7 @@
*/
@Navigator.Name("composable")
public class ComposeNavigator : Navigator<ComposeNavigator.Destination>() {
+ private val backstack = mutableListOf<Int>()
override fun navigate(
destination: Destination,
@@ -38,6 +38,12 @@
navOptions: NavOptions?,
navigatorExtras: Extras?
): NavDestination? {
+ if (
+ navOptions?.shouldLaunchSingleTop() == true && backstack.lastOrNull() == destination.id
+ ) {
+ return null
+ }
+ backstack.add(destination.id)
return destination
}
@@ -45,12 +51,8 @@
return Destination(this) { }
}
- /**
- * The back stack is managed entirely by the [NavHostController]. This returns `true` and
- * passes control back to the NavController.
- */
override fun popBackStack(): Boolean {
- return true
+ return backstack.removeLastOrNull() != null
}
/**
diff --git a/navigation/navigation-compose/src/main/java/androidx/navigation/compose/NavGraphBuilder.kt b/navigation/navigation-compose/src/main/java/androidx/navigation/compose/NavGraphBuilder.kt
index 2e18e00..3cabaa2 100644
--- a/navigation/navigation-compose/src/main/java/androidx/navigation/compose/NavGraphBuilder.kt
+++ b/navigation/navigation-compose/src/main/java/androidx/navigation/compose/NavGraphBuilder.kt
@@ -19,8 +19,10 @@
import androidx.compose.runtime.Composable
import androidx.navigation.NavBackStackEntry
import androidx.navigation.NavDeepLink
+import androidx.navigation.NavGraph
import androidx.navigation.NavGraphBuilder
import androidx.navigation.get
+import androidx.navigation.navigation
/**
* Add the [Composable] to the [NavGraphBuilder]
@@ -52,3 +54,18 @@
}
)
}
+
+/**
+ * Construct a nested [NavGraph]
+ *
+ * @sample androidx.navigation.compose.samples.NestedNav
+ */
+public fun NavGraphBuilder.navigation(
+ startDestination: String,
+ route: String,
+ builder: NavGraphBuilder.() -> Unit
+): Unit = navigation(
+ createRoute(route).hashCode(),
+ createRoute(startDestination).hashCode(),
+ builder
+)
diff --git a/navigation/navigation-compose/src/main/java/androidx/navigation/compose/NavHostController.kt b/navigation/navigation-compose/src/main/java/androidx/navigation/compose/NavHostController.kt
index cbe9bd4..059c05f 100644
--- a/navigation/navigation-compose/src/main/java/androidx/navigation/compose/NavHostController.kt
+++ b/navigation/navigation-compose/src/main/java/androidx/navigation/compose/NavHostController.kt
@@ -34,6 +34,9 @@
import androidx.navigation.NavGraph
import androidx.navigation.NavGraphBuilder
import androidx.navigation.NavHostController
+import androidx.navigation.NavOptions
+import androidx.navigation.NavOptionsBuilder
+import androidx.navigation.navOptions
import androidx.navigation.navigation
/**
@@ -98,9 +101,13 @@
* Navigate to a route in the current NavGraph.
*
* @param route route for the destination
+ * @param builder DSL for constructing a new [NavOptions]
*/
-public fun NavController.navigate(route: String) {
- navigate(NavDeepLinkRequest.Builder.fromUri(createRoute(route).toUri()).build())
+public fun NavController.navigate(route: String, builder: NavOptionsBuilder.() -> Unit = {}) {
+ navigate(
+ NavDeepLinkRequest.Builder.fromUri(createRoute(route).toUri()).build(),
+ navOptions(builder)
+ )
}
/**
diff --git a/navigation/navigation-compose/src/main/java/androidx/navigation/compose/NavOptionsBuilder.kt b/navigation/navigation-compose/src/main/java/androidx/navigation/compose/NavOptionsBuilder.kt
new file mode 100644
index 0000000..7701f08
--- /dev/null
+++ b/navigation/navigation-compose/src/main/java/androidx/navigation/compose/NavOptionsBuilder.kt
@@ -0,0 +1,31 @@
+/*
+ * 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 androidx.navigation.compose
+
+import androidx.navigation.NavOptionsBuilder
+import androidx.navigation.PopUpToBuilder
+
+/**
+ * Pop up to a given destination before navigating. This pops all non-matching destination routes
+ * from the back stack until the destination with a matching route is found.
+ *
+ * @param route route for the destination
+ * @param popUpToBuilder builder used to construct a popUpTo operation
+ */
+fun NavOptionsBuilder.popUpTo(route: String, popUpToBuilder: PopUpToBuilder.() -> Unit) {
+ popUpTo(createRoute(route).hashCode(), popUpToBuilder)
+}
diff --git a/navigation/navigation-fragment-ktx/build.gradle b/navigation/navigation-fragment-ktx/build.gradle
index 545ac3e..ba7d18a 100644
--- a/navigation/navigation-fragment-ktx/build.gradle
+++ b/navigation/navigation-fragment-ktx/build.gradle
@@ -43,7 +43,9 @@
androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy)
androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy)
androidTestImplementation(project(":internal-testutils-runtime"))
- androidTestImplementation(project(":internal-testutils-navigation"))
+ androidTestImplementation(project(":internal-testutils-navigation"), {
+ exclude group: 'androidx.navigation', module: 'navigation-common-ktx'
+ })
}
androidx {
diff --git a/navigation/navigation-fragment/build.gradle b/navigation/navigation-fragment/build.gradle
index c6efdf7..553469e 100644
--- a/navigation/navigation-fragment/build.gradle
+++ b/navigation/navigation-fragment/build.gradle
@@ -40,7 +40,9 @@
androidTestImplementation project(':internal-testutils-runtime'), {
exclude group: 'androidx.fragment', module: 'fragment'
}
- androidTestImplementation(project(':internal-testutils-navigation'))
+ androidTestImplementation(project(':internal-testutils-navigation'), {
+ exclude group: 'androidx.navigation', module: 'navigation-common-ktx'
+ })
}
androidx {
diff --git a/navigation/navigation-runtime-ktx/build.gradle b/navigation/navigation-runtime-ktx/build.gradle
index fd5350f..074c94f 100644
--- a/navigation/navigation-runtime-ktx/build.gradle
+++ b/navigation/navigation-runtime-ktx/build.gradle
@@ -37,7 +37,9 @@
because 'Mirror navigation-runtime dependency graph for -ktx artifacts'
}
api(KOTLIN_STDLIB)
- androidTestImplementation(project(":internal-testutils-navigation"))
+ androidTestImplementation(project(":internal-testutils-navigation"), {
+ exclude group: 'androidx.navigation', module: 'navigation-common-ktx'
+ })
androidTestImplementation(TRUTH)
androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT)
androidTestImplementation(ANDROIDX_TEST_CORE)
diff --git a/navigation/navigation-runtime-truth/build.gradle b/navigation/navigation-runtime-truth/build.gradle
index 4cd2e26..e192dcc 100644
--- a/navigation/navigation-runtime-truth/build.gradle
+++ b/navigation/navigation-runtime-truth/build.gradle
@@ -33,7 +33,9 @@
api(TRUTH)
api(KOTLIN_STDLIB)
androidTestImplementation(project(":internal-testutils-truth"))
- androidTestImplementation(project(":internal-testutils-navigation"))
+ androidTestImplementation(project(":internal-testutils-navigation"), {
+ exclude group: 'androidx.navigation', module: 'navigation-common-ktx'
+ })
androidTestImplementation(TRUTH)
androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT)
androidTestImplementation(ANDROIDX_TEST_CORE)
diff --git a/navigation/navigation-testing/build.gradle b/navigation/navigation-testing/build.gradle
index 3172c9c..9b5ba21 100644
--- a/navigation/navigation-testing/build.gradle
+++ b/navigation/navigation-testing/build.gradle
@@ -30,7 +30,9 @@
dependencies {
api(project(":navigation:navigation-runtime-ktx"))
- androidTestImplementation(project(":internal-testutils-navigation"))
+ androidTestImplementation(project(":internal-testutils-navigation"), {
+ exclude group: 'androidx.navigation', module: 'navigation-common-ktx'
+ })
androidTestImplementation(project(":navigation:navigation-fragment-ktx"))
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT)
diff --git a/navigation/navigation-ui/build.gradle b/navigation/navigation-ui/build.gradle
index a6352bd..fc8a935 100644
--- a/navigation/navigation-ui/build.gradle
+++ b/navigation/navigation-ui/build.gradle
@@ -40,7 +40,9 @@
implementation('androidx.transition:transition:1.3.0')
androidTestImplementation(project(":navigation:navigation-runtime-ktx"))
- androidTestImplementation(project(":internal-testutils-navigation"))
+ androidTestImplementation(project(":internal-testutils-navigation"), {
+ exclude group: 'androidx.navigation', module: 'navigation-common-ktx'
+ })
androidTestImplementation(KOTLIN_STDLIB)
androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT)
androidTestImplementation(ANDROIDX_TEST_CORE)
diff --git a/preference/preference/lint-baseline.xml b/preference/preference/lint-baseline.xml
index e335d1f..5cb12c9 100644
--- a/preference/preference/lint-baseline.xml
+++ b/preference/preference/lint-baseline.xml
@@ -2274,7 +2274,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/preference/PreferenceDialogFragment.java"
- line="90"
+ line="92"
column="26"/>
</issue>
@@ -2285,7 +2285,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/preference/PreferenceDialogFragment.java"
- line="151"
+ line="153"
column="34"/>
</issue>
@@ -2296,7 +2296,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/preference/PreferenceDialogFragment.java"
- line="189"
+ line="191"
column="12"/>
</issue>
@@ -2307,7 +2307,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/preference/PreferenceDialogFragment.java"
- line="208"
+ line="210"
column="43"/>
</issue>
@@ -2318,7 +2318,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/preference/PreferenceDialogFragment.java"
- line="255"
+ line="256"
column="15"/>
</issue>
@@ -2329,7 +2329,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/preference/PreferenceDialogFragment.java"
- line="255"
+ line="256"
column="39"/>
</issue>
@@ -2340,7 +2340,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/preference/PreferenceDialogFragment.java"
- line="275"
+ line="276"
column="37"/>
</issue>
@@ -2351,7 +2351,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/preference/PreferenceDialogFragment.java"
- line="301"
+ line="302"
column="25"/>
</issue>
@@ -2362,7 +2362,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/preference/PreferenceDialogFragment.java"
- line="306"
+ line="307"
column="27"/>
</issue>
@@ -2373,7 +2373,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/preference/PreferenceDialogFragmentCompat.java"
- line="77"
+ line="79"
column="26"/>
</issue>
@@ -2384,7 +2384,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/preference/PreferenceDialogFragmentCompat.java"
- line="138"
+ line="140"
column="27"/>
</issue>
@@ -2395,7 +2395,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/preference/PreferenceDialogFragmentCompat.java"
- line="172"
+ line="174"
column="12"/>
</issue>
@@ -2406,7 +2406,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/preference/PreferenceDialogFragmentCompat.java"
- line="188"
+ line="190"
column="43"/>
</issue>
@@ -2417,7 +2417,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/preference/PreferenceDialogFragmentCompat.java"
- line="232"
+ line="233"
column="15"/>
</issue>
@@ -2428,7 +2428,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/preference/PreferenceDialogFragmentCompat.java"
- line="232"
+ line="233"
column="39"/>
</issue>
@@ -2439,7 +2439,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/preference/PreferenceDialogFragmentCompat.java"
- line="248"
+ line="249"
column="37"/>
</issue>
@@ -2450,7 +2450,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/preference/PreferenceDialogFragmentCompat.java"
- line="270"
+ line="271"
column="25"/>
</issue>
@@ -2934,7 +2934,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/preference/PreferenceFragmentCompat.java"
- line="453"
+ line="452"
column="36"/>
</issue>
@@ -2945,7 +2945,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/preference/PreferenceFragmentCompat.java"
- line="525"
+ line="524"
column="18"/>
</issue>
@@ -2956,7 +2956,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/preference/PreferenceFragmentCompat.java"
- line="543"
+ line="542"
column="12"/>
</issue>
@@ -2967,7 +2967,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/preference/PreferenceFragmentCompat.java"
- line="543"
+ line="542"
column="46"/>
</issue>
@@ -2978,7 +2978,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/preference/PreferenceFragmentCompat.java"
- line="543"
+ line="542"
column="71"/>
</issue>
@@ -2989,7 +2989,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/preference/PreferenceFragmentCompat.java"
- line="544"
+ line="543"
column="13"/>
</issue>
@@ -3000,7 +3000,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/preference/PreferenceFragmentCompat.java"
- line="570"
+ line="569"
column="12"/>
</issue>
@@ -3011,7 +3011,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/preference/PreferenceFragmentCompat.java"
- line="580"
+ line="579"
column="15"/>
</issue>
@@ -3022,7 +3022,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/preference/PreferenceFragmentCompat.java"
- line="580"
+ line="579"
column="52"/>
</issue>
@@ -3033,7 +3033,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/preference/PreferenceFragmentCompat.java"
- line="592"
+ line="591"
column="43"/>
</issue>
@@ -3044,7 +3044,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/preference/PreferenceFragmentCompat.java"
- line="644"
+ line="643"
column="12"/>
</issue>
@@ -3055,7 +3055,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/preference/PreferenceFragmentCompat.java"
- line="648"
+ line="647"
column="42"/>
</issue>
@@ -3066,7 +3066,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/preference/PreferenceFragmentCompat.java"
- line="652"
+ line="651"
column="42"/>
</issue>
@@ -3077,7 +3077,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/preference/PreferenceFragmentCompat.java"
- line="709"
+ line="708"
column="43"/>
</issue>
@@ -3088,7 +3088,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/preference/PreferenceFragmentCompat.java"
- line="709"
+ line="708"
column="76"/>
</issue>
@@ -3099,7 +3099,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/preference/PreferenceFragmentCompat.java"
- line="725"
+ line="724"
column="41"/>
</issue>
@@ -3110,7 +3110,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/preference/PreferenceFragmentCompat.java"
- line="725"
+ line="724"
column="74"/>
</issue>
@@ -3121,7 +3121,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/preference/PreferenceFragmentCompat.java"
- line="739"
+ line="738"
column="17"/>
</issue>
diff --git a/recyclerview/recyclerview/api/1.2.0-beta01.txt b/recyclerview/recyclerview/api/1.2.0-beta01.txt
new file mode 100644
index 0000000..e1ffd69
--- /dev/null
+++ b/recyclerview/recyclerview/api/1.2.0-beta01.txt
@@ -0,0 +1,1091 @@
+// Signature format: 4.0
+package androidx.recyclerview.widget {
+
+ public final class AdapterListUpdateCallback implements androidx.recyclerview.widget.ListUpdateCallback {
+ ctor public AdapterListUpdateCallback(androidx.recyclerview.widget.RecyclerView.Adapter);
+ method public void onChanged(int, int, Object!);
+ method public void onInserted(int, int);
+ method public void onMoved(int, int);
+ method public void onRemoved(int, int);
+ }
+
+ public final class AsyncDifferConfig<T> {
+ method public java.util.concurrent.Executor getBackgroundThreadExecutor();
+ method public androidx.recyclerview.widget.DiffUtil.ItemCallback<T!> getDiffCallback();
+ }
+
+ public static final class AsyncDifferConfig.Builder<T> {
+ ctor public AsyncDifferConfig.Builder(androidx.recyclerview.widget.DiffUtil.ItemCallback<T!>);
+ method public androidx.recyclerview.widget.AsyncDifferConfig<T!> build();
+ method public androidx.recyclerview.widget.AsyncDifferConfig.Builder<T!> setBackgroundThreadExecutor(java.util.concurrent.Executor!);
+ }
+
+ public class AsyncListDiffer<T> {
+ ctor public AsyncListDiffer(androidx.recyclerview.widget.RecyclerView.Adapter, androidx.recyclerview.widget.DiffUtil.ItemCallback<T!>);
+ ctor public AsyncListDiffer(androidx.recyclerview.widget.ListUpdateCallback, androidx.recyclerview.widget.AsyncDifferConfig<T!>);
+ method public void addListListener(androidx.recyclerview.widget.AsyncListDiffer.ListListener<T!>);
+ method public java.util.List<T!> getCurrentList();
+ method public void removeListListener(androidx.recyclerview.widget.AsyncListDiffer.ListListener<T!>);
+ method public void submitList(java.util.List<T!>?);
+ method public void submitList(java.util.List<T!>?, Runnable?);
+ }
+
+ public static interface AsyncListDiffer.ListListener<T> {
+ method public void onCurrentListChanged(java.util.List<T!>, java.util.List<T!>);
+ }
+
+ public class AsyncListUtil<T> {
+ ctor public AsyncListUtil(Class<T!>, int, androidx.recyclerview.widget.AsyncListUtil.DataCallback<T!>, androidx.recyclerview.widget.AsyncListUtil.ViewCallback);
+ method public T? getItem(int);
+ method public int getItemCount();
+ method public void onRangeChanged();
+ method public void refresh();
+ }
+
+ public abstract static class AsyncListUtil.DataCallback<T> {
+ ctor public AsyncListUtil.DataCallback();
+ method @WorkerThread public abstract void fillData(T![], int, int);
+ method @WorkerThread public int getMaxCachedTiles();
+ method @WorkerThread public void recycleData(T![], int);
+ method @WorkerThread public abstract int refreshData();
+ }
+
+ public abstract static class AsyncListUtil.ViewCallback {
+ ctor public AsyncListUtil.ViewCallback();
+ method @UiThread public void extendRangeInto(int[], int[], int);
+ method @UiThread public abstract void getItemRangeInto(int[]);
+ method @UiThread public abstract void onDataRefresh();
+ method @UiThread public abstract void onItemLoaded(int);
+ field public static final int HINT_SCROLL_ASC = 2; // 0x2
+ field public static final int HINT_SCROLL_DESC = 1; // 0x1
+ field public static final int HINT_SCROLL_NONE = 0; // 0x0
+ }
+
+ public class BatchingListUpdateCallback implements androidx.recyclerview.widget.ListUpdateCallback {
+ ctor public BatchingListUpdateCallback(androidx.recyclerview.widget.ListUpdateCallback);
+ method public void dispatchLastEvent();
+ method public void onChanged(int, int, Object!);
+ method public void onInserted(int, int);
+ method public void onMoved(int, int);
+ method public void onRemoved(int, int);
+ }
+
+ public final class ConcatAdapter extends androidx.recyclerview.widget.RecyclerView.Adapter<androidx.recyclerview.widget.RecyclerView.ViewHolder> {
+ ctor @java.lang.SafeVarargs public ConcatAdapter(androidx.recyclerview.widget.RecyclerView.Adapter<? extends androidx.recyclerview.widget.RecyclerView.ViewHolder>!...);
+ ctor @java.lang.SafeVarargs public ConcatAdapter(androidx.recyclerview.widget.ConcatAdapter.Config, androidx.recyclerview.widget.RecyclerView.Adapter<? extends androidx.recyclerview.widget.RecyclerView.ViewHolder>!...);
+ ctor public ConcatAdapter(java.util.List<? extends androidx.recyclerview.widget.RecyclerView.Adapter<? extends androidx.recyclerview.widget.RecyclerView.ViewHolder>>);
+ ctor public ConcatAdapter(androidx.recyclerview.widget.ConcatAdapter.Config, java.util.List<? extends androidx.recyclerview.widget.RecyclerView.Adapter<? extends androidx.recyclerview.widget.RecyclerView.ViewHolder>>);
+ method public boolean addAdapter(androidx.recyclerview.widget.RecyclerView.Adapter<? extends androidx.recyclerview.widget.RecyclerView.ViewHolder>);
+ method public boolean addAdapter(int, androidx.recyclerview.widget.RecyclerView.Adapter<? extends androidx.recyclerview.widget.RecyclerView.ViewHolder>);
+ method public java.util.List<? extends androidx.recyclerview.widget.RecyclerView.Adapter<? extends androidx.recyclerview.widget.RecyclerView.ViewHolder>> getAdapters();
+ method public int getItemCount();
+ method public void onBindViewHolder(androidx.recyclerview.widget.RecyclerView.ViewHolder, int);
+ method public androidx.recyclerview.widget.RecyclerView.ViewHolder onCreateViewHolder(android.view.ViewGroup, int);
+ method public boolean onFailedToRecycleView(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public void onViewAttachedToWindow(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public void onViewDetachedFromWindow(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public void onViewRecycled(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public boolean removeAdapter(androidx.recyclerview.widget.RecyclerView.Adapter<? extends androidx.recyclerview.widget.RecyclerView.ViewHolder>);
+ }
+
+ public static final class ConcatAdapter.Config {
+ field public static final androidx.recyclerview.widget.ConcatAdapter.Config DEFAULT;
+ field public final boolean isolateViewTypes;
+ field public final androidx.recyclerview.widget.ConcatAdapter.Config.StableIdMode stableIdMode;
+ }
+
+ public static final class ConcatAdapter.Config.Builder {
+ ctor public ConcatAdapter.Config.Builder();
+ method public androidx.recyclerview.widget.ConcatAdapter.Config build();
+ method public androidx.recyclerview.widget.ConcatAdapter.Config.Builder setIsolateViewTypes(boolean);
+ method public androidx.recyclerview.widget.ConcatAdapter.Config.Builder setStableIdMode(androidx.recyclerview.widget.ConcatAdapter.Config.StableIdMode);
+ }
+
+ public enum ConcatAdapter.Config.StableIdMode {
+ enum_constant public static final androidx.recyclerview.widget.ConcatAdapter.Config.StableIdMode ISOLATED_STABLE_IDS;
+ enum_constant public static final androidx.recyclerview.widget.ConcatAdapter.Config.StableIdMode NO_STABLE_IDS;
+ enum_constant public static final androidx.recyclerview.widget.ConcatAdapter.Config.StableIdMode SHARED_STABLE_IDS;
+ }
+
+ public class DefaultItemAnimator extends androidx.recyclerview.widget.SimpleItemAnimator {
+ ctor public DefaultItemAnimator();
+ method public boolean animateAdd(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public boolean animateChange(androidx.recyclerview.widget.RecyclerView.ViewHolder!, androidx.recyclerview.widget.RecyclerView.ViewHolder!, int, int, int, int);
+ method public boolean animateMove(androidx.recyclerview.widget.RecyclerView.ViewHolder!, int, int, int, int);
+ method public boolean animateRemove(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public void endAnimation(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public void endAnimations();
+ method public boolean isRunning();
+ method public void runPendingAnimations();
+ }
+
+ public class DiffUtil {
+ method public static androidx.recyclerview.widget.DiffUtil.DiffResult calculateDiff(androidx.recyclerview.widget.DiffUtil.Callback);
+ method public static androidx.recyclerview.widget.DiffUtil.DiffResult calculateDiff(androidx.recyclerview.widget.DiffUtil.Callback, boolean);
+ }
+
+ public abstract static class DiffUtil.Callback {
+ ctor public DiffUtil.Callback();
+ method public abstract boolean areContentsTheSame(int, int);
+ method public abstract boolean areItemsTheSame(int, int);
+ method public Object? getChangePayload(int, int);
+ method public abstract int getNewListSize();
+ method public abstract int getOldListSize();
+ }
+
+ public static class DiffUtil.DiffResult {
+ method public int convertNewPositionToOld(@IntRange(from=0) int);
+ method public int convertOldPositionToNew(@IntRange(from=0) int);
+ method public void dispatchUpdatesTo(androidx.recyclerview.widget.RecyclerView.Adapter);
+ method public void dispatchUpdatesTo(androidx.recyclerview.widget.ListUpdateCallback);
+ field public static final int NO_POSITION = -1; // 0xffffffff
+ }
+
+ public abstract static class DiffUtil.ItemCallback<T> {
+ ctor public DiffUtil.ItemCallback();
+ method public abstract boolean areContentsTheSame(T, T);
+ method public abstract boolean areItemsTheSame(T, T);
+ method public Object? getChangePayload(T, T);
+ }
+
+ public class DividerItemDecoration extends androidx.recyclerview.widget.RecyclerView.ItemDecoration {
+ ctor public DividerItemDecoration(android.content.Context!, int);
+ method public android.graphics.drawable.Drawable? getDrawable();
+ method public void setDrawable(android.graphics.drawable.Drawable);
+ method public void setOrientation(int);
+ field public static final int HORIZONTAL = 0; // 0x0
+ field public static final int VERTICAL = 1; // 0x1
+ }
+
+ public class GridLayoutManager extends androidx.recyclerview.widget.LinearLayoutManager {
+ ctor public GridLayoutManager(android.content.Context!, android.util.AttributeSet!, int, int);
+ ctor public GridLayoutManager(android.content.Context!, int);
+ ctor public GridLayoutManager(android.content.Context!, int, int, boolean);
+ method public int getSpanCount();
+ method public androidx.recyclerview.widget.GridLayoutManager.SpanSizeLookup! getSpanSizeLookup();
+ method public boolean isUsingSpansToEstimateScrollbarDimensions();
+ method public void setSpanCount(int);
+ method public void setSpanSizeLookup(androidx.recyclerview.widget.GridLayoutManager.SpanSizeLookup!);
+ method public void setUsingSpansToEstimateScrollbarDimensions(boolean);
+ field public static final int DEFAULT_SPAN_COUNT = -1; // 0xffffffff
+ }
+
+ public static final class GridLayoutManager.DefaultSpanSizeLookup extends androidx.recyclerview.widget.GridLayoutManager.SpanSizeLookup {
+ ctor public GridLayoutManager.DefaultSpanSizeLookup();
+ method public int getSpanSize(int);
+ }
+
+ public static class GridLayoutManager.LayoutParams extends androidx.recyclerview.widget.RecyclerView.LayoutParams {
+ ctor public GridLayoutManager.LayoutParams(android.content.Context!, android.util.AttributeSet!);
+ ctor public GridLayoutManager.LayoutParams(int, int);
+ ctor public GridLayoutManager.LayoutParams(android.view.ViewGroup.MarginLayoutParams!);
+ ctor public GridLayoutManager.LayoutParams(android.view.ViewGroup.LayoutParams!);
+ ctor public GridLayoutManager.LayoutParams(androidx.recyclerview.widget.RecyclerView.LayoutParams!);
+ method public int getSpanIndex();
+ method public int getSpanSize();
+ field public static final int INVALID_SPAN_ID = -1; // 0xffffffff
+ }
+
+ public abstract static class GridLayoutManager.SpanSizeLookup {
+ ctor public GridLayoutManager.SpanSizeLookup();
+ method public int getSpanGroupIndex(int, int);
+ method public int getSpanIndex(int, int);
+ method public abstract int getSpanSize(int);
+ method public void invalidateSpanGroupIndexCache();
+ method public void invalidateSpanIndexCache();
+ method public boolean isSpanGroupIndexCacheEnabled();
+ method public boolean isSpanIndexCacheEnabled();
+ method public void setSpanGroupIndexCacheEnabled(boolean);
+ method public void setSpanIndexCacheEnabled(boolean);
+ }
+
+ public class ItemTouchHelper extends androidx.recyclerview.widget.RecyclerView.ItemDecoration implements androidx.recyclerview.widget.RecyclerView.OnChildAttachStateChangeListener {
+ ctor public ItemTouchHelper(androidx.recyclerview.widget.ItemTouchHelper.Callback);
+ method public void attachToRecyclerView(androidx.recyclerview.widget.RecyclerView?);
+ method public void onChildViewAttachedToWindow(android.view.View);
+ method public void onChildViewDetachedFromWindow(android.view.View);
+ method public void startDrag(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public void startSwipe(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ field public static final int ACTION_STATE_DRAG = 2; // 0x2
+ field public static final int ACTION_STATE_IDLE = 0; // 0x0
+ field public static final int ACTION_STATE_SWIPE = 1; // 0x1
+ field public static final int ANIMATION_TYPE_DRAG = 8; // 0x8
+ field public static final int ANIMATION_TYPE_SWIPE_CANCEL = 4; // 0x4
+ field public static final int ANIMATION_TYPE_SWIPE_SUCCESS = 2; // 0x2
+ field public static final int DOWN = 2; // 0x2
+ field public static final int END = 32; // 0x20
+ field public static final int LEFT = 4; // 0x4
+ field public static final int RIGHT = 8; // 0x8
+ field public static final int START = 16; // 0x10
+ field public static final int UP = 1; // 0x1
+ }
+
+ public abstract static class ItemTouchHelper.Callback {
+ ctor public ItemTouchHelper.Callback();
+ method public boolean canDropOver(androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.ViewHolder, androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public androidx.recyclerview.widget.RecyclerView.ViewHolder! chooseDropTarget(androidx.recyclerview.widget.RecyclerView.ViewHolder, java.util.List<androidx.recyclerview.widget.RecyclerView.ViewHolder!>, int, int);
+ method public void clearView(androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public int convertToAbsoluteDirection(int, int);
+ method public static int convertToRelativeDirection(int, int);
+ method public long getAnimationDuration(androidx.recyclerview.widget.RecyclerView, int, float, float);
+ method public int getBoundingBoxMargin();
+ method public static androidx.recyclerview.widget.ItemTouchUIUtil getDefaultUIUtil();
+ method public float getMoveThreshold(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public abstract int getMovementFlags(androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public float getSwipeEscapeVelocity(float);
+ method public float getSwipeThreshold(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public float getSwipeVelocityThreshold(float);
+ method public int interpolateOutOfBoundsScroll(androidx.recyclerview.widget.RecyclerView, int, int, int, long);
+ method public boolean isItemViewSwipeEnabled();
+ method public boolean isLongPressDragEnabled();
+ method public static int makeFlag(int, int);
+ method public static int makeMovementFlags(int, int);
+ method public void onChildDraw(android.graphics.Canvas, androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.ViewHolder, float, float, int, boolean);
+ method public void onChildDrawOver(android.graphics.Canvas, androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.ViewHolder!, float, float, int, boolean);
+ method public abstract boolean onMove(androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.ViewHolder, androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public void onMoved(androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.ViewHolder, int, androidx.recyclerview.widget.RecyclerView.ViewHolder, int, int, int);
+ method public void onSelectedChanged(androidx.recyclerview.widget.RecyclerView.ViewHolder?, int);
+ method public abstract void onSwiped(androidx.recyclerview.widget.RecyclerView.ViewHolder, int);
+ field public static final int DEFAULT_DRAG_ANIMATION_DURATION = 200; // 0xc8
+ field public static final int DEFAULT_SWIPE_ANIMATION_DURATION = 250; // 0xfa
+ }
+
+ public abstract static class ItemTouchHelper.SimpleCallback extends androidx.recyclerview.widget.ItemTouchHelper.Callback {
+ ctor public ItemTouchHelper.SimpleCallback(int, int);
+ method public int getDragDirs(androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public int getMovementFlags(androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public int getSwipeDirs(androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public void setDefaultDragDirs(int);
+ method public void setDefaultSwipeDirs(int);
+ }
+
+ public static interface ItemTouchHelper.ViewDropHandler {
+ method public void prepareForDrop(android.view.View, android.view.View, int, int);
+ }
+
+ public interface ItemTouchUIUtil {
+ method public void clearView(android.view.View!);
+ method public void onDraw(android.graphics.Canvas!, androidx.recyclerview.widget.RecyclerView!, android.view.View!, float, float, int, boolean);
+ method public void onDrawOver(android.graphics.Canvas!, androidx.recyclerview.widget.RecyclerView!, android.view.View!, float, float, int, boolean);
+ method public void onSelected(android.view.View!);
+ }
+
+ public class LinearLayoutManager extends androidx.recyclerview.widget.RecyclerView.LayoutManager implements androidx.recyclerview.widget.ItemTouchHelper.ViewDropHandler androidx.recyclerview.widget.RecyclerView.SmoothScroller.ScrollVectorProvider {
+ ctor public LinearLayoutManager(android.content.Context!);
+ ctor public LinearLayoutManager(android.content.Context!, int, boolean);
+ ctor public LinearLayoutManager(android.content.Context!, android.util.AttributeSet!, int, int);
+ method protected void calculateExtraLayoutSpace(androidx.recyclerview.widget.RecyclerView.State, int[]);
+ method public android.graphics.PointF! computeScrollVectorForPosition(int);
+ method public int findFirstCompletelyVisibleItemPosition();
+ method public int findFirstVisibleItemPosition();
+ method public int findLastCompletelyVisibleItemPosition();
+ method public int findLastVisibleItemPosition();
+ method public androidx.recyclerview.widget.RecyclerView.LayoutParams! generateDefaultLayoutParams();
+ method @Deprecated protected int getExtraLayoutSpace(androidx.recyclerview.widget.RecyclerView.State!);
+ method public int getInitialPrefetchItemCount();
+ method public int getOrientation();
+ method public boolean getRecycleChildrenOnDetach();
+ method public boolean getReverseLayout();
+ method public boolean getStackFromEnd();
+ method protected boolean isLayoutRTL();
+ method public boolean isSmoothScrollbarEnabled();
+ method public void prepareForDrop(android.view.View, android.view.View, int, int);
+ method public void scrollToPositionWithOffset(int, int);
+ method public void setInitialPrefetchItemCount(int);
+ method public void setOrientation(int);
+ method public void setRecycleChildrenOnDetach(boolean);
+ method public void setReverseLayout(boolean);
+ method public void setSmoothScrollbarEnabled(boolean);
+ method public void setStackFromEnd(boolean);
+ field public static final int HORIZONTAL = 0; // 0x0
+ field public static final int INVALID_OFFSET = -2147483648; // 0x80000000
+ field public static final int VERTICAL = 1; // 0x1
+ }
+
+ protected static class LinearLayoutManager.LayoutChunkResult {
+ ctor protected LinearLayoutManager.LayoutChunkResult();
+ field public int mConsumed;
+ field public boolean mFinished;
+ field public boolean mFocusable;
+ field public boolean mIgnoreConsumed;
+ }
+
+ public class LinearSmoothScroller extends androidx.recyclerview.widget.RecyclerView.SmoothScroller {
+ ctor public LinearSmoothScroller(android.content.Context!);
+ method public int calculateDtToFit(int, int, int, int, int);
+ method public int calculateDxToMakeVisible(android.view.View!, int);
+ method public int calculateDyToMakeVisible(android.view.View!, int);
+ method protected float calculateSpeedPerPixel(android.util.DisplayMetrics!);
+ method protected int calculateTimeForDeceleration(int);
+ method protected int calculateTimeForScrolling(int);
+ method protected int getHorizontalSnapPreference();
+ method protected int getVerticalSnapPreference();
+ method protected void onSeekTargetStep(int, int, androidx.recyclerview.widget.RecyclerView.State!, androidx.recyclerview.widget.RecyclerView.SmoothScroller.Action!);
+ method protected void onStart();
+ method protected void onStop();
+ method protected void onTargetFound(android.view.View!, androidx.recyclerview.widget.RecyclerView.State!, androidx.recyclerview.widget.RecyclerView.SmoothScroller.Action!);
+ method protected void updateActionForInterimTarget(androidx.recyclerview.widget.RecyclerView.SmoothScroller.Action!);
+ field public static final int SNAP_TO_ANY = 0; // 0x0
+ field public static final int SNAP_TO_END = 1; // 0x1
+ field public static final int SNAP_TO_START = -1; // 0xffffffff
+ field protected final android.view.animation.DecelerateInterpolator! mDecelerateInterpolator;
+ field protected int mInterimTargetDx;
+ field protected int mInterimTargetDy;
+ field protected final android.view.animation.LinearInterpolator! mLinearInterpolator;
+ field protected android.graphics.PointF! mTargetVector;
+ }
+
+ public class LinearSnapHelper extends androidx.recyclerview.widget.SnapHelper {
+ ctor public LinearSnapHelper();
+ method public int[]! calculateDistanceToFinalSnap(androidx.recyclerview.widget.RecyclerView.LayoutManager, android.view.View);
+ method public android.view.View! findSnapView(androidx.recyclerview.widget.RecyclerView.LayoutManager!);
+ method public int findTargetSnapPosition(androidx.recyclerview.widget.RecyclerView.LayoutManager!, int, int);
+ }
+
+ public abstract class ListAdapter<T, VH extends androidx.recyclerview.widget.RecyclerView.ViewHolder> extends androidx.recyclerview.widget.RecyclerView.Adapter<VH> {
+ ctor protected ListAdapter(androidx.recyclerview.widget.DiffUtil.ItemCallback<T!>);
+ ctor protected ListAdapter(androidx.recyclerview.widget.AsyncDifferConfig<T!>);
+ method public java.util.List<T!> getCurrentList();
+ method protected T! getItem(int);
+ method public int getItemCount();
+ method public void onCurrentListChanged(java.util.List<T!>, java.util.List<T!>);
+ method public void submitList(java.util.List<T!>?);
+ method public void submitList(java.util.List<T!>?, Runnable?);
+ }
+
+ public interface ListUpdateCallback {
+ method public void onChanged(int, int, Object?);
+ method public void onInserted(int, int);
+ method public void onMoved(int, int);
+ method public void onRemoved(int, int);
+ }
+
+ public abstract class OrientationHelper {
+ method public static androidx.recyclerview.widget.OrientationHelper! createHorizontalHelper(androidx.recyclerview.widget.RecyclerView.LayoutManager!);
+ method public static androidx.recyclerview.widget.OrientationHelper! createOrientationHelper(androidx.recyclerview.widget.RecyclerView.LayoutManager!, int);
+ method public static androidx.recyclerview.widget.OrientationHelper! createVerticalHelper(androidx.recyclerview.widget.RecyclerView.LayoutManager!);
+ method public abstract int getDecoratedEnd(android.view.View!);
+ method public abstract int getDecoratedMeasurement(android.view.View!);
+ method public abstract int getDecoratedMeasurementInOther(android.view.View!);
+ method public abstract int getDecoratedStart(android.view.View!);
+ method public abstract int getEnd();
+ method public abstract int getEndAfterPadding();
+ method public abstract int getEndPadding();
+ method public androidx.recyclerview.widget.RecyclerView.LayoutManager! getLayoutManager();
+ method public abstract int getMode();
+ method public abstract int getModeInOther();
+ method public abstract int getStartAfterPadding();
+ method public abstract int getTotalSpace();
+ method public int getTotalSpaceChange();
+ method public abstract int getTransformedEndWithDecoration(android.view.View!);
+ method public abstract int getTransformedStartWithDecoration(android.view.View!);
+ method public abstract void offsetChild(android.view.View!, int);
+ method public abstract void offsetChildren(int);
+ method public void onLayoutComplete();
+ field public static final int HORIZONTAL = 0; // 0x0
+ field public static final int VERTICAL = 1; // 0x1
+ field protected final androidx.recyclerview.widget.RecyclerView.LayoutManager! mLayoutManager;
+ }
+
+ public class PagerSnapHelper extends androidx.recyclerview.widget.SnapHelper {
+ ctor public PagerSnapHelper();
+ method public int[]? calculateDistanceToFinalSnap(androidx.recyclerview.widget.RecyclerView.LayoutManager, android.view.View);
+ method public android.view.View? findSnapView(androidx.recyclerview.widget.RecyclerView.LayoutManager!);
+ method public int findTargetSnapPosition(androidx.recyclerview.widget.RecyclerView.LayoutManager!, int, int);
+ }
+
+ public class RecyclerView extends android.view.ViewGroup implements androidx.core.view.NestedScrollingChild2 androidx.core.view.NestedScrollingChild3 androidx.core.view.ScrollingView {
+ ctor public RecyclerView(android.content.Context);
+ ctor public RecyclerView(android.content.Context, android.util.AttributeSet?);
+ ctor public RecyclerView(android.content.Context, android.util.AttributeSet?, int);
+ method public void addItemDecoration(androidx.recyclerview.widget.RecyclerView.ItemDecoration, int);
+ method public void addItemDecoration(androidx.recyclerview.widget.RecyclerView.ItemDecoration);
+ method public void addOnChildAttachStateChangeListener(androidx.recyclerview.widget.RecyclerView.OnChildAttachStateChangeListener);
+ method public void addOnItemTouchListener(androidx.recyclerview.widget.RecyclerView.OnItemTouchListener);
+ method public void addOnScrollListener(androidx.recyclerview.widget.RecyclerView.OnScrollListener);
+ method public void addRecyclerListener(androidx.recyclerview.widget.RecyclerView.RecyclerListener);
+ method public void clearOnChildAttachStateChangeListeners();
+ method public void clearOnScrollListeners();
+ method public int computeHorizontalScrollExtent();
+ method public int computeHorizontalScrollOffset();
+ method public int computeHorizontalScrollRange();
+ method public int computeVerticalScrollExtent();
+ method public int computeVerticalScrollOffset();
+ method public int computeVerticalScrollRange();
+ method public boolean dispatchNestedPreScroll(int, int, int[]!, int[]!, int);
+ method public boolean dispatchNestedScroll(int, int, int, int, int[]!, int);
+ method public final void dispatchNestedScroll(int, int, int, int, int[]!, int, int[]);
+ method public boolean drawChild(android.graphics.Canvas!, android.view.View!, long);
+ method public android.view.View? findChildViewUnder(float, float);
+ method public android.view.View? findContainingItemView(android.view.View);
+ method public androidx.recyclerview.widget.RecyclerView.ViewHolder? findContainingViewHolder(android.view.View);
+ method public androidx.recyclerview.widget.RecyclerView.ViewHolder? findViewHolderForAdapterPosition(int);
+ method public androidx.recyclerview.widget.RecyclerView.ViewHolder! findViewHolderForItemId(long);
+ method public androidx.recyclerview.widget.RecyclerView.ViewHolder? findViewHolderForLayoutPosition(int);
+ method @Deprecated public androidx.recyclerview.widget.RecyclerView.ViewHolder? findViewHolderForPosition(int);
+ method public boolean fling(int, int);
+ method public androidx.recyclerview.widget.RecyclerView.Adapter? getAdapter();
+ method public int getChildAdapterPosition(android.view.View);
+ method public long getChildItemId(android.view.View);
+ method public int getChildLayoutPosition(android.view.View);
+ method @Deprecated public int getChildPosition(android.view.View);
+ method public androidx.recyclerview.widget.RecyclerView.ViewHolder! getChildViewHolder(android.view.View);
+ method public androidx.recyclerview.widget.RecyclerViewAccessibilityDelegate? getCompatAccessibilityDelegate();
+ method public void getDecoratedBoundsWithMargins(android.view.View, android.graphics.Rect);
+ method public androidx.recyclerview.widget.RecyclerView.EdgeEffectFactory getEdgeEffectFactory();
+ method public androidx.recyclerview.widget.RecyclerView.ItemAnimator? getItemAnimator();
+ method public androidx.recyclerview.widget.RecyclerView.ItemDecoration getItemDecorationAt(int);
+ method public int getItemDecorationCount();
+ method public androidx.recyclerview.widget.RecyclerView.LayoutManager? getLayoutManager();
+ method public int getMaxFlingVelocity();
+ method public int getMinFlingVelocity();
+ method public androidx.recyclerview.widget.RecyclerView.OnFlingListener? getOnFlingListener();
+ method public boolean getPreserveFocusAfterLayout();
+ method public androidx.recyclerview.widget.RecyclerView.RecycledViewPool getRecycledViewPool();
+ method public int getScrollState();
+ method public boolean hasFixedSize();
+ method public boolean hasNestedScrollingParent(int);
+ method public boolean hasPendingAdapterUpdates();
+ method public void invalidateItemDecorations();
+ method public boolean isAnimating();
+ method public boolean isComputingLayout();
+ method @Deprecated public boolean isLayoutFrozen();
+ method public final boolean isLayoutSuppressed();
+ method public void nestedScrollBy(int, int);
+ method public void offsetChildrenHorizontal(@Px int);
+ method public void offsetChildrenVertical(@Px int);
+ method public void onChildAttachedToWindow(android.view.View);
+ method public void onChildDetachedFromWindow(android.view.View);
+ method public void onDraw(android.graphics.Canvas!);
+ method public void onScrollStateChanged(int);
+ method public void onScrolled(@Px int, @Px int);
+ method public void removeItemDecoration(androidx.recyclerview.widget.RecyclerView.ItemDecoration);
+ method public void removeItemDecorationAt(int);
+ method public void removeOnChildAttachStateChangeListener(androidx.recyclerview.widget.RecyclerView.OnChildAttachStateChangeListener);
+ method public void removeOnItemTouchListener(androidx.recyclerview.widget.RecyclerView.OnItemTouchListener);
+ method public void removeOnScrollListener(androidx.recyclerview.widget.RecyclerView.OnScrollListener);
+ method public void removeRecyclerListener(androidx.recyclerview.widget.RecyclerView.RecyclerListener);
+ method public void scrollToPosition(int);
+ method public void setAccessibilityDelegateCompat(androidx.recyclerview.widget.RecyclerViewAccessibilityDelegate?);
+ method public void setAdapter(androidx.recyclerview.widget.RecyclerView.Adapter?);
+ method public void setChildDrawingOrderCallback(androidx.recyclerview.widget.RecyclerView.ChildDrawingOrderCallback?);
+ method public void setEdgeEffectFactory(androidx.recyclerview.widget.RecyclerView.EdgeEffectFactory);
+ method public void setHasFixedSize(boolean);
+ method public void setItemAnimator(androidx.recyclerview.widget.RecyclerView.ItemAnimator?);
+ method public void setItemViewCacheSize(int);
+ method @Deprecated public void setLayoutFrozen(boolean);
+ method public void setLayoutManager(androidx.recyclerview.widget.RecyclerView.LayoutManager?);
+ method @Deprecated public void setLayoutTransition(android.animation.LayoutTransition!);
+ method public void setOnFlingListener(androidx.recyclerview.widget.RecyclerView.OnFlingListener?);
+ method @Deprecated public void setOnScrollListener(androidx.recyclerview.widget.RecyclerView.OnScrollListener?);
+ method public void setPreserveFocusAfterLayout(boolean);
+ method public void setRecycledViewPool(androidx.recyclerview.widget.RecyclerView.RecycledViewPool?);
+ method @Deprecated public void setRecyclerListener(androidx.recyclerview.widget.RecyclerView.RecyclerListener?);
+ method public void setScrollingTouchSlop(int);
+ method public void setViewCacheExtension(androidx.recyclerview.widget.RecyclerView.ViewCacheExtension?);
+ method public void smoothScrollBy(@Px int, @Px int);
+ method public void smoothScrollBy(@Px int, @Px int, android.view.animation.Interpolator?);
+ method public void smoothScrollBy(@Px int, @Px int, android.view.animation.Interpolator?, int);
+ method public void smoothScrollToPosition(int);
+ method public boolean startNestedScroll(int, int);
+ method public void stopNestedScroll(int);
+ method public void stopScroll();
+ method public final void suppressLayout(boolean);
+ method public void swapAdapter(androidx.recyclerview.widget.RecyclerView.Adapter?, boolean);
+ field public static final int HORIZONTAL = 0; // 0x0
+ field public static final int INVALID_TYPE = -1; // 0xffffffff
+ field public static final long NO_ID = -1L; // 0xffffffffffffffffL
+ field public static final int NO_POSITION = -1; // 0xffffffff
+ field public static final int SCROLL_STATE_DRAGGING = 1; // 0x1
+ field public static final int SCROLL_STATE_IDLE = 0; // 0x0
+ field public static final int SCROLL_STATE_SETTLING = 2; // 0x2
+ field public static final int TOUCH_SLOP_DEFAULT = 0; // 0x0
+ field public static final int TOUCH_SLOP_PAGING = 1; // 0x1
+ field public static final int UNDEFINED_DURATION = -2147483648; // 0x80000000
+ field public static final int VERTICAL = 1; // 0x1
+ }
+
+ public abstract static class RecyclerView.Adapter<VH extends androidx.recyclerview.widget.RecyclerView.ViewHolder> {
+ ctor public RecyclerView.Adapter();
+ method public final void bindViewHolder(VH, int);
+ method public final VH createViewHolder(android.view.ViewGroup, int);
+ method public int findRelativeAdapterPositionIn(androidx.recyclerview.widget.RecyclerView.Adapter<? extends androidx.recyclerview.widget.RecyclerView.ViewHolder>, androidx.recyclerview.widget.RecyclerView.ViewHolder, int);
+ method public abstract int getItemCount();
+ method public long getItemId(int);
+ method public int getItemViewType(int);
+ method public final androidx.recyclerview.widget.RecyclerView.Adapter.StateRestorationPolicy getStateRestorationPolicy();
+ method public final boolean hasObservers();
+ method public final boolean hasStableIds();
+ method public final void notifyDataSetChanged();
+ method public final void notifyItemChanged(int);
+ method public final void notifyItemChanged(int, Object?);
+ method public final void notifyItemInserted(int);
+ method public final void notifyItemMoved(int, int);
+ method public final void notifyItemRangeChanged(int, int);
+ method public final void notifyItemRangeChanged(int, int, Object?);
+ method public final void notifyItemRangeInserted(int, int);
+ method public final void notifyItemRangeRemoved(int, int);
+ method public final void notifyItemRemoved(int);
+ method public void onAttachedToRecyclerView(androidx.recyclerview.widget.RecyclerView);
+ method public abstract void onBindViewHolder(VH, int);
+ method public void onBindViewHolder(VH, int, java.util.List<java.lang.Object!>);
+ method public abstract VH onCreateViewHolder(android.view.ViewGroup, int);
+ method public void onDetachedFromRecyclerView(androidx.recyclerview.widget.RecyclerView);
+ method public boolean onFailedToRecycleView(VH);
+ method public void onViewAttachedToWindow(VH);
+ method public void onViewDetachedFromWindow(VH);
+ method public void onViewRecycled(VH);
+ method public void registerAdapterDataObserver(androidx.recyclerview.widget.RecyclerView.AdapterDataObserver);
+ method public void setHasStableIds(boolean);
+ method public void setStateRestorationPolicy(androidx.recyclerview.widget.RecyclerView.Adapter.StateRestorationPolicy);
+ method public void unregisterAdapterDataObserver(androidx.recyclerview.widget.RecyclerView.AdapterDataObserver);
+ }
+
+ public enum RecyclerView.Adapter.StateRestorationPolicy {
+ enum_constant public static final androidx.recyclerview.widget.RecyclerView.Adapter.StateRestorationPolicy ALLOW;
+ enum_constant public static final androidx.recyclerview.widget.RecyclerView.Adapter.StateRestorationPolicy PREVENT;
+ enum_constant public static final androidx.recyclerview.widget.RecyclerView.Adapter.StateRestorationPolicy PREVENT_WHEN_EMPTY;
+ }
+
+ public abstract static class RecyclerView.AdapterDataObserver {
+ ctor public RecyclerView.AdapterDataObserver();
+ method public void onChanged();
+ method public void onItemRangeChanged(int, int);
+ method public void onItemRangeChanged(int, int, Object?);
+ method public void onItemRangeInserted(int, int);
+ method public void onItemRangeMoved(int, int, int);
+ method public void onItemRangeRemoved(int, int);
+ method public void onStateRestorationPolicyChanged();
+ }
+
+ public static interface RecyclerView.ChildDrawingOrderCallback {
+ method public int onGetChildDrawingOrder(int, int);
+ }
+
+ public static class RecyclerView.EdgeEffectFactory {
+ ctor public RecyclerView.EdgeEffectFactory();
+ method protected android.widget.EdgeEffect createEdgeEffect(androidx.recyclerview.widget.RecyclerView, @androidx.recyclerview.widget.RecyclerView.EdgeEffectFactory.EdgeDirection int);
+ field public static final int DIRECTION_BOTTOM = 3; // 0x3
+ field public static final int DIRECTION_LEFT = 0; // 0x0
+ field public static final int DIRECTION_RIGHT = 2; // 0x2
+ field public static final int DIRECTION_TOP = 1; // 0x1
+ }
+
+ @IntDef({androidx.recyclerview.widget.RecyclerView.EdgeEffectFactory.DIRECTION_LEFT, androidx.recyclerview.widget.RecyclerView.EdgeEffectFactory.DIRECTION_TOP, androidx.recyclerview.widget.RecyclerView.EdgeEffectFactory.DIRECTION_RIGHT, androidx.recyclerview.widget.RecyclerView.EdgeEffectFactory.DIRECTION_BOTTOM}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface RecyclerView.EdgeEffectFactory.EdgeDirection {
+ }
+
+ public abstract static class RecyclerView.ItemAnimator {
+ ctor public RecyclerView.ItemAnimator();
+ method public abstract boolean animateAppearance(androidx.recyclerview.widget.RecyclerView.ViewHolder, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo?, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo);
+ method public abstract boolean animateChange(androidx.recyclerview.widget.RecyclerView.ViewHolder, androidx.recyclerview.widget.RecyclerView.ViewHolder, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo);
+ method public abstract boolean animateDisappearance(androidx.recyclerview.widget.RecyclerView.ViewHolder, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo?);
+ method public abstract boolean animatePersistence(androidx.recyclerview.widget.RecyclerView.ViewHolder, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo);
+ method public boolean canReuseUpdatedViewHolder(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public boolean canReuseUpdatedViewHolder(androidx.recyclerview.widget.RecyclerView.ViewHolder, java.util.List<java.lang.Object!>);
+ method public final void dispatchAnimationFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public final void dispatchAnimationStarted(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public final void dispatchAnimationsFinished();
+ method public abstract void endAnimation(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public abstract void endAnimations();
+ method public long getAddDuration();
+ method public long getChangeDuration();
+ method public long getMoveDuration();
+ method public long getRemoveDuration();
+ method public abstract boolean isRunning();
+ method public final boolean isRunning(androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemAnimatorFinishedListener?);
+ method public androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo obtainHolderInfo();
+ method public void onAnimationFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public void onAnimationStarted(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo recordPostLayoutInformation(androidx.recyclerview.widget.RecyclerView.State, androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo recordPreLayoutInformation(androidx.recyclerview.widget.RecyclerView.State, androidx.recyclerview.widget.RecyclerView.ViewHolder, @androidx.recyclerview.widget.RecyclerView.ItemAnimator.AdapterChanges int, java.util.List<java.lang.Object!>);
+ method public abstract void runPendingAnimations();
+ method public void setAddDuration(long);
+ method public void setChangeDuration(long);
+ method public void setMoveDuration(long);
+ method public void setRemoveDuration(long);
+ field public static final int FLAG_APPEARED_IN_PRE_LAYOUT = 4096; // 0x1000
+ field public static final int FLAG_CHANGED = 2; // 0x2
+ field public static final int FLAG_INVALIDATED = 4; // 0x4
+ field public static final int FLAG_MOVED = 2048; // 0x800
+ field public static final int FLAG_REMOVED = 8; // 0x8
+ }
+
+ @IntDef(flag=true, value={androidx.recyclerview.widget.RecyclerView.ItemAnimator.FLAG_CHANGED, androidx.recyclerview.widget.RecyclerView.ItemAnimator.FLAG_REMOVED, androidx.recyclerview.widget.RecyclerView.ItemAnimator.FLAG_MOVED, androidx.recyclerview.widget.RecyclerView.ItemAnimator.FLAG_INVALIDATED, androidx.recyclerview.widget.RecyclerView.ItemAnimator.FLAG_APPEARED_IN_PRE_LAYOUT}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface RecyclerView.ItemAnimator.AdapterChanges {
+ }
+
+ public static interface RecyclerView.ItemAnimator.ItemAnimatorFinishedListener {
+ method public void onAnimationsFinished();
+ }
+
+ public static class RecyclerView.ItemAnimator.ItemHolderInfo {
+ ctor public RecyclerView.ItemAnimator.ItemHolderInfo();
+ method public androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo setFrom(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo setFrom(androidx.recyclerview.widget.RecyclerView.ViewHolder, @androidx.recyclerview.widget.RecyclerView.ItemAnimator.AdapterChanges int);
+ field public int bottom;
+ field @androidx.recyclerview.widget.RecyclerView.ItemAnimator.AdapterChanges public int changeFlags;
+ field public int left;
+ field public int right;
+ field public int top;
+ }
+
+ public abstract static class RecyclerView.ItemDecoration {
+ ctor public RecyclerView.ItemDecoration();
+ method @Deprecated public void getItemOffsets(android.graphics.Rect, int, androidx.recyclerview.widget.RecyclerView);
+ method public void getItemOffsets(android.graphics.Rect, android.view.View, androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.State);
+ method public void onDraw(android.graphics.Canvas, androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.State);
+ method @Deprecated public void onDraw(android.graphics.Canvas, androidx.recyclerview.widget.RecyclerView);
+ method public void onDrawOver(android.graphics.Canvas, androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.State);
+ method @Deprecated public void onDrawOver(android.graphics.Canvas, androidx.recyclerview.widget.RecyclerView);
+ }
+
+ public abstract static class RecyclerView.LayoutManager {
+ ctor public RecyclerView.LayoutManager();
+ method public void addDisappearingView(android.view.View!);
+ method public void addDisappearingView(android.view.View!, int);
+ method public void addView(android.view.View!);
+ method public void addView(android.view.View!, int);
+ method public void assertInLayoutOrScroll(String!);
+ method public void assertNotInLayoutOrScroll(String!);
+ method public void attachView(android.view.View, int, androidx.recyclerview.widget.RecyclerView.LayoutParams!);
+ method public void attachView(android.view.View, int);
+ method public void attachView(android.view.View);
+ method public void calculateItemDecorationsForChild(android.view.View, android.graphics.Rect);
+ method public boolean canScrollHorizontally();
+ method public boolean canScrollVertically();
+ method public boolean checkLayoutParams(androidx.recyclerview.widget.RecyclerView.LayoutParams!);
+ method public static int chooseSize(int, int, int);
+ method public void collectAdjacentPrefetchPositions(int, int, androidx.recyclerview.widget.RecyclerView.State!, androidx.recyclerview.widget.RecyclerView.LayoutManager.LayoutPrefetchRegistry!);
+ method public void collectInitialPrefetchPositions(int, androidx.recyclerview.widget.RecyclerView.LayoutManager.LayoutPrefetchRegistry!);
+ method public int computeHorizontalScrollExtent(androidx.recyclerview.widget.RecyclerView.State);
+ method public int computeHorizontalScrollOffset(androidx.recyclerview.widget.RecyclerView.State);
+ method public int computeHorizontalScrollRange(androidx.recyclerview.widget.RecyclerView.State);
+ method public int computeVerticalScrollExtent(androidx.recyclerview.widget.RecyclerView.State);
+ method public int computeVerticalScrollOffset(androidx.recyclerview.widget.RecyclerView.State);
+ method public int computeVerticalScrollRange(androidx.recyclerview.widget.RecyclerView.State);
+ method public void detachAndScrapAttachedViews(androidx.recyclerview.widget.RecyclerView.Recycler);
+ method public void detachAndScrapView(android.view.View, androidx.recyclerview.widget.RecyclerView.Recycler);
+ method public void detachAndScrapViewAt(int, androidx.recyclerview.widget.RecyclerView.Recycler);
+ method public void detachView(android.view.View);
+ method public void detachViewAt(int);
+ method public void endAnimation(android.view.View!);
+ method public android.view.View? findContainingItemView(android.view.View);
+ method public android.view.View? findViewByPosition(int);
+ method public abstract androidx.recyclerview.widget.RecyclerView.LayoutParams! generateDefaultLayoutParams();
+ method public androidx.recyclerview.widget.RecyclerView.LayoutParams! generateLayoutParams(android.view.ViewGroup.LayoutParams!);
+ method public androidx.recyclerview.widget.RecyclerView.LayoutParams! generateLayoutParams(android.content.Context!, android.util.AttributeSet!);
+ method public int getBaseline();
+ method public int getBottomDecorationHeight(android.view.View);
+ method public android.view.View? getChildAt(int);
+ method public int getChildCount();
+ method @Deprecated public static int getChildMeasureSpec(int, int, int, boolean);
+ method public static int getChildMeasureSpec(int, int, int, int, boolean);
+ method public boolean getClipToPadding();
+ method public int getColumnCountForAccessibility(androidx.recyclerview.widget.RecyclerView.Recycler, androidx.recyclerview.widget.RecyclerView.State);
+ method public int getDecoratedBottom(android.view.View);
+ method public void getDecoratedBoundsWithMargins(android.view.View, android.graphics.Rect);
+ method public int getDecoratedLeft(android.view.View);
+ method public int getDecoratedMeasuredHeight(android.view.View);
+ method public int getDecoratedMeasuredWidth(android.view.View);
+ method public int getDecoratedRight(android.view.View);
+ method public int getDecoratedTop(android.view.View);
+ method public android.view.View? getFocusedChild();
+ method @Px public int getHeight();
+ method public int getHeightMode();
+ method public int getItemCount();
+ method public int getItemViewType(android.view.View);
+ method public int getLayoutDirection();
+ method public int getLeftDecorationWidth(android.view.View);
+ method @Px public int getMinimumHeight();
+ method @Px public int getMinimumWidth();
+ method @Px public int getPaddingBottom();
+ method @Px public int getPaddingEnd();
+ method @Px public int getPaddingLeft();
+ method @Px public int getPaddingRight();
+ method @Px public int getPaddingStart();
+ method @Px public int getPaddingTop();
+ method public int getPosition(android.view.View);
+ method public static androidx.recyclerview.widget.RecyclerView.LayoutManager.Properties! getProperties(android.content.Context, android.util.AttributeSet?, int, int);
+ method public int getRightDecorationWidth(android.view.View);
+ method public int getRowCountForAccessibility(androidx.recyclerview.widget.RecyclerView.Recycler, androidx.recyclerview.widget.RecyclerView.State);
+ method public int getSelectionModeForAccessibility(androidx.recyclerview.widget.RecyclerView.Recycler, androidx.recyclerview.widget.RecyclerView.State);
+ method public int getTopDecorationHeight(android.view.View);
+ method public void getTransformedBoundingBox(android.view.View, boolean, android.graphics.Rect);
+ method @Px public int getWidth();
+ method public int getWidthMode();
+ method public boolean hasFocus();
+ method public void ignoreView(android.view.View);
+ method public boolean isAttachedToWindow();
+ method public boolean isAutoMeasureEnabled();
+ method public boolean isFocused();
+ method public final boolean isItemPrefetchEnabled();
+ method public boolean isLayoutHierarchical(androidx.recyclerview.widget.RecyclerView.Recycler, androidx.recyclerview.widget.RecyclerView.State);
+ method public boolean isMeasurementCacheEnabled();
+ method public boolean isSmoothScrolling();
+ method public boolean isViewPartiallyVisible(android.view.View, boolean, boolean);
+ method public void layoutDecorated(android.view.View, int, int, int, int);
+ method public void layoutDecoratedWithMargins(android.view.View, int, int, int, int);
+ method public void measureChild(android.view.View, int, int);
+ method public void measureChildWithMargins(android.view.View, int, int);
+ method public void moveView(int, int);
+ method public void offsetChildrenHorizontal(@Px int);
+ method public void offsetChildrenVertical(@Px int);
+ method public void onAdapterChanged(androidx.recyclerview.widget.RecyclerView.Adapter?, androidx.recyclerview.widget.RecyclerView.Adapter?);
+ method public boolean onAddFocusables(androidx.recyclerview.widget.RecyclerView, java.util.ArrayList<android.view.View!>, int, int);
+ method @CallSuper public void onAttachedToWindow(androidx.recyclerview.widget.RecyclerView!);
+ method @Deprecated public void onDetachedFromWindow(androidx.recyclerview.widget.RecyclerView!);
+ method @CallSuper public void onDetachedFromWindow(androidx.recyclerview.widget.RecyclerView!, androidx.recyclerview.widget.RecyclerView.Recycler!);
+ method public android.view.View? onFocusSearchFailed(android.view.View, int, androidx.recyclerview.widget.RecyclerView.Recycler, androidx.recyclerview.widget.RecyclerView.State);
+ method public void onInitializeAccessibilityEvent(android.view.accessibility.AccessibilityEvent);
+ method public void onInitializeAccessibilityEvent(androidx.recyclerview.widget.RecyclerView.Recycler, androidx.recyclerview.widget.RecyclerView.State, android.view.accessibility.AccessibilityEvent);
+ method public void onInitializeAccessibilityNodeInfo(androidx.recyclerview.widget.RecyclerView.Recycler, androidx.recyclerview.widget.RecyclerView.State, androidx.core.view.accessibility.AccessibilityNodeInfoCompat);
+ method public void onInitializeAccessibilityNodeInfoForItem(androidx.recyclerview.widget.RecyclerView.Recycler, androidx.recyclerview.widget.RecyclerView.State, android.view.View, androidx.core.view.accessibility.AccessibilityNodeInfoCompat);
+ method public android.view.View? onInterceptFocusSearch(android.view.View, int);
+ method public void onItemsAdded(androidx.recyclerview.widget.RecyclerView, int, int);
+ method public void onItemsChanged(androidx.recyclerview.widget.RecyclerView);
+ method public void onItemsMoved(androidx.recyclerview.widget.RecyclerView, int, int, int);
+ method public void onItemsRemoved(androidx.recyclerview.widget.RecyclerView, int, int);
+ method public void onItemsUpdated(androidx.recyclerview.widget.RecyclerView, int, int);
+ method public void onItemsUpdated(androidx.recyclerview.widget.RecyclerView, int, int, Object?);
+ method public void onLayoutChildren(androidx.recyclerview.widget.RecyclerView.Recycler!, androidx.recyclerview.widget.RecyclerView.State!);
+ method public void onLayoutCompleted(androidx.recyclerview.widget.RecyclerView.State!);
+ method public void onMeasure(androidx.recyclerview.widget.RecyclerView.Recycler, androidx.recyclerview.widget.RecyclerView.State, int, int);
+ method @Deprecated public boolean onRequestChildFocus(androidx.recyclerview.widget.RecyclerView, android.view.View, android.view.View?);
+ method public boolean onRequestChildFocus(androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.State, android.view.View, android.view.View?);
+ method public void onRestoreInstanceState(android.os.Parcelable!);
+ method public android.os.Parcelable? onSaveInstanceState();
+ method public void onScrollStateChanged(int);
+ method public boolean performAccessibilityAction(androidx.recyclerview.widget.RecyclerView.Recycler, androidx.recyclerview.widget.RecyclerView.State, int, android.os.Bundle?);
+ method public boolean performAccessibilityActionForItem(androidx.recyclerview.widget.RecyclerView.Recycler, androidx.recyclerview.widget.RecyclerView.State, android.view.View, int, android.os.Bundle?);
+ method public void postOnAnimation(Runnable!);
+ method public void removeAllViews();
+ method public void removeAndRecycleAllViews(androidx.recyclerview.widget.RecyclerView.Recycler);
+ method public void removeAndRecycleView(android.view.View, androidx.recyclerview.widget.RecyclerView.Recycler);
+ method public void removeAndRecycleViewAt(int, androidx.recyclerview.widget.RecyclerView.Recycler);
+ method public boolean removeCallbacks(Runnable!);
+ method public void removeDetachedView(android.view.View);
+ method public void removeView(android.view.View!);
+ method public void removeViewAt(int);
+ method public boolean requestChildRectangleOnScreen(androidx.recyclerview.widget.RecyclerView, android.view.View, android.graphics.Rect, boolean);
+ method public boolean requestChildRectangleOnScreen(androidx.recyclerview.widget.RecyclerView, android.view.View, android.graphics.Rect, boolean, boolean);
+ method public void requestLayout();
+ method public void requestSimpleAnimationsInNextLayout();
+ method public int scrollHorizontallyBy(int, androidx.recyclerview.widget.RecyclerView.Recycler!, androidx.recyclerview.widget.RecyclerView.State!);
+ method public void scrollToPosition(int);
+ method public int scrollVerticallyBy(int, androidx.recyclerview.widget.RecyclerView.Recycler!, androidx.recyclerview.widget.RecyclerView.State!);
+ method @Deprecated public void setAutoMeasureEnabled(boolean);
+ method public final void setItemPrefetchEnabled(boolean);
+ method public void setMeasuredDimension(android.graphics.Rect!, int, int);
+ method public void setMeasuredDimension(int, int);
+ method public void setMeasurementCacheEnabled(boolean);
+ method public void smoothScrollToPosition(androidx.recyclerview.widget.RecyclerView!, androidx.recyclerview.widget.RecyclerView.State!, int);
+ method public void startSmoothScroll(androidx.recyclerview.widget.RecyclerView.SmoothScroller!);
+ method public void stopIgnoringView(android.view.View);
+ method public boolean supportsPredictiveItemAnimations();
+ }
+
+ public static interface RecyclerView.LayoutManager.LayoutPrefetchRegistry {
+ method public void addPosition(int, int);
+ }
+
+ public static class RecyclerView.LayoutManager.Properties {
+ ctor public RecyclerView.LayoutManager.Properties();
+ field public int orientation;
+ field public boolean reverseLayout;
+ field public int spanCount;
+ field public boolean stackFromEnd;
+ }
+
+ public static class RecyclerView.LayoutParams extends android.view.ViewGroup.MarginLayoutParams {
+ ctor public RecyclerView.LayoutParams(android.content.Context!, android.util.AttributeSet!);
+ ctor public RecyclerView.LayoutParams(int, int);
+ ctor public RecyclerView.LayoutParams(android.view.ViewGroup.MarginLayoutParams!);
+ ctor public RecyclerView.LayoutParams(android.view.ViewGroup.LayoutParams!);
+ ctor public RecyclerView.LayoutParams(androidx.recyclerview.widget.RecyclerView.LayoutParams!);
+ method public int getAbsoluteAdapterPosition();
+ method public int getBindingAdapterPosition();
+ method @Deprecated public int getViewAdapterPosition();
+ method public int getViewLayoutPosition();
+ method @Deprecated public int getViewPosition();
+ method public boolean isItemChanged();
+ method public boolean isItemRemoved();
+ method public boolean isViewInvalid();
+ method public boolean viewNeedsUpdate();
+ }
+
+ public static interface RecyclerView.OnChildAttachStateChangeListener {
+ method public void onChildViewAttachedToWindow(android.view.View);
+ method public void onChildViewDetachedFromWindow(android.view.View);
+ }
+
+ public abstract static class RecyclerView.OnFlingListener {
+ ctor public RecyclerView.OnFlingListener();
+ method public abstract boolean onFling(int, int);
+ }
+
+ public static interface RecyclerView.OnItemTouchListener {
+ method public boolean onInterceptTouchEvent(androidx.recyclerview.widget.RecyclerView, android.view.MotionEvent);
+ method public void onRequestDisallowInterceptTouchEvent(boolean);
+ method public void onTouchEvent(androidx.recyclerview.widget.RecyclerView, android.view.MotionEvent);
+ }
+
+ public abstract static class RecyclerView.OnScrollListener {
+ ctor public RecyclerView.OnScrollListener();
+ method public void onScrollStateChanged(androidx.recyclerview.widget.RecyclerView, int);
+ method public void onScrolled(androidx.recyclerview.widget.RecyclerView, int, int);
+ }
+
+ public static class RecyclerView.RecycledViewPool {
+ ctor public RecyclerView.RecycledViewPool();
+ method public void clear();
+ method public androidx.recyclerview.widget.RecyclerView.ViewHolder? getRecycledView(int);
+ method public int getRecycledViewCount(int);
+ method public void putRecycledView(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public void setMaxRecycledViews(int, int);
+ }
+
+ public final class RecyclerView.Recycler {
+ ctor public RecyclerView.Recycler();
+ method public void bindViewToPosition(android.view.View, int);
+ method public void clear();
+ method public int convertPreLayoutPositionToPostLayout(int);
+ method public java.util.List<androidx.recyclerview.widget.RecyclerView.ViewHolder!> getScrapList();
+ method public android.view.View getViewForPosition(int);
+ method public void recycleView(android.view.View);
+ method public void setViewCacheSize(int);
+ }
+
+ public static interface RecyclerView.RecyclerListener {
+ method public void onViewRecycled(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ }
+
+ public static class RecyclerView.SimpleOnItemTouchListener implements androidx.recyclerview.widget.RecyclerView.OnItemTouchListener {
+ ctor public RecyclerView.SimpleOnItemTouchListener();
+ method public boolean onInterceptTouchEvent(androidx.recyclerview.widget.RecyclerView, android.view.MotionEvent);
+ method public void onRequestDisallowInterceptTouchEvent(boolean);
+ method public void onTouchEvent(androidx.recyclerview.widget.RecyclerView, android.view.MotionEvent);
+ }
+
+ public abstract static class RecyclerView.SmoothScroller {
+ ctor public RecyclerView.SmoothScroller();
+ method public android.graphics.PointF? computeScrollVectorForPosition(int);
+ method public android.view.View! findViewByPosition(int);
+ method public int getChildCount();
+ method public int getChildPosition(android.view.View!);
+ method public androidx.recyclerview.widget.RecyclerView.LayoutManager? getLayoutManager();
+ method public int getTargetPosition();
+ method @Deprecated public void instantScrollToPosition(int);
+ method public boolean isPendingInitialRun();
+ method public boolean isRunning();
+ method protected void normalize(android.graphics.PointF);
+ method protected void onChildAttachedToWindow(android.view.View!);
+ method protected abstract void onSeekTargetStep(@Px int, @Px int, androidx.recyclerview.widget.RecyclerView.State, androidx.recyclerview.widget.RecyclerView.SmoothScroller.Action);
+ method protected abstract void onStart();
+ method protected abstract void onStop();
+ method protected abstract void onTargetFound(android.view.View, androidx.recyclerview.widget.RecyclerView.State, androidx.recyclerview.widget.RecyclerView.SmoothScroller.Action);
+ method public void setTargetPosition(int);
+ method protected final void stop();
+ }
+
+ public static class RecyclerView.SmoothScroller.Action {
+ ctor public RecyclerView.SmoothScroller.Action(@Px int, @Px int);
+ ctor public RecyclerView.SmoothScroller.Action(@Px int, @Px int, int);
+ ctor public RecyclerView.SmoothScroller.Action(@Px int, @Px int, int, android.view.animation.Interpolator?);
+ method public int getDuration();
+ method @Px public int getDx();
+ method @Px public int getDy();
+ method public android.view.animation.Interpolator? getInterpolator();
+ method public void jumpTo(int);
+ method public void setDuration(int);
+ method public void setDx(@Px int);
+ method public void setDy(@Px int);
+ method public void setInterpolator(android.view.animation.Interpolator?);
+ method public void update(@Px int, @Px int, int, android.view.animation.Interpolator?);
+ field public static final int UNDEFINED_DURATION = -2147483648; // 0x80000000
+ }
+
+ public static interface RecyclerView.SmoothScroller.ScrollVectorProvider {
+ method public android.graphics.PointF? computeScrollVectorForPosition(int);
+ }
+
+ public static class RecyclerView.State {
+ ctor public RecyclerView.State();
+ method public boolean didStructureChange();
+ method public <T> T! get(int);
+ method public int getItemCount();
+ method public int getRemainingScrollHorizontal();
+ method public int getRemainingScrollVertical();
+ method public int getTargetScrollPosition();
+ method public boolean hasTargetScrollPosition();
+ method public boolean isMeasuring();
+ method public boolean isPreLayout();
+ method public void put(int, Object!);
+ method public void remove(int);
+ method public boolean willRunPredictiveAnimations();
+ method public boolean willRunSimpleAnimations();
+ }
+
+ public abstract static class RecyclerView.ViewCacheExtension {
+ ctor public RecyclerView.ViewCacheExtension();
+ method public abstract android.view.View? getViewForPositionAndType(androidx.recyclerview.widget.RecyclerView.Recycler, int, int);
+ }
+
+ public abstract static class RecyclerView.ViewHolder {
+ ctor public RecyclerView.ViewHolder(android.view.View);
+ method public final int getAbsoluteAdapterPosition();
+ method @Deprecated public final int getAdapterPosition();
+ method public final androidx.recyclerview.widget.RecyclerView.Adapter<? extends androidx.recyclerview.widget.RecyclerView.ViewHolder>? getBindingAdapter();
+ method public final int getBindingAdapterPosition();
+ method public final long getItemId();
+ method public final int getItemViewType();
+ method public final int getLayoutPosition();
+ method public final int getOldPosition();
+ method @Deprecated public final int getPosition();
+ method public final boolean isRecyclable();
+ method public final void setIsRecyclable(boolean);
+ field public final android.view.View itemView;
+ }
+
+ public class RecyclerViewAccessibilityDelegate extends androidx.core.view.AccessibilityDelegateCompat {
+ ctor public RecyclerViewAccessibilityDelegate(androidx.recyclerview.widget.RecyclerView);
+ method public androidx.core.view.AccessibilityDelegateCompat getItemDelegate();
+ }
+
+ public static class RecyclerViewAccessibilityDelegate.ItemDelegate extends androidx.core.view.AccessibilityDelegateCompat {
+ ctor public RecyclerViewAccessibilityDelegate.ItemDelegate(androidx.recyclerview.widget.RecyclerViewAccessibilityDelegate);
+ }
+
+ public abstract class SimpleItemAnimator extends androidx.recyclerview.widget.RecyclerView.ItemAnimator {
+ ctor public SimpleItemAnimator();
+ method public abstract boolean animateAdd(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public boolean animateAppearance(androidx.recyclerview.widget.RecyclerView.ViewHolder, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo?, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo);
+ method public boolean animateChange(androidx.recyclerview.widget.RecyclerView.ViewHolder, androidx.recyclerview.widget.RecyclerView.ViewHolder, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo);
+ method public abstract boolean animateChange(androidx.recyclerview.widget.RecyclerView.ViewHolder!, androidx.recyclerview.widget.RecyclerView.ViewHolder!, int, int, int, int);
+ method public boolean animateDisappearance(androidx.recyclerview.widget.RecyclerView.ViewHolder, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo?);
+ method public abstract boolean animateMove(androidx.recyclerview.widget.RecyclerView.ViewHolder!, int, int, int, int);
+ method public boolean animatePersistence(androidx.recyclerview.widget.RecyclerView.ViewHolder, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo);
+ method public abstract boolean animateRemove(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public final void dispatchAddFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public final void dispatchAddStarting(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public final void dispatchChangeFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder!, boolean);
+ method public final void dispatchChangeStarting(androidx.recyclerview.widget.RecyclerView.ViewHolder!, boolean);
+ method public final void dispatchMoveFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public final void dispatchMoveStarting(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public final void dispatchRemoveFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public final void dispatchRemoveStarting(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public boolean getSupportsChangeAnimations();
+ method public void onAddFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public void onAddStarting(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public void onChangeFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder!, boolean);
+ method public void onChangeStarting(androidx.recyclerview.widget.RecyclerView.ViewHolder!, boolean);
+ method public void onMoveFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public void onMoveStarting(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public void onRemoveFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public void onRemoveStarting(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public void setSupportsChangeAnimations(boolean);
+ }
+
+ public abstract class SnapHelper extends androidx.recyclerview.widget.RecyclerView.OnFlingListener {
+ ctor public SnapHelper();
+ method public void attachToRecyclerView(androidx.recyclerview.widget.RecyclerView?) throws java.lang.IllegalStateException;
+ method public abstract int[]? calculateDistanceToFinalSnap(androidx.recyclerview.widget.RecyclerView.LayoutManager, android.view.View);
+ method public int[]! calculateScrollDistance(int, int);
+ method protected androidx.recyclerview.widget.RecyclerView.SmoothScroller? createScroller(androidx.recyclerview.widget.RecyclerView.LayoutManager);
+ method @Deprecated protected androidx.recyclerview.widget.LinearSmoothScroller? createSnapScroller(androidx.recyclerview.widget.RecyclerView.LayoutManager);
+ method public abstract android.view.View? findSnapView(androidx.recyclerview.widget.RecyclerView.LayoutManager!);
+ method public abstract int findTargetSnapPosition(androidx.recyclerview.widget.RecyclerView.LayoutManager!, int, int);
+ method public boolean onFling(int, int);
+ }
+
+ public class SortedList<T> {
+ ctor public SortedList(Class<T!>, androidx.recyclerview.widget.SortedList.Callback<T!>);
+ ctor public SortedList(Class<T!>, androidx.recyclerview.widget.SortedList.Callback<T!>, int);
+ method public int add(T!);
+ method public void addAll(T![], boolean);
+ method public void addAll(T!...);
+ method public void addAll(java.util.Collection<T!>);
+ method public void beginBatchedUpdates();
+ method public void clear();
+ method public void endBatchedUpdates();
+ method public T! get(int) throws java.lang.IndexOutOfBoundsException;
+ method public int indexOf(T!);
+ method public void recalculatePositionOfItemAt(int);
+ method public boolean remove(T!);
+ method public T! removeItemAt(int);
+ method public void replaceAll(T![], boolean);
+ method public void replaceAll(T!...);
+ method public void replaceAll(java.util.Collection<T!>);
+ method public int size();
+ method public void updateItemAt(int, T!);
+ field public static final int INVALID_POSITION = -1; // 0xffffffff
+ }
+
+ public static class SortedList.BatchedCallback<T2> extends androidx.recyclerview.widget.SortedList.Callback<T2> {
+ ctor public SortedList.BatchedCallback(androidx.recyclerview.widget.SortedList.Callback<T2!>!);
+ method public boolean areContentsTheSame(T2!, T2!);
+ method public boolean areItemsTheSame(T2!, T2!);
+ method public int compare(T2!, T2!);
+ method public void dispatchLastEvent();
+ method public void onChanged(int, int);
+ method public void onInserted(int, int);
+ method public void onMoved(int, int);
+ method public void onRemoved(int, int);
+ }
+
+ public abstract static class SortedList.Callback<T2> implements java.util.Comparator<T2> androidx.recyclerview.widget.ListUpdateCallback {
+ ctor public SortedList.Callback();
+ method public abstract boolean areContentsTheSame(T2!, T2!);
+ method public abstract boolean areItemsTheSame(T2!, T2!);
+ method public abstract int compare(T2!, T2!);
+ method public Object? getChangePayload(T2!, T2!);
+ method public abstract void onChanged(int, int);
+ method public void onChanged(int, int, Object!);
+ }
+
+ public abstract class SortedListAdapterCallback<T2> extends androidx.recyclerview.widget.SortedList.Callback<T2> {
+ ctor public SortedListAdapterCallback(androidx.recyclerview.widget.RecyclerView.Adapter!);
+ method public void onChanged(int, int);
+ method public void onInserted(int, int);
+ method public void onMoved(int, int);
+ method public void onRemoved(int, int);
+ }
+
+ public class StaggeredGridLayoutManager extends androidx.recyclerview.widget.RecyclerView.LayoutManager implements androidx.recyclerview.widget.RecyclerView.SmoothScroller.ScrollVectorProvider {
+ ctor public StaggeredGridLayoutManager(android.content.Context!, android.util.AttributeSet!, int, int);
+ ctor public StaggeredGridLayoutManager(int, int);
+ method public android.graphics.PointF! computeScrollVectorForPosition(int);
+ method public int[]! findFirstCompletelyVisibleItemPositions(int[]!);
+ method public int[]! findFirstVisibleItemPositions(int[]!);
+ method public int[]! findLastCompletelyVisibleItemPositions(int[]!);
+ method public int[]! findLastVisibleItemPositions(int[]!);
+ method public androidx.recyclerview.widget.RecyclerView.LayoutParams! generateDefaultLayoutParams();
+ method public int getGapStrategy();
+ method public int getOrientation();
+ method public boolean getReverseLayout();
+ method public int getSpanCount();
+ method public void invalidateSpanAssignments();
+ method public void scrollToPositionWithOffset(int, int);
+ method public void setGapStrategy(int);
+ method public void setOrientation(int);
+ method public void setReverseLayout(boolean);
+ method public void setSpanCount(int);
+ field @Deprecated public static final int GAP_HANDLING_LAZY = 1; // 0x1
+ field public static final int GAP_HANDLING_MOVE_ITEMS_BETWEEN_SPANS = 2; // 0x2
+ field public static final int GAP_HANDLING_NONE = 0; // 0x0
+ field public static final int HORIZONTAL = 0; // 0x0
+ field public static final int VERTICAL = 1; // 0x1
+ }
+
+ public static class StaggeredGridLayoutManager.LayoutParams extends androidx.recyclerview.widget.RecyclerView.LayoutParams {
+ ctor public StaggeredGridLayoutManager.LayoutParams(android.content.Context!, android.util.AttributeSet!);
+ ctor public StaggeredGridLayoutManager.LayoutParams(int, int);
+ ctor public StaggeredGridLayoutManager.LayoutParams(android.view.ViewGroup.MarginLayoutParams!);
+ ctor public StaggeredGridLayoutManager.LayoutParams(android.view.ViewGroup.LayoutParams!);
+ ctor public StaggeredGridLayoutManager.LayoutParams(androidx.recyclerview.widget.RecyclerView.LayoutParams!);
+ method public final int getSpanIndex();
+ method public boolean isFullSpan();
+ method public void setFullSpan(boolean);
+ field public static final int INVALID_SPAN_ID = -1; // 0xffffffff
+ }
+
+}
+
diff --git a/recyclerview/recyclerview/api/public_plus_experimental_1.2.0-beta01.txt b/recyclerview/recyclerview/api/public_plus_experimental_1.2.0-beta01.txt
new file mode 100644
index 0000000..e1ffd69
--- /dev/null
+++ b/recyclerview/recyclerview/api/public_plus_experimental_1.2.0-beta01.txt
@@ -0,0 +1,1091 @@
+// Signature format: 4.0
+package androidx.recyclerview.widget {
+
+ public final class AdapterListUpdateCallback implements androidx.recyclerview.widget.ListUpdateCallback {
+ ctor public AdapterListUpdateCallback(androidx.recyclerview.widget.RecyclerView.Adapter);
+ method public void onChanged(int, int, Object!);
+ method public void onInserted(int, int);
+ method public void onMoved(int, int);
+ method public void onRemoved(int, int);
+ }
+
+ public final class AsyncDifferConfig<T> {
+ method public java.util.concurrent.Executor getBackgroundThreadExecutor();
+ method public androidx.recyclerview.widget.DiffUtil.ItemCallback<T!> getDiffCallback();
+ }
+
+ public static final class AsyncDifferConfig.Builder<T> {
+ ctor public AsyncDifferConfig.Builder(androidx.recyclerview.widget.DiffUtil.ItemCallback<T!>);
+ method public androidx.recyclerview.widget.AsyncDifferConfig<T!> build();
+ method public androidx.recyclerview.widget.AsyncDifferConfig.Builder<T!> setBackgroundThreadExecutor(java.util.concurrent.Executor!);
+ }
+
+ public class AsyncListDiffer<T> {
+ ctor public AsyncListDiffer(androidx.recyclerview.widget.RecyclerView.Adapter, androidx.recyclerview.widget.DiffUtil.ItemCallback<T!>);
+ ctor public AsyncListDiffer(androidx.recyclerview.widget.ListUpdateCallback, androidx.recyclerview.widget.AsyncDifferConfig<T!>);
+ method public void addListListener(androidx.recyclerview.widget.AsyncListDiffer.ListListener<T!>);
+ method public java.util.List<T!> getCurrentList();
+ method public void removeListListener(androidx.recyclerview.widget.AsyncListDiffer.ListListener<T!>);
+ method public void submitList(java.util.List<T!>?);
+ method public void submitList(java.util.List<T!>?, Runnable?);
+ }
+
+ public static interface AsyncListDiffer.ListListener<T> {
+ method public void onCurrentListChanged(java.util.List<T!>, java.util.List<T!>);
+ }
+
+ public class AsyncListUtil<T> {
+ ctor public AsyncListUtil(Class<T!>, int, androidx.recyclerview.widget.AsyncListUtil.DataCallback<T!>, androidx.recyclerview.widget.AsyncListUtil.ViewCallback);
+ method public T? getItem(int);
+ method public int getItemCount();
+ method public void onRangeChanged();
+ method public void refresh();
+ }
+
+ public abstract static class AsyncListUtil.DataCallback<T> {
+ ctor public AsyncListUtil.DataCallback();
+ method @WorkerThread public abstract void fillData(T![], int, int);
+ method @WorkerThread public int getMaxCachedTiles();
+ method @WorkerThread public void recycleData(T![], int);
+ method @WorkerThread public abstract int refreshData();
+ }
+
+ public abstract static class AsyncListUtil.ViewCallback {
+ ctor public AsyncListUtil.ViewCallback();
+ method @UiThread public void extendRangeInto(int[], int[], int);
+ method @UiThread public abstract void getItemRangeInto(int[]);
+ method @UiThread public abstract void onDataRefresh();
+ method @UiThread public abstract void onItemLoaded(int);
+ field public static final int HINT_SCROLL_ASC = 2; // 0x2
+ field public static final int HINT_SCROLL_DESC = 1; // 0x1
+ field public static final int HINT_SCROLL_NONE = 0; // 0x0
+ }
+
+ public class BatchingListUpdateCallback implements androidx.recyclerview.widget.ListUpdateCallback {
+ ctor public BatchingListUpdateCallback(androidx.recyclerview.widget.ListUpdateCallback);
+ method public void dispatchLastEvent();
+ method public void onChanged(int, int, Object!);
+ method public void onInserted(int, int);
+ method public void onMoved(int, int);
+ method public void onRemoved(int, int);
+ }
+
+ public final class ConcatAdapter extends androidx.recyclerview.widget.RecyclerView.Adapter<androidx.recyclerview.widget.RecyclerView.ViewHolder> {
+ ctor @java.lang.SafeVarargs public ConcatAdapter(androidx.recyclerview.widget.RecyclerView.Adapter<? extends androidx.recyclerview.widget.RecyclerView.ViewHolder>!...);
+ ctor @java.lang.SafeVarargs public ConcatAdapter(androidx.recyclerview.widget.ConcatAdapter.Config, androidx.recyclerview.widget.RecyclerView.Adapter<? extends androidx.recyclerview.widget.RecyclerView.ViewHolder>!...);
+ ctor public ConcatAdapter(java.util.List<? extends androidx.recyclerview.widget.RecyclerView.Adapter<? extends androidx.recyclerview.widget.RecyclerView.ViewHolder>>);
+ ctor public ConcatAdapter(androidx.recyclerview.widget.ConcatAdapter.Config, java.util.List<? extends androidx.recyclerview.widget.RecyclerView.Adapter<? extends androidx.recyclerview.widget.RecyclerView.ViewHolder>>);
+ method public boolean addAdapter(androidx.recyclerview.widget.RecyclerView.Adapter<? extends androidx.recyclerview.widget.RecyclerView.ViewHolder>);
+ method public boolean addAdapter(int, androidx.recyclerview.widget.RecyclerView.Adapter<? extends androidx.recyclerview.widget.RecyclerView.ViewHolder>);
+ method public java.util.List<? extends androidx.recyclerview.widget.RecyclerView.Adapter<? extends androidx.recyclerview.widget.RecyclerView.ViewHolder>> getAdapters();
+ method public int getItemCount();
+ method public void onBindViewHolder(androidx.recyclerview.widget.RecyclerView.ViewHolder, int);
+ method public androidx.recyclerview.widget.RecyclerView.ViewHolder onCreateViewHolder(android.view.ViewGroup, int);
+ method public boolean onFailedToRecycleView(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public void onViewAttachedToWindow(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public void onViewDetachedFromWindow(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public void onViewRecycled(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public boolean removeAdapter(androidx.recyclerview.widget.RecyclerView.Adapter<? extends androidx.recyclerview.widget.RecyclerView.ViewHolder>);
+ }
+
+ public static final class ConcatAdapter.Config {
+ field public static final androidx.recyclerview.widget.ConcatAdapter.Config DEFAULT;
+ field public final boolean isolateViewTypes;
+ field public final androidx.recyclerview.widget.ConcatAdapter.Config.StableIdMode stableIdMode;
+ }
+
+ public static final class ConcatAdapter.Config.Builder {
+ ctor public ConcatAdapter.Config.Builder();
+ method public androidx.recyclerview.widget.ConcatAdapter.Config build();
+ method public androidx.recyclerview.widget.ConcatAdapter.Config.Builder setIsolateViewTypes(boolean);
+ method public androidx.recyclerview.widget.ConcatAdapter.Config.Builder setStableIdMode(androidx.recyclerview.widget.ConcatAdapter.Config.StableIdMode);
+ }
+
+ public enum ConcatAdapter.Config.StableIdMode {
+ enum_constant public static final androidx.recyclerview.widget.ConcatAdapter.Config.StableIdMode ISOLATED_STABLE_IDS;
+ enum_constant public static final androidx.recyclerview.widget.ConcatAdapter.Config.StableIdMode NO_STABLE_IDS;
+ enum_constant public static final androidx.recyclerview.widget.ConcatAdapter.Config.StableIdMode SHARED_STABLE_IDS;
+ }
+
+ public class DefaultItemAnimator extends androidx.recyclerview.widget.SimpleItemAnimator {
+ ctor public DefaultItemAnimator();
+ method public boolean animateAdd(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public boolean animateChange(androidx.recyclerview.widget.RecyclerView.ViewHolder!, androidx.recyclerview.widget.RecyclerView.ViewHolder!, int, int, int, int);
+ method public boolean animateMove(androidx.recyclerview.widget.RecyclerView.ViewHolder!, int, int, int, int);
+ method public boolean animateRemove(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public void endAnimation(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public void endAnimations();
+ method public boolean isRunning();
+ method public void runPendingAnimations();
+ }
+
+ public class DiffUtil {
+ method public static androidx.recyclerview.widget.DiffUtil.DiffResult calculateDiff(androidx.recyclerview.widget.DiffUtil.Callback);
+ method public static androidx.recyclerview.widget.DiffUtil.DiffResult calculateDiff(androidx.recyclerview.widget.DiffUtil.Callback, boolean);
+ }
+
+ public abstract static class DiffUtil.Callback {
+ ctor public DiffUtil.Callback();
+ method public abstract boolean areContentsTheSame(int, int);
+ method public abstract boolean areItemsTheSame(int, int);
+ method public Object? getChangePayload(int, int);
+ method public abstract int getNewListSize();
+ method public abstract int getOldListSize();
+ }
+
+ public static class DiffUtil.DiffResult {
+ method public int convertNewPositionToOld(@IntRange(from=0) int);
+ method public int convertOldPositionToNew(@IntRange(from=0) int);
+ method public void dispatchUpdatesTo(androidx.recyclerview.widget.RecyclerView.Adapter);
+ method public void dispatchUpdatesTo(androidx.recyclerview.widget.ListUpdateCallback);
+ field public static final int NO_POSITION = -1; // 0xffffffff
+ }
+
+ public abstract static class DiffUtil.ItemCallback<T> {
+ ctor public DiffUtil.ItemCallback();
+ method public abstract boolean areContentsTheSame(T, T);
+ method public abstract boolean areItemsTheSame(T, T);
+ method public Object? getChangePayload(T, T);
+ }
+
+ public class DividerItemDecoration extends androidx.recyclerview.widget.RecyclerView.ItemDecoration {
+ ctor public DividerItemDecoration(android.content.Context!, int);
+ method public android.graphics.drawable.Drawable? getDrawable();
+ method public void setDrawable(android.graphics.drawable.Drawable);
+ method public void setOrientation(int);
+ field public static final int HORIZONTAL = 0; // 0x0
+ field public static final int VERTICAL = 1; // 0x1
+ }
+
+ public class GridLayoutManager extends androidx.recyclerview.widget.LinearLayoutManager {
+ ctor public GridLayoutManager(android.content.Context!, android.util.AttributeSet!, int, int);
+ ctor public GridLayoutManager(android.content.Context!, int);
+ ctor public GridLayoutManager(android.content.Context!, int, int, boolean);
+ method public int getSpanCount();
+ method public androidx.recyclerview.widget.GridLayoutManager.SpanSizeLookup! getSpanSizeLookup();
+ method public boolean isUsingSpansToEstimateScrollbarDimensions();
+ method public void setSpanCount(int);
+ method public void setSpanSizeLookup(androidx.recyclerview.widget.GridLayoutManager.SpanSizeLookup!);
+ method public void setUsingSpansToEstimateScrollbarDimensions(boolean);
+ field public static final int DEFAULT_SPAN_COUNT = -1; // 0xffffffff
+ }
+
+ public static final class GridLayoutManager.DefaultSpanSizeLookup extends androidx.recyclerview.widget.GridLayoutManager.SpanSizeLookup {
+ ctor public GridLayoutManager.DefaultSpanSizeLookup();
+ method public int getSpanSize(int);
+ }
+
+ public static class GridLayoutManager.LayoutParams extends androidx.recyclerview.widget.RecyclerView.LayoutParams {
+ ctor public GridLayoutManager.LayoutParams(android.content.Context!, android.util.AttributeSet!);
+ ctor public GridLayoutManager.LayoutParams(int, int);
+ ctor public GridLayoutManager.LayoutParams(android.view.ViewGroup.MarginLayoutParams!);
+ ctor public GridLayoutManager.LayoutParams(android.view.ViewGroup.LayoutParams!);
+ ctor public GridLayoutManager.LayoutParams(androidx.recyclerview.widget.RecyclerView.LayoutParams!);
+ method public int getSpanIndex();
+ method public int getSpanSize();
+ field public static final int INVALID_SPAN_ID = -1; // 0xffffffff
+ }
+
+ public abstract static class GridLayoutManager.SpanSizeLookup {
+ ctor public GridLayoutManager.SpanSizeLookup();
+ method public int getSpanGroupIndex(int, int);
+ method public int getSpanIndex(int, int);
+ method public abstract int getSpanSize(int);
+ method public void invalidateSpanGroupIndexCache();
+ method public void invalidateSpanIndexCache();
+ method public boolean isSpanGroupIndexCacheEnabled();
+ method public boolean isSpanIndexCacheEnabled();
+ method public void setSpanGroupIndexCacheEnabled(boolean);
+ method public void setSpanIndexCacheEnabled(boolean);
+ }
+
+ public class ItemTouchHelper extends androidx.recyclerview.widget.RecyclerView.ItemDecoration implements androidx.recyclerview.widget.RecyclerView.OnChildAttachStateChangeListener {
+ ctor public ItemTouchHelper(androidx.recyclerview.widget.ItemTouchHelper.Callback);
+ method public void attachToRecyclerView(androidx.recyclerview.widget.RecyclerView?);
+ method public void onChildViewAttachedToWindow(android.view.View);
+ method public void onChildViewDetachedFromWindow(android.view.View);
+ method public void startDrag(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public void startSwipe(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ field public static final int ACTION_STATE_DRAG = 2; // 0x2
+ field public static final int ACTION_STATE_IDLE = 0; // 0x0
+ field public static final int ACTION_STATE_SWIPE = 1; // 0x1
+ field public static final int ANIMATION_TYPE_DRAG = 8; // 0x8
+ field public static final int ANIMATION_TYPE_SWIPE_CANCEL = 4; // 0x4
+ field public static final int ANIMATION_TYPE_SWIPE_SUCCESS = 2; // 0x2
+ field public static final int DOWN = 2; // 0x2
+ field public static final int END = 32; // 0x20
+ field public static final int LEFT = 4; // 0x4
+ field public static final int RIGHT = 8; // 0x8
+ field public static final int START = 16; // 0x10
+ field public static final int UP = 1; // 0x1
+ }
+
+ public abstract static class ItemTouchHelper.Callback {
+ ctor public ItemTouchHelper.Callback();
+ method public boolean canDropOver(androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.ViewHolder, androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public androidx.recyclerview.widget.RecyclerView.ViewHolder! chooseDropTarget(androidx.recyclerview.widget.RecyclerView.ViewHolder, java.util.List<androidx.recyclerview.widget.RecyclerView.ViewHolder!>, int, int);
+ method public void clearView(androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public int convertToAbsoluteDirection(int, int);
+ method public static int convertToRelativeDirection(int, int);
+ method public long getAnimationDuration(androidx.recyclerview.widget.RecyclerView, int, float, float);
+ method public int getBoundingBoxMargin();
+ method public static androidx.recyclerview.widget.ItemTouchUIUtil getDefaultUIUtil();
+ method public float getMoveThreshold(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public abstract int getMovementFlags(androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public float getSwipeEscapeVelocity(float);
+ method public float getSwipeThreshold(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public float getSwipeVelocityThreshold(float);
+ method public int interpolateOutOfBoundsScroll(androidx.recyclerview.widget.RecyclerView, int, int, int, long);
+ method public boolean isItemViewSwipeEnabled();
+ method public boolean isLongPressDragEnabled();
+ method public static int makeFlag(int, int);
+ method public static int makeMovementFlags(int, int);
+ method public void onChildDraw(android.graphics.Canvas, androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.ViewHolder, float, float, int, boolean);
+ method public void onChildDrawOver(android.graphics.Canvas, androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.ViewHolder!, float, float, int, boolean);
+ method public abstract boolean onMove(androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.ViewHolder, androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public void onMoved(androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.ViewHolder, int, androidx.recyclerview.widget.RecyclerView.ViewHolder, int, int, int);
+ method public void onSelectedChanged(androidx.recyclerview.widget.RecyclerView.ViewHolder?, int);
+ method public abstract void onSwiped(androidx.recyclerview.widget.RecyclerView.ViewHolder, int);
+ field public static final int DEFAULT_DRAG_ANIMATION_DURATION = 200; // 0xc8
+ field public static final int DEFAULT_SWIPE_ANIMATION_DURATION = 250; // 0xfa
+ }
+
+ public abstract static class ItemTouchHelper.SimpleCallback extends androidx.recyclerview.widget.ItemTouchHelper.Callback {
+ ctor public ItemTouchHelper.SimpleCallback(int, int);
+ method public int getDragDirs(androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public int getMovementFlags(androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public int getSwipeDirs(androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public void setDefaultDragDirs(int);
+ method public void setDefaultSwipeDirs(int);
+ }
+
+ public static interface ItemTouchHelper.ViewDropHandler {
+ method public void prepareForDrop(android.view.View, android.view.View, int, int);
+ }
+
+ public interface ItemTouchUIUtil {
+ method public void clearView(android.view.View!);
+ method public void onDraw(android.graphics.Canvas!, androidx.recyclerview.widget.RecyclerView!, android.view.View!, float, float, int, boolean);
+ method public void onDrawOver(android.graphics.Canvas!, androidx.recyclerview.widget.RecyclerView!, android.view.View!, float, float, int, boolean);
+ method public void onSelected(android.view.View!);
+ }
+
+ public class LinearLayoutManager extends androidx.recyclerview.widget.RecyclerView.LayoutManager implements androidx.recyclerview.widget.ItemTouchHelper.ViewDropHandler androidx.recyclerview.widget.RecyclerView.SmoothScroller.ScrollVectorProvider {
+ ctor public LinearLayoutManager(android.content.Context!);
+ ctor public LinearLayoutManager(android.content.Context!, int, boolean);
+ ctor public LinearLayoutManager(android.content.Context!, android.util.AttributeSet!, int, int);
+ method protected void calculateExtraLayoutSpace(androidx.recyclerview.widget.RecyclerView.State, int[]);
+ method public android.graphics.PointF! computeScrollVectorForPosition(int);
+ method public int findFirstCompletelyVisibleItemPosition();
+ method public int findFirstVisibleItemPosition();
+ method public int findLastCompletelyVisibleItemPosition();
+ method public int findLastVisibleItemPosition();
+ method public androidx.recyclerview.widget.RecyclerView.LayoutParams! generateDefaultLayoutParams();
+ method @Deprecated protected int getExtraLayoutSpace(androidx.recyclerview.widget.RecyclerView.State!);
+ method public int getInitialPrefetchItemCount();
+ method public int getOrientation();
+ method public boolean getRecycleChildrenOnDetach();
+ method public boolean getReverseLayout();
+ method public boolean getStackFromEnd();
+ method protected boolean isLayoutRTL();
+ method public boolean isSmoothScrollbarEnabled();
+ method public void prepareForDrop(android.view.View, android.view.View, int, int);
+ method public void scrollToPositionWithOffset(int, int);
+ method public void setInitialPrefetchItemCount(int);
+ method public void setOrientation(int);
+ method public void setRecycleChildrenOnDetach(boolean);
+ method public void setReverseLayout(boolean);
+ method public void setSmoothScrollbarEnabled(boolean);
+ method public void setStackFromEnd(boolean);
+ field public static final int HORIZONTAL = 0; // 0x0
+ field public static final int INVALID_OFFSET = -2147483648; // 0x80000000
+ field public static final int VERTICAL = 1; // 0x1
+ }
+
+ protected static class LinearLayoutManager.LayoutChunkResult {
+ ctor protected LinearLayoutManager.LayoutChunkResult();
+ field public int mConsumed;
+ field public boolean mFinished;
+ field public boolean mFocusable;
+ field public boolean mIgnoreConsumed;
+ }
+
+ public class LinearSmoothScroller extends androidx.recyclerview.widget.RecyclerView.SmoothScroller {
+ ctor public LinearSmoothScroller(android.content.Context!);
+ method public int calculateDtToFit(int, int, int, int, int);
+ method public int calculateDxToMakeVisible(android.view.View!, int);
+ method public int calculateDyToMakeVisible(android.view.View!, int);
+ method protected float calculateSpeedPerPixel(android.util.DisplayMetrics!);
+ method protected int calculateTimeForDeceleration(int);
+ method protected int calculateTimeForScrolling(int);
+ method protected int getHorizontalSnapPreference();
+ method protected int getVerticalSnapPreference();
+ method protected void onSeekTargetStep(int, int, androidx.recyclerview.widget.RecyclerView.State!, androidx.recyclerview.widget.RecyclerView.SmoothScroller.Action!);
+ method protected void onStart();
+ method protected void onStop();
+ method protected void onTargetFound(android.view.View!, androidx.recyclerview.widget.RecyclerView.State!, androidx.recyclerview.widget.RecyclerView.SmoothScroller.Action!);
+ method protected void updateActionForInterimTarget(androidx.recyclerview.widget.RecyclerView.SmoothScroller.Action!);
+ field public static final int SNAP_TO_ANY = 0; // 0x0
+ field public static final int SNAP_TO_END = 1; // 0x1
+ field public static final int SNAP_TO_START = -1; // 0xffffffff
+ field protected final android.view.animation.DecelerateInterpolator! mDecelerateInterpolator;
+ field protected int mInterimTargetDx;
+ field protected int mInterimTargetDy;
+ field protected final android.view.animation.LinearInterpolator! mLinearInterpolator;
+ field protected android.graphics.PointF! mTargetVector;
+ }
+
+ public class LinearSnapHelper extends androidx.recyclerview.widget.SnapHelper {
+ ctor public LinearSnapHelper();
+ method public int[]! calculateDistanceToFinalSnap(androidx.recyclerview.widget.RecyclerView.LayoutManager, android.view.View);
+ method public android.view.View! findSnapView(androidx.recyclerview.widget.RecyclerView.LayoutManager!);
+ method public int findTargetSnapPosition(androidx.recyclerview.widget.RecyclerView.LayoutManager!, int, int);
+ }
+
+ public abstract class ListAdapter<T, VH extends androidx.recyclerview.widget.RecyclerView.ViewHolder> extends androidx.recyclerview.widget.RecyclerView.Adapter<VH> {
+ ctor protected ListAdapter(androidx.recyclerview.widget.DiffUtil.ItemCallback<T!>);
+ ctor protected ListAdapter(androidx.recyclerview.widget.AsyncDifferConfig<T!>);
+ method public java.util.List<T!> getCurrentList();
+ method protected T! getItem(int);
+ method public int getItemCount();
+ method public void onCurrentListChanged(java.util.List<T!>, java.util.List<T!>);
+ method public void submitList(java.util.List<T!>?);
+ method public void submitList(java.util.List<T!>?, Runnable?);
+ }
+
+ public interface ListUpdateCallback {
+ method public void onChanged(int, int, Object?);
+ method public void onInserted(int, int);
+ method public void onMoved(int, int);
+ method public void onRemoved(int, int);
+ }
+
+ public abstract class OrientationHelper {
+ method public static androidx.recyclerview.widget.OrientationHelper! createHorizontalHelper(androidx.recyclerview.widget.RecyclerView.LayoutManager!);
+ method public static androidx.recyclerview.widget.OrientationHelper! createOrientationHelper(androidx.recyclerview.widget.RecyclerView.LayoutManager!, int);
+ method public static androidx.recyclerview.widget.OrientationHelper! createVerticalHelper(androidx.recyclerview.widget.RecyclerView.LayoutManager!);
+ method public abstract int getDecoratedEnd(android.view.View!);
+ method public abstract int getDecoratedMeasurement(android.view.View!);
+ method public abstract int getDecoratedMeasurementInOther(android.view.View!);
+ method public abstract int getDecoratedStart(android.view.View!);
+ method public abstract int getEnd();
+ method public abstract int getEndAfterPadding();
+ method public abstract int getEndPadding();
+ method public androidx.recyclerview.widget.RecyclerView.LayoutManager! getLayoutManager();
+ method public abstract int getMode();
+ method public abstract int getModeInOther();
+ method public abstract int getStartAfterPadding();
+ method public abstract int getTotalSpace();
+ method public int getTotalSpaceChange();
+ method public abstract int getTransformedEndWithDecoration(android.view.View!);
+ method public abstract int getTransformedStartWithDecoration(android.view.View!);
+ method public abstract void offsetChild(android.view.View!, int);
+ method public abstract void offsetChildren(int);
+ method public void onLayoutComplete();
+ field public static final int HORIZONTAL = 0; // 0x0
+ field public static final int VERTICAL = 1; // 0x1
+ field protected final androidx.recyclerview.widget.RecyclerView.LayoutManager! mLayoutManager;
+ }
+
+ public class PagerSnapHelper extends androidx.recyclerview.widget.SnapHelper {
+ ctor public PagerSnapHelper();
+ method public int[]? calculateDistanceToFinalSnap(androidx.recyclerview.widget.RecyclerView.LayoutManager, android.view.View);
+ method public android.view.View? findSnapView(androidx.recyclerview.widget.RecyclerView.LayoutManager!);
+ method public int findTargetSnapPosition(androidx.recyclerview.widget.RecyclerView.LayoutManager!, int, int);
+ }
+
+ public class RecyclerView extends android.view.ViewGroup implements androidx.core.view.NestedScrollingChild2 androidx.core.view.NestedScrollingChild3 androidx.core.view.ScrollingView {
+ ctor public RecyclerView(android.content.Context);
+ ctor public RecyclerView(android.content.Context, android.util.AttributeSet?);
+ ctor public RecyclerView(android.content.Context, android.util.AttributeSet?, int);
+ method public void addItemDecoration(androidx.recyclerview.widget.RecyclerView.ItemDecoration, int);
+ method public void addItemDecoration(androidx.recyclerview.widget.RecyclerView.ItemDecoration);
+ method public void addOnChildAttachStateChangeListener(androidx.recyclerview.widget.RecyclerView.OnChildAttachStateChangeListener);
+ method public void addOnItemTouchListener(androidx.recyclerview.widget.RecyclerView.OnItemTouchListener);
+ method public void addOnScrollListener(androidx.recyclerview.widget.RecyclerView.OnScrollListener);
+ method public void addRecyclerListener(androidx.recyclerview.widget.RecyclerView.RecyclerListener);
+ method public void clearOnChildAttachStateChangeListeners();
+ method public void clearOnScrollListeners();
+ method public int computeHorizontalScrollExtent();
+ method public int computeHorizontalScrollOffset();
+ method public int computeHorizontalScrollRange();
+ method public int computeVerticalScrollExtent();
+ method public int computeVerticalScrollOffset();
+ method public int computeVerticalScrollRange();
+ method public boolean dispatchNestedPreScroll(int, int, int[]!, int[]!, int);
+ method public boolean dispatchNestedScroll(int, int, int, int, int[]!, int);
+ method public final void dispatchNestedScroll(int, int, int, int, int[]!, int, int[]);
+ method public boolean drawChild(android.graphics.Canvas!, android.view.View!, long);
+ method public android.view.View? findChildViewUnder(float, float);
+ method public android.view.View? findContainingItemView(android.view.View);
+ method public androidx.recyclerview.widget.RecyclerView.ViewHolder? findContainingViewHolder(android.view.View);
+ method public androidx.recyclerview.widget.RecyclerView.ViewHolder? findViewHolderForAdapterPosition(int);
+ method public androidx.recyclerview.widget.RecyclerView.ViewHolder! findViewHolderForItemId(long);
+ method public androidx.recyclerview.widget.RecyclerView.ViewHolder? findViewHolderForLayoutPosition(int);
+ method @Deprecated public androidx.recyclerview.widget.RecyclerView.ViewHolder? findViewHolderForPosition(int);
+ method public boolean fling(int, int);
+ method public androidx.recyclerview.widget.RecyclerView.Adapter? getAdapter();
+ method public int getChildAdapterPosition(android.view.View);
+ method public long getChildItemId(android.view.View);
+ method public int getChildLayoutPosition(android.view.View);
+ method @Deprecated public int getChildPosition(android.view.View);
+ method public androidx.recyclerview.widget.RecyclerView.ViewHolder! getChildViewHolder(android.view.View);
+ method public androidx.recyclerview.widget.RecyclerViewAccessibilityDelegate? getCompatAccessibilityDelegate();
+ method public void getDecoratedBoundsWithMargins(android.view.View, android.graphics.Rect);
+ method public androidx.recyclerview.widget.RecyclerView.EdgeEffectFactory getEdgeEffectFactory();
+ method public androidx.recyclerview.widget.RecyclerView.ItemAnimator? getItemAnimator();
+ method public androidx.recyclerview.widget.RecyclerView.ItemDecoration getItemDecorationAt(int);
+ method public int getItemDecorationCount();
+ method public androidx.recyclerview.widget.RecyclerView.LayoutManager? getLayoutManager();
+ method public int getMaxFlingVelocity();
+ method public int getMinFlingVelocity();
+ method public androidx.recyclerview.widget.RecyclerView.OnFlingListener? getOnFlingListener();
+ method public boolean getPreserveFocusAfterLayout();
+ method public androidx.recyclerview.widget.RecyclerView.RecycledViewPool getRecycledViewPool();
+ method public int getScrollState();
+ method public boolean hasFixedSize();
+ method public boolean hasNestedScrollingParent(int);
+ method public boolean hasPendingAdapterUpdates();
+ method public void invalidateItemDecorations();
+ method public boolean isAnimating();
+ method public boolean isComputingLayout();
+ method @Deprecated public boolean isLayoutFrozen();
+ method public final boolean isLayoutSuppressed();
+ method public void nestedScrollBy(int, int);
+ method public void offsetChildrenHorizontal(@Px int);
+ method public void offsetChildrenVertical(@Px int);
+ method public void onChildAttachedToWindow(android.view.View);
+ method public void onChildDetachedFromWindow(android.view.View);
+ method public void onDraw(android.graphics.Canvas!);
+ method public void onScrollStateChanged(int);
+ method public void onScrolled(@Px int, @Px int);
+ method public void removeItemDecoration(androidx.recyclerview.widget.RecyclerView.ItemDecoration);
+ method public void removeItemDecorationAt(int);
+ method public void removeOnChildAttachStateChangeListener(androidx.recyclerview.widget.RecyclerView.OnChildAttachStateChangeListener);
+ method public void removeOnItemTouchListener(androidx.recyclerview.widget.RecyclerView.OnItemTouchListener);
+ method public void removeOnScrollListener(androidx.recyclerview.widget.RecyclerView.OnScrollListener);
+ method public void removeRecyclerListener(androidx.recyclerview.widget.RecyclerView.RecyclerListener);
+ method public void scrollToPosition(int);
+ method public void setAccessibilityDelegateCompat(androidx.recyclerview.widget.RecyclerViewAccessibilityDelegate?);
+ method public void setAdapter(androidx.recyclerview.widget.RecyclerView.Adapter?);
+ method public void setChildDrawingOrderCallback(androidx.recyclerview.widget.RecyclerView.ChildDrawingOrderCallback?);
+ method public void setEdgeEffectFactory(androidx.recyclerview.widget.RecyclerView.EdgeEffectFactory);
+ method public void setHasFixedSize(boolean);
+ method public void setItemAnimator(androidx.recyclerview.widget.RecyclerView.ItemAnimator?);
+ method public void setItemViewCacheSize(int);
+ method @Deprecated public void setLayoutFrozen(boolean);
+ method public void setLayoutManager(androidx.recyclerview.widget.RecyclerView.LayoutManager?);
+ method @Deprecated public void setLayoutTransition(android.animation.LayoutTransition!);
+ method public void setOnFlingListener(androidx.recyclerview.widget.RecyclerView.OnFlingListener?);
+ method @Deprecated public void setOnScrollListener(androidx.recyclerview.widget.RecyclerView.OnScrollListener?);
+ method public void setPreserveFocusAfterLayout(boolean);
+ method public void setRecycledViewPool(androidx.recyclerview.widget.RecyclerView.RecycledViewPool?);
+ method @Deprecated public void setRecyclerListener(androidx.recyclerview.widget.RecyclerView.RecyclerListener?);
+ method public void setScrollingTouchSlop(int);
+ method public void setViewCacheExtension(androidx.recyclerview.widget.RecyclerView.ViewCacheExtension?);
+ method public void smoothScrollBy(@Px int, @Px int);
+ method public void smoothScrollBy(@Px int, @Px int, android.view.animation.Interpolator?);
+ method public void smoothScrollBy(@Px int, @Px int, android.view.animation.Interpolator?, int);
+ method public void smoothScrollToPosition(int);
+ method public boolean startNestedScroll(int, int);
+ method public void stopNestedScroll(int);
+ method public void stopScroll();
+ method public final void suppressLayout(boolean);
+ method public void swapAdapter(androidx.recyclerview.widget.RecyclerView.Adapter?, boolean);
+ field public static final int HORIZONTAL = 0; // 0x0
+ field public static final int INVALID_TYPE = -1; // 0xffffffff
+ field public static final long NO_ID = -1L; // 0xffffffffffffffffL
+ field public static final int NO_POSITION = -1; // 0xffffffff
+ field public static final int SCROLL_STATE_DRAGGING = 1; // 0x1
+ field public static final int SCROLL_STATE_IDLE = 0; // 0x0
+ field public static final int SCROLL_STATE_SETTLING = 2; // 0x2
+ field public static final int TOUCH_SLOP_DEFAULT = 0; // 0x0
+ field public static final int TOUCH_SLOP_PAGING = 1; // 0x1
+ field public static final int UNDEFINED_DURATION = -2147483648; // 0x80000000
+ field public static final int VERTICAL = 1; // 0x1
+ }
+
+ public abstract static class RecyclerView.Adapter<VH extends androidx.recyclerview.widget.RecyclerView.ViewHolder> {
+ ctor public RecyclerView.Adapter();
+ method public final void bindViewHolder(VH, int);
+ method public final VH createViewHolder(android.view.ViewGroup, int);
+ method public int findRelativeAdapterPositionIn(androidx.recyclerview.widget.RecyclerView.Adapter<? extends androidx.recyclerview.widget.RecyclerView.ViewHolder>, androidx.recyclerview.widget.RecyclerView.ViewHolder, int);
+ method public abstract int getItemCount();
+ method public long getItemId(int);
+ method public int getItemViewType(int);
+ method public final androidx.recyclerview.widget.RecyclerView.Adapter.StateRestorationPolicy getStateRestorationPolicy();
+ method public final boolean hasObservers();
+ method public final boolean hasStableIds();
+ method public final void notifyDataSetChanged();
+ method public final void notifyItemChanged(int);
+ method public final void notifyItemChanged(int, Object?);
+ method public final void notifyItemInserted(int);
+ method public final void notifyItemMoved(int, int);
+ method public final void notifyItemRangeChanged(int, int);
+ method public final void notifyItemRangeChanged(int, int, Object?);
+ method public final void notifyItemRangeInserted(int, int);
+ method public final void notifyItemRangeRemoved(int, int);
+ method public final void notifyItemRemoved(int);
+ method public void onAttachedToRecyclerView(androidx.recyclerview.widget.RecyclerView);
+ method public abstract void onBindViewHolder(VH, int);
+ method public void onBindViewHolder(VH, int, java.util.List<java.lang.Object!>);
+ method public abstract VH onCreateViewHolder(android.view.ViewGroup, int);
+ method public void onDetachedFromRecyclerView(androidx.recyclerview.widget.RecyclerView);
+ method public boolean onFailedToRecycleView(VH);
+ method public void onViewAttachedToWindow(VH);
+ method public void onViewDetachedFromWindow(VH);
+ method public void onViewRecycled(VH);
+ method public void registerAdapterDataObserver(androidx.recyclerview.widget.RecyclerView.AdapterDataObserver);
+ method public void setHasStableIds(boolean);
+ method public void setStateRestorationPolicy(androidx.recyclerview.widget.RecyclerView.Adapter.StateRestorationPolicy);
+ method public void unregisterAdapterDataObserver(androidx.recyclerview.widget.RecyclerView.AdapterDataObserver);
+ }
+
+ public enum RecyclerView.Adapter.StateRestorationPolicy {
+ enum_constant public static final androidx.recyclerview.widget.RecyclerView.Adapter.StateRestorationPolicy ALLOW;
+ enum_constant public static final androidx.recyclerview.widget.RecyclerView.Adapter.StateRestorationPolicy PREVENT;
+ enum_constant public static final androidx.recyclerview.widget.RecyclerView.Adapter.StateRestorationPolicy PREVENT_WHEN_EMPTY;
+ }
+
+ public abstract static class RecyclerView.AdapterDataObserver {
+ ctor public RecyclerView.AdapterDataObserver();
+ method public void onChanged();
+ method public void onItemRangeChanged(int, int);
+ method public void onItemRangeChanged(int, int, Object?);
+ method public void onItemRangeInserted(int, int);
+ method public void onItemRangeMoved(int, int, int);
+ method public void onItemRangeRemoved(int, int);
+ method public void onStateRestorationPolicyChanged();
+ }
+
+ public static interface RecyclerView.ChildDrawingOrderCallback {
+ method public int onGetChildDrawingOrder(int, int);
+ }
+
+ public static class RecyclerView.EdgeEffectFactory {
+ ctor public RecyclerView.EdgeEffectFactory();
+ method protected android.widget.EdgeEffect createEdgeEffect(androidx.recyclerview.widget.RecyclerView, @androidx.recyclerview.widget.RecyclerView.EdgeEffectFactory.EdgeDirection int);
+ field public static final int DIRECTION_BOTTOM = 3; // 0x3
+ field public static final int DIRECTION_LEFT = 0; // 0x0
+ field public static final int DIRECTION_RIGHT = 2; // 0x2
+ field public static final int DIRECTION_TOP = 1; // 0x1
+ }
+
+ @IntDef({androidx.recyclerview.widget.RecyclerView.EdgeEffectFactory.DIRECTION_LEFT, androidx.recyclerview.widget.RecyclerView.EdgeEffectFactory.DIRECTION_TOP, androidx.recyclerview.widget.RecyclerView.EdgeEffectFactory.DIRECTION_RIGHT, androidx.recyclerview.widget.RecyclerView.EdgeEffectFactory.DIRECTION_BOTTOM}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface RecyclerView.EdgeEffectFactory.EdgeDirection {
+ }
+
+ public abstract static class RecyclerView.ItemAnimator {
+ ctor public RecyclerView.ItemAnimator();
+ method public abstract boolean animateAppearance(androidx.recyclerview.widget.RecyclerView.ViewHolder, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo?, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo);
+ method public abstract boolean animateChange(androidx.recyclerview.widget.RecyclerView.ViewHolder, androidx.recyclerview.widget.RecyclerView.ViewHolder, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo);
+ method public abstract boolean animateDisappearance(androidx.recyclerview.widget.RecyclerView.ViewHolder, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo?);
+ method public abstract boolean animatePersistence(androidx.recyclerview.widget.RecyclerView.ViewHolder, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo);
+ method public boolean canReuseUpdatedViewHolder(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public boolean canReuseUpdatedViewHolder(androidx.recyclerview.widget.RecyclerView.ViewHolder, java.util.List<java.lang.Object!>);
+ method public final void dispatchAnimationFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public final void dispatchAnimationStarted(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public final void dispatchAnimationsFinished();
+ method public abstract void endAnimation(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public abstract void endAnimations();
+ method public long getAddDuration();
+ method public long getChangeDuration();
+ method public long getMoveDuration();
+ method public long getRemoveDuration();
+ method public abstract boolean isRunning();
+ method public final boolean isRunning(androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemAnimatorFinishedListener?);
+ method public androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo obtainHolderInfo();
+ method public void onAnimationFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public void onAnimationStarted(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo recordPostLayoutInformation(androidx.recyclerview.widget.RecyclerView.State, androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo recordPreLayoutInformation(androidx.recyclerview.widget.RecyclerView.State, androidx.recyclerview.widget.RecyclerView.ViewHolder, @androidx.recyclerview.widget.RecyclerView.ItemAnimator.AdapterChanges int, java.util.List<java.lang.Object!>);
+ method public abstract void runPendingAnimations();
+ method public void setAddDuration(long);
+ method public void setChangeDuration(long);
+ method public void setMoveDuration(long);
+ method public void setRemoveDuration(long);
+ field public static final int FLAG_APPEARED_IN_PRE_LAYOUT = 4096; // 0x1000
+ field public static final int FLAG_CHANGED = 2; // 0x2
+ field public static final int FLAG_INVALIDATED = 4; // 0x4
+ field public static final int FLAG_MOVED = 2048; // 0x800
+ field public static final int FLAG_REMOVED = 8; // 0x8
+ }
+
+ @IntDef(flag=true, value={androidx.recyclerview.widget.RecyclerView.ItemAnimator.FLAG_CHANGED, androidx.recyclerview.widget.RecyclerView.ItemAnimator.FLAG_REMOVED, androidx.recyclerview.widget.RecyclerView.ItemAnimator.FLAG_MOVED, androidx.recyclerview.widget.RecyclerView.ItemAnimator.FLAG_INVALIDATED, androidx.recyclerview.widget.RecyclerView.ItemAnimator.FLAG_APPEARED_IN_PRE_LAYOUT}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface RecyclerView.ItemAnimator.AdapterChanges {
+ }
+
+ public static interface RecyclerView.ItemAnimator.ItemAnimatorFinishedListener {
+ method public void onAnimationsFinished();
+ }
+
+ public static class RecyclerView.ItemAnimator.ItemHolderInfo {
+ ctor public RecyclerView.ItemAnimator.ItemHolderInfo();
+ method public androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo setFrom(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo setFrom(androidx.recyclerview.widget.RecyclerView.ViewHolder, @androidx.recyclerview.widget.RecyclerView.ItemAnimator.AdapterChanges int);
+ field public int bottom;
+ field @androidx.recyclerview.widget.RecyclerView.ItemAnimator.AdapterChanges public int changeFlags;
+ field public int left;
+ field public int right;
+ field public int top;
+ }
+
+ public abstract static class RecyclerView.ItemDecoration {
+ ctor public RecyclerView.ItemDecoration();
+ method @Deprecated public void getItemOffsets(android.graphics.Rect, int, androidx.recyclerview.widget.RecyclerView);
+ method public void getItemOffsets(android.graphics.Rect, android.view.View, androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.State);
+ method public void onDraw(android.graphics.Canvas, androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.State);
+ method @Deprecated public void onDraw(android.graphics.Canvas, androidx.recyclerview.widget.RecyclerView);
+ method public void onDrawOver(android.graphics.Canvas, androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.State);
+ method @Deprecated public void onDrawOver(android.graphics.Canvas, androidx.recyclerview.widget.RecyclerView);
+ }
+
+ public abstract static class RecyclerView.LayoutManager {
+ ctor public RecyclerView.LayoutManager();
+ method public void addDisappearingView(android.view.View!);
+ method public void addDisappearingView(android.view.View!, int);
+ method public void addView(android.view.View!);
+ method public void addView(android.view.View!, int);
+ method public void assertInLayoutOrScroll(String!);
+ method public void assertNotInLayoutOrScroll(String!);
+ method public void attachView(android.view.View, int, androidx.recyclerview.widget.RecyclerView.LayoutParams!);
+ method public void attachView(android.view.View, int);
+ method public void attachView(android.view.View);
+ method public void calculateItemDecorationsForChild(android.view.View, android.graphics.Rect);
+ method public boolean canScrollHorizontally();
+ method public boolean canScrollVertically();
+ method public boolean checkLayoutParams(androidx.recyclerview.widget.RecyclerView.LayoutParams!);
+ method public static int chooseSize(int, int, int);
+ method public void collectAdjacentPrefetchPositions(int, int, androidx.recyclerview.widget.RecyclerView.State!, androidx.recyclerview.widget.RecyclerView.LayoutManager.LayoutPrefetchRegistry!);
+ method public void collectInitialPrefetchPositions(int, androidx.recyclerview.widget.RecyclerView.LayoutManager.LayoutPrefetchRegistry!);
+ method public int computeHorizontalScrollExtent(androidx.recyclerview.widget.RecyclerView.State);
+ method public int computeHorizontalScrollOffset(androidx.recyclerview.widget.RecyclerView.State);
+ method public int computeHorizontalScrollRange(androidx.recyclerview.widget.RecyclerView.State);
+ method public int computeVerticalScrollExtent(androidx.recyclerview.widget.RecyclerView.State);
+ method public int computeVerticalScrollOffset(androidx.recyclerview.widget.RecyclerView.State);
+ method public int computeVerticalScrollRange(androidx.recyclerview.widget.RecyclerView.State);
+ method public void detachAndScrapAttachedViews(androidx.recyclerview.widget.RecyclerView.Recycler);
+ method public void detachAndScrapView(android.view.View, androidx.recyclerview.widget.RecyclerView.Recycler);
+ method public void detachAndScrapViewAt(int, androidx.recyclerview.widget.RecyclerView.Recycler);
+ method public void detachView(android.view.View);
+ method public void detachViewAt(int);
+ method public void endAnimation(android.view.View!);
+ method public android.view.View? findContainingItemView(android.view.View);
+ method public android.view.View? findViewByPosition(int);
+ method public abstract androidx.recyclerview.widget.RecyclerView.LayoutParams! generateDefaultLayoutParams();
+ method public androidx.recyclerview.widget.RecyclerView.LayoutParams! generateLayoutParams(android.view.ViewGroup.LayoutParams!);
+ method public androidx.recyclerview.widget.RecyclerView.LayoutParams! generateLayoutParams(android.content.Context!, android.util.AttributeSet!);
+ method public int getBaseline();
+ method public int getBottomDecorationHeight(android.view.View);
+ method public android.view.View? getChildAt(int);
+ method public int getChildCount();
+ method @Deprecated public static int getChildMeasureSpec(int, int, int, boolean);
+ method public static int getChildMeasureSpec(int, int, int, int, boolean);
+ method public boolean getClipToPadding();
+ method public int getColumnCountForAccessibility(androidx.recyclerview.widget.RecyclerView.Recycler, androidx.recyclerview.widget.RecyclerView.State);
+ method public int getDecoratedBottom(android.view.View);
+ method public void getDecoratedBoundsWithMargins(android.view.View, android.graphics.Rect);
+ method public int getDecoratedLeft(android.view.View);
+ method public int getDecoratedMeasuredHeight(android.view.View);
+ method public int getDecoratedMeasuredWidth(android.view.View);
+ method public int getDecoratedRight(android.view.View);
+ method public int getDecoratedTop(android.view.View);
+ method public android.view.View? getFocusedChild();
+ method @Px public int getHeight();
+ method public int getHeightMode();
+ method public int getItemCount();
+ method public int getItemViewType(android.view.View);
+ method public int getLayoutDirection();
+ method public int getLeftDecorationWidth(android.view.View);
+ method @Px public int getMinimumHeight();
+ method @Px public int getMinimumWidth();
+ method @Px public int getPaddingBottom();
+ method @Px public int getPaddingEnd();
+ method @Px public int getPaddingLeft();
+ method @Px public int getPaddingRight();
+ method @Px public int getPaddingStart();
+ method @Px public int getPaddingTop();
+ method public int getPosition(android.view.View);
+ method public static androidx.recyclerview.widget.RecyclerView.LayoutManager.Properties! getProperties(android.content.Context, android.util.AttributeSet?, int, int);
+ method public int getRightDecorationWidth(android.view.View);
+ method public int getRowCountForAccessibility(androidx.recyclerview.widget.RecyclerView.Recycler, androidx.recyclerview.widget.RecyclerView.State);
+ method public int getSelectionModeForAccessibility(androidx.recyclerview.widget.RecyclerView.Recycler, androidx.recyclerview.widget.RecyclerView.State);
+ method public int getTopDecorationHeight(android.view.View);
+ method public void getTransformedBoundingBox(android.view.View, boolean, android.graphics.Rect);
+ method @Px public int getWidth();
+ method public int getWidthMode();
+ method public boolean hasFocus();
+ method public void ignoreView(android.view.View);
+ method public boolean isAttachedToWindow();
+ method public boolean isAutoMeasureEnabled();
+ method public boolean isFocused();
+ method public final boolean isItemPrefetchEnabled();
+ method public boolean isLayoutHierarchical(androidx.recyclerview.widget.RecyclerView.Recycler, androidx.recyclerview.widget.RecyclerView.State);
+ method public boolean isMeasurementCacheEnabled();
+ method public boolean isSmoothScrolling();
+ method public boolean isViewPartiallyVisible(android.view.View, boolean, boolean);
+ method public void layoutDecorated(android.view.View, int, int, int, int);
+ method public void layoutDecoratedWithMargins(android.view.View, int, int, int, int);
+ method public void measureChild(android.view.View, int, int);
+ method public void measureChildWithMargins(android.view.View, int, int);
+ method public void moveView(int, int);
+ method public void offsetChildrenHorizontal(@Px int);
+ method public void offsetChildrenVertical(@Px int);
+ method public void onAdapterChanged(androidx.recyclerview.widget.RecyclerView.Adapter?, androidx.recyclerview.widget.RecyclerView.Adapter?);
+ method public boolean onAddFocusables(androidx.recyclerview.widget.RecyclerView, java.util.ArrayList<android.view.View!>, int, int);
+ method @CallSuper public void onAttachedToWindow(androidx.recyclerview.widget.RecyclerView!);
+ method @Deprecated public void onDetachedFromWindow(androidx.recyclerview.widget.RecyclerView!);
+ method @CallSuper public void onDetachedFromWindow(androidx.recyclerview.widget.RecyclerView!, androidx.recyclerview.widget.RecyclerView.Recycler!);
+ method public android.view.View? onFocusSearchFailed(android.view.View, int, androidx.recyclerview.widget.RecyclerView.Recycler, androidx.recyclerview.widget.RecyclerView.State);
+ method public void onInitializeAccessibilityEvent(android.view.accessibility.AccessibilityEvent);
+ method public void onInitializeAccessibilityEvent(androidx.recyclerview.widget.RecyclerView.Recycler, androidx.recyclerview.widget.RecyclerView.State, android.view.accessibility.AccessibilityEvent);
+ method public void onInitializeAccessibilityNodeInfo(androidx.recyclerview.widget.RecyclerView.Recycler, androidx.recyclerview.widget.RecyclerView.State, androidx.core.view.accessibility.AccessibilityNodeInfoCompat);
+ method public void onInitializeAccessibilityNodeInfoForItem(androidx.recyclerview.widget.RecyclerView.Recycler, androidx.recyclerview.widget.RecyclerView.State, android.view.View, androidx.core.view.accessibility.AccessibilityNodeInfoCompat);
+ method public android.view.View? onInterceptFocusSearch(android.view.View, int);
+ method public void onItemsAdded(androidx.recyclerview.widget.RecyclerView, int, int);
+ method public void onItemsChanged(androidx.recyclerview.widget.RecyclerView);
+ method public void onItemsMoved(androidx.recyclerview.widget.RecyclerView, int, int, int);
+ method public void onItemsRemoved(androidx.recyclerview.widget.RecyclerView, int, int);
+ method public void onItemsUpdated(androidx.recyclerview.widget.RecyclerView, int, int);
+ method public void onItemsUpdated(androidx.recyclerview.widget.RecyclerView, int, int, Object?);
+ method public void onLayoutChildren(androidx.recyclerview.widget.RecyclerView.Recycler!, androidx.recyclerview.widget.RecyclerView.State!);
+ method public void onLayoutCompleted(androidx.recyclerview.widget.RecyclerView.State!);
+ method public void onMeasure(androidx.recyclerview.widget.RecyclerView.Recycler, androidx.recyclerview.widget.RecyclerView.State, int, int);
+ method @Deprecated public boolean onRequestChildFocus(androidx.recyclerview.widget.RecyclerView, android.view.View, android.view.View?);
+ method public boolean onRequestChildFocus(androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.State, android.view.View, android.view.View?);
+ method public void onRestoreInstanceState(android.os.Parcelable!);
+ method public android.os.Parcelable? onSaveInstanceState();
+ method public void onScrollStateChanged(int);
+ method public boolean performAccessibilityAction(androidx.recyclerview.widget.RecyclerView.Recycler, androidx.recyclerview.widget.RecyclerView.State, int, android.os.Bundle?);
+ method public boolean performAccessibilityActionForItem(androidx.recyclerview.widget.RecyclerView.Recycler, androidx.recyclerview.widget.RecyclerView.State, android.view.View, int, android.os.Bundle?);
+ method public void postOnAnimation(Runnable!);
+ method public void removeAllViews();
+ method public void removeAndRecycleAllViews(androidx.recyclerview.widget.RecyclerView.Recycler);
+ method public void removeAndRecycleView(android.view.View, androidx.recyclerview.widget.RecyclerView.Recycler);
+ method public void removeAndRecycleViewAt(int, androidx.recyclerview.widget.RecyclerView.Recycler);
+ method public boolean removeCallbacks(Runnable!);
+ method public void removeDetachedView(android.view.View);
+ method public void removeView(android.view.View!);
+ method public void removeViewAt(int);
+ method public boolean requestChildRectangleOnScreen(androidx.recyclerview.widget.RecyclerView, android.view.View, android.graphics.Rect, boolean);
+ method public boolean requestChildRectangleOnScreen(androidx.recyclerview.widget.RecyclerView, android.view.View, android.graphics.Rect, boolean, boolean);
+ method public void requestLayout();
+ method public void requestSimpleAnimationsInNextLayout();
+ method public int scrollHorizontallyBy(int, androidx.recyclerview.widget.RecyclerView.Recycler!, androidx.recyclerview.widget.RecyclerView.State!);
+ method public void scrollToPosition(int);
+ method public int scrollVerticallyBy(int, androidx.recyclerview.widget.RecyclerView.Recycler!, androidx.recyclerview.widget.RecyclerView.State!);
+ method @Deprecated public void setAutoMeasureEnabled(boolean);
+ method public final void setItemPrefetchEnabled(boolean);
+ method public void setMeasuredDimension(android.graphics.Rect!, int, int);
+ method public void setMeasuredDimension(int, int);
+ method public void setMeasurementCacheEnabled(boolean);
+ method public void smoothScrollToPosition(androidx.recyclerview.widget.RecyclerView!, androidx.recyclerview.widget.RecyclerView.State!, int);
+ method public void startSmoothScroll(androidx.recyclerview.widget.RecyclerView.SmoothScroller!);
+ method public void stopIgnoringView(android.view.View);
+ method public boolean supportsPredictiveItemAnimations();
+ }
+
+ public static interface RecyclerView.LayoutManager.LayoutPrefetchRegistry {
+ method public void addPosition(int, int);
+ }
+
+ public static class RecyclerView.LayoutManager.Properties {
+ ctor public RecyclerView.LayoutManager.Properties();
+ field public int orientation;
+ field public boolean reverseLayout;
+ field public int spanCount;
+ field public boolean stackFromEnd;
+ }
+
+ public static class RecyclerView.LayoutParams extends android.view.ViewGroup.MarginLayoutParams {
+ ctor public RecyclerView.LayoutParams(android.content.Context!, android.util.AttributeSet!);
+ ctor public RecyclerView.LayoutParams(int, int);
+ ctor public RecyclerView.LayoutParams(android.view.ViewGroup.MarginLayoutParams!);
+ ctor public RecyclerView.LayoutParams(android.view.ViewGroup.LayoutParams!);
+ ctor public RecyclerView.LayoutParams(androidx.recyclerview.widget.RecyclerView.LayoutParams!);
+ method public int getAbsoluteAdapterPosition();
+ method public int getBindingAdapterPosition();
+ method @Deprecated public int getViewAdapterPosition();
+ method public int getViewLayoutPosition();
+ method @Deprecated public int getViewPosition();
+ method public boolean isItemChanged();
+ method public boolean isItemRemoved();
+ method public boolean isViewInvalid();
+ method public boolean viewNeedsUpdate();
+ }
+
+ public static interface RecyclerView.OnChildAttachStateChangeListener {
+ method public void onChildViewAttachedToWindow(android.view.View);
+ method public void onChildViewDetachedFromWindow(android.view.View);
+ }
+
+ public abstract static class RecyclerView.OnFlingListener {
+ ctor public RecyclerView.OnFlingListener();
+ method public abstract boolean onFling(int, int);
+ }
+
+ public static interface RecyclerView.OnItemTouchListener {
+ method public boolean onInterceptTouchEvent(androidx.recyclerview.widget.RecyclerView, android.view.MotionEvent);
+ method public void onRequestDisallowInterceptTouchEvent(boolean);
+ method public void onTouchEvent(androidx.recyclerview.widget.RecyclerView, android.view.MotionEvent);
+ }
+
+ public abstract static class RecyclerView.OnScrollListener {
+ ctor public RecyclerView.OnScrollListener();
+ method public void onScrollStateChanged(androidx.recyclerview.widget.RecyclerView, int);
+ method public void onScrolled(androidx.recyclerview.widget.RecyclerView, int, int);
+ }
+
+ public static class RecyclerView.RecycledViewPool {
+ ctor public RecyclerView.RecycledViewPool();
+ method public void clear();
+ method public androidx.recyclerview.widget.RecyclerView.ViewHolder? getRecycledView(int);
+ method public int getRecycledViewCount(int);
+ method public void putRecycledView(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public void setMaxRecycledViews(int, int);
+ }
+
+ public final class RecyclerView.Recycler {
+ ctor public RecyclerView.Recycler();
+ method public void bindViewToPosition(android.view.View, int);
+ method public void clear();
+ method public int convertPreLayoutPositionToPostLayout(int);
+ method public java.util.List<androidx.recyclerview.widget.RecyclerView.ViewHolder!> getScrapList();
+ method public android.view.View getViewForPosition(int);
+ method public void recycleView(android.view.View);
+ method public void setViewCacheSize(int);
+ }
+
+ public static interface RecyclerView.RecyclerListener {
+ method public void onViewRecycled(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ }
+
+ public static class RecyclerView.SimpleOnItemTouchListener implements androidx.recyclerview.widget.RecyclerView.OnItemTouchListener {
+ ctor public RecyclerView.SimpleOnItemTouchListener();
+ method public boolean onInterceptTouchEvent(androidx.recyclerview.widget.RecyclerView, android.view.MotionEvent);
+ method public void onRequestDisallowInterceptTouchEvent(boolean);
+ method public void onTouchEvent(androidx.recyclerview.widget.RecyclerView, android.view.MotionEvent);
+ }
+
+ public abstract static class RecyclerView.SmoothScroller {
+ ctor public RecyclerView.SmoothScroller();
+ method public android.graphics.PointF? computeScrollVectorForPosition(int);
+ method public android.view.View! findViewByPosition(int);
+ method public int getChildCount();
+ method public int getChildPosition(android.view.View!);
+ method public androidx.recyclerview.widget.RecyclerView.LayoutManager? getLayoutManager();
+ method public int getTargetPosition();
+ method @Deprecated public void instantScrollToPosition(int);
+ method public boolean isPendingInitialRun();
+ method public boolean isRunning();
+ method protected void normalize(android.graphics.PointF);
+ method protected void onChildAttachedToWindow(android.view.View!);
+ method protected abstract void onSeekTargetStep(@Px int, @Px int, androidx.recyclerview.widget.RecyclerView.State, androidx.recyclerview.widget.RecyclerView.SmoothScroller.Action);
+ method protected abstract void onStart();
+ method protected abstract void onStop();
+ method protected abstract void onTargetFound(android.view.View, androidx.recyclerview.widget.RecyclerView.State, androidx.recyclerview.widget.RecyclerView.SmoothScroller.Action);
+ method public void setTargetPosition(int);
+ method protected final void stop();
+ }
+
+ public static class RecyclerView.SmoothScroller.Action {
+ ctor public RecyclerView.SmoothScroller.Action(@Px int, @Px int);
+ ctor public RecyclerView.SmoothScroller.Action(@Px int, @Px int, int);
+ ctor public RecyclerView.SmoothScroller.Action(@Px int, @Px int, int, android.view.animation.Interpolator?);
+ method public int getDuration();
+ method @Px public int getDx();
+ method @Px public int getDy();
+ method public android.view.animation.Interpolator? getInterpolator();
+ method public void jumpTo(int);
+ method public void setDuration(int);
+ method public void setDx(@Px int);
+ method public void setDy(@Px int);
+ method public void setInterpolator(android.view.animation.Interpolator?);
+ method public void update(@Px int, @Px int, int, android.view.animation.Interpolator?);
+ field public static final int UNDEFINED_DURATION = -2147483648; // 0x80000000
+ }
+
+ public static interface RecyclerView.SmoothScroller.ScrollVectorProvider {
+ method public android.graphics.PointF? computeScrollVectorForPosition(int);
+ }
+
+ public static class RecyclerView.State {
+ ctor public RecyclerView.State();
+ method public boolean didStructureChange();
+ method public <T> T! get(int);
+ method public int getItemCount();
+ method public int getRemainingScrollHorizontal();
+ method public int getRemainingScrollVertical();
+ method public int getTargetScrollPosition();
+ method public boolean hasTargetScrollPosition();
+ method public boolean isMeasuring();
+ method public boolean isPreLayout();
+ method public void put(int, Object!);
+ method public void remove(int);
+ method public boolean willRunPredictiveAnimations();
+ method public boolean willRunSimpleAnimations();
+ }
+
+ public abstract static class RecyclerView.ViewCacheExtension {
+ ctor public RecyclerView.ViewCacheExtension();
+ method public abstract android.view.View? getViewForPositionAndType(androidx.recyclerview.widget.RecyclerView.Recycler, int, int);
+ }
+
+ public abstract static class RecyclerView.ViewHolder {
+ ctor public RecyclerView.ViewHolder(android.view.View);
+ method public final int getAbsoluteAdapterPosition();
+ method @Deprecated public final int getAdapterPosition();
+ method public final androidx.recyclerview.widget.RecyclerView.Adapter<? extends androidx.recyclerview.widget.RecyclerView.ViewHolder>? getBindingAdapter();
+ method public final int getBindingAdapterPosition();
+ method public final long getItemId();
+ method public final int getItemViewType();
+ method public final int getLayoutPosition();
+ method public final int getOldPosition();
+ method @Deprecated public final int getPosition();
+ method public final boolean isRecyclable();
+ method public final void setIsRecyclable(boolean);
+ field public final android.view.View itemView;
+ }
+
+ public class RecyclerViewAccessibilityDelegate extends androidx.core.view.AccessibilityDelegateCompat {
+ ctor public RecyclerViewAccessibilityDelegate(androidx.recyclerview.widget.RecyclerView);
+ method public androidx.core.view.AccessibilityDelegateCompat getItemDelegate();
+ }
+
+ public static class RecyclerViewAccessibilityDelegate.ItemDelegate extends androidx.core.view.AccessibilityDelegateCompat {
+ ctor public RecyclerViewAccessibilityDelegate.ItemDelegate(androidx.recyclerview.widget.RecyclerViewAccessibilityDelegate);
+ }
+
+ public abstract class SimpleItemAnimator extends androidx.recyclerview.widget.RecyclerView.ItemAnimator {
+ ctor public SimpleItemAnimator();
+ method public abstract boolean animateAdd(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public boolean animateAppearance(androidx.recyclerview.widget.RecyclerView.ViewHolder, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo?, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo);
+ method public boolean animateChange(androidx.recyclerview.widget.RecyclerView.ViewHolder, androidx.recyclerview.widget.RecyclerView.ViewHolder, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo);
+ method public abstract boolean animateChange(androidx.recyclerview.widget.RecyclerView.ViewHolder!, androidx.recyclerview.widget.RecyclerView.ViewHolder!, int, int, int, int);
+ method public boolean animateDisappearance(androidx.recyclerview.widget.RecyclerView.ViewHolder, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo?);
+ method public abstract boolean animateMove(androidx.recyclerview.widget.RecyclerView.ViewHolder!, int, int, int, int);
+ method public boolean animatePersistence(androidx.recyclerview.widget.RecyclerView.ViewHolder, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo);
+ method public abstract boolean animateRemove(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public final void dispatchAddFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public final void dispatchAddStarting(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public final void dispatchChangeFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder!, boolean);
+ method public final void dispatchChangeStarting(androidx.recyclerview.widget.RecyclerView.ViewHolder!, boolean);
+ method public final void dispatchMoveFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public final void dispatchMoveStarting(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public final void dispatchRemoveFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public final void dispatchRemoveStarting(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public boolean getSupportsChangeAnimations();
+ method public void onAddFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public void onAddStarting(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public void onChangeFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder!, boolean);
+ method public void onChangeStarting(androidx.recyclerview.widget.RecyclerView.ViewHolder!, boolean);
+ method public void onMoveFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public void onMoveStarting(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public void onRemoveFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public void onRemoveStarting(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public void setSupportsChangeAnimations(boolean);
+ }
+
+ public abstract class SnapHelper extends androidx.recyclerview.widget.RecyclerView.OnFlingListener {
+ ctor public SnapHelper();
+ method public void attachToRecyclerView(androidx.recyclerview.widget.RecyclerView?) throws java.lang.IllegalStateException;
+ method public abstract int[]? calculateDistanceToFinalSnap(androidx.recyclerview.widget.RecyclerView.LayoutManager, android.view.View);
+ method public int[]! calculateScrollDistance(int, int);
+ method protected androidx.recyclerview.widget.RecyclerView.SmoothScroller? createScroller(androidx.recyclerview.widget.RecyclerView.LayoutManager);
+ method @Deprecated protected androidx.recyclerview.widget.LinearSmoothScroller? createSnapScroller(androidx.recyclerview.widget.RecyclerView.LayoutManager);
+ method public abstract android.view.View? findSnapView(androidx.recyclerview.widget.RecyclerView.LayoutManager!);
+ method public abstract int findTargetSnapPosition(androidx.recyclerview.widget.RecyclerView.LayoutManager!, int, int);
+ method public boolean onFling(int, int);
+ }
+
+ public class SortedList<T> {
+ ctor public SortedList(Class<T!>, androidx.recyclerview.widget.SortedList.Callback<T!>);
+ ctor public SortedList(Class<T!>, androidx.recyclerview.widget.SortedList.Callback<T!>, int);
+ method public int add(T!);
+ method public void addAll(T![], boolean);
+ method public void addAll(T!...);
+ method public void addAll(java.util.Collection<T!>);
+ method public void beginBatchedUpdates();
+ method public void clear();
+ method public void endBatchedUpdates();
+ method public T! get(int) throws java.lang.IndexOutOfBoundsException;
+ method public int indexOf(T!);
+ method public void recalculatePositionOfItemAt(int);
+ method public boolean remove(T!);
+ method public T! removeItemAt(int);
+ method public void replaceAll(T![], boolean);
+ method public void replaceAll(T!...);
+ method public void replaceAll(java.util.Collection<T!>);
+ method public int size();
+ method public void updateItemAt(int, T!);
+ field public static final int INVALID_POSITION = -1; // 0xffffffff
+ }
+
+ public static class SortedList.BatchedCallback<T2> extends androidx.recyclerview.widget.SortedList.Callback<T2> {
+ ctor public SortedList.BatchedCallback(androidx.recyclerview.widget.SortedList.Callback<T2!>!);
+ method public boolean areContentsTheSame(T2!, T2!);
+ method public boolean areItemsTheSame(T2!, T2!);
+ method public int compare(T2!, T2!);
+ method public void dispatchLastEvent();
+ method public void onChanged(int, int);
+ method public void onInserted(int, int);
+ method public void onMoved(int, int);
+ method public void onRemoved(int, int);
+ }
+
+ public abstract static class SortedList.Callback<T2> implements java.util.Comparator<T2> androidx.recyclerview.widget.ListUpdateCallback {
+ ctor public SortedList.Callback();
+ method public abstract boolean areContentsTheSame(T2!, T2!);
+ method public abstract boolean areItemsTheSame(T2!, T2!);
+ method public abstract int compare(T2!, T2!);
+ method public Object? getChangePayload(T2!, T2!);
+ method public abstract void onChanged(int, int);
+ method public void onChanged(int, int, Object!);
+ }
+
+ public abstract class SortedListAdapterCallback<T2> extends androidx.recyclerview.widget.SortedList.Callback<T2> {
+ ctor public SortedListAdapterCallback(androidx.recyclerview.widget.RecyclerView.Adapter!);
+ method public void onChanged(int, int);
+ method public void onInserted(int, int);
+ method public void onMoved(int, int);
+ method public void onRemoved(int, int);
+ }
+
+ public class StaggeredGridLayoutManager extends androidx.recyclerview.widget.RecyclerView.LayoutManager implements androidx.recyclerview.widget.RecyclerView.SmoothScroller.ScrollVectorProvider {
+ ctor public StaggeredGridLayoutManager(android.content.Context!, android.util.AttributeSet!, int, int);
+ ctor public StaggeredGridLayoutManager(int, int);
+ method public android.graphics.PointF! computeScrollVectorForPosition(int);
+ method public int[]! findFirstCompletelyVisibleItemPositions(int[]!);
+ method public int[]! findFirstVisibleItemPositions(int[]!);
+ method public int[]! findLastCompletelyVisibleItemPositions(int[]!);
+ method public int[]! findLastVisibleItemPositions(int[]!);
+ method public androidx.recyclerview.widget.RecyclerView.LayoutParams! generateDefaultLayoutParams();
+ method public int getGapStrategy();
+ method public int getOrientation();
+ method public boolean getReverseLayout();
+ method public int getSpanCount();
+ method public void invalidateSpanAssignments();
+ method public void scrollToPositionWithOffset(int, int);
+ method public void setGapStrategy(int);
+ method public void setOrientation(int);
+ method public void setReverseLayout(boolean);
+ method public void setSpanCount(int);
+ field @Deprecated public static final int GAP_HANDLING_LAZY = 1; // 0x1
+ field public static final int GAP_HANDLING_MOVE_ITEMS_BETWEEN_SPANS = 2; // 0x2
+ field public static final int GAP_HANDLING_NONE = 0; // 0x0
+ field public static final int HORIZONTAL = 0; // 0x0
+ field public static final int VERTICAL = 1; // 0x1
+ }
+
+ public static class StaggeredGridLayoutManager.LayoutParams extends androidx.recyclerview.widget.RecyclerView.LayoutParams {
+ ctor public StaggeredGridLayoutManager.LayoutParams(android.content.Context!, android.util.AttributeSet!);
+ ctor public StaggeredGridLayoutManager.LayoutParams(int, int);
+ ctor public StaggeredGridLayoutManager.LayoutParams(android.view.ViewGroup.MarginLayoutParams!);
+ ctor public StaggeredGridLayoutManager.LayoutParams(android.view.ViewGroup.LayoutParams!);
+ ctor public StaggeredGridLayoutManager.LayoutParams(androidx.recyclerview.widget.RecyclerView.LayoutParams!);
+ method public final int getSpanIndex();
+ method public boolean isFullSpan();
+ method public void setFullSpan(boolean);
+ field public static final int INVALID_SPAN_ID = -1; // 0xffffffff
+ }
+
+}
+
diff --git a/recyclerview/recyclerview/api/res-1.2.0-beta01.txt b/recyclerview/recyclerview/api/res-1.2.0-beta01.txt
new file mode 100644
index 0000000..475bfc43
--- /dev/null
+++ b/recyclerview/recyclerview/api/res-1.2.0-beta01.txt
@@ -0,0 +1,9 @@
+attr fastScrollEnabled
+attr fastScrollHorizontalThumbDrawable
+attr fastScrollHorizontalTrackDrawable
+attr fastScrollVerticalThumbDrawable
+attr fastScrollVerticalTrackDrawable
+attr layoutManager
+attr reverseLayout
+attr spanCount
+attr stackFromEnd
diff --git a/recyclerview/recyclerview/api/restricted_1.2.0-beta01.txt b/recyclerview/recyclerview/api/restricted_1.2.0-beta01.txt
new file mode 100644
index 0000000..5240856
--- /dev/null
+++ b/recyclerview/recyclerview/api/restricted_1.2.0-beta01.txt
@@ -0,0 +1,1094 @@
+// Signature format: 4.0
+package androidx.recyclerview.widget {
+
+ public final class AdapterListUpdateCallback implements androidx.recyclerview.widget.ListUpdateCallback {
+ ctor public AdapterListUpdateCallback(androidx.recyclerview.widget.RecyclerView.Adapter);
+ method public void onChanged(int, int, Object!);
+ method public void onInserted(int, int);
+ method public void onMoved(int, int);
+ method public void onRemoved(int, int);
+ }
+
+ public final class AsyncDifferConfig<T> {
+ method public java.util.concurrent.Executor getBackgroundThreadExecutor();
+ method public androidx.recyclerview.widget.DiffUtil.ItemCallback<T!> getDiffCallback();
+ }
+
+ public static final class AsyncDifferConfig.Builder<T> {
+ ctor public AsyncDifferConfig.Builder(androidx.recyclerview.widget.DiffUtil.ItemCallback<T!>);
+ method public androidx.recyclerview.widget.AsyncDifferConfig<T!> build();
+ method public androidx.recyclerview.widget.AsyncDifferConfig.Builder<T!> setBackgroundThreadExecutor(java.util.concurrent.Executor!);
+ }
+
+ public class AsyncListDiffer<T> {
+ ctor public AsyncListDiffer(androidx.recyclerview.widget.RecyclerView.Adapter, androidx.recyclerview.widget.DiffUtil.ItemCallback<T!>);
+ ctor public AsyncListDiffer(androidx.recyclerview.widget.ListUpdateCallback, androidx.recyclerview.widget.AsyncDifferConfig<T!>);
+ method public void addListListener(androidx.recyclerview.widget.AsyncListDiffer.ListListener<T!>);
+ method public java.util.List<T!> getCurrentList();
+ method public void removeListListener(androidx.recyclerview.widget.AsyncListDiffer.ListListener<T!>);
+ method public void submitList(java.util.List<T!>?);
+ method public void submitList(java.util.List<T!>?, Runnable?);
+ }
+
+ public static interface AsyncListDiffer.ListListener<T> {
+ method public void onCurrentListChanged(java.util.List<T!>, java.util.List<T!>);
+ }
+
+ public class AsyncListUtil<T> {
+ ctor public AsyncListUtil(Class<T!>, int, androidx.recyclerview.widget.AsyncListUtil.DataCallback<T!>, androidx.recyclerview.widget.AsyncListUtil.ViewCallback);
+ method public T? getItem(int);
+ method public int getItemCount();
+ method public void onRangeChanged();
+ method public void refresh();
+ }
+
+ public abstract static class AsyncListUtil.DataCallback<T> {
+ ctor public AsyncListUtil.DataCallback();
+ method @WorkerThread public abstract void fillData(T![], int, int);
+ method @WorkerThread public int getMaxCachedTiles();
+ method @WorkerThread public void recycleData(T![], int);
+ method @WorkerThread public abstract int refreshData();
+ }
+
+ public abstract static class AsyncListUtil.ViewCallback {
+ ctor public AsyncListUtil.ViewCallback();
+ method @UiThread public void extendRangeInto(int[], int[], int);
+ method @UiThread public abstract void getItemRangeInto(int[]);
+ method @UiThread public abstract void onDataRefresh();
+ method @UiThread public abstract void onItemLoaded(int);
+ field public static final int HINT_SCROLL_ASC = 2; // 0x2
+ field public static final int HINT_SCROLL_DESC = 1; // 0x1
+ field public static final int HINT_SCROLL_NONE = 0; // 0x0
+ }
+
+ public class BatchingListUpdateCallback implements androidx.recyclerview.widget.ListUpdateCallback {
+ ctor public BatchingListUpdateCallback(androidx.recyclerview.widget.ListUpdateCallback);
+ method public void dispatchLastEvent();
+ method public void onChanged(int, int, Object!);
+ method public void onInserted(int, int);
+ method public void onMoved(int, int);
+ method public void onRemoved(int, int);
+ }
+
+ public final class ConcatAdapter extends androidx.recyclerview.widget.RecyclerView.Adapter<androidx.recyclerview.widget.RecyclerView.ViewHolder> {
+ ctor @java.lang.SafeVarargs public ConcatAdapter(androidx.recyclerview.widget.RecyclerView.Adapter<? extends androidx.recyclerview.widget.RecyclerView.ViewHolder>!...);
+ ctor @java.lang.SafeVarargs public ConcatAdapter(androidx.recyclerview.widget.ConcatAdapter.Config, androidx.recyclerview.widget.RecyclerView.Adapter<? extends androidx.recyclerview.widget.RecyclerView.ViewHolder>!...);
+ ctor public ConcatAdapter(java.util.List<? extends androidx.recyclerview.widget.RecyclerView.Adapter<? extends androidx.recyclerview.widget.RecyclerView.ViewHolder>>);
+ ctor public ConcatAdapter(androidx.recyclerview.widget.ConcatAdapter.Config, java.util.List<? extends androidx.recyclerview.widget.RecyclerView.Adapter<? extends androidx.recyclerview.widget.RecyclerView.ViewHolder>>);
+ method public boolean addAdapter(androidx.recyclerview.widget.RecyclerView.Adapter<? extends androidx.recyclerview.widget.RecyclerView.ViewHolder>);
+ method public boolean addAdapter(int, androidx.recyclerview.widget.RecyclerView.Adapter<? extends androidx.recyclerview.widget.RecyclerView.ViewHolder>);
+ method public java.util.List<? extends androidx.recyclerview.widget.RecyclerView.Adapter<? extends androidx.recyclerview.widget.RecyclerView.ViewHolder>> getAdapters();
+ method public int getItemCount();
+ method public void onBindViewHolder(androidx.recyclerview.widget.RecyclerView.ViewHolder, int);
+ method public androidx.recyclerview.widget.RecyclerView.ViewHolder onCreateViewHolder(android.view.ViewGroup, int);
+ method public boolean onFailedToRecycleView(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public void onViewAttachedToWindow(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public void onViewDetachedFromWindow(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public void onViewRecycled(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public boolean removeAdapter(androidx.recyclerview.widget.RecyclerView.Adapter<? extends androidx.recyclerview.widget.RecyclerView.ViewHolder>);
+ }
+
+ public static final class ConcatAdapter.Config {
+ field public static final androidx.recyclerview.widget.ConcatAdapter.Config DEFAULT;
+ field public final boolean isolateViewTypes;
+ field public final androidx.recyclerview.widget.ConcatAdapter.Config.StableIdMode stableIdMode;
+ }
+
+ public static final class ConcatAdapter.Config.Builder {
+ ctor public ConcatAdapter.Config.Builder();
+ method public androidx.recyclerview.widget.ConcatAdapter.Config build();
+ method public androidx.recyclerview.widget.ConcatAdapter.Config.Builder setIsolateViewTypes(boolean);
+ method public androidx.recyclerview.widget.ConcatAdapter.Config.Builder setStableIdMode(androidx.recyclerview.widget.ConcatAdapter.Config.StableIdMode);
+ }
+
+ public enum ConcatAdapter.Config.StableIdMode {
+ enum_constant public static final androidx.recyclerview.widget.ConcatAdapter.Config.StableIdMode ISOLATED_STABLE_IDS;
+ enum_constant public static final androidx.recyclerview.widget.ConcatAdapter.Config.StableIdMode NO_STABLE_IDS;
+ enum_constant public static final androidx.recyclerview.widget.ConcatAdapter.Config.StableIdMode SHARED_STABLE_IDS;
+ }
+
+ public class DefaultItemAnimator extends androidx.recyclerview.widget.SimpleItemAnimator {
+ ctor public DefaultItemAnimator();
+ method public boolean animateAdd(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public boolean animateChange(androidx.recyclerview.widget.RecyclerView.ViewHolder!, androidx.recyclerview.widget.RecyclerView.ViewHolder!, int, int, int, int);
+ method public boolean animateMove(androidx.recyclerview.widget.RecyclerView.ViewHolder!, int, int, int, int);
+ method public boolean animateRemove(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public void endAnimation(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public void endAnimations();
+ method public boolean isRunning();
+ method public void runPendingAnimations();
+ }
+
+ public class DiffUtil {
+ method public static androidx.recyclerview.widget.DiffUtil.DiffResult calculateDiff(androidx.recyclerview.widget.DiffUtil.Callback);
+ method public static androidx.recyclerview.widget.DiffUtil.DiffResult calculateDiff(androidx.recyclerview.widget.DiffUtil.Callback, boolean);
+ }
+
+ public abstract static class DiffUtil.Callback {
+ ctor public DiffUtil.Callback();
+ method public abstract boolean areContentsTheSame(int, int);
+ method public abstract boolean areItemsTheSame(int, int);
+ method public Object? getChangePayload(int, int);
+ method public abstract int getNewListSize();
+ method public abstract int getOldListSize();
+ }
+
+ public static class DiffUtil.DiffResult {
+ method public int convertNewPositionToOld(@IntRange(from=0) int);
+ method public int convertOldPositionToNew(@IntRange(from=0) int);
+ method public void dispatchUpdatesTo(androidx.recyclerview.widget.RecyclerView.Adapter);
+ method public void dispatchUpdatesTo(androidx.recyclerview.widget.ListUpdateCallback);
+ field public static final int NO_POSITION = -1; // 0xffffffff
+ }
+
+ public abstract static class DiffUtil.ItemCallback<T> {
+ ctor public DiffUtil.ItemCallback();
+ method public abstract boolean areContentsTheSame(T, T);
+ method public abstract boolean areItemsTheSame(T, T);
+ method public Object? getChangePayload(T, T);
+ }
+
+ public class DividerItemDecoration extends androidx.recyclerview.widget.RecyclerView.ItemDecoration {
+ ctor public DividerItemDecoration(android.content.Context!, int);
+ method public android.graphics.drawable.Drawable? getDrawable();
+ method public void setDrawable(android.graphics.drawable.Drawable);
+ method public void setOrientation(int);
+ field public static final int HORIZONTAL = 0; // 0x0
+ field public static final int VERTICAL = 1; // 0x1
+ }
+
+ public class GridLayoutManager extends androidx.recyclerview.widget.LinearLayoutManager {
+ ctor public GridLayoutManager(android.content.Context!, android.util.AttributeSet!, int, int);
+ ctor public GridLayoutManager(android.content.Context!, int);
+ ctor public GridLayoutManager(android.content.Context!, int, @androidx.recyclerview.widget.RecyclerView.Orientation int, boolean);
+ method public int getSpanCount();
+ method public androidx.recyclerview.widget.GridLayoutManager.SpanSizeLookup! getSpanSizeLookup();
+ method public boolean isUsingSpansToEstimateScrollbarDimensions();
+ method public void setSpanCount(int);
+ method public void setSpanSizeLookup(androidx.recyclerview.widget.GridLayoutManager.SpanSizeLookup!);
+ method public void setUsingSpansToEstimateScrollbarDimensions(boolean);
+ field public static final int DEFAULT_SPAN_COUNT = -1; // 0xffffffff
+ }
+
+ public static final class GridLayoutManager.DefaultSpanSizeLookup extends androidx.recyclerview.widget.GridLayoutManager.SpanSizeLookup {
+ ctor public GridLayoutManager.DefaultSpanSizeLookup();
+ method public int getSpanSize(int);
+ }
+
+ public static class GridLayoutManager.LayoutParams extends androidx.recyclerview.widget.RecyclerView.LayoutParams {
+ ctor public GridLayoutManager.LayoutParams(android.content.Context!, android.util.AttributeSet!);
+ ctor public GridLayoutManager.LayoutParams(int, int);
+ ctor public GridLayoutManager.LayoutParams(android.view.ViewGroup.MarginLayoutParams!);
+ ctor public GridLayoutManager.LayoutParams(android.view.ViewGroup.LayoutParams!);
+ ctor public GridLayoutManager.LayoutParams(androidx.recyclerview.widget.RecyclerView.LayoutParams!);
+ method public int getSpanIndex();
+ method public int getSpanSize();
+ field public static final int INVALID_SPAN_ID = -1; // 0xffffffff
+ }
+
+ public abstract static class GridLayoutManager.SpanSizeLookup {
+ ctor public GridLayoutManager.SpanSizeLookup();
+ method public int getSpanGroupIndex(int, int);
+ method public int getSpanIndex(int, int);
+ method public abstract int getSpanSize(int);
+ method public void invalidateSpanGroupIndexCache();
+ method public void invalidateSpanIndexCache();
+ method public boolean isSpanGroupIndexCacheEnabled();
+ method public boolean isSpanIndexCacheEnabled();
+ method public void setSpanGroupIndexCacheEnabled(boolean);
+ method public void setSpanIndexCacheEnabled(boolean);
+ }
+
+ public class ItemTouchHelper extends androidx.recyclerview.widget.RecyclerView.ItemDecoration implements androidx.recyclerview.widget.RecyclerView.OnChildAttachStateChangeListener {
+ ctor public ItemTouchHelper(androidx.recyclerview.widget.ItemTouchHelper.Callback);
+ method public void attachToRecyclerView(androidx.recyclerview.widget.RecyclerView?);
+ method public void onChildViewAttachedToWindow(android.view.View);
+ method public void onChildViewDetachedFromWindow(android.view.View);
+ method public void startDrag(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public void startSwipe(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ field public static final int ACTION_STATE_DRAG = 2; // 0x2
+ field public static final int ACTION_STATE_IDLE = 0; // 0x0
+ field public static final int ACTION_STATE_SWIPE = 1; // 0x1
+ field public static final int ANIMATION_TYPE_DRAG = 8; // 0x8
+ field public static final int ANIMATION_TYPE_SWIPE_CANCEL = 4; // 0x4
+ field public static final int ANIMATION_TYPE_SWIPE_SUCCESS = 2; // 0x2
+ field public static final int DOWN = 2; // 0x2
+ field public static final int END = 32; // 0x20
+ field public static final int LEFT = 4; // 0x4
+ field public static final int RIGHT = 8; // 0x8
+ field public static final int START = 16; // 0x10
+ field public static final int UP = 1; // 0x1
+ }
+
+ public abstract static class ItemTouchHelper.Callback {
+ ctor public ItemTouchHelper.Callback();
+ method public boolean canDropOver(androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.ViewHolder, androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public androidx.recyclerview.widget.RecyclerView.ViewHolder! chooseDropTarget(androidx.recyclerview.widget.RecyclerView.ViewHolder, java.util.List<androidx.recyclerview.widget.RecyclerView.ViewHolder!>, int, int);
+ method public void clearView(androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public int convertToAbsoluteDirection(int, int);
+ method public static int convertToRelativeDirection(int, int);
+ method public long getAnimationDuration(androidx.recyclerview.widget.RecyclerView, int, float, float);
+ method public int getBoundingBoxMargin();
+ method public static androidx.recyclerview.widget.ItemTouchUIUtil getDefaultUIUtil();
+ method public float getMoveThreshold(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public abstract int getMovementFlags(androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public float getSwipeEscapeVelocity(float);
+ method public float getSwipeThreshold(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public float getSwipeVelocityThreshold(float);
+ method public int interpolateOutOfBoundsScroll(androidx.recyclerview.widget.RecyclerView, int, int, int, long);
+ method public boolean isItemViewSwipeEnabled();
+ method public boolean isLongPressDragEnabled();
+ method public static int makeFlag(int, int);
+ method public static int makeMovementFlags(int, int);
+ method public void onChildDraw(android.graphics.Canvas, androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.ViewHolder, float, float, int, boolean);
+ method public void onChildDrawOver(android.graphics.Canvas, androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.ViewHolder!, float, float, int, boolean);
+ method public abstract boolean onMove(androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.ViewHolder, androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public void onMoved(androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.ViewHolder, int, androidx.recyclerview.widget.RecyclerView.ViewHolder, int, int, int);
+ method public void onSelectedChanged(androidx.recyclerview.widget.RecyclerView.ViewHolder?, int);
+ method public abstract void onSwiped(androidx.recyclerview.widget.RecyclerView.ViewHolder, int);
+ field public static final int DEFAULT_DRAG_ANIMATION_DURATION = 200; // 0xc8
+ field public static final int DEFAULT_SWIPE_ANIMATION_DURATION = 250; // 0xfa
+ }
+
+ public abstract static class ItemTouchHelper.SimpleCallback extends androidx.recyclerview.widget.ItemTouchHelper.Callback {
+ ctor public ItemTouchHelper.SimpleCallback(int, int);
+ method public int getDragDirs(androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public int getMovementFlags(androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public int getSwipeDirs(androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public void setDefaultDragDirs(int);
+ method public void setDefaultSwipeDirs(int);
+ }
+
+ public static interface ItemTouchHelper.ViewDropHandler {
+ method public void prepareForDrop(android.view.View, android.view.View, int, int);
+ }
+
+ public interface ItemTouchUIUtil {
+ method public void clearView(android.view.View!);
+ method public void onDraw(android.graphics.Canvas!, androidx.recyclerview.widget.RecyclerView!, android.view.View!, float, float, int, boolean);
+ method public void onDrawOver(android.graphics.Canvas!, androidx.recyclerview.widget.RecyclerView!, android.view.View!, float, float, int, boolean);
+ method public void onSelected(android.view.View!);
+ }
+
+ public class LinearLayoutManager extends androidx.recyclerview.widget.RecyclerView.LayoutManager implements androidx.recyclerview.widget.ItemTouchHelper.ViewDropHandler androidx.recyclerview.widget.RecyclerView.SmoothScroller.ScrollVectorProvider {
+ ctor public LinearLayoutManager(android.content.Context!);
+ ctor public LinearLayoutManager(android.content.Context!, @androidx.recyclerview.widget.RecyclerView.Orientation int, boolean);
+ ctor public LinearLayoutManager(android.content.Context!, android.util.AttributeSet!, int, int);
+ method protected void calculateExtraLayoutSpace(androidx.recyclerview.widget.RecyclerView.State, int[]);
+ method public android.graphics.PointF! computeScrollVectorForPosition(int);
+ method public int findFirstCompletelyVisibleItemPosition();
+ method public int findFirstVisibleItemPosition();
+ method public int findLastCompletelyVisibleItemPosition();
+ method public int findLastVisibleItemPosition();
+ method public androidx.recyclerview.widget.RecyclerView.LayoutParams! generateDefaultLayoutParams();
+ method @Deprecated protected int getExtraLayoutSpace(androidx.recyclerview.widget.RecyclerView.State!);
+ method public int getInitialPrefetchItemCount();
+ method @androidx.recyclerview.widget.RecyclerView.Orientation public int getOrientation();
+ method public boolean getRecycleChildrenOnDetach();
+ method public boolean getReverseLayout();
+ method public boolean getStackFromEnd();
+ method protected boolean isLayoutRTL();
+ method public boolean isSmoothScrollbarEnabled();
+ method public void prepareForDrop(android.view.View, android.view.View, int, int);
+ method public void scrollToPositionWithOffset(int, int);
+ method public void setInitialPrefetchItemCount(int);
+ method public void setOrientation(@androidx.recyclerview.widget.RecyclerView.Orientation int);
+ method public void setRecycleChildrenOnDetach(boolean);
+ method public void setReverseLayout(boolean);
+ method public void setSmoothScrollbarEnabled(boolean);
+ method public void setStackFromEnd(boolean);
+ field public static final int HORIZONTAL = 0; // 0x0
+ field public static final int INVALID_OFFSET = -2147483648; // 0x80000000
+ field public static final int VERTICAL = 1; // 0x1
+ }
+
+ protected static class LinearLayoutManager.LayoutChunkResult {
+ ctor protected LinearLayoutManager.LayoutChunkResult();
+ field public int mConsumed;
+ field public boolean mFinished;
+ field public boolean mFocusable;
+ field public boolean mIgnoreConsumed;
+ }
+
+ public class LinearSmoothScroller extends androidx.recyclerview.widget.RecyclerView.SmoothScroller {
+ ctor public LinearSmoothScroller(android.content.Context!);
+ method public int calculateDtToFit(int, int, int, int, int);
+ method public int calculateDxToMakeVisible(android.view.View!, int);
+ method public int calculateDyToMakeVisible(android.view.View!, int);
+ method protected float calculateSpeedPerPixel(android.util.DisplayMetrics!);
+ method protected int calculateTimeForDeceleration(int);
+ method protected int calculateTimeForScrolling(int);
+ method protected int getHorizontalSnapPreference();
+ method protected int getVerticalSnapPreference();
+ method protected void onSeekTargetStep(int, int, androidx.recyclerview.widget.RecyclerView.State!, androidx.recyclerview.widget.RecyclerView.SmoothScroller.Action!);
+ method protected void onStart();
+ method protected void onStop();
+ method protected void onTargetFound(android.view.View!, androidx.recyclerview.widget.RecyclerView.State!, androidx.recyclerview.widget.RecyclerView.SmoothScroller.Action!);
+ method protected void updateActionForInterimTarget(androidx.recyclerview.widget.RecyclerView.SmoothScroller.Action!);
+ field public static final int SNAP_TO_ANY = 0; // 0x0
+ field public static final int SNAP_TO_END = 1; // 0x1
+ field public static final int SNAP_TO_START = -1; // 0xffffffff
+ field protected final android.view.animation.DecelerateInterpolator! mDecelerateInterpolator;
+ field protected int mInterimTargetDx;
+ field protected int mInterimTargetDy;
+ field protected final android.view.animation.LinearInterpolator! mLinearInterpolator;
+ field protected android.graphics.PointF! mTargetVector;
+ }
+
+ public class LinearSnapHelper extends androidx.recyclerview.widget.SnapHelper {
+ ctor public LinearSnapHelper();
+ method public int[]! calculateDistanceToFinalSnap(androidx.recyclerview.widget.RecyclerView.LayoutManager, android.view.View);
+ method public android.view.View! findSnapView(androidx.recyclerview.widget.RecyclerView.LayoutManager!);
+ method public int findTargetSnapPosition(androidx.recyclerview.widget.RecyclerView.LayoutManager!, int, int);
+ }
+
+ public abstract class ListAdapter<T, VH extends androidx.recyclerview.widget.RecyclerView.ViewHolder> extends androidx.recyclerview.widget.RecyclerView.Adapter<VH> {
+ ctor protected ListAdapter(androidx.recyclerview.widget.DiffUtil.ItemCallback<T!>);
+ ctor protected ListAdapter(androidx.recyclerview.widget.AsyncDifferConfig<T!>);
+ method public java.util.List<T!> getCurrentList();
+ method protected T! getItem(int);
+ method public int getItemCount();
+ method public void onCurrentListChanged(java.util.List<T!>, java.util.List<T!>);
+ method public void submitList(java.util.List<T!>?);
+ method public void submitList(java.util.List<T!>?, Runnable?);
+ }
+
+ public interface ListUpdateCallback {
+ method public void onChanged(int, int, Object?);
+ method public void onInserted(int, int);
+ method public void onMoved(int, int);
+ method public void onRemoved(int, int);
+ }
+
+ public abstract class OrientationHelper {
+ method public static androidx.recyclerview.widget.OrientationHelper! createHorizontalHelper(androidx.recyclerview.widget.RecyclerView.LayoutManager!);
+ method public static androidx.recyclerview.widget.OrientationHelper! createOrientationHelper(androidx.recyclerview.widget.RecyclerView.LayoutManager!, @androidx.recyclerview.widget.RecyclerView.Orientation int);
+ method public static androidx.recyclerview.widget.OrientationHelper! createVerticalHelper(androidx.recyclerview.widget.RecyclerView.LayoutManager!);
+ method public abstract int getDecoratedEnd(android.view.View!);
+ method public abstract int getDecoratedMeasurement(android.view.View!);
+ method public abstract int getDecoratedMeasurementInOther(android.view.View!);
+ method public abstract int getDecoratedStart(android.view.View!);
+ method public abstract int getEnd();
+ method public abstract int getEndAfterPadding();
+ method public abstract int getEndPadding();
+ method public androidx.recyclerview.widget.RecyclerView.LayoutManager! getLayoutManager();
+ method public abstract int getMode();
+ method public abstract int getModeInOther();
+ method public abstract int getStartAfterPadding();
+ method public abstract int getTotalSpace();
+ method public int getTotalSpaceChange();
+ method public abstract int getTransformedEndWithDecoration(android.view.View!);
+ method public abstract int getTransformedStartWithDecoration(android.view.View!);
+ method public abstract void offsetChild(android.view.View!, int);
+ method public abstract void offsetChildren(int);
+ method public void onLayoutComplete();
+ field public static final int HORIZONTAL = 0; // 0x0
+ field public static final int VERTICAL = 1; // 0x1
+ field protected final androidx.recyclerview.widget.RecyclerView.LayoutManager! mLayoutManager;
+ }
+
+ public class PagerSnapHelper extends androidx.recyclerview.widget.SnapHelper {
+ ctor public PagerSnapHelper();
+ method public int[]? calculateDistanceToFinalSnap(androidx.recyclerview.widget.RecyclerView.LayoutManager, android.view.View);
+ method public android.view.View? findSnapView(androidx.recyclerview.widget.RecyclerView.LayoutManager!);
+ method public int findTargetSnapPosition(androidx.recyclerview.widget.RecyclerView.LayoutManager!, int, int);
+ }
+
+ public class RecyclerView extends android.view.ViewGroup implements androidx.core.view.NestedScrollingChild2 androidx.core.view.NestedScrollingChild3 androidx.core.view.ScrollingView {
+ ctor public RecyclerView(android.content.Context);
+ ctor public RecyclerView(android.content.Context, android.util.AttributeSet?);
+ ctor public RecyclerView(android.content.Context, android.util.AttributeSet?, int);
+ method public void addItemDecoration(androidx.recyclerview.widget.RecyclerView.ItemDecoration, int);
+ method public void addItemDecoration(androidx.recyclerview.widget.RecyclerView.ItemDecoration);
+ method public void addOnChildAttachStateChangeListener(androidx.recyclerview.widget.RecyclerView.OnChildAttachStateChangeListener);
+ method public void addOnItemTouchListener(androidx.recyclerview.widget.RecyclerView.OnItemTouchListener);
+ method public void addOnScrollListener(androidx.recyclerview.widget.RecyclerView.OnScrollListener);
+ method public void addRecyclerListener(androidx.recyclerview.widget.RecyclerView.RecyclerListener);
+ method public void clearOnChildAttachStateChangeListeners();
+ method public void clearOnScrollListeners();
+ method public int computeHorizontalScrollExtent();
+ method public int computeHorizontalScrollOffset();
+ method public int computeHorizontalScrollRange();
+ method public int computeVerticalScrollExtent();
+ method public int computeVerticalScrollOffset();
+ method public int computeVerticalScrollRange();
+ method public boolean dispatchNestedPreScroll(int, int, int[]!, int[]!, int);
+ method public boolean dispatchNestedScroll(int, int, int, int, int[]!, int);
+ method public final void dispatchNestedScroll(int, int, int, int, int[]!, int, int[]);
+ method public boolean drawChild(android.graphics.Canvas!, android.view.View!, long);
+ method public android.view.View? findChildViewUnder(float, float);
+ method public android.view.View? findContainingItemView(android.view.View);
+ method public androidx.recyclerview.widget.RecyclerView.ViewHolder? findContainingViewHolder(android.view.View);
+ method public androidx.recyclerview.widget.RecyclerView.ViewHolder? findViewHolderForAdapterPosition(int);
+ method public androidx.recyclerview.widget.RecyclerView.ViewHolder! findViewHolderForItemId(long);
+ method public androidx.recyclerview.widget.RecyclerView.ViewHolder? findViewHolderForLayoutPosition(int);
+ method @Deprecated public androidx.recyclerview.widget.RecyclerView.ViewHolder? findViewHolderForPosition(int);
+ method public boolean fling(int, int);
+ method public androidx.recyclerview.widget.RecyclerView.Adapter? getAdapter();
+ method public int getChildAdapterPosition(android.view.View);
+ method public long getChildItemId(android.view.View);
+ method public int getChildLayoutPosition(android.view.View);
+ method @Deprecated public int getChildPosition(android.view.View);
+ method public androidx.recyclerview.widget.RecyclerView.ViewHolder! getChildViewHolder(android.view.View);
+ method public androidx.recyclerview.widget.RecyclerViewAccessibilityDelegate? getCompatAccessibilityDelegate();
+ method public void getDecoratedBoundsWithMargins(android.view.View, android.graphics.Rect);
+ method public androidx.recyclerview.widget.RecyclerView.EdgeEffectFactory getEdgeEffectFactory();
+ method public androidx.recyclerview.widget.RecyclerView.ItemAnimator? getItemAnimator();
+ method public androidx.recyclerview.widget.RecyclerView.ItemDecoration getItemDecorationAt(int);
+ method public int getItemDecorationCount();
+ method public androidx.recyclerview.widget.RecyclerView.LayoutManager? getLayoutManager();
+ method public int getMaxFlingVelocity();
+ method public int getMinFlingVelocity();
+ method public androidx.recyclerview.widget.RecyclerView.OnFlingListener? getOnFlingListener();
+ method public boolean getPreserveFocusAfterLayout();
+ method public androidx.recyclerview.widget.RecyclerView.RecycledViewPool getRecycledViewPool();
+ method public int getScrollState();
+ method public boolean hasFixedSize();
+ method public boolean hasNestedScrollingParent(int);
+ method public boolean hasPendingAdapterUpdates();
+ method public void invalidateItemDecorations();
+ method public boolean isAnimating();
+ method public boolean isComputingLayout();
+ method @Deprecated public boolean isLayoutFrozen();
+ method public final boolean isLayoutSuppressed();
+ method public void nestedScrollBy(int, int);
+ method public void offsetChildrenHorizontal(@Px int);
+ method public void offsetChildrenVertical(@Px int);
+ method public void onChildAttachedToWindow(android.view.View);
+ method public void onChildDetachedFromWindow(android.view.View);
+ method public void onDraw(android.graphics.Canvas!);
+ method public void onScrollStateChanged(int);
+ method public void onScrolled(@Px int, @Px int);
+ method public void removeItemDecoration(androidx.recyclerview.widget.RecyclerView.ItemDecoration);
+ method public void removeItemDecorationAt(int);
+ method public void removeOnChildAttachStateChangeListener(androidx.recyclerview.widget.RecyclerView.OnChildAttachStateChangeListener);
+ method public void removeOnItemTouchListener(androidx.recyclerview.widget.RecyclerView.OnItemTouchListener);
+ method public void removeOnScrollListener(androidx.recyclerview.widget.RecyclerView.OnScrollListener);
+ method public void removeRecyclerListener(androidx.recyclerview.widget.RecyclerView.RecyclerListener);
+ method public void scrollToPosition(int);
+ method public void setAccessibilityDelegateCompat(androidx.recyclerview.widget.RecyclerViewAccessibilityDelegate?);
+ method public void setAdapter(androidx.recyclerview.widget.RecyclerView.Adapter?);
+ method public void setChildDrawingOrderCallback(androidx.recyclerview.widget.RecyclerView.ChildDrawingOrderCallback?);
+ method public void setEdgeEffectFactory(androidx.recyclerview.widget.RecyclerView.EdgeEffectFactory);
+ method public void setHasFixedSize(boolean);
+ method public void setItemAnimator(androidx.recyclerview.widget.RecyclerView.ItemAnimator?);
+ method public void setItemViewCacheSize(int);
+ method @Deprecated public void setLayoutFrozen(boolean);
+ method public void setLayoutManager(androidx.recyclerview.widget.RecyclerView.LayoutManager?);
+ method @Deprecated public void setLayoutTransition(android.animation.LayoutTransition!);
+ method public void setOnFlingListener(androidx.recyclerview.widget.RecyclerView.OnFlingListener?);
+ method @Deprecated public void setOnScrollListener(androidx.recyclerview.widget.RecyclerView.OnScrollListener?);
+ method public void setPreserveFocusAfterLayout(boolean);
+ method public void setRecycledViewPool(androidx.recyclerview.widget.RecyclerView.RecycledViewPool?);
+ method @Deprecated public void setRecyclerListener(androidx.recyclerview.widget.RecyclerView.RecyclerListener?);
+ method public void setScrollingTouchSlop(int);
+ method public void setViewCacheExtension(androidx.recyclerview.widget.RecyclerView.ViewCacheExtension?);
+ method public void smoothScrollBy(@Px int, @Px int);
+ method public void smoothScrollBy(@Px int, @Px int, android.view.animation.Interpolator?);
+ method public void smoothScrollBy(@Px int, @Px int, android.view.animation.Interpolator?, int);
+ method public void smoothScrollToPosition(int);
+ method public boolean startNestedScroll(int, int);
+ method public void stopNestedScroll(int);
+ method public void stopScroll();
+ method public final void suppressLayout(boolean);
+ method public void swapAdapter(androidx.recyclerview.widget.RecyclerView.Adapter?, boolean);
+ field public static final int HORIZONTAL = 0; // 0x0
+ field public static final int INVALID_TYPE = -1; // 0xffffffff
+ field public static final long NO_ID = -1L; // 0xffffffffffffffffL
+ field public static final int NO_POSITION = -1; // 0xffffffff
+ field public static final int SCROLL_STATE_DRAGGING = 1; // 0x1
+ field public static final int SCROLL_STATE_IDLE = 0; // 0x0
+ field public static final int SCROLL_STATE_SETTLING = 2; // 0x2
+ field public static final int TOUCH_SLOP_DEFAULT = 0; // 0x0
+ field public static final int TOUCH_SLOP_PAGING = 1; // 0x1
+ field public static final int UNDEFINED_DURATION = -2147483648; // 0x80000000
+ field public static final int VERTICAL = 1; // 0x1
+ }
+
+ public abstract static class RecyclerView.Adapter<VH extends androidx.recyclerview.widget.RecyclerView.ViewHolder> {
+ ctor public RecyclerView.Adapter();
+ method public final void bindViewHolder(VH, int);
+ method public final VH createViewHolder(android.view.ViewGroup, int);
+ method public int findRelativeAdapterPositionIn(androidx.recyclerview.widget.RecyclerView.Adapter<? extends androidx.recyclerview.widget.RecyclerView.ViewHolder>, androidx.recyclerview.widget.RecyclerView.ViewHolder, int);
+ method public abstract int getItemCount();
+ method public long getItemId(int);
+ method public int getItemViewType(int);
+ method public final androidx.recyclerview.widget.RecyclerView.Adapter.StateRestorationPolicy getStateRestorationPolicy();
+ method public final boolean hasObservers();
+ method public final boolean hasStableIds();
+ method public final void notifyDataSetChanged();
+ method public final void notifyItemChanged(int);
+ method public final void notifyItemChanged(int, Object?);
+ method public final void notifyItemInserted(int);
+ method public final void notifyItemMoved(int, int);
+ method public final void notifyItemRangeChanged(int, int);
+ method public final void notifyItemRangeChanged(int, int, Object?);
+ method public final void notifyItemRangeInserted(int, int);
+ method public final void notifyItemRangeRemoved(int, int);
+ method public final void notifyItemRemoved(int);
+ method public void onAttachedToRecyclerView(androidx.recyclerview.widget.RecyclerView);
+ method public abstract void onBindViewHolder(VH, int);
+ method public void onBindViewHolder(VH, int, java.util.List<java.lang.Object!>);
+ method public abstract VH onCreateViewHolder(android.view.ViewGroup, int);
+ method public void onDetachedFromRecyclerView(androidx.recyclerview.widget.RecyclerView);
+ method public boolean onFailedToRecycleView(VH);
+ method public void onViewAttachedToWindow(VH);
+ method public void onViewDetachedFromWindow(VH);
+ method public void onViewRecycled(VH);
+ method public void registerAdapterDataObserver(androidx.recyclerview.widget.RecyclerView.AdapterDataObserver);
+ method public void setHasStableIds(boolean);
+ method public void setStateRestorationPolicy(androidx.recyclerview.widget.RecyclerView.Adapter.StateRestorationPolicy);
+ method public void unregisterAdapterDataObserver(androidx.recyclerview.widget.RecyclerView.AdapterDataObserver);
+ }
+
+ public enum RecyclerView.Adapter.StateRestorationPolicy {
+ enum_constant public static final androidx.recyclerview.widget.RecyclerView.Adapter.StateRestorationPolicy ALLOW;
+ enum_constant public static final androidx.recyclerview.widget.RecyclerView.Adapter.StateRestorationPolicy PREVENT;
+ enum_constant public static final androidx.recyclerview.widget.RecyclerView.Adapter.StateRestorationPolicy PREVENT_WHEN_EMPTY;
+ }
+
+ public abstract static class RecyclerView.AdapterDataObserver {
+ ctor public RecyclerView.AdapterDataObserver();
+ method public void onChanged();
+ method public void onItemRangeChanged(int, int);
+ method public void onItemRangeChanged(int, int, Object?);
+ method public void onItemRangeInserted(int, int);
+ method public void onItemRangeMoved(int, int, int);
+ method public void onItemRangeRemoved(int, int);
+ method public void onStateRestorationPolicyChanged();
+ }
+
+ public static interface RecyclerView.ChildDrawingOrderCallback {
+ method public int onGetChildDrawingOrder(int, int);
+ }
+
+ public static class RecyclerView.EdgeEffectFactory {
+ ctor public RecyclerView.EdgeEffectFactory();
+ method protected android.widget.EdgeEffect createEdgeEffect(androidx.recyclerview.widget.RecyclerView, @androidx.recyclerview.widget.RecyclerView.EdgeEffectFactory.EdgeDirection int);
+ field public static final int DIRECTION_BOTTOM = 3; // 0x3
+ field public static final int DIRECTION_LEFT = 0; // 0x0
+ field public static final int DIRECTION_RIGHT = 2; // 0x2
+ field public static final int DIRECTION_TOP = 1; // 0x1
+ }
+
+ @IntDef({androidx.recyclerview.widget.RecyclerView.EdgeEffectFactory.DIRECTION_LEFT, androidx.recyclerview.widget.RecyclerView.EdgeEffectFactory.DIRECTION_TOP, androidx.recyclerview.widget.RecyclerView.EdgeEffectFactory.DIRECTION_RIGHT, androidx.recyclerview.widget.RecyclerView.EdgeEffectFactory.DIRECTION_BOTTOM}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface RecyclerView.EdgeEffectFactory.EdgeDirection {
+ }
+
+ public abstract static class RecyclerView.ItemAnimator {
+ ctor public RecyclerView.ItemAnimator();
+ method public abstract boolean animateAppearance(androidx.recyclerview.widget.RecyclerView.ViewHolder, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo?, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo);
+ method public abstract boolean animateChange(androidx.recyclerview.widget.RecyclerView.ViewHolder, androidx.recyclerview.widget.RecyclerView.ViewHolder, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo);
+ method public abstract boolean animateDisappearance(androidx.recyclerview.widget.RecyclerView.ViewHolder, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo?);
+ method public abstract boolean animatePersistence(androidx.recyclerview.widget.RecyclerView.ViewHolder, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo);
+ method public boolean canReuseUpdatedViewHolder(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public boolean canReuseUpdatedViewHolder(androidx.recyclerview.widget.RecyclerView.ViewHolder, java.util.List<java.lang.Object!>);
+ method public final void dispatchAnimationFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public final void dispatchAnimationStarted(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public final void dispatchAnimationsFinished();
+ method public abstract void endAnimation(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public abstract void endAnimations();
+ method public long getAddDuration();
+ method public long getChangeDuration();
+ method public long getMoveDuration();
+ method public long getRemoveDuration();
+ method public abstract boolean isRunning();
+ method public final boolean isRunning(androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemAnimatorFinishedListener?);
+ method public androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo obtainHolderInfo();
+ method public void onAnimationFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public void onAnimationStarted(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo recordPostLayoutInformation(androidx.recyclerview.widget.RecyclerView.State, androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo recordPreLayoutInformation(androidx.recyclerview.widget.RecyclerView.State, androidx.recyclerview.widget.RecyclerView.ViewHolder, @androidx.recyclerview.widget.RecyclerView.ItemAnimator.AdapterChanges int, java.util.List<java.lang.Object!>);
+ method public abstract void runPendingAnimations();
+ method public void setAddDuration(long);
+ method public void setChangeDuration(long);
+ method public void setMoveDuration(long);
+ method public void setRemoveDuration(long);
+ field public static final int FLAG_APPEARED_IN_PRE_LAYOUT = 4096; // 0x1000
+ field public static final int FLAG_CHANGED = 2; // 0x2
+ field public static final int FLAG_INVALIDATED = 4; // 0x4
+ field public static final int FLAG_MOVED = 2048; // 0x800
+ field public static final int FLAG_REMOVED = 8; // 0x8
+ }
+
+ @IntDef(flag=true, value={androidx.recyclerview.widget.RecyclerView.ItemAnimator.FLAG_CHANGED, androidx.recyclerview.widget.RecyclerView.ItemAnimator.FLAG_REMOVED, androidx.recyclerview.widget.RecyclerView.ItemAnimator.FLAG_MOVED, androidx.recyclerview.widget.RecyclerView.ItemAnimator.FLAG_INVALIDATED, androidx.recyclerview.widget.RecyclerView.ItemAnimator.FLAG_APPEARED_IN_PRE_LAYOUT}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface RecyclerView.ItemAnimator.AdapterChanges {
+ }
+
+ public static interface RecyclerView.ItemAnimator.ItemAnimatorFinishedListener {
+ method public void onAnimationsFinished();
+ }
+
+ public static class RecyclerView.ItemAnimator.ItemHolderInfo {
+ ctor public RecyclerView.ItemAnimator.ItemHolderInfo();
+ method public androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo setFrom(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ method public androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo setFrom(androidx.recyclerview.widget.RecyclerView.ViewHolder, @androidx.recyclerview.widget.RecyclerView.ItemAnimator.AdapterChanges int);
+ field public int bottom;
+ field @androidx.recyclerview.widget.RecyclerView.ItemAnimator.AdapterChanges public int changeFlags;
+ field public int left;
+ field public int right;
+ field public int top;
+ }
+
+ public abstract static class RecyclerView.ItemDecoration {
+ ctor public RecyclerView.ItemDecoration();
+ method @Deprecated public void getItemOffsets(android.graphics.Rect, int, androidx.recyclerview.widget.RecyclerView);
+ method public void getItemOffsets(android.graphics.Rect, android.view.View, androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.State);
+ method public void onDraw(android.graphics.Canvas, androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.State);
+ method @Deprecated public void onDraw(android.graphics.Canvas, androidx.recyclerview.widget.RecyclerView);
+ method public void onDrawOver(android.graphics.Canvas, androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.State);
+ method @Deprecated public void onDrawOver(android.graphics.Canvas, androidx.recyclerview.widget.RecyclerView);
+ }
+
+ public abstract static class RecyclerView.LayoutManager {
+ ctor public RecyclerView.LayoutManager();
+ method public void addDisappearingView(android.view.View!);
+ method public void addDisappearingView(android.view.View!, int);
+ method public void addView(android.view.View!);
+ method public void addView(android.view.View!, int);
+ method public void assertInLayoutOrScroll(String!);
+ method public void assertNotInLayoutOrScroll(String!);
+ method public void attachView(android.view.View, int, androidx.recyclerview.widget.RecyclerView.LayoutParams!);
+ method public void attachView(android.view.View, int);
+ method public void attachView(android.view.View);
+ method public void calculateItemDecorationsForChild(android.view.View, android.graphics.Rect);
+ method public boolean canScrollHorizontally();
+ method public boolean canScrollVertically();
+ method public boolean checkLayoutParams(androidx.recyclerview.widget.RecyclerView.LayoutParams!);
+ method public static int chooseSize(int, int, int);
+ method public void collectAdjacentPrefetchPositions(int, int, androidx.recyclerview.widget.RecyclerView.State!, androidx.recyclerview.widget.RecyclerView.LayoutManager.LayoutPrefetchRegistry!);
+ method public void collectInitialPrefetchPositions(int, androidx.recyclerview.widget.RecyclerView.LayoutManager.LayoutPrefetchRegistry!);
+ method public int computeHorizontalScrollExtent(androidx.recyclerview.widget.RecyclerView.State);
+ method public int computeHorizontalScrollOffset(androidx.recyclerview.widget.RecyclerView.State);
+ method public int computeHorizontalScrollRange(androidx.recyclerview.widget.RecyclerView.State);
+ method public int computeVerticalScrollExtent(androidx.recyclerview.widget.RecyclerView.State);
+ method public int computeVerticalScrollOffset(androidx.recyclerview.widget.RecyclerView.State);
+ method public int computeVerticalScrollRange(androidx.recyclerview.widget.RecyclerView.State);
+ method public void detachAndScrapAttachedViews(androidx.recyclerview.widget.RecyclerView.Recycler);
+ method public void detachAndScrapView(android.view.View, androidx.recyclerview.widget.RecyclerView.Recycler);
+ method public void detachAndScrapViewAt(int, androidx.recyclerview.widget.RecyclerView.Recycler);
+ method public void detachView(android.view.View);
+ method public void detachViewAt(int);
+ method public void endAnimation(android.view.View!);
+ method public android.view.View? findContainingItemView(android.view.View);
+ method public android.view.View? findViewByPosition(int);
+ method public abstract androidx.recyclerview.widget.RecyclerView.LayoutParams! generateDefaultLayoutParams();
+ method public androidx.recyclerview.widget.RecyclerView.LayoutParams! generateLayoutParams(android.view.ViewGroup.LayoutParams!);
+ method public androidx.recyclerview.widget.RecyclerView.LayoutParams! generateLayoutParams(android.content.Context!, android.util.AttributeSet!);
+ method public int getBaseline();
+ method public int getBottomDecorationHeight(android.view.View);
+ method public android.view.View? getChildAt(int);
+ method public int getChildCount();
+ method @Deprecated public static int getChildMeasureSpec(int, int, int, boolean);
+ method public static int getChildMeasureSpec(int, int, int, int, boolean);
+ method public boolean getClipToPadding();
+ method public int getColumnCountForAccessibility(androidx.recyclerview.widget.RecyclerView.Recycler, androidx.recyclerview.widget.RecyclerView.State);
+ method public int getDecoratedBottom(android.view.View);
+ method public void getDecoratedBoundsWithMargins(android.view.View, android.graphics.Rect);
+ method public int getDecoratedLeft(android.view.View);
+ method public int getDecoratedMeasuredHeight(android.view.View);
+ method public int getDecoratedMeasuredWidth(android.view.View);
+ method public int getDecoratedRight(android.view.View);
+ method public int getDecoratedTop(android.view.View);
+ method public android.view.View? getFocusedChild();
+ method @Px public int getHeight();
+ method public int getHeightMode();
+ method public int getItemCount();
+ method public int getItemViewType(android.view.View);
+ method public int getLayoutDirection();
+ method public int getLeftDecorationWidth(android.view.View);
+ method @Px public int getMinimumHeight();
+ method @Px public int getMinimumWidth();
+ method @Px public int getPaddingBottom();
+ method @Px public int getPaddingEnd();
+ method @Px public int getPaddingLeft();
+ method @Px public int getPaddingRight();
+ method @Px public int getPaddingStart();
+ method @Px public int getPaddingTop();
+ method public int getPosition(android.view.View);
+ method public static androidx.recyclerview.widget.RecyclerView.LayoutManager.Properties! getProperties(android.content.Context, android.util.AttributeSet?, int, int);
+ method public int getRightDecorationWidth(android.view.View);
+ method public int getRowCountForAccessibility(androidx.recyclerview.widget.RecyclerView.Recycler, androidx.recyclerview.widget.RecyclerView.State);
+ method public int getSelectionModeForAccessibility(androidx.recyclerview.widget.RecyclerView.Recycler, androidx.recyclerview.widget.RecyclerView.State);
+ method public int getTopDecorationHeight(android.view.View);
+ method public void getTransformedBoundingBox(android.view.View, boolean, android.graphics.Rect);
+ method @Px public int getWidth();
+ method public int getWidthMode();
+ method public boolean hasFocus();
+ method public void ignoreView(android.view.View);
+ method public boolean isAttachedToWindow();
+ method public boolean isAutoMeasureEnabled();
+ method public boolean isFocused();
+ method public final boolean isItemPrefetchEnabled();
+ method public boolean isLayoutHierarchical(androidx.recyclerview.widget.RecyclerView.Recycler, androidx.recyclerview.widget.RecyclerView.State);
+ method public boolean isMeasurementCacheEnabled();
+ method public boolean isSmoothScrolling();
+ method public boolean isViewPartiallyVisible(android.view.View, boolean, boolean);
+ method public void layoutDecorated(android.view.View, int, int, int, int);
+ method public void layoutDecoratedWithMargins(android.view.View, int, int, int, int);
+ method public void measureChild(android.view.View, int, int);
+ method public void measureChildWithMargins(android.view.View, int, int);
+ method public void moveView(int, int);
+ method public void offsetChildrenHorizontal(@Px int);
+ method public void offsetChildrenVertical(@Px int);
+ method public void onAdapterChanged(androidx.recyclerview.widget.RecyclerView.Adapter?, androidx.recyclerview.widget.RecyclerView.Adapter?);
+ method public boolean onAddFocusables(androidx.recyclerview.widget.RecyclerView, java.util.ArrayList<android.view.View!>, int, int);
+ method @CallSuper public void onAttachedToWindow(androidx.recyclerview.widget.RecyclerView!);
+ method @Deprecated public void onDetachedFromWindow(androidx.recyclerview.widget.RecyclerView!);
+ method @CallSuper public void onDetachedFromWindow(androidx.recyclerview.widget.RecyclerView!, androidx.recyclerview.widget.RecyclerView.Recycler!);
+ method public android.view.View? onFocusSearchFailed(android.view.View, int, androidx.recyclerview.widget.RecyclerView.Recycler, androidx.recyclerview.widget.RecyclerView.State);
+ method public void onInitializeAccessibilityEvent(android.view.accessibility.AccessibilityEvent);
+ method public void onInitializeAccessibilityEvent(androidx.recyclerview.widget.RecyclerView.Recycler, androidx.recyclerview.widget.RecyclerView.State, android.view.accessibility.AccessibilityEvent);
+ method public void onInitializeAccessibilityNodeInfo(androidx.recyclerview.widget.RecyclerView.Recycler, androidx.recyclerview.widget.RecyclerView.State, androidx.core.view.accessibility.AccessibilityNodeInfoCompat);
+ method public void onInitializeAccessibilityNodeInfoForItem(androidx.recyclerview.widget.RecyclerView.Recycler, androidx.recyclerview.widget.RecyclerView.State, android.view.View, androidx.core.view.accessibility.AccessibilityNodeInfoCompat);
+ method public android.view.View? onInterceptFocusSearch(android.view.View, int);
+ method public void onItemsAdded(androidx.recyclerview.widget.RecyclerView, int, int);
+ method public void onItemsChanged(androidx.recyclerview.widget.RecyclerView);
+ method public void onItemsMoved(androidx.recyclerview.widget.RecyclerView, int, int, int);
+ method public void onItemsRemoved(androidx.recyclerview.widget.RecyclerView, int, int);
+ method public void onItemsUpdated(androidx.recyclerview.widget.RecyclerView, int, int);
+ method public void onItemsUpdated(androidx.recyclerview.widget.RecyclerView, int, int, Object?);
+ method public void onLayoutChildren(androidx.recyclerview.widget.RecyclerView.Recycler!, androidx.recyclerview.widget.RecyclerView.State!);
+ method public void onLayoutCompleted(androidx.recyclerview.widget.RecyclerView.State!);
+ method public void onMeasure(androidx.recyclerview.widget.RecyclerView.Recycler, androidx.recyclerview.widget.RecyclerView.State, int, int);
+ method @Deprecated public boolean onRequestChildFocus(androidx.recyclerview.widget.RecyclerView, android.view.View, android.view.View?);
+ method public boolean onRequestChildFocus(androidx.recyclerview.widget.RecyclerView, androidx.recyclerview.widget.RecyclerView.State, android.view.View, android.view.View?);
+ method public void onRestoreInstanceState(android.os.Parcelable!);
+ method public android.os.Parcelable? onSaveInstanceState();
+ method public void onScrollStateChanged(int);
+ method public boolean performAccessibilityAction(androidx.recyclerview.widget.RecyclerView.Recycler, androidx.recyclerview.widget.RecyclerView.State, int, android.os.Bundle?);
+ method public boolean performAccessibilityActionForItem(androidx.recyclerview.widget.RecyclerView.Recycler, androidx.recyclerview.widget.RecyclerView.State, android.view.View, int, android.os.Bundle?);
+ method public void postOnAnimation(Runnable!);
+ method public void removeAllViews();
+ method public void removeAndRecycleAllViews(androidx.recyclerview.widget.RecyclerView.Recycler);
+ method public void removeAndRecycleView(android.view.View, androidx.recyclerview.widget.RecyclerView.Recycler);
+ method public void removeAndRecycleViewAt(int, androidx.recyclerview.widget.RecyclerView.Recycler);
+ method public boolean removeCallbacks(Runnable!);
+ method public void removeDetachedView(android.view.View);
+ method public void removeView(android.view.View!);
+ method public void removeViewAt(int);
+ method public boolean requestChildRectangleOnScreen(androidx.recyclerview.widget.RecyclerView, android.view.View, android.graphics.Rect, boolean);
+ method public boolean requestChildRectangleOnScreen(androidx.recyclerview.widget.RecyclerView, android.view.View, android.graphics.Rect, boolean, boolean);
+ method public void requestLayout();
+ method public void requestSimpleAnimationsInNextLayout();
+ method public int scrollHorizontallyBy(int, androidx.recyclerview.widget.RecyclerView.Recycler!, androidx.recyclerview.widget.RecyclerView.State!);
+ method public void scrollToPosition(int);
+ method public int scrollVerticallyBy(int, androidx.recyclerview.widget.RecyclerView.Recycler!, androidx.recyclerview.widget.RecyclerView.State!);
+ method @Deprecated public void setAutoMeasureEnabled(boolean);
+ method public final void setItemPrefetchEnabled(boolean);
+ method public void setMeasuredDimension(android.graphics.Rect!, int, int);
+ method public void setMeasuredDimension(int, int);
+ method public void setMeasurementCacheEnabled(boolean);
+ method public void smoothScrollToPosition(androidx.recyclerview.widget.RecyclerView!, androidx.recyclerview.widget.RecyclerView.State!, int);
+ method public void startSmoothScroll(androidx.recyclerview.widget.RecyclerView.SmoothScroller!);
+ method public void stopIgnoringView(android.view.View);
+ method public boolean supportsPredictiveItemAnimations();
+ }
+
+ public static interface RecyclerView.LayoutManager.LayoutPrefetchRegistry {
+ method public void addPosition(int, int);
+ }
+
+ public static class RecyclerView.LayoutManager.Properties {
+ ctor public RecyclerView.LayoutManager.Properties();
+ field public int orientation;
+ field public boolean reverseLayout;
+ field public int spanCount;
+ field public boolean stackFromEnd;
+ }
+
+ public static class RecyclerView.LayoutParams extends android.view.ViewGroup.MarginLayoutParams {
+ ctor public RecyclerView.LayoutParams(android.content.Context!, android.util.AttributeSet!);
+ ctor public RecyclerView.LayoutParams(int, int);
+ ctor public RecyclerView.LayoutParams(android.view.ViewGroup.MarginLayoutParams!);
+ ctor public RecyclerView.LayoutParams(android.view.ViewGroup.LayoutParams!);
+ ctor public RecyclerView.LayoutParams(androidx.recyclerview.widget.RecyclerView.LayoutParams!);
+ method public int getAbsoluteAdapterPosition();
+ method public int getBindingAdapterPosition();
+ method @Deprecated public int getViewAdapterPosition();
+ method public int getViewLayoutPosition();
+ method @Deprecated public int getViewPosition();
+ method public boolean isItemChanged();
+ method public boolean isItemRemoved();
+ method public boolean isViewInvalid();
+ method public boolean viewNeedsUpdate();
+ }
+
+ public static interface RecyclerView.OnChildAttachStateChangeListener {
+ method public void onChildViewAttachedToWindow(android.view.View);
+ method public void onChildViewDetachedFromWindow(android.view.View);
+ }
+
+ public abstract static class RecyclerView.OnFlingListener {
+ ctor public RecyclerView.OnFlingListener();
+ method public abstract boolean onFling(int, int);
+ }
+
+ public static interface RecyclerView.OnItemTouchListener {
+ method public boolean onInterceptTouchEvent(androidx.recyclerview.widget.RecyclerView, android.view.MotionEvent);
+ method public void onRequestDisallowInterceptTouchEvent(boolean);
+ method public void onTouchEvent(androidx.recyclerview.widget.RecyclerView, android.view.MotionEvent);
+ }
+
+ public abstract static class RecyclerView.OnScrollListener {
+ ctor public RecyclerView.OnScrollListener();
+ method public void onScrollStateChanged(androidx.recyclerview.widget.RecyclerView, int);
+ method public void onScrolled(androidx.recyclerview.widget.RecyclerView, int, int);
+ }
+
+ @IntDef({androidx.recyclerview.widget.RecyclerView.HORIZONTAL, androidx.recyclerview.widget.RecyclerView.VERTICAL}) @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface RecyclerView.Orientation {
+ }
+
+ public static class RecyclerView.RecycledViewPool {
+ ctor public RecyclerView.RecycledViewPool();
+ method public void clear();
+ method public androidx.recyclerview.widget.RecyclerView.ViewHolder? getRecycledView(int);
+ method public int getRecycledViewCount(int);
+ method public void putRecycledView(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public void setMaxRecycledViews(int, int);
+ }
+
+ public final class RecyclerView.Recycler {
+ ctor public RecyclerView.Recycler();
+ method public void bindViewToPosition(android.view.View, int);
+ method public void clear();
+ method public int convertPreLayoutPositionToPostLayout(int);
+ method public java.util.List<androidx.recyclerview.widget.RecyclerView.ViewHolder!> getScrapList();
+ method public android.view.View getViewForPosition(int);
+ method public void recycleView(android.view.View);
+ method public void setViewCacheSize(int);
+ }
+
+ public static interface RecyclerView.RecyclerListener {
+ method public void onViewRecycled(androidx.recyclerview.widget.RecyclerView.ViewHolder);
+ }
+
+ public static class RecyclerView.SimpleOnItemTouchListener implements androidx.recyclerview.widget.RecyclerView.OnItemTouchListener {
+ ctor public RecyclerView.SimpleOnItemTouchListener();
+ method public boolean onInterceptTouchEvent(androidx.recyclerview.widget.RecyclerView, android.view.MotionEvent);
+ method public void onRequestDisallowInterceptTouchEvent(boolean);
+ method public void onTouchEvent(androidx.recyclerview.widget.RecyclerView, android.view.MotionEvent);
+ }
+
+ public abstract static class RecyclerView.SmoothScroller {
+ ctor public RecyclerView.SmoothScroller();
+ method public android.graphics.PointF? computeScrollVectorForPosition(int);
+ method public android.view.View! findViewByPosition(int);
+ method public int getChildCount();
+ method public int getChildPosition(android.view.View!);
+ method public androidx.recyclerview.widget.RecyclerView.LayoutManager? getLayoutManager();
+ method public int getTargetPosition();
+ method @Deprecated public void instantScrollToPosition(int);
+ method public boolean isPendingInitialRun();
+ method public boolean isRunning();
+ method protected void normalize(android.graphics.PointF);
+ method protected void onChildAttachedToWindow(android.view.View!);
+ method protected abstract void onSeekTargetStep(@Px int, @Px int, androidx.recyclerview.widget.RecyclerView.State, androidx.recyclerview.widget.RecyclerView.SmoothScroller.Action);
+ method protected abstract void onStart();
+ method protected abstract void onStop();
+ method protected abstract void onTargetFound(android.view.View, androidx.recyclerview.widget.RecyclerView.State, androidx.recyclerview.widget.RecyclerView.SmoothScroller.Action);
+ method public void setTargetPosition(int);
+ method protected final void stop();
+ }
+
+ public static class RecyclerView.SmoothScroller.Action {
+ ctor public RecyclerView.SmoothScroller.Action(@Px int, @Px int);
+ ctor public RecyclerView.SmoothScroller.Action(@Px int, @Px int, int);
+ ctor public RecyclerView.SmoothScroller.Action(@Px int, @Px int, int, android.view.animation.Interpolator?);
+ method public int getDuration();
+ method @Px public int getDx();
+ method @Px public int getDy();
+ method public android.view.animation.Interpolator? getInterpolator();
+ method public void jumpTo(int);
+ method public void setDuration(int);
+ method public void setDx(@Px int);
+ method public void setDy(@Px int);
+ method public void setInterpolator(android.view.animation.Interpolator?);
+ method public void update(@Px int, @Px int, int, android.view.animation.Interpolator?);
+ field public static final int UNDEFINED_DURATION = -2147483648; // 0x80000000
+ }
+
+ public static interface RecyclerView.SmoothScroller.ScrollVectorProvider {
+ method public android.graphics.PointF? computeScrollVectorForPosition(int);
+ }
+
+ public static class RecyclerView.State {
+ ctor public RecyclerView.State();
+ method public boolean didStructureChange();
+ method public <T> T! get(int);
+ method public int getItemCount();
+ method public int getRemainingScrollHorizontal();
+ method public int getRemainingScrollVertical();
+ method public int getTargetScrollPosition();
+ method public boolean hasTargetScrollPosition();
+ method public boolean isMeasuring();
+ method public boolean isPreLayout();
+ method public void put(int, Object!);
+ method public void remove(int);
+ method public boolean willRunPredictiveAnimations();
+ method public boolean willRunSimpleAnimations();
+ }
+
+ public abstract static class RecyclerView.ViewCacheExtension {
+ ctor public RecyclerView.ViewCacheExtension();
+ method public abstract android.view.View? getViewForPositionAndType(androidx.recyclerview.widget.RecyclerView.Recycler, int, int);
+ }
+
+ public abstract static class RecyclerView.ViewHolder {
+ ctor public RecyclerView.ViewHolder(android.view.View);
+ method public final int getAbsoluteAdapterPosition();
+ method @Deprecated public final int getAdapterPosition();
+ method public final androidx.recyclerview.widget.RecyclerView.Adapter<? extends androidx.recyclerview.widget.RecyclerView.ViewHolder>? getBindingAdapter();
+ method public final int getBindingAdapterPosition();
+ method public final long getItemId();
+ method public final int getItemViewType();
+ method public final int getLayoutPosition();
+ method public final int getOldPosition();
+ method @Deprecated public final int getPosition();
+ method public final boolean isRecyclable();
+ method public final void setIsRecyclable(boolean);
+ field public final android.view.View itemView;
+ }
+
+ public class RecyclerViewAccessibilityDelegate extends androidx.core.view.AccessibilityDelegateCompat {
+ ctor public RecyclerViewAccessibilityDelegate(androidx.recyclerview.widget.RecyclerView);
+ method public androidx.core.view.AccessibilityDelegateCompat getItemDelegate();
+ }
+
+ public static class RecyclerViewAccessibilityDelegate.ItemDelegate extends androidx.core.view.AccessibilityDelegateCompat {
+ ctor public RecyclerViewAccessibilityDelegate.ItemDelegate(androidx.recyclerview.widget.RecyclerViewAccessibilityDelegate);
+ }
+
+ public abstract class SimpleItemAnimator extends androidx.recyclerview.widget.RecyclerView.ItemAnimator {
+ ctor public SimpleItemAnimator();
+ method public abstract boolean animateAdd(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public boolean animateAppearance(androidx.recyclerview.widget.RecyclerView.ViewHolder, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo?, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo);
+ method public boolean animateChange(androidx.recyclerview.widget.RecyclerView.ViewHolder, androidx.recyclerview.widget.RecyclerView.ViewHolder, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo);
+ method public abstract boolean animateChange(androidx.recyclerview.widget.RecyclerView.ViewHolder!, androidx.recyclerview.widget.RecyclerView.ViewHolder!, int, int, int, int);
+ method public boolean animateDisappearance(androidx.recyclerview.widget.RecyclerView.ViewHolder, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo?);
+ method public abstract boolean animateMove(androidx.recyclerview.widget.RecyclerView.ViewHolder!, int, int, int, int);
+ method public boolean animatePersistence(androidx.recyclerview.widget.RecyclerView.ViewHolder, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo, androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo);
+ method public abstract boolean animateRemove(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public final void dispatchAddFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public final void dispatchAddStarting(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public final void dispatchChangeFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder!, boolean);
+ method public final void dispatchChangeStarting(androidx.recyclerview.widget.RecyclerView.ViewHolder!, boolean);
+ method public final void dispatchMoveFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public final void dispatchMoveStarting(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public final void dispatchRemoveFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public final void dispatchRemoveStarting(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public boolean getSupportsChangeAnimations();
+ method public void onAddFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public void onAddStarting(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public void onChangeFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder!, boolean);
+ method public void onChangeStarting(androidx.recyclerview.widget.RecyclerView.ViewHolder!, boolean);
+ method public void onMoveFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public void onMoveStarting(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public void onRemoveFinished(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public void onRemoveStarting(androidx.recyclerview.widget.RecyclerView.ViewHolder!);
+ method public void setSupportsChangeAnimations(boolean);
+ }
+
+ public abstract class SnapHelper extends androidx.recyclerview.widget.RecyclerView.OnFlingListener {
+ ctor public SnapHelper();
+ method public void attachToRecyclerView(androidx.recyclerview.widget.RecyclerView?) throws java.lang.IllegalStateException;
+ method public abstract int[]? calculateDistanceToFinalSnap(androidx.recyclerview.widget.RecyclerView.LayoutManager, android.view.View);
+ method public int[]! calculateScrollDistance(int, int);
+ method protected androidx.recyclerview.widget.RecyclerView.SmoothScroller? createScroller(androidx.recyclerview.widget.RecyclerView.LayoutManager);
+ method @Deprecated protected androidx.recyclerview.widget.LinearSmoothScroller? createSnapScroller(androidx.recyclerview.widget.RecyclerView.LayoutManager);
+ method public abstract android.view.View? findSnapView(androidx.recyclerview.widget.RecyclerView.LayoutManager!);
+ method public abstract int findTargetSnapPosition(androidx.recyclerview.widget.RecyclerView.LayoutManager!, int, int);
+ method public boolean onFling(int, int);
+ }
+
+ public class SortedList<T> {
+ ctor public SortedList(Class<T!>, androidx.recyclerview.widget.SortedList.Callback<T!>);
+ ctor public SortedList(Class<T!>, androidx.recyclerview.widget.SortedList.Callback<T!>, int);
+ method public int add(T!);
+ method public void addAll(T![], boolean);
+ method public void addAll(T!...);
+ method public void addAll(java.util.Collection<T!>);
+ method public void beginBatchedUpdates();
+ method public void clear();
+ method public void endBatchedUpdates();
+ method public T! get(int) throws java.lang.IndexOutOfBoundsException;
+ method public int indexOf(T!);
+ method public void recalculatePositionOfItemAt(int);
+ method public boolean remove(T!);
+ method public T! removeItemAt(int);
+ method public void replaceAll(T![], boolean);
+ method public void replaceAll(T!...);
+ method public void replaceAll(java.util.Collection<T!>);
+ method public int size();
+ method public void updateItemAt(int, T!);
+ field public static final int INVALID_POSITION = -1; // 0xffffffff
+ }
+
+ public static class SortedList.BatchedCallback<T2> extends androidx.recyclerview.widget.SortedList.Callback<T2> {
+ ctor public SortedList.BatchedCallback(androidx.recyclerview.widget.SortedList.Callback<T2!>!);
+ method public boolean areContentsTheSame(T2!, T2!);
+ method public boolean areItemsTheSame(T2!, T2!);
+ method public int compare(T2!, T2!);
+ method public void dispatchLastEvent();
+ method public void onChanged(int, int);
+ method public void onInserted(int, int);
+ method public void onMoved(int, int);
+ method public void onRemoved(int, int);
+ }
+
+ public abstract static class SortedList.Callback<T2> implements java.util.Comparator<T2> androidx.recyclerview.widget.ListUpdateCallback {
+ ctor public SortedList.Callback();
+ method public abstract boolean areContentsTheSame(T2!, T2!);
+ method public abstract boolean areItemsTheSame(T2!, T2!);
+ method public abstract int compare(T2!, T2!);
+ method public Object? getChangePayload(T2!, T2!);
+ method public abstract void onChanged(int, int);
+ method public void onChanged(int, int, Object!);
+ }
+
+ public abstract class SortedListAdapterCallback<T2> extends androidx.recyclerview.widget.SortedList.Callback<T2> {
+ ctor public SortedListAdapterCallback(androidx.recyclerview.widget.RecyclerView.Adapter!);
+ method public void onChanged(int, int);
+ method public void onInserted(int, int);
+ method public void onMoved(int, int);
+ method public void onRemoved(int, int);
+ }
+
+ public class StaggeredGridLayoutManager extends androidx.recyclerview.widget.RecyclerView.LayoutManager implements androidx.recyclerview.widget.RecyclerView.SmoothScroller.ScrollVectorProvider {
+ ctor public StaggeredGridLayoutManager(android.content.Context!, android.util.AttributeSet!, int, int);
+ ctor public StaggeredGridLayoutManager(int, int);
+ method public android.graphics.PointF! computeScrollVectorForPosition(int);
+ method public int[]! findFirstCompletelyVisibleItemPositions(int[]!);
+ method public int[]! findFirstVisibleItemPositions(int[]!);
+ method public int[]! findLastCompletelyVisibleItemPositions(int[]!);
+ method public int[]! findLastVisibleItemPositions(int[]!);
+ method public androidx.recyclerview.widget.RecyclerView.LayoutParams! generateDefaultLayoutParams();
+ method public int getGapStrategy();
+ method public int getOrientation();
+ method public boolean getReverseLayout();
+ method public int getSpanCount();
+ method public void invalidateSpanAssignments();
+ method public void scrollToPositionWithOffset(int, int);
+ method public void setGapStrategy(int);
+ method public void setOrientation(int);
+ method public void setReverseLayout(boolean);
+ method public void setSpanCount(int);
+ field @Deprecated public static final int GAP_HANDLING_LAZY = 1; // 0x1
+ field public static final int GAP_HANDLING_MOVE_ITEMS_BETWEEN_SPANS = 2; // 0x2
+ field public static final int GAP_HANDLING_NONE = 0; // 0x0
+ field public static final int HORIZONTAL = 0; // 0x0
+ field public static final int VERTICAL = 1; // 0x1
+ }
+
+ public static class StaggeredGridLayoutManager.LayoutParams extends androidx.recyclerview.widget.RecyclerView.LayoutParams {
+ ctor public StaggeredGridLayoutManager.LayoutParams(android.content.Context!, android.util.AttributeSet!);
+ ctor public StaggeredGridLayoutManager.LayoutParams(int, int);
+ ctor public StaggeredGridLayoutManager.LayoutParams(android.view.ViewGroup.MarginLayoutParams!);
+ ctor public StaggeredGridLayoutManager.LayoutParams(android.view.ViewGroup.LayoutParams!);
+ ctor public StaggeredGridLayoutManager.LayoutParams(androidx.recyclerview.widget.RecyclerView.LayoutParams!);
+ method public final int getSpanIndex();
+ method public boolean isFullSpan();
+ method public void setFullSpan(boolean);
+ field public static final int INVALID_SPAN_ID = -1; // 0xffffffff
+ }
+
+}
+
diff --git a/recyclerview/recyclerview/build.gradle b/recyclerview/recyclerview/build.gradle
index 7835c89..a44f788 100644
--- a/recyclerview/recyclerview/build.gradle
+++ b/recyclerview/recyclerview/build.gradle
@@ -11,7 +11,7 @@
dependencies {
api("androidx.annotation:annotation:1.1.0")
- api("androidx.core:core:1.3.0-alpha02")
+ api("androidx.core:core:1.3.2")
implementation("androidx.collection:collection:1.0.0")
api("androidx.customview:customview:1.0.0")
diff --git a/room/runtime/lint-baseline.xml b/room/runtime/lint-baseline.xml
index 31b6be0..45274d7 100644
--- a/room/runtime/lint-baseline.xml
+++ b/room/runtime/lint-baseline.xml
@@ -85,7 +85,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/room/RoomDatabase.java"
- line="528"
+ line="606"
column="40"/>
</issue>
@@ -96,7 +96,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/room/DatabaseConfiguration.java"
- line="166"
+ line="170"
column="13"/>
</issue>
@@ -107,7 +107,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/room/DatabaseConfiguration.java"
- line="211"
+ line="215"
column="13"/>
</issue>
@@ -118,7 +118,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/room/DatabaseConfiguration.java"
- line="261"
+ line="265"
column="13"/>
</issue>
@@ -162,7 +162,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/room/DatabaseConfiguration.java"
- line="163"
+ line="167"
column="13"/>
</issue>
@@ -173,7 +173,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/room/DatabaseConfiguration.java"
- line="205"
+ line="209"
column="13"/>
</issue>
@@ -184,7 +184,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/room/DatabaseConfiguration.java"
- line="253"
+ line="257"
column="13"/>
</issue>
@@ -580,7 +580,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/room/InvalidationTracker.java"
- line="120"
+ line="121"
column="32"/>
</issue>
@@ -591,7 +591,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/room/InvalidationTracker.java"
- line="120"
+ line="121"
column="55"/>
</issue>
@@ -602,7 +602,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/room/InvalidationTracker.java"
- line="132"
+ line="133"
column="32"/>
</issue>
@@ -613,7 +613,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/room/InvalidationTracker.java"
- line="132"
+ line="133"
column="55"/>
</issue>
@@ -624,7 +624,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/room/InvalidationTracker.java"
- line="133"
+ line="134"
column="13"/>
</issue>
@@ -635,7 +635,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/room/InvalidationTracker.java"
- line="133"
+ line="134"
column="50"/>
</issue>
@@ -646,7 +646,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/room/InvalidationTracker.java"
- line="322"
+ line="332"
column="33"/>
</issue>
@@ -657,7 +657,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/room/InvalidationTracker.java"
- line="475"
+ line="485"
column="45"/>
</issue>
@@ -668,7 +668,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/room/InvalidationTracker.java"
- line="564"
+ line="574"
column="16"/>
</issue>
@@ -679,7 +679,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/room/InvalidationTracker.java"
- line="564"
+ line="574"
column="43"/>
</issue>
@@ -690,7 +690,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/room/InvalidationTracker.java"
- line="564"
+ line="574"
column="64"/>
</issue>
@@ -701,7 +701,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/room/InvalidationTracker.java"
- line="584"
+ line="594"
column="16"/>
</issue>
@@ -712,7 +712,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/room/InvalidationTracker.java"
- line="584"
+ line="594"
column="43"/>
</issue>
@@ -723,7 +723,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/room/InvalidationTracker.java"
- line="585"
+ line="595"
column="13"/>
</issue>
@@ -734,7 +734,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/room/InvalidationTracker.java"
- line="693"
+ line="703"
column="56"/>
</issue>
@@ -844,7 +844,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/room/RoomDatabase.java"
- line="83"
+ line="84"
column="24"/>
</issue>
@@ -855,7 +855,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/room/RoomDatabase.java"
- line="202"
+ line="260"
column="65"/>
</issue>
@@ -866,7 +866,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/room/RoomDatabase.java"
- line="339"
+ line="412"
column="12"/>
</issue>
@@ -877,7 +877,7 @@
errorLine2=" ~">
<location
file="src/main/java/androidx/room/RoomDatabase.java"
- line="429"
+ line="507"
column="16"/>
</issue>
@@ -888,7 +888,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/room/RoomDatabase.java"
- line="990"
+ line="1069"
column="62"/>
</issue>
diff --git a/room/testing/lint-baseline.xml b/room/testing/lint-baseline.xml
index 7a7323f..374badb 100644
--- a/room/testing/lint-baseline.xml
+++ b/room/testing/lint-baseline.xml
@@ -96,7 +96,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/room/testing/MigrationTestHelper.java"
- line="205"
+ line="206"
column="12"/>
</issue>
@@ -107,7 +107,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/room/testing/MigrationTestHelper.java"
- line="205"
+ line="206"
column="59"/>
</issue>
@@ -118,7 +118,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/room/testing/MigrationTestHelper.java"
- line="206"
+ line="207"
column="44"/>
</issue>
@@ -129,7 +129,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/room/testing/MigrationTestHelper.java"
- line="256"
+ line="258"
column="29"/>
</issue>
@@ -140,7 +140,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/room/testing/MigrationTestHelper.java"
- line="283"
+ line="285"
column="35"/>
</issue>
@@ -151,7 +151,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/room/testing/MigrationTestHelper.java"
- line="300"
+ line="302"
column="35"/>
</issue>
diff --git a/samples/Support4Demos/lint-baseline.xml b/samples/Support4Demos/lint-baseline.xml
index d1faac4..766b625 100644
--- a/samples/Support4Demos/lint-baseline.xml
+++ b/samples/Support4Demos/lint-baseline.xml
@@ -74,7 +74,7 @@
errorLine2=" ^">
<location
file="src/main/AndroidManifest.xml"
- line="443"
+ line="454"
column="9"/>
</issue>
@@ -85,7 +85,7 @@
errorLine2=" ^">
<location
file="src/main/AndroidManifest.xml"
- line="451"
+ line="462"
column="9"/>
</issue>
@@ -140,7 +140,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv4/view/WindowInsetsPlayground.java"
- line="70"
+ line="69"
column="25"/>
</issue>
@@ -151,7 +151,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv4/view/WindowInsetsPlayground.java"
- line="71"
+ line="70"
column="25"/>
</issue>
@@ -2868,7 +2868,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv4/view/WindowInsetsPlayground.java"
- line="84"
+ line="83"
column="25"/>
</issue>
@@ -2879,7 +2879,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv4/view/WindowInsetsPlayground.java"
- line="85"
+ line="84"
column="25"/>
</issue>
diff --git a/samples/Support7Demos/lint-baseline.xml b/samples/Support7Demos/lint-baseline.xml
index 40caf3d..da08f99 100644
--- a/samples/Support7Demos/lint-baseline.xml
+++ b/samples/Support7Demos/lint-baseline.xml
@@ -474,7 +474,7 @@
errorLine2=" ~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="121"
+ line="120"
column="19"/>
</issue>
@@ -485,7 +485,7 @@
errorLine2=" ~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="126"
+ line="125"
column="19"/>
</issue>
@@ -496,7 +496,7 @@
errorLine2=" ~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="131"
+ line="130"
column="19"/>
</issue>
@@ -507,7 +507,7 @@
errorLine2=" ~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="137"
+ line="136"
column="19"/>
</issue>
@@ -518,7 +518,7 @@
errorLine2=" ~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="156"
+ line="155"
column="19"/>
</issue>
@@ -529,7 +529,7 @@
errorLine2=" ~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="173"
+ line="172"
column="19"/>
</issue>
@@ -540,7 +540,7 @@
errorLine2=" ~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="179"
+ line="178"
column="19"/>
</issue>
@@ -551,7 +551,7 @@
errorLine2=" ~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="187"
+ line="186"
column="19"/>
</issue>
@@ -562,7 +562,7 @@
errorLine2=" ~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="192"
+ line="191"
column="19"/>
</issue>
@@ -573,7 +573,7 @@
errorLine2=" ~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="197"
+ line="196"
column="19"/>
</issue>
@@ -584,7 +584,7 @@
errorLine2=" ~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="234"
+ line="233"
column="19"/>
</issue>
@@ -595,7 +595,7 @@
errorLine2=" ~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="451"
+ line="450"
column="27"/>
</issue>
@@ -606,7 +606,7 @@
errorLine2=" ~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="461"
+ line="460"
column="27"/>
</issue>
@@ -617,7 +617,7 @@
errorLine2=" ~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="469"
+ line="468"
column="27"/>
</issue>
@@ -628,7 +628,7 @@
errorLine2=" ~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="477"
+ line="476"
column="27"/>
</issue>
@@ -738,7 +738,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="215"
+ line="214"
column="54"/>
</issue>
@@ -3099,7 +3099,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="107"
+ line="106"
column="13"/>
</issue>
@@ -3110,7 +3110,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="109"
+ line="108"
column="13"/>
</issue>
@@ -3121,7 +3121,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="140"
+ line="139"
column="84"/>
</issue>
@@ -3132,7 +3132,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="140"
+ line="139"
column="13"/>
</issue>
@@ -3143,7 +3143,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="142"
+ line="141"
column="17"/>
</issue>
@@ -3154,7 +3154,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="144"
+ line="143"
column="39"/>
</issue>
@@ -3165,7 +3165,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="144"
+ line="143"
column="13"/>
</issue>
@@ -3176,7 +3176,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="146"
+ line="145"
column="17"/>
</issue>
@@ -3187,7 +3187,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="148"
+ line="147"
column="17"/>
</issue>
@@ -3198,7 +3198,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="151"
+ line="150"
column="13"/>
</issue>
@@ -3209,7 +3209,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="157"
+ line="156"
column="13"/>
</issue>
@@ -3220,7 +3220,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="159"
+ line="158"
column="33"/>
</issue>
@@ -3231,7 +3231,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="161"
+ line="160"
column="50"/>
</issue>
@@ -3242,7 +3242,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="163"
+ line="162"
column="17"/>
</issue>
@@ -3253,7 +3253,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="166"
+ line="165"
column="17"/>
</issue>
@@ -3264,7 +3264,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="168"
+ line="167"
column="13"/>
</issue>
@@ -3275,7 +3275,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="181"
+ line="180"
column="17"/>
</issue>
@@ -3286,7 +3286,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="310"
+ line="309"
column="17"/>
</issue>
@@ -3297,7 +3297,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="320"
+ line="319"
column="17"/>
</issue>
@@ -3308,7 +3308,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="330"
+ line="329"
column="17"/>
</issue>
@@ -3319,7 +3319,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="344"
+ line="343"
column="21"/>
</issue>
@@ -3330,7 +3330,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="345"
+ line="344"
column="21"/>
</issue>
@@ -3341,7 +3341,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="347"
+ line="346"
column="21"/>
</issue>
@@ -3352,7 +3352,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="356"
+ line="355"
column="17"/>
</issue>
@@ -3363,7 +3363,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="364"
+ line="363"
column="37"/>
</issue>
@@ -3374,7 +3374,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="367"
+ line="366"
column="21"/>
</issue>
@@ -3385,7 +3385,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="374"
+ line="373"
column="17"/>
</issue>
@@ -3396,6 +3396,17 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
+ line="377"
+ column="17"/>
+ </issue>
+
+ <issue
+ id="SyntheticAccessor"
+ message="Access to `private` method `updateUi` of class `SampleMediaRouterActivity` requires synthetic accessor"
+ errorLine1=" updateUi();"
+ errorLine2=" ~~~~~~~~">
+ <location
+ file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
line="378"
column="17"/>
</issue>
@@ -3407,18 +3418,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="379"
- column="17"/>
- </issue>
-
- <issue
- id="SyntheticAccessor"
- message="Access to `private` method `updateUi` of class `SampleMediaRouterActivity` requires synthetic accessor"
- errorLine1=" updateUi();"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="405"
+ line="404"
column="17"/>
</issue>
@@ -3429,7 +3429,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="432"
+ line="431"
column="17"/>
</issue>
@@ -3440,7 +3440,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="437"
+ line="436"
column="17"/>
</issue>
@@ -3451,7 +3451,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="528"
+ line="527"
column="53"/>
</issue>
@@ -3462,7 +3462,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="695"
+ line="694"
column="25"/>
</issue>
@@ -3473,7 +3473,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="730"
+ line="729"
column="25"/>
</issue>
@@ -3484,7 +3484,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="798"
+ line="797"
column="21"/>
</issue>
@@ -6597,7 +6597,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="210"
+ line="209"
column="29"/>
</issue>
@@ -6608,7 +6608,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="444"
+ line="443"
column="35"/>
</issue>
@@ -6619,7 +6619,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="489"
+ line="488"
column="43"/>
</issue>
@@ -6630,7 +6630,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="494"
+ line="493"
column="41"/>
</issue>
@@ -6641,7 +6641,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="514"
+ line="513"
column="40"/>
</issue>
@@ -6652,29 +6652,29 @@
errorLine2=" ~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="623"
+ line="622"
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 setCallback(Callback cb) {"
- errorLine2=" ~~~~~~~~">
+ errorLine1=" public void setCallback(MediaRouter.Callback cb) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="637"
+ line="636"
column="33"/>
</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 Callback onCreateCallback() {"
- errorLine2=" ~~~~~~~~">
+ errorLine1=" public MediaRouter.Callback onCreateCallback() {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="642"
+ line="641"
column="16"/>
</issue>
@@ -6685,7 +6685,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="758"
+ line="757"
column="16"/>
</issue>
@@ -6696,7 +6696,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="770"
+ line="769"
column="16"/>
</issue>
@@ -6707,7 +6707,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="785"
+ line="784"
column="41"/>
</issue>
@@ -6718,7 +6718,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="790"
+ line="789"
column="16"/>
</issue>
@@ -6729,7 +6729,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="791"
+ line="790"
column="17"/>
</issue>
@@ -6740,7 +6740,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/com/example/android/supportv7/media/SampleMediaRouterActivity.java"
- line="791"
+ line="790"
column="34"/>
</issue>
diff --git a/settings.gradle b/settings.gradle
index 40990315..cc694e4 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -559,7 +559,7 @@
includeProject(":internal-testutils-espresso", "testutils/testutils-espresso", [BuildType.MAIN])
includeProject(":internal-testutils-truth", "testutils/testutils-truth", [BuildType.MAIN, BuildType.FLAN])
includeProject(":internal-testutils-ktx", "testutils/testutils-ktx", [BuildType.MAIN])
-includeProject(":internal-testutils-navigation", "testutils/testutils-navigation", [BuildType.MAIN, BuildType.FLAN])
+includeProject(":internal-testutils-navigation", "testutils/testutils-navigation", [BuildType.MAIN, BuildType.COMPOSE, BuildType.FLAN])
includeProject(":internal-testutils-paging", "testutils/testutils-paging", [BuildType.MAIN])
includeProject(":internal-testutils-gradle-plugin", "testutils/testutils-gradle-plugin", [BuildType.MAIN, BuildType.FLAN])
diff --git a/slices/builders/lint-baseline.xml b/slices/builders/lint-baseline.xml
index dc0fa05..d9965fb5 100644
--- a/slices/builders/lint-baseline.xml
+++ b/slices/builders/lint-baseline.xml
@@ -8,7 +8,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/slice/builders/impl/ListBuilderBasicImpl.java"
- line="232"
+ line="247"
column="45"/>
</issue>
@@ -19,7 +19,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/slice/builders/impl/ListBuilderImpl.java"
- line="295"
+ line="305"
column="45"/>
</issue>
@@ -206,7 +206,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/builders/impl/ListBuilderBasicImpl.java"
- line="74"
+ line="76"
column="33"/>
</issue>
@@ -217,7 +217,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/slice/builders/impl/ListBuilderBasicImpl.java"
- line="74"
+ line="76"
column="50"/>
</issue>
@@ -1020,7 +1020,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/builders/impl/TemplateBuilderImpl.java"
- line="51"
+ line="53"
column="35"/>
</issue>
@@ -1031,7 +1031,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/slice/builders/impl/TemplateBuilderImpl.java"
- line="51"
+ line="53"
column="52"/>
</issue>
@@ -1042,7 +1042,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/builders/impl/TemplateBuilderImpl.java"
- line="55"
+ line="57"
column="35"/>
</issue>
@@ -1053,7 +1053,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/slice/builders/impl/TemplateBuilderImpl.java"
- line="55"
+ line="57"
column="52"/>
</issue>
@@ -1064,7 +1064,7 @@
errorLine2=" ~~~~~">
<location
file="src/main/java/androidx/slice/builders/impl/TemplateBuilderImpl.java"
- line="55"
+ line="57"
column="68"/>
</issue>
@@ -1075,7 +1075,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/builders/impl/TemplateBuilderImpl.java"
- line="61"
+ line="63"
column="31"/>
</issue>
@@ -1086,7 +1086,7 @@
errorLine2=" ~~~~~">
<location
file="src/main/java/androidx/slice/builders/impl/TemplateBuilderImpl.java"
- line="68"
+ line="70"
column="12"/>
</issue>
@@ -1097,7 +1097,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/builders/impl/TemplateBuilderImpl.java"
- line="78"
+ line="80"
column="12"/>
</issue>
@@ -1108,7 +1108,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/builders/impl/TemplateBuilderImpl.java"
- line="86"
+ line="88"
column="12"/>
</issue>
@@ -1119,7 +1119,7 @@
errorLine2=" ~~~~~">
<location
file="src/main/java/androidx/slice/builders/impl/TemplateBuilderImpl.java"
- line="100"
+ line="102"
column="12"/>
</issue>
@@ -1130,7 +1130,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/slice/builders/impl/TemplateBuilderImpl.java"
- line="108"
+ line="110"
column="12"/>
</issue>
diff --git a/slices/core/lint-baseline.xml b/slices/core/lint-baseline.xml
index 317b481..a7de315 100644
--- a/slices/core/lint-baseline.xml
+++ b/slices/core/lint-baseline.xml
@@ -46,6 +46,17 @@
</issue>
<issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" return (int) h.getClass().getDeclaredMethod("getIdentifier").invoke(h);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/slice/SliceManagerWrapper.java"
+ line="93"
+ column="26"/>
+ </issue>
+
+ <issue
id="UnsafeNewApiCall"
message="This call is to a method from API 19, the call containing class androidx.slice.compat.CompatPermissionManager.PermissionState is not annotated with @RequiresApi(x) where x is at least 19. Either annotate the containing class with at least @RequiresApi(19) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(19)."
errorLine1=" if (!Objects.equals(path[i], prefix[i])) {"
@@ -63,7 +74,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="640"
+ line="643"
column="42"/>
</issue>
@@ -74,7 +85,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="641"
+ line="644"
column="18"/>
</issue>
@@ -96,7 +107,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="400"
+ line="402"
column="35"/>
</issue>
@@ -349,7 +360,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="186"
+ line="188"
column="18"/>
</issue>
@@ -360,7 +371,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="205"
+ line="207"
column="12"/>
</issue>
@@ -371,7 +382,7 @@
errorLine2=" ~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="233"
+ line="235"
column="12"/>
</issue>
@@ -382,7 +393,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="240"
+ line="242"
column="12"/>
</issue>
@@ -393,7 +404,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="249"
+ line="251"
column="12"/>
</issue>
@@ -404,7 +415,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="256"
+ line="258"
column="23"/>
</issue>
@@ -415,7 +426,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="264"
+ line="266"
column="23"/>
</issue>
@@ -426,7 +437,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="272"
+ line="274"
column="39"/>
</issue>
@@ -437,7 +448,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="340"
+ line="342"
column="16"/>
</issue>
@@ -448,7 +459,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="340"
+ line="342"
column="32"/>
</issue>
@@ -459,7 +470,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="348"
+ line="350"
column="16"/>
</issue>
@@ -470,7 +481,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="348"
+ line="350"
column="44"/>
</issue>
@@ -481,7 +492,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="356"
+ line="358"
column="16"/>
</issue>
@@ -492,7 +503,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="356"
+ line="358"
column="44"/>
</issue>
@@ -503,7 +514,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="363"
+ line="365"
column="16"/>
</issue>
@@ -514,7 +525,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="373"
+ line="375"
column="16"/>
</issue>
@@ -525,7 +536,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="373"
+ line="375"
column="58"/>
</issue>
@@ -536,7 +547,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="384"
+ line="386"
column="16"/>
</issue>
@@ -547,7 +558,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="399"
+ line="401"
column="16"/>
</issue>
@@ -558,7 +569,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="412"
+ line="414"
column="16"/>
</issue>
@@ -569,7 +580,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="412"
+ line="414"
column="32"/>
</issue>
@@ -580,7 +591,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="413"
+ line="415"
column="28"/>
</issue>
@@ -591,7 +602,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="423"
+ line="425"
column="16"/>
</issue>
@@ -602,7 +613,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="423"
+ line="425"
column="32"/>
</issue>
@@ -613,7 +624,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="424"
+ line="426"
column="28"/>
</issue>
@@ -624,7 +635,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="433"
+ line="435"
column="16"/>
</issue>
@@ -635,7 +646,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="433"
+ line="435"
column="32"/>
</issue>
@@ -646,7 +657,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="434"
+ line="436"
column="28"/>
</issue>
@@ -657,7 +668,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="447"
+ line="449"
column="16"/>
</issue>
@@ -668,7 +679,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="447"
+ line="449"
column="32"/>
</issue>
@@ -679,7 +690,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="448"
+ line="450"
column="28"/>
</issue>
@@ -690,7 +701,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="463"
+ line="465"
column="16"/>
</issue>
@@ -701,7 +712,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="463"
+ line="465"
column="45"/>
</issue>
@@ -712,7 +723,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="464"
+ line="466"
column="28"/>
</issue>
@@ -723,7 +734,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="476"
+ line="478"
column="16"/>
</issue>
@@ -734,7 +745,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="476"
+ line="478"
column="45"/>
</issue>
@@ -745,7 +756,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="477"
+ line="479"
column="28"/>
</issue>
@@ -756,7 +767,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="488"
+ line="490"
column="16"/>
</issue>
@@ -767,7 +778,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="489"
+ line="491"
column="28"/>
</issue>
@@ -778,7 +789,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="499"
+ line="502"
column="16"/>
</issue>
@@ -789,7 +800,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="500"
+ line="503"
column="28"/>
</issue>
@@ -800,7 +811,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="509"
+ line="512"
column="16"/>
</issue>
@@ -811,7 +822,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="510"
+ line="513"
column="28"/>
</issue>
@@ -822,7 +833,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="520"
+ line="523"
column="16"/>
</issue>
@@ -833,7 +844,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="521"
+ line="524"
column="28"/>
</issue>
@@ -844,7 +855,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="532"
+ line="535"
column="16"/>
</issue>
@@ -855,7 +866,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="533"
+ line="536"
column="28"/>
</issue>
@@ -866,7 +877,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="543"
+ line="546"
column="16"/>
</issue>
@@ -877,7 +888,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="544"
+ line="547"
column="28"/>
</issue>
@@ -888,7 +899,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="553"
+ line="556"
column="16"/>
</issue>
@@ -899,7 +910,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="553"
+ line="556"
column="38"/>
</issue>
@@ -910,7 +921,7 @@
errorLine2=" ~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="561"
+ line="564"
column="16"/>
</issue>
@@ -921,7 +932,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="579"
+ line="582"
column="12"/>
</issue>
@@ -932,7 +943,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="579"
+ line="582"
column="28"/>
</issue>
@@ -943,7 +954,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="604"
+ line="607"
column="36"/>
</issue>
@@ -954,7 +965,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="604"
+ line="607"
column="54"/>
</issue>
@@ -965,7 +976,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="628"
+ line="631"
column="35"/>
</issue>
@@ -976,7 +987,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/Slice.java"
- line="629"
+ line="632"
column="13"/>
</issue>
@@ -1009,7 +1020,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/slice/core/SliceActionImpl.java"
- line="153"
+ line="155"
column="28"/>
</issue>
@@ -1020,7 +1031,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/core/SliceActionImpl.java"
- line="202"
+ line="204"
column="12"/>
</issue>
@@ -1031,7 +1042,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/core/SliceActionImpl.java"
- line="211"
+ line="213"
column="12"/>
</issue>
@@ -1042,7 +1053,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/slice/core/SliceActionImpl.java"
- line="229"
+ line="231"
column="12"/>
</issue>
diff --git a/slices/test/lint-baseline.xml b/slices/test/lint-baseline.xml
index 9e0b0c7..0159dda 100644
--- a/slices/test/lint-baseline.xml
+++ b/slices/test/lint-baseline.xml
@@ -8,7 +8,7 @@
errorLine2=" ~~~">
<location
file="src/main/java/androidx/slice/test/SampleSliceProvider.java"
- line="129"
+ line="143"
column="19"/>
</issue>
@@ -19,7 +19,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/slice/test/SampleSliceProvider.java"
- line="129"
+ line="143"
column="30"/>
</issue>
@@ -30,7 +30,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/slice/test/SampleSliceProvider.java"
- line="129"
+ line="143"
column="43"/>
</issue>
@@ -41,7 +41,7 @@
errorLine2=" ~~~~~">
<location
file="src/main/java/androidx/slice/test/SampleSliceProvider.java"
- line="149"
+ line="163"
column="12"/>
</issue>
@@ -52,7 +52,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/test/SampleSliceProvider.java"
- line="658"
+ line="678"
column="19"/>
</issue>
diff --git a/slices/view/lint-baseline.xml b/slices/view/lint-baseline.xml
index e0bb13b..bff8fb8 100644
--- a/slices/view/lint-baseline.xml
+++ b/slices/view/lint-baseline.xml
@@ -41,7 +41,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/GridRowView.java"
- line="555"
+ line="559"
column="41"/>
</issue>
@@ -118,7 +118,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/TemplateView.java"
- line="109"
+ line="111"
column="41"/>
</issue>
@@ -217,7 +217,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/GridRowView.java"
- line="104"
+ line="106"
column="24"/>
</issue>
@@ -228,7 +228,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/GridRowView.java"
- line="108"
+ line="110"
column="24"/>
</issue>
@@ -239,7 +239,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/GridRowView.java"
- line="108"
+ line="110"
column="41"/>
</issue>
@@ -250,7 +250,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/GridRowView.java"
- line="174"
+ line="176"
column="30"/>
</issue>
@@ -261,7 +261,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/GridRowView.java"
- line="175"
+ line="177"
column="27"/>
</issue>
@@ -272,7 +272,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/slice/widget/GridRowView.java"
- line="524"
+ line="528"
column="25"/>
</issue>
@@ -283,7 +283,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/slice/widget/GridRowView.java"
- line="545"
+ line="549"
column="28"/>
</issue>
@@ -294,7 +294,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/GridRowView.java"
- line="545"
+ line="549"
column="39"/>
</issue>
@@ -334,7 +334,7 @@
<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<SliceContent> getRowItems(int availableHeight, SliceStyle style,"
+ errorLine1=" public DisplayedListItems getRowItems(int availableHeight, SliceStyle style,"
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/ListContent.java"
@@ -345,7 +345,7 @@
<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<SliceContent> getRowItems(int availableHeight, SliceStyle style,"
+ errorLine1=" public DisplayedListItems getRowItems(int availableHeight, SliceStyle style,"
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/ListContent.java"
@@ -371,7 +371,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/ListContent.java"
- line="177"
+ line="180"
column="12"/>
</issue>
@@ -382,7 +382,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/ListContent.java"
- line="250"
+ line="253"
column="34"/>
</issue>
@@ -393,7 +393,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/ListContent.java"
- line="251"
+ line="254"
column="34"/>
</issue>
@@ -404,7 +404,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/ListContent.java"
- line="290"
+ line="293"
column="37"/>
</issue>
@@ -415,7 +415,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/ListContent.java"
- line="290"
+ line="293"
column="67"/>
</issue>
@@ -426,7 +426,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/ListContent.java"
- line="291"
+ line="294"
column="13"/>
</issue>
@@ -840,11 +840,11 @@
<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 RowStyle(Context context, int resId) {"
+ errorLine1=" public RowStyle(Context context, int resId, @NonNull SliceStyle sliceStyle) {"
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/RowStyle.java"
- line="56"
+ line="74"
column="21"/>
</issue>
@@ -855,7 +855,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/RowView.java"
- line="136"
+ line="146"
column="15"/>
</issue>
@@ -866,29 +866,40 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/RowView.java"
- line="185"
+ line="194"
column="20"/>
</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 setStyle(SliceStyle styles) {"
+ errorLine1=" public void setStyle(SliceStyle styles, RowStyle rowStyle) {"
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/RowView.java"
- line="211"
+ line="220"
column="26"/>
</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 setStyle(SliceStyle styles, RowStyle rowStyle) {"
+ errorLine2=" ~~~~~~~~">
+ <location
+ file="src/main/java/androidx/slice/widget/RowView.java"
+ line="220"
+ 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 void setSliceActions(List<SliceAction> actions) {"
errorLine2=" ~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/RowView.java"
- line="317"
+ line="328"
column="33"/>
</issue>
@@ -899,7 +910,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/RowView.java"
- line="411"
+ line="423"
column="30"/>
</issue>
@@ -910,7 +921,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/RowView.java"
- line="412"
+ line="424"
column="27"/>
</issue>
@@ -921,7 +932,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/RowView.java"
- line="1002"
+ line="1042"
column="35"/>
</issue>
@@ -932,7 +943,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/slice/widget/RowView.java"
- line="1014"
+ line="1054"
column="25"/>
</issue>
@@ -943,7 +954,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/RowView.java"
- line="1053"
+ line="1093"
column="32"/>
</issue>
@@ -954,24 +965,13 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/slice/widget/RowView.java"
- line="1053"
+ line="1093"
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 void onNothingSelected(AdapterView<?> parent) {"
- errorLine2=" ~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/widget/RowView.java"
- line="1088"
- 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=" public ShortcutView(Context context) {"
errorLine2=" ~~~~~~~">
<location
@@ -1016,33 +1016,44 @@
<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 SliceActionView(Context context, SliceStyle style) {"
+ errorLine1=" public SliceActionView(Context context, SliceStyle style, RowStyle rowStyle) {"
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/SliceActionView.java"
- line="83"
+ line="85"
column="28"/>
</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 SliceActionView(Context context, SliceStyle style) {"
+ errorLine1=" public SliceActionView(Context context, SliceStyle style, RowStyle rowStyle) {"
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/SliceActionView.java"
- line="83"
+ line="85"
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 SliceActionView(Context context, SliceStyle style, RowStyle rowStyle) {"
+ errorLine2=" ~~~~~~~~">
+ <location
+ file="src/main/java/androidx/slice/widget/SliceActionView.java"
+ line="85"
+ column="63"/>
+ </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 setAction(@NonNull SliceActionImpl action, EventInfo info,"
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/SliceActionView.java"
- line="100"
+ line="101"
column="60"/>
</issue>
@@ -1053,7 +1064,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/SliceActionView.java"
- line="101"
+ line="102"
column="13"/>
</issue>
@@ -1064,24 +1075,13 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/SliceActionView.java"
- line="102"
+ line="103"
column="13"/>
</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 onClick(View v) {"
- errorLine2=" ~~~~">
- <location
- file="src/main/java/androidx/slice/widget/SliceActionView.java"
- line="233"
- column="25"/>
- </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 SliceAdapter(Context context) {"
errorLine2=" ~~~~~~~">
<location
@@ -1251,7 +1251,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/slice/widget/SliceAdapter.java"
- line="353"
+ line="356"
column="29"/>
</issue>
@@ -1262,7 +1262,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/slice/widget/SliceAdapter.java"
- line="361"
+ line="364"
column="32"/>
</issue>
@@ -1273,7 +1273,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/SliceAdapter.java"
- line="361"
+ line="364"
column="40"/>
</issue>
@@ -1284,7 +1284,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/SliceChildView.java"
- line="43"
+ line="44"
column="15"/>
</issue>
@@ -1295,7 +1295,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/SliceChildView.java"
- line="52"
+ line="53"
column="15"/>
</issue>
@@ -1306,7 +1306,18 @@
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/SliceChildView.java"
- line="53"
+ line="54"
+ column="15"/>
+ </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=" protected RowStyle mRowStyle;"
+ errorLine2=" ~~~~~~~~">
+ <location
+ file="src/main/java/androidx/slice/widget/SliceChildView.java"
+ line="55"
column="15"/>
</issue>
@@ -1317,7 +1328,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/SliceChildView.java"
- line="54"
+ line="56"
column="15"/>
</issue>
@@ -1328,7 +1339,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/SliceChildView.java"
- line="60"
+ line="62"
column="27"/>
</issue>
@@ -1339,7 +1350,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/SliceChildView.java"
- line="60"
+ line="62"
column="44"/>
</issue>
@@ -1350,7 +1361,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/SliceChildView.java"
- line="72"
+ line="74"
column="33"/>
</issue>
@@ -1361,7 +1372,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/SliceChildView.java"
- line="89"
+ line="91"
column="30"/>
</issue>
@@ -1372,7 +1383,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/SliceChildView.java"
- line="90"
+ line="92"
column="27"/>
</issue>
@@ -1383,7 +1394,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/SliceChildView.java"
- line="97"
+ line="99"
column="33"/>
</issue>
@@ -1394,7 +1405,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/SliceChildView.java"
- line="133"
+ line="135"
column="40"/>
</issue>
@@ -1405,7 +1416,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/SliceChildView.java"
- line="140"
+ line="142"
column="47"/>
</issue>
@@ -1416,7 +1427,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/SliceChildView.java"
- line="147"
+ line="149"
column="34"/>
</issue>
@@ -1427,7 +1438,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/SliceChildView.java"
- line="153"
+ line="155"
column="35"/>
</issue>
@@ -1438,35 +1449,24 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/SliceChildView.java"
- line="165"
+ line="167"
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 setStyle(SliceStyle styles) {"
+ errorLine1=" public void setStyle(SliceStyle styles, @NonNull RowStyle rowStyle) {"
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/SliceChildView.java"
- line="172"
+ line="174"
column="26"/>
</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 setPolicy(SliceViewPolicy policy) {"
- errorLine2=" ~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/widget/SliceChildView.java"
- line="179"
- 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=" protected SliceItem mSliceItem;"
errorLine2=" ~~~~~~~~~">
<location
@@ -1658,7 +1658,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/SliceStyle.java"
- line="84"
+ line="92"
column="23"/>
</issue>
@@ -1669,29 +1669,18 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/SliceStyle.java"
- line="84"
+ line="92"
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 RowStyle getRowStyle() {"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/java/androidx/slice/widget/SliceStyle.java"
- line="250"
- 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 int getRowHeight(RowContent row, SliceViewPolicy policy) {"
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/SliceStyle.java"
- line="270"
+ line="307"
column="29"/>
</issue>
@@ -1702,7 +1691,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/SliceStyle.java"
- line="270"
+ line="307"
column="45"/>
</issue>
@@ -1713,7 +1702,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/SliceStyle.java"
- line="304"
+ line="345"
column="30"/>
</issue>
@@ -1724,7 +1713,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/SliceStyle.java"
- line="304"
+ line="345"
column="48"/>
</issue>
@@ -1735,7 +1724,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/SliceStyle.java"
- line="332"
+ line="373"
column="30"/>
</issue>
@@ -1746,7 +1735,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/SliceStyle.java"
- line="332"
+ line="373"
column="48"/>
</issue>
@@ -1757,7 +1746,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/SliceStyle.java"
- line="362"
+ line="404"
column="35"/>
</issue>
@@ -1768,30 +1757,30 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/SliceStyle.java"
- line="362"
+ line="404"
column="65"/>
</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 ArrayList<SliceContent> getListItemsForNonScrollingList(ListContent list,"
- errorLine2=" ~~~~~~~~~~~">
+ errorLine1=" public DisplayedListItems getListItemsForNonScrollingList(ListContent list,"
+ errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/SliceStyle.java"
- line="389"
- column="68"/>
+ line="431"
+ column="63"/>
</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=" SliceViewPolicy policy) {"
- errorLine2=" ~~~~~~~~~~~~~~~">
+ errorLine1=" SliceViewPolicy policy) {"
+ errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/SliceStyle.java"
- line="391"
- column="69"/>
+ line="433"
+ column="62"/>
</issue>
<issue
@@ -2120,7 +2109,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/slice/widget/SliceView.java"
- line="823"
+ line="845"
column="19"/>
</issue>
@@ -2131,7 +2120,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/slice/widget/SliceView.java"
- line="864"
+ line="886"
column="40"/>
</issue>
@@ -2263,7 +2252,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/TemplateView.java"
- line="53"
+ line="55"
column="25"/>
</issue>
@@ -2274,7 +2263,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/TemplateView.java"
- line="99"
+ line="101"
column="39"/>
</issue>
@@ -2285,7 +2274,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/TemplateView.java"
- line="122"
+ line="124"
column="27"/>
</issue>
@@ -2296,7 +2285,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/TemplateView.java"
- line="129"
+ line="131"
column="34"/>
</issue>
@@ -2307,7 +2296,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/TemplateView.java"
- line="134"
+ line="136"
column="35"/>
</issue>
@@ -2318,7 +2307,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/TemplateView.java"
- line="139"
+ line="141"
column="12"/>
</issue>
@@ -2329,7 +2318,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/TemplateView.java"
- line="150"
+ line="152"
column="40"/>
</issue>
@@ -2340,7 +2329,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/TemplateView.java"
- line="158"
+ line="160"
column="33"/>
</issue>
@@ -2351,18 +2340,18 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/TemplateView.java"
- line="163"
+ line="165"
column="33"/>
</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 setStyle(SliceStyle style) {"
+ errorLine1=" public void setStyle(SliceStyle style, @NonNull RowStyle rowStyle) {"
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/slice/widget/TemplateView.java"
- line="170"
+ line="172"
column="26"/>
</issue>
diff --git a/sqlite/integration-tests/inspection-sqldelight-testapp/lint-baseline.xml b/sqlite/integration-tests/inspection-sqldelight-testapp/lint-baseline.xml
index 1aaf9b4..7ee6746 100644
--- a/sqlite/integration-tests/inspection-sqldelight-testapp/lint-baseline.xml
+++ b/sqlite/integration-tests/inspection-sqldelight-testapp/lint-baseline.xml
@@ -8,7 +8,7 @@
errorLine2=" ~~~~">
<location
file="src/androidTest/java/androidx/sqlite/inspection/SqlDelightInvalidationTest.kt"
- line="72"
+ line="73"
column="9"/>
</issue>
diff --git a/sqlite/sqlite-inspection/lint-baseline.xml b/sqlite/sqlite-inspection/lint-baseline.xml
new file mode 100644
index 0000000..2c4647a
--- /dev/null
+++ b/sqlite/sqlite-inspection/lint-baseline.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<issues format="5" by="lint 4.2.0-alpha06" client="gradle" variant="debug" version="4.2.0-alpha06">
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" mRefreshMethod.invoke(instance);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/sqlite/inspection/RoomInvalidationRegistry.java"
+ line="144"
+ column="21"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" mNotifyDataChangeMethod.invoke(query);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/sqlite/inspection/SqlDelightInvalidation.java"
+ line="66"
+ column="13"/>
+ </issue>
+
+</issues>
diff --git a/testutils/testutils-navigation/build.gradle b/testutils/testutils-navigation/build.gradle
index ec6c7eb..7286559 100644
--- a/testutils/testutils-navigation/build.gradle
+++ b/testutils/testutils-navigation/build.gradle
@@ -27,7 +27,7 @@
}
dependencies {
- api(project(":navigation:navigation-common-ktx"))
+ api("androidx.navigation:navigation-common-ktx:2.3.1")
testImplementation(JUNIT)
testImplementation(MOCKITO_CORE)
diff --git a/testutils/testutils-runtime/lint-baseline.xml b/testutils/testutils-runtime/lint-baseline.xml
index fcfdbe0..4e2f7df 100644
--- a/testutils/testutils-runtime/lint-baseline.xml
+++ b/testutils/testutils-runtime/lint-baseline.xml
@@ -2,13 +2,57 @@
<issues format="5" by="lint 4.2.0-alpha06" client="gradle" variant="debug" version="4.2.0-alpha06">
<issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" durationSetter.invoke(null, 1.0f)"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/testutils/AnimationActivityTestRule.kt"
+ line="82"
+ column="13"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" private val originalDurationScale = durationGetter.invoke(null) as Float"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/testutils/AnimationDurationScaleRule.kt"
+ line="101"
+ column="41"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" durationSetter.invoke(null, animationDurationScale)"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/testutils/AnimationDurationScaleRule.kt"
+ line="104"
+ column="9"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" durationSetter.invoke(null, originalDurationScale)"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/testutils/AnimationDurationScaleRule.kt"
+ line="108"
+ column="9"/>
+ </issue>
+
+ <issue
id="UnsafeNewApiCall"
message="This call is to a method from API 24, the call containing class androidx.testutils.LocaleTestUtils is not annotated with @RequiresApi(x) where x is at least 24. Either annotate the containing class with at least @RequiresApi(24) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(24)."
errorLine1=" newConfig.setLocales(locales.unwrap() as LocaleList)"
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/testutils/LocaleTestUtils.kt"
- line="200"
+ line="202"
column="27"/>
</issue>
@@ -19,7 +63,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/testutils/LocaleTestUtils.kt"
- line="202"
+ line="204"
column="27"/>
</issue>
diff --git a/textclassifier/textclassifier/lint-baseline.xml b/textclassifier/textclassifier/lint-baseline.xml
index 5c54cd1..02540d3 100644
--- a/textclassifier/textclassifier/lint-baseline.xml
+++ b/textclassifier/textclassifier/lint-baseline.xml
@@ -657,7 +657,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="505"
+ line="499"
column="22"/>
</issue>
@@ -668,7 +668,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="506"
+ line="500"
column="20"/>
</issue>
@@ -679,7 +679,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="508"
+ line="502"
column="22"/>
</issue>
@@ -690,7 +690,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="509"
+ line="503"
column="23"/>
</issue>
@@ -701,7 +701,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="511"
+ line="505"
column="22"/>
</issue>
@@ -712,7 +712,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="512"
+ line="506"
column="22"/>
</issue>
@@ -723,7 +723,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="514"
+ line="508"
column="22"/>
</issue>
@@ -734,7 +734,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="515"
+ line="509"
column="25"/>
</issue>
@@ -745,7 +745,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="813"
+ line="807"
column="56"/>
</issue>
@@ -756,7 +756,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="814"
+ line="808"
column="57"/>
</issue>
@@ -767,7 +767,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="882"
+ line="876"
column="31"/>
</issue>
@@ -778,7 +778,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="890"
+ line="884"
column="52"/>
</issue>
@@ -789,7 +789,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="915"
+ line="909"
column="53"/>
</issue>
@@ -800,7 +800,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="957"
+ line="951"
column="31"/>
</issue>
@@ -811,7 +811,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="962"
+ line="956"
column="31"/>
</issue>
@@ -822,7 +822,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="992"
+ line="986"
column="56"/>
</issue>
@@ -833,7 +833,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="993"
+ line="987"
column="51"/>
</issue>
@@ -844,7 +844,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="997"
+ line="991"
column="45"/>
</issue>
@@ -855,7 +855,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1006"
+ line="1000"
column="51"/>
</issue>
@@ -866,7 +866,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1008"
+ line="1002"
column="56"/>
</issue>
@@ -877,7 +877,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1009"
+ line="1003"
column="51"/>
</issue>
@@ -888,7 +888,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1016"
+ line="1010"
column="61"/>
</issue>
@@ -899,7 +899,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1039"
+ line="1033"
column="49"/>
</issue>
@@ -910,7 +910,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1041"
+ line="1035"
column="60"/>
</issue>
@@ -921,7 +921,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1042"
+ line="1036"
column="55"/>
</issue>
@@ -932,7 +932,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1043"
+ line="1037"
column="59"/>
</issue>
@@ -943,7 +943,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1044"
+ line="1038"
column="54"/>
</issue>
@@ -954,7 +954,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1051"
+ line="1045"
column="54"/>
</issue>
@@ -965,7 +965,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1051"
+ line="1045"
column="82"/>
</issue>
@@ -976,7 +976,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1054"
+ line="1048"
column="59"/>
</issue>
@@ -987,7 +987,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1055"
+ line="1049"
column="54"/>
</issue>
@@ -998,7 +998,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1061"
+ line="1055"
column="65"/>
</issue>
@@ -1009,7 +1009,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1075"
+ line="1069"
column="80"/>
</issue>
@@ -1020,7 +1020,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1078"
+ line="1072"
column="40"/>
</issue>
@@ -1031,7 +1031,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1079"
+ line="1073"
column="42"/>
</issue>
@@ -1042,7 +1042,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1079"
+ line="1073"
column="70"/>
</issue>
@@ -1053,7 +1053,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1085"
+ line="1079"
column="68"/>
</issue>
@@ -1064,7 +1064,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1100"
+ line="1094"
column="56"/>
</issue>
@@ -1075,7 +1075,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1101"
+ line="1095"
column="58"/>
</issue>
@@ -1086,7 +1086,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1104"
+ line="1098"
column="60"/>
</issue>
@@ -1097,7 +1097,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1105"
+ line="1099"
column="62"/>
</issue>
@@ -1108,7 +1108,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1132"
+ line="1126"
column="22"/>
</issue>
@@ -1119,7 +1119,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1166"
+ line="1160"
column="24"/>
</issue>
@@ -1130,7 +1130,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1189"
+ line="1183"
column="36"/>
</issue>
@@ -1141,7 +1141,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1190"
+ line="1184"
column="57"/>
</issue>
@@ -1152,7 +1152,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1192"
+ line="1186"
column="44"/>
</issue>
@@ -1163,7 +1163,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1199"
+ line="1193"
column="36"/>
</issue>
@@ -1174,7 +1174,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1200"
+ line="1194"
column="44"/>
</issue>
@@ -1185,7 +1185,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1202"
+ line="1196"
column="57"/>
</issue>
@@ -1196,7 +1196,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1212"
+ line="1206"
column="85"/>
</issue>
@@ -1207,7 +1207,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1238"
+ line="1232"
column="28"/>
</issue>
@@ -1218,7 +1218,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1238"
+ line="1232"
column="73"/>
</issue>
@@ -1229,7 +1229,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1258"
+ line="1252"
column="57"/>
</issue>
@@ -1240,7 +1240,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1261"
+ line="1255"
column="74"/>
</issue>
@@ -1251,7 +1251,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1263"
+ line="1257"
column="34"/>
</issue>
@@ -1262,7 +1262,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1311"
+ line="1305"
column="80"/>
</issue>
@@ -1273,7 +1273,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1313"
+ line="1307"
column="88"/>
</issue>
@@ -1284,7 +1284,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1342"
+ line="1336"
column="43"/>
</issue>
@@ -1295,7 +1295,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1368"
+ line="1362"
column="40"/>
</issue>
@@ -1306,7 +1306,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1368"
+ line="1362"
column="72"/>
</issue>
@@ -1317,7 +1317,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1369"
+ line="1363"
column="44"/>
</issue>
@@ -1328,7 +1328,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1369"
+ line="1363"
column="73"/>
</issue>
@@ -1339,7 +1339,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1384"
+ line="1378"
column="48"/>
</issue>
@@ -1350,7 +1350,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1433"
+ line="1427"
column="75"/>
</issue>
@@ -1361,7 +1361,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1499"
+ line="1493"
column="20"/>
</issue>
@@ -1372,7 +1372,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1513"
+ line="1507"
column="32"/>
</issue>
@@ -1383,7 +1383,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1513"
+ line="1507"
column="49"/>
</issue>
@@ -1394,7 +1394,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1553"
+ line="1547"
column="17"/>
</issue>
@@ -1405,7 +1405,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1554"
+ line="1548"
column="17"/>
</issue>
@@ -1416,7 +1416,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1561"
+ line="1555"
column="56"/>
</issue>
@@ -1427,7 +1427,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/FloatingToolbar.java"
- line="1562"
+ line="1556"
column="54"/>
</issue>
@@ -1493,7 +1493,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/SelectionEvent.java"
- line="749"
+ line="745"
column="63"/>
</issue>
@@ -1504,7 +1504,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/SelectionEvent.java"
- line="755"
+ line="751"
column="63"/>
</issue>
@@ -1515,7 +1515,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/SelectionEvent.java"
- line="773"
+ line="769"
column="63"/>
</issue>
@@ -1526,7 +1526,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/SelectionEvent.java"
- line="780"
+ line="776"
column="59"/>
</issue>
@@ -1537,7 +1537,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/SelectionEvent.java"
- line="795"
+ line="791"
column="63"/>
</issue>
@@ -1548,7 +1548,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/SelectionEvent.java"
- line="803"
+ line="799"
column="59"/>
</issue>
@@ -1559,7 +1559,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/TextClassification.java"
- line="236"
+ line="227"
column="45"/>
</issue>
@@ -1570,7 +1570,7 @@
errorLine2=" ~~~~~">
<location
file="src/main/java/androidx/textclassifier/TextClassification.java"
- line="239"
+ line="230"
column="46"/>
</issue>
@@ -1581,7 +1581,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/TextClassification.java"
- line="242"
+ line="233"
column="52"/>
</issue>
@@ -1592,7 +1592,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/TextClassification.java"
- line="244"
+ line="235"
column="48"/>
</issue>
@@ -1603,7 +1603,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/TextClassification.java"
- line="245"
+ line="236"
column="62"/>
</issue>
@@ -1614,7 +1614,7 @@
errorLine2=" ~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/TextClassification.java"
- line="249"
+ line="240"
column="61"/>
</issue>
@@ -1625,7 +1625,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/TextClassification.java"
- line="254"
+ line="245"
column="36"/>
</issue>
@@ -1636,7 +1636,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/TextClassification.java"
- line="255"
+ line="246"
column="62"/>
</issue>
@@ -1647,7 +1647,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/TextClassification.java"
- line="275"
+ line="266"
column="44"/>
</issue>
@@ -1658,7 +1658,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/TextClassification.java"
- line="276"
+ line="267"
column="44"/>
</issue>
@@ -1669,7 +1669,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/TextClassification.java"
- line="279"
+ line="270"
column="48"/>
</issue>
@@ -1680,7 +1680,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/TextClassification.java"
- line="280"
+ line="271"
column="49"/>
</issue>
@@ -1691,7 +1691,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/TextClassification.java"
- line="286"
+ line="277"
column="75"/>
</issue>
@@ -1702,7 +1702,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/TextClassification.java"
- line="306"
+ line="292"
column="17"/>
</issue>
@@ -1713,7 +1713,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/TextClassification.java"
- line="307"
+ line="293"
column="26"/>
</issue>
@@ -1724,7 +1724,7 @@
errorLine2=" ~~~~~">
<location
file="src/main/java/androidx/textclassifier/TextClassification.java"
- line="310"
+ line="296"
column="21"/>
</issue>
@@ -1735,7 +1735,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/TextClassification.java"
- line="316"
+ line="302"
column="21"/>
</issue>
@@ -1746,7 +1746,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/TextClassification.java"
- line="322"
+ line="308"
column="25"/>
</issue>
@@ -1757,7 +1757,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/TextClassification.java"
- line="328"
+ line="314"
column="21"/>
</issue>
@@ -1768,7 +1768,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/TextClassification.java"
- line="329"
+ line="315"
column="22"/>
</issue>
@@ -1779,7 +1779,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/TextClassification.java"
- line="330"
+ line="316"
column="22"/>
</issue>
@@ -1790,7 +1790,7 @@
errorLine2=" ~~~~~">
<location
file="src/main/java/androidx/textclassifier/TextClassification.java"
- line="342"
+ line="328"
column="24"/>
</issue>
@@ -1801,7 +1801,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/TextClassification.java"
- line="531"
+ line="513"
column="29"/>
</issue>
@@ -1812,7 +1812,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/TextClassification.java"
- line="531"
+ line="513"
column="48"/>
</issue>
@@ -1823,7 +1823,7 @@
errorLine2=" ~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/TextClassification.java"
- line="531"
+ line="513"
column="73"/>
</issue>
@@ -1834,7 +1834,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/TextClassification.java"
- line="532"
+ line="514"
column="81"/>
</issue>
@@ -1845,7 +1845,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/TextClassification.java"
- line="533"
+ line="515"
column="75"/>
</issue>
@@ -1856,7 +1856,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/TextClassification.java"
- line="544"
+ line="522"
column="20"/>
</issue>
@@ -1867,7 +1867,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/TextClassification.java"
- line="546"
+ line="524"
column="22"/>
</issue>
@@ -1878,7 +1878,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/TextClassification.java"
- line="547"
+ line="525"
column="22"/>
</issue>
@@ -1889,7 +1889,7 @@
errorLine2=" ~~~~~">
<location
file="src/main/java/androidx/textclassifier/TextClassification.java"
- line="548"
+ line="526"
column="22"/>
</issue>
@@ -2384,7 +2384,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/ToolbarController.java"
- line="277"
+ line="278"
column="22"/>
</issue>
@@ -2395,7 +2395,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/ToolbarController.java"
- line="321"
+ line="323"
column="47"/>
</issue>
@@ -2406,7 +2406,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/ToolbarController.java"
- line="468"
+ line="471"
column="28"/>
</issue>
@@ -2417,7 +2417,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/ToolbarController.java"
- line="514"
+ line="517"
column="60"/>
</issue>
@@ -2428,7 +2428,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/ToolbarController.java"
- line="543"
+ line="546"
column="23"/>
</issue>
@@ -2439,7 +2439,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/ToolbarController.java"
- line="545"
+ line="548"
column="23"/>
</issue>
@@ -2450,7 +2450,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/ToolbarController.java"
- line="550"
+ line="553"
column="23"/>
</issue>
@@ -2461,7 +2461,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/ToolbarController.java"
- line="552"
+ line="555"
column="23"/>
</issue>
@@ -2472,7 +2472,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/ToolbarController.java"
- line="557"
+ line="560"
column="23"/>
</issue>
@@ -2483,7 +2483,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/ToolbarController.java"
- line="565"
+ line="568"
column="49"/>
</issue>
@@ -2494,7 +2494,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/ToolbarController.java"
- line="566"
+ line="569"
column="27"/>
</issue>
@@ -2505,7 +2505,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/textclassifier/TextClassification.java"
- line="145"
+ line="140"
column="49"/>
</issue>
@@ -2516,7 +2516,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/TextClassification.java"
- line="371"
+ line="357"
column="16"/>
</issue>
@@ -2527,7 +2527,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/TextClassification.java"
- line="385"
+ line="371"
column="16"/>
</issue>
@@ -2538,7 +2538,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/TextClassification.java"
- line="680"
+ line="658"
column="23"/>
</issue>
@@ -2681,7 +2681,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/textclassifier/widget/ToolbarController.java"
- line="130"
+ line="131"
column="22"/>
</issue>
diff --git a/transition/transition/lint-baseline.xml b/transition/transition/lint-baseline.xml
index c0b677b..53f158c 100644
--- a/transition/transition/lint-baseline.xml
+++ b/transition/transition/lint-baseline.xml
@@ -2,6 +2,61 @@
<issues format="5" by="lint 4.2.0-alpha06" client="gradle" variant="debug" version="4.2.0-alpha06">
<issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" (View) sAddGhostMethod.invoke(null, view, viewGroup, matrix));"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/transition/GhostViewPlatform.java"
+ line="47"
+ column="32"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" sRemoveGhostMethod.invoke(null, view);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/transition/GhostViewPlatform.java"
+ line="61"
+ column="17"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" sCancelMethod.invoke(t);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/transition/ViewGroupUtilsApi14.java"
+ line="125"
+ column="17"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" sInvalidateChildInParentFastMethod.invoke(mHostView, left, top, dirty);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/transition/ViewOverlayApi14.java"
+ line="289"
+ column="21"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" sSetFrameMethod.invoke(v, left, top, right, bottom);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/transition/ViewUtilsBase.java"
+ line="145"
+ column="17"/>
+ </issue>
+
+ <issue
id="PrivateConstructorForUtilityClass"
message="Utility class with non private constructor"
errorLine1=" private static class ArrayListManager {"
diff --git a/tv-provider/tv-provider/lint-baseline.xml b/tv-provider/tv-provider/lint-baseline.xml
index 10d144f..b17f119 100644
--- a/tv-provider/tv-provider/lint-baseline.xml
+++ b/tv-provider/tv-provider/lint-baseline.xml
@@ -85,7 +85,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="158"
+ line="159"
column="12"/>
</issue>
@@ -96,7 +96,7 @@
errorLine2=" ~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="166"
+ line="167"
column="12"/>
</issue>
@@ -107,7 +107,7 @@
errorLine2=" ~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="194"
+ line="195"
column="12"/>
</issue>
@@ -118,7 +118,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="203"
+ line="204"
column="12"/>
</issue>
@@ -129,7 +129,7 @@
errorLine2=" ~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="257"
+ line="258"
column="12"/>
</issue>
@@ -140,7 +140,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="275"
+ line="276"
column="12"/>
</issue>
@@ -151,7 +151,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="283"
+ line="284"
column="12"/>
</issue>
@@ -162,7 +162,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="291"
+ line="292"
column="12"/>
</issue>
@@ -173,7 +173,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="335"
+ line="336"
column="12"/>
</issue>
@@ -184,7 +184,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="352"
+ line="353"
column="12"/>
</issue>
@@ -195,7 +195,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="362"
+ line="363"
column="12"/>
</issue>
@@ -206,7 +206,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="370"
+ line="371"
column="12"/>
</issue>
@@ -217,7 +217,7 @@
errorLine2=" ~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="396"
+ line="397"
column="12"/>
</issue>
@@ -228,7 +228,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="414"
+ line="415"
column="12"/>
</issue>
@@ -239,7 +239,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="426"
+ line="427"
column="12"/>
</issue>
@@ -250,7 +250,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="647"
+ line="648"
column="24"/>
</issue>
@@ -261,7 +261,7 @@
errorLine2=" ~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="659"
+ line="660"
column="16"/>
</issue>
@@ -272,7 +272,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="659"
+ line="660"
column="40"/>
</issue>
@@ -283,7 +283,7 @@
errorLine2=" ~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="671"
+ line="672"
column="16"/>
</issue>
@@ -294,7 +294,7 @@
errorLine2=" ~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="671"
+ line="672"
column="37"/>
</issue>
@@ -305,7 +305,7 @@
errorLine2=" ~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="685"
+ line="686"
column="16"/>
</issue>
@@ -316,7 +316,7 @@
errorLine2=" ~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="697"
+ line="698"
column="16"/>
</issue>
@@ -327,7 +327,7 @@
errorLine2=" ~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="709"
+ line="710"
column="16"/>
</issue>
@@ -338,7 +338,7 @@
errorLine2=" ~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="709"
+ line="710"
column="31"/>
</issue>
@@ -349,7 +349,7 @@
errorLine2=" ~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="721"
+ line="722"
column="16"/>
</issue>
@@ -360,7 +360,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="721"
+ line="722"
column="28"/>
</issue>
@@ -371,7 +371,7 @@
errorLine2=" ~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="732"
+ line="733"
column="16"/>
</issue>
@@ -382,7 +382,7 @@
errorLine2=" ~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="759"
+ line="760"
column="16"/>
</issue>
@@ -393,7 +393,7 @@
errorLine2=" ~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="782"
+ line="783"
column="16"/>
</issue>
@@ -404,7 +404,7 @@
errorLine2=" ~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="804"
+ line="805"
column="16"/>
</issue>
@@ -415,7 +415,7 @@
errorLine2=" ~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="816"
+ line="817"
column="16"/>
</issue>
@@ -426,7 +426,7 @@
errorLine2=" ~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="816"
+ line="817"
column="29"/>
</issue>
@@ -437,7 +437,7 @@
errorLine2=" ~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="841"
+ line="844"
column="16"/>
</issue>
@@ -448,7 +448,7 @@
errorLine2=" ~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="853"
+ line="856"
column="16"/>
</issue>
@@ -459,7 +459,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="853"
+ line="856"
column="35"/>
</issue>
@@ -470,7 +470,7 @@
errorLine2=" ~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="865"
+ line="868"
column="16"/>
</issue>
@@ -481,7 +481,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="865"
+ line="868"
column="32"/>
</issue>
@@ -492,7 +492,7 @@
errorLine2=" ~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="880"
+ line="883"
column="16"/>
</issue>
@@ -503,7 +503,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="880"
+ line="883"
column="33"/>
</issue>
@@ -514,7 +514,7 @@
errorLine2=" ~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="892"
+ line="895"
column="16"/>
</issue>
@@ -525,7 +525,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="892"
+ line="895"
column="33"/>
</issue>
@@ -536,7 +536,7 @@
errorLine2=" ~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="904"
+ line="907"
column="16"/>
</issue>
@@ -547,7 +547,7 @@
errorLine2=" ~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="916"
+ line="919"
column="16"/>
</issue>
@@ -558,7 +558,7 @@
errorLine2=" ~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="942"
+ line="945"
column="16"/>
</issue>
@@ -569,7 +569,7 @@
errorLine2=" ~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="954"
+ line="957"
column="16"/>
</issue>
@@ -580,7 +580,7 @@
errorLine2=" ~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="966"
+ line="969"
column="16"/>
</issue>
@@ -591,7 +591,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="966"
+ line="969"
column="28"/>
</issue>
@@ -602,7 +602,7 @@
errorLine2=" ~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="980"
+ line="983"
column="16"/>
</issue>
@@ -613,7 +613,7 @@
errorLine2=" ~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="992"
+ line="995"
column="16"/>
</issue>
@@ -624,7 +624,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="992"
+ line="995"
column="31"/>
</issue>
@@ -635,7 +635,7 @@
errorLine2=" ~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="1007"
+ line="1010"
column="16"/>
</issue>
@@ -646,7 +646,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="1007"
+ line="1010"
column="44"/>
</issue>
@@ -657,7 +657,7 @@
errorLine2=" ~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="1019"
+ line="1022"
column="16"/>
</issue>
@@ -668,7 +668,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="1019"
+ line="1022"
column="27"/>
</issue>
@@ -679,7 +679,7 @@
errorLine2=" ~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="1032"
+ line="1035"
column="16"/>
</issue>
@@ -690,7 +690,7 @@
errorLine2=" ~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="1044"
+ line="1047"
column="16"/>
</issue>
@@ -701,7 +701,7 @@
errorLine2=" ~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="1056"
+ line="1059"
column="16"/>
</issue>
@@ -712,7 +712,7 @@
errorLine2=" ~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="1056"
+ line="1059"
column="37"/>
</issue>
@@ -723,7 +723,7 @@
errorLine2=" ~">
<location
file="src/main/java/androidx/tvprovider/media/tv/BasePreviewProgram.java"
- line="1068"
+ line="1071"
column="16"/>
</issue>
@@ -1438,7 +1438,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="113"
+ line="112"
column="12"/>
</issue>
@@ -1449,19 +1449,19 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="120"
+ line="119"
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 @Type String getType() {"
- errorLine2=" ~~~~~~">
+ errorLine1=" public @Channels.Type String getType() {"
+ errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="127"
- column="18"/>
+ line="126"
+ column="27"/>
</issue>
<issue
@@ -1471,7 +1471,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="134"
+ line="133"
column="12"/>
</issue>
@@ -1482,7 +1482,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="141"
+ line="140"
column="12"/>
</issue>
@@ -1493,7 +1493,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="148"
+ line="147"
column="12"/>
</issue>
@@ -1504,7 +1504,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="155"
+ line="154"
column="25"/>
</issue>
@@ -1515,7 +1515,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="186"
+ line="185"
column="12"/>
</issue>
@@ -1526,7 +1526,7 @@
errorLine2=" ~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="201"
+ line="200"
column="12"/>
</issue>
@@ -1537,7 +1537,7 @@
errorLine2=" ~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="209"
+ line="208"
column="12"/>
</issue>
@@ -1548,7 +1548,7 @@
errorLine2=" ~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="217"
+ line="216"
column="12"/>
</issue>
@@ -1559,7 +1559,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="225"
+ line="224"
column="12"/>
</issue>
@@ -1570,7 +1570,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="233"
+ line="232"
column="12"/>
</issue>
@@ -1581,7 +1581,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="248"
+ line="247"
column="12"/>
</issue>
@@ -1592,7 +1592,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="258"
+ line="257"
column="25"/>
</issue>
@@ -1603,7 +1603,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="265"
+ line="264"
column="12"/>
</issue>
@@ -1614,7 +1614,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="272"
+ line="271"
column="12"/>
</issue>
@@ -1625,7 +1625,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="279"
+ line="278"
column="12"/>
</issue>
@@ -1636,7 +1636,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="286"
+ line="285"
column="12"/>
</issue>
@@ -1647,7 +1647,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="293"
+ line="292"
column="12"/>
</issue>
@@ -1658,7 +1658,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="333"
+ line="332"
column="12"/>
</issue>
@@ -1669,7 +1669,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="374"
+ line="373"
column="12"/>
</issue>
@@ -1680,7 +1680,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="386"
+ line="385"
column="12"/>
</issue>
@@ -1691,7 +1691,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="425"
+ line="424"
column="19"/>
</issue>
@@ -1702,7 +1702,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="425"
+ line="424"
column="38"/>
</issue>
@@ -1713,7 +1713,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="631"
+ line="630"
column="24"/>
</issue>
@@ -1724,7 +1724,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="665"
+ line="664"
column="16"/>
</issue>
@@ -1735,30 +1735,30 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="665"
+ line="664"
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=" public Builder setType(@Type String type) {"
+ errorLine1=" public Builder setType(@Channels.Type String type) {"
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="676"
+ line="675"
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 Builder setType(@Type String type) {"
- errorLine2=" ~~~~~~">
+ errorLine1=" public Builder setType(@Channels.Type String type) {"
+ errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="676"
- column="38"/>
+ line="675"
+ column="47"/>
</issue>
<issue
@@ -1768,7 +1768,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="687"
+ line="686"
column="16"/>
</issue>
@@ -1779,7 +1779,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="687"
+ line="686"
column="41"/>
</issue>
@@ -1790,7 +1790,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="698"
+ line="697"
column="16"/>
</issue>
@@ -1801,7 +1801,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="698"
+ line="697"
column="39"/>
</issue>
@@ -1812,7 +1812,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="709"
+ line="708"
column="16"/>
</issue>
@@ -1823,7 +1823,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="709"
+ line="708"
column="39"/>
</issue>
@@ -1834,7 +1834,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="720"
+ line="719"
column="16"/>
</issue>
@@ -1845,7 +1845,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="720"
+ line="719"
column="52"/>
</issue>
@@ -1856,7 +1856,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="732"
+ line="731"
column="16"/>
</issue>
@@ -1867,7 +1867,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="744"
+ line="743"
column="16"/>
</issue>
@@ -1878,7 +1878,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="755"
+ line="754"
column="16"/>
</issue>
@@ -1889,7 +1889,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="767"
+ line="766"
column="16"/>
</issue>
@@ -1900,7 +1900,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="767"
+ line="766"
column="48"/>
</issue>
@@ -1911,7 +1911,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="779"
+ line="778"
column="16"/>
</issue>
@@ -1922,7 +1922,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="779"
+ line="778"
column="48"/>
</issue>
@@ -1933,7 +1933,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="791"
+ line="790"
column="16"/>
</issue>
@@ -1944,7 +1944,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="791"
+ line="790"
column="39"/>
</issue>
@@ -1955,7 +1955,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="802"
+ line="801"
column="16"/>
</issue>
@@ -1966,7 +1966,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="814"
+ line="813"
column="16"/>
</issue>
@@ -1977,7 +1977,7 @@
errorLine2=" ~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="814"
+ line="813"
column="42"/>
</issue>
@@ -1988,7 +1988,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="827"
+ line="826"
column="16"/>
</issue>
@@ -1999,7 +1999,7 @@
errorLine2=" ~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="827"
+ line="826"
column="47"/>
</issue>
@@ -2010,7 +2010,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="839"
+ line="838"
column="16"/>
</issue>
@@ -2021,7 +2021,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="839"
+ line="838"
column="41"/>
</issue>
@@ -2032,7 +2032,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="852"
+ line="851"
column="16"/>
</issue>
@@ -2043,7 +2043,7 @@
errorLine2=" ~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="852"
+ line="851"
column="44"/>
</issue>
@@ -2054,7 +2054,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="865"
+ line="864"
column="16"/>
</issue>
@@ -2065,7 +2065,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="865"
+ line="864"
column="46"/>
</issue>
@@ -2076,7 +2076,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="876"
+ line="875"
column="16"/>
</issue>
@@ -2087,7 +2087,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="889"
+ line="888"
column="16"/>
</issue>
@@ -2098,7 +2098,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="889"
+ line="888"
column="52"/>
</issue>
@@ -2109,7 +2109,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="900"
+ line="899"
column="16"/>
</issue>
@@ -2120,7 +2120,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="911"
+ line="910"
column="16"/>
</issue>
@@ -2131,7 +2131,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="922"
+ line="921"
column="16"/>
</issue>
@@ -2142,7 +2142,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="933"
+ line="932"
column="16"/>
</issue>
@@ -2153,7 +2153,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="945"
+ line="944"
column="16"/>
</issue>
@@ -2164,7 +2164,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="945"
+ line="944"
column="46"/>
</issue>
@@ -2175,7 +2175,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="956"
+ line="955"
column="16"/>
</issue>
@@ -2186,7 +2186,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="969"
+ line="968"
column="16"/>
</issue>
@@ -2197,7 +2197,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="982"
+ line="981"
column="16"/>
</issue>
@@ -2208,7 +2208,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="995"
+ line="994"
column="16"/>
</issue>
@@ -2219,7 +2219,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="1009"
+ line="1008"
column="16"/>
</issue>
@@ -2230,7 +2230,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="1009"
+ line="1008"
column="44"/>
</issue>
@@ -2241,7 +2241,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="1034"
+ line="1033"
column="16"/>
</issue>
@@ -2252,7 +2252,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/Channel.java"
- line="1043"
+ line="1042"
column="16"/>
</issue>
@@ -2307,7 +2307,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/PreviewChannel.java"
- line="93"
+ line="92"
column="19"/>
</issue>
@@ -2318,7 +2318,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/PreviewChannel.java"
- line="93"
+ line="92"
column="45"/>
</issue>
@@ -2329,7 +2329,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/PreviewChannel.java"
- line="121"
+ line="120"
column="12"/>
</issue>
@@ -2340,7 +2340,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/PreviewChannel.java"
- line="130"
+ line="129"
column="12"/>
</issue>
@@ -2351,7 +2351,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/PreviewChannel.java"
- line="137"
+ line="136"
column="12"/>
</issue>
@@ -2362,7 +2362,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/PreviewChannel.java"
- line="145"
+ line="144"
column="12"/>
</issue>
@@ -2373,7 +2373,7 @@
errorLine2=" ~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/PreviewChannel.java"
- line="152"
+ line="151"
column="12"/>
</issue>
@@ -2384,7 +2384,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/PreviewChannel.java"
- line="160"
+ line="159"
column="12"/>
</issue>
@@ -2395,7 +2395,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/PreviewChannel.java"
- line="172"
+ line="171"
column="12"/>
</issue>
@@ -2406,7 +2406,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/PreviewChannel.java"
- line="172"
+ line="171"
column="27"/>
</issue>
@@ -2417,7 +2417,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/PreviewChannel.java"
- line="206"
+ line="205"
column="12"/>
</issue>
@@ -2428,7 +2428,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/PreviewChannel.java"
- line="213"
+ line="212"
column="12"/>
</issue>
@@ -2439,7 +2439,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/PreviewChannel.java"
- line="220"
+ line="219"
column="12"/>
</issue>
@@ -2450,7 +2450,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/PreviewChannel.java"
- line="227"
+ line="226"
column="12"/>
</issue>
@@ -2461,7 +2461,7 @@
errorLine2=" ~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/PreviewChannel.java"
- line="234"
+ line="233"
column="12"/>
</issue>
@@ -2472,7 +2472,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/PreviewChannel.java"
- line="241"
+ line="240"
column="12"/>
</issue>
@@ -2483,7 +2483,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/PreviewChannel.java"
- line="272"
+ line="271"
column="40"/>
</issue>
@@ -2494,7 +2494,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/PreviewChannel.java"
- line="297"
+ line="296"
column="12"/>
</issue>
@@ -2505,7 +2505,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/PreviewChannel.java"
- line="354"
+ line="353"
column="24"/>
</issue>
@@ -2516,7 +2516,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/PreviewChannel.java"
- line="389"
+ line="388"
column="16"/>
</issue>
@@ -2527,7 +2527,7 @@
errorLine2=" ~~~~~~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/PreviewChannel.java"
- line="389"
+ line="388"
column="39"/>
</issue>
@@ -2538,7 +2538,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/PreviewChannel.java"
- line="417"
+ line="416"
column="16"/>
</issue>
@@ -2549,7 +2549,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/PreviewChannel.java"
- line="417"
+ line="416"
column="41"/>
</issue>
@@ -2560,7 +2560,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/PreviewChannel.java"
- line="429"
+ line="428"
column="16"/>
</issue>
@@ -2571,7 +2571,7 @@
errorLine2=" ~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/PreviewChannel.java"
- line="429"
+ line="428"
column="44"/>
</issue>
@@ -2582,7 +2582,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/PreviewChannel.java"
- line="448"
+ line="447"
column="16"/>
</issue>
@@ -2593,7 +2593,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/PreviewChannel.java"
- line="448"
+ line="447"
column="46"/>
</issue>
@@ -2604,7 +2604,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/PreviewChannel.java"
- line="463"
+ line="462"
column="16"/>
</issue>
@@ -2615,7 +2615,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/PreviewChannel.java"
- line="463"
+ line="462"
column="48"/>
</issue>
@@ -2626,7 +2626,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/PreviewChannel.java"
- line="478"
+ line="477"
column="16"/>
</issue>
@@ -2637,7 +2637,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/PreviewChannel.java"
- line="493"
+ line="492"
column="16"/>
</issue>
@@ -2648,7 +2648,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/PreviewChannel.java"
- line="508"
+ line="507"
column="16"/>
</issue>
@@ -2659,7 +2659,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/PreviewChannel.java"
- line="523"
+ line="522"
column="16"/>
</issue>
@@ -2670,7 +2670,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/PreviewChannel.java"
- line="534"
+ line="533"
column="16"/>
</issue>
@@ -2681,7 +2681,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/PreviewChannel.java"
- line="546"
+ line="545"
column="16"/>
</issue>
@@ -2692,7 +2692,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/PreviewChannel.java"
- line="557"
+ line="556"
column="16"/>
</issue>
@@ -3286,7 +3286,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/TvContractCompat.java"
- line="1883"
+ line="1890"
column="62"/>
</issue>
@@ -3297,7 +3297,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/TvContractCompat.java"
- line="2645"
+ line="2652"
column="27"/>
</issue>
@@ -3308,7 +3308,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/TvContractCompat.java"
- line="2684"
+ line="2691"
column="34"/>
</issue>
@@ -3319,7 +3319,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/tvprovider/media/tv/TvContractCompat.java"
- line="2732"
+ line="2739"
column="47"/>
</issue>
diff --git a/ui/ui-tooling/lint-baseline.xml b/ui/ui-tooling/lint-baseline.xml
index 1154f4d..932b484 100644
--- a/ui/ui-tooling/lint-baseline.xml
+++ b/ui/ui-tooling/lint-baseline.xml
@@ -2,6 +2,17 @@
<issues format="5" by="lint 4.2.0-alpha06" client="gradle" variant="debug" version="4.2.0-alpha06">
<issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" return invoke(instance, *arguments)"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/ui/tooling/preview/PreviewUtils.kt"
+ line="141"
+ column="12"/>
+ </issue>
+
+ <issue
id="UnsafeNewApiCall"
message="This call is to a method from API 26, the call containing class androidx.ui.tooling.preview.LayoutlibFontResourceLoader is not annotated with @RequiresApi(x) where x is at least 26. Either annotate the containing class with at least @RequiresApi(26) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(26)."
errorLine1=" is ResourceFont -> context.resources.getFont(font.resId)"
diff --git a/ui/ui-tooling/src/androidTest/java/androidx/ui/tooling/ComposeViewAdapterTest.kt b/ui/ui-tooling/src/androidTest/java/androidx/ui/tooling/ComposeViewAdapterTest.kt
index 0d7a767..86d3bad 100644
--- a/ui/ui-tooling/src/androidTest/java/androidx/ui/tooling/ComposeViewAdapterTest.kt
+++ b/ui/ui-tooling/src/androidTest/java/androidx/ui/tooling/ComposeViewAdapterTest.kt
@@ -18,6 +18,7 @@
import android.app.Activity
import android.os.Bundle
+import android.view.ViewTreeObserver
import androidx.compose.animation.core.InternalAnimationApi
import androidx.compose.animation.core.TransitionAnimation
import androidx.ui.tooling.preview.ComposeViewAdapter
@@ -31,6 +32,8 @@
import org.junit.Before
import org.junit.Rule
import org.junit.Test
+import java.util.concurrent.CountDownLatch
+import java.util.concurrent.TimeUnit
class ComposeViewAdapterTest {
@Suppress("DEPRECATION")
@@ -80,16 +83,41 @@
}
}
- @OptIn(InternalAnimationApi::class)
@Test
fun transitionAnimationsAreSubscribedToTheClock() {
+ checkComposableAnimationIsSubscribed("CheckBoxPreview")
+ }
+
+ @Test
+ fun transitionAnimationsWithSubcomposition() {
+ checkComposableAnimationIsSubscribed("CheckBoxScaffoldPreview")
+ }
+
+ @OptIn(InternalAnimationApi::class)
+ private fun checkComposableAnimationIsSubscribed(composableName: String) {
val clock = PreviewAnimationClock()
+ val laidOutLatch = CountDownLatch(1)
activityTestRule.runOnUiThread {
composeViewAdapter.init(
"androidx.ui.tooling.TestAnimationPreviewKt",
- "PressStateAnimation"
+ composableName
)
+
+ composeViewAdapter.viewTreeObserver.addOnPreDrawListener(
+ object : ViewTreeObserver.OnPreDrawListener {
+ override fun onPreDraw(): Boolean {
+ laidOutLatch.countDown()
+ composeViewAdapter.viewTreeObserver.removeOnPreDrawListener(this)
+ return true
+ }
+ }
+ )
+ }
+
+ assertTrue(laidOutLatch.await(1, TimeUnit.SECONDS))
+
+ activityTestRule.runOnUiThread {
composeViewAdapter.clock = clock
assertTrue(clock.observersToAnimations.isEmpty())
@@ -99,7 +127,7 @@
val observer = clock.observersToAnimations.keys.single()
val transitionAnimation =
(observer as TransitionAnimation<*>.TransitionAnimationClockObserver).animation
- assertEquals("colorAnim", transitionAnimation.label)
+ assertEquals("checkBoxAnim", transitionAnimation.label)
}
}
diff --git a/ui/ui-tooling/src/androidTest/java/androidx/ui/tooling/TestAnimationPreview.kt b/ui/ui-tooling/src/androidTest/java/androidx/ui/tooling/TestAnimationPreview.kt
index a166a9b..f99ba36 100644
--- a/ui/ui-tooling/src/androidTest/java/androidx/ui/tooling/TestAnimationPreview.kt
+++ b/ui/ui-tooling/src/androidTest/java/androidx/ui/tooling/TestAnimationPreview.kt
@@ -16,56 +16,61 @@
package androidx.ui.tooling
-import androidx.compose.animation.ColorPropKey
-import androidx.compose.animation.core.spring
+import androidx.compose.animation.DpPropKey
import androidx.compose.animation.core.transitionDefinition
import androidx.compose.animation.transition
-import androidx.compose.foundation.Canvas
-import androidx.compose.foundation.layout.fillMaxSize
+import androidx.compose.foundation.selection.toggleable
+import androidx.compose.foundation.shape.CornerSize
+import androidx.compose.material.Icon
+import androidx.compose.material.MaterialTheme
+import androidx.compose.material.Scaffold
+import androidx.compose.material.Surface
+import androidx.compose.material.icons.Icons
+import androidx.compose.material.icons.filled.Done
import androidx.compose.runtime.Composable
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
-import androidx.compose.ui.gesture.pressIndicatorGestureFilter
-import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.unit.dp
import androidx.ui.tooling.preview.Preview
-private enum class PressState { Pressed, Released }
-
-private val color = ColorPropKey()
-
-private val definition = transitionDefinition<PressState> {
- state(PressState.Released) {
- this[color] = Color.Red
+val CheckBoxCorner = DpPropKey("CheckBox Corner")
+enum class CheckBoxState { Unselected, Selected }
+val CheckBoxTransitionDefinition = transitionDefinition<CheckBoxState> {
+ state(CheckBoxState.Selected) {
+ this[CheckBoxCorner] = 28.dp
}
- state(PressState.Pressed) {
- this[color] = Color.Blue
- }
- transition {
- color using spring(
- stiffness = 50f
- )
+ state(CheckBoxState.Unselected) {
+ this[CheckBoxCorner] = 0.dp
}
}
-@Preview
+@Preview("Single CheckBox")
@Composable
-fun PressStateAnimation() {
- val toState = remember { mutableStateOf(PressState.Released) }
- val pressIndicator =
- Modifier.pressIndicatorGestureFilter(
- toState.value = PressState.Pressed },
- toState.value = PressState.Released },
- toState.value = PressState.Released }
- )
+fun CheckBoxPreview() {
+ CheckBox()
+}
- val state = transition(label = "colorAnim", definition = definition, toState = toState.value)
- ColorRect(pressIndicator, color = state[color])
+@Preview(name = "CheckBox + Scaffold")
+@Composable
+fun CheckBoxScaffoldPreview() {
+ Scaffold {
+ CheckBox()
+ }
}
@Composable
-private fun ColorRect(modifier: Modifier = Modifier, color: Color) {
- Canvas(modifier.fillMaxSize()) {
- drawRect(color)
+private fun CheckBox() {
+ val (selected, onSelected) = remember { mutableStateOf(false) }
+ val state = transition(
+ label = "checkBoxAnim",
+ definition = CheckBoxTransitionDefinition,
+ toState = if (selected) CheckBoxState.Selected else CheckBoxState.Unselected
+ )
+ Surface(
+ shape = MaterialTheme.shapes.large.copy(topLeft = CornerSize(state[CheckBoxCorner])),
+ modifier = Modifier.toggleable(value = selected, >
+ ) {
+ Icon(asset = Icons.Filled.Done)
}
}
\ No newline at end of file
diff --git a/ui/ui-tooling/src/main/java/androidx/ui/tooling/preview/ComposeViewAdapter.kt b/ui/ui-tooling/src/main/java/androidx/ui/tooling/preview/ComposeViewAdapter.kt
index f6e1c6b..fc1c0f3 100644
--- a/ui/ui-tooling/src/main/java/androidx/ui/tooling/preview/ComposeViewAdapter.kt
+++ b/ui/ui-tooling/src/main/java/androidx/ui/tooling/preview/ComposeViewAdapter.kt
@@ -26,6 +26,7 @@
import android.widget.FrameLayout
import androidx.annotation.VisibleForTesting
import androidx.compose.animation.TransitionModel
+import androidx.compose.animation.core.AnimationClockObserver
import androidx.compose.animation.core.InternalAnimationApi
import androidx.compose.runtime.AtomicReference
import androidx.compose.runtime.Composable
@@ -243,10 +244,13 @@
@VisibleForTesting
internal fun findAndSubscribeTransitions() {
val slotTrees = slotTableRecord.store.map { it.asTree() }
- slotTrees.mapNotNull { tree -> tree.firstOrNull { it.name == composableName } }
- .firstOrNull()?.let { composable ->
- // Find all the AnimationClockObservers corresponding to transition animations
- val observers = composable.findAll {
+ val observers = mutableSetOf<AnimationClockObserver>()
+ // Check all the slot tables, since some animations might not be present in the same
+ // table as the one containing the `@Composable` being previewed, e.g. when they're
+ // defined using sub-composition.
+ slotTrees.forEach { tree ->
+ observers.addAll(
+ tree.findAll {
// Find `transition` calls in the user code, i.e. when source location is known
it.name == "transition" && it.location != null
}.mapNotNull {
@@ -257,12 +261,13 @@
} as? TransitionModel<*>
transitionModel?.anim?.animationClockObserver
}
- hasAnimations = observers.isNotEmpty()
- // Subscribe all the observers found to the `PreviewAnimationClock`
- if (::clock.isInitialized) {
- observers.forEach { clock.subscribe(it) }
- }
- }
+ )
+ }
+ hasAnimations = observers.isNotEmpty()
+ // Subscribe all the observers found to the `PreviewAnimationClock`
+ if (::clock.isInitialized) {
+ observers.forEach { clock.subscribe(it) }
+ }
}
private fun Group.firstOrNull(predicate: (Group) -> Boolean): Group? {
diff --git a/versionedparcelable/versionedparcelable/lint-baseline.xml b/versionedparcelable/versionedparcelable/lint-baseline.xml
index 1b33fef..e72173f 100644
--- a/versionedparcelable/versionedparcelable/lint-baseline.xml
+++ b/versionedparcelable/versionedparcelable/lint-baseline.xml
@@ -2,6 +2,28 @@
<issues format="5" by="lint 4.2.0-alpha06" client="gradle" variant="debug" version="4.2.0-alpha06">
<issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" return (T) m.invoke(null, versionedParcel);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/versionedparcelable/VersionedParcel.java"
+ line="1567"
+ column="24"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" m.invoke(null, val, versionedParcel);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/versionedparcelable/VersionedParcel.java"
+ line="1592"
+ column="13"/>
+ </issue>
+
+ <issue
id="UnsafeNewApiCall"
message="This call is to a method from API 21, the call containing class androidx.versionedparcelable.VersionedParcel is not annotated with @RequiresApi(x) where x is at least 21. Either annotate the containing class with at least @RequiresApi(21) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(21)."
errorLine1=" writeInt(val.getWidth());"
diff --git a/viewpager2/viewpager2/build.gradle b/viewpager2/viewpager2/build.gradle
index b4fdd6b..976410f 100644
--- a/viewpager2/viewpager2/build.gradle
+++ b/viewpager2/viewpager2/build.gradle
@@ -28,7 +28,7 @@
api("androidx.annotation:annotation:1.1.0")
implementation("androidx.core:core:1.1.0")
api("androidx.fragment:fragment:1.1.0")
- api(project(":recyclerview:recyclerview"))
+ api("androidx.recyclerview:recyclerview:1.2.0-alpha06")
implementation("androidx.collection:collection:1.1.0")
androidTestImplementation(ANDROIDX_TEST_UIAUTOMATOR)
diff --git a/wear/wear-input-testing/src/main/AndroidManifest.xml b/wear/wear-input-testing/src/main/AndroidManifest.xml
index 70ec2c9..a337dc2 100644
--- a/wear/wear-input-testing/src/main/AndroidManifest.xml
+++ b/wear/wear-input-testing/src/main/AndroidManifest.xml
@@ -14,4 +14,4 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<manifest package="androidx.wear"/>
+<manifest package="androidx.wear.input.testing"/>
diff --git a/wear/wear-input/src/test/java/androidx/wear/input/WearableButtonsTest.java b/wear/wear-input/src/test/java/androidx/wear/input/WearableButtonsTest.java
index 99b4c4a..08c26d8 100644
--- a/wear/wear-input/src/test/java/androidx/wear/input/WearableButtonsTest.java
+++ b/wear/wear-input/src/test/java/androidx/wear/input/WearableButtonsTest.java
@@ -30,7 +30,7 @@
import android.view.WindowManager;
import androidx.test.core.app.ApplicationProvider;
-import androidx.wear.R;
+import androidx.wear.input.testing.R;
import androidx.wear.input.testing.TestWearableButtonsProvider;
import org.junit.Test;
diff --git a/wear/wear-watchface/lint-baseline.xml b/wear/wear-watchface/lint-baseline.xml
index 49b77e50..5a03523 100644
--- a/wear/wear-watchface/lint-baseline.xml
+++ b/wear/wear-watchface/lint-baseline.xml
@@ -19,7 +19,7 @@
errorLine2="~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/wear/watchface/WatchFaceService.kt"
- line="234"
+ line="200"
column="1"/>
</issue>
diff --git a/wear/wear/api/current.txt b/wear/wear/api/current.txt
index fd1294a..daa569a 100644
--- a/wear/wear/api/current.txt
+++ b/wear/wear/api/current.txt
@@ -276,6 +276,77 @@
method public void onSwipeStarted(androidx.wear.widget.SwipeDismissFrameLayout!);
}
+ @UiThread public class WearArcLayout extends android.view.ViewGroup {
+ ctor public WearArcLayout(android.content.Context);
+ ctor public WearArcLayout(android.content.Context, android.util.AttributeSet?);
+ ctor public WearArcLayout(android.content.Context, android.util.AttributeSet?, int);
+ ctor public WearArcLayout(android.content.Context, android.util.AttributeSet?, int, int);
+ method public float getAnchorAngleDegrees();
+ method public int getAnchorType();
+ method public boolean getClockwise();
+ method public void setAnchorAngleDegrees(float);
+ method public void setAnchorType(int);
+ method public void setClockwise(boolean);
+ field public static final int ANCHOR_CENTER = 1; // 0x1
+ field public static final int ANCHOR_END = 2; // 0x2
+ field public static final int ANCHOR_START = 0; // 0x0
+ }
+
+ public static interface WearArcLayout.ArcLayoutWidget {
+ method public void checkInvalidAttributeAsChild(boolean);
+ method public float getSweepAngleDegrees();
+ method public int getThicknessPx();
+ method public boolean handleLayoutRotate(float);
+ }
+
+ public static class WearArcLayout.LayoutParams extends android.view.ViewGroup.LayoutParams {
+ ctor public WearArcLayout.LayoutParams(android.content.Context, android.util.AttributeSet?);
+ ctor public WearArcLayout.LayoutParams(int, int);
+ ctor public WearArcLayout.LayoutParams(android.view.ViewGroup.LayoutParams);
+ method public boolean getRotate();
+ method public int getVerticalAlignment();
+ method public void setRotate(boolean);
+ method public void setVerticalAlignment(int);
+ field public static final int VALIGN_CENTER = 1; // 0x1
+ field public static final int VALIGN_INNER = 2; // 0x2
+ field public static final int VALIGN_OUTER = 0; // 0x0
+ }
+
+ public class WearCurvedTextView extends android.view.View implements androidx.wear.widget.WearArcLayout.ArcLayoutWidget {
+ ctor public WearCurvedTextView(android.content.Context);
+ ctor public WearCurvedTextView(android.content.Context, android.util.AttributeSet?);
+ ctor public WearCurvedTextView(android.content.Context, android.util.AttributeSet?, int);
+ ctor public WearCurvedTextView(android.content.Context, android.util.AttributeSet?, int, int);
+ method public void checkInvalidAttributeAsChild(boolean);
+ method public float getAnchorAngleDegrees();
+ method public int getAnchorType();
+ method public boolean getClockwise();
+ method public android.text.TextUtils.TruncateAt? getEllipsize();
+ method public String? getFontFeatureSettings();
+ method public String? getFontVariationSettings();
+ method public float getLetterSpacing();
+ method public float getSweepAngleDegrees();
+ method public float getSweepDegrees();
+ method public String getText();
+ method @ColorInt public int getTextColor();
+ method public float getTextSize();
+ method public int getThicknessPx();
+ method public android.graphics.Typeface? getTypeface();
+ method public boolean handleLayoutRotate(float);
+ method public void setAnchorAngleDegrees(float);
+ method public void setAnchorType(int);
+ method public void setClockwise(boolean);
+ method public void setEllipsize(android.text.TextUtils.TruncateAt?);
+ method public void setFontFeatureSettings(String?);
+ method public void setFontVariationSettings(String?);
+ method public void setLetterSpacing(float);
+ method public void setSweepDegrees(float);
+ method public void setText(String);
+ method public void setTextColor(@ColorInt int);
+ method public void setTextSize(float);
+ method public void setTypeface(android.graphics.Typeface?);
+ }
+
public class WearableLinearLayoutManager extends androidx.recyclerview.widget.LinearLayoutManager {
ctor public WearableLinearLayoutManager(android.content.Context!, androidx.wear.widget.WearableLinearLayoutManager.LayoutCallback!);
ctor public WearableLinearLayoutManager(android.content.Context!);
diff --git a/wear/wear/api/public_plus_experimental_current.txt b/wear/wear/api/public_plus_experimental_current.txt
index fd1294a..daa569a 100644
--- a/wear/wear/api/public_plus_experimental_current.txt
+++ b/wear/wear/api/public_plus_experimental_current.txt
@@ -276,6 +276,77 @@
method public void onSwipeStarted(androidx.wear.widget.SwipeDismissFrameLayout!);
}
+ @UiThread public class WearArcLayout extends android.view.ViewGroup {
+ ctor public WearArcLayout(android.content.Context);
+ ctor public WearArcLayout(android.content.Context, android.util.AttributeSet?);
+ ctor public WearArcLayout(android.content.Context, android.util.AttributeSet?, int);
+ ctor public WearArcLayout(android.content.Context, android.util.AttributeSet?, int, int);
+ method public float getAnchorAngleDegrees();
+ method public int getAnchorType();
+ method public boolean getClockwise();
+ method public void setAnchorAngleDegrees(float);
+ method public void setAnchorType(int);
+ method public void setClockwise(boolean);
+ field public static final int ANCHOR_CENTER = 1; // 0x1
+ field public static final int ANCHOR_END = 2; // 0x2
+ field public static final int ANCHOR_START = 0; // 0x0
+ }
+
+ public static interface WearArcLayout.ArcLayoutWidget {
+ method public void checkInvalidAttributeAsChild(boolean);
+ method public float getSweepAngleDegrees();
+ method public int getThicknessPx();
+ method public boolean handleLayoutRotate(float);
+ }
+
+ public static class WearArcLayout.LayoutParams extends android.view.ViewGroup.LayoutParams {
+ ctor public WearArcLayout.LayoutParams(android.content.Context, android.util.AttributeSet?);
+ ctor public WearArcLayout.LayoutParams(int, int);
+ ctor public WearArcLayout.LayoutParams(android.view.ViewGroup.LayoutParams);
+ method public boolean getRotate();
+ method public int getVerticalAlignment();
+ method public void setRotate(boolean);
+ method public void setVerticalAlignment(int);
+ field public static final int VALIGN_CENTER = 1; // 0x1
+ field public static final int VALIGN_INNER = 2; // 0x2
+ field public static final int VALIGN_OUTER = 0; // 0x0
+ }
+
+ public class WearCurvedTextView extends android.view.View implements androidx.wear.widget.WearArcLayout.ArcLayoutWidget {
+ ctor public WearCurvedTextView(android.content.Context);
+ ctor public WearCurvedTextView(android.content.Context, android.util.AttributeSet?);
+ ctor public WearCurvedTextView(android.content.Context, android.util.AttributeSet?, int);
+ ctor public WearCurvedTextView(android.content.Context, android.util.AttributeSet?, int, int);
+ method public void checkInvalidAttributeAsChild(boolean);
+ method public float getAnchorAngleDegrees();
+ method public int getAnchorType();
+ method public boolean getClockwise();
+ method public android.text.TextUtils.TruncateAt? getEllipsize();
+ method public String? getFontFeatureSettings();
+ method public String? getFontVariationSettings();
+ method public float getLetterSpacing();
+ method public float getSweepAngleDegrees();
+ method public float getSweepDegrees();
+ method public String getText();
+ method @ColorInt public int getTextColor();
+ method public float getTextSize();
+ method public int getThicknessPx();
+ method public android.graphics.Typeface? getTypeface();
+ method public boolean handleLayoutRotate(float);
+ method public void setAnchorAngleDegrees(float);
+ method public void setAnchorType(int);
+ method public void setClockwise(boolean);
+ method public void setEllipsize(android.text.TextUtils.TruncateAt?);
+ method public void setFontFeatureSettings(String?);
+ method public void setFontVariationSettings(String?);
+ method public void setLetterSpacing(float);
+ method public void setSweepDegrees(float);
+ method public void setText(String);
+ method public void setTextColor(@ColorInt int);
+ method public void setTextSize(float);
+ method public void setTypeface(android.graphics.Typeface?);
+ }
+
public class WearableLinearLayoutManager extends androidx.recyclerview.widget.LinearLayoutManager {
ctor public WearableLinearLayoutManager(android.content.Context!, androidx.wear.widget.WearableLinearLayoutManager.LayoutCallback!);
ctor public WearableLinearLayoutManager(android.content.Context!);
diff --git a/wear/wear/api/restricted_current.txt b/wear/wear/api/restricted_current.txt
index f739937..87c5eb7 100644
--- a/wear/wear/api/restricted_current.txt
+++ b/wear/wear/api/restricted_current.txt
@@ -277,6 +277,83 @@
method public void onSwipeStarted(androidx.wear.widget.SwipeDismissFrameLayout!);
}
+ @UiThread public class WearArcLayout extends android.view.ViewGroup {
+ ctor public WearArcLayout(android.content.Context);
+ ctor public WearArcLayout(android.content.Context, android.util.AttributeSet?);
+ ctor public WearArcLayout(android.content.Context, android.util.AttributeSet?, int);
+ ctor public WearArcLayout(android.content.Context, android.util.AttributeSet?, int, int);
+ method public float getAnchorAngleDegrees();
+ method @androidx.wear.widget.WearArcLayout.AnchorType public int getAnchorType();
+ method public boolean getClockwise();
+ method public void setAnchorAngleDegrees(float);
+ method public void setAnchorType(@androidx.wear.widget.WearArcLayout.AnchorType int);
+ method public void setClockwise(boolean);
+ field public static final int ANCHOR_CENTER = 1; // 0x1
+ field public static final int ANCHOR_END = 2; // 0x2
+ field public static final int ANCHOR_START = 0; // 0x0
+ }
+
+ @IntDef({androidx.wear.widget.WearArcLayout.ANCHOR_START, androidx.wear.widget.WearArcLayout.ANCHOR_CENTER, androidx.wear.widget.WearArcLayout.ANCHOR_END}) @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface WearArcLayout.AnchorType {
+ }
+
+ public static interface WearArcLayout.ArcLayoutWidget {
+ method public void checkInvalidAttributeAsChild(boolean);
+ method public float getSweepAngleDegrees();
+ method public int getThicknessPx();
+ method public boolean handleLayoutRotate(float);
+ }
+
+ public static class WearArcLayout.LayoutParams extends android.view.ViewGroup.LayoutParams {
+ ctor public WearArcLayout.LayoutParams(android.content.Context, android.util.AttributeSet?);
+ ctor public WearArcLayout.LayoutParams(int, int);
+ ctor public WearArcLayout.LayoutParams(android.view.ViewGroup.LayoutParams);
+ method public boolean getRotate();
+ method @androidx.wear.widget.WearArcLayout.LayoutParams.VerticalAlignment public int getVerticalAlignment();
+ method public void setRotate(boolean);
+ method public void setVerticalAlignment(@androidx.wear.widget.WearArcLayout.LayoutParams.VerticalAlignment int);
+ field public static final int VALIGN_CENTER = 1; // 0x1
+ field public static final int VALIGN_INNER = 2; // 0x2
+ field public static final int VALIGN_OUTER = 0; // 0x0
+ }
+
+ @IntDef({androidx.wear.widget.WearArcLayout.LayoutParams.VALIGN_OUTER, androidx.wear.widget.WearArcLayout.LayoutParams.VALIGN_CENTER, androidx.wear.widget.WearArcLayout.LayoutParams.VALIGN_INNER}) @RestrictTo(androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface WearArcLayout.LayoutParams.VerticalAlignment {
+ }
+
+ public class WearCurvedTextView extends android.view.View implements androidx.wear.widget.WearArcLayout.ArcLayoutWidget {
+ ctor public WearCurvedTextView(android.content.Context);
+ ctor public WearCurvedTextView(android.content.Context, android.util.AttributeSet?);
+ ctor public WearCurvedTextView(android.content.Context, android.util.AttributeSet?, int);
+ ctor public WearCurvedTextView(android.content.Context, android.util.AttributeSet?, int, int);
+ method public void checkInvalidAttributeAsChild(boolean);
+ method public float getAnchorAngleDegrees();
+ method public int getAnchorType();
+ method public boolean getClockwise();
+ method public android.text.TextUtils.TruncateAt? getEllipsize();
+ method public String? getFontFeatureSettings();
+ method public String? getFontVariationSettings();
+ method public float getLetterSpacing();
+ method public float getSweepAngleDegrees();
+ method public float getSweepDegrees();
+ method public String getText();
+ method @ColorInt public int getTextColor();
+ method public float getTextSize();
+ method public int getThicknessPx();
+ method public android.graphics.Typeface? getTypeface();
+ method public boolean handleLayoutRotate(float);
+ method public void setAnchorAngleDegrees(float);
+ method public void setAnchorType(@androidx.wear.widget.WearArcLayout.AnchorType int);
+ method public void setClockwise(boolean);
+ method public void setEllipsize(android.text.TextUtils.TruncateAt?);
+ method public void setFontFeatureSettings(String?);
+ method public void setFontVariationSettings(String?);
+ method public void setLetterSpacing(float);
+ method public void setSweepDegrees(float);
+ method public void setText(String);
+ method public void setTextColor(@ColorInt int);
+ method public void setTextSize(float);
+ method public void setTypeface(android.graphics.Typeface?);
+ }
+
public class WearableLinearLayoutManager extends androidx.recyclerview.widget.LinearLayoutManager {
ctor public WearableLinearLayoutManager(android.content.Context!, androidx.wear.widget.WearableLinearLayoutManager.LayoutCallback!);
ctor public WearableLinearLayoutManager(android.content.Context!);
diff --git a/wear/wear/build.gradle b/wear/wear/build.gradle
index c0c2d38..50b87be 100644
--- a/wear/wear/build.gradle
+++ b/wear/wear/build.gradle
@@ -16,6 +16,8 @@
api("androidx.recyclerview:recyclerview:1.1.0")
api("androidx.core:core:1.5.0-alpha04")
+ androidTestImplementation project(":test-screenshot")
+ androidTestImplementation(KOTLIN_STDLIB)
androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT)
androidTestImplementation(ANDROIDX_TEST_CORE)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
@@ -41,6 +43,7 @@
sourceSets {
main.res.srcDirs += 'src/main/res-public'
+ androidTest.assets.srcDirs += project.rootDir.absolutePath + "/../../golden/wear/wear"
}
// Use Robolectric 4.+
diff --git a/wear/wear/src/androidTest/AndroidManifest.xml b/wear/wear/src/androidTest/AndroidManifest.xml
index 870b7a4..c7fade0 100644
--- a/wear/wear/src/androidTest/AndroidManifest.xml
+++ b/wear/wear/src/androidTest/AndroidManifest.xml
@@ -15,11 +15,15 @@
~ limitations under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="androidx.wear.test">
+ package="androidx.wear">
<uses-permission android:name="android.permission.WAKE_LOCK"/>
+ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
+ <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
- <application android:supportsRtl="true">
+ <application
+ android:supportsRtl="true"
+ android:requestLegacyExternalStorage="true">
<activity android:name="androidx.wear.widget.LayoutTestActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
diff --git a/wear/wear/src/androidTest/java/androidx/wear/widget/WearArcLayoutTest.kt b/wear/wear/src/androidTest/java/androidx/wear/widget/WearArcLayoutTest.kt
new file mode 100644
index 0000000..69cfcd0
--- /dev/null
+++ b/wear/wear/src/androidTest/java/androidx/wear/widget/WearArcLayoutTest.kt
@@ -0,0 +1,208 @@
+/*
+ * 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 androidx.wear.widget
+
+import android.graphics.Bitmap
+import android.graphics.Canvas
+import android.graphics.Color
+import android.view.View
+import android.view.View.MeasureSpec
+import android.view.ViewGroup
+import android.widget.FrameLayout
+import android.widget.TextView
+import androidx.test.core.app.ApplicationProvider
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.filters.MediumTest
+import androidx.test.screenshot.AndroidXScreenshotTestRule
+import androidx.test.screenshot.assertAgainstGolden
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+import java.util.concurrent.CountDownLatch
+import java.util.concurrent.TimeUnit
+
+@RunWith(AndroidJUnit4::class)
+@MediumTest
+class WearArcLayoutTest {
+
+ private val bitmap = Bitmap.createBitmap(SCREEN_WIDTH, SCREEN_HEIGHT, Bitmap.Config.ARGB_8888)
+ private val canvas = Canvas(bitmap)
+ private val renderDoneLatch = CountDownLatch(1)
+
+ @get:Rule
+ val screenshotRule = AndroidXScreenshotTestRule("wear/wear")
+
+ private fun doOneTest(key: String, views: List<View>) {
+ // Set the main frame.
+ val mainFrame = FrameLayout(ApplicationProvider.getApplicationContext())
+ mainFrame.setBackgroundColor(Color.GRAY)
+
+ for (view in views) {
+ mainFrame.addView(view)
+ }
+ val screenWidth = MeasureSpec.makeMeasureSpec(SCREEN_WIDTH, MeasureSpec.EXACTLY)
+ val screenHeight = MeasureSpec.makeMeasureSpec(SCREEN_HEIGHT, MeasureSpec.EXACTLY)
+ mainFrame.measure(screenWidth, screenHeight)
+ mainFrame.layout(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)
+ mainFrame.draw(canvas)
+ renderDoneLatch.await(TIMEOUT_MS, TimeUnit.MILLISECONDS)
+ bitmap.assertAgainstGolden(screenshotRule, key)
+ }
+
+ private fun createArc(text1: String = "SWEEP", text2: String = "Default") =
+ WearArcLayout(ApplicationProvider.getApplicationContext()).apply {
+ addView(
+ WearCurvedTextView(ApplicationProvider.getApplicationContext()).apply {
+ text = text1
+ textColor = Color.BLUE
+ setBackgroundColor(Color.rgb(100, 100, 0))
+ sweepDegrees = 45f
+ }
+ )
+ addView(
+ TextView(ApplicationProvider.getApplicationContext()).apply {
+ text = "TXT"
+ setTextColor(Color.GREEN)
+ layoutParams =
+ WearArcLayout.LayoutParams(
+ ViewGroup.LayoutParams.WRAP_CONTENT,
+ ViewGroup.LayoutParams.WRAP_CONTENT
+ )
+ }
+ )
+ addView(
+ WearCurvedTextView(ApplicationProvider.getApplicationContext()).apply {
+ text = text2
+ textColor = Color.RED
+ setBackgroundColor(Color.rgb(0, 100, 100))
+ }
+ )
+ }
+
+ private fun createMixedArc() =
+ WearArcLayout(ApplicationProvider.getApplicationContext()).apply {
+ addView(
+ WearCurvedTextView(ApplicationProvider.getApplicationContext()).apply {
+ text = "One"
+ setBackgroundColor(Color.rgb(100, 100, 100))
+ sweepDegrees = 20f
+ clockwise = true
+ }
+ )
+ addView(
+ WearCurvedTextView(ApplicationProvider.getApplicationContext()).apply {
+ text = "Two"
+ setBackgroundColor(Color.rgb(150, 150, 150))
+ sweepDegrees = 20f
+ clockwise = false
+ }
+ )
+ addView(
+ TextView(ApplicationProvider.getApplicationContext()).apply {
+ text = "TXT"
+ setTextColor(Color.GREEN)
+ layoutParams =
+ WearArcLayout.LayoutParams(
+ ViewGroup.LayoutParams.WRAP_CONTENT,
+ ViewGroup.LayoutParams.WRAP_CONTENT
+ ).apply { rotate = false }
+ }
+ )
+ addView(
+ WearCurvedTextView(ApplicationProvider.getApplicationContext()).apply {
+ text = "Three"
+ setBackgroundColor(Color.rgb(100, 100, 100))
+ sweepDegrees = 20f
+ clockwise = true
+ }
+ )
+ addView(
+ WearCurvedTextView(ApplicationProvider.getApplicationContext()).apply {
+ text = "Four"
+ setBackgroundColor(Color.rgb(150, 150, 150))
+ sweepDegrees = 20f
+ clockwise = false
+ }
+ )
+ }
+
+ @Test
+ @Throws(Exception::class)
+ fun testArcs() {
+ doOneTest(
+ "basic_arcs_screenshot",
+ listOf(
+ createArc(),
+ createArc("SWEEP", "Start").apply {
+ anchorAngleDegrees = 90f
+ anchorType = WearArcLayout.ANCHOR_START
+ },
+ createArc("SWEEP", "End").apply {
+ anchorAngleDegrees = 270f
+ anchorType = WearArcLayout.ANCHOR_END
+ },
+ createArc("SWEEP", "Center").apply {
+ anchorAngleDegrees = 315f
+ anchorType = WearArcLayout.ANCHOR_CENTER
+ }
+ )
+ )
+ }
+
+ @Test
+ @Throws(Exception::class)
+ fun testArcsCcw() {
+ doOneTest(
+ "basic_arcs_ccw_screenshot",
+ listOf(
+ createArc(),
+ createArc("SWEEP", "Start").apply {
+ anchorAngleDegrees = 270f
+ anchorType = WearArcLayout.ANCHOR_START
+ },
+ createArc("SWEEP", "End").apply {
+ anchorAngleDegrees = 90f
+ anchorType = WearArcLayout.ANCHOR_END
+ },
+ createArc("SWEEP", "Center").apply {
+ anchorAngleDegrees = 45f
+ anchorType = WearArcLayout.ANCHOR_CENTER
+ }
+ ).apply { forEach { it.clockwise = false } }
+ )
+ }
+
+ @Test
+ @Throws(Exception::class)
+ fun testArcsMixed() {
+ doOneTest(
+ "basic_arcs_mix_screenshot",
+ listOf(
+ createMixedArc(),
+ createMixedArc().apply {
+ clockwise = false
+ }
+ )
+ )
+ }
+
+ companion object {
+ private const val SCREEN_WIDTH = 390
+ private const val SCREEN_HEIGHT = 390
+ private const val TIMEOUT_MS = 1000L
+ }
+}
diff --git a/wear/wear/src/androidTest/java/androidx/wear/widget/WearCurvedTextViewTest.kt b/wear/wear/src/androidTest/java/androidx/wear/widget/WearCurvedTextViewTest.kt
new file mode 100644
index 0000000..b0845c1
--- /dev/null
+++ b/wear/wear/src/androidTest/java/androidx/wear/widget/WearCurvedTextViewTest.kt
@@ -0,0 +1,224 @@
+/*
+ * 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 androidx.wear.widget
+
+import android.graphics.Bitmap
+import android.graphics.Canvas
+import android.graphics.Color
+import android.text.TextUtils
+import android.view.View
+import android.view.View.MeasureSpec
+import android.widget.FrameLayout
+import androidx.test.core.app.ApplicationProvider
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.filters.MediumTest
+import androidx.test.screenshot.AndroidXScreenshotTestRule
+import androidx.test.screenshot.assertAgainstGolden
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+import java.util.concurrent.CountDownLatch
+import java.util.concurrent.TimeUnit
+
+@RunWith(AndroidJUnit4::class)
+@MediumTest
+class WearCurvedTextViewTest {
+
+ private val bitmap = Bitmap.createBitmap(SCREEN_WIDTH, SCREEN_HEIGHT, Bitmap.Config.ARGB_8888)
+ private val canvas = Canvas(bitmap)
+ private val renderDoneLatch = CountDownLatch(1)
+
+ @get:Rule
+ val screenshotRule = AndroidXScreenshotTestRule("wear/wear")
+
+ private fun doOneTest(key: String, views: List<View>) {
+ // Set the main frame.
+ val mainFrame = FrameLayout(ApplicationProvider.getApplicationContext())
+ mainFrame.setBackgroundColor(Color.GRAY)
+
+ for (view in views) {
+ mainFrame.addView(view)
+ }
+ val screenWidth = MeasureSpec.makeMeasureSpec(SCREEN_WIDTH, MeasureSpec.EXACTLY)
+ val screenHeight = MeasureSpec.makeMeasureSpec(SCREEN_HEIGHT, MeasureSpec.EXACTLY)
+ mainFrame.measure(screenWidth, screenHeight)
+ mainFrame.layout(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)
+ mainFrame.draw(canvas)
+ renderDoneLatch.await(TIMEOUT_MS, TimeUnit.MILLISECONDS)
+ bitmap.assertAgainstGolden(screenshotRule, key)
+ }
+
+ private fun createThree() = listOf(
+ WearCurvedTextView(ApplicationProvider.getApplicationContext()).apply {
+ text = "Center"
+ textColor = Color.BLUE
+ setBackgroundColor(Color.rgb(100, 100, 0))
+ anchorType = WearArcLayout.ANCHOR_CENTER
+ anchorAngleDegrees = 0f
+ },
+ WearCurvedTextView(ApplicationProvider.getApplicationContext()).apply {
+ text = "Left"
+ textColor = Color.RED
+ setBackgroundColor(Color.rgb(0, 100, 100))
+ anchorAngleDegrees = 240f
+ anchorType = WearArcLayout.ANCHOR_START
+ },
+ WearCurvedTextView(ApplicationProvider.getApplicationContext()).apply {
+ text = "Right"
+ textColor = Color.GREEN
+ setBackgroundColor(Color.rgb(100, 0, 100))
+ anchorType = WearArcLayout.ANCHOR_END
+ anchorAngleDegrees = 120f
+ }
+ )
+
+ @Test
+ @Throws(Exception::class)
+ fun testDefaults() {
+ val textView = WearCurvedTextView(ApplicationProvider.getApplicationContext())
+ textView.text = "Hello World!"
+ doOneTest("hello_world_screenshot", listOf(textView))
+ }
+
+ @Test
+ @Throws(Exception::class)
+ fun testAnchor() {
+ doOneTest("anchors_screenshot", createThree())
+ }
+
+ @Test
+ @Throws(Exception::class)
+ fun testSweepDegree() {
+ doOneTest(
+ "sweep_degree_screenshot",
+ createThree().apply {
+ forEachIndexed { ix, v ->
+ v.sweepDegrees = 50f
+ v.textAlignment = listOf(
+ View.TEXT_ALIGNMENT_CENTER,
+ View.TEXT_ALIGNMENT_TEXT_START,
+ View.TEXT_ALIGNMENT_TEXT_END
+ )[ix]
+ }
+ }
+ )
+ }
+
+ @Test
+ @Throws(Exception::class)
+ fun testCounterClockwise() {
+ doOneTest(
+ "counter_clockwise_screenshot",
+ createThree().apply { forEach { it.clockwise = false } }
+ )
+ }
+
+ @Test
+ @Throws(Exception::class)
+ fun testTextSize() {
+ doOneTest(
+ "text_size_screenshot",
+ createThree().apply {
+ forEachIndexed { ix, it -> it.textSize = 20f + ix * 4f }
+ }
+ )
+ }
+
+ @Test
+ @Throws(Exception::class)
+ fun testEllipsize() {
+ doOneTest(
+ "ellipsize_screenshot",
+ (
+ createThree() zip
+ listOf(
+ TextUtils.TruncateAt.START,
+ TextUtils.TruncateAt.MIDDLE,
+ TextUtils.TruncateAt.END
+ )
+ )
+ .map
+ { (v, e) -> v.ellipsize = e ; v.sweepDegrees = 50f; v.text += " but Longer" ; v }
+ )
+ }
+
+ @Test
+ @Throws(Exception::class)
+ fun testPadding() {
+ doOneTest(
+ "padding_screenshot",
+ createThree().apply {
+ forEachIndexed { ix, it ->
+ it.setPadding(
+ ix * 10, ((ix + 1) % 4) * 10,
+ ((ix + 2) % 4) * 10, ((ix + 3) % 4) * 10
+ )
+ }
+ }
+ )
+ }
+
+ @Test
+ @Throws(Exception::class)
+ fun testClockwiseTextBackground() {
+ doOneTest(
+ "cw_text_background_screenshot",
+ listOf(
+ WearCurvedTextView(ApplicationProvider.getApplicationContext()).apply {
+ text = "This is a clockwise text for testing background"
+ clockwise = true
+ anchorAngleDegrees = 170.0f
+ setBackgroundColor(Color.rgb(0, 100, 100))
+ },
+ WearCurvedTextView(ApplicationProvider.getApplicationContext()).apply {
+ text = "Another clockwise text"
+ clockwise = true
+ anchorAngleDegrees = 70.0f
+ setBackgroundColor(Color.rgb(0, 100, 100))
+ }
+ )
+ )
+ }
+
+ @Test
+ @Throws(Exception::class)
+ fun testCounterClockwiseTextBackground() {
+ doOneTest(
+ "ccw_text_background_screenshot",
+ listOf(
+ WearCurvedTextView(ApplicationProvider.getApplicationContext()).apply {
+ text = "This is a counterclockwise text for testing background"
+ clockwise = false
+ anchorAngleDegrees = 100.0f
+ setBackgroundColor(Color.rgb(0, 100, 100))
+ },
+ WearCurvedTextView(ApplicationProvider.getApplicationContext()).apply {
+ text = "Another counterclockwise text"
+ clockwise = false
+ anchorAngleDegrees = 230.0f
+ setBackgroundColor(Color.rgb(0, 100, 100))
+ }
+ )
+ )
+ }
+
+ companion object {
+ private const val SCREEN_WIDTH = 390
+ private const val SCREEN_HEIGHT = 390
+ private const val TIMEOUT_MS = 1000L
+ }
+}
diff --git a/wear/wear/src/main/java/androidx/wear/widget/WearArcLayout.java b/wear/wear/src/main/java/androidx/wear/widget/WearArcLayout.java
new file mode 100644
index 0000000..bd5948c
--- /dev/null
+++ b/wear/wear/src/main/java/androidx/wear/widget/WearArcLayout.java
@@ -0,0 +1,615 @@
+/*
+ * 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 androidx.wear.widget;
+
+import static java.lang.Math.asin;
+import static java.lang.Math.max;
+import static java.lang.Math.round;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.graphics.Canvas;
+import android.util.AttributeSet;
+import android.util.DisplayMetrics;
+import android.view.View;
+import android.view.ViewGroup;
+
+import androidx.annotation.IntDef;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.annotation.RestrictTo;
+import androidx.annotation.UiThread;
+import androidx.wear.R;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+
+/**
+ * Container which will lay its elements out on an arc. Elements will be relative to a given
+ * anchor angle (where 0 degrees = 12 o clock), where the layout relative to the anchor angle is
+ * controlled using {@code anchorAngleDegrees} and {@code anchorType}. The thickness of the arc is
+ * calculated based on the child element with the greatest height (in the case of Android
+ * widgets), or greatest thickness (for curved widgets). By default, the container lays its
+ * children one by one in clockwise direction. The attribute 'clockwise' can be set to false to
+ * make the layout direction as anti-clockwise. These two types of widgets will be drawn as
+ * follows.
+ *
+ * <p>Standard Android Widgets:
+ *
+ * <p>These widgets will be drawn as usual, but placed at the correct position on the arc, with
+ * the correct amount of rotation applied. As an example, for an Android Text widget, the text
+ * baseline would be drawn at a tangent to the arc. The arc length of a widget is obtained by
+ * measuring the width of the widget, and transforming that to the length of an arc on a circle.
+ *
+ * <p>A standard Android widget will be measured as usual, but the maximum height constraint will be
+ * capped at the minimum radius of the arc (i.e. width / 2).
+ *
+ * <p>"Curved" widgets:
+ *
+ * <p>Widgets which implement {@link ArcLayoutWidget} are expected to draw themselves within an arc
+ * automatically. These widgets will be measured with the full dimensions of the arc container.
+ * They are also expected to provide their thickness (used when calculating the thickness of the
+ * arc) and the current sweep angle (used for laying out when drawing). Note that the
+ * WearArcLayout will apply a rotation transform to the canvas before drawing this child; the
+ * inner child need not perform any rotations itself.
+ *
+ * <p>An example of a widget which implements this interface is {@link WearCurvedTextView}, which
+ * will lay itself out along the arc.
+ */
+@UiThread
+public class WearArcLayout extends ViewGroup {
+
+ /**
+ * Interface for a widget which knows it is being rendered inside an arc, and will draw
+ * itself accordingly. Any widget implementing this interface will receive the full-sized
+ * canvas, pre-rotated, in its draw call.
+ */
+ public interface ArcLayoutWidget {
+
+ /** Returns the sweep angle that this widget is drawn with. */
+ float getSweepAngleDegrees();
+
+ /** Returns the thickness of this widget inside the arc. */
+ int getThicknessPx();
+
+ /**
+ * Check whether the widget contains invalid attributes as a child of WearArcLayout
+ *
+ * @param clockwise the layout direction of the container
+ */
+ void checkInvalidAttributeAsChild(boolean clockwise);
+
+ /**
+ * Return whether the widget will handle the layout rotation requested by the container
+ * If return true, make sure that the layout rotation is done inside the widget since the
+ * container will skip this process.
+ */
+ boolean handleLayoutRotate(float angle);
+ }
+
+ /**
+ * Layout parameters for a widget added to an arc. This allows each element to specify
+ * whether or not it should be rotated(around the center of the child) when drawn inside the
+ * arc. For example, when the child is put at the center-bottom of the arc, whether the
+ * parent layout is responsible to rotate it 180 degree to draw it upside down.
+ *
+ * <p>Note that the {@code rotate} parameter is ignored when drawing "Fullscreen" elements.
+ */
+ public static class LayoutParams extends ViewGroup.LayoutParams {
+
+ /** Vertical alignment of elements within the arc. */
+ /** @hide */
+ @Retention(RetentionPolicy.SOURCE)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+ @IntDef({VALIGN_OUTER, VALIGN_CENTER, VALIGN_INNER})
+ public @interface VerticalAlignment {
+ }
+
+ /** Align to the outer edge of the parent WearArcLayout. */
+ public static final int VALIGN_OUTER = 0;
+
+ /** Align to the center of the parent WearArcLayout. */
+ public static final int VALIGN_CENTER = 1;
+
+ /** Align to the inner edge of the parent WearArcLayout. */
+ public static final int VALIGN_INNER = 2;
+
+ private boolean mRotate = true;
+ @VerticalAlignment
+ private int mVerticalAlignment = VALIGN_CENTER;
+
+ /**
+ * Creates a new set of layout parameters. The values are extracted from the supplied
+ * attributes set and context.
+ *
+ * @param context the application environment
+ * @param attrs the set of attributes from which to extract the layout parameters' values
+ */
+ public LayoutParams(@NonNull Context context, @Nullable AttributeSet attrs) {
+ super(context, attrs);
+
+ TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.WearArcLayout_Layout);
+
+ mRotate = a.getBoolean(R.styleable.WearArcLayout_Layout_layout_rotate, true);
+ mVerticalAlignment =
+ a.getInt(R.styleable.WearArcLayout_Layout_layout_valign, VALIGN_CENTER);
+
+ a.recycle();
+ }
+
+ /**
+ * Creates a new set of layout parameters with specified width and height
+ *
+ * @param width the width, either WRAP_CONTENT, MATCH_PARENT or a fixed size in pixels
+ * @param height the height, either WRAP_CONTENT, MATCH_PARENT or a fixed size in pixels
+ */
+ public LayoutParams(int width, int height) {
+ super(width, height);
+ }
+
+ /** Copy constructor */
+ public LayoutParams(@NonNull ViewGroup.LayoutParams source) {
+ super(source);
+ }
+
+ /**
+ * Gets whether the widget shall be rotated by the WearArcLayout container corresponding
+ * to its layout position angle
+ */
+ public boolean getRotate() {
+ return mRotate;
+ }
+
+ /**
+ * Sets whether the widget shall be rotated by the WearArcLayout container corresponding
+ * to its layout position angle
+ */
+ public void setRotate(boolean rotate) {
+ mRotate = rotate;
+ }
+
+ /**
+ * Gets how the widget is positioned vertically in the WearArcLayout.
+ */
+ @VerticalAlignment
+ public int getVerticalAlignment() {
+ return mVerticalAlignment;
+ }
+
+ /**
+ * Sets how the widget is positioned vertically in the WearArcLayout.
+ * @param verticalAlignment align the widget to outer, inner edges or center.
+ */
+ public void setVerticalAlignment(@VerticalAlignment int verticalAlignment) {
+ mVerticalAlignment = verticalAlignment;
+ }
+ }
+
+ /** Annotation for anchor types. */
+ /** @hide */
+ @Retention(RetentionPolicy.SOURCE)
+ @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
+ @IntDef({ANCHOR_START, ANCHOR_CENTER, ANCHOR_END})
+ public @interface AnchorType {
+ }
+
+ /**
+ * Anchor at the start of the set of elements drawn within this container. This causes the first
+ * child to be drawn from {@code anchorAngle} degrees, to the right.
+ *
+ * <p>As an example, if this container contains two arcs, one having 10 degrees of sweep and the
+ * other having 20 degrees of sweep, the first will be drawn between 0-10 degrees, and the
+ * second between 10-30 degrees.
+ */
+ public static final int ANCHOR_START = 0;
+
+ /**
+ * Anchor at the center of the set of elements drawn within this container.
+ *
+ * <p>As an example, if this container contains two arcs, one having 10 degrees of sweep and the
+ * other having 20 degrees of sweep, the first will be drawn between -15 and -5 degrees, and the
+ * second between -5 and 15 degrees.
+ */
+ public static final int ANCHOR_CENTER = 1;
+
+ /**
+ * Anchor at the end of the set of elements drawn within this container. This causes the last
+ * element to end at {@code anchorAngle} degrees, with the other elements swept to the left.
+ *
+ * <p>As an example, if this container contains two arcs, one having 10 degrees of sweep and the
+ * other having 20 degrees of sweep, the first will be drawn between -30 and -20 degrees, and
+ * the second between -20 and 0 degrees.
+ */
+ public static final int ANCHOR_END = 2;
+
+ private static final float DEFAULT_START_ANGLE_DEGREES = 0f;
+ private static final boolean DEFAULT_LAYOUT_DIRECTION_IS_CLOCKWISE = true; // clockwise
+ @AnchorType
+ private static final int DEFAULT_ANCHOR_TYPE = ANCHOR_START;
+
+ private int mThicknessPx = 0;
+
+ @AnchorType
+ private int mAnchorType;
+ private float mAnchorAngleDegrees;
+ private boolean mClockwise;
+
+ private float mCurrentCumulativeAngle = 0;
+
+ public WearArcLayout(@NonNull Context context) {
+ this(context, null);
+ }
+
+ public WearArcLayout(@NonNull Context context, @Nullable AttributeSet attrs) {
+ this(context, attrs, 0);
+ }
+
+ public WearArcLayout(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
+ this(context, attrs, defStyleAttr, 0);
+ }
+
+ public WearArcLayout(
+ @NonNull Context context,
+ @Nullable AttributeSet attrs,
+ int defStyleAttr,
+ int defStyleRes) {
+ super(context, attrs, defStyleAttr, defStyleRes);
+
+ TypedArray a =
+ context.obtainStyledAttributes(
+ attrs, R.styleable.WearArcLayout, defStyleAttr, defStyleRes
+ );
+
+ mAnchorType = a.getInt(R.styleable.WearArcLayout_anchorPosition, DEFAULT_ANCHOR_TYPE);
+ mAnchorAngleDegrees =
+ a.getFloat(
+ R.styleable.WearArcLayout_anchorAngleDegrees, DEFAULT_START_ANGLE_DEGREES
+ );
+ mClockwise = a.getBoolean(
+ R.styleable.WearArcLayout_clockwise, DEFAULT_LAYOUT_DIRECTION_IS_CLOCKWISE
+ );
+
+ a.recycle();
+ }
+
+ @Override
+ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ // Need to derive the thickness of the curve from the children. We're a curve, so the
+ // children can only be sized up to (width or height)/2 units. This currently only
+ // supports fitting to a circle.
+ //
+ // No matter what, fit to the given size, be it a maximum or a fixed size. It doesn't make
+ // sense for this container to wrap its children.
+ int actualWidthPx = MeasureSpec.getSize(widthMeasureSpec);
+ int actualHeightPx = MeasureSpec.getSize(heightMeasureSpec);
+
+ if (MeasureSpec.getMode(widthMeasureSpec) == MeasureSpec.UNSPECIFIED
+ && MeasureSpec.getMode(heightMeasureSpec) == MeasureSpec.UNSPECIFIED) {
+ // We can't actually resolve this.
+ // Let's fit to the screen dimensions, for need of anything better...
+ DisplayMetrics displayMetrics = getContext().getResources().getDisplayMetrics();
+ actualWidthPx = displayMetrics.widthPixels;
+ actualHeightPx = displayMetrics.heightPixels;
+ }
+
+ // Fit to a square.
+ if (actualWidthPx < actualHeightPx) {
+ actualHeightPx = actualWidthPx;
+ } else if (actualHeightPx < actualWidthPx) {
+ actualWidthPx = actualHeightPx;
+ }
+
+ int maxChildDimension = actualHeightPx / 2;
+
+ // Measure all children in the new measurespec, and cache the largest.
+ int childMeasureSpec = MeasureSpec.makeMeasureSpec(maxChildDimension, MeasureSpec.AT_MOST);
+
+ // We need to do two measure passes. First, we need to measure all "normal" children, and
+ // get the thickness of all "CurvedContainer" children. Once we have that, we know the
+ // maximum thickness, and we can lay out the "CurvedContainer" children, taking into
+ // account their vertical alignment.
+ int maxChildHeightPx = 0;
+ int childState = 0;
+ for (int i = 0; i < getChildCount(); i++) {
+ View child = getChildAt(i);
+
+ if (child.getVisibility() == GONE) {
+ continue;
+ }
+
+ // ArcLayoutWidget is a special case. Because of how it draws, fit it to the size
+ // of the whole widget.
+ if (child instanceof ArcLayoutWidget) {
+ ArcLayoutWidget widget = (ArcLayoutWidget) child;
+ maxChildHeightPx = max(maxChildHeightPx, widget.getThicknessPx());
+ } else {
+ measureChild(
+ child,
+ getChildMeasureSpec(childMeasureSpec, 0, child.getLayoutParams().width),
+ getChildMeasureSpec(childMeasureSpec, 0, child.getLayoutParams().height)
+ );
+ maxChildHeightPx = max(maxChildHeightPx, child.getMeasuredHeight());
+ childState = combineMeasuredStates(childState, child.getMeasuredState());
+ }
+ }
+
+ mThicknessPx = maxChildHeightPx;
+
+ // And now do the pass for the ArcLayoutWidgets
+ for (int i = 0; i < getChildCount(); i++) {
+ View child = getChildAt(i);
+
+ if (child.getVisibility() == GONE) {
+ continue;
+ }
+
+ if (child instanceof ArcLayoutWidget) {
+ ArcLayoutWidget curvedContainerChild = (ArcLayoutWidget) child;
+ LayoutParams childLayoutParams = (LayoutParams) child.getLayoutParams();
+
+ int childThicknessPx = curvedContainerChild.getThicknessPx();
+ int thicknessDiffPx = mThicknessPx - childThicknessPx;
+
+ float insetPx = 0;
+
+ if (childLayoutParams.getVerticalAlignment() == LayoutParams.VALIGN_CENTER) {
+ insetPx = thicknessDiffPx / 2f;
+ } else if (childLayoutParams.getVerticalAlignment() == LayoutParams.VALIGN_INNER) {
+ insetPx = thicknessDiffPx;
+ }
+
+ int innerChildMeasureSpec =
+ MeasureSpec.makeMeasureSpec(
+ maxChildDimension * 2 - round(insetPx * 2), MeasureSpec.EXACTLY);
+ measureChild(
+ child,
+ getChildMeasureSpec(innerChildMeasureSpec, 0, childLayoutParams.width),
+ getChildMeasureSpec(innerChildMeasureSpec, 0, childLayoutParams.height)
+ );
+
+ childState = combineMeasuredStates(childState, child.getMeasuredState());
+ }
+ }
+
+ setMeasuredDimension(
+ resolveSizeAndState(actualWidthPx, widthMeasureSpec, childState),
+ resolveSizeAndState(actualHeightPx, heightMeasureSpec, childState));
+ }
+
+ @Override
+ protected void onLayout(boolean changed, int l, int t, int r, int b) {
+ for (int i = 0; i < getChildCount(); i++) {
+ View child = getChildAt(i);
+
+ if (child.getVisibility() == GONE) {
+ continue;
+ }
+
+ // Curved container widgets have been measured so that the "arc" inside their widget
+ // will touch the outside of the box they have been measured in, taking into account
+ // the vertical alignment. Just grow them from the center.
+ if (child instanceof ArcLayoutWidget) {
+ int leftPx =
+ round((getMeasuredWidth() / 2f) - (child.getMeasuredWidth() / 2f));
+ int topPx =
+ round((getMeasuredHeight() / 2f) - (child.getMeasuredHeight() / 2f));
+
+ child.layout(
+ leftPx,
+ topPx,
+ leftPx + child.getMeasuredWidth(),
+ topPx + child.getMeasuredHeight()
+ );
+ } else {
+ // Normal widgets need to be placed on their canvas, taking into account their
+ // vertical position.
+ int leftPx =
+ round((getMeasuredWidth() / 2f) - (child.getMeasuredWidth() / 2f));
+ int topPx = getChildTopInset(child);
+
+ child.layout(
+ leftPx,
+ topPx,
+ leftPx + child.getMeasuredWidth(),
+ topPx + child.getMeasuredHeight());
+ }
+ }
+ }
+
+ @Override
+ protected void dispatchDraw(@NonNull Canvas canvas) {
+ mCurrentCumulativeAngle = calculateInitialRotation();
+ super.dispatchDraw(canvas);
+ }
+
+ @Override
+ protected boolean drawChild(@NonNull Canvas canvas, @NonNull View child, long drawingTime) {
+ // Rotate the canvas to make the children render in the right place.
+ canvas.save();
+
+ float arcAngle = calculateArcAngle(child);
+ float preRotation = arcAngle / 2f;
+ float multiplier = mClockwise ? 1f : -1f;
+
+ if (child instanceof ArcLayoutWidget) {
+ ArcLayoutWidget childWidget = (ArcLayoutWidget) child;
+ childWidget.checkInvalidAttributeAsChild(mClockwise);
+
+ // Special case for ArcLayoutWidget. This doesn't need pre-rotating to get the center
+ // of canvas lines up, as it should already know how to draw itself correctly from
+ // the "current" rotation. The layout rotation is always passed to the child widget,
+ // if the child has not handled this rotation by itself, the parent will have to
+ // rotate the canvas to apply this layout.
+ if (!childWidget.handleLayoutRotate(multiplier * mCurrentCumulativeAngle)) {
+ canvas.rotate(
+ multiplier * mCurrentCumulativeAngle,
+ getMeasuredWidth() / 2f,
+ getMeasuredHeight() / 2f
+ );
+ }
+ } else {
+ canvas.rotate(
+ multiplier * (mCurrentCumulativeAngle + preRotation),
+ getMeasuredWidth() / 2f,
+ getMeasuredHeight() / 2f);
+
+ // Do we need to do some counter rotation?
+ LayoutParams layoutParams = (LayoutParams) child.getLayoutParams();
+ // For counterclockwise layout, especially when mixing standard Android widget with
+ // ArcLayoutWidget as children, we might need to rotate the standard widget to make
+ // them with the same upwards direction. Note that the strange rotation center is
+ // because the child view is not x-centered but at the top of this container.
+ canvas.rotate(
+ (mClockwise || !layoutParams.getRotate()) ? 0f : 180f,
+ getMeasuredWidth() / 2f,
+ child.getMeasuredHeight() / 2f
+ );
+
+ if (!layoutParams.getRotate()) {
+ // Re-rotate about the top of the canvas, around the center of the actual child.
+ int childInset = getChildTopInset(child);
+ canvas.rotate(
+ -multiplier * (mCurrentCumulativeAngle + preRotation),
+ getMeasuredWidth() / 2f,
+ (child.getMeasuredHeight() / 2f) + childInset);
+ }
+ }
+
+ mCurrentCumulativeAngle += arcAngle;
+
+ boolean wasInvalidateIssued = super.drawChild(canvas, child, drawingTime);
+
+ canvas.restore();
+
+ return wasInvalidateIssued;
+ }
+
+ private float calculateInitialRotation() {
+ float multiplier = mClockwise ? 1f : -1f;
+ if (mAnchorType == ANCHOR_START) {
+ return multiplier * mAnchorAngleDegrees;
+ }
+
+ float totalArcAngle = 0;
+
+ for (int i = 0; i < getChildCount(); i++) {
+ totalArcAngle += calculateArcAngle(getChildAt(i));
+ }
+
+ if (mAnchorType == ANCHOR_CENTER) {
+ return multiplier * mAnchorAngleDegrees - (totalArcAngle / 2f);
+ } else if (mAnchorType == ANCHOR_END) {
+ return multiplier * mAnchorAngleDegrees - totalArcAngle;
+ }
+
+ return 0;
+ }
+
+ private float calculateArcAngle(@NonNull View view) {
+ if (view.getVisibility() == GONE) {
+ return 0f;
+ }
+
+ if (view instanceof ArcLayoutWidget) {
+ return ((ArcLayoutWidget) view).getSweepAngleDegrees();
+ } else {
+ float radiusPx = (getMeasuredWidth() / 2f) - mThicknessPx;
+ return (float) Math.toDegrees(2 * asin(view.getMeasuredWidth() / radiusPx / 2f));
+ }
+ }
+
+ private int getChildTopInset(@NonNull View child) {
+ LayoutParams childLayoutParams = (LayoutParams) child.getLayoutParams();
+
+ int thicknessDiffPx = mThicknessPx - child.getMeasuredHeight();
+
+ switch (childLayoutParams.getVerticalAlignment()) {
+ case LayoutParams.VALIGN_OUTER:
+ return 0;
+ case LayoutParams.VALIGN_CENTER:
+ return round(thicknessDiffPx / 2f);
+ case LayoutParams.VALIGN_INNER:
+ return thicknessDiffPx;
+ default:
+ // Nortmally unreachable...
+ return 0;
+ }
+ }
+
+ @Override
+ protected boolean checkLayoutParams(@NonNull ViewGroup.LayoutParams p) {
+ return p instanceof LayoutParams;
+ }
+
+ @Override
+ @NonNull
+ protected ViewGroup.LayoutParams generateLayoutParams(@NonNull ViewGroup.LayoutParams p) {
+ return new LayoutParams(p);
+ }
+
+ @Override
+ @NonNull
+ public ViewGroup.LayoutParams generateLayoutParams(@NonNull AttributeSet attrs) {
+ return new LayoutParams(getContext(), attrs);
+ }
+
+ @Override
+ @NonNull
+ protected ViewGroup.LayoutParams generateDefaultLayoutParams() {
+ return new LayoutParams(
+ ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
+ }
+
+ /** Returns the anchor type used for this container. */
+ @AnchorType
+ public int getAnchorType() {
+ return mAnchorType;
+ }
+
+ /** Sets the anchor type used for this container. */
+ public void setAnchorType(@AnchorType int anchorType) {
+ if (anchorType < ANCHOR_START || anchorType > ANCHOR_END) {
+ throw new IllegalArgumentException("Unknown anchor type");
+ }
+
+ mAnchorType = anchorType;
+ invalidate();
+ }
+
+ /** Returns the anchor angle used for this container, in degrees. */
+ public float getAnchorAngleDegrees() {
+ return mAnchorAngleDegrees;
+ }
+
+ /** Sets the anchor angle used for this container, in degrees. */
+ public void setAnchorAngleDegrees(float anchorAngleDegrees) {
+ mAnchorAngleDegrees = anchorAngleDegrees;
+ invalidate();
+ }
+
+ /** returns the layout direction */
+ public boolean getClockwise() {
+ return mClockwise;
+ }
+
+ /** Sets the layout direction */
+ public void setClockwise(boolean clockwise) {
+ mClockwise = clockwise;
+ invalidate();
+ }
+}
diff --git a/wear/wear/src/main/java/androidx/wear/widget/WearCurvedTextView.java b/wear/wear/src/main/java/androidx/wear/widget/WearCurvedTextView.java
new file mode 100644
index 0000000..86f8c10
--- /dev/null
+++ b/wear/wear/src/main/java/androidx/wear/widget/WearCurvedTextView.java
@@ -0,0 +1,855 @@
+/*
+ * 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 androidx.wear.widget;
+
+import static java.lang.Math.cos;
+import static java.lang.Math.max;
+import static java.lang.Math.min;
+import static java.lang.Math.round;
+import static java.lang.Math.sin;
+
+import android.content.Context;
+import android.content.res.ColorStateList;
+import android.content.res.Resources;
+import android.content.res.TypedArray;
+import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.Paint;
+import android.graphics.Path;
+import android.graphics.Rect;
+import android.graphics.Typeface;
+import android.os.Build;
+import android.text.StaticLayout;
+import android.text.TextPaint;
+import android.text.TextUtils;
+import android.util.AttributeSet;
+import android.view.View;
+
+import androidx.annotation.ColorInt;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.annotation.RequiresApi;
+import androidx.wear.R;
+
+/**
+ * A WearCurvedTextView is a component allowing developers to easily write curved text following
+ * the curvature of the largest circle that can be inscribed in the view. WearArcLayout could be
+ * used to concatenate multiple curved texts, also layout together with other widgets such as icons.
+ */
+public class WearCurvedTextView extends View implements WearArcLayout.ArcLayoutWidget {
+ private static final float UNSET_ANCHOR_DEGREE = -1f;
+ private static final int UNSET_ANCHOR_TYPE = -1;
+ private static final float UNSET_SWEEP_DEGREE = -1f;
+ private static final float MAX_SWEEP_DEGREE = 359.9f;
+ private static final float DEFAULT_TEXT_SIZE = 24f;
+ @ColorInt
+ private static final int DEFAULT_TEXT_COLOR = Color.WHITE;
+ private static final int DEFAULT_TEXT_STYLE = Typeface.NORMAL;
+ private static final boolean DEFAULT_CLOCKWISE = true;
+ private static final int FONT_WEIGHT_MAX = 1000;
+ private static final float ITALIC_SKEW_X = -0.25f;
+ // make 0 degree at 12 o'clock, since canvas assumes 0 degree is 3 o'clock
+ private static final float ANCHOR_DEGREE_OFFSET = -90f;
+
+ private final Path mPath = new Path();
+ private final Path mBgPath = new Path();
+ private final TextPaint mPaint = new TextPaint();
+ private final Rect mBounds = new Rect();
+ private final Rect mBgBounds = new Rect();
+ private boolean mDirty = true;
+ private String mTextToDraw = "";
+ private float mPathRadius = 0f;
+ private float mTextSweepDegrees = 0f;
+ private float mBackgroundSweepDegrees = MAX_SWEEP_DEGREE;
+ private boolean mHasParentArcLayout = false;
+ private boolean mParentClockwise = true;
+ private int mLastUsedTextAlignment = -1;
+ private float mLocalRotateAngle = 0f;
+ private float mParentRotateAngle = 0f;
+
+ private int mAnchorType = UNSET_ANCHOR_TYPE;
+ private float mAnchorAngleDegrees = UNSET_ANCHOR_DEGREE;
+ private float mSweepDegrees = UNSET_SWEEP_DEGREE;
+ private String mText = "";
+ private float mTextSize = DEFAULT_TEXT_SIZE;
+ @Nullable
+ private Typeface mTypeface = null;
+ private boolean mClockwise = DEFAULT_CLOCKWISE;
+ @ColorInt
+ private int mTextColor = DEFAULT_TEXT_COLOR;
+ @Nullable
+ private TextUtils.TruncateAt mEllipsize = null;
+ private float mLetterSpacing = 0f;
+ @Nullable
+ private String mFontFeatureSettings = null;
+ @Nullable
+ private String mFontVariationSettings = null;
+
+ public WearCurvedTextView(@NonNull Context context) {
+ this(context, null);
+ }
+
+ public WearCurvedTextView(@NonNull Context context, @Nullable AttributeSet attrs) {
+ this(context, attrs, android.R.attr.textViewStyle);
+ }
+
+ public WearCurvedTextView(
+ @NonNull Context context,
+ @Nullable AttributeSet attrs,
+ int defStyle) {
+ this(context, attrs, defStyle, 0);
+ }
+
+ public WearCurvedTextView(
+ @NonNull Context context,
+ @Nullable AttributeSet attrs,
+ int defStyle,
+ int defStyleRes) {
+ super(context, attrs, defStyle, defStyleRes);
+
+ mPaint.setAntiAlias(true);
+
+ TextAppearanceAttributes attributes = new TextAppearanceAttributes();
+ attributes.mTextColor = ColorStateList.valueOf(DEFAULT_TEXT_COLOR);
+
+ final Resources.Theme theme = context.getTheme();
+ TypedArray a = theme.obtainStyledAttributes(
+ attrs, R.styleable.TextViewAppearance, defStyle, defStyleRes);
+
+ TypedArray appearance = null;
+ int ap = a.getResourceId(R.styleable.TextViewAppearance_android_textAppearance, -1);
+ a.recycle();
+
+ if (ap != -1) {
+ appearance = theme.obtainStyledAttributes(ap, R.styleable.TextAppearance);
+ }
+ if (appearance != null) {
+ readTextAppearance(appearance, attributes, true);
+ appearance.recycle();
+ }
+
+ a = context.obtainStyledAttributes(
+ attrs, R.styleable.WearCurvedTextView, defStyle, defStyleRes);
+ // overrride the value in the appearance with explicitly specified attribute values
+ readTextAppearance(a, attributes, false);
+
+ // read the other supported TextView attributes
+ if (a.hasValue(R.styleable.WearCurvedTextView_android_text)) {
+ mText = a.getString(R.styleable.WearCurvedTextView_android_text);
+ }
+
+ int textEllipsize = a.getInt(R.styleable.WearCurvedTextView_android_ellipsize, 0);
+ switch (textEllipsize) {
+ case 1:
+ mEllipsize = TextUtils.TruncateAt.START;
+ break;
+ case 2:
+ mEllipsize = TextUtils.TruncateAt.MIDDLE;
+ break;
+ case 3:
+ mEllipsize = TextUtils.TruncateAt.END;
+ break;
+ default:
+ mEllipsize = null;
+ }
+
+ // read the custom WearCurvedTextView attributes
+ mSweepDegrees = a.getFloat(R.styleable.WearCurvedTextView_sweepDegrees, UNSET_SWEEP_DEGREE);
+ mAnchorType = a.getInt(R.styleable.WearCurvedTextView_anchorPosition, UNSET_ANCHOR_TYPE);
+ mAnchorAngleDegrees = a.getFloat(
+ R.styleable.WearCurvedTextView_anchorAngleDegrees, UNSET_ANCHOR_DEGREE
+ );
+ mAnchorAngleDegrees = mAnchorAngleDegrees % 360f;
+ mClockwise = a.getBoolean(R.styleable.WearCurvedTextView_clockwise, DEFAULT_CLOCKWISE);
+
+ a.recycle();
+
+ applyTextAppearance(attributes);
+ }
+
+ @Override
+ public float getSweepAngleDegrees() {
+ return mBackgroundSweepDegrees;
+ }
+
+ @Override
+ public int getThicknessPx() {
+ return round(mPaint.getFontMetrics().descent - mPaint.getFontMetrics().ascent);
+ }
+
+ /**
+ * @throws IllegalArgumentException if the anchorType and/or anchorAngleDegrees attributes
+ * were set for a widget in WearArcLayout
+ */
+ @Override
+ public void checkInvalidAttributeAsChild(boolean parentClockwise) {
+ this.mHasParentArcLayout = true;
+ this.mParentClockwise = parentClockwise;
+
+ if (mAnchorType != UNSET_ANCHOR_TYPE) {
+ throw new IllegalArgumentException(
+ "WearCurvedTextView shall not set anchorType value when added into"
+ + "WearArcLayout"
+ );
+ }
+
+ if (mAnchorAngleDegrees != UNSET_ANCHOR_DEGREE) {
+ throw new IllegalArgumentException(
+ "WearCurvedTextView shall not set anchorAngleDegrees value when added into "
+ + "WearArcLayout"
+ );
+ }
+ }
+
+ @Override
+ public boolean handleLayoutRotate(float angle) {
+ mParentRotateAngle = angle;
+ return true;
+ }
+
+ @Override
+ protected void onSizeChanged(int w, int h, int oldw, int oldh) {
+ super.onSizeChanged(w, h, oldw, oldh);
+ doUpdate();
+ }
+
+ private void updatePaint() {
+ mPaint.setTextSize(mTextSize);
+ mPaint.getTextBounds(mText, 0, mText.length(), mBounds);
+
+ // Note that ascent is negative.
+
+ mPathRadius = min(getWidth(), getHeight()) / 2f
+ + (mClockwise ? mPaint.getFontMetrics().ascent - getPaddingTop() :
+ -mPaint.getFontMetrics().descent - getPaddingBottom());
+ mTextSweepDegrees = min(
+ getWidthSelf() / mPathRadius / (float) Math.PI * 180f,
+ MAX_SWEEP_DEGREE);
+ mBackgroundSweepDegrees =
+ (mSweepDegrees == UNSET_SWEEP_DEGREE) ? mTextSweepDegrees
+ : min(mSweepDegrees, MAX_SWEEP_DEGREE);
+ }
+
+ private float getWidthSelf() {
+ return (float) mBounds.width() + getPaddingLeft() + getPaddingRight();
+ }
+
+ private String ellipsize(int ellipsizedWidth) {
+ StaticLayout.Builder layoutBuilder =
+ StaticLayout.Builder.obtain(mText, 0, mText.length(), mPaint, ellipsizedWidth);
+ layoutBuilder.setEllipsize(mEllipsize);
+ layoutBuilder.setMaxLines(1);
+ StaticLayout layout = layoutBuilder.build();
+
+ // Cut text that it's too big even if no ellipsize mode is provided.
+ if (mEllipsize == null) {
+ return mText.substring(0, layout.getLineEnd(0));
+ }
+
+ int ellipsisCount = layout.getEllipsisCount(0);
+ if (ellipsisCount == 0) {
+ return mText;
+ }
+
+ int ellipsisStart = layout.getEllipsisStart(0);
+ char[] textToDrawArray = mText.toCharArray();
+ textToDrawArray[ellipsisStart] = '\u2026'; // ellipsis "..."
+ for (int i = ellipsisStart + 1; i < ellipsisStart + ellipsisCount; i++) {
+ if (i >= 0 && i < mText.length()) {
+ textToDrawArray[i] = '\uFEFF'; // 0-width space
+ }
+ }
+ return new String(textToDrawArray);
+ }
+
+ private void updatePathsIfNeeded(boolean withBackground) {
+ // The dirty flag is not set when properties we inherit from View are modified
+ if (!mDirty && ((int) getTextAlignment() == mLastUsedTextAlignment)) {
+ return;
+ }
+
+ mDirty = false;
+ mLastUsedTextAlignment = (int) getTextAlignment();
+ mPaint.setTextSize(mTextSize);
+
+ float maxSweepDegrees =
+ mSweepDegrees == UNSET_SWEEP_DEGREE ? MAX_SWEEP_DEGREE : mSweepDegrees;
+ if (mTextSweepDegrees <= maxSweepDegrees) {
+ mTextToDraw = mText;
+ } else {
+ mTextToDraw = ellipsize(
+ (int) (maxSweepDegrees / 180f * Math.PI * mPathRadius) - getPaddingLeft()
+ - getPaddingRight()
+ );
+ mTextSweepDegrees = maxSweepDegrees;
+ }
+
+ float clockwiseFactor = mClockwise ? 1f : -1f;
+ float parentClockwiseFactor =
+ mHasParentArcLayout ? (mParentClockwise ? 1f : -1f) : clockwiseFactor;
+
+ float alignmentFactor = 0.5f;
+ switch (getTextAlignment()) {
+ case TEXT_ALIGNMENT_TEXT_START:
+ case TEXT_ALIGNMENT_VIEW_START:
+ alignmentFactor = 0f;
+ break;
+ case TEXT_ALIGNMENT_TEXT_END:
+ case TEXT_ALIGNMENT_VIEW_END:
+ alignmentFactor = 1f;
+ break;
+ default:
+ alignmentFactor = 0.5f; // TEXT_ALIGNMENT_CENTER
+ }
+
+ float anchorTypeFactor = 0f;
+ switch (mAnchorType) {
+ case WearArcLayout.ANCHOR_START:
+ anchorTypeFactor = 0f;
+ break;
+ case WearArcLayout.ANCHOR_CENTER:
+ anchorTypeFactor = 0.5f;
+ break;
+ case WearArcLayout.ANCHOR_END:
+ anchorTypeFactor = 1f;
+ break;
+ default:
+ anchorTypeFactor = parentClockwiseFactor == clockwiseFactor ? 0f : -1f;
+ }
+
+ float actualAnchorDegree =
+ (mAnchorAngleDegrees == UNSET_ANCHOR_DEGREE ? 0f : mAnchorAngleDegrees)
+ + ANCHOR_DEGREE_OFFSET;
+
+ // Always draw the curved text on top center, then rotate the canvas to the right position
+ float backgroundStartAngle =
+ -clockwiseFactor * 0.5f * mBackgroundSweepDegrees + ANCHOR_DEGREE_OFFSET;
+ mLocalRotateAngle =
+ actualAnchorDegree - backgroundStartAngle
+ - parentClockwiseFactor * anchorTypeFactor * mBackgroundSweepDegrees;
+
+ float textStartAngle =
+ backgroundStartAngle + clockwiseFactor * (float) (
+ alignmentFactor * (mBackgroundSweepDegrees - mTextSweepDegrees)
+ + getPaddingLeft() / mPathRadius / Math.PI * 180);
+
+ float centerX = getWidth() / 2f;
+ float centerY = getHeight() / 2f;
+ mPath.reset();
+ mPath.addArc(
+ centerX - mPathRadius,
+ centerY - mPathRadius,
+ centerX + mPathRadius,
+ centerY + mPathRadius,
+ textStartAngle,
+ clockwiseFactor * mTextSweepDegrees
+ );
+
+ if (withBackground) {
+ mBgPath.reset();
+ float radius1 = mPathRadius - clockwiseFactor * mPaint.getFontMetrics().descent;
+ float radius2 = mPathRadius - clockwiseFactor * mPaint.getFontMetrics().ascent;
+ mBgPath.arcTo(
+ centerX - radius2,
+ centerY - radius2,
+ centerX + radius2,
+ centerY + radius2,
+ backgroundStartAngle,
+ clockwiseFactor * mBackgroundSweepDegrees, false
+ );
+ mBgPath.arcTo(
+ centerX - radius1,
+ centerY - radius1,
+ centerX + radius1,
+ centerY + radius1,
+ backgroundStartAngle + clockwiseFactor * mBackgroundSweepDegrees,
+ -clockwiseFactor * mBackgroundSweepDegrees, false
+ );
+ mBgPath.close();
+
+ float angle = backgroundStartAngle;
+ float x0 = (float) (centerX + radius2 * cos(angle * Math.PI / 180));
+ float x1 = (float) (centerX + radius1 * cos(angle * Math.PI / 180));
+ float y0 = (float) (centerX + radius2 * sin(angle * Math.PI / 180));
+ float y1 = (float) (centerX + radius1 * sin(angle * Math.PI / 180));
+ angle = backgroundStartAngle + clockwiseFactor * mBackgroundSweepDegrees;
+ float x2 = (float) (centerX + radius2 * cos(angle * Math.PI / 180));
+ float x3 = (float) (centerX + radius1 * cos(angle * Math.PI / 180));
+ // Background axis-aligned bounding box calculation. Note that, we always center the
+ // text on the top-center of the view.
+ // top: always will be centerY - outerRadius
+ // bottom: the max y of end points of the outer and inner arc contains the text
+ // left: if over -90 degrees, centerX - outerRadius, otherwise the min x of start,
+ // end points of the outer and inner arc contains the text
+ // right: if over 90 degrees, centerX + outerRadius, otherwise the max x of start,
+ // end points of the outer and inner arc contains the text
+ float outerRadius = max(radius1, radius2);
+ mBgBounds.top = (int) (centerY - outerRadius);
+ mBgBounds.bottom = (int) max(y0, y1);
+ mBgBounds.left =
+ mBackgroundSweepDegrees >= 180.0f
+ ? (int) (centerX - outerRadius)
+ : (int) min(x0, min(x1, min(x2, x3)));
+ mBgBounds.right =
+ mBackgroundSweepDegrees >= 180.0f
+ ? (int) (centerX + outerRadius)
+ : (int) max(x0, max(x1, max(x2, x3)));
+ }
+ }
+
+ @Override
+ public void draw(@NonNull Canvas canvas) {
+ canvas.save();
+
+ boolean withBackground = getBackground() != null;
+ updatePathsIfNeeded(withBackground);
+ canvas.rotate(
+ mLocalRotateAngle + mParentRotateAngle,
+ getWidth() / 2f,
+ getHeight() / 2f);
+
+ if (withBackground) {
+ canvas.clipPath(mBgPath);
+ getBackground().setBounds(mBgBounds);
+ }
+ super.draw(canvas);
+
+ canvas.restore();
+ }
+
+ @Override
+ protected void onDraw(@NonNull Canvas canvas) {
+ mPaint.setColor(mTextColor);
+ mPaint.setStyle(Paint.Style.FILL);
+ canvas.drawTextOnPath(mTextToDraw, mPath, 0f, 0f, mPaint);
+ }
+
+ /**
+ * Sets the Typeface taking into account the given attributes.
+ *
+ * @param familyName family name string, e.g. "serif"
+ * @param typefaceIndex an index of the typeface enum, e.g. SANS, SERIF.
+ * @param style a typeface style
+ * @param weight a weight value for the Typeface or -1 if not specified.
+ */
+ private void setTypefaceFromAttrs(
+ @Nullable String familyName,
+ int typefaceIndex,
+ int style,
+ int weight
+ ) {
+ // typeface is ignored when font family is set
+ if (mTypeface == null && familyName != null) {
+ // Lookup normal Typeface from system font map.
+ Typeface normalTypeface = Typeface.create(familyName, Typeface.NORMAL);
+ resolveStyleAndSetTypeface(normalTypeface, style, weight);
+ } else if (mTypeface != null) {
+ resolveStyleAndSetTypeface(mTypeface, style, weight);
+ } else { // both typeface and familyName is null.
+ switch (typefaceIndex) {
+ case 1:
+ resolveStyleAndSetTypeface(Typeface.SANS_SERIF, style, weight);
+ break;
+ case 2:
+ resolveStyleAndSetTypeface(Typeface.SERIF, style, weight);
+ break;
+ case 3:
+ resolveStyleAndSetTypeface(Typeface.MONOSPACE, style, weight);
+ break;
+ default:
+ resolveStyleAndSetTypeface(null, style, weight);
+ }
+ }
+ }
+
+ private void resolveStyleAndSetTypeface(@Nullable Typeface tf, int style, int weight) {
+ if (weight >= 0 && Build.VERSION.SDK_INT >= 28) {
+ int clampedWeight = min(FONT_WEIGHT_MAX, weight);
+ boolean italic = (style & Typeface.ITALIC) != 0;
+ mTypeface = Api28Impl.createTypeface(tf, clampedWeight, italic);
+ mPaint.setTypeface(mTypeface);
+ } else {
+ setTypeface(tf, style);
+ }
+ }
+
+ /**
+ * Sets the typeface and style in which the text should be displayed, and turns on the fake
+ * bold and italic bits in the Paint if the Typeface that you provided does not have all the
+ * bits in the style that you specified.
+ */
+ private void setTypeface(@Nullable Typeface tf, int style) {
+ if (style > 0) {
+ if (tf == null) {
+ tf = Typeface.defaultFromStyle(style);
+ } else {
+ tf = Typeface.create(tf, style);
+ }
+ if (!tf.equals(mPaint.getTypeface())) {
+ mPaint.setTypeface(tf);
+ mTypeface = tf;
+ }
+ // now compute what (if any) algorithmic styling is needed
+ int typefaceStyle = tf != null ? tf.getStyle() : 0;
+ int need = style & ~typefaceStyle;
+ mPaint.setFakeBoldText((need & Typeface.BOLD) != 0);
+ mPaint.setTextSkewX(((need & Typeface.ITALIC) != 0) ? ITALIC_SKEW_X : 0f);
+ } else {
+ mPaint.setFakeBoldText(false);
+ mPaint.setTextSkewX(0f);
+ if ((tf != null && !tf.equals(mPaint.getTypeface()))
+ || (tf == null && mPaint.getTypeface() != null)) {
+ mPaint.setTypeface(tf);
+ mTypeface = tf;
+ }
+ }
+ }
+
+ /**
+ * Set of attribute that can be defined in a Text Appearance.
+ */
+ private static class TextAppearanceAttributes {
+ @Nullable
+ ColorStateList mTextColor = null;
+ float mTextSize = DEFAULT_TEXT_SIZE;
+ @Nullable
+ String mFontFamily = null;
+ boolean mFontFamilyExplicit = false;
+ int mTypefaceIndex = -1;
+ int mTextStyle = DEFAULT_TEXT_STYLE;
+ int mFontWeight = -1;
+ float mLetterSpacing = 0f;
+ @Nullable
+ String mFontFeatureSettings = null;
+ @Nullable
+ String mFontVariationSettings = null;
+
+ TextAppearanceAttributes() {
+ }
+ }
+
+ /**
+ * Sets the textColor, size, style, font etc from the specified TextAppearanceAttributes
+ */
+ private void applyTextAppearance(TextAppearanceAttributes attributes) {
+ if (attributes.mTextColor != null) {
+ mTextColor = attributes.mTextColor.getDefaultColor();
+ }
+
+ if (attributes.mTextSize != -1f) {
+ mTextSize = attributes.mTextSize;
+ }
+
+ setTypefaceFromAttrs(
+ attributes.mFontFamily,
+ attributes.mTypefaceIndex,
+ attributes.mTextStyle,
+ attributes.mFontWeight
+ );
+
+ mPaint.setLetterSpacing(attributes.mLetterSpacing);
+ mLetterSpacing = attributes.mLetterSpacing;
+ mPaint.setFontFeatureSettings(attributes.mFontFeatureSettings);
+ mFontFeatureSettings = attributes.mFontFeatureSettings;
+ if (Build.VERSION.SDK_INT >= 26) {
+ Api26Impl.paintSetFontVariationSettings(mPaint, attributes.mFontVariationSettings);
+ }
+ mFontVariationSettings = attributes.mFontVariationSettings;
+ }
+
+ /**
+ * Read the Text Appearance attributes from a given TypedArray and set its values to the
+ * given set. If the TypedArray contains a value that already set in the given attributes,
+ * that will be overridden.
+ */
+ private void readTextAppearance(
+ TypedArray appearance,
+ TextAppearanceAttributes attributes,
+ boolean isTextAppearance
+ ) {
+ int attrIndex = isTextAppearance ? R.styleable.TextAppearance_android_textColor :
+ R.styleable.WearCurvedTextView_android_textColor;
+ if (appearance.hasValue(attrIndex)) {
+ attributes.mTextColor = appearance.getColorStateList(attrIndex);
+ }
+
+ attributes.mTextSize = appearance.getDimensionPixelSize(
+ isTextAppearance ? R.styleable.TextAppearance_android_textSize :
+ R.styleable.WearCurvedTextView_android_textSize,
+ (int) attributes.mTextSize
+ );
+
+ attributes.mTextStyle = appearance.getInt(
+ isTextAppearance ? R.styleable.TextAppearance_android_textStyle :
+ R.styleable.WearCurvedTextView_android_textStyle,
+ attributes.mTextStyle
+ );
+
+ // make sure that the typeface attribute is read before fontFamily attribute
+ attributes.mTypefaceIndex = appearance.getInt(
+ isTextAppearance ? R.styleable.TextAppearance_android_typeface :
+ R.styleable.WearCurvedTextView_android_typeface,
+ attributes.mTypefaceIndex
+ );
+ if (attributes.mTypefaceIndex != -1 && !attributes.mFontFamilyExplicit) {
+ attributes.mFontFamily = null;
+ }
+
+ attrIndex = isTextAppearance ? R.styleable.TextAppearance_android_fontFamily :
+ R.styleable.WearCurvedTextView_android_fontFamily;
+ if (appearance.hasValue(attrIndex)) {
+ attributes.mFontFamily = appearance.getString(attrIndex);
+ attributes.mFontFamilyExplicit = !isTextAppearance;
+ }
+
+ attributes.mFontWeight = appearance.getInt(
+ isTextAppearance ? R.styleable.TextAppearance_android_textFontWeight :
+ R.styleable.WearCurvedTextView_android_textFontWeight,
+ attributes.mFontWeight
+ );
+
+ attributes.mLetterSpacing = appearance.getFloat(
+ isTextAppearance ? R.styleable.TextAppearance_android_letterSpacing :
+ R.styleable.WearCurvedTextView_android_letterSpacing,
+ attributes.mLetterSpacing
+ );
+
+ attrIndex = isTextAppearance ? R.styleable.TextAppearance_android_fontFeatureSettings :
+ R.styleable.WearCurvedTextView_android_fontFeatureSettings;
+ if (appearance.hasValue(attrIndex)) {
+ attributes.mFontFeatureSettings = appearance.getString(attrIndex);
+ }
+
+ attrIndex = isTextAppearance ? R.styleable.TextAppearance_android_fontVariationSettings :
+ R.styleable.WearCurvedTextView_android_fontVariationSettings;
+ if (appearance.hasValue(attrIndex)) {
+ attributes.mFontVariationSettings = appearance.getString(attrIndex);
+ }
+ }
+
+ private void doUpdate() {
+ mDirty = true;
+ updatePaint();
+ requestLayout();
+ postInvalidate();
+ }
+
+ private void doRedraw() {
+ mDirty = true;
+ postInvalidate();
+ }
+
+ /** returns the anchor type for positioning the curved text */
+ public int getAnchorType() {
+ return mAnchorType;
+ }
+
+ /**
+ * Sets the anchor type for positioning the curved text.
+ * @param value the anchor type, one of {ANCHOR_START, ANCHOR_CENTER, ANCHOR_END}
+ */
+ public void setAnchorType(@WearArcLayout.AnchorType int value) {
+ mAnchorType = value;
+ doUpdate();
+ }
+
+ /** Returns the anchor angle used for positioning the text, in degrees. */
+ public float getAnchorAngleDegrees() {
+ return mAnchorAngleDegrees;
+ }
+
+ /** Sets the anchor angle used for positioning the text, in degrees. */
+ public void setAnchorAngleDegrees(float value) {
+ mAnchorAngleDegrees = value;
+ doRedraw();
+ }
+
+ /** returns the sweep angle in degrees for rendering the text */
+ public float getSweepDegrees() {
+ return mSweepDegrees;
+ }
+
+ /** sets the sweep angle in degrees for rendering the text */
+ public void setSweepDegrees(float value) {
+ mSweepDegrees = value;
+ doUpdate();
+ }
+
+ /** returns the text to be rendered */
+ @NonNull
+ public String getText() {
+ return mText;
+ }
+
+ /** sets the text to be rendered */
+ public void setText(@NonNull String value) {
+ mText = value;
+ doUpdate();
+ }
+
+ /** returns the text size for rendering the text */
+ public float getTextSize() {
+ return mTextSize;
+ }
+
+ /** sets the text size for rendering the text */
+ public void setTextSize(float value) {
+ mTextSize = value;
+ doUpdate();
+ }
+
+ /** Gets the current Typeface that is used to style the text. */
+ @Nullable
+ public Typeface getTypeface() {
+ return mTypeface;
+ }
+
+ /**
+ * Sets the typeface and style in which the text should be displayed. Note that not all
+ * Typeface families actually have bold and italic variants
+ */
+ public void setTypeface(@Nullable Typeface value) {
+ mTypeface = value;
+ doUpdate();
+ }
+
+ /** returns the curved text layout direction */
+ public boolean getClockwise() {
+ return mClockwise;
+ }
+
+ /** sets the curved text layout direction */
+ public void setClockwise(boolean value) {
+ mClockwise = value;
+ doUpdate();
+ }
+
+ /** returns the color for rendering the text */
+ @ColorInt
+ public int getTextColor() {
+ return mTextColor;
+ }
+
+ /** sets the color for rendering the text */
+ public void setTextColor(@ColorInt int value) {
+ mTextColor = value;
+ doRedraw();
+ }
+
+ /**
+ * Returns where, if anywhere, words that are longer than the view is wide should be
+ * ellipsized.
+ */
+ @Nullable
+ public TextUtils.TruncateAt getEllipsize() {
+ return mEllipsize;
+ }
+
+ /**
+ * Causes words in the text that are longer than the view's width to be ellipsized. Use null
+ * to turn off ellipsizing.
+ */
+ public void setEllipsize(@Nullable TextUtils.TruncateAt value) {
+ mEllipsize = value;
+ doRedraw();
+ }
+
+ /**
+ * Gets the text letter-space value, which determines the spacing between characters. The
+ * value returned is in ems. Normally, this value is 0.0.
+ * @return The text letter-space value in ems.
+ */
+ public float getLetterSpacing() {
+ return mLetterSpacing;
+ }
+
+ /**
+ * Sets text letter-spacing in ems. Typical values for slight expansion will be around 0.05.
+ * Negative values tighten text.
+ * @param value A text letter-space value in ems.
+ */
+ public void setLetterSpacing(float value) {
+ mLetterSpacing = value;
+ doUpdate();
+ }
+
+ /**
+ * Returns the font feature settings. The format is the same as the CSS font-feature-settings
+ * attribute: https://www.w3.org/TR/css-fonts-3/#font-feature-settings-prop
+ * @return the currently set font feature settings. Default is null.
+ */
+ @Nullable
+ public String getFontFeatureSettings() {
+ return mFontFeatureSettings;
+ }
+
+ /**
+ * Sets font feature settings. The format is the same as the CSS font-feature-settings
+ * attribute: https://www.w3.org/TR/css-fonts-3/#font-feature-settings-prop
+ * @param value font feature settings represented as CSS compatible string. This value may be
+ * null.
+ */
+ public void setFontFeatureSettings(@Nullable String value) {
+ mFontFeatureSettings = value;
+ doUpdate();
+ }
+
+ /** Returns TrueType or OpenType font variation settings. */
+ @Nullable
+ public String getFontVariationSettings() {
+ return mFontVariationSettings;
+ }
+
+ /**
+ * Sets TrueType or OpenType font variation settings.
+ * @param value font variation settings. You can pass null or empty string as no variation
+ * settings. This value may be null
+ */
+ public void setFontVariationSettings(@Nullable String value) {
+ mFontVariationSettings = value;
+ doUpdate();
+ }
+
+ /**
+ * Nested class to avoid verification errors for methods induces in API level 26
+ */
+ @RequiresApi(26)
+ private static class Api26Impl {
+ private Api26Impl() {
+ }
+
+ static void paintSetFontVariationSettings(
+ Paint paint,
+ @Nullable String fontVariationSettings) {
+ paint.setFontVariationSettings(fontVariationSettings);
+ }
+ }
+
+ /**
+ * Nested class to avoid verification errors for methods induces in API level 28
+ */
+ @RequiresApi(28)
+ private static class Api28Impl {
+ private Api28Impl() {
+ }
+
+ static Typeface createTypeface(@Nullable Typeface family, int weight, boolean italic) {
+ return Typeface.create(family, weight, italic);
+ }
+ }
+
+}
diff --git a/wear/wear/src/main/res/values/attrs.xml b/wear/wear/src/main/res/values/attrs.xml
index 4044dbc..81cbb04 100644
--- a/wear/wear/src/main/res/values/attrs.xml
+++ b/wear/wear/src/main/res/values/attrs.xml
@@ -209,4 +209,76 @@
rounded bounds. Otherwise, it will be scaled. -->
<attr name="clipEnabled" format="boolean" />
</declare-styleable>
+
+ <attr name="anchorAngleDegrees" format="float"/>
+
+ <attr name="anchorPosition" format="enum">
+ <enum name="start" value="0" />
+ <enum name="center" value="1" />
+ <enum name="end" value="2" />
+ </attr>
+
+ <attr name="clockwise" format="boolean"/>
+
+ <declare-styleable name="WearCurvedTextView">
+ <!-- supported TextView attributes -->
+ <attr name="android:text" />
+ <attr name="android:textSize" />
+ <attr name="android:textColor" />
+ <attr name="android:typeface" />
+ <attr name="android:fontFamily" />
+ <attr name="android:textStyle" />
+ <attr name="android:textFontWeight" />
+ <attr name="android:letterSpacing" />
+ <attr name="android:fontFeatureSettings" />
+ <attr name="android:fontVariationSettings" />
+ <attr name="android:textAppearance" />
+ <attr name="android:ellipsize" />
+ <!-- custom WearCurvedTextView Attributes -->
+ <attr name="anchorAngleDegrees"/>
+ <attr name="anchorPosition"/>
+ <attr name="sweepDegrees" format="float"/>
+ <attr name="clockwise"/>
+ </declare-styleable>
+
+ <declare-styleable name="TextAppearance">
+ <!-- Text color. -->
+ <attr name="android:textColor" />
+ <!-- Size of the text. Recommended dimension type for text is "sp" for scaled-pixels (example: 15sp). -->
+ <attr name="android:textSize" />
+ <!-- Style (normal, bold, italic, bold|italic) for the text. -->
+ <attr name="android:textStyle" />
+ <!-- Weight for the font used in the TextView. -->
+ <attr name="android:textFontWeight" />
+ <!-- Typeface (normal, sans, serif, monospace) for the text. -->
+ <attr name="android:typeface" />
+ <!-- Font family (named by string or as a font resource reference) for the text. -->
+ <attr name="android:fontFamily" />
+ <!-- Text letter-spacing. -->
+ <attr name="android:letterSpacing" />
+ <!-- Text variation settings. -->
+ <attr name="android:fontVariationSettings" />
+ <!-- Font feature settings. -->
+ <attr name="android:fontFeatureSettings" />
+ </declare-styleable>
+
+ <declare-styleable name="TextViewAppearance">
+ <!-- Base text color, typeface, size, and style. -->
+ <attr name="android:textAppearance" />
+ </declare-styleable>
+
+ <declare-styleable name="WearArcLayout_Layout">
+ <attr name="layout_rotate" format="boolean" />
+ <attr name="layout_valign" format="enum">
+ <enum name="outer" value="0" />
+ <enum name="center" value="1" />
+ <enum name="inner" value="2" />
+ </attr>
+ </declare-styleable>
+
+ <declare-styleable name="WearArcLayout">
+ <attr name="anchorAngleDegrees"/>
+ <attr name="anchorPosition"/>
+ <attr name="clockwise" />
+ </declare-styleable>
</resources>
diff --git a/window/window/lint-baseline.xml b/window/window/lint-baseline.xml
index f67d090..44e9dec 100644
--- a/window/window/lint-baseline.xml
+++ b/window/window/lint-baseline.xml
@@ -1,5 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
-<issues format="5" by="lint 4.2.0-dev" client="gradle" variant="debug" version="4.2.0-dev">
+<issues format="5" by="lint 4.2.0-alpha06" client="gradle" variant="debug" version="4.2.0-alpha06">
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" bounds = new Rect((Rect) getBoundsMethod.invoke(windowConfig));"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/window/WindowBoundsHelper.java"
+ line="138"
+ column="38"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" bounds.set((Rect) getAppBounds.invoke(windowConfig));"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/window/WindowBoundsHelper.java"
+ line="172"
+ column="35"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" bounds.set((Rect) getAppBounds.invoke(windowConfig));"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/window/WindowBoundsHelper.java"
+ line="175"
+ column="35"/>
+ </issue>
+
+ <issue
+ id="BanUncheckedReflection"
+ message="Calling Method.invoke without an SDK check"
+ errorLine1=" getDisplayInfoMethod.invoke(display, displayInfo);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="src/main/java/androidx/window/WindowBoundsHelper.java"
+ line="359"
+ column="13"/>
+ </issue>
<issue
id="UnsafeNewApiCall"
@@ -14,28 +58,6 @@
<issue
id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.window.WindowBoundsHelper is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" return platformWindowManager.getCurrentWindowMetrics().getBounds();"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/window/WindowBoundsHelper.java"
- line="114"
- column="42"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
- message="This call is to a method from API 30, the call containing class androidx.window.WindowBoundsHelper is not annotated with @RequiresApi(x) where x is at least 30. Either annotate the containing class with at least @RequiresApi(30) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(30)."
- errorLine1=" return platformWindowManager.getCurrentWindowMetrics().getBounds();"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/java/androidx/window/WindowBoundsHelper.java"
- line="114"
- column="68"/>
- </issue>
-
- <issue
- id="UnsafeNewApiCall"
message="This call is to a method from API 24, the call containing class androidx.window.WindowBoundsHelper is not annotated with @RequiresApi(x) where x is at least 24. Either annotate the containing class with at least @RequiresApi(24) or move the call to a static method in a wrapper class annotated with at least @RequiresApi(24)."
errorLine1=" if (activity.isInMultiWindowMode()) {"
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
diff --git a/work/workmanager/lint-baseline.xml b/work/workmanager/lint-baseline.xml
index 2edbe70..7d8fdfc 100644
--- a/work/workmanager/lint-baseline.xml
+++ b/work/workmanager/lint-baseline.xml
@@ -118,7 +118,7 @@
errorLine2=" ~~~~~~~~">
<location
file="src/main/java/androidx/work/impl/utils/ForceStopRunnable.java"
- line="252"
+ line="292"
column="30"/>
</issue>
@@ -217,7 +217,7 @@
errorLine2=" ~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/work/impl/utils/ProcessUtils.java"
- line="74"
+ line="77"
column="32"/>
</issue>
@@ -228,7 +228,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/work/impl/foreground/SystemForegroundService.java"
- line="137"
+ line="124"
column="21"/>
</issue>
@@ -962,7 +962,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/androidx/work/impl/utils/ForceStopRunnable.java"
- line="271"
+ line="311"
column="31"/>
</issue>
@@ -973,7 +973,7 @@
errorLine2=" ~~~~~~">
<location
file="src/main/java/androidx/work/impl/utils/ForceStopRunnable.java"
- line="271"
+ line="311"
column="48"/>
</issue>
@@ -1545,7 +1545,7 @@
errorLine2=" ~~~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/work/impl/Schedulers.java"
- line="61"
+ line="62"
column="13"/>
</issue>
@@ -2172,7 +2172,7 @@
errorLine2=" ~~~~~~~~~~~~~">
<location
file="src/main/java/androidx/work/impl/WorkerWrapper.java"
- line="681"
+ line="683"
column="16"/>
</issue>