Skip to content

Commit

Permalink
optimize by lint
Browse files Browse the repository at this point in the history
  • Loading branch information
jrfeng committed Sep 19, 2020
1 parent 302ea9d commit 8c9f4d4
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion player/src/main/java/snow/player/PlayerClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import android.os.RemoteException;
import android.support.v4.media.MediaBrowserCompat;
import android.support.v4.media.session.MediaControllerCompat;
import android.util.Log;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
Expand Down
2 changes: 2 additions & 0 deletions player/src/main/java/snow/player/PlayerService.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
* 因为本项目大部的功能都依赖于 {@link PlayerClient} 类,如果不使用 {@link PlayerClient} 类,那么也无法使
* 用这些功能。
*/
@SuppressWarnings("SameReturnValue")
public class PlayerService extends MediaBrowserServiceCompat implements PlayerManager {
/**
* 默认的 root id,值为 `"root"`。
Expand Down Expand Up @@ -1096,6 +1097,7 @@ protected void onInit(Context context) {
/**
* 该方法会在 Service 销毁时调用,可以在该方法中释放占用的资源。
*/
@SuppressWarnings("EmptyMethod")
protected void onRelease() {
}

Expand Down
4 changes: 1 addition & 3 deletions player/src/main/java/snow/player/PlaylistManagerImp.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@

import android.annotation.SuppressLint;
import android.content.Context;
import android.util.Log;

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

import com.google.common.base.Preconditions;
import com.tencent.mmkv.MMKV;
Expand All @@ -21,7 +19,6 @@
import io.reactivex.schedulers.Schedulers;
import snow.player.audio.MusicItem;
import snow.player.playlist.Playlist;
import snow.player.playlist.PlaylistEditor;
import snow.player.playlist.PlaylistManager;

/**
Expand Down Expand Up @@ -67,6 +64,7 @@ public int getPlaylistSize() {
return mMMKV.decodeInt(KEY_PLAYLIST_SIZE, 0);
}

@SuppressWarnings("ResultOfMethodCallIgnored")
@SuppressLint("CheckResult")
@Override
public void getPlaylist(@NonNull final Callback callback) {
Expand Down
1 change: 0 additions & 1 deletion player/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="snow_notif_icon_size_big">96dp</dimen>
<dimen name="snow_notif_icon_corner_radius">8dp</dimen>

</resources>

0 comments on commit 8c9f4d4

Please sign in to comment.