Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Commit

Permalink
Add name check
Browse files Browse the repository at this point in the history
  • Loading branch information
shinovon committed Jul 10, 2023
1 parent a20b58c commit bdb547f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ public void cancel(Runnable r) {
}

public void startApp() {
if(!"JTube".equalsIgnoreCase(midlet.getAppProperty("MIDlet-Name"))) {
throw new RuntimeException();
}
if(!"nnproject".equalsIgnoreCase(midlet.getAppProperty("MIDlet-Vendor"))) {
throw new RuntimeException();
}
SplashScreen splash = new SplashScreen();
Display.getDisplay(midlet).setCurrent(splash);
App.startWidth = splash.getWidth();
Expand Down

0 comments on commit bdb547f

Please sign in to comment.