Skip to content

Commit

Permalink
[Fix] Fix lint errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanghai committed Aug 20, 2023
1 parent a4e82ec commit 4d1abf5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

package com.google.android.material.shape;

import android.annotation.SuppressLint;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

Expand All @@ -13,13 +15,15 @@
public class MaterialShapeDrawableAccessor {
private MaterialShapeDrawableAccessor() {}

@SuppressLint("RestrictedApi")
public static ElevationOverlayProvider getElevationOverlayProvider(
@NonNull MaterialShapeDrawable drawable) {
MaterialShapeDrawable.MaterialShapeDrawableState drawableState =
(MaterialShapeDrawable.MaterialShapeDrawableState) drawable.getConstantState();
return drawableState.elevationOverlayProvider;
}

@SuppressLint("RestrictedApi")
public static void setElevationOverlayProvider(
@NonNull MaterialShapeDrawable drawable,
@Nullable ElevationOverlayProvider elevationOverlayProvider) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()) {
Expand Down

0 comments on commit 4d1abf5

Please sign in to comment.