mirror of
https://github.com/zhanghai/MaterialFiles
synced 2024-07-09 03:55:50 +00:00
[Fix] Fix lint errors.
This commit is contained in:
parent
a4e82ec606
commit
4d1abf584f
|
@ -5,6 +5,8 @@
|
|||
|
||||
package com.google.android.material.shape;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
|
@ -13,6 +15,7 @@ import com.google.android.material.elevation.ElevationOverlayProvider;
|
|||
public class MaterialShapeDrawableAccessor {
|
||||
private MaterialShapeDrawableAccessor() {}
|
||||
|
||||
@SuppressLint("RestrictedApi")
|
||||
public static ElevationOverlayProvider getElevationOverlayProvider(
|
||||
@NonNull MaterialShapeDrawable drawable) {
|
||||
MaterialShapeDrawable.MaterialShapeDrawableState drawableState =
|
||||
|
@ -20,6 +23,7 @@ public class MaterialShapeDrawableAccessor {
|
|||
return drawableState.elevationOverlayProvider;
|
||||
}
|
||||
|
||||
@SuppressLint("RestrictedApi")
|
||||
public static void setElevationOverlayProvider(
|
||||
@NonNull MaterialShapeDrawable drawable,
|
||||
@Nullable ElevationOverlayProvider elevationOverlayProvider) {
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
package me.zhanghai.android.files.app
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.PendingIntent
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
|
@ -51,6 +52,8 @@ object BackgroundActivityStarter {
|
|||
Lifecycle.State.STARTED
|
||||
)
|
||||
|
||||
// TODO: Add POST_NOTIFICATIONS permission when targeting API 33.
|
||||
@SuppressLint("MissingPermission")
|
||||
private fun notifyStartActivity(
|
||||
intent: Intent,
|
||||
title: CharSequence,
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
package me.zhanghai.android.files.util
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.Notification
|
||||
import android.app.Service
|
||||
import me.zhanghai.android.files.app.notificationManager
|
||||
|
@ -14,6 +15,8 @@ class ForegroundNotificationManager(private val service: Service) {
|
|||
|
||||
private var foregroundId = 0
|
||||
|
||||
// TODO: Add POST_NOTIFICATIONS permission when targeting API 33.
|
||||
@SuppressLint("MissingPermission")
|
||||
fun notify(id: Int, notification: Notification) {
|
||||
synchronized(notifications) {
|
||||
if (notifications.isEmpty()) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user