mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-05 10:49:24 +02:00
browser topup is back; topup methods sorting
This commit is contained in:
parent
81bd86d200
commit
6199b6ad3c
8 changed files with 86 additions and 31 deletions
|
@ -46,7 +46,6 @@ abstract class Util implements UserRegistrationConstants {
|
|||
"android.fbreader.action.NETWORK_LIBRARY_REGISTER";
|
||||
static final String TOPUP_ACTION =
|
||||
"android.fbreader.action.network.TOPUP";
|
||||
static final String BROWSER_ACTION_ID = "browser";
|
||||
|
||||
private static boolean testService(Activity activity, String action, String url) {
|
||||
return url != null && PackageUtil.canBeStarted(activity, new Intent(action, Uri.parse(url)), true);
|
||||
|
@ -198,14 +197,6 @@ abstract class Util implements UserRegistrationConstants {
|
|||
return infos != null && infos.size() > 0;
|
||||
}
|
||||
|
||||
static boolean isTopupSupported(Activity activity, INetworkLink link, String actionId) {
|
||||
if (BROWSER_ACTION_ID.equals(actionId)) {
|
||||
return link.getUrl(UrlInfo.Type.TopUp) != null;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static void runTopupDialog(Activity activity, INetworkLink link, String url) {
|
||||
try {
|
||||
final Intent intent = new Intent(TOPUP_ACTION, Uri.parse(url));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue