1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-03 17:59:33 +02:00

synchronization with auth branch

This commit is contained in:
Nikolay Pultsin 2014-06-16 09:03:07 +01:00
parent 713ace6592
commit e826632b45
4 changed files with 16 additions and 0 deletions

View file

@ -290,5 +290,6 @@
<service android:name="group.pals.android.lib.ui.filechooser.services.LocalFileProvider" android:exported="false"/> <service android:name="group.pals.android.lib.ui.filechooser.services.LocalFileProvider" android:exported="false"/>
<activity android:name="group.pals.android.lib.ui.filechooser.FileChooserActivity" android:configChanges="orientation|screenSize|keyboard|keyboardHidden" android:theme="@style/FBReader.Dialog" android:exported="false"/> <activity android:name="group.pals.android.lib.ui.filechooser.FileChooserActivity" android:configChanges="orientation|screenSize|keyboard|keyboardHidden" android:theme="@style/FBReader.Dialog" android:exported="false"/>
<activity android:name="org.geometerplus.android.util.FolderListDialogActivity" android:configChanges="orientation|screenSize|keyboard|keyboardHidden" android:theme="@style/FBReader.Dialog" android:exported="false"/> <activity android:name="org.geometerplus.android.util.FolderListDialogActivity" android:configChanges="orientation|screenSize|keyboard|keyboardHidden" android:theme="@style/FBReader.Dialog" android:exported="false"/>
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/>
</application> </application>
</manifest> </manifest>

View file

@ -290,5 +290,6 @@
<service android:name="group.pals.android.lib.ui.filechooser.services.LocalFileProvider" android:exported="false"/> <service android:name="group.pals.android.lib.ui.filechooser.services.LocalFileProvider" android:exported="false"/>
<activity android:name="group.pals.android.lib.ui.filechooser.FileChooserActivity" android:configChanges="orientation|screenSize|keyboard|keyboardHidden" android:theme="@style/FBReader.Dialog" android:exported="false"/> <activity android:name="group.pals.android.lib.ui.filechooser.FileChooserActivity" android:configChanges="orientation|screenSize|keyboard|keyboardHidden" android:theme="@style/FBReader.Dialog" android:exported="false"/>
<activity android:name="org.geometerplus.android.util.FolderListDialogActivity" android:configChanges="orientation|screenSize|keyboard|keyboardHidden" android:theme="@style/FBReader.Dialog" android:exported="false"/> <activity android:name="org.geometerplus.android.util.FolderListDialogActivity" android:configChanges="orientation|screenSize|keyboard|keyboardHidden" android:theme="@style/FBReader.Dialog" android:exported="false"/>
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/>
</application> </application>
</manifest> </manifest>

View file

@ -14,3 +14,4 @@ target=android-14
android.library.reference.1=third-party/AmbilWarna android.library.reference.1=third-party/AmbilWarna
android.library.reference.2=third-party/drag-sort-listview/library android.library.reference.2=third-party/drag-sort-listview/library
android.library.reference.3=third-party/android-filechooser/code android.library.reference.3=third-party/android-filechooser/code
android.library.reference.4=${google.services.lib.dir}

View file

@ -24,6 +24,8 @@ import java.util.Map;
import android.app.Activity; import android.app.Activity;
import android.content.Intent; import android.content.Intent;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GooglePlayServicesUtil;
import org.apache.http.client.CookieStore; import org.apache.http.client.CookieStore;
import org.apache.http.cookie.Cookie; import org.apache.http.cookie.Cookie;
@ -72,6 +74,17 @@ public class BearerAuthenticator extends ZLNetworkManager.BearerAuthenticator {
@Override @Override
protected boolean authenticate(Map<String,String> params) { protected boolean authenticate(Map<String,String> params) {
return GooglePlayServicesUtil.isGooglePlayServicesAvailable(myActivity)
== ConnectionResult.SUCCESS
? authenticateToken(params)
: authenticateWeb(params);
}
private boolean authenticateWeb(Map<String,String> params) {
return false;
}
private boolean authenticateToken(Map<String,String> params) {
return false; return false;
} }
} }