diff options
author | Tobrun <tobrun.van.nuland@gmail.com> | 2018-09-25 10:53:38 +0200 |
---|---|---|
committer | Tobrun <tobrun@mapbox.com> | 2018-09-25 14:53:30 +0200 |
commit | c713d2202d5a3e4db5f2135f6e6d566393373967 (patch) | |
tree | cf726916844503c2f09990b36e1f4b5bb5bf890f | |
parent | f3164d0894013bb88cd815ae1e23f9023df0022b (diff) | |
download | qtlocation-mapboxgl-c713d2202d5a3e4db5f2135f6e6d566393373967.tar.gz |
[android] - test app activity leak fix for ManualLocationUpdatesActivity
-rw-r--r-- | platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/location/ManualLocationUpdatesActivity.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/location/ManualLocationUpdatesActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/location/ManualLocationUpdatesActivity.java index 2651137273..c5dd43dae2 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/location/ManualLocationUpdatesActivity.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/location/ManualLocationUpdatesActivity.java @@ -64,7 +64,7 @@ public class ManualLocationUpdatesActivity extends AppCompatActivity implements fabManualUpdate.setEnabled(true); fabManualUpdate.setAlpha(1f); Toast.makeText( - ManualLocationUpdatesActivity.this, + ManualLocationUpdatesActivity.this.getApplicationContext(), "LocationEngine disable, use manual updates", Toast.LENGTH_SHORT).show(); } else { @@ -72,7 +72,7 @@ public class ManualLocationUpdatesActivity extends AppCompatActivity implements fabManualUpdate.setEnabled(false); fabManualUpdate.setAlpha(0.5f); Toast.makeText( - ManualLocationUpdatesActivity.this, + ManualLocationUpdatesActivity.this.getApplicationContext(), "LocationEngine enabled", Toast.LENGTH_SHORT).show(); } @@ -89,8 +89,10 @@ public class ManualLocationUpdatesActivity extends AppCompatActivity implements permissionsManager = new PermissionsManager(new PermissionsListener() { @Override public void onExplanationNeeded(List<String> permissionsToExplain) { - Toast.makeText(ManualLocationUpdatesActivity.this, "You need to accept location permissions.", - Toast.LENGTH_SHORT).show(); + Toast.makeText(ManualLocationUpdatesActivity.this.getApplicationContext(), + "You need to accept location permissions.", + Toast.LENGTH_SHORT + ).show(); } @Override |