@Test public void testLocaleIdentifierSpecialCases() { mocksForUpdateBeforeSave(); ParseInstallation installation = new ParseInstallation(); Locale.setDefault(new Locale("iw", "US")); installation.updateBeforeSave(); assertEquals("he-US", installation.getString(KEY_LOCALE_IDENTIFIER)); Locale.setDefault(new Locale("in", "US")); installation.updateBeforeSave(); assertEquals("id-US", installation.getString(KEY_LOCALE_IDENTIFIER)); Locale.setDefault(new Locale("ji", "US")); installation.updateBeforeSave(); assertEquals("yi-US", installation.getString(KEY_LOCALE_IDENTIFIER)); Locale.setDefault(new Locale("en")); installation.updateBeforeSave(); assertEquals("en", installation.getString(KEY_LOCALE_IDENTIFIER)); }
@Override void updateBeforeSave() { super.updateBeforeSave(); if (getCurrentInstallationController().isCurrent(ParseInstallation.this)) { updateTimezone(); updateVersionInfo(); updateDeviceInfo(); updateLocaleIdentifier(); } }
ParseInstallation extends ParseObject { @Override void updateBeforeSave() { super.updateBeforeSave(); if (getCurrentInstallationController().isCurrent(ParseInstallation.this)) { updateTimezone(); updateVersionInfo(); updateDeviceInfo(); updateLocaleIdentifier(); } } }
ParseInstallation extends ParseObject { @Override void updateBeforeSave() { super.updateBeforeSave(); if (getCurrentInstallationController().isCurrent(ParseInstallation.this)) { updateTimezone(); updateVersionInfo(); updateDeviceInfo(); updateLocaleIdentifier(); } } ParseInstallation(); }
ParseInstallation extends ParseObject { @Override void updateBeforeSave() { super.updateBeforeSave(); if (getCurrentInstallationController().isCurrent(ParseInstallation.this)) { updateTimezone(); updateVersionInfo(); updateDeviceInfo(); updateLocaleIdentifier(); } } ParseInstallation(); static ParseInstallation getCurrentInstallation(); static ParseQuery<ParseInstallation> getQuery(); String getInstallationId(); @Override void setObjectId(String newObjectId); String getPushType(); void setPushType(String pushType); String getDeviceToken(); void setDeviceToken(String deviceToken); }
ParseInstallation extends ParseObject { @Override void updateBeforeSave() { super.updateBeforeSave(); if (getCurrentInstallationController().isCurrent(ParseInstallation.this)) { updateTimezone(); updateVersionInfo(); updateDeviceInfo(); updateLocaleIdentifier(); } } ParseInstallation(); static ParseInstallation getCurrentInstallation(); static ParseQuery<ParseInstallation> getQuery(); String getInstallationId(); @Override void setObjectId(String newObjectId); String getPushType(); void setPushType(String pushType); String getDeviceToken(); void setDeviceToken(String deviceToken);  }