@TargetApi(Build.VERSION_CODES.FROYO)
    @Nullable
    public static CharSequence[] optCharSequenceArray(@Nullable Bundle bundle, @Nullable String key, @Nullable CharSequence[] fallback) {
        if (bundle == null) {
            return fallback;
        }
        return bundle.getCharSequenceArray(key);
    }
@ TargetApi ( Build . VERSION_CODES . FROYO ) @ Nullable public static CharSequence [ ] optCharSequenceArray ( @ Nullable Bundle bundle , @ Nullable String key , @ Nullable CharSequence [ ] fallback ) { if ( bundle == null ) { return fallback ; } return bundle . getCharSequenceArray ( key ) ; }
Returns a optional {@link CharSequence} array value. In other words, returns the value mapped by key if it exists and is a {@link CharSequence} array.
The bundle argument is allowed to be {@code null}. If the bundle is null, this method returns null.
@param bundle a bundle. If the bundle is null, this method will return null.
@param key a key for the value.
@param fallback fallback value.
@return a {@link CharSequence} array value if exists, null otherwise.
@see android.os.Bundle#getCharSequenceArray(String)