正在查看: Clash Legends v0.0.1 应用的 AcsInterface.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Clash Legends v0.0.1 应用的 AcsInterface.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package in.juspay.godel.ui;
import android.database.Cursor;
import android.provider.ContactsContract;
import android.webkit.JavascriptInterface;
import androidx.core.content.PermissionChecker;
import in.juspay.godel.analytics.Event;
import in.juspay.godel.analytics.GodelTracker;
import in.juspay.godel.core.ConfigService;
import in.juspay.godel.core.Constants;
import in.juspay.godel.core.FnInvokerThread;
import in.juspay.godel.core.JuspayDropoutAnalyser;
import in.juspay.godel.core.OtpSms;
import in.juspay.godel.core.WebLabService;
import in.juspay.godel.util.JuspayLogger;
import in.juspay.godel.util.KeyValueStore;
import in.juspay.godel.util.OtpUtil;
import in.juspay.godel.util.SessionInfo;
import java.util.Date;
import okhttp3.HttpUrl;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public class AcsInterface {
private static final String b = AcsInterface.class.getName();
JuspayBrowserFragment a;
private KeyValueStore c;
private boolean d;
public AcsInterface(JuspayBrowserFragment browserFragment) {
this.a = browserFragment;
this.c = new KeyValueStore(browserFragment.c());
}
@JavascriptInterface
public void showToast(String toast) {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.SHOW_TOAST, new String[]{toast}));
}
@JavascriptInterface
public void createUber(String eventName, String uberProps, String data) {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.CREATE_UBER, new String[]{eventName, uberProps, data}));
}
@JavascriptInterface
public void sendDataToUber(String data) {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.SEND_DATA_TO_UBER, new String[]{data}));
}
@JavascriptInterface
public boolean isShowingUber() {
if (this.a.l != null) {
return this.a.l.f();
}
return false;
}
@JavascriptInterface
public void changeUberDimensions(int width, int height) {
if (this.a.l != null) {
this.a.l.a(width, height);
}
}
@JavascriptInterface
public boolean isShowingUber(String type) {
if (this.a.l != null) {
return this.a.l.a(type);
}
return false;
}
@JavascriptInterface
public String getCurrentUberProps() {
if (this.a.l != null) {
return this.a.l.g();
}
return null;
}
@JavascriptInterface
public void changeUberStickTo(int stickTo) {
if (this.a.l != null) {
this.a.l.a(stickTo);
}
}
@JavascriptInterface
public void changeUberGravity(int gravity) {
if (this.a.l != null) {
this.a.l.b(gravity);
}
}
@JavascriptInterface
public void showUber(boolean showFloat) {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.SHOW_UBER, new String[]{String.valueOf(showFloat)}));
}
@JavascriptInterface
public void dismissUber() {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.DISMISS_UBER, new String[0]));
}
@JavascriptInterface
public void destroyUber() {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.DESTROY_UBER, new String[0]));
}
@JavascriptInterface
public void showRetryOptions() {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.SHOW_RETRY_OPTIONS, new String[0]));
}
@JavascriptInterface
public int getPxForDp(int dp, boolean isX) {
return this.a.a(dp, isX);
}
@JavascriptInterface
public void resetOtpFragmentToWaitingState() {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.RESET_OTP_FRAGMENT_TO_WAITING_STATE, new String[0]));
}
@JavascriptInterface
public void updateState(String state) {
this.a.C(state);
}
@JavascriptInterface
public void scrollTo(String x, String y) {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.SCROLL_TO, new String[]{x, y}));
}
@JavascriptInterface
public void setBank(String bank) {
this.a.H(bank);
}
@JavascriptInterface
public void enableRegenerateOTP() {
this.a.aC();
}
@JavascriptInterface
public void disableRegenerateOTP() {
this.a.aL();
}
@JavascriptInterface
public void showReloadDialog() {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.SHOW_RELOAD_DIALOG, new String[0]));
}
@JavascriptInterface
public String getGodelInitParams() {
return this.a.aa();
}
@JavascriptInterface
public void reload() {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.RELOAD, new String[0]));
}
@JavascriptInterface
public void goBack() {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.GO_BACK, new String[0]));
}
@JavascriptInterface
public void goForward() {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.GO_FORWARD, new String[0]));
}
@JavascriptInterface
public boolean canGoForward() {
return false;
}
@JavascriptInterface
public boolean canGoBack() {
return false;
}
@JavascriptInterface
public void loadFirstPage() {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.LOAD_FIRST_PAGE, new String[0]));
}
@JavascriptInterface
public void stopLoading() {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.STOP_LOADING, new String[0]));
}
@JavascriptInterface
public void loadUrl(String url) {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.LOAD_URL, new String[]{url}));
}
@JavascriptInterface
public void postUrl(String url, JSONObject postData) {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.POST_URL, new String[]{url, postData.toString()}));
}
@JavascriptInterface
public void dismissReloadDialog() {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.DISMISS_RELOAD_DIALOG, new String[0]));
}
@JavascriptInterface
public String getUrl() {
return null;
}
@JavascriptInterface
public String getCurrentUrl() {
return this.a.getCurrentUrlAcs();
}
@JavascriptInterface
public boolean isFirstPage() {
return this.a.M();
}
@JavascriptInterface
public String getPastUrls() {
return this.a.L();
}
@JavascriptInterface
public int getPastUrlsSize() {
return this.a.K();
}
@JavascriptInterface
public boolean isOnline() {
return this.a.N();
}
@JavascriptInterface
public void setNetworkListener(boolean shouldStartMonitoring) {
this.a.h(shouldStartMonitoring);
}
@JavascriptInterface
public void resetSmsReadTime() {
this.a.a(Long.valueOf(System.currentTimeMillis()));
}
@JavascriptInterface
public void shoutOut(String html) {
JuspayLogger.b(b, html);
}
@JavascriptInterface
public void trackJsError(String stackTrace) {
JuspayLogger.e(b, stackTrace);
GodelTracker.getInstance().a(new Date(), stackTrace);
}
@JavascriptInterface
public void showCancelTransactionDialog() {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.SHOW_CANCEL_TRANSACTION_DIALOG, new String[0]));
}
@JavascriptInterface
public void cancelCurrentTransaction() {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.CANCEL_CURRENT_TRANSACTION, new String[0]));
}
@JavascriptInterface
public void showCustomHelpDialog(String title, String body) {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.SHOW_CUSTOM_HELP_DIALOG, new String[]{title, body}));
}
@JavascriptInterface
public void setPollingForSmsEnabled(boolean val) {
this.a.m(val);
}
@JavascriptInterface
public void setPollingForSmsEnabled(boolean val, int pollingDelay, int pollingInterval) {
this.a.a(val, pollingDelay, pollingInterval);
}
@JavascriptInterface
public void trackFallback(String reason) {
JuspayLogger.b(b, "Backing off: " + reason);
GodelTracker.getInstance().a(new Event().a(Event.Category.ACS).a(Event.Action.FALLBACK).c("reason").d(reason));
}
@JavascriptInterface
public void setPhoneNumberForSms(String phoneNumber) {
}
@JavascriptInterface
public boolean canSendSms() {
return this.a.aF();
}
@JavascriptInterface
public void setLastFourDigitsOfCard(String lastFourDigitsOfCard) {
this.a.t().setLastFourDigitsOfCard(lastFourDigitsOfCard);
}
@JavascriptInterface
public void setPaymentStatus(String paymentStatus) {
SessionInfo.getInstance().d(paymentStatus);
}
@JavascriptInterface
public void setLatestPageStatus(String status) {
GodelTracker.getInstance().a(status);
}
@JavascriptInterface
public String getLatestPageStatus() {
return GodelTracker.getInstance().b();
}
@JavascriptInterface
public void setLatestFragmentName(String name) {
GodelTracker.getInstance().b(name);
}
@JavascriptInterface
public String getLatestFragmentName() {
return GodelTracker.getInstance().c();
}
@JavascriptInterface
public void setLatestPPFError(String latestPPFError) {
GodelTracker.getInstance().c(latestPPFError);
}
@JavascriptInterface
public String getLatestPPFError() {
return GodelTracker.getInstance().d();
}
@JavascriptInterface
public boolean hasNetworkDisconnected() {
return GodelTracker.getInstance().e();
}
@JavascriptInterface
public boolean hasBackPressed() {
return GodelTracker.getInstance().f();
}
@JavascriptInterface
public boolean hasOtpDetected() {
return GodelTracker.getInstance().g();
}
@JavascriptInterface
public String getLastFourDigitsOfCard() {
return this.a.t().getLastFourDigitsOfCard();
}
@JavascriptInterface
public void requestKeyboardShow() {
if (ConfigService.getInstance().checkKeyboardEnabled("generic_keyboard")) {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.REQUEST_KEYBOARD_SHOW, new String[]{"acs"}));
}
}
@JavascriptInterface
public void requestKeyboardShow(String caller) {
if (ConfigService.getInstance().checkKeyboardEnabled("generic_keyboard")) {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.REQUEST_KEYBOARD_SHOW, new String[]{caller}));
}
}
@JavascriptInterface
public void requestNumericKeyboardShow() {
if (ConfigService.getInstance().checkKeyboardEnabled("numeric_keyboard")) {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.REQUEST_NUMERIC_KEYBOARD_SHOW, new String[]{"acs"}));
}
}
@JavascriptInterface
public void requestNumericKeyboardShow(String caller) {
if (ConfigService.getInstance().checkKeyboardEnabled("numeric_keyboard")) {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.REQUEST_NUMERIC_KEYBOARD_SHOW, new String[]{caller}));
}
}
@JavascriptInterface
public void requestPasswordKeyboardShow() {
if (ConfigService.getInstance().checkKeyboardEnabled("password_keyboard")) {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.REQUEST_PASSWORD_KEYBOARD_SHOW, new String[]{"acs"}));
}
}
@JavascriptInterface
public void requestPasswordKeyboardShow(String caller) {
if (ConfigService.getInstance().checkKeyboardEnabled("password_keyboard")) {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.REQUEST_PASSWORD_KEYBOARD_SHOW, new String[]{caller}));
}
}
@JavascriptInterface
public void requestKeyboardHide() {
if (ConfigService.getInstance().checkKeyboardEnabled("keyboard_hide")) {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.REQUEST_KEYBOARD_HIDE, new String[]{"acs"}));
}
}
@JavascriptInterface
public void requestKeyboardHide(String caller) {
if (ConfigService.getInstance().checkKeyboardEnabled("keyboard_hide")) {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.REQUEST_KEYBOARD_HIDE, new String[]{caller}));
}
}
@JavascriptInterface
public void disableOTPOption() {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.DISABLE_OTP_OPTION, new String[0]));
}
@JavascriptInterface
public void disablePasswordOption() {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.DISABLE_PASSWORD_OPTION, new String[0]));
}
@JavascriptInterface
public String getBankCustomerId() {
return JuspayBrowserFragment.d() ? this.a.F(this.a.t().getBank() + "_customerId") : "";
}
@JavascriptInterface
public void onCustomerIdSubmit(String customerId) {
if (JuspayBrowserFragment.d()) {
this.a.E(customerId);
}
}
@JavascriptInterface
public void setCardBrand(String cardBrand) {
this.a.t().setCardBrand(cardBrand);
}
@JavascriptInterface
public void setCitiBankOtpSms(String smsString) {
this.a.d(smsString);
}
@JavascriptInterface
public void setStatusTextOnEvent(String event, String statusText) {
if (!this.d) {
JuspayLogger.f(b, "Juspay Secure Footer is deprecated. Not Processing - [" + event + "], [" + statusText + "]");
this.d = true;
}
}
@JavascriptInterface
public void setExcludeURLs(String urls) {
}
@JavascriptInterface
public void showNetbankingDefaultFragment() {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.SHOW_NETBANKING_DEFAULT_FRAGMENT, new String[0]));
}
@JavascriptInterface
public void showNetbankingCustomerIdFragment(String buttonText) {
if (JuspayBrowserFragment.d()) {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.SHOW_NETBANKING_CUSTOMERID_FRAGMENT, new String[]{buttonText}));
} else {
showNetbankingDefaultFragment();
}
}
@JavascriptInterface
public void showPasswordHelperFragment() {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.SHOW_PASSWORD_HELPER_FRAGMENT, new String[0]));
}
@JavascriptInterface
public void showGenericPasswordFragment() {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.SHOW_GENERIC_PASSWORD_FRAGMENT, new String[0]));
}
@JavascriptInterface
public void showACSOptions() {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.SHOW_ACS_OPTIONS, new String[0]));
}
@JavascriptInterface
public void showACSPasswordOption() {
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("otp_enabled", false);
} catch (JSONException e) {
JuspayLogger.a(b, e);
}
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.SHOW_SINGLE_ACS_OPTION, new String[]{jSONObject.toString()}));
}
@JavascriptInterface
public void showACSOtpOption() {
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("password_enabled", false);
} catch (JSONException e) {
JuspayLogger.a(b, e);
}
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.SHOW_SINGLE_ACS_OPTION, new String[]{jSONObject.toString()}));
}
@JavascriptInterface
public void showOtpFragment() {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.SHOW_OTP_FRAGMENT, new String[0]));
}
@JavascriptInterface
public void removeFragment(String reason) {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.REMOVE_FRAGMENT, new String[]{reason}));
}
@JavascriptInterface
public void showManualOtpFragment() {
}
@JavascriptInterface
public void setPasswordValue(String value) {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.SET_PASSWORD_VALUE, new String[]{value}));
}
@JavascriptInterface
public void hidePasswordHelper() {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.HIDE_PASSWORD_HELPER, new String[0]));
}
@JavascriptInterface
public void hideAssistanceFragment() {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.HIDE_ASSISTANCE_FRAGMENT, new String[0]));
}
@JavascriptInterface
public void showWaitingFragment() {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.SHOW_WAITING_FRAGMENT, new String[0]));
}
@JavascriptInterface
public void storeLastChosenAccount(String bank, String chosenAccount) {
this.c.a(bank + "_lastChosenAccount", chosenAccount);
}
@JavascriptInterface
public String getLastChosenAccount(String bank) {
return this.c.c(bank + "_lastChosenAccount", "");
}
@JavascriptInterface
public void addDataToSharedPrefs(String key, String value) {
this.c.a(key, value);
}
@JavascriptInterface
public String getDataFromSharedPrefs(String key) {
return this.c.c(key, "");
}
@JavascriptInterface
public void trackUserError(String reason) {
GodelTracker.getInstance().a(new Event().a(Event.Category.GODEL).a(Event.Action.INFO).c("user_errors").d(reason));
JuspayLogger.b(b, "User error: " + reason);
}
@JavascriptInterface
public void trackDomCheckFailure(String path) {
GodelTracker.getInstance().a(new Event().a(Event.Category.ACS).a(Event.Action.CHECK).c("dom_check_failure").d(path));
}
@JavascriptInterface
public void trackJsInfo(String label, String value) {
if (label.equals("pageStatus")) {
setLatestPageStatus(value);
}
GodelTracker.getInstance().a(new Event().a(Event.Category.ACS).a(Event.Action.INFO).c(label).d(value));
}
@JavascriptInterface
public void trackJsOnPageLoad() {
GodelTracker.getInstance().a(new Event().a(Event.Category.ACS).a(Event.Action.INFO).c("js_page_load").d(String.valueOf(new Date().getTime())));
}
@JavascriptInterface
public void trackPageView(String url, String title) {
GodelTracker.getInstance().b(url, title);
}
@JavascriptInterface
public void trackEvent(String category, String action, String label, String value) {
if ("fragment_initialized".equals(label)) {
setLatestFragmentName(value);
} else if ("potential_payment_flow_error".equals(label)) {
setLatestPPFError(value);
}
GodelTracker.getInstance().a(new Event().a(category).b(action).c(label).d(value));
}
@JavascriptInterface
public void clearCacheIfExist(String url) {
this.a.u(url);
}
@JavascriptInterface
public void changeNextActionText(String text) {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.CHANGE_NEXT_ACTION_TEXT, new String[]{text}));
}
@JavascriptInterface
public String getRemarksForBank() {
return this.a.t().getRemarks();
}
@JavascriptInterface
public void setNumberOfExtraParameterAllowed() {
this.a.ab();
}
@JavascriptInterface
public void setNumberOfExtraParameterAllowed(String value) {
this.a.s(value);
}
@JavascriptInterface
public void requestPhoneKeyboardShow() {
if (ConfigService.getInstance().checkKeyboardEnabled("phone_keyboard")) {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.REQUEST_PHONE_KEYBOARD_SHOW, new String[]{"acs"}));
}
}
@JavascriptInterface
public void requestPhoneKeyboardShow(String caller) {
if (ConfigService.getInstance().checkKeyboardEnabled("phone_keyboard")) {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.REQUEST_PHONE_KEYBOARD_SHOW, new String[]{"uber"}));
}
}
@JavascriptInterface
public void setSessionAttribute(String key, String value) {
try {
SessionInfo.getInstance().a(key, value);
} catch (Throwable th) {
JuspayLogger.b(Constants.GODEL_TAG, "Exception while trying to set attribute", th);
}
}
@JavascriptInterface
public String getSessionAttribute(String key) {
return SessionInfo.getInstance().e(key);
}
@JavascriptInterface
public String getSessionId() {
return GodelTracker.getInstance().h();
}
@JavascriptInterface
public void removeAttribute(String key) {
try {
SessionInfo.getInstance().f(key);
} catch (Throwable th) {
JuspayLogger.b(Constants.GODEL_TAG, "Exception while trying to remove attribute", th);
}
}
@JavascriptInterface
public void resetSession() {
GodelTracker.getInstance().a();
}
@JavascriptInterface
public void resetBank() {
this.a.t().setBank("null");
}
@JavascriptInterface
public String getCurrentBank() {
return this.a.t().getBank();
}
@JavascriptInterface
public void noPageMatched() {
this.a.aP();
}
@JavascriptInterface
public void pageMatched() {
this.a.aO();
}
@JavascriptInterface
public void domCheckFailure() {
this.a.aQ();
}
@JavascriptInterface
public String fetchSmsFromInbox(String whereCondition) {
String b2 = new OtpUtil(this.a.c()).b(whereCondition);
if (b2 != null) {
return b2;
}
return HttpUrl.PATH_SEGMENT_ENCODE_SET_URI;
}
@JavascriptInterface
public String getOtpFromSms(String bank, long smsReadStartTime) {
OtpSms a = new OtpUtil(this.a.c()).a(bank, smsReadStartTime);
if (a != null) {
return a.getOtp();
}
return "";
}
@JavascriptInterface
public void requestSmsPermission() {
JuspayBrowserFragment juspayBrowserFragment = this.a;
if (juspayBrowserFragment != null) {
juspayBrowserFragment.requestPermissions(new String[]{"android.permission.READ_SMS", "android.permission.RECEIVE_SMS"}, 1);
} else {
GodelTracker.getInstance().h("Browser Fragment null not requesting permission");
}
}
@JavascriptInterface
public boolean checkIfSmsPermission() {
return PermissionChecker.checkSelfPermission(this.a.getActivity(), "android.permission.READ_SMS") == 0;
}
@JavascriptInterface
public void transactionCompleted() {
this.a.aR();
}
@JavascriptInterface
public void transactionStarted() {
this.a.aS();
}
@JavascriptInterface
public String getCurrentFragment() {
return this.a.aZ().getClass().getSimpleName();
}
@JavascriptInterface
public void hideBlur() {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.HIDE_BLUR, new String[0]));
}
@JavascriptInterface
public void setCustomerIdCheckBoxState(boolean customerIdState) {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.SET_CUSTOMERID_CHECKBOX_STATE, new String[]{String.valueOf(customerIdState)}));
}
@JavascriptInterface
public void setSmsBackReadTime(long backTime) {
this.a.c(Long.valueOf(backTime));
}
@JavascriptInterface
public void setSmsBackReadSessionTime(long backTime) {
this.a.b(Long.valueOf(backTime));
}
@JavascriptInterface
public String getNetworkType() {
return SessionInfo.getInstance().h(this.a.c());
}
@JavascriptInterface
public String getNetworkName() {
return SessionInfo.getInstance().v(this.a.c());
}
@JavascriptInterface
public String getGodelVersion() {
return SessionInfo.getInstance().f(this.a.c());
}
@JavascriptInterface
public String getGodelRemotesVersion() {
return SessionInfo.getInstance().g(this.a.c());
}
@JavascriptInterface
public void setJavascriptToOpenWindows(boolean value) {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.SET_JAVASCRIPT_TO_OPEN_WINDOWS, new String[]{String.valueOf(value)}));
}
@JavascriptInterface
public String getContacts(String limitOffset) {
try {
JuspayBrowserFragment juspayBrowserFragment = this.a;
if (juspayBrowserFragment != null && juspayBrowserFragment.c() != null && SessionInfo.getInstance().a(this.a.c(), "android.permission.READ_CONTACTS")) {
Cursor query = this.a.c().getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null, null, null, limitOffset);
JSONArray jSONArray = new JSONArray();
while (query.moveToNext()) {
JSONObject jSONObject = new JSONObject();
jSONObject.put(query.getString(query.getColumnIndex("display_name")), query.getString(query.getColumnIndex("data1")));
jSONArray.put(jSONObject);
}
query.close();
return jSONArray.toString();
}
return null;
} catch (Exception e) {
JuspayLogger.b(b, "Error while fetching contacts ", e);
return null;
}
}
@JavascriptInterface
public boolean isEnabled(String feature) {
return WebLabService.getInstance().isEnabled(feature);
}
@JavascriptInterface
public void sendDataToAcs(String js, boolean hideUber) {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.SEND_DATA_TO_ACS, new String[]{js, String.valueOf(hideUber)}));
}
@JavascriptInterface
public String getConfig() {
try {
JSONObject config = ConfigService.getInstance().getConfig();
if (config != null) {
return config.toString();
}
return null;
} catch (Exception e) {
JuspayLogger.b(b, "Error while fetching config ", e);
return null;
}
}
@JavascriptInterface
public void shareContent(String textContent) {
if (textContent != null) {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.SHARE_CONTENT, new String[]{textContent}));
}
}
@JavascriptInterface
public void sendSms(String textSms, String phoneNumber) {
if (textSms != null && phoneNumber != null) {
this.a.c().runOnUiThread(new FnInvokerThread(this.a, Constants.AcsInterfaceConstants.SEND_SMS, new String[]{textSms, phoneNumber}));
}
}
@JavascriptInterface
public boolean sendSmsIfPermission(String textSms, String phoneNumber) {
if (textSms != null && phoneNumber != null) {
return this.a.c(textSms, phoneNumber);
}
return false;
}
@JavascriptInterface
public void onElementFocus(String inputElementId) {
this.a.I(inputElementId);
}
@JavascriptInterface
public void addKeyOnPressed(boolean isFocused, String inputElementId) {
this.a.a(isFocused, inputElementId);
}
@JavascriptInterface
public void addToCache(String url, String imageData) {
this.a.d(url, imageData);
}
@JavascriptInterface
public String getOtpReceived() {
return this.a.h();
}
@JavascriptInterface
public boolean getChangeMessageValue() {
return this.a.i();
}
@JavascriptInterface
public void setShouldAutoSubmitOtp(boolean shouldAutoSubmitOtp) {
this.a.a(shouldAutoSubmitOtp);
}
@JavascriptInterface
public void eventOccurred(String eventName) {
this.a.r(eventName);
}
@JavascriptInterface
public void setDropoutReason(String dropoutReason) {
JuspayDropoutAnalyser.getInstance().setDropoutReason(dropoutReason);
}
@JavascriptInterface
public void setDropoutLoaded(String value) {
JuspayDropoutAnalyser.getInstance().setDropoutLoaded(Boolean.parseBoolean(value));
}
}