Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add AssertionError to SoftButtonState
  • Loading branch information
noah-livio committed Jan 7, 2022
commit 75d1e1e7a1bafd2c07c586f6f653cb1447ff833d
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

import androidx.annotation.NonNull;

import com.livio.BuildConfig;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove unused import

import com.smartdevicelink.managers.file.filetypes.SdlArtwork;
import com.smartdevicelink.proxy.rpc.SoftButton;
import com.smartdevicelink.proxy.rpc.enums.SoftButtonType;
Expand Down Expand Up @@ -65,6 +66,8 @@ public SoftButtonState(@NonNull String name, String text, SdlArtwork artwork) {
if (text == null && artwork == null) {
DebugTool.logError(TAG, "Attempted to create an invalid soft button state: text and artwork are both null");
softButton = null;
if (BuildConfig.DEBUG)
throw new AssertionError("Attempted to create an invalid soft button state: text and artwork are both null");
return;
}
this.name = name;
Expand Down