HurriyetLocationHelper$2.smali
.class Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper$2;
.super Ljava/lang/Object;
.source "HurriyetLocationHelper.java"
# interfaces
.implements Lcom/google/android/gms/common/api/GoogleApiClient$ConnectionCallbacks;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x0
name = null
.end annotation
# instance fields
.field final synthetic this$0:Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper;
# direct methods
.method constructor <init>(Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper;)V
.registers 2
.line 131
iput-object p1, p0, Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper$2;->this$0:Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper;
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public onConnected(Landroid/os/Bundle;)V
.registers 6
.line 134
invoke-static {}, Lcom/appcore/CoreApp;->isDevEnabled()Z
move-result p1
if-eqz p1, :cond_13
sget-boolean p1, Lhurriyet/mobil/android/hurriyet/HConstants;->LOGS_ENABLED_FOR_LOCATION_SERVICES:Z
if-eqz p1, :cond_13
const-string p1, "Location services : Connection established"
.line 135
filled-new-array {p1}, [Ljava/lang/String;
move-result-object p1
invoke-static {p1}, Lcom/appcore/utils/L;->wtf([Ljava/lang/String;)V
.line 137
:cond_13
invoke-static {}, Lhurriyet/mobil/android/hurriyet/HApp;->getAppContext()Landroid/content/Context;
move-result-object p1
const-string v0, "android.permission.ACCESS_FINE_LOCATION"
invoke-static {p1, v0}, Landroidx/core/app/ActivityCompat;->checkSelfPermission(Landroid/content/Context;Ljava/lang/String;)I
move-result p1
if-eqz p1, :cond_2c
.line 138
invoke-static {}, Lhurriyet/mobil/android/hurriyet/HApp;->getAppContext()Landroid/content/Context;
move-result-object p1
const-string v0, "android.permission.ACCESS_COARSE_LOCATION"
invoke-static {p1, v0}, Landroidx/core/app/ActivityCompat;->checkSelfPermission(Landroid/content/Context;Ljava/lang/String;)I
move-result p1
if-eqz p1, :cond_2c
return-void
.line 141
:cond_2c
iget-object p1, p0, Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper$2;->this$0:Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper;
sget-object v0, Lcom/google/android/gms/location/LocationServices;->FusedLocationApi:Lcom/google/android/gms/location/FusedLocationProviderApi;
iget-object v1, p0, Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper$2;->this$0:Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper;
# getter for: Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper;->mGoogleApiClient:Lcom/google/android/gms/common/api/GoogleApiClient;
invoke-static {v1}, Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper;->access$000(Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper;)Lcom/google/android/gms/common/api/GoogleApiClient;
move-result-object v1
invoke-interface {v0, v1}, Lcom/google/android/gms/location/FusedLocationProviderApi;->getLastLocation(Lcom/google/android/gms/common/api/GoogleApiClient;)Landroid/location/Location;
move-result-object v0
# setter for: Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper;->mLastLocation:Landroid/location/Location;
invoke-static {p1, v0}, Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper;->access$102(Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper;Landroid/location/Location;)Landroid/location/Location;
.line 142
iget-object p1, p0, Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper$2;->this$0:Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper;
# getter for: Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper;->mLastLocation:Landroid/location/Location;
invoke-static {p1}, Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper;->access$100(Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper;)Landroid/location/Location;
move-result-object p1
const/4 v0, 0x1
if-eqz p1, :cond_8e
.line 143
invoke-static {}, Lcom/appcore/CoreApp;->isDevEnabled()Z
move-result p1
if-eqz p1, :cond_c0
sget-boolean p1, Lhurriyet/mobil/android/hurriyet/HConstants;->LOGS_ENABLED_FOR_LOCATION_SERVICES:Z
if-eqz p1, :cond_c0
new-array p1, v0, [Ljava/lang/String;
const/4 v0, 0x0
.line 144
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "Location services : Location received \n Latitude :"
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v2, p0, Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper$2;->this$0:Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper;
.line 145
# getter for: Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper;->mLastLocation:Landroid/location/Location;
invoke-static {v2}, Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper;->access$100(Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper;)Landroid/location/Location;
move-result-object v2
invoke-virtual {v2}, Landroid/location/Location;->getLatitude()D
move-result-wide v2
invoke-static {v2, v3}, Ljava/lang/String;->valueOf(D)Ljava/lang/String;
move-result-object v2
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v2, "\n Longitude:"
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v2, p0, Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper$2;->this$0:Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper;
.line 146
# getter for: Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper;->mLastLocation:Landroid/location/Location;
invoke-static {v2}, Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper;->access$100(Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper;)Landroid/location/Location;
move-result-object v2
invoke-virtual {v2}, Landroid/location/Location;->getLongitude()D
move-result-wide v2
invoke-static {v2, v3}, Ljava/lang/String;->valueOf(D)Ljava/lang/String;
move-result-object v2
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
aput-object v1, p1, v0
.line 144
invoke-static {p1}, Lcom/appcore/utils/L;->wtf([Ljava/lang/String;)V
goto :goto_c0
.line 149
:cond_8e
invoke-static {}, Lcom/appcore/CoreApp;->isDevEnabled()Z
move-result p1
if-eqz p1, :cond_a1
sget-boolean p1, Lhurriyet/mobil/android/hurriyet/HConstants;->LOGS_ENABLED_FOR_LOCATION_SERVICES:Z
if-eqz p1, :cond_a1
const-string p1, "Location services : Could not found location"
.line 150
filled-new-array {p1}, [Ljava/lang/String;
move-result-object p1
invoke-static {p1}, Lcom/appcore/utils/L;->wtf([Ljava/lang/String;)V
.line 152
:cond_a1
iget-object p1, p0, Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper$2;->this$0:Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper;
# invokes: Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper;->isLocationEnabled()Z
invoke-static {p1}, Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper;->access$200(Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper;)Z
move-result p1
if-eqz p1, :cond_af
.line 153
iget-object p1, p0, Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper$2;->this$0:Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper;
# invokes: Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper;->requestLocationUpdates(Z)V
invoke-static {p1, v0}, Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper;->access$300(Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper;Z)V
goto :goto_c0
.line 154
:cond_af
iget-object p1, p0, Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper$2;->this$0:Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper;
# getter for: Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper;->mCityNameListener:Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper$CityNameListener;
invoke-static {p1}, Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper;->access$400(Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper;)Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper$CityNameListener;
move-result-object p1
if-eqz p1, :cond_c0
.line 155
iget-object p1, p0, Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper$2;->this$0:Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper;
# getter for: Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper;->mCityNameListener:Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper$CityNameListener;
invoke-static {p1}, Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper;->access$400(Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper;)Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper$CityNameListener;
move-result-object p1
invoke-interface {p1}, Lhurriyet/mobil/android/hurriyet/utils/HurriyetLocationHelper$CityNameListener;->onRequiresRetry()V
:cond_c0
:goto_c0
return-void
.end method
.method public onConnectionSuspended(I)V
.registers 2
.line 162
invoke-static {}, Lcom/appcore/CoreApp;->isDevEnabled()Z
move-result p1
if-eqz p1, :cond_13
sget-boolean p1, Lhurriyet/mobil/android/hurriyet/HConstants;->LOGS_ENABLED_FOR_LOCATION_SERVICES:Z
if-eqz p1, :cond_13
const-string p1, "Location services : Connection suspended"
.line 163
filled-new-array {p1}, [Ljava/lang/String;
move-result-object p1
invoke-static {p1}, Lcom/appcore/utils/L;->wtf([Ljava/lang/String;)V
:cond_13
return-void
.end method