Skip to content

Commit

Permalink
1.1.2
Browse files Browse the repository at this point in the history
Bug fix
  • Loading branch information
adrielcafe committed Aug 25, 2016
1 parent 1ff43bd commit 65cfbf0
Show file tree
Hide file tree
Showing 6 changed files with 3,490 additions and 17 deletions.
8 changes: 1 addition & 7 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ repositories {
}
dependencies {
compile 'com.github.adrielcafe:AndroidOAuth:1.1.1'
compile 'com.github.adrielcafe:AndroidOAuth:1.1.2'
}
```

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'com.android.tools.build:gradle:2.1.3'
}
}

Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon Dec 28 10:00:20 PST 2015
#Thu Aug 25 16:09:46 BRT 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,13 @@ public Dialog onCreateDialog(Bundle savedInstanceState) {
@Override
public void onPageFinished(WebView view, String url) {
super.onPageFinished(view, url);
if (url.contains("code=")) {
getCode(url);
} else if(view.getTitle().contains("code=")){
// Creating a valid URI to extract parameters easily
getCode(view.getTitle().replace("Success ", "http://oauth?"));
if(view != null && url != null) {
if (url.contains("code=")) {
getCode(url);
} else if (view.getTitle().contains("code=")) {
// Creating a valid URI to extract parameters easily
getCode(view.getTitle().replace("Success ", "http://oauth?"));
}
}
}
});
Expand All @@ -68,7 +70,7 @@ public void onPageFinished(WebView view, String url) {
@Override
public void onDismiss(DialogInterface dialog) {
super.onDismiss(dialog);
if (code == null || code.isEmpty()) {
if (callback != null && (code == null || code.isEmpty())) {
callback.onError(new Exception(
"Dialog was dismissed without complete the authentication"));
}
Expand Down
Loading

0 comments on commit 65cfbf0

Please sign in to comment.