IprintApplication.java 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. package epson.print;
  2. import androidx.multidex.BuildConfig;
  3. import androidx.multidex.MultiDexApplication;
  4. import epson.print.Util.EPLog;
  5. public class IprintApplication extends MultiDexApplication {
  6. private static String STAGE_BETA = "Beta";
  7. private static String STAGE_FC = "FC";
  8. private static String STAGE_FFE = "FFE";
  9. private static IprintApplication sInstance;
  10. private boolean mPrinting;
  11. public static synchronized IprintApplication getInstance() {
  12. IprintApplication iprintApplication;
  13. synchronized (IprintApplication.class) {
  14. if (sInstance == null) {
  15. sInstance = new IprintApplication();
  16. }
  17. iprintApplication = sInstance;
  18. }
  19. return iprintApplication;
  20. }
  21. public void onCreate() {
  22. super.onCreate();
  23. sInstance = this;
  24. EPLog.setDebuggable(false);
  25. EPLog.setDebuggable(false);
  26. }
  27. /**
  28. * @return
  29. */
  30. public static boolean isConnectStaging() {
  31. return BuildConfig.FLAVOR.equals(STAGE_BETA) || BuildConfig.FLAVOR.equals(STAGE_FFE);
  32. }
  33. /**
  34. * @return
  35. */
  36. public static boolean isReleaseUnlimited() {
  37. return BuildConfig.FLAVOR.equals(STAGE_FFE);
  38. }
  39. public String getGoEpsonServerName() {
  40. return getString(R.string.go_epson_servername);
  41. }
  42. public void setPrinting(boolean z) {
  43. mPrinting = z;
  44. }
  45. public boolean getPrinting() {
  46. return mPrinting;
  47. }
  48. }