Code example for Locale

Methods: equalsgetLanguage

0
            Log.w(TAG, "onSubtypeChanged: " + SubtypeLocale.getSubtypeDisplayName(newSubtype));
        } 
 
        final Locale newLocale = SubtypeLocale.getSubtypeLocale(newSubtype);
        final Locale systemLocale = mResources.getConfiguration().locale;
        final boolean sameLocale = systemLocale.equals(newLocale);
        final boolean sameLanguage = systemLocale.getLanguage().equals(newLocale.getLanguage());
        final boolean implicitlyEnabled =
                mRichImm.checkIfSubtypeBelongsToThisImeAndImplicitlyEnabled(newSubtype);
        mNeedsToDisplayLanguage.updateIsSystemLanguageSameAsInputLanguage(
                sameLocale || (sameLanguage && implicitlyEnabled));
 
        updateShortcutIME(); 
    } 
 
    //////////////////////////// 
    // Shortcut IME functions // 
    //////////////////////////// 
 
    public void switchToShortcutIME(final InputMethodService context) {
Contextual code suggestions in your IDE  Get Codota for Java