Added classloaders to the Bundles
This commit is contained in:
@@ -148,7 +148,7 @@ public final class AdRecord implements Parcelable{
|
||||
}
|
||||
|
||||
public AdRecord(Parcel in) {
|
||||
final Bundle b = in.readBundle();
|
||||
final Bundle b = in.readBundle(getClass().getClassLoader());
|
||||
mLength = b.getInt("record_length");
|
||||
mType = b.getInt("record_type");
|
||||
mData = b.getByteArray("record_data");
|
||||
@@ -182,7 +182,7 @@ public final class AdRecord implements Parcelable{
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel parcel, int arg1) {
|
||||
final Bundle b = new Bundle();
|
||||
final Bundle b = new Bundle(getClass().getClassLoader());
|
||||
|
||||
b.putInt("record_length", mLength);
|
||||
b.putInt("record_type", mType);
|
||||
|
||||
@@ -26,7 +26,7 @@ public class AdRecordStore implements Parcelable{
|
||||
};
|
||||
|
||||
public AdRecordStore(Parcel in) {
|
||||
final Bundle b = in.readBundle();
|
||||
final Bundle b = in.readBundle(getClass().getClassLoader());
|
||||
mAdRecords = b.getSparseParcelableArray("records_array");
|
||||
mLocalNameComplete = b.getString("local_name_complete");
|
||||
mLocalNameShort = b.getString("local_name_short");
|
||||
|
||||
@@ -32,7 +32,8 @@ public class BluetoothLeDevice implements Parcelable{
|
||||
}
|
||||
|
||||
private BluetoothLeDevice(Parcel in) {
|
||||
final Bundle b = in.readBundle();
|
||||
final Bundle b = in.readBundle(getClass().getClassLoader());
|
||||
|
||||
mDevice = b.getParcelable("bluetooth_device");
|
||||
mRecordStore = b.getParcelable("device_scanrecord_store");
|
||||
mRssi = b.getInt("device_rssi");
|
||||
@@ -111,7 +112,8 @@ public class BluetoothLeDevice implements Parcelable{
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel parcel, int arg1) {
|
||||
final Bundle b = new Bundle();
|
||||
final Bundle b = new Bundle(getClass().getClassLoader());
|
||||
|
||||
b.putByteArray("device_scanrecord", mScanRecord);
|
||||
b.putInt("device_rssi", mRssi);
|
||||
b.putParcelable("bluetooth_device", mDevice);
|
||||
|
||||
Reference in New Issue
Block a user