mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Remove redundant casts
This commit is contained in:
parent
74f9775771
commit
0993858272
6 changed files with 7 additions and 7 deletions
|
|
@ -230,7 +230,7 @@ public class Media implements Parcelable {
|
|||
}
|
||||
|
||||
public Media(Parcel in) {
|
||||
localUri = (Uri)in.readParcelable(Uri.class.getClassLoader());
|
||||
localUri = in.readParcelable(Uri.class.getClassLoader());
|
||||
imageUrl = in.readString();
|
||||
filename = in.readString();
|
||||
description = in.readString();
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ public class Contribution extends Media {
|
|||
|
||||
public Contribution(Parcel in) {
|
||||
super(in);
|
||||
contentUri = (Uri)in.readParcelable(Uri.class.getClassLoader());
|
||||
contentUri = in.readParcelable(Uri.class.getClassLoader());
|
||||
source = in.readString();
|
||||
timestamp = (Date) in.readSerializable();
|
||||
state = in.readInt();
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ public class ContributionController {
|
|||
|
||||
public void loadState(Bundle savedInstanceState) {
|
||||
if(savedInstanceState != null) {
|
||||
lastGeneratedCaptureURI = (Uri) savedInstanceState.getParcelable("lastGeneratedCaptureURI");
|
||||
lastGeneratedCaptureURI = savedInstanceState.getParcelable("lastGeneratedCaptureURI");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ class ContributionsListAdapter extends CursorAdapter {
|
|||
|
||||
if(views.url == null || !views.url.equals(actualUrl)) {
|
||||
if(actualUrl.startsWith("http")) {
|
||||
MediaWikiImageView mwImageView = (MediaWikiImageView)views.imageView;
|
||||
MediaWikiImageView mwImageView = views.imageView;
|
||||
mwImageView.setMedia(contribution, ((CommonsApplication) activity.getApplicationContext()).getImageLoader());
|
||||
// FIXME: For transparent images
|
||||
} else {
|
||||
|
|
@ -65,7 +65,7 @@ class ContributionsListAdapter extends CursorAdapter {
|
|||
@Override
|
||||
public void onLoadingFailed(String imageUri, View view, FailReason failReason) {
|
||||
super.onLoadingFailed(imageUri, view, failReason);
|
||||
MediaWikiImageView mwImageView = (MediaWikiImageView)views.imageView;
|
||||
MediaWikiImageView mwImageView = views.imageView;
|
||||
mwImageView.setMedia(contribution, ((CommonsApplication) activity.getApplicationContext()).getImageLoader());
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ public class NearbyListFragment extends ListFragment implements TaskListener {
|
|||
@Override
|
||||
public View getView(int position, View convertView, ViewGroup parent) {
|
||||
// Get the data item for this position
|
||||
Place place = (Place) getItem(position);
|
||||
Place place = getItem(position);
|
||||
Log.d(TAG, "Place " + place.name);
|
||||
|
||||
// Check if an existing view is being reused, otherwise inflate the view
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ public class ShareActivity
|
|||
Intent intent = getIntent();
|
||||
|
||||
if(intent.getAction().equals(Intent.ACTION_SEND)) {
|
||||
mediaUri = (Uri) intent.getParcelableExtra(Intent.EXTRA_STREAM);
|
||||
mediaUri = intent.getParcelableExtra(Intent.EXTRA_STREAM);
|
||||
if(intent.hasExtra(UploadService.EXTRA_SOURCE)) {
|
||||
source = intent.getStringExtra(UploadService.EXTRA_SOURCE);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue