Skip to content

Commit 75d1e1e

Browse files
committed
Add AssertionError to SoftButtonState
1 parent 386027f commit 75d1e1e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

base/src/main/java/com/smartdevicelink/managers/screen/SoftButtonState.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333

3434
import androidx.annotation.NonNull;
3535

36+
import com.livio.BuildConfig;
3637
import com.smartdevicelink.managers.file.filetypes.SdlArtwork;
3738
import com.smartdevicelink.proxy.rpc.SoftButton;
3839
import com.smartdevicelink.proxy.rpc.enums.SoftButtonType;
@@ -65,6 +66,8 @@ public SoftButtonState(@NonNull String name, String text, SdlArtwork artwork) {
6566
if (text == null && artwork == null) {
6667
DebugTool.logError(TAG, "Attempted to create an invalid soft button state: text and artwork are both null");
6768
softButton = null;
69+
if (BuildConfig.DEBUG)
70+
throw new AssertionError("Attempted to create an invalid soft button state: text and artwork are both null");
6871
return;
6972
}
7073
this.name = name;

0 commit comments

Comments
 (0)