session-android/src/org/thoughtcrime/securesms/mms/LocationSlide.java
Moxie Marlinspike 7b589c4300 TextSecure is now SignalService
// FREEBIE
2016-03-24 14:05:56 -07:00

38 lines
785 B
Java

package org.thoughtcrime.securesms.mms;
import android.content.Context;
import android.net.Uri;
import android.support.annotation.NonNull;
import org.thoughtcrime.securesms.components.location.SignalPlace;
import org.whispersystems.libsignal.util.guava.Optional;
public class LocationSlide extends ImageSlide {
@NonNull
private final SignalPlace place;
public LocationSlide(@NonNull Context context, @NonNull Uri uri, long size, @NonNull SignalPlace place)
{
super(context, uri, size);
this.place = place;
}
@Override
@NonNull
public Optional<String> getBody() {
return Optional.of(place.getDescription());
}
@NonNull
public SignalPlace getPlace() {
return place;
}
@Override
public boolean hasLocation() {
return true;
}
}