Пример #1
0
 static {
   BULID_BRAND = Build.BRAND.toLowerCase();
   BULID_MODEL = Build.MODEL.toLowerCase();
   BULIDM_PRODUCT = Build.PRODUCT.toLowerCase();
   BULIDM_RELEASE = Build.VERSION.RELEASE;
   BULIDM_SDK = Build.VERSION.SDK;
   if (BULIDM_RELEASE.indexOf("1.1") != -1) {
     TMP_MAJOR = OS_11;
   } else if (BULIDM_RELEASE.indexOf("1.5") != -1) {
     TMP_MAJOR = OS_15;
   } else if (BULIDM_RELEASE.indexOf("1.6") != -1) {
     TMP_MAJOR = OS_16;
   } else if (BULIDM_RELEASE.indexOf("2.0") != -1) {
     TMP_MAJOR = OS_20;
   } else if (BULIDM_RELEASE.indexOf("2.1") != -1) {
     TMP_MAJOR = OS_21;
   } else if (BULIDM_RELEASE.indexOf("2.2") != -1) {
     TMP_MAJOR = OS_22;
   } else if (BULIDM_RELEASE.indexOf("2.3") != -1) {
     TMP_MAJOR = OS_23;
   } else if (BULIDM_RELEASE.indexOf("3.0") != -1) {
     TMP_MAJOR = OS_30;
   } else {
     TMP_MAJOR = OS_15;
   }
   EMULATOR = BULID_BRAND.indexOf("generic") != -1 && BULID_MODEL.indexOf("sdk") != -1;
   LOWER_VER = (TMP_MAJOR < OS_16 && !EMULATOR);
 }
Пример #2
0
 public boolean isKindleFire() {
   if (myIsKindleFire == null) {
     final String KINDLE_MODEL_REGEXP = ".*kindle(\\s+)fire.*";
     myIsKindleFire =
         Build.MODEL != null && Build.MODEL.toLowerCase().matches(KINDLE_MODEL_REGEXP);
   }
   return myIsKindleFire;
 }
Пример #3
0
 /** @return platform id 1 Android 2 Amazon 3 Blackberry */
 public static int getPlatform() {
   if (android.os.Build.BRAND.toLowerCase().contains("blackberry")) {
     return 1;
   } else if (android.os.Build.MODEL.toLowerCase().contains("kindle")) {
     return 2;
   } else {
     return 0;
   }
 }
Пример #4
0
  /**
   * Tries to figure out if the current phone is Galaxy S based, since it has recording issues This
   * is pretty nasty since we are string matching, but unless I can get a better way to do it...
   *
   * @param
   */
  public static boolean isSamsungGalaxyS() {
    String manufacturer = android.os.Build.MANUFACTURER.toLowerCase();
    String model = android.os.Build.MODEL.toLowerCase();
    String device = android.os.Build.DEVICE.toLowerCase();
    Log.i(
        TAG_AUDIOHELPER,
        String.format("manufacturer: %s, model: %s, device: %s", manufacturer, model, device));

    if (manufacturer.equals(MANUFACTURER_SAMSUNG)) {
      if (device.equals(DEVICE_ID_GALAXY_S)) {
        Log.i(TAG_AUDIOHELPER, "Samsung Galaxy S detected");
        return true;
      }

      if (device.equals(DEVICE_ID_CAPTIVATE)) {
        Log.i(TAG_AUDIOHELPER, "ATT, Samsung Captivate detected");
        return true;
      }

      if (device.equals(DEVICE_ID_VIBRANT)) {
        Log.i(TAG_AUDIOHELPER, "T-Mobile US, Samsung Vibrant detected");
        return true;
      }

      if (device.equals(DEVICE_ID_EPIC)) {
        Log.i(TAG_AUDIOHELPER, "Sprint, Samsung Epic 4G detected");
        return true;
      }

      if (device.equals(DEVICE_ID_FASCINATE)) {
        Log.i(TAG_AUDIOHELPER, "Verizon, Samsung Fascinate detected");
        return true;
      }

      if (device.equals(DEVICE_ID_MESMERIZE)) {
        Log.i(TAG_AUDIOHELPER, "Samsung Mesmerize detected");
        return true;
      }
    }
    return false;
  }
  @SuppressLint("DefaultLocale")
  public void testXidioLoginErrorMessagePos() {

    assertTrue(solo.waitForActivity(TestConstants.FIRST_RUN));
    solo.sleep(TestConstants.SLEEP_TIME_1000);
    if (!Build.MODEL.toLowerCase(Locale.US).contains("comcast")) {

      solo.enterText(
          (EditText)
              solo.getCurrentActivity().findViewById(com.xfinity.xidio.R.id.first_run_username),
          TestConstants.WRONG_USERNAME);
      solo.enterText(
          (EditText)
              solo.getCurrentActivity().findViewById(com.xfinity.xidio.R.id.first_run_password),
          TestConstants.PASSWORD);
      solo.sleep(TestConstants.SLEEP_TIME_500);
      solo.sendKey(KeyEvent.KEYCODE_DPAD_DOWN);
      solo.sendKey(KeyEvent.KEYCODE_DPAD_DOWN);
      solo.sendKey(KeyEvent.KEYCODE_DPAD_CENTER);
      solo.sleep(TestConstants.SLEEP_TIME_2000);
      assertFalse(solo.searchText("Error, check username/password and try again"));
      solo.sleep(TestConstants.SLEEP_TIME_1000);
    }
  }
Пример #6
0
 private static boolean isGenymotion() {
   return Build.MODEL.toLowerCase().contains("genymotion");
 }
Пример #7
0
 private static boolean isBlueStacks() {
   return Build.MODEL.toLowerCase().contains("bluestacks");
 }
 private void initActy() {
   mVuforiaFlags = QCAR.GL_20;
   updateApplicationStatus(AppStatus.APPSTATUS_INIT_APP);
   mIsDroidDevice = android.os.Build.MODEL.toLowerCase().startsWith("droid");
 }