63
63
64
64
import static android .app .Activity .RESULT_OK ;
65
65
import static android .content .pm .PackageManager .PERMISSION_GRANTED ;
66
+ import static fr .free .nrw .commons .wikidata .WikidataConstants .WIKIDATA_ENTITY_ID_PREF ;
66
67
67
68
public class NearbyMapFragment extends DaggerFragment {
68
69
@@ -711,15 +712,15 @@ private void passInfoToSheet(Place place) {
711
712
712
713
fabCamera .setOnClickListener (view -> {
713
714
if (fabCamera .isShown ()) {
714
- Timber .d ("Camera button tapped. Image title: " + place .getName () + "Image desc: " + place . getLongDescription ());
715
+ Timber .d ("Camera button tapped. Place: %s" , place .toString ());
715
716
storeSharedPrefs ();
716
717
directUpload .initiateCameraUpload ();
717
718
}
718
719
});
719
720
720
721
fabGallery .setOnClickListener (view -> {
721
722
if (fabGallery .isShown ()) {
722
- Timber .d ("Gallery button tapped. Image title: " + place .getName () + "Image desc: " + place . getLongDescription ());
723
+ Timber .d ("Gallery button tapped. Place: %s" , place .toString ());
723
724
storeSharedPrefs ();
724
725
directUpload .initiateGalleryUpload ();
725
726
}
@@ -731,7 +732,7 @@ void storeSharedPrefs() {
731
732
editor .putString ("Title" , place .getName ());
732
733
editor .putString ("Desc" , place .getLongDescription ());
733
734
editor .putString ("Category" , place .getCategory ());
734
- editor .putString ("WikiDataEntityId" , place .getWikiDataEntityId ());
735
+ editor .putString (WIKIDATA_ENTITY_ID_PREF , place .getWikiDataEntityId ());
735
736
editor .apply ();
736
737
}
737
738
@@ -767,7 +768,7 @@ public void onActivityResult(int requestCode, int resultCode, Intent data) {
767
768
if (resultCode == RESULT_OK ) {
768
769
Timber .d ("OnActivityResult() parameters: Req code: %d Result code: %d Data: %s" ,
769
770
requestCode , resultCode , data );
770
- controller .handleImagePicked (requestCode , data , true , directPrefs .getString ("WikiDataEntityId" , null ));
771
+ controller .handleImagePicked (requestCode , data , true , directPrefs .getString (WIKIDATA_ENTITY_ID_PREF , null ));
771
772
} else {
772
773
Timber .e ("OnActivityResult() parameters: Req code: %d Result code: %d Data: %s" ,
773
774
requestCode , resultCode , data );
0 commit comments