public static boolean isNoBackgroundMode() {
    return ApplicationManager.getApplication().isUnitTestMode() || ApplicationManager.getApplication().isHeadlessEnvironment();
  }
public static boolean isNoBackgroundMode()