android.os.Bundle#getShort ( )源码实例Demo

下面列出了android.os.Bundle#getShort ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: android_9.0.0_r45   文件: NfcA.java
/** @hide */
public NfcA(Tag tag) throws RemoteException {
    super(tag, TagTechnology.NFC_A);
    Bundle extras = tag.getTechExtras(TagTechnology.NFC_A);
    mSak = extras.getShort(EXTRA_SAK);
    mAtqa = extras.getByteArray(EXTRA_ATQA);
}
 
public static TestClassBundled unbundle(Bundle bundle, Gson gson) {
    return new AutoValue_TestClassBundled(
            bundle,
            bundle.getByte("some_byte"),
            bundle.getBoolean("some_boolean"),
            bundle.getShort("some_short"),
            bundle.getInt("some_int"),
            bundle.getLong("some_long"),
            bundle.getChar("some_char"),
            bundle.getFloat("some_float"),
            bundle.getDouble("some_double"),
            bundle.getString("some_string"),
            bundle.getCharSequence("some_char_sequence"),
            bundle.getParcelable("some_parcelable"),
            bundle.getParcelableArrayList("some_parcelable_array_list"),
            bundle.getSparseParcelableArray("some_parcelable_sparse_array"),
            bundle.getSerializable("some_serializable"),
            bundle.getIntegerArrayList("some_integer_array_list"),
            bundle.getStringArrayList("some_string_array_list"),
            bundle.getCharSequenceArrayList("some_char_sequence_array_list"),
            bundle.getByteArray("some_byte_array"),
            bundle.getShortArray("some_short_array"),
            bundle.getCharArray("some_char_array"),
            bundle.getFloatArray("some_float_array"),
            gson.fromJson(bundle.getString("some_unknown_object"), new com.google.common.reflect.TypeToken<UnknownObject>(){}.getType()),
            gson.fromJson(bundle.getString("some_unknown_object_list"), new com.google.common.reflect.TypeToken<ArrayList<UnknownObject>>(){}.getType()),
            gson.fromJson(bundle.getString("test_enum"), new com.google.common.reflect.TypeToken<TestEnum>(){}.getType()));
}
 
源代码3 项目: external-nfc-api   文件: NfcAImpl.java
public NfcAImpl(TagImpl tag) throws RemoteException {
    this.delegate = new BasicTagTechnologyImpl(tag, TagTechnology.NFC_A);

    Bundle extras = tag.getTechExtras(TagTechnology.NFC_A);
    mSak = extras.getShort(EXTRA_SAK);
    mAtqa = extras.getByteArray(EXTRA_ATQA);
}
 
源代码4 项目: android-state   文件: InjectionHelper.java
public short getShort(Bundle state, String key) {
    return state.getShort(key + mBaseKey);
}
 
源代码5 项目: android-state   文件: InjectionHelper.java
public Short getBoxedShort(Bundle state, String key) {
    if (state.containsKey(key + mBaseKey)) {
        return state.getShort(key + mBaseKey);
    }
    return null;
}
 
源代码6 项目: CPOrm   文件: ShortType.java
@Override
public Object getColumnValue(Bundle bundle, String columnName) {

    return bundle.getShort(columnName);
}