mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Merge pull request #153 from misaochan/fix-illegal-argument
Fix illegal argument
This commit is contained in:
commit
4fe412823b
2 changed files with 8 additions and 1 deletions
|
|
@ -112,6 +112,7 @@ public class ContributionsActivity
|
||||||
setTitle(R.string.title_activity_contributions);
|
setTitle(R.string.title_activity_contributions);
|
||||||
setContentView(R.layout.activity_contributions);
|
setContentView(R.layout.activity_contributions);
|
||||||
|
|
||||||
|
// Activity can call methods in the fragment by acquiring a reference to the Fragment from FragmentManager, using findFragmentById()
|
||||||
contributionsList = (ContributionsListFragment)getSupportFragmentManager().findFragmentById(R.id.contributionsListFragment);
|
contributionsList = (ContributionsListFragment)getSupportFragmentManager().findFragmentById(R.id.contributionsListFragment);
|
||||||
|
|
||||||
getSupportFragmentManager().addOnBackStackChangedListener(this);
|
getSupportFragmentManager().addOnBackStackChangedListener(this);
|
||||||
|
|
@ -133,6 +134,9 @@ public class ContributionsActivity
|
||||||
outState.putBoolean("mediaDetailsVisible", (mediaDetails != null && mediaDetails.isVisible()));
|
outState.putBoolean("mediaDetailsVisible", (mediaDetails != null && mediaDetails.isVisible()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Replace whatever is in the current contributionsFragmentContainer view with mediaDetailPagerFragment,
|
||||||
|
/ and preserve previous state in back stack.
|
||||||
|
/ Called when user selects a contribution. */
|
||||||
private void showDetail(int i) {
|
private void showDetail(int i) {
|
||||||
if(mediaDetails == null ||!mediaDetails.isVisible()) {
|
if(mediaDetails == null ||!mediaDetails.isVisible()) {
|
||||||
mediaDetails = new MediaDetailPagerFragment();
|
mediaDetails = new MediaDetailPagerFragment();
|
||||||
|
|
|
||||||
|
|
@ -86,6 +86,9 @@ public class GPSExtractor {
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Log.w("Image", e);
|
Log.w("Image", e);
|
||||||
return null;
|
return null;
|
||||||
|
} catch (IllegalArgumentException e) {
|
||||||
|
Log.w("Image", e);
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (exif.getAttribute(ExifInterface.TAG_GPS_LATITUDE) == null && useGPS) {
|
if (exif.getAttribute(ExifInterface.TAG_GPS_LATITUDE) == null && useGPS) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue