Clean up logging.

This commit is contained in:
Greyson Parrelli 2019-07-01 15:12:34 -04:00
parent f15a629731
commit 4508aa7c35
2 changed files with 3 additions and 4 deletions

View File

@ -82,7 +82,7 @@ public final class PlacePickerActivity extends AppCompatActivity {
) { ) {
fusedLocationClient.getLastLocation() fusedLocationClient.getLastLocation()
.addOnFailureListener(e -> { .addOnFailureListener(e -> {
Log.e(TAG, "Failed to get location", e); Log.w(TAG, "Failed to get location", e);
setInitialLocation(PRIME_MERIDIAN); setInitialLocation(PRIME_MERIDIAN);
}) })
.addOnSuccessListener(location -> { .addOnSuccessListener(location -> {
@ -209,14 +209,13 @@ public final class PlacePickerActivity extends AppCompatActivity {
List<Address> result = geocoder.getFromLocation(latLng.latitude, latLng.longitude, 1); List<Address> result = geocoder.getFromLocation(latLng.latitude, latLng.longitude, 1);
return !result.isEmpty() ? result.get(0) : null; return !result.isEmpty() ? result.get(0) : null;
} catch (IOException e) { } catch (IOException e) {
Log.e(TAG, "Failed to get address from location", e); Log.w(TAG, "Failed to get address from location", e);
return null; return null;
} }
} }
@Override @Override
protected void onPostExecute(@Nullable Address address) { protected void onPostExecute(@Nullable Address address) {
Log.d(TAG, String.format("%s", addressToString(address)));
currentAddress = address; currentAddress = address;
if (address != null) { if (address != null) {
bottomSheet.showResult(address.getLatitude(), address.getLongitude(), addressToShortString(address), addressToString(address)); bottomSheet.showResult(address.getLatitude(), address.getLongitude(), addressToShortString(address), addressToString(address));

View File

@ -74,7 +74,7 @@ public final class GenericForegroundService extends Service {
if (iterator.hasNext()) { if (iterator.hasNext()) {
postObligatoryForegroundNotification(iterator.next()); postObligatoryForegroundNotification(iterator.next());
} else { } else {
Log.d(TAG, "Last request. Ending foreground service."); Log.i(TAG, "Last request. Ending foreground service.");
postObligatoryForegroundNotification(lastPosted != null ? lastPosted : DEFAULTS); postObligatoryForegroundNotification(lastPosted != null ? lastPosted : DEFAULTS);
stopForeground(true); stopForeground(true);
stopSelf(); stopSelf();