remove parcelabel from VideoInfoItem
This commit is contained in:
parent
210f2ef452
commit
f54d8d318a
2 changed files with 1 additions and 68 deletions
|
@ -201,26 +201,6 @@ public class VideoItemListActivity extends AppCompatActivity
|
||||||
.findFragmentById(R.id.videoitem_list);
|
.findFragmentById(R.id.videoitem_list);
|
||||||
listFragment.setStreamingService(streamingService);
|
listFragment.setStreamingService(streamingService);
|
||||||
|
|
||||||
Bundle arguments = getIntent().getExtras();
|
|
||||||
|
|
||||||
if(arguments != null) {
|
|
||||||
//Parcelable[] p = arguments.getParcelableArray(VIDEO_INFO_ITEMS);
|
|
||||||
ArrayList<VideoPreviewInfo> p = arguments.getParcelableArrayList(VIDEO_INFO_ITEMS);
|
|
||||||
if(p != null) {
|
|
||||||
mode = PRESENT_VIDEOS_MODE;
|
|
||||||
try {
|
|
||||||
//noinspection ConstantConditions
|
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
|
||||||
} catch (NullPointerException e) {
|
|
||||||
Log.e(TAG, "Could not get SupportActionBar");
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
|
|
||||||
listFragment.present(p);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if(savedInstanceState != null
|
if(savedInstanceState != null
|
||||||
&& mode != PRESENT_VIDEOS_MODE) {
|
&& mode != PRESENT_VIDEOS_MODE) {
|
||||||
searchQuery = savedInstanceState.getString(QUERY);
|
searchQuery = savedInstanceState.getString(QUERY);
|
||||||
|
|
|
@ -25,53 +25,6 @@ import android.os.Parcelable;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**Info object for previews of unopened videos, eg search results, related videos*/
|
/**Info object for previews of unopened videos, eg search results, related videos*/
|
||||||
public class VideoPreviewInfo extends AbstractVideoInfo implements Parcelable {
|
public class VideoPreviewInfo extends AbstractVideoInfo {
|
||||||
public String duration = "";
|
public String duration = "";
|
||||||
@SuppressWarnings("WeakerAccess")
|
|
||||||
protected VideoPreviewInfo(Parcel in) {
|
|
||||||
id = in.readString();
|
|
||||||
title = in.readString();
|
|
||||||
uploader = in.readString();
|
|
||||||
duration = in.readString();
|
|
||||||
thumbnail_url = in.readString();
|
|
||||||
thumbnail = (Bitmap) in.readValue(Bitmap.class.getClassLoader());
|
|
||||||
webpage_url = in.readString();
|
|
||||||
upload_date = in.readString();
|
|
||||||
view_count = in.readLong();
|
|
||||||
}
|
|
||||||
|
|
||||||
public VideoPreviewInfo() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int describeContents() {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void writeToParcel(Parcel dest, int flags) {
|
|
||||||
dest.writeString(id);
|
|
||||||
dest.writeString(title);
|
|
||||||
dest.writeString(uploader);
|
|
||||||
dest.writeString(duration);
|
|
||||||
dest.writeString(thumbnail_url);
|
|
||||||
dest.writeValue(thumbnail);
|
|
||||||
dest.writeString(webpage_url);
|
|
||||||
dest.writeString(upload_date);
|
|
||||||
dest.writeLong(view_count);
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
|
||||||
public static final Parcelable.Creator<VideoPreviewInfo> CREATOR = new Parcelable.Creator<VideoPreviewInfo>() {
|
|
||||||
@Override
|
|
||||||
public VideoPreviewInfo createFromParcel(Parcel in) {
|
|
||||||
return new VideoPreviewInfo(in);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public VideoPreviewInfo[] newArray(int size) {
|
|
||||||
return new VideoPreviewInfo[size];
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
}
|
Loading…
Reference in a new issue