Messaging: Language cleanup
No unnecessary boxing, enhanced for loops, redundant checks and throws, imports (removal, reordering), possible void returns Change-Id: I7a8e1b2007e3b0906e01b41785c518d02c2f3fab
This commit is contained in:
@@ -31,6 +31,7 @@ import androidx.annotation.NonNull;
|
||||
import com.android.messaging.Factory;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* This class is provides the same interface and functionality as android.media.AsyncPlayer
|
||||
@@ -257,11 +258,7 @@ public class NotificationPlayer implements OnCompletionListener {
|
||||
* @param tag a string to use for debugging
|
||||
*/
|
||||
public NotificationPlayer(final String tag) {
|
||||
if (tag != null) {
|
||||
mTag = tag;
|
||||
} else {
|
||||
mTag = "NotificationPlayer";
|
||||
}
|
||||
mTag = Objects.requireNonNullElse(tag, "NotificationPlayer");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user