Skip to content

Commit

Permalink
added listeners
Browse files Browse the repository at this point in the history
  • Loading branch information
aslamanver committed Jul 7, 2022
1 parent 41d75b6 commit 82ac26b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions p2psdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ publish {
repoName = 'android'
groupId = 'com.aslam'
artifactId = 'p2p'
publishVersion = '1.2.1'
publishVersion = '1.2.2'
desc = 'P2P library provides instant integration (PnP) support for WIFI-Direct P2P for any Android projects plus it remembers the recently connected device and reconnects it automatically when it is available.'
website = 'https://github.com/aslamanver/p2p'
}
Expand All @@ -18,8 +18,8 @@ android {
defaultConfig {
minSdkVersion 15
targetSdkVersion 28
versionCode 121
versionName "1.2.1"
versionCode 122
versionName "1.2.2"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}
Expand Down
6 changes: 5 additions & 1 deletion p2psdk/src/main/java/com/aslam/p2p/services/P2PService.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ public void addListener(P2PControllerListener controllerListener) {
}

public void removeListener(P2PControllerListener controllerListener) {
controllerListeners.remove(controllerListener);
if (controllerListener == null) {
controllerListeners.clear();
} else {
controllerListeners.remove(controllerListener);
}
}

@Override
Expand Down

0 comments on commit 82ac26b

Please sign in to comment.