Skip to content

Commit 4eb191c

Browse files
author
Josh Deffibaugh
committed
Nulls out the dataFileService connection
1 parent e25d5f6 commit 4eb191c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

android-sdk/src/main/java/com/optimizely/ab/android/sdk/OptimizelyManager.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ public void stop(@NonNull Context context) {
265265
}
266266
if (dataFileServiceConnection != null && dataFileServiceConnection.isBound()) {
267267
context.getApplicationContext().unbindService(dataFileServiceConnection);
268+
dataFileServiceConnection = null;
268269
}
269270

270271
this.optimizelyStartListener = null;
@@ -522,6 +523,7 @@ public void onDataFileLoaded(@Nullable String dataFile) {
522523
@Override
523524
public void onServiceDisconnected(ComponentName arg0) {
524525
bound = false;
526+
optimizelyManager.setDataFileServiceConnection(null);
525527
}
526528

527529
boolean isBound() {

0 commit comments

Comments
 (0)