Skip to content
This repository has been archived by the owner on Aug 3, 2019. It is now read-only.

Check if login listener is not null to avoid null pointer exceptions #398

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions simple-fb/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ ext {
allLicenses = ["Apache-2.0"]
}

apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'
//apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
//apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'

buildscript {
repositories {
Expand All @@ -65,8 +65,8 @@ allprojects {
}

dependencies {
compile 'com.facebook.android:facebook-android-sdk:4.7.+'
// compile project(':facebook')
compile 'com.google.code.gson:gson:1.7.2'
compile 'com.android.support:support-v4:23.0.1'
compile 'com.facebook.android:facebook-android-sdk:4.11.0'
compile 'com.google.code.gson:gson:2.4'
}

Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,16 @@ public void onSuccess(LoginResult loginResult) {

@Override
public void onCancel() {
loginListener.onFail("User canceled the permissions dialog");
if (loginListener != null) {
loginListener.onFail("User canceled the permissions dialog");
}
}

@Override
public void onError(FacebookException e) {
loginListener.onException(e);
if (loginListener != null) {
loginListener.onException(e);
}
}
}

Expand Down