use of com.secupwn.aimsicd.data.model.DefaultLocation in project Android-IMSI-Catcher-Detector by CellularPrivacy.
the class DefaultDataTransaction method storeDefaultLocation.
private void storeDefaultLocation(Realm realm, int mobileCountryCode, String country, double latitude, double longitude) {
DefaultLocation location = realm.where(DefaultLocation.class).equalTo("mobileCountryCode", mobileCountryCode).equalTo("country", country).findFirst();
if (location == null) {
location = realm.createObject(DefaultLocation.class);
}
location.setCountry(country);
location.setMobileCountryCode(mobileCountryCode);
if (location.getGpsLocation() == null) {
location.setGpsLocation(realm.createObject(GpsLocation.class));
}
location.getGpsLocation().setLatitude(latitude);
location.getGpsLocation().setLongitude(longitude);
}
use of com.secupwn.aimsicd.data.model.DefaultLocation in project Android-IMSI-Catcher-Detector by CellularPrivacy.
the class DefaultLocationAdapter method getView.
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder holder;
if (convertView == null) {
LayoutInflater inflater = LayoutInflater.from(parent.getContext());
convertView = inflater.inflate(R.layout.default_location_items, parent, false);
holder = new ViewHolder(convertView);
} else {
holder = (ViewHolder) convertView.getTag();
}
final DefaultLocation defaultLocation = getItem(position);
holder.updateDisplay(defaultLocation, position);
return convertView;
}
Aggregations