Remove redundant disabling of SyntheticAccessor check
Follow up for r.android.com/2684207 that changed the default.
Test: ./gradlew tasks
Change-Id: I9aaf864d7dfba241f56ccb476c2975f045f30594
diff --git a/appactions/interaction/interaction-proto/build.gradle b/appactions/interaction/interaction-proto/build.gradle
index b34ff5c..72da50c 100644
--- a/appactions/interaction/interaction-proto/build.gradle
+++ b/appactions/interaction/interaction-proto/build.gradle
@@ -92,8 +92,8 @@
}
}
lintOptions {
- // protobuf generates unannotated and synthetic accessor methods
- disable("UnknownNullness", "SyntheticAccessor")
+ // protobuf generates unannotated methods
+ disable("UnknownNullness")
}
}
diff --git a/appactions/interaction/interaction-service-proto/build.gradle b/appactions/interaction/interaction-service-proto/build.gradle
index 9e627e8..b2ab25e 100644
--- a/appactions/interaction/interaction-service-proto/build.gradle
+++ b/appactions/interaction/interaction-service-proto/build.gradle
@@ -88,8 +88,8 @@
afterEvaluate {
lint {
lintOptions {
- // protobuf generates unannotated and synthetic accessor methods
- disable("UnknownNullness", "SyntheticAccessor")
+ // protobuf generates unannotated methods
+ disable("UnknownNullness")
abortOnError(false)
checkReleaseBuilds(false)
}
diff --git a/appcompat/appcompat/src/main/java/androidx/appcompat/widget/AppCompatSpinner.java b/appcompat/appcompat/src/main/java/androidx/appcompat/widget/AppCompatSpinner.java
index 64b1c0e..3533744 100644
--- a/appcompat/appcompat/src/main/java/androidx/appcompat/widget/AppCompatSpinner.java
+++ b/appcompat/appcompat/src/main/java/androidx/appcompat/widget/AppCompatSpinner.java
@@ -276,7 +276,6 @@
}
@Override
- @SuppressLint("SyntheticAccessor")
public boolean onForwardingStarted() {
if (!getInternalPopup().isShowing()) {
showPopup();
diff --git a/appcompat/integration-tests/receive-content-testapp/src/main/java/androidx/appcompat/demo/receivecontent/MainActivity.java b/appcompat/integration-tests/receive-content-testapp/src/main/java/androidx/appcompat/demo/receivecontent/MainActivity.java
index 9ea1892..408b409 100644
--- a/appcompat/integration-tests/receive-content-testapp/src/main/java/androidx/appcompat/demo/receivecontent/MainActivity.java
+++ b/appcompat/integration-tests/receive-content-testapp/src/main/java/androidx/appcompat/demo/receivecontent/MainActivity.java
@@ -16,7 +16,6 @@
package androidx.appcompat.demo.receivecontent;
-import android.annotation.SuppressLint;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
@@ -89,7 +88,6 @@
return null;
});
Futures.addCallback(deleteAllFuture, new FutureCallback<Void>() {
- @SuppressLint("SyntheticAccessor")
@Override
public void onSuccess(@Nullable Void result) {
mAttachmentsRecyclerViewAdapter.clearAttachments();
diff --git a/arch/core/core-testing/src/main/java/androidx/arch/core/executor/TaskExecutorWithFakeMainThread.java b/arch/core/core-testing/src/main/java/androidx/arch/core/executor/TaskExecutorWithFakeMainThread.java
index 184dd7c..06a5ed3 100644
--- a/arch/core/core-testing/src/main/java/androidx/arch/core/executor/TaskExecutorWithFakeMainThread.java
+++ b/arch/core/core-testing/src/main/java/androidx/arch/core/executor/TaskExecutorWithFakeMainThread.java
@@ -16,8 +16,6 @@
package androidx.arch.core.executor;
-import android.annotation.SuppressLint;
-
import androidx.annotation.NonNull;
import androidx.annotation.RestrictTo;
@@ -35,7 +33,6 @@
*
*/
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
-@SuppressLint("SyntheticAccessor")
public class TaskExecutorWithFakeMainThread extends TaskExecutor {
@SuppressWarnings("WeakerAccess") /* synthetic access */
List<Throwable> mCaughtExceptions = Collections.synchronizedList(new ArrayList<>());
diff --git a/benchmark/benchmark-common/src/main/java/androidx/benchmark/IsolationActivity.kt b/benchmark/benchmark-common/src/main/java/androidx/benchmark/IsolationActivity.kt
index 14f048c..da6635c 100644
--- a/benchmark/benchmark-common/src/main/java/androidx/benchmark/IsolationActivity.kt
+++ b/benchmark/benchmark-common/src/main/java/androidx/benchmark/IsolationActivity.kt
@@ -57,7 +57,6 @@
if (firstInit) {
if (!CpuInfo.locked && isSustainedPerformanceModeSupported()) {
- @Suppress("SyntheticAccessor")
sustainedPerformanceModeInUse = true
}
application.registerActivityLifecycleCallbacks(activityLifecycleCallbacks)
@@ -96,13 +95,11 @@
override fun onResume() {
super.onResume()
- @Suppress("SyntheticAccessor")
resumed = true
}
override fun onPause() {
super.onPause()
- @Suppress("SyntheticAccessor")
resumed = false
}
diff --git a/benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/Metric.kt b/benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/Metric.kt
index 4b3ba98..bf0e0ff 100644
--- a/benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/Metric.kt
+++ b/benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/Metric.kt
@@ -16,7 +16,6 @@
package androidx.benchmark.macro
-import android.annotation.SuppressLint
import android.os.Build
import androidx.annotation.RequiresApi
import androidx.annotation.RestrictTo
@@ -190,7 +189,6 @@
override fun start() {}
override fun stop() {}
- @SuppressLint("SyntheticAccessor")
override fun getResult(
captureInfo: CaptureInfo,
traceSession: PerfettoTraceProcessor.Session
@@ -239,7 +237,6 @@
override fun stop() {
}
- @SuppressLint("SyntheticAccessor")
override fun getResult(
captureInfo: CaptureInfo,
traceSession: PerfettoTraceProcessor.Session
@@ -435,7 +432,6 @@
override fun stop() {
}
- @SuppressLint("SyntheticAccessor")
override fun getResult(
captureInfo: CaptureInfo,
traceSession: PerfettoTraceProcessor.Session
diff --git a/benchmark/integration-tests/macrobenchmark-target/src/main/java/androidx/benchmark/integration/macrobenchmark/target/TrivialStartupFullyDrawnActivity.kt b/benchmark/integration-tests/macrobenchmark-target/src/main/java/androidx/benchmark/integration/macrobenchmark/target/TrivialStartupFullyDrawnActivity.kt
index 42cb4fe..ba49074 100644
--- a/benchmark/integration-tests/macrobenchmark-target/src/main/java/androidx/benchmark/integration/macrobenchmark/target/TrivialStartupFullyDrawnActivity.kt
+++ b/benchmark/integration-tests/macrobenchmark-target/src/main/java/androidx/benchmark/integration/macrobenchmark/target/TrivialStartupFullyDrawnActivity.kt
@@ -16,7 +16,6 @@
package androidx.benchmark.integration.macrobenchmark.target
-import android.annotation.SuppressLint
import android.os.Bundle
import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity
@@ -25,7 +24,6 @@
/**
* Trivial activity which triggers reportFullyDrawn ~500ms after resume
*/
-@SuppressLint("SyntheticAccessor")
class TrivialStartupFullyDrawnActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
diff --git a/camera/camera-camera2-pipe-testing/src/main/java/androidx/camera/camera2/pipe/testing/FakeMetadata.kt b/camera/camera-camera2-pipe-testing/src/main/java/androidx/camera/camera2/pipe/testing/FakeMetadata.kt
index a8a9b3a..e631d09 100644
--- a/camera/camera-camera2-pipe-testing/src/main/java/androidx/camera/camera2/pipe/testing/FakeMetadata.kt
+++ b/camera/camera-camera2-pipe-testing/src/main/java/androidx/camera/camera2/pipe/testing/FakeMetadata.kt
@@ -144,7 +144,6 @@
/**
* Utility class for interacting with objects require specific [TotalCaptureResult] metadata
*/
-@Suppress("SyntheticAccessor") // Using an inline class generates a synthetic constructor
class FakeFrameInfo(
override val metadata: FrameMetadata = FakeFrameMetadata(),
override val requestMetadata: RequestMetadata = FakeRequestMetadata(),
diff --git a/camera/camera-camera2-pipe-testing/src/main/java/androidx/camera/camera2/pipe/testing/FakeRequestListener.kt b/camera/camera-camera2-pipe-testing/src/main/java/androidx/camera/camera2/pipe/testing/FakeRequestListener.kt
index 41b1c0b..9937711 100644
--- a/camera/camera-camera2-pipe-testing/src/main/java/androidx/camera/camera2/pipe/testing/FakeRequestListener.kt
+++ b/camera/camera-camera2-pipe-testing/src/main/java/androidx/camera/camera2/pipe/testing/FakeRequestListener.kt
@@ -72,7 +72,6 @@
timestamp: CameraTimestamp
) = check(
_onStartedFlow.tryEmit(
- @Suppress("SyntheticAccessor")
OnStarted(requestMetadata, frameNumber, timestamp)
)
) {
@@ -86,7 +85,6 @@
captureResult: FrameMetadata
) = check(
_onPartialCaptureResultFlow.tryEmit(
- @Suppress("SyntheticAccessor")
OnPartialCaptureResult(requestMetadata, frameNumber, captureResult)
)
) {
@@ -100,7 +98,6 @@
totalCaptureResult: FrameInfo
) = check(
_onTotalCaptureResultFlow.tryEmit(
- @Suppress("SyntheticAccessor")
OnTotalCaptureResult(requestMetadata, frameNumber, totalCaptureResult)
)
) {
@@ -114,7 +111,6 @@
result: FrameInfo
) = check(
_onCompleteFlow.tryEmit(
- @Suppress("SyntheticAccessor")
OnComplete(requestMetadata, frameNumber, result)
)
) {
@@ -126,7 +122,6 @@
request: Request
) = check(
_onAbortedFlow.tryEmit(
- @Suppress("SyntheticAccessor")
OnAborted(request)
)
) {
@@ -140,7 +135,6 @@
stream: StreamId
) = check(
_onBufferLostFlow.tryEmit(
- @Suppress("SyntheticAccessor")
OnBufferLost(requestMetadata, frameNumber, stream)
)
) {
diff --git a/camera/camera-camera2-pipe/src/main/java/androidx/camera/camera2/pipe/compat/Camera2CaptureSequenceProcessor.kt b/camera/camera-camera2-pipe/src/main/java/androidx/camera/camera2/pipe/compat/Camera2CaptureSequenceProcessor.kt
index f94eb82..0607870 100644
--- a/camera/camera-camera2-pipe/src/main/java/androidx/camera/camera2/pipe/compat/Camera2CaptureSequenceProcessor.kt
+++ b/camera/camera-camera2-pipe/src/main/java/androidx/camera/camera2/pipe/compat/Camera2CaptureSequenceProcessor.kt
@@ -65,7 +65,6 @@
session: CameraCaptureSessionWrapper,
surfaceMap: Map<StreamId, Surface>
): CaptureSequenceProcessor<*, CaptureSequence<Any>> {
- @Suppress("SyntheticAccessor")
return Camera2CaptureSequenceProcessor(
session,
threads,
@@ -213,7 +212,6 @@
captureRequests.addAll(highSpeedRequestList)
}
- @Suppress("SyntheticAccessor")
val metadata =
Camera2RequestMetadata(
session,
@@ -231,7 +229,6 @@
} else {
captureRequests.add(captureRequest)
- @Suppress("SyntheticAccessor")
val metadata =
Camera2RequestMetadata(
session,
@@ -250,7 +247,6 @@
}
// Create the captureSequence listener
- @Suppress("SyntheticAccessor")
return Camera2CaptureSequence(
session.device.cameraId,
isRepeating,
@@ -447,7 +443,6 @@
/** This class packages together information about a request that was submitted to the camera. */
@RequiresApi(21)
-@Suppress("SyntheticAccessor") // Using an inline class generates a synthetic constructor
internal class Camera2RequestMetadata(
private val cameraCaptureSessionWrapper: CameraCaptureSessionWrapper,
private val captureRequest: CaptureRequest,
diff --git a/camera/camera-camera2-pipe/src/main/java/androidx/camera/camera2/pipe/compat/FrameMetadata.kt b/camera/camera-camera2-pipe/src/main/java/androidx/camera/camera2/pipe/compat/FrameMetadata.kt
index efbe87b..59cb260 100644
--- a/camera/camera-camera2-pipe/src/main/java/androidx/camera/camera2/pipe/compat/FrameMetadata.kt
+++ b/camera/camera-camera2-pipe/src/main/java/androidx/camera/camera2/pipe/compat/FrameMetadata.kt
@@ -32,7 +32,6 @@
import kotlin.reflect.KClass
/** An implementation of [FrameMetadata] that retrieves values from a [CaptureResult] object */
-@Suppress("SyntheticAccessor") // Using an inline class generates a synthetic constructor
@RequiresApi(21) // TODO(b/200306659): Remove and replace with annotation on package-info.java
internal class AndroidFrameMetadata
constructor(private val captureResult: CaptureResult, override val camera: CameraId) :
@@ -88,7 +87,6 @@
}
/** An implementation of [FrameInfo] that retrieves values from a [TotalCaptureResult] object. */
-@Suppress("SyntheticAccessor") // Using an inline class generates a synthetic constructor
@RequiresApi(21) // TODO(b/200306659): Remove and replace with annotation on package-info.java
internal class AndroidFrameInfo(
private val totalCaptureResult: TotalCaptureResult,
diff --git a/camera/camera-camera2-pipe/src/main/java/androidx/camera/camera2/pipe/compat/VirtualCamera.kt b/camera/camera-camera2-pipe/src/main/java/androidx/camera/camera2/pipe/compat/VirtualCamera.kt
index 456e87f..eb3baea 100644
--- a/camera/camera-camera2-pipe/src/main/java/androidx/camera/camera2/pipe/compat/VirtualCamera.kt
+++ b/camera/camera-camera2-pipe/src/main/java/androidx/camera/camera2/pipe/compat/VirtualCamera.kt
@@ -293,7 +293,7 @@
closeWith(
device?.unwrapAs(CameraDevice::class),
- @Suppress("SyntheticAccessor") ClosingInfo(ClosedReason.APP_CLOSED)
+ ClosingInfo(ClosedReason.APP_CLOSED)
)
}
@@ -380,7 +380,6 @@
closeWith(
cameraDevice,
- @Suppress("SyntheticAccessor")
ClosingInfo(
ClosedReason.CAMERA2_DISCONNECTED,
errorCode = CameraError.ERROR_CAMERA_DISCONNECTED
@@ -398,7 +397,6 @@
closeWith(
cameraDevice,
- @Suppress("SyntheticAccessor")
ClosingInfo(ClosedReason.CAMERA2_ERROR, errorCode = CameraError.from(errorCode))
)
interopDeviceStateCallback?.onError(cameraDevice, errorCode)
@@ -412,7 +410,7 @@
cameraDeviceClosed.countDown()
closeWith(
- cameraDevice, @Suppress("SyntheticAccessor") ClosingInfo(ClosedReason.CAMERA2_CLOSED)
+ cameraDevice, ClosingInfo(ClosedReason.CAMERA2_CLOSED)
)
interopDeviceStateCallback?.onClosed(cameraDevice)
Debug.traceStop()
@@ -431,7 +429,6 @@
private fun closeWith(throwable: Throwable, cameraError: CameraError) {
closeWith(
null,
- @Suppress("SyntheticAccessor")
ClosingInfo(
ClosedReason.CAMERA2_EXCEPTION, errorCode = cameraError, exception = throwable
)
@@ -495,7 +492,6 @@
val closeDuration = closingTimestamp.let { now - it }
- @Suppress("SyntheticAccessor")
return CameraStateClosed(
cameraId,
cameraClosedReason = closingInfo.reason,
diff --git a/camera/camera-camera2-pipe/src/main/java/androidx/camera/camera2/pipe/graph/StreamGraphImpl.kt b/camera/camera-camera2-pipe/src/main/java/androidx/camera/camera2/pipe/graph/StreamGraphImpl.kt
index 8e2ec00..0194989 100644
--- a/camera/camera-camera2-pipe/src/main/java/androidx/camera/camera2/pipe/graph/StreamGraphImpl.kt
+++ b/camera/camera-camera2-pipe/src/main/java/androidx/camera/camera2/pipe/graph/StreamGraphImpl.kt
@@ -118,7 +118,6 @@
continue
}
- @SuppressWarnings("SyntheticAccessor")
val outputConfig =
OutputConfig(
nextConfigId(),
@@ -153,7 +152,6 @@
streamConfig.outputs.map {
val outputConfig = outputConfigMap[it]!!
- @SuppressWarnings("SyntheticAccessor")
val outputStream =
OutputStreamImpl(
nextOutputId(),
@@ -191,7 +189,6 @@
outputs = sortOutputsByVideoStream(outputsSortedByPreview)
}
- @Suppress("SyntheticAccessor") // StreamId generates a synthetic constructor
class OutputConfig(
val id: OutputConfigId,
val size: Size,
@@ -215,7 +212,6 @@
override fun toString(): String = id.toString()
}
- @Suppress("SyntheticAccessor") // OutputId generates a synthetic constructor
private class OutputStreamImpl(
override val id: OutputId,
override val size: Size,
diff --git a/camera/camera-camera2-pipe/src/test/java/androidx/camera/camera2/pipe/testing/RobolectricCameras.kt b/camera/camera-camera2-pipe/src/test/java/androidx/camera/camera2/pipe/testing/RobolectricCameras.kt
index 6769c1b..5cbd01a 100644
--- a/camera/camera-camera2-pipe/src/test/java/androidx/camera/camera2/pipe/testing/RobolectricCameras.kt
+++ b/camera/camera-camera2-pipe/src/test/java/androidx/camera/camera2/pipe/testing/RobolectricCameras.kt
@@ -111,14 +111,13 @@
emptySet()
)
- @Suppress("SyntheticAccessor") val callback = CameraStateCallback(cameraId)
+ val callback = CameraStateCallback(cameraId)
cameraManager.openCamera(cameraId.value, callback, Handler())
// Wait until the camera is "opened" by robolectric.
shadowOf(Looper.myLooper()).idle()
val cameraDevice = callback.camera!!
- @Suppress("SyntheticAccessor")
return FakeCamera(cameraId, characteristics, metadata, cameraDevice)
}
diff --git a/camera/camera-testing/src/main/java/androidx/camera/testing/impl/CameraXUtil.java b/camera/camera-testing/src/main/java/androidx/camera/testing/impl/CameraXUtil.java
index 18a03db..e367e1e 100644
--- a/camera/camera-testing/src/main/java/androidx/camera/testing/impl/CameraXUtil.java
+++ b/camera/camera-testing/src/main/java/androidx/camera/testing/impl/CameraXUtil.java
@@ -16,7 +16,6 @@
package androidx.camera.testing.impl;
-import android.annotation.SuppressLint;
import android.content.Context;
import androidx.annotation.GuardedBy;
@@ -104,7 +103,6 @@
completer.set(null);
}
- @SuppressLint("SyntheticAccessor")
@SuppressWarnings("FutureReturnValueIgnored")
@Override
public void onFailure(@NonNull Throwable t) {
diff --git a/camera/camera-testing/src/main/java/androidx/camera/testing/impl/ImageProxyUtil.java b/camera/camera-testing/src/main/java/androidx/camera/testing/impl/ImageProxyUtil.java
index 71df31d..6219e2c 100644
--- a/camera/camera-testing/src/main/java/androidx/camera/testing/impl/ImageProxyUtil.java
+++ b/camera/camera-testing/src/main/java/androidx/camera/testing/impl/ImageProxyUtil.java
@@ -16,8 +16,6 @@
package androidx.camera.testing.impl;
-import android.annotation.SuppressLint;
-
import androidx.annotation.NonNull;
import androidx.annotation.RequiresApi;
import androidx.camera.core.ImageProxy;
@@ -81,7 +79,6 @@
final int dataValue,
final boolean incrementValue) {
return new ImageProxy.PlaneProxy() {
- @SuppressLint("SyntheticAccessor")
final ByteBuffer mBuffer =
createBuffer(width, height, pixelStride, dataValue, incrementValue);
diff --git a/camera/camera-viewfinder/src/main/java/androidx/camera/viewfinder/ViewfinderSurfaceRequest.java b/camera/camera-viewfinder/src/main/java/androidx/camera/viewfinder/ViewfinderSurfaceRequest.java
index 5efa64a..49b2ae6 100644
--- a/camera/camera-viewfinder/src/main/java/androidx/camera/viewfinder/ViewfinderSurfaceRequest.java
+++ b/camera/camera-viewfinder/src/main/java/androidx/camera/viewfinder/ViewfinderSurfaceRequest.java
@@ -177,7 +177,6 @@
// collected as long as the ViewfinderSurface is referenced externally (via
// getViewfinderSurface()).
mInternalViewfinderSurface = new ViewfinderSurface() {
- @SuppressLint("SyntheticAccessor")
@NonNull
@Override
protected ListenableFuture<Surface> provideSurfaceAsync() {
diff --git a/camera/integration-tests/viewfindertestapp/build.gradle b/camera/integration-tests/viewfindertestapp/build.gradle
index e4e4552..b5afb537 100644
--- a/camera/integration-tests/viewfindertestapp/build.gradle
+++ b/camera/integration-tests/viewfindertestapp/build.gradle
@@ -34,9 +34,6 @@
shrinkResources true
}
}
- lintOptions {
- disable("SyntheticAccessor")
- }
namespace "androidx.camera.integration.viewfinder"
}
diff --git a/car/app/app-samples/showcase/common/src/main/java/androidx/car/app/sample/showcase/common/screens/templatelayouts/tabtemplates/TabTemplateDemoScreen.java b/car/app/app-samples/showcase/common/src/main/java/androidx/car/app/sample/showcase/common/screens/templatelayouts/tabtemplates/TabTemplateDemoScreen.java
index b6f22ed..5affe20 100644
--- a/car/app/app-samples/showcase/common/src/main/java/androidx/car/app/sample/showcase/common/screens/templatelayouts/tabtemplates/TabTemplateDemoScreen.java
+++ b/car/app/app-samples/showcase/common/src/main/java/androidx/car/app/sample/showcase/common/screens/templatelayouts/tabtemplates/TabTemplateDemoScreen.java
@@ -18,7 +18,6 @@
import static androidx.car.app.model.Action.APP_ICON;
-import android.annotation.SuppressLint;
import android.text.TextUtils;
import androidx.annotation.NonNull;
@@ -81,7 +80,6 @@
@Override
public Template onGetTemplate() {
mTabTemplateBuilder = new TabTemplate.Builder(new TabTemplate.TabCallback() {
- @SuppressLint("SyntheticAccessor")
@Override
public void onTabSelected(@NonNull String tabContentId) {
mActiveContentId = tabContentId;
diff --git a/car/app/app-samples/showcase/common/src/main/java/androidx/car/app/sample/showcase/common/screens/templatelayouts/tabtemplates/TabTemplateLoadingDemoScreen.java b/car/app/app-samples/showcase/common/src/main/java/androidx/car/app/sample/showcase/common/screens/templatelayouts/tabtemplates/TabTemplateLoadingDemoScreen.java
index 2c961fd..e695b2e 100644
--- a/car/app/app-samples/showcase/common/src/main/java/androidx/car/app/sample/showcase/common/screens/templatelayouts/tabtemplates/TabTemplateLoadingDemoScreen.java
+++ b/car/app/app-samples/showcase/common/src/main/java/androidx/car/app/sample/showcase/common/screens/templatelayouts/tabtemplates/TabTemplateLoadingDemoScreen.java
@@ -18,7 +18,6 @@
import static androidx.car.app.model.Action.APP_ICON;
-import android.annotation.SuppressLint;
import android.text.TextUtils;
import androidx.annotation.NonNull;
@@ -66,7 +65,6 @@
@Override
public Template onGetTemplate() {
mTabTemplateBuilder = new TabTemplate.Builder(new TabTemplate.TabCallback() {
- @SuppressLint("SyntheticAccessor")
@Override
public void onTabSelected(@NonNull String tabContentId) {
mActiveContentId = tabContentId;
diff --git a/car/app/app-samples/showcase/common/src/main/java/androidx/car/app/sample/showcase/common/screens/templatelayouts/tabtemplates/TabTemplateNoTabsDemoScreen.java b/car/app/app-samples/showcase/common/src/main/java/androidx/car/app/sample/showcase/common/screens/templatelayouts/tabtemplates/TabTemplateNoTabsDemoScreen.java
index 38c7368..4c3383c 100644
--- a/car/app/app-samples/showcase/common/src/main/java/androidx/car/app/sample/showcase/common/screens/templatelayouts/tabtemplates/TabTemplateNoTabsDemoScreen.java
+++ b/car/app/app-samples/showcase/common/src/main/java/androidx/car/app/sample/showcase/common/screens/templatelayouts/tabtemplates/TabTemplateNoTabsDemoScreen.java
@@ -18,7 +18,6 @@
import static androidx.car.app.model.Action.APP_ICON;
-import android.annotation.SuppressLint;
import android.os.Handler;
import androidx.annotation.NonNull;
@@ -42,7 +41,6 @@
@Override
public Template onGetTemplate() {
mTabTemplateBuilder = new TabTemplate.Builder(new TabTemplate.TabCallback() {
- @SuppressLint("SyntheticAccessor")
@Override
public void onTabSelected(@NonNull String tabContentId) {
// No-op
diff --git a/compose/compiler/compiler-hosted/integration-tests/build.gradle b/compose/compiler/compiler-hosted/integration-tests/build.gradle
index 00a111c..eb02a70 100644
--- a/compose/compiler/compiler-hosted/integration-tests/build.gradle
+++ b/compose/compiler/compiler-hosted/integration-tests/build.gradle
@@ -75,9 +75,6 @@
defaultConfig {
minSdkVersion 21
}
- lintOptions {
- disable("SyntheticAccessor")
- }
namespace "androidx.compose.runtime.tests"
}
diff --git a/compose/runtime/runtime/compose-runtime-benchmark/build.gradle b/compose/runtime/runtime/compose-runtime-benchmark/build.gradle
index e9e2312..915a021 100644
--- a/compose/runtime/runtime/compose-runtime-benchmark/build.gradle
+++ b/compose/runtime/runtime/compose-runtime-benchmark/build.gradle
@@ -25,9 +25,6 @@
defaultConfig {
minSdkVersion 21
}
- lintOptions {
- disable("SyntheticAccessor")
- }
namespace "androidx.compose.runtime.benchmark"
}
diff --git a/compose/ui/ui-inspection/build.gradle b/compose/ui/ui-inspection/build.gradle
index 551b880..6c8a650 100644
--- a/compose/ui/ui-inspection/build.gradle
+++ b/compose/ui/ui-inspection/build.gradle
@@ -86,11 +86,6 @@
version libs.versions.cmake.get()
}
}
-
- lintOptions {
- // Restriction not important for inspectors, which only runs at dev-time
- disable("SyntheticAccessor")
- }
namespace "androidx.compose.ui.inspection"
}
diff --git a/core/core-ktx/src/main/java/androidx/core/text/SpannableString.kt b/core/core-ktx/src/main/java/androidx/core/text/SpannableString.kt
index df53a46..5f857fd 100644
--- a/core/core-ktx/src/main/java/androidx/core/text/SpannableString.kt
+++ b/core/core-ktx/src/main/java/androidx/core/text/SpannableString.kt
@@ -18,7 +18,6 @@
package androidx.core.text
-import android.annotation.SuppressLint
import android.text.Spannable
import android.text.SpannableString
import android.text.Spanned.SPAN_INCLUSIVE_EXCLUSIVE
@@ -30,7 +29,6 @@
public inline fun CharSequence.toSpannable(): Spannable = SpannableString.valueOf(this)
/** Clear all spans from this text. */
-@SuppressLint("SyntheticAccessor") // TODO remove https://issuetracker.google.com/issues/110243369
public inline fun Spannable.clearSpans(): Unit = getSpans<Any>().forEach { removeSpan(it) }
/**
diff --git a/core/core-location-altitude-proto/build.gradle b/core/core-location-altitude-proto/build.gradle
index ee2c418..c8455e4 100644
--- a/core/core-location-altitude-proto/build.gradle
+++ b/core/core-location-altitude-proto/build.gradle
@@ -44,8 +44,8 @@
afterEvaluate {
lint {
lintOptions {
- // protobuf generates unannotated and synthetic accessor methods
- disable("UnknownNullness", "SyntheticAccessor")
+ // protobuf generates unannotated methods
+ disable("UnknownNullness")
}
}
}
diff --git a/core/core/src/main/java/androidx/core/app/NotificationCompat.java b/core/core/src/main/java/androidx/core/app/NotificationCompat.java
index 848e66e..7effc27 100644
--- a/core/core/src/main/java/androidx/core/app/NotificationCompat.java
+++ b/core/core/src/main/java/androidx/core/app/NotificationCompat.java
@@ -8972,7 +8972,6 @@
* on this builder.</p>
*/
@NonNull
- @SuppressLint("SyntheticAccessor")
public BubbleMetadata build() {
if (mShortcutId == null && mPendingIntent == null) {
throw new NullPointerException(
diff --git a/core/core/src/main/java/androidx/core/content/IntentSanitizer.java b/core/core/src/main/java/androidx/core/content/IntentSanitizer.java
index 9eaaaf2..154a9fc 100644
--- a/core/core/src/main/java/androidx/core/content/IntentSanitizer.java
+++ b/core/core/src/main/java/androidx/core/content/IntentSanitizer.java
@@ -845,7 +845,6 @@
*
* @return the IntentSanitizer
*/
- @SuppressLint("SyntheticAccessor")
@NonNull
public IntentSanitizer build() {
if ((mAllowAnyComponent && mAllowSomeComponents)
diff --git a/credentials/credentials/src/main/java/androidx/credentials/PrepareGetCredentialResponse.kt b/credentials/credentials/src/main/java/androidx/credentials/PrepareGetCredentialResponse.kt
index 7129ef1..6c72197 100644
--- a/credentials/credentials/src/main/java/androidx/credentials/PrepareGetCredentialResponse.kt
+++ b/credentials/credentials/src/main/java/androidx/credentials/PrepareGetCredentialResponse.kt
@@ -174,7 +174,6 @@
/**
* Builds a [PrepareGetCredentialResponse].
*/
- @SuppressLint("SyntheticAccessor")
fun build(): androidx.credentials.PrepareGetCredentialResponse {
return androidx.credentials.PrepareGetCredentialResponse(
pendingGetCredentialHandle,
@@ -217,7 +216,6 @@
/**
* Builds a [PrepareGetCredentialResponse].
*/
- @SuppressLint("SyntheticAccessor")
fun build(): androidx.credentials.PrepareGetCredentialResponse {
return androidx.credentials.PrepareGetCredentialResponse(
null,
diff --git a/datastore/datastore-core/src/androidMain/kotlin/androidx/datastore/core/SharedCounter.kt b/datastore/datastore-core/src/androidMain/kotlin/androidx/datastore/core/SharedCounter.kt
index dd295be..f25b3e2 100644
--- a/datastore/datastore-core/src/androidMain/kotlin/androidx/datastore/core/SharedCounter.kt
+++ b/datastore/datastore-core/src/androidMain/kotlin/androidx/datastore/core/SharedCounter.kt
@@ -16,7 +16,6 @@
package androidx.datastore.core
-import android.annotation.SuppressLint
import android.os.ParcelFileDescriptor
import java.io.File
import java.io.IOException
@@ -57,7 +56,6 @@
fun loadLib() = System.loadLibrary("datastore_shared_counter")
- @SuppressLint("SyntheticAccessor")
private fun createCounterFromFd(pfd: ParcelFileDescriptor): SharedCounter {
val nativeFd = pfd.getFd()
if (nativeSharedCounter.nativeTruncateFile(nativeFd) != 0) {
diff --git a/datastore/datastore-preferences-proto/build.gradle b/datastore/datastore-preferences-proto/build.gradle
index f599a23..e8a46b7b 100644
--- a/datastore/datastore-preferences-proto/build.gradle
+++ b/datastore/datastore-preferences-proto/build.gradle
@@ -50,8 +50,8 @@
afterEvaluate {
lint {
lintOptions {
- // protobuf generates unannotated and synthetic accessor methods
- disable("UnknownNullness", "SyntheticAccessor")
+ // protobuf generates unannotated methods
+ disable("UnknownNullness")
}
}
}
diff --git a/datastore/datastore-proto/build.gradle b/datastore/datastore-proto/build.gradle
index 658823c..a9cd4cb1 100644
--- a/datastore/datastore-proto/build.gradle
+++ b/datastore/datastore-proto/build.gradle
@@ -61,7 +61,4 @@
android {
namespace "androidx.datastore.protodatastore"
- lintOptions {
- disable("SyntheticAccessor")
- }
}
diff --git a/datastore/datastore-sampleapp/src/main/java/com/example/datastoresampleapp/SettingsFragment.kt b/datastore/datastore-sampleapp/src/main/java/com/example/datastoresampleapp/SettingsFragment.kt
index bc1a6a1..e3cfe4c 100644
--- a/datastore/datastore-sampleapp/src/main/java/com/example/datastoresampleapp/SettingsFragment.kt
+++ b/datastore/datastore-sampleapp/src/main/java/com/example/datastoresampleapp/SettingsFragment.kt
@@ -16,7 +16,6 @@
package com.example.datastoresampleapp
-import android.annotation.SuppressLint
import android.content.Context
import android.os.Bundle
import android.util.Log
@@ -83,7 +82,6 @@
}
@Suppress("OPT_IN_MARKER_ON_OVERRIDE_WARNING")
- @SuppressLint("SyntheticAccessor")
@ExperimentalCoroutinesApi
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
diff --git a/development/build_log_simplifier/messages.ignore b/development/build_log_simplifier/messages.ignore
index 7095ed0..113c151 100644
--- a/development/build_log_simplifier/messages.ignore
+++ b/development/build_log_simplifier/messages.ignore
@@ -107,8 +107,7 @@
WARN: Link to @throws type RemoteException does not resolve\. Is it from a package that the containing file does not import\? Is docs inherited to an un-documented override function, but the exception class is not in scope in the inheriting class\? .*The general fix for these is to fully qualify the exception name, e\.g\.`@throws java\.io\.IOException under some conditions`\. This was observed in Throws\(root=CustomDocTag\(children=\[P\(children=\[Text\(body=For any IPC transportation failures\., children=\[\], params={}\)\], params={}\)\], params={}, name=MARKDOWN_FILE\), name=RemoteException, exceptionAddress=null\) in in declaration of getChangesToken in file .*\/androidx\/health\/connect\/client\/impl\/HealthConnectClientImpl\.kt at line 151\.
WARN: Link to @throws type RemoteException does not resolve\. Is it from a package that the containing file does not import\? Is docs inherited to an un-documented override function, but the exception class is not in scope in the inheriting class\? .*The general fix for these is to fully qualify the exception name, e\.g\.`@throws java\.io\.IOException under some conditions`\. This was observed in Throws\(root=CustomDocTag\(children=\[P\(children=\[Text\(body=For any IPC transportation failures\., children=\[\], params={}\)\], params={}\)\], params={}, name=MARKDOWN_FILE\), name=RemoteException, exceptionAddress=null\) in in declaration of insertRecords in file .*\/androidx\/health\/connect\/client\/impl\/HealthConnectClientImpl\.kt at line 104\.
WARN: Link to @throws type RemoteException does not resolve\. Is it from a package that the containing file does not import\? Is docs inherited to an un-documented override function, but the exception class is not in scope in the inheriting class\? .*The general fix for these is to fully qualify the exception name, e\.g\.`@throws java\.io\.IOException under some conditions`\. This was observed in Throws\(root=CustomDocTag\(children=\[P\(children=\[Text\(body=For any IPC transportation failures\., children=\[\], params={}\)\], params={}\)\], params={}, name=MARKDOWN_FILE\), name=RemoteException, exceptionAddress=null\) in in declaration of readRecords in file .*\/androidx\/health\/connect\/client\/impl\/HealthConnectClientImpl\.kt, line number could not be determined\.
-WARN: Link to @throws type Renderer\.GlesException does not resolve\. Is it from a package that the containing file does not import\? Is docs inherited to an un-documented override function, but the exception class is not in scope in the inheriting class\? .*The general fix for these is to fully qualify the exception name, e\.g\.`@throws java\.io\.IOException under some conditions`\. This was observed in Throws\(root=CustomDocTag\(children=\[P\(children=\[Text\(body=If any GL calls fail during initialization\., children=\[\], params={}\)\], params={}\)\], params={}, name=MARKDOWN_FILE\), name=Renderer\.GlesException, exceptionAddress=null\) in in declaration of GlesRenderer2 in file .*\/androidx\/wear\/watchface\/Renderer\.kt at line 1648\.
-WARN: Link to @throws type Renderer\.GlesException does not resolve\. Is it from a package that the containing file does not import\? Is docs inherited to an un-documented override function, but the exception class is not in scope in the inheriting class\? .*The general fix for these is to fully qualify the exception name, e\.g\.`@throws java\.io\.IOException under some conditions`\. This was observed in Throws\(root=CustomDocTag\(children=\[P\(children=\[Text\(body=If any GL calls fail during initialization\., children=\[\], params={}\)\], params={}\)\], params={}, name=MARKDOWN_FILE\), name=Renderer\.GlesException, exceptionAddress=null\) in in declaration of GlesRenderer2 in file .*\/androidx\/wear\/watchface\/Renderer\.kt at line 1686\.
+WARN: Link to @throws type Renderer\.GlesException does not resolve\. Is it from a package that the containing file does not import\? Is docs inherited to an un-documented override function, but the exception class is not in scope in the inheriting class\? .*The general fix for these is to fully qualify the exception name, e\.g\.`@throws java\.io\.IOException under some conditions`\. This was observed in Throws\(root=CustomDocTag\(children=\[P\(children=\[Text\(body=If any GL calls fail during initialization\., children=\[\], params={}\)\], params={}\)\], params={}, name=MARKDOWN_FILE\), name=Renderer\.GlesException, exceptionAddress=null\) in in declaration of GlesRenderer2 in file .*\/androidx\/wear\/watchface\/Renderer\.kt at line .*\.
WARN: Link to @throws type ServiceStartFailureException does not resolve\. Is it from a package that the containing file does not import\? Is docs inherited to an un-documented override function, but the exception class is not in scope in the inheriting class\? .*The general fix for these is to fully qualify the exception name, e\.g\.`@throws java\.io\.IOException under some conditions`\. This was observed in Throws\(root=CustomDocTag\(children=\[P\(children=\[Text\(body=if the watchface dies during startup\., children=\[\], params={}\)\], params={}\)\], params={}, name=MARKDOWN_FILE\), name=ServiceStartFailureException, exceptionAddress=null\) in in declaration of getOrCreateInteractiveWatchFaceClient in file .*\/androidx\/wear\/watchface\/client\/ListenableWatchFaceControlClient\.kt at line 258\.
WARN: Link to @throws type ServiceStartFailureException does not resolve\. Is it from a package that the containing file does not import\? Is docs inherited to an un-documented override function, but the exception class is not in scope in the inheriting class\? .*The general fix for these is to fully qualify the exception name, e\.g\.`@throws java\.io\.IOException under some conditions`\. This was observed in Throws\(root=CustomDocTag\(children=\[P\(children=\[Text\(body=if the watchface dies during startup\., children=\[\], params={}\)\], params={}\)\], params={}, name=MARKDOWN_FILE\), name=ServiceStartFailureException, exceptionAddress=null\) in in declaration of getOrCreateInteractiveWatchFaceClient in file .*\/androidx\/wear\/watchface\/client\/ListenableWatchFaceControlClient\.kt at line 305\.
WARN: Link to @throws type UnsupportedDeviceOperationException does not resolve\. Is it from a package that the containing file does not import\? Is docs inherited to an un-documented override function, but the exception class is not in scope in the inheriting class\? .*The general fix for these is to fully qualify the exception name, e\.g\.`@throws java\.io\.IOException under some conditions`\. This was observed in Throws\(root=CustomDocTag\(children=\[P\(children=\[Text\(body=if used on a real device\., children=\[\], params={}\)\], params={}\)\], params={}, name=MARKDOWN_FILE\), name=UnsupportedDeviceOperationException, exceptionAddress=null\) in in declaration of setBookMode in file .*\/androidx\/test\/espresso\/device\/action\/DeviceActions\.kt at line 58\.
diff --git a/dynamicanimation/dynamicanimation/src/main/java/androidx/dynamicanimation/animation/AnimationHandler.java b/dynamicanimation/dynamicanimation/src/main/java/androidx/dynamicanimation/animation/AnimationHandler.java
index 96b40ab..ad78b7a 100644
--- a/dynamicanimation/dynamicanimation/src/main/java/androidx/dynamicanimation/animation/AnimationHandler.java
+++ b/dynamicanimation/dynamicanimation/src/main/java/androidx/dynamicanimation/animation/AnimationHandler.java
@@ -65,7 +65,6 @@
/**
* Notifies all the on-going animations of the new frame.
*/
- @SuppressWarnings("SyntheticAccessor") /* synthetic access */
void dispatchAnimationFrame() {
mCurrentFrameTime = SystemClock.uptimeMillis();
AnimationHandler.this.doAnimationFrame(mCurrentFrameTime);
@@ -86,12 +85,9 @@
new SimpleArrayMap<>();
@SuppressWarnings("WeakerAccess") /* synthetic access */
final ArrayList<AnimationFrameCallback> mAnimationCallbacks = new ArrayList<>();
- @SuppressWarnings("SyntheticAccessor") /* synthetic access */
private final AnimationCallbackDispatcher mCallbackDispatcher =
new AnimationCallbackDispatcher();
- @SuppressWarnings("SyntheticAccessor") /* synthetic access */
private final Runnable mRunnable = () -> mCallbackDispatcher.dispatchAnimationFrame();
- @SuppressWarnings("SyntheticAccessor") /* synthetic access */
private FrameCallbackScheduler mScheduler;
@SuppressWarnings("WeakerAccess") /* synthetic access */
long mCurrentFrameTime = 0;
diff --git a/emoji/emoji/src/main/java/androidx/emoji/text/EmojiCompat.java b/emoji/emoji/src/main/java/androidx/emoji/text/EmojiCompat.java
index d269046..f90f35e 100644
--- a/emoji/emoji/src/main/java/androidx/emoji/text/EmojiCompat.java
+++ b/emoji/emoji/src/main/java/androidx/emoji/text/EmojiCompat.java
@@ -1280,7 +1280,6 @@
}
}
- @SuppressWarnings("SyntheticAccessor")
void onMetadataLoadSuccess(@NonNull final MetadataRepo metadataRepo) {
//noinspection ConstantConditions
if (metadataRepo == null) {
diff --git a/emoji2/emoji2/src/main/java/androidx/emoji2/text/EmojiCompat.java b/emoji2/emoji2/src/main/java/androidx/emoji2/text/EmojiCompat.java
index af41c89..fb73cda 100644
--- a/emoji2/emoji2/src/main/java/androidx/emoji2/text/EmojiCompat.java
+++ b/emoji2/emoji2/src/main/java/androidx/emoji2/text/EmojiCompat.java
@@ -1718,7 +1718,6 @@
}
}
- @SuppressWarnings("SyntheticAccessor")
void onMetadataLoadSuccess(@NonNull final MetadataRepo metadataRepo) {
//noinspection ConstantConditions
if (metadataRepo == null) {
diff --git a/fragment/fragment/src/main/java/androidx/fragment/app/DialogFragment.java b/fragment/fragment/src/main/java/androidx/fragment/app/DialogFragment.java
index 397f77d..1bd73dc 100644
--- a/fragment/fragment/src/main/java/androidx/fragment/app/DialogFragment.java
+++ b/fragment/fragment/src/main/java/androidx/fragment/app/DialogFragment.java
@@ -19,7 +19,6 @@
import static androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP_PREFIX;
import static androidx.fragment.app.FragmentManager.TAG;
-import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
@@ -351,7 +350,6 @@
private Handler mHandler;
private Runnable mDismissRunnable = new Runnable() {
- @SuppressLint("SyntheticAccessor")
@Override
public void run() {
mOnDismissListener.onDismiss(mDialog);
@@ -360,7 +358,6 @@
private DialogInterface.OnCancelListener mOnCancelListener =
new DialogInterface.OnCancelListener() {
- @SuppressLint("SyntheticAccessor")
@Override
public void onCancel(@Nullable DialogInterface dialog) {
if (mDialog != null) {
@@ -371,7 +368,6 @@
private DialogInterface.OnDismissListener mOnDismissListener =
new DialogInterface.OnDismissListener() {
- @SuppressLint("SyntheticAccessor")
@Override
public void onDismiss(@Nullable DialogInterface dialog) {
if (mDialog != null) {
@@ -387,7 +383,6 @@
private int mBackStackId = -1;
private boolean mCreatingDialog;
private Observer<LifecycleOwner> mObserver = new Observer<LifecycleOwner>() {
- @SuppressLint("SyntheticAccessor")
@Override
public void onChanged(LifecycleOwner lifecycleOwner) {
if (lifecycleOwner != null && mShowsDialog) {
diff --git a/fragment/fragment/src/main/java/androidx/fragment/app/FragmentManager.java b/fragment/fragment/src/main/java/androidx/fragment/app/FragmentManager.java
index 626d5b8..b6ea42a 100644
--- a/fragment/fragment/src/main/java/androidx/fragment/app/FragmentManager.java
+++ b/fragment/fragment/src/main/java/androidx/fragment/app/FragmentManager.java
@@ -1087,7 +1087,6 @@
}
}
- @SuppressLint("SyntheticAccessor")
@Override
public final void setFragmentResultListener(@NonNull final String requestKey,
@NonNull final LifecycleOwner lifecycleOwner,
@@ -2792,7 +2791,6 @@
}
@SuppressWarnings("deprecation")
- @SuppressLint("SyntheticAccessor")
void attachController(@NonNull FragmentHostCallback<?> host,
@NonNull FragmentContainer container, @Nullable final Fragment parent) {
if (mHost != null) throw new IllegalStateException("Already attached");
@@ -2921,7 +2919,6 @@
mRequestPermissions = registry.register(keyPrefix + "RequestPermissions",
new ActivityResultContracts.RequestMultiplePermissions(),
new ActivityResultCallback<Map<String, Boolean>>() {
- @SuppressLint("SyntheticAccessor")
@Override
public void onActivityResult(Map<String, Boolean> result) {
String[] permissions = result.keySet().toArray(new String[0]);
diff --git a/glance/glance-appwidget-proto/build.gradle b/glance/glance-appwidget-proto/build.gradle
index 497e1b6..f4b676d 100644
--- a/glance/glance-appwidget-proto/build.gradle
+++ b/glance/glance-appwidget-proto/build.gradle
@@ -51,8 +51,8 @@
afterEvaluate {
lint {
lintOptions {
- // protobuf generates unannotated and synthetic accessor methods
- disable("UnknownNullness", "SyntheticAccessor")
+ // protobuf generates unannotated methods
+ disable("UnknownNullness")
}
}
}
diff --git a/health/connect/connect-client-proto/build.gradle b/health/connect/connect-client-proto/build.gradle
index 0ed136e..6d2801c 100644
--- a/health/connect/connect-client-proto/build.gradle
+++ b/health/connect/connect-client-proto/build.gradle
@@ -55,8 +55,8 @@
afterEvaluate {
lint {
lintOptions {
- // protobuf generates unannotated and synthetic accessor methods
- disable("UnknownNullness", "SyntheticAccessor")
+ // protobuf generates unannotated methods
+ disable("UnknownNullness")
}
}
}
diff --git a/inspection/inspection-gradle-plugin/src/main/kotlin/androidx/inspection/gradle/InspectionPlugin.kt b/inspection/inspection-gradle-plugin/src/main/kotlin/androidx/inspection/gradle/InspectionPlugin.kt
index 973a7db..79d870d 100644
--- a/inspection/inspection-gradle-plugin/src/main/kotlin/androidx/inspection/gradle/InspectionPlugin.kt
+++ b/inspection/inspection-gradle-plugin/src/main/kotlin/androidx/inspection/gradle/InspectionPlugin.kt
@@ -40,7 +40,6 @@
* A plugin which, when present, ensures that intermediate inspector
* resources are generated at build time
*/
-@Suppress("SyntheticAccessor")
class InspectionPlugin : Plugin<Project> {
override fun apply(project: Project) {
var foundLibraryPlugin = false
diff --git a/media/media/src/main/java/androidx/media/MediaBrowserServiceCompat.java b/media/media/src/main/java/androidx/media/MediaBrowserServiceCompat.java
index fbc41d9..c01a837 100644
--- a/media/media/src/main/java/androidx/media/MediaBrowserServiceCompat.java
+++ b/media/media/src/main/java/androidx/media/MediaBrowserServiceCompat.java
@@ -55,7 +55,6 @@
import static androidx.media.MediaSessionManager.RemoteUserInfo.UNKNOWN_PID;
import static androidx.media.MediaSessionManager.RemoteUserInfo.UNKNOWN_UID;
-import android.annotation.SuppressLint;
import android.app.Service;
import android.content.Context;
import android.content.Intent;
@@ -498,7 +497,6 @@
}
@Override
- @SuppressLint("SyntheticAccessor")
public MediaBrowserService.BrowserRoot onGetRoot(String clientPackageName,
int clientUid, Bundle rootHints) {
MediaSessionCompat.ensureClassLoader(rootHints);
diff --git a/navigation/navigation-ui/src/main/java/androidx/navigation/ui/AppBarConfiguration.kt b/navigation/navigation-ui/src/main/java/androidx/navigation/ui/AppBarConfiguration.kt
index 827a259b..045acc5 100644
--- a/navigation/navigation-ui/src/main/java/androidx/navigation/ui/AppBarConfiguration.kt
+++ b/navigation/navigation-ui/src/main/java/androidx/navigation/ui/AppBarConfiguration.kt
@@ -15,7 +15,6 @@
*/
package androidx.navigation.ui
-import android.annotation.SuppressLint
import android.view.Menu
import android.view.MenuItem
import androidx.customview.widget.Openable
@@ -218,7 +217,7 @@
*
* @return a valid [AppBarConfiguration]
*/
- @SuppressLint("SyntheticAccessor") /* new AppBarConfiguration() must be private to avoid
+ /* new AppBarConfiguration() must be private to avoid
conflicting with the public AppBarConfiguration.kt */
public fun build(): AppBarConfiguration {
return AppBarConfiguration(
diff --git a/paging/integration-tests/testapp/src/main/java/androidx/paging/integration/testapp/custom/PagedListItemViewModel.java b/paging/integration-tests/testapp/src/main/java/androidx/paging/integration/testapp/custom/PagedListItemViewModel.java
index 8457cd9..2dae5ba 100644
--- a/paging/integration-tests/testapp/src/main/java/androidx/paging/integration/testapp/custom/PagedListItemViewModel.java
+++ b/paging/integration-tests/testapp/src/main/java/androidx/paging/integration/testapp/custom/PagedListItemViewModel.java
@@ -16,8 +16,6 @@
package androidx.paging.integration.testapp.custom;
-import android.annotation.SuppressLint;
-
import androidx.annotation.NonNull;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.ViewModel;
@@ -36,7 +34,6 @@
private final Function0<PagingSource<Integer, Item>> mFactory =
new Function0<PagingSource<Integer, Item>>() {
- @SuppressLint("SyntheticAccessor")
@NonNull
@Override
public PagingSource<Integer, Item> invoke() {
diff --git a/paging/paging-common/src/commonMain/kotlin/androidx/paging/PageFetcherSnapshotState.kt b/paging/paging-common/src/commonMain/kotlin/androidx/paging/PageFetcherSnapshotState.kt
index e72df74..a7a7f16 100644
--- a/paging/paging-common/src/commonMain/kotlin/androidx/paging/PageFetcherSnapshotState.kt
+++ b/paging/paging-common/src/commonMain/kotlin/androidx/paging/PageFetcherSnapshotState.kt
@@ -378,7 +378,6 @@
* Wrapper for [PageFetcherSnapshotState], which protects access behind a [Mutex] to prevent
* race scenarios.
*/
- @Suppress("SyntheticAccessor")
internal class Holder<Key : Any, Value : Any>(
private val config: PagingConfig
) {
diff --git a/paging/samples/src/main/java/androidx/paging/samples/CachedInSample.kt b/paging/samples/src/main/java/androidx/paging/samples/CachedInSample.kt
index 742eadd..7de466d 100644
--- a/paging/samples/src/main/java/androidx/paging/samples/CachedInSample.kt
+++ b/paging/samples/src/main/java/androidx/paging/samples/CachedInSample.kt
@@ -18,7 +18,6 @@
package androidx.paging.samples
-import android.annotation.SuppressLint
import android.os.Bundle
import androidx.activity.viewModels
import androidx.annotation.Sampled
@@ -42,7 +41,6 @@
private lateinit var pagingSourceFactory: () -> PagingSource<String, String>
@Sampled
-@SuppressLint("SyntheticAccessor")
fun cachedInSample() {
class MyViewModel : ViewModel() {
val flow = Pager(
diff --git a/room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspAnnotationBox.kt b/room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspAnnotationBox.kt
index d997e57..8f9928a 100644
--- a/room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspAnnotationBox.kt
+++ b/room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspAnnotationBox.kt
@@ -71,7 +71,6 @@
)
}
- @Suppress("SyntheticAccessor")
private fun <R : Any> getFieldValue(
methodName: String,
returnType: Class<R>
diff --git a/room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/util/MemoizedSequence.kt b/room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/util/MemoizedSequence.kt
index 2f52f42..856381f 100644
--- a/room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/util/MemoizedSequence.kt
+++ b/room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/util/MemoizedSequence.kt
@@ -22,7 +22,6 @@
*
* Note that collecting on these sequence is not thread safe.
*/
-@Suppress("SyntheticAccessor")
internal class MemoizedSequence<T>(
private val buildSequence: () -> Sequence<T>
) : Sequence<T> {
diff --git a/room/room-runtime/src/main/java/androidx/room/util/FtsTableInfo.kt b/room/room-runtime/src/main/java/androidx/room/util/FtsTableInfo.kt
index 5590d3b..b533798 100644
--- a/room/room-runtime/src/main/java/androidx/room/util/FtsTableInfo.kt
+++ b/room/room-runtime/src/main/java/androidx/room/util/FtsTableInfo.kt
@@ -15,7 +15,6 @@
*/
package androidx.room.util
-import android.annotation.SuppressLint
import androidx.annotation.RestrictTo
import androidx.annotation.VisibleForTesting
import androidx.sqlite.db.SupportSQLiteDatabase
@@ -83,7 +82,6 @@
* @param tableName The table name.
* @return A FtsTableInfo containing the columns and options for the provided table name.
*/
- @SuppressLint("SyntheticAccessor")
@JvmStatic
fun read(database: SupportSQLiteDatabase, tableName: String): FtsTableInfo {
val columns = readColumns(database, tableName)
diff --git a/room/room-runtime/src/main/java/androidx/room/util/TableInfo.kt b/room/room-runtime/src/main/java/androidx/room/util/TableInfo.kt
index 2b6ed45..7cded96 100644
--- a/room/room-runtime/src/main/java/androidx/room/util/TableInfo.kt
+++ b/room/room-runtime/src/main/java/androidx/room/util/TableInfo.kt
@@ -15,7 +15,6 @@
*/
package androidx.room.util
-import android.annotation.SuppressLint
import android.database.Cursor
import android.os.Build
import androidx.annotation.IntDef
@@ -226,7 +225,6 @@
* compare the two values by ignoring the surrounding parenthesis.
*
*/
- @SuppressLint("SyntheticAccessor")
@VisibleForTesting
@JvmStatic
fun defaultValueEquals(current: String, other: String?): Boolean {
diff --git a/slidingpanelayout/slidingpanelayout/src/main/java/androidx/slidingpanelayout/widget/SlidingPaneLayout.kt b/slidingpanelayout/slidingpanelayout/src/main/java/androidx/slidingpanelayout/widget/SlidingPaneLayout.kt
index 1aae7ac..f9d8b6e 100644
--- a/slidingpanelayout/slidingpanelayout/src/main/java/androidx/slidingpanelayout/widget/SlidingPaneLayout.kt
+++ b/slidingpanelayout/slidingpanelayout/src/main/java/androidx/slidingpanelayout/widget/SlidingPaneLayout.kt
@@ -13,12 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-@file:SuppressLint("SyntheticAccessor")
package androidx.slidingpanelayout.widget
import android.R
-import android.annotation.SuppressLint
import android.content.Context
import android.graphics.Canvas
import android.graphics.PixelFormat
diff --git a/sqlite/sqlite-framework/src/main/java/androidx/sqlite/util/ProcessLock.kt b/sqlite/sqlite-framework/src/main/java/androidx/sqlite/util/ProcessLock.kt
index 1d176e5..eb2b4e7 100644
--- a/sqlite/sqlite-framework/src/main/java/androidx/sqlite/util/ProcessLock.kt
+++ b/sqlite/sqlite-framework/src/main/java/androidx/sqlite/util/ProcessLock.kt
@@ -14,7 +14,6 @@
* limitations under the License.
*/
package androidx.sqlite.util
-import android.annotation.SuppressLint
import android.util.Log
import androidx.annotation.RestrictTo
import java.io.File
@@ -56,7 +55,6 @@
private val processLock: Boolean
) {
private val lockFile: File? = lockDir?.let { File(it, "$name.lck") }
- @SuppressLint("SyntheticAccessor")
private val threadLock: Lock = getThreadLock(name)
private var lockChannel: FileChannel? = null
diff --git a/sqlite/sqlite-inspection/src/main/java/androidx/sqlite/inspection/EntryExitMatchingHookRegistry.java b/sqlite/sqlite-inspection/src/main/java/androidx/sqlite/inspection/EntryExitMatchingHookRegistry.java
index 2a7b936..292dd3e 100644
--- a/sqlite/sqlite-inspection/src/main/java/androidx/sqlite/inspection/EntryExitMatchingHookRegistry.java
+++ b/sqlite/sqlite-inspection/src/main/java/androidx/sqlite/inspection/EntryExitMatchingHookRegistry.java
@@ -16,8 +16,6 @@
package androidx.sqlite.inspection;
-import android.annotation.SuppressLint;
-
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.inspection.ArtTooling.EntryHook;
@@ -58,7 +56,6 @@
final OnExitCallback onExitCallback) {
mEnvironment.artTooling().registerEntryHook(originClass, originMethod,
new EntryHook() {
- @SuppressLint("SyntheticAccessor")
@Override
public void onEntry(@Nullable Object thisObject,
@NonNull List<Object> args) {
@@ -68,7 +65,6 @@
mEnvironment.artTooling().registerExitHook(originClass, originMethod,
new ExitHook<Object>() {
- @SuppressLint("SyntheticAccessor")
@Override
public Object onExit(Object result) {
Frame entryFrame = getFrameStack().pollLast();
diff --git a/sqlite/sqlite-inspection/src/main/java/androidx/sqlite/inspection/RequestCollapsingThrottler.java b/sqlite/sqlite-inspection/src/main/java/androidx/sqlite/inspection/RequestCollapsingThrottler.java
index 71bb4b3..7cdff67 100644
--- a/sqlite/sqlite-inspection/src/main/java/androidx/sqlite/inspection/RequestCollapsingThrottler.java
+++ b/sqlite/sqlite-inspection/src/main/java/androidx/sqlite/inspection/RequestCollapsingThrottler.java
@@ -16,8 +16,6 @@
package androidx.sqlite.inspection;
-import android.annotation.SuppressLint;
-
import androidx.annotation.GuardedBy;
/**
@@ -27,7 +25,6 @@
*
* Thread safe.
*/
-@SuppressLint("SyntheticAccessor")
final class RequestCollapsingThrottler {
private static final long NEVER = -1;
diff --git a/sqlite/sqlite-inspection/src/main/java/androidx/sqlite/inspection/SqliteInspector.java b/sqlite/sqlite-inspection/src/main/java/androidx/sqlite/inspection/SqliteInspector.java
index b1776de..9bbe9366 100644
--- a/sqlite/sqlite-inspection/src/main/java/androidx/sqlite/inspection/SqliteInspector.java
+++ b/sqlite/sqlite-inspection/src/main/java/androidx/sqlite/inspection/SqliteInspector.java
@@ -99,7 +99,6 @@
* Inspector to work with SQLite databases
*/
@SuppressWarnings({"TryFinallyCanBeTryWithResources", "SameParameterValue"})
-@SuppressLint("SyntheticAccessor")
final class SqliteInspector extends Inspector {
private static final String OPEN_DATABASE_COMMAND_SIGNATURE_API_11 = "openDatabase"
+ "("
@@ -398,7 +397,6 @@
ExitHook<SQLiteDatabase> hook =
new ExitHook<SQLiteDatabase>() {
- @SuppressLint("SyntheticAccessor")
@Override
public SQLiteDatabase onExit(SQLiteDatabase database) {
try {
diff --git a/sqlite/sqlite/src/main/java/androidx/sqlite/db/SimpleSQLiteQuery.kt b/sqlite/sqlite/src/main/java/androidx/sqlite/db/SimpleSQLiteQuery.kt
index a19ce02..eee04ba 100644
--- a/sqlite/sqlite/src/main/java/androidx/sqlite/db/SimpleSQLiteQuery.kt
+++ b/sqlite/sqlite/src/main/java/androidx/sqlite/db/SimpleSQLiteQuery.kt
@@ -15,8 +15,6 @@
*/
package androidx.sqlite.db
-import android.annotation.SuppressLint
-
/**
* A basic implementation of [SupportSQLiteQuery] which receives a query and its args and
* binds args based on the passed in Object type.
@@ -61,7 +59,6 @@
* @param [statement] The sqlite statement
* @param [bindArgs] The list of bind arguments
*/
- @SuppressLint("SyntheticAccessor")
@JvmStatic
fun bind(
statement: SupportSQLiteProgram,
diff --git a/test/screenshot/screenshot/src/main/java/androidx/test/screenshot/ScreenshotTestRule.kt b/test/screenshot/screenshot/src/main/java/androidx/test/screenshot/ScreenshotTestRule.kt
index 511d9e5f..0927a8e 100644
--- a/test/screenshot/screenshot/src/main/java/androidx/test/screenshot/ScreenshotTestRule.kt
+++ b/test/screenshot/screenshot/src/main/java/androidx/test/screenshot/ScreenshotTestRule.kt
@@ -16,7 +16,6 @@
package androidx.test.screenshot
-import android.annotation.SuppressLint
import android.graphics.Bitmap
import android.graphics.BitmapFactory
import android.os.Build
@@ -76,7 +75,6 @@
*
* @see Bitmap.assertAgainstGolden
*/
-@SuppressLint("SyntheticAccessor")
open class ScreenshotTestRule(
config: ScreenshotTestRuleConfig = ScreenshotTestRuleConfig()
) : TestRule {
diff --git a/testutils/testutils-runtime/src/main/java/androidx/testutils/AnimationActivityTestRule.kt b/testutils/testutils-runtime/src/main/java/androidx/testutils/AnimationActivityTestRule.kt
index 02a1cd5..288c788 100644
--- a/testutils/testutils-runtime/src/main/java/androidx/testutils/AnimationActivityTestRule.kt
+++ b/testutils/testutils-runtime/src/main/java/androidx/testutils/AnimationActivityTestRule.kt
@@ -95,7 +95,6 @@
testType = TestType.ANIMATION
val wrappedStatement = super.apply(base, description)
return object : Statement() {
- @SuppressLint("SyntheticAccessor")
override fun evaluate() {
val savedScale = durationGetter.invoke(null) as Float
try {
diff --git a/wear/protolayout/protolayout-proto/build.gradle b/wear/protolayout/protolayout-proto/build.gradle
index 6c8c736..3610c23 100644
--- a/wear/protolayout/protolayout-proto/build.gradle
+++ b/wear/protolayout/protolayout-proto/build.gradle
@@ -82,8 +82,8 @@
afterEvaluate {
lint {
lintOptions {
- // protobuf generates unannotated and synthetic accessor methods
- disable("UnknownNullness", "SyntheticAccessor")
+ // protobuf generates unannotated methods
+ disable("UnknownNullness")
}
}
}
diff --git a/wear/tiles/tiles-proto/build.gradle b/wear/tiles/tiles-proto/build.gradle
index 6b05bec..d20f939 100644
--- a/wear/tiles/tiles-proto/build.gradle
+++ b/wear/tiles/tiles-proto/build.gradle
@@ -82,8 +82,8 @@
afterEvaluate {
lint {
lintOptions {
- // protobuf generates unannotated and synthetic accessor methods
- disable("UnknownNullness", "SyntheticAccessor")
+ // protobuf generates unannotated methods
+ disable("UnknownNullness")
}
}
}
diff --git a/wear/watchface/watchface-complications-data-source/src/main/java/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService.kt b/wear/watchface/watchface-complications-data-source/src/main/java/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService.kt
index 1790ab2..2f081c1 100644
--- a/wear/watchface/watchface-complications-data-source/src/main/java/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService.kt
+++ b/wear/watchface/watchface-complications-data-source/src/main/java/androidx/wear/watchface/complications/datasource/ComplicationDataSourceService.kt
@@ -312,7 +312,6 @@
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
open fun createMainThreadHandler() = Handler(Looper.getMainLooper())
- @SuppressLint("SyntheticAccessor")
final override fun onBind(intent: Intent): IBinder? {
if (ACTION_COMPLICATION_UPDATE_REQUEST == intent.action) {
if (wrapper == null) {
@@ -452,13 +451,11 @@
@MainThread public open fun onComplicationDeactivated(complicationInstanceId: Int) {}
private inner class IComplicationProviderWrapper : IComplicationProvider.Stub() {
- @SuppressLint("SyntheticAccessor")
override fun onUpdate(complicationInstanceId: Int, type: Int, manager: IBinder): Unit =
aidlMethod(TAG, "onUpdate") {
onUpdate2(complicationInstanceId, type, manager, bundle = null)
}
- @SuppressLint("SyntheticAccessor")
override fun onUpdate2(
complicationInstanceId: Int,
type: Int,
@@ -588,7 +585,6 @@
}
}
- @SuppressLint("SyntheticAccessor")
override fun onComplicationDeactivated(complicationInstanceId: Int): Unit =
aidlMethod(TAG, "onComplicationDeactivated") {
mainThreadHandler.post {
@@ -598,7 +594,6 @@
}
}
- @SuppressLint("SyntheticAccessor")
override fun onComplicationActivated(
complicationInstanceId: Int,
type: Int,
@@ -618,7 +613,6 @@
return API_VERSION
}
- @SuppressLint("SyntheticAccessor")
override fun getComplicationPreviewData(type: Int): WireComplicationData? =
aidlMethod(TAG, "getComplicationPreviewData") {
val expectedDataType = fromWireType(type)
diff --git a/wear/watchface/watchface-complications-data/src/main/java/android/support/wearable/complications/ComplicationText.java b/wear/watchface/watchface-complications-data/src/main/java/android/support/wearable/complications/ComplicationText.java
index 952d534..75c7eb1 100644
--- a/wear/watchface/watchface-complications-data/src/main/java/android/support/wearable/complications/ComplicationText.java
+++ b/wear/watchface/watchface-complications-data/src/main/java/android/support/wearable/complications/ComplicationText.java
@@ -262,7 +262,6 @@
new Parcelable.Creator<ComplicationText>() {
@Override
@NonNull
- @SuppressLint("SyntheticAccessor")
public ComplicationText createFromParcel(@NonNull Parcel in) {
return new ComplicationText(in);
}
@@ -405,7 +404,6 @@
}
}
- @SuppressLint("SyntheticAccessor")
Object readResolve() {
return new ComplicationText(mSurroundingText, mTimeDependentText, mDynamicText);
}
@@ -772,7 +770,6 @@
/** Returns {@link ComplicationText} representing the time difference as specified. */
@NonNull
- @SuppressLint("SyntheticAccessor")
public ComplicationText build() {
if (mReferencePeriodEndMillis < mReferencePeriodStartMillis) {
throw new IllegalStateException("Reference period end must not be before start.");
@@ -870,7 +867,6 @@
/** Returns {@link ComplicationText} including the formatted time as specified. */
@NonNull
- @SuppressLint("SyntheticAccessor")
public ComplicationText build() {
return new ComplicationText(
mSurroundingText, new TimeFormatText(mFormat, mStyle, mTimeZone));
diff --git a/wear/watchface/watchface-complications-data/src/main/java/android/support/wearable/complications/ComplicationTextTemplate.java b/wear/watchface/watchface-complications-data/src/main/java/android/support/wearable/complications/ComplicationTextTemplate.java
index a24a9a50..d920085 100644
--- a/wear/watchface/watchface-complications-data/src/main/java/android/support/wearable/complications/ComplicationTextTemplate.java
+++ b/wear/watchface/watchface-complications-data/src/main/java/android/support/wearable/complications/ComplicationTextTemplate.java
@@ -58,7 +58,6 @@
new Creator<ComplicationTextTemplate>() {
@Override
@NonNull
- @SuppressLint("SyntheticAccessor")
public ComplicationTextTemplate createFromParcel(@NonNull Parcel in) {
return new ComplicationTextTemplate(in);
}
@@ -242,7 +241,6 @@
* as specified.
*/
@NonNull
- @SuppressLint("SyntheticAccessor")
public ComplicationTextTemplate build() {
if (mTexts.isEmpty()) {
throw new IllegalStateException("At least one text must be specified.");
diff --git a/wear/watchface/watchface-complications-rendering/src/main/java/androidx/wear/watchface/complications/rendering/CanvasComplicationDrawable.kt b/wear/watchface/watchface-complications-rendering/src/main/java/androidx/wear/watchface/complications/rendering/CanvasComplicationDrawable.kt
index c871758..96ea902 100644
--- a/wear/watchface/watchface-complications-rendering/src/main/java/androidx/wear/watchface/complications/rendering/CanvasComplicationDrawable.kt
+++ b/wear/watchface/watchface-complications-rendering/src/main/java/androidx/wear/watchface/complications/rendering/CanvasComplicationDrawable.kt
@@ -16,7 +16,6 @@
package androidx.wear.watchface.complications.rendering
-import android.annotation.SuppressLint
import android.content.res.Resources
import android.graphics.Canvas
import android.graphics.Rect
@@ -81,7 +80,6 @@
object : Drawable.Callback {
override fun unscheduleDrawable(who: Drawable, what: Runnable) {}
- @SuppressLint("SyntheticAccessor")
override fun invalidateDrawable(who: Drawable) {
invalidateCallback.onInvalidate()
}
diff --git a/wear/watchface/watchface-complications-rendering/src/main/java/androidx/wear/watchface/complications/rendering/ComplicationRenderer.java b/wear/watchface/watchface-complications-rendering/src/main/java/androidx/wear/watchface/complications/rendering/ComplicationRenderer.java
index 6424328..1e188f9 100644
--- a/wear/watchface/watchface-complications-rendering/src/main/java/androidx/wear/watchface/complications/rendering/ComplicationRenderer.java
+++ b/wear/watchface/watchface-complications-rendering/src/main/java/androidx/wear/watchface/complications/rendering/ComplicationRenderer.java
@@ -22,7 +22,6 @@
import static java.lang.Math.sin;
import static java.lang.Math.toRadians;
-import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
@@ -1147,7 +1146,6 @@
mContext,
new OnDrawableLoadedListener() {
@Override
- @SuppressLint("SyntheticAccessor")
public void onDrawableLoaded(Drawable d) {
if (d == null) {
return;
@@ -1166,7 +1164,6 @@
mContext,
new OnDrawableLoadedListener() {
@Override
- @SuppressLint("SyntheticAccessor")
public void onDrawableLoaded(Drawable d) {
if (d == null) {
return;
@@ -1185,7 +1182,6 @@
mContext,
new OnDrawableLoadedListener() {
@Override
- @SuppressLint("SyntheticAccessor")
public void onDrawableLoaded(Drawable d) {
if (d == null) {
return;
@@ -1204,7 +1200,6 @@
mContext,
new OnDrawableLoadedListener() {
@Override
- @SuppressLint("SyntheticAccessor")
public void onDrawableLoaded(Drawable d) {
if (d == null) {
return;
@@ -1222,7 +1217,6 @@
mContext,
new OnDrawableLoadedListener() {
@Override
- @SuppressLint("SyntheticAccessor")
public void onDrawableLoaded(Drawable d) {
if (d == null) {
return;
@@ -1326,7 +1320,6 @@
/** Icon tint color filter */
final ColorFilter mIconColorFilter;
- @SuppressLint("SyntheticAccessor")
PaintSet(
ComplicationStyle style,
boolean isAmbientStyle,
diff --git a/wear/watchface/watchface-complications/src/main/java/androidx/wear/watchface/complications/ComplicationDataSourceInfoRetriever.kt b/wear/watchface/watchface-complications/src/main/java/androidx/wear/watchface/complications/ComplicationDataSourceInfoRetriever.kt
index b4b6119..23b825f 100644
--- a/wear/watchface/watchface-complications/src/main/java/androidx/wear/watchface/complications/ComplicationDataSourceInfoRetriever.kt
+++ b/wear/watchface/watchface-complications/src/main/java/androidx/wear/watchface/complications/ComplicationDataSourceInfoRetriever.kt
@@ -15,7 +15,6 @@
*/
package androidx.wear.watchface.complications
-import android.annotation.SuppressLint
import android.content.ComponentName
import android.content.Context
import android.content.Intent
@@ -81,25 +80,21 @@
)
private inner class ProviderInfoServiceConnection : ServiceConnection {
- @SuppressLint("SyntheticAccessor")
override fun onServiceConnected(name: ComponentName, service: IBinder) {
deferredService.complete(IProviderInfoService.Stub.asInterface(service))
}
- @SuppressLint("SyntheticAccessor")
override fun onBindingDied(name: ComponentName?) {
synchronized(lock) { closed = true }
deferredService.completeExceptionally(ServiceDisconnectedException())
}
- @SuppressLint("SyntheticAccessor")
override fun onServiceDisconnected(name: ComponentName) {
synchronized(lock) { closed = true }
deferredService.completeExceptionally(ServiceDisconnectedException())
}
}
- @SuppressLint("SyntheticAccessor")
private val serviceConnection: ServiceConnection = ProviderInfoServiceConnection()
private var context: Context? = null
private val deferredService = CompletableDeferred<IProviderInfoService>()
diff --git a/wear/watchface/watchface-editor/samples/src/main/java/androidx/wear/watchface/editor/sample/WatchFaceConfigActivity.kt b/wear/watchface/watchface-editor/samples/src/main/java/androidx/wear/watchface/editor/sample/WatchFaceConfigActivity.kt
index 6fa60828..8aaeb0b 100644
--- a/wear/watchface/watchface-editor/samples/src/main/java/androidx/wear/watchface/editor/sample/WatchFaceConfigActivity.kt
+++ b/wear/watchface/watchface-editor/samples/src/main/java/androidx/wear/watchface/editor/sample/WatchFaceConfigActivity.kt
@@ -16,7 +16,6 @@
package androidx.wear.watchface.editor.sample
-import android.annotation.SuppressLint
import android.view.View
import android.view.accessibility.AccessibilityEvent
import androidx.annotation.RestrictTo
@@ -81,7 +80,6 @@
init(
editorSession,
object : FragmentController {
- @SuppressLint("SyntheticAccessor")
override fun showConfigFragment() {
showFragment(
ConfigFragment.newInstance(
@@ -94,12 +92,10 @@
)
}
- @SuppressLint("SyntheticAccessor")
override fun showComplicationConfigSelectionFragment() {
showFragment(ComplicationConfigFragment())
}
- @SuppressLint("SyntheticAccessor")
override fun showStyleConfigFragment(
settingId: String,
styleSchema: UserStyleSchema,
diff --git a/wear/watchface/watchface/src/main/java/androidx/wear/watchface/BroadcastsReceiver.kt b/wear/watchface/watchface/src/main/java/androidx/wear/watchface/BroadcastsReceiver.kt
index 9df1d3b..eb1c09d 100644
--- a/wear/watchface/watchface/src/main/java/androidx/wear/watchface/BroadcastsReceiver.kt
+++ b/wear/watchface/watchface/src/main/java/androidx/wear/watchface/BroadcastsReceiver.kt
@@ -87,7 +87,6 @@
internal val receiver: BroadcastReceiver =
object : BroadcastReceiver() {
- @SuppressWarnings("SyntheticAccessor")
override fun onReceive(context: Context, intent: Intent) {
when (intent.action) {
Intent.ACTION_BATTERY_LOW -> observer.onActionBatteryLow()
diff --git a/wear/watchface/watchface/src/main/java/androidx/wear/watchface/ComplicationSlotsManager.kt b/wear/watchface/watchface/src/main/java/androidx/wear/watchface/ComplicationSlotsManager.kt
index a0b0e39..d9cdbd9 100644
--- a/wear/watchface/watchface/src/main/java/androidx/wear/watchface/ComplicationSlotsManager.kt
+++ b/wear/watchface/watchface/src/main/java/androidx/wear/watchface/ComplicationSlotsManager.kt
@@ -437,7 +437,6 @@
*
* @param complicationSlotId The ID for the [ComplicationSlot] that was single tapped
*/
- @SuppressWarnings("SyntheticAccessor")
@UiThread
internal fun onComplicationSlotSingleTapped(complicationSlotId: Int) {
// Check if the complication is missing permissions.
diff --git a/wear/watchface/watchface/src/main/java/androidx/wear/watchface/Renderer.kt b/wear/watchface/watchface/src/main/java/androidx/wear/watchface/Renderer.kt
index bab898a..352a41c 100644
--- a/wear/watchface/watchface/src/main/java/androidx/wear/watchface/Renderer.kt
+++ b/wear/watchface/watchface/src/main/java/androidx/wear/watchface/Renderer.kt
@@ -16,7 +16,6 @@
package androidx.wear.watchface
-import android.annotation.SuppressLint
import android.content.res.Configuration
import android.graphics.Bitmap
import android.graphics.Canvas
@@ -1367,7 +1366,6 @@
surfaceHolder.addCallback(
object : SurfaceHolder.Callback {
- @SuppressLint("SyntheticAccessor")
override fun surfaceChanged(
holder: SurfaceHolder,
format: Int,
@@ -1377,7 +1375,6 @@
uiThreadCoroutineScope.launch { createWindowSurface(width, height) }
}
- @SuppressLint("SyntheticAccessor")
override fun surfaceDestroyed(holder: SurfaceHolder) {
if (this@GlesRenderer::eglSurface.isInitialized) {
if (!EGL14.eglDestroySurface(eglDisplay, eglSurface)) {
diff --git a/wear/watchface/watchface/src/main/java/androidx/wear/watchface/WatchFace.kt b/wear/watchface/watchface/src/main/java/androidx/wear/watchface/WatchFace.kt
index 5274c7c..3f77015 100644
--- a/wear/watchface/watchface/src/main/java/androidx/wear/watchface/WatchFace.kt
+++ b/wear/watchface/watchface/src/main/java/androidx/wear/watchface/WatchFace.kt
@@ -561,7 +561,6 @@
}
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
-@SuppressLint("SyntheticAccessor")
public class WatchFaceImpl
@UiThread
constructor(
diff --git a/wear/watchface/watchface/src/main/java/androidx/wear/watchface/WatchFaceService.kt b/wear/watchface/watchface/src/main/java/androidx/wear/watchface/WatchFaceService.kt
index 476da70..d640a2c 100644
--- a/wear/watchface/watchface/src/main/java/androidx/wear/watchface/WatchFaceService.kt
+++ b/wear/watchface/watchface/src/main/java/androidx/wear/watchface/WatchFaceService.kt
@@ -1275,7 +1275,6 @@
private val frameCallback =
object : Choreographer.FrameCallback {
- @SuppressWarnings("SyntheticAccessor")
override fun doFrame(frameTimeNs: Long) {
if (destroyed) {
return
@@ -2443,7 +2442,6 @@
complicationSlotsManager.init(
renderer,
object : ComplicationSlot.InvalidateListener {
- @SuppressWarnings("SyntheticAccessor")
override fun onInvalidate() {
// This could be called on any thread.
uiThreadHandler.runOnHandlerWithTracing("onInvalidate") {
diff --git a/wear/watchface/watchface/src/main/java/androidx/wear/watchface/control/InteractiveInstanceManager.kt b/wear/watchface/watchface/src/main/java/androidx/wear/watchface/control/InteractiveInstanceManager.kt
index d4ef013..9381afd 100644
--- a/wear/watchface/watchface/src/main/java/androidx/wear/watchface/control/InteractiveInstanceManager.kt
+++ b/wear/watchface/watchface/src/main/java/androidx/wear/watchface/control/InteractiveInstanceManager.kt
@@ -16,7 +16,6 @@
package androidx.wear.watchface.control
-import android.annotation.SuppressLint
import android.util.Log
import androidx.annotation.UiThread
import androidx.annotation.VisibleForTesting
@@ -65,7 +64,6 @@
instances.map { it.key }
}
- @SuppressLint("SyntheticAccessor")
fun addInstance(impl: InteractiveWatchFaceImpl) {
synchronized(pendingWallpaperInteractiveWatchFaceInstanceLock) {
require(!instances.containsKey(impl.instanceId)) {
@@ -81,7 +79,6 @@
* up params. Typically this can only happen if a WSL watchface is upgraded to an androidx
* one, so WallpaperManager knows about it but WearServices/WSL does not.
*/
- @SuppressLint("SyntheticAccessor")
fun setParameterlessEngineOrTakePendingWallpaperInteractiveWatchFaceInstance(
parameterlessEngine: WatchFaceService.EngineWrapper?
): PendingWallpaperInteractiveWatchFaceInstance? {
@@ -106,7 +103,6 @@
* this can only happen if a WSL watchface is upgraded to an androidx one, so
* WallpaperManager knows about it but WearServices/WSL does not.
*/
- @SuppressLint("SyntheticAccessor")
fun setParameterlessEngine(parameterlessEngine: WatchFaceService.EngineWrapper?) {
synchronized(pendingWallpaperInteractiveWatchFaceInstanceLock) {
require(this.parameterlessEngine == null || parameterlessEngine == null) {
@@ -116,14 +112,12 @@
}
}
- @SuppressLint("SyntheticAccessor")
fun getParameterlessEngine(): WatchFaceService.EngineWrapper? {
synchronized(pendingWallpaperInteractiveWatchFaceInstanceLock) {
return parameterlessEngine
}
}
- @SuppressLint("SyntheticAccessor")
fun getAndRetainInstance(instanceId: String): InteractiveWatchFaceImpl? {
synchronized(pendingWallpaperInteractiveWatchFaceInstanceLock) {
val refCountedInstance = instances[instanceId] ?: return null
@@ -132,7 +126,6 @@
}
}
- @SuppressLint("SyntheticAccessor")
fun releaseInstance(instanceId: String) {
synchronized(pendingWallpaperInteractiveWatchFaceInstanceLock) {
instances[instanceId]?.let {
@@ -144,7 +137,6 @@
}
}
- @SuppressLint("SyntheticAccessor")
fun deleteInstance(instanceId: String) {
synchronized(pendingWallpaperInteractiveWatchFaceInstanceLock) {
instances[instanceId]?.impl?.onDestroy()
@@ -152,7 +144,6 @@
}
}
- @SuppressLint("SyntheticAccessor")
fun renameInstance(oldInstanceId: String, newInstanceId: String) {
synchronized(pendingWallpaperInteractiveWatchFaceInstanceLock) {
val instance = instances.remove(oldInstanceId)
@@ -176,7 +167,6 @@
}
/** Can be called on any thread. */
- @SuppressLint("SyntheticAccessor")
fun getExistingInstanceOrSetPendingWallpaperInteractiveWatchFaceInstance(
value: PendingWallpaperInteractiveWatchFaceInstance
): IInteractiveWatchFace? {
@@ -223,7 +213,6 @@
}
/** Can be called on any thread. */
- @SuppressLint("SyntheticAccessor")
fun takePendingWallpaperInteractiveWatchFaceInstance():
PendingWallpaperInteractiveWatchFaceInstance? {
synchronized(pendingWallpaperInteractiveWatchFaceInstanceLock) {
diff --git a/wear/wear-ongoing/src/main/java/androidx/wear/ongoing/OngoingActivity.java b/wear/wear-ongoing/src/main/java/androidx/wear/ongoing/OngoingActivity.java
index 3793dd6..9d93cf3 100644
--- a/wear/wear-ongoing/src/main/java/androidx/wear/ongoing/OngoingActivity.java
+++ b/wear/wear-ongoing/src/main/java/androidx/wear/ongoing/OngoingActivity.java
@@ -309,7 +309,6 @@
*
* @throws IllegalArgumentException if the static icon or the touch intent are not provided.
*/
- @SuppressWarnings("SyntheticAccessor")
@NonNull
public OngoingActivity build() {
Notification notification = mNotificationBuilder.build();
diff --git a/wear/wear-phone-interactions/src/main/java/androidx/wear/phone/interactions/authentication/RemoteAuthClient.kt b/wear/wear-phone-interactions/src/main/java/androidx/wear/phone/interactions/authentication/RemoteAuthClient.kt
index 29ee6b7..8a95f2d 100644
--- a/wear/wear-phone-interactions/src/main/java/androidx/wear/phone/interactions/authentication/RemoteAuthClient.kt
+++ b/wear/wear-phone-interactions/src/main/java/androidx/wear/phone/interactions/authentication/RemoteAuthClient.kt
@@ -16,7 +16,6 @@
package androidx.wear.phone.interactions.authentication
-import android.annotation.SuppressLint
import android.content.ComponentName
import android.content.Context
import android.content.Intent
@@ -345,7 +344,6 @@
onResult(OAuthResponse(errorCode, responseUrl))
}
- @SuppressLint("SyntheticAccessor")
private fun onResult(response: OAuthResponse) {
@ErrorCode val error = response.errorCode
uiThreadExecutor.execute(
diff --git a/wear/wear-phone-interactions/src/main/java/androidx/wear/phone/interactions/notifications/BridgingManager.kt b/wear/wear-phone-interactions/src/main/java/androidx/wear/phone/interactions/notifications/BridgingManager.kt
index 4cb0ce7..76b4ad7 100644
--- a/wear/wear-phone-interactions/src/main/java/androidx/wear/phone/interactions/notifications/BridgingManager.kt
+++ b/wear/wear-phone-interactions/src/main/java/androidx/wear/phone/interactions/notifications/BridgingManager.kt
@@ -16,7 +16,6 @@
package androidx.wear.phone.interactions.notifications
-import android.annotation.SuppressLint
import android.content.ComponentName
import android.content.Context
import android.content.Intent
@@ -86,7 +85,6 @@
*
* @throws RuntimeException if the service binding is failed.
*/
- @SuppressLint("SyntheticAccessor")
public fun setConfig(bridgingConfig: BridgingConfig) {
require(isWearableDevice(context)) { "API only supported on wearable devices" }
val connection = BridgingConfigServiceConnection(context, bridgingConfig)
diff --git a/wear/wear/src/main/java/androidx/wear/widget/ArcLayout.java b/wear/wear/src/main/java/androidx/wear/widget/ArcLayout.java
index 77107d3..9cb9311 100644
--- a/wear/wear/src/main/java/androidx/wear/widget/ArcLayout.java
+++ b/wear/wear/src/main/java/androidx/wear/widget/ArcLayout.java
@@ -306,7 +306,6 @@
private boolean mClockwise;
- @SuppressWarnings("SyntheticAccessor")
private final ChildArcAngles mChildArcAngles = new ChildArcAngles();
public ArcLayout(@NonNull Context context) {
diff --git a/webkit/integration-tests/testapp/src/main/java/com/example/androidx/webkit/RendererTerminationActivity.java b/webkit/integration-tests/testapp/src/main/java/com/example/androidx/webkit/RendererTerminationActivity.java
index c59a22a..4abcc8a 100644
--- a/webkit/integration-tests/testapp/src/main/java/com/example/androidx/webkit/RendererTerminationActivity.java
+++ b/webkit/integration-tests/testapp/src/main/java/com/example/androidx/webkit/RendererTerminationActivity.java
@@ -223,7 +223,6 @@
layout.addView(mWebView);
mWebView.setWebViewClient(new WebViewClient() {
- @SuppressLint("SyntheticAccessor")
@Override
public boolean onRenderProcessGone(WebView view, RenderProcessGoneDetail detail) {
mWebView.destroy();
@@ -249,7 +248,6 @@
if (WebViewFeature.isFeatureSupported(
WebViewFeature.WEB_VIEW_RENDERER_CLIENT_BASIC_USAGE)) {
WebViewCompat.setWebViewRenderProcessClient(mWebView, new WebViewRenderProcessClient() {
- @SuppressLint("SyntheticAccessor")
@Override
public void onRenderProcessUnresponsive(
@NonNull WebView view, @Nullable WebViewRenderProcess renderer) {
@@ -261,7 +259,6 @@
dialog.show(getSupportFragmentManager(), "dialog-unresponsive");
}
}
- @SuppressLint("SyntheticAccessor")
@Override
public void onRenderProcessResponsive(@NonNull WebView view,
@Nullable WebViewRenderProcess renderer) {
diff --git a/window/window/src/main/java/androidx/window/layout/adapter/sidecar/SidecarCompat.kt b/window/window/src/main/java/androidx/window/layout/adapter/sidecar/SidecarCompat.kt
index d3f5aab..1e7dec9 100644
--- a/window/window/src/main/java/androidx/window/layout/adapter/sidecar/SidecarCompat.kt
+++ b/window/window/src/main/java/androidx/window/layout/adapter/sidecar/SidecarCompat.kt
@@ -330,7 +330,6 @@
* If you change the name of this class, you must update the proguard file.
*/
internal inner class TranslatingCallback : SidecarCallback {
- @SuppressLint("SyntheticAccessor")
override fun onDeviceStateChanged(newDeviceState: SidecarDeviceState) {
windowListenerRegisteredContexts.values.forEach { activity ->
val layoutInfo = getActivityWindowToken(activity)
@@ -342,7 +341,6 @@
}
}
- @SuppressLint("SyntheticAccessor")
override fun onWindowLayoutChanged(
windowToken: IBinder,
newLayout: SidecarWindowLayoutInfo
diff --git a/window/window/src/main/java/androidx/window/layout/adapter/sidecar/SidecarWindowBackend.kt b/window/window/src/main/java/androidx/window/layout/adapter/sidecar/SidecarWindowBackend.kt
index 57da910..d3ba19b 100644
--- a/window/window/src/main/java/androidx/window/layout/adapter/sidecar/SidecarWindowBackend.kt
+++ b/window/window/src/main/java/androidx/window/layout/adapter/sidecar/SidecarWindowBackend.kt
@@ -15,7 +15,6 @@
*/
package androidx.window.layout.adapter.sidecar
-import android.annotation.SuppressLint
import android.app.Activity
import android.content.Context
import android.util.Log
@@ -145,7 +144,6 @@
@VisibleForTesting
internal inner class ExtensionListenerImpl : ExtensionCallbackInterface {
- @SuppressLint("SyntheticAccessor")
override fun onWindowLayoutChanged(
activity: Activity,
newLayout: WindowLayoutInfo
diff --git a/work/work-runtime/build.gradle b/work/work-runtime/build.gradle
index 70c05ae..13e0508 100644
--- a/work/work-runtime/build.gradle
+++ b/work/work-runtime/build.gradle
@@ -53,11 +53,6 @@
androidTest.assets.srcDirs += files("$projectDir/src/schemas".toString())
}
namespace "androidx.work"
- lintOptions {
- // Too many Kotlin features require synthetic accessors - we want to rely on R8 to
- // remove these accessors
- disable("SyntheticAccessor")
- }
}
dependencies {
diff --git a/work/work-runtime/src/main/java/androidx/work/Operation.java b/work/work-runtime/src/main/java/androidx/work/Operation.java
index 73c57c5..1eb01b7a 100644
--- a/work/work-runtime/src/main/java/androidx/work/Operation.java
+++ b/work/work-runtime/src/main/java/androidx/work/Operation.java
@@ -16,8 +16,6 @@
package androidx.work;
-import android.annotation.SuppressLint;
-
import androidx.annotation.NonNull;
import androidx.annotation.RestrictTo;
import androidx.lifecycle.LifecycleOwner;
@@ -39,14 +37,12 @@
*/
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
@SuppressWarnings("VariableNameSameAsType")
- @SuppressLint("SyntheticAccessor")
State.SUCCESS SUCCESS = new State.SUCCESS();
/**
*/
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
@SuppressWarnings("VariableNameSameAsType")
- @SuppressLint("SyntheticAccessor")
State.IN_PROGRESS IN_PROGRESS = new State.IN_PROGRESS();
/**
diff --git a/work/work-runtime/src/main/java/androidx/work/impl/WorkerWrapper.java b/work/work-runtime/src/main/java/androidx/work/impl/WorkerWrapper.java
index 3b11d7a..005515b 100644
--- a/work/work-runtime/src/main/java/androidx/work/impl/WorkerWrapper.java
+++ b/work/work-runtime/src/main/java/androidx/work/impl/WorkerWrapper.java
@@ -310,7 +310,6 @@
final String workDescription = mWorkDescription;
mWorkerResultFuture.addListener(new Runnable() {
@Override
- @SuppressLint("SyntheticAccessor")
public void run() {
try {
// If the ListenableWorker returns a null result treat it as a failure.
diff --git a/work/work-testing/build.gradle b/work/work-testing/build.gradle
index 97ab4e7..ff9ab66 100644
--- a/work/work-testing/build.gradle
+++ b/work/work-testing/build.gradle
@@ -58,9 +58,4 @@
defaultConfig {
multiDexEnabled = true
}
- lintOptions {
- // Too many Kotlin features require synthetic accessors - we want to rely on R8 to
- // remove these accessors
- disable("SyntheticAccessor")
- }
}