mirror of
https://github.com/oxen-io/session-android.git
synced 2025-06-09 19:58:34 +00:00
Clean up logging.
This commit is contained in:
parent
f15a629731
commit
4508aa7c35
@ -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));
|
||||||
|
@ -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();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user