mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-05 02:39:23 +02:00
code cleanup
This commit is contained in:
parent
2f9c46e4cc
commit
1f8bf72dae
2 changed files with 1 additions and 6 deletions
|
@ -146,7 +146,7 @@ public class AuthenticationActivity extends Activity {
|
||||||
myCustomAuthentication = intent.getBooleanExtra(CUSTOM_AUTH_KEY, false);
|
myCustomAuthentication = intent.getBooleanExtra(CUSTOM_AUTH_KEY, false);
|
||||||
|
|
||||||
if (myCustomAuthentication) {
|
if (myCustomAuthentication) {
|
||||||
myLink = Util.linkByIntent(intent);
|
myLink = NetworkLibrary.Instance().getLinkByUrl(String.valueOf(intent.getData()));
|
||||||
if (myLink == null) {
|
if (myLink == null) {
|
||||||
finish();
|
finish();
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -42,11 +42,6 @@ public abstract class Util implements UserRegistrationConstants {
|
||||||
private static final String AUTO_SIGNIN_ACTION =
|
private static final String AUTO_SIGNIN_ACTION =
|
||||||
"android.fbreader.action.NETWORK_LIBRARY_AUTOSIGNIN";
|
"android.fbreader.action.NETWORK_LIBRARY_AUTOSIGNIN";
|
||||||
|
|
||||||
static INetworkLink linkByIntent(Intent intent) {
|
|
||||||
final Uri uri = intent.getData();
|
|
||||||
return uri != null ? NetworkLibrary.Instance().getLinkByUrl(uri.toString()) : null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Intent intentByLink(Intent intent, INetworkLink link) {
|
public static Intent intentByLink(Intent intent, INetworkLink link) {
|
||||||
if (link != null) {
|
if (link != null) {
|
||||||
intent.setData(Uri.parse(link.getUrl(UrlInfo.Type.Catalog)));
|
intent.setData(Uri.parse(link.getUrl(UrlInfo.Type.Catalog)));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue