Remove dabug logs

This commit is contained in:
neslihanturan 2018-12-07 17:45:13 +03:00
parent ccd9e8672c
commit 520c303b53
2 changed files with 1 additions and 25 deletions

View file

@ -186,7 +186,7 @@ public class MainActivity extends AuthenticatedActivity implements FragmentManag
isContributionsFragmentVisible = false; isContributionsFragmentVisible = false;
updateMenuItem(); updateMenuItem();
// Do all permission and GPS related tasks on tab selected, not on create // Do all permission and GPS related tasks on tab selected, not on create
((NearbyFragment)contributionsActivityPagerAdapter.getItem(1)).onTabSelected(onOrientationChanged); ((NearbyFragment)contributionsActivityPagerAdapter.getItem(1)).onTabSelected(onOrientationChanged);
break; break;
default: default:
tabLayout.getTabAt(CONTRIBUTIONS_TAB_POSITION).select(); tabLayout.getTabAt(CONTRIBUTIONS_TAB_POSITION).select();

View file

@ -127,8 +127,6 @@ public class NearbyFragment extends CommonsDaggerSupportFragment
super.onViewCreated(view, savedInstanceState); super.onViewCreated(view, savedInstanceState);
if (savedInstanceState != null) { if (savedInstanceState != null) {
onOrientationChanged = true; onOrientationChanged = true;
Log.d("deneme","onViewCreated");
//refreshView(LOCATION_SIGNIFICANTLY_CHANGED);
} }
} }
@ -220,22 +218,17 @@ public class NearbyFragment extends CommonsDaggerSupportFragment
@Override @Override
public void onLocationChangedSignificantly(LatLng latLng) { public void onLocationChangedSignificantly(LatLng latLng) {
Log.d("deneme","onLocationChangedSignificantly");
refreshView(LOCATION_SIGNIFICANTLY_CHANGED); refreshView(LOCATION_SIGNIFICANTLY_CHANGED);
} }
@Override @Override
public void onLocationChangedSlightly(LatLng latLng) { public void onLocationChangedSlightly(LatLng latLng) {
Log.d("deneme","onLocationChangedSlightly");
refreshView(LOCATION_SLIGHTLY_CHANGED); refreshView(LOCATION_SLIGHTLY_CHANGED);
} }
@Override @Override
public void onLocationChangedMedium(LatLng latLng) { public void onLocationChangedMedium(LatLng latLng) {
Log.d("deneme","onLocationChangedMedium");
// For nearby map actions, there are no differences between 500 meter location change (aka medium change) and slight change // For nearby map actions, there are no differences between 500 meter location change (aka medium change) and slight change
refreshView(LOCATION_SLIGHTLY_CHANGED); refreshView(LOCATION_SLIGHTLY_CHANGED);
} }
@ -244,7 +237,6 @@ public class NearbyFragment extends CommonsDaggerSupportFragment
public void onWikidataEditSuccessful() { public void onWikidataEditSuccessful() {
// Do not refresh nearby map if we are checking other areas with search this area button // Do not refresh nearby map if we are checking other areas with search this area button
if (!nearbyMapFragment.searchThisAreaModeOn) { if (!nearbyMapFragment.searchThisAreaModeOn) {
Log.d("deneme","onWikidateEditSuccesful");
refreshView(MAP_UPDATED); refreshView(MAP_UPDATED);
} }
} }
@ -255,7 +247,6 @@ public class NearbyFragment extends CommonsDaggerSupportFragment
* @param locationChangeType defines if location shanged significantly or slightly * @param locationChangeType defines if location shanged significantly or slightly
*/ */
public void refreshView(LocationServiceManager.LocationChangeType locationChangeType) { public void refreshView(LocationServiceManager.LocationChangeType locationChangeType) {
Log.d("deneme","refreshView");
Timber.d("Refreshing nearby places"); Timber.d("Refreshing nearby places");
if (lockNearbyView) { if (lockNearbyView) {
return; return;
@ -307,7 +298,6 @@ public class NearbyFragment extends CommonsDaggerSupportFragment
bundle.clear(); bundle.clear();
bundle.putString("CurLatLng", gsonCurLatLng); bundle.putString("CurLatLng", gsonCurLatLng);
Log.d("deneme","popuate places is called from here");
placesDisposable = Observable.fromCallable(() -> nearbyController placesDisposable = Observable.fromCallable(() -> nearbyController
.loadAttractionsFromLocation(curLatLng, curLatLng, false, true)) .loadAttractionsFromLocation(curLatLng, curLatLng, false, true))
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
@ -341,7 +331,6 @@ public class NearbyFragment extends CommonsDaggerSupportFragment
* @param customLatLng Custom area which we will search around * @param customLatLng Custom area which we will search around
*/ */
public void refreshViewForCustomLocation(LatLng customLatLng, boolean refreshForCurrentLocation) { public void refreshViewForCustomLocation(LatLng customLatLng, boolean refreshForCurrentLocation) {
Log.d("deneme","refreshViewForCutomLocatiom");
if (customLatLng == null) { if (customLatLng == null) {
// If null, return // If null, return
return; return;
@ -370,7 +359,6 @@ public class NearbyFragment extends CommonsDaggerSupportFragment
* @param nearbyPlacesInfo This variable has place list information and distances. * @param nearbyPlacesInfo This variable has place list information and distances.
*/ */
private void populatePlacesFromCustomLocation(NearbyController.NearbyPlacesInfo nearbyPlacesInfo) { private void populatePlacesFromCustomLocation(NearbyController.NearbyPlacesInfo nearbyPlacesInfo) {
Log.d("deneme","populatePlacesFromCustomLocation");
//NearbyMapFragment nearbyMapFragment = getMapFragment(); //NearbyMapFragment nearbyMapFragment = getMapFragment();
if (nearbyMapFragment != null) { if (nearbyMapFragment != null) {
nearbyMapFragment.searchThisAreaButtonProgressBar.setVisibility(View.GONE); nearbyMapFragment.searchThisAreaButtonProgressBar.setVisibility(View.GONE);
@ -387,8 +375,6 @@ public class NearbyFragment extends CommonsDaggerSupportFragment
} }
private void populatePlaces(NearbyController.NearbyPlacesInfo nearbyPlacesInfo) { private void populatePlaces(NearbyController.NearbyPlacesInfo nearbyPlacesInfo) {
Log.d("deneme","populatePlaces");
Timber.d("Populating nearby places"); Timber.d("Populating nearby places");
List<Place> placeList = nearbyPlacesInfo.placeList; List<Place> placeList = nearbyPlacesInfo.placeList;
LatLng[] boundaryCoordinates = nearbyPlacesInfo.boundaryCoordinates; LatLng[] boundaryCoordinates = nearbyPlacesInfo.boundaryCoordinates;
@ -441,9 +427,6 @@ public class NearbyFragment extends CommonsDaggerSupportFragment
} }
private void updateMapFragment(boolean updateViaButton, boolean isSlightUpdate, @Nullable LatLng customLatLng, @Nullable NearbyController.NearbyPlacesInfo nearbyPlacesInfo) { private void updateMapFragment(boolean updateViaButton, boolean isSlightUpdate, @Nullable LatLng customLatLng, @Nullable NearbyController.NearbyPlacesInfo nearbyPlacesInfo) {
Log.d("deneme","update Map fragment"+" updateViaButton:"+updateViaButton+", isSlightUpdate:"+isSlightUpdate);
Log.d("deneme","update Map fragment status"+" checking around:"+nearbyMapFragment.checkingAround+", searchThisAreaModeOn:"+nearbyMapFragment.searchThisAreaModeOn+", onOrientationChanged:"+onOrientationChanged);
if (nearbyMapFragment.checkingAround) { if (nearbyMapFragment.checkingAround) {
return; return;
} }
@ -470,7 +453,6 @@ public class NearbyFragment extends CommonsDaggerSupportFragment
|| curLatLng.getLatitude() > nearbyMapFragment.boundaryCoordinates[1].getLatitude() || curLatLng.getLatitude() > nearbyMapFragment.boundaryCoordinates[1].getLatitude()
|| curLatLng.getLongitude() < nearbyMapFragment.boundaryCoordinates[2].getLongitude() || curLatLng.getLongitude() < nearbyMapFragment.boundaryCoordinates[2].getLongitude()
|| curLatLng.getLongitude() > nearbyMapFragment.boundaryCoordinates[3].getLongitude())) { || curLatLng.getLongitude() > nearbyMapFragment.boundaryCoordinates[3].getLongitude())) {
Log.d("deneme","boundary is working");
// populate places // populate places
placesDisposable = Observable.fromCallable(() -> nearbyController placesDisposable = Observable.fromCallable(() -> nearbyController
.loadAttractionsFromLocation(curLatLng, curLatLng, false, updateViaButton)) .loadAttractionsFromLocation(curLatLng, curLatLng, false, updateViaButton))
@ -657,7 +639,6 @@ public class NearbyFragment extends CommonsDaggerSupportFragment
Timber.d("Checking location permission"); Timber.d("Checking location permission");
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
if (locationManager.isLocationPermissionGranted()) { if (locationManager.isLocationPermissionGranted()) {
Log.d("deneme","Check location permission if");
refreshView(LOCATION_SIGNIFICANTLY_CHANGED); refreshView(LOCATION_SIGNIFICANTLY_CHANGED);
} else { } else {
// Should we show an explanation? // Should we show an explanation?
@ -684,7 +665,6 @@ public class NearbyFragment extends CommonsDaggerSupportFragment
} }
} }
} else { } else {
Log.d("deneme","Check location permission else");
refreshView(LOCATION_SIGNIFICANTLY_CHANGED); refreshView(LOCATION_SIGNIFICANTLY_CHANGED);
} }
} }
@ -703,10 +683,7 @@ public class NearbyFragment extends CommonsDaggerSupportFragment
public void onReceive(Context context, Intent intent) { public void onReceive(Context context, Intent intent) {
if (snackbar != null) { if (snackbar != null) {
if (NetworkUtils.isInternetConnectionEstablished(getActivity())) { if (NetworkUtils.isInternetConnectionEstablished(getActivity())) {
Log.d("deneme","NetworkUtils.isInternetConnectionEstablished(getActivity())");
if (isNetworkErrorOccured) { if (isNetworkErrorOccured) {
Log.d("deneme","NetworkUtils.isInternetConnectionEstablished(getActivity())");
Log.d("deneme","isNetworkErrorOccured refreshed");
refreshView(LOCATION_SIGNIFICANTLY_CHANGED); refreshView(LOCATION_SIGNIFICANTLY_CHANGED);
isNetworkErrorOccured = false; isNetworkErrorOccured = false;
} }
@ -731,7 +708,6 @@ public class NearbyFragment extends CommonsDaggerSupportFragment
} }
public void onTabSelected(boolean onOrientationChanged) { public void onTabSelected(boolean onOrientationChanged) {
Log.d("deneme***","onTabSelected");
Timber.d("On nearby tab selected"); Timber.d("On nearby tab selected");
this.onOrientationChanged = onOrientationChanged; this.onOrientationChanged = onOrientationChanged;
performNearbyOperations(); performNearbyOperations();