Add decompiled APK source code (JADX)

- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-02-18 14:52:23 -08:00
parent cc210a65ea
commit f9d20bb3fc
26991 changed files with 2541449 additions and 0 deletions

View File

@@ -0,0 +1,65 @@
package com.helpshift;
import android.app.Application;
import android.content.Context;
import com.helpshift.lifecycle.HSAppLifeCycleController;
import com.helpshift.lifecycle.HSAppLifeCycleEventsHandler;
import com.helpshift.notification.CoreNotificationManager;
import com.helpshift.storage.HSPersistentStorage;
import com.helpshift.util.ApplicationUtil;
import com.helpshift.util.ConfigValues;
import java.util.HashMap;
import java.util.Map;
/* loaded from: classes3.dex */
public abstract class HSInstallHelper {
public static Map sanitizeConfig(Map map) {
if (map == null) {
map = new HashMap();
}
Map defaultConfigMap = ConfigValues.getDefaultConfigMap();
defaultConfigMap.putAll(map);
return defaultConfigMap;
}
public static void setNotificationConfigValues(Context context, CoreNotificationManager coreNotificationManager, Map map) {
String packageName = context.getPackageName();
Object obj = map.get("notificationChannelId");
if (obj instanceof String) {
coreNotificationManager.setNotificationChannelId((String) obj);
}
Object obj2 = map.get("notificationSoundId");
if (obj2 instanceof Integer) {
coreNotificationManager.setNotificationSoundId(((Integer) obj2).intValue());
} else if (obj2 instanceof String) {
coreNotificationManager.setNotificationSoundId(ApplicationUtil.getResourceIdFromName(context, (String) obj2, "raw", packageName));
}
Object obj3 = map.get("notificationIcon");
if (obj3 instanceof Integer) {
coreNotificationManager.setNotificationIcon(((Integer) obj3).intValue());
} else if (obj3 instanceof String) {
coreNotificationManager.setNotificationIcon(ApplicationUtil.getResourceIdFromName(context, (String) obj3, "drawable", packageName));
}
Object obj4 = map.get("notificationLargeIcon");
if (obj4 instanceof Integer) {
coreNotificationManager.setNotificationLargeIcon(((Integer) obj4).intValue());
} else if (obj4 instanceof String) {
coreNotificationManager.setNotificationLargeIcon(ApplicationUtil.getResourceIdFromName(context, (String) obj4, "drawable", packageName));
}
}
public static void setupLifecycleListeners(Application application, Map map) {
Object obj = map.get("manualLifecycleTracking");
HSAppLifeCycleController.getInstance().init(application, (obj instanceof Boolean) && ((Boolean) obj).booleanValue(), new HSAppLifeCycleEventsHandler());
}
public static void setEnableInAppNotification(Map map, HSPersistentStorage hSPersistentStorage) {
Object obj = map.get("enableInAppNotification");
hSPersistentStorage.setEnableInAppNotification(obj instanceof Boolean ? ((Boolean) obj).booleanValue() : true);
}
public static void setScreenOrientation(Map map, HSPersistentStorage hSPersistentStorage) {
Object obj = map.get("screenOrientation");
hSPersistentStorage.setRequestedScreenOrientation(obj instanceof Integer ? ((Integer) obj).intValue() : -1);
}
}

View File

@@ -0,0 +1,15 @@
package com.helpshift;
import android.app.PendingIntent;
import android.content.Context;
/* loaded from: classes3.dex */
public abstract class HSPluginEventBridge {
public static PendingIntent getPendingIntentForNotification(Context context, PendingIntent pendingIntent) {
return pendingIntent;
}
public static boolean shouldCallFirstForegroundEvent() {
return false;
}
}

View File

@@ -0,0 +1,372 @@
package com.helpshift;
import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.content.Intent;
import android.os.Looper;
import com.ea.eadp.pushnotification.forwarding.FCMMessageService;
import com.facebook.share.internal.ShareConstants;
import com.google.android.gms.drive.DriveFile;
import com.helpshift.activities.HSMainActivity;
import com.helpshift.core.HSContext;
import com.helpshift.exception.HSUncaughtExceptionHandler;
import com.helpshift.lifecycle.HSAppLifeCycleController;
import com.helpshift.log.HSLogger;
import com.helpshift.log.InternalHelpshiftLogger;
import com.helpshift.log.LogCollector;
import com.helpshift.user.UserManager;
import com.helpshift.util.ApplicationUtil;
import com.helpshift.util.HSTimer;
import com.helpshift.util.SchemaUtil;
import com.helpshift.util.SdkURLs;
import com.helpshift.util.Utils;
import java.util.HashMap;
import java.util.Map;
/* loaded from: classes3.dex */
public abstract class Helpshift {
public static void setHelpshiftEventsListener(final HelpshiftEventsListener helpshiftEventsListener) {
if (HSContext.verifyInstall()) {
HSLogger.d("Helpshift", "setHelpshiftEventsListener() is called.");
HSContext.getInstance().getHsThreadingService().runSerial(new Runnable() { // from class: com.helpshift.Helpshift.1
@Override // java.lang.Runnable
public void run() {
HSContext.getInstance().getHsEventProxy().setHelpshiftEventsListener(HelpshiftEventsListener.this);
}
});
}
}
public static synchronized void install(final Application application, final String str, final String str2, final Map map) {
synchronized (Helpshift.class) {
if (HSContext.installCallSuccessful.get()) {
HSLogger.d("Helpshift", "Helpshift is already initialized !");
return;
}
SchemaUtil.validateInstallCredentials(str2, str);
final Map sanitizeConfig = HSInstallHelper.sanitizeConfig(map);
Object obj = sanitizeConfig.get("isForChina");
if ((obj instanceof Boolean) && ((Boolean) obj).booleanValue()) {
SdkURLs.updateHosts("webchat.hsftcn.cn", "media.hsftcn.cn");
}
HSContext.initInstance(application);
final HSContext hSContext = HSContext.getInstance();
hSContext.getHsThreadingService().runSync(new Runnable() { // from class: com.helpshift.Helpshift.3
@Override // java.lang.Runnable
public void run() {
HSContext.this.getNativeToSdkxMigrator().migrate();
HSContext.this.initialiseComponents(application);
HSInstallHelper.setupLifecycleListeners(application, sanitizeConfig);
}
});
hSContext.getHsThreadingService().runSerial(new Runnable() { // from class: com.helpshift.Helpshift.4
@Override // java.lang.Runnable
public void run() {
HSContext.this.getConfigManager().saveInstallKeys(str, str2);
boolean isApplicationInDebugMode = ApplicationUtil.isApplicationInDebugMode(application);
Object obj2 = sanitizeConfig.get("enableLogging");
boolean z = (obj2 instanceof Boolean) && ((Boolean) obj2).booleanValue();
HSContext.this.setSDKLoggingEnabled(z);
InternalHelpshiftLogger internalHelpshiftLogger = new InternalHelpshiftLogger(isApplicationInDebugMode, z);
if (isApplicationInDebugMode && z) {
internalHelpshiftLogger.setLogCollector(new LogCollector(application, System.currentTimeMillis() + "", Looper.getMainLooper().getThread().getId()));
HSUncaughtExceptionHandler.init();
HSContext.this.getNotificationManager().showDebugLogNotification();
}
HSLogger.initLogger(internalHelpshiftLogger);
HSLogger.d("Helpshift", "Install called: Domain : " + str2 + ", Config: " + map + " SDK X Version: " + HSContext.this.getDevice().getSDKVersion());
HSInstallHelper.setNotificationConfigValues(application, HSContext.this.getNotificationManager(), sanitizeConfig);
HSContext.this.getWebchatAnalyticsManager().setAnalyticsEventsData(sanitizeConfig);
HSInstallHelper.setEnableInAppNotification(sanitizeConfig, HSContext.this.getPersistentStorage());
HSInstallHelper.setScreenOrientation(sanitizeConfig, HSContext.this.getPersistentStorage());
HSContext.this.getHelpcenterCacheEvictionManager().deleteOlderHelpcenterCachedFiles();
HSContext.this.getUserManager().generateAndSaveAnonymousUserIdIfNeeded();
if (HSPluginEventBridge.shouldCallFirstForegroundEvent()) {
HSAppLifeCycleController.getInstance().onAppForeground();
}
}
});
HSContext.installCallSuccessful.compareAndSet(false, true);
}
}
public static void showConversation(Activity activity, Map map) {
if (HSContext.verifyInstall()) {
HSTimer.setStartTime("api");
showConversationInternal(activity, map, false);
}
}
public static void showConversationInternal(final Context context, final Map map, final boolean z) {
HSLogger.d("Helpshift", "showConversation is called with config: " + map + " \n Is proactive? " + z);
final HSContext hSContext = HSContext.getInstance();
hSContext.getHsThreadingService().runOnUIThread(new Runnable() { // from class: com.helpshift.Helpshift.6
@Override // java.lang.Runnable
public void run() {
map.put("enableLogging", Boolean.valueOf(hSContext.isSDKLoggingEnabled()));
Helpshift.saveConfig(map);
Intent intent = new Intent(context, (Class<?>) HSMainActivity.class);
intent.putExtra("SERVICE_MODE", "WEBCHAT_SERVICE_FLAG");
intent.putExtra(ShareConstants.FEED_SOURCE_PARAM, "api");
if (z) {
intent.putExtra(ShareConstants.FEED_SOURCE_PARAM, "proactive");
intent.setFlags(DriveFile.MODE_READ_ONLY);
}
context.startActivity(intent);
}
});
}
public static void showFAQs(Activity activity, Map map) {
if (HSContext.verifyInstall()) {
showFAQsInternal(activity, map, false);
}
}
public static void showFAQsInternal(final Context context, final Map map, final boolean z) {
HSLogger.d("Helpshift", "showFAQs is called with config: " + map + " \n Is proactive? " + z);
final HSContext hSContext = HSContext.getInstance();
hSContext.getHsThreadingService().runOnUIThread(new Runnable() { // from class: com.helpshift.Helpshift.7
@Override // java.lang.Runnable
public void run() {
map.put("enableLogging", Boolean.valueOf(hSContext.isSDKLoggingEnabled()));
Helpshift.saveConfig(map);
Intent intent = new Intent(context, (Class<?>) HSMainActivity.class);
intent.putExtra("SERVICE_MODE", "HELP_CENTER_SERVICE_FLAG");
intent.putExtra("HELPCENTER_MODE", "APP_MAIN_PAGE");
intent.putExtra(ShareConstants.FEED_SOURCE_PARAM, "api");
if (z) {
intent.putExtra(ShareConstants.FEED_SOURCE_PARAM, "proactive");
intent.setFlags(DriveFile.MODE_READ_ONLY);
}
context.startActivity(intent);
}
});
}
public static void showFAQSection(Activity activity, String str, Map map) {
if (HSContext.verifyInstall()) {
showFAQSectionInternal(activity, str, map, false);
}
}
public static void showFAQSectionInternal(final Context context, final String str, final Map map, final boolean z) {
HSLogger.d("Helpshift", "showFAQSection is called with sectionId" + str + " & config: " + map + " \n Is proactive? : " + z);
if (Utils.isEmpty(str)) {
HSLogger.e("Helpshift", "Invalid FAQ Section ID. Ignoring call to showFAQSection API.");
} else {
final HSContext hSContext = HSContext.getInstance();
hSContext.getHsThreadingService().runOnUIThread(new Runnable() { // from class: com.helpshift.Helpshift.8
@Override // java.lang.Runnable
public void run() {
map.put("enableLogging", Boolean.valueOf(hSContext.isSDKLoggingEnabled()));
Helpshift.saveConfig(map);
Intent intent = new Intent(context, (Class<?>) HSMainActivity.class);
intent.putExtra("SERVICE_MODE", "HELP_CENTER_SERVICE_FLAG");
intent.putExtra("HELPCENTER_MODE", "FAQ_SECTION");
intent.putExtra("FAQ_SECTION_ID", str);
intent.putExtra(ShareConstants.FEED_SOURCE_PARAM, "api");
if (z) {
intent.putExtra(ShareConstants.FEED_SOURCE_PARAM, "proactive");
intent.setFlags(DriveFile.MODE_READ_ONLY);
}
context.startActivity(intent);
}
});
}
}
public static void showSingleFAQ(Activity activity, String str, Map map) {
if (HSContext.verifyInstall()) {
showSingleFAQInternal(activity, str, map, false);
}
}
public static void showSingleFAQInternal(final Context context, final String str, final Map map, final boolean z) {
HSLogger.d("Helpshift", "showSingleFAQ() is called with publishId" + str + " & config: " + map + " \n Is proactive? : " + z);
if (Utils.isEmpty(str)) {
HSLogger.e("Helpshift", "Invalid FAQ ID. Ignoring call to showSingleFAQ API.");
} else {
final HSContext hSContext = HSContext.getInstance();
hSContext.getHsThreadingService().runOnUIThread(new Runnable() { // from class: com.helpshift.Helpshift.9
@Override // java.lang.Runnable
public void run() {
map.put("enableLogging", Boolean.valueOf(hSContext.isSDKLoggingEnabled()));
Helpshift.saveConfig(map);
Intent intent = new Intent(context, (Class<?>) HSMainActivity.class);
intent.putExtra("SERVICE_MODE", "HELP_CENTER_SERVICE_FLAG");
intent.putExtra("HELPCENTER_MODE", "SINGLE_FAQ");
intent.putExtra("SINGLE_FAQ_PUBLISH_ID", str);
intent.putExtra(ShareConstants.FEED_SOURCE_PARAM, "api");
if (z) {
intent.putExtra(ShareConstants.FEED_SOURCE_PARAM, "proactive");
intent.setFlags(DriveFile.MODE_READ_ONLY);
}
context.startActivity(intent);
}
});
}
}
public static void leaveBreadCrumb(final String str) {
if (HSContext.verifyInstall()) {
HSLogger.d("Helpshift", "leaveBreadCrumb() is called with action " + str);
if (Utils.isEmpty(str)) {
return;
}
final HSContext hSContext = HSContext.getInstance();
hSContext.getHsThreadingService().runSerial(new Runnable() { // from class: com.helpshift.Helpshift.10
@Override // java.lang.Runnable
public void run() {
HSContext.this.getConfigManager().pushBreadCrumb(str);
}
});
}
}
public static void clearBreadCrumbs() {
if (HSContext.verifyInstall()) {
HSLogger.d("Helpshift", "Clearing Breadcrumbs");
final HSContext hSContext = HSContext.getInstance();
hSContext.getHsThreadingService().runSerial(new Runnable() { // from class: com.helpshift.Helpshift.11
@Override // java.lang.Runnable
public void run() {
HSContext.this.getConfigManager().clearBreadCrumbs();
}
});
}
}
public static void saveConfig(Map map) {
if (map == null) {
map = new HashMap();
}
setCIFs(map.remove("customIssueFields"));
HSContext.getInstance().getConfigManager().saveConfig(map);
}
public static void setCIFs(Object obj) {
try {
HSLogger.d("Helpshift", "Setting CIFs.");
HSContext.getInstance().getConfigManager().saveCustomIssueFields(obj instanceof Map ? (Map) obj : null);
} catch (Exception e) {
HSLogger.e("Helpshift", "Error setting CIFs", e);
}
}
public static void login(final Map map) {
if (HSContext.verifyInstall()) {
HSLogger.d("Helpshift", "Logging in the user: " + map);
final HSContext hSContext = HSContext.getInstance();
hSContext.getHsThreadingService().runSerial(new Runnable() { // from class: com.helpshift.Helpshift.12
@Override // java.lang.Runnable
public void run() {
UserManager userManager = HSContext.this.getUserManager();
if (userManager.getClearAnonymousUserOnLoginFlag()) {
userManager.removeAnonymousUser();
userManager.generateAndSaveAnonymousUserIdIfNeeded();
}
userManager.login(map);
}
});
}
}
public static void logout() {
if (HSContext.verifyInstall()) {
HSLogger.d("Helpshift", "Logging out the user");
final HSContext hSContext = HSContext.getInstance();
hSContext.getHsThreadingService().runSerial(new Runnable() { // from class: com.helpshift.Helpshift.13
@Override // java.lang.Runnable
public void run() {
HSContext.this.getUserManager().logout();
}
});
}
}
public static void setLanguage(final String str) {
if (HSContext.verifyInstall()) {
HSLogger.d("Helpshift", "setLanguage() is called for language - " + str);
final HSContext hSContext = HSContext.getInstance();
hSContext.getHsThreadingService().runSerial(new Runnable() { // from class: com.helpshift.Helpshift.14
@Override // java.lang.Runnable
public void run() {
HSContext.this.getConfigManager().saveLanguage(str);
}
});
}
}
public static void registerPushToken(final String str) {
if (HSContext.verifyInstall()) {
HSLogger.d("Helpshift", "Registering push token, token is empty?- " + Utils.isEmpty(str));
final HSContext hSContext = HSContext.getInstance();
hSContext.getHsThreadingService().runSerial(new Runnable() { // from class: com.helpshift.Helpshift.15
@Override // java.lang.Runnable
public void run() {
HSContext.this.getUserManager().registerPushToken(str);
}
});
}
}
public static void handlePush(final Map map) {
if (!HSContext.verifyInstall() || map == null || map.size() == 0) {
return;
}
HSLogger.d("Helpshift", "handlePush() is called.");
final HSContext hSContext = HSContext.getInstance();
hSContext.getHsThreadingService().runSerial(new Runnable() { // from class: com.helpshift.Helpshift.16
@Override // java.lang.Runnable
public void run() {
if (!HSContext.this.isWebchatUIOpen()) {
HSContext.this.getUserManager().updatePushUnreadCountBy(1);
}
HSContext.this.getNotificationManager().showNotification((String) map.get(FCMMessageService.PushIntentExtraKeys.ALERT), true);
}
});
}
public static void requestUnreadMessageCount(final boolean z) {
if (HSContext.verifyInstall()) {
HSLogger.d("Helpshift", "requestUnreadMessageCount is called with shouldFetchFromServer = " + z);
final HSContext hSContext = HSContext.getInstance();
hSContext.getHsThreadingService().runSerial(new Runnable() { // from class: com.helpshift.Helpshift.18
@Override // java.lang.Runnable
public void run() {
if (z) {
hSContext.getRequestUnreadMessageCountHandler().handleRemoteRequest();
} else {
hSContext.getRequestUnreadMessageCountHandler().handleLocalCacheRequest();
}
}
});
}
}
public static void onAppForeground() {
if (HSContext.verifyInstall()) {
HSLogger.d("Helpshift", "onAppForeground() is called for Manual App lifecycle tracking");
HSContext.getInstance().getHsThreadingService().runSerial(new Runnable() { // from class: com.helpshift.Helpshift.19
@Override // java.lang.Runnable
public void run() {
HSAppLifeCycleController.getInstance().onManualAppForegroundAPI();
}
});
}
}
public static void onAppBackground() {
if (HSContext.verifyInstall()) {
HSLogger.d("Helpshift", "onAppBackground() is called for Manual App lifecycle tracking");
HSContext.getInstance().getHsThreadingService().runSerial(new Runnable() { // from class: com.helpshift.Helpshift.20
@Override // java.lang.Runnable
public void run() {
HSAppLifeCycleController.getInstance().onManualAppBackgroundAPI();
}
});
}
}
}

View File

@@ -0,0 +1,8 @@
package com.helpshift;
/* loaded from: classes3.dex */
public enum HelpshiftAuthenticationFailureReason {
REASON_AUTH_TOKEN_NOT_PROVIDED,
REASON_INVALID_AUTH_TOKEN,
UNKNOWN
}

View File

@@ -0,0 +1,10 @@
package com.helpshift;
import java.util.Map;
/* loaded from: classes3.dex */
public interface HelpshiftEventsListener {
void onEventOccurred(String str, Map map);
void onUserAuthenticationFailure(HelpshiftAuthenticationFailureReason helpshiftAuthenticationFailureReason);
}

View File

@@ -0,0 +1,8 @@
package com.helpshift;
/* loaded from: classes3.dex */
public class HelpshiftInstallException extends RuntimeException {
public HelpshiftInstallException(String str) {
super(str);
}
}

View File

@@ -0,0 +1,19 @@
package com.helpshift;
/* loaded from: classes3.dex */
public final class R$anim {
public static int abc_fade_in = 2130771968;
public static int abc_fade_out = 2130771969;
public static int abc_grow_fade_in_from_bottom = 2130771970;
public static int abc_popup_enter = 2130771971;
public static int abc_popup_exit = 2130771972;
public static int abc_shrink_fade_out_from_bottom = 2130771973;
public static int abc_slide_in_bottom = 2130771974;
public static int abc_slide_in_top = 2130771975;
public static int abc_slide_out_bottom = 2130771976;
public static int abc_slide_out_top = 2130771977;
public static int abc_tooltip_enter = 2130771978;
public static int abc_tooltip_exit = 2130771979;
public static int hs__slide_down = 2130771995;
public static int hs__slide_up = 2130771996;
}

View File

@@ -0,0 +1,277 @@
package com.helpshift;
/* loaded from: classes3.dex */
public final class R$attr {
public static int actionBarDivider = 2130968576;
public static int actionBarItemBackground = 2130968577;
public static int actionBarPopupTheme = 2130968578;
public static int actionBarSize = 2130968579;
public static int actionBarSplitStyle = 2130968580;
public static int actionBarStyle = 2130968581;
public static int actionBarTabBarStyle = 2130968582;
public static int actionBarTabStyle = 2130968583;
public static int actionBarTabTextStyle = 2130968584;
public static int actionBarTheme = 2130968585;
public static int actionBarWidgetTheme = 2130968586;
public static int actionButtonStyle = 2130968587;
public static int actionDropDownStyle = 2130968588;
public static int actionLayout = 2130968589;
public static int actionMenuTextAppearance = 2130968590;
public static int actionMenuTextColor = 2130968591;
public static int actionModeBackground = 2130968592;
public static int actionModeCloseButtonStyle = 2130968593;
public static int actionModeCloseDrawable = 2130968595;
public static int actionModeCopyDrawable = 2130968596;
public static int actionModeCutDrawable = 2130968597;
public static int actionModeFindDrawable = 2130968598;
public static int actionModePasteDrawable = 2130968599;
public static int actionModePopupWindowStyle = 2130968600;
public static int actionModeSelectAllDrawable = 2130968601;
public static int actionModeShareDrawable = 2130968602;
public static int actionModeSplitBackground = 2130968603;
public static int actionModeStyle = 2130968604;
public static int actionModeWebSearchDrawable = 2130968606;
public static int actionOverflowButtonStyle = 2130968607;
public static int actionOverflowMenuStyle = 2130968608;
public static int actionProviderClass = 2130968609;
public static int actionViewClass = 2130968610;
public static int activityChooserViewStyle = 2130968611;
public static int alertDialogButtonGroupStyle = 2130968656;
public static int alertDialogCenterButtons = 2130968657;
public static int alertDialogStyle = 2130968658;
public static int alertDialogTheme = 2130968659;
public static int allowStacking = 2130968660;
public static int alpha = 2130968661;
public static int alphabeticModifiers = 2130968662;
public static int arrowHeadLength = 2130968664;
public static int arrowShaftLength = 2130968665;
public static int autoCompleteTextViewStyle = 2130968666;
public static int autoSizeMaxTextSize = 2130968667;
public static int autoSizeMinTextSize = 2130968668;
public static int autoSizePresetSizes = 2130968669;
public static int autoSizeStepGranularity = 2130968670;
public static int autoSizeTextType = 2130968671;
public static int background = 2130968673;
public static int backgroundSplit = 2130968674;
public static int backgroundStacked = 2130968675;
public static int backgroundTint = 2130968676;
public static int backgroundTintMode = 2130968677;
public static int barLength = 2130968678;
public static int borderlessButtonStyle = 2130968681;
public static int buttonBarButtonStyle = 2130968683;
public static int buttonBarNegativeButtonStyle = 2130968684;
public static int buttonBarNeutralButtonStyle = 2130968685;
public static int buttonBarPositiveButtonStyle = 2130968686;
public static int buttonBarStyle = 2130968687;
public static int buttonGravity = 2130968689;
public static int buttonIconDimen = 2130968690;
public static int buttonPanelSideLayout = 2130968691;
public static int buttonStyle = 2130968693;
public static int buttonStyleSmall = 2130968694;
public static int buttonTint = 2130968695;
public static int buttonTintMode = 2130968696;
public static int checkboxStyle = 2130968707;
public static int checkedTextViewStyle = 2130968708;
public static int closeIcon = 2130968710;
public static int closeItemLayout = 2130968711;
public static int collapseContentDescription = 2130968712;
public static int collapseIcon = 2130968713;
public static int color = 2130968714;
public static int colorAccent = 2130968715;
public static int colorBackgroundFloating = 2130968716;
public static int colorButtonNormal = 2130968717;
public static int colorControlActivated = 2130968718;
public static int colorControlHighlight = 2130968719;
public static int colorControlNormal = 2130968720;
public static int colorError = 2130968721;
public static int colorPrimary = 2130968722;
public static int colorPrimaryDark = 2130968723;
public static int colorSwitchThumbNormal = 2130968725;
public static int commitIcon = 2130968740;
public static int contentDescription = 2130968741;
public static int contentInsetEnd = 2130968742;
public static int contentInsetEndWithActions = 2130968743;
public static int contentInsetLeft = 2130968744;
public static int contentInsetRight = 2130968745;
public static int contentInsetStart = 2130968746;
public static int contentInsetStartWithNavigation = 2130968747;
public static int controlBackground = 2130968753;
public static int coordinatorLayoutStyle = 2130968755;
public static int customNavigationLayout = 2130968757;
public static int defaultQueryHint = 2130968758;
public static int dialogCornerRadius = 2130968760;
public static int dialogPreferredPadding = 2130968761;
public static int dialogTheme = 2130968762;
public static int displayOptions = 2130968763;
public static int divider = 2130968764;
public static int dividerHorizontal = 2130968765;
public static int dividerPadding = 2130968766;
public static int dividerVertical = 2130968767;
public static int drawableSize = 2130968772;
public static int drawerArrowStyle = 2130968777;
public static int dropDownListViewStyle = 2130968778;
public static int dropdownListPreferredItemHeight = 2130968779;
public static int editTextBackground = 2130968780;
public static int editTextColor = 2130968781;
public static int editTextStyle = 2130968782;
public static int elevation = 2130968783;
public static int expandActivityOverflowButtonDrawable = 2130968785;
public static int firstBaselineToTopHeight = 2130968791;
public static int font = 2130968792;
public static int fontFamily = 2130968793;
public static int fontProviderAuthority = 2130968794;
public static int fontProviderCerts = 2130968795;
public static int fontProviderFetchStrategy = 2130968797;
public static int fontProviderFetchTimeout = 2130968798;
public static int fontProviderPackage = 2130968799;
public static int fontProviderQuery = 2130968800;
public static int fontStyle = 2130968802;
public static int fontVariationSettings = 2130968803;
public static int fontWeight = 2130968804;
public static int gapBetweenBars = 2130968805;
public static int goIcon = 2130968806;
public static int height = 2130968807;
public static int hideOnContentScroll = 2130968808;
public static int homeAsUpIndicator = 2130968811;
public static int homeLayout = 2130968812;
public static int icon = 2130968813;
public static int iconTint = 2130968814;
public static int iconTintMode = 2130968815;
public static int iconifiedByDefault = 2130968816;
public static int imageButtonStyle = 2130968819;
public static int indeterminateProgressStyle = 2130968820;
public static int initialActivityCount = 2130968821;
public static int isLightTheme = 2130968822;
public static int itemPadding = 2130968823;
public static int keylines = 2130968825;
public static int lastBaselineToBottomHeight = 2130968827;
public static int layout = 2130968828;
public static int layout_anchor = 2130968830;
public static int layout_anchorGravity = 2130968831;
public static int layout_behavior = 2130968832;
public static int layout_dodgeInsetEdges = 2130968833;
public static int layout_insetEdge = 2130968834;
public static int layout_keyline = 2130968835;
public static int lineHeight = 2130968836;
public static int listChoiceBackgroundIndicator = 2130968837;
public static int listDividerAlertDialog = 2130968840;
public static int listItemLayout = 2130968841;
public static int listLayout = 2130968842;
public static int listMenuViewStyle = 2130968843;
public static int listPopupWindowStyle = 2130968844;
public static int listPreferredItemHeight = 2130968845;
public static int listPreferredItemHeightLarge = 2130968846;
public static int listPreferredItemHeightSmall = 2130968847;
public static int listPreferredItemPaddingLeft = 2130968849;
public static int listPreferredItemPaddingRight = 2130968850;
public static int logo = 2130968852;
public static int logoDescription = 2130968853;
public static int maxButtonHeight = 2130968854;
public static int measureWithLargestChild = 2130968861;
public static int multiChoiceItemLayout = 2130968863;
public static int navigationContentDescription = 2130968864;
public static int navigationIcon = 2130968865;
public static int navigationMode = 2130968866;
public static int numericModifiers = 2130968868;
public static int overlapAnchor = 2130968869;
public static int paddingBottomNoButtons = 2130968870;
public static int paddingEnd = 2130968871;
public static int paddingStart = 2130968872;
public static int paddingTopNoTitle = 2130968873;
public static int panelBackground = 2130968874;
public static int panelMenuListTheme = 2130968875;
public static int panelMenuListWidth = 2130968876;
public static int popupMenuStyle = 2130968880;
public static int popupTheme = 2130968881;
public static int popupWindowStyle = 2130968882;
public static int preserveIconSpacing = 2130968883;
public static int progressBarPadding = 2130968884;
public static int progressBarStyle = 2130968885;
public static int queryBackground = 2130968886;
public static int queryHint = 2130968887;
public static int radioButtonStyle = 2130968889;
public static int ratingBarStyle = 2130968890;
public static int ratingBarStyleIndicator = 2130968891;
public static int ratingBarStyleSmall = 2130968892;
public static int searchHintIcon = 2130968903;
public static int searchIcon = 2130968904;
public static int searchViewStyle = 2130968905;
public static int seekBarStyle = 2130968906;
public static int selectableItemBackground = 2130968907;
public static int selectableItemBackgroundBorderless = 2130968908;
public static int showAsAction = 2130968910;
public static int showDividers = 2130968911;
public static int showText = 2130968912;
public static int showTitle = 2130968913;
public static int singleChoiceItemLayout = 2130968924;
public static int spinBars = 2130968926;
public static int spinnerDropDownItemStyle = 2130968927;
public static int spinnerStyle = 2130968928;
public static int splitTrack = 2130968929;
public static int srcCompat = 2130968930;
public static int state_above_anchor = 2130968932;
public static int statusBarBackground = 2130968933;
public static int subMenuArrow = 2130968934;
public static int submitBackground = 2130968935;
public static int subtitle = 2130968936;
public static int subtitleTextAppearance = 2130968937;
public static int subtitleTextColor = 2130968938;
public static int subtitleTextStyle = 2130968939;
public static int suggestionRowLayout = 2130968940;
public static int switchMinWidth = 2130968942;
public static int switchPadding = 2130968943;
public static int switchStyle = 2130968944;
public static int switchTextAppearance = 2130968945;
public static int textAllCaps = 2130968946;
public static int textAppearanceLargePopupMenu = 2130968947;
public static int textAppearanceListItem = 2130968948;
public static int textAppearanceListItemSecondary = 2130968949;
public static int textAppearanceListItemSmall = 2130968950;
public static int textAppearancePopupMenuHeader = 2130968951;
public static int textAppearanceSearchResultSubtitle = 2130968952;
public static int textAppearanceSearchResultTitle = 2130968953;
public static int textAppearanceSmallPopupMenu = 2130968954;
public static int textColorAlertDialogListItem = 2130968955;
public static int textColorSearchUrl = 2130968956;
public static int theme = 2130968958;
public static int thickness = 2130968959;
public static int thumbTextPadding = 2130968960;
public static int thumbTint = 2130968961;
public static int thumbTintMode = 2130968962;
public static int tickMark = 2130968963;
public static int tickMarkTint = 2130968964;
public static int tickMarkTintMode = 2130968965;
public static int tint = 2130968967;
public static int tintMode = 2130968968;
public static int title = 2130968969;
public static int titleMargin = 2130968970;
public static int titleMarginBottom = 2130968971;
public static int titleMarginEnd = 2130968972;
public static int titleMarginStart = 2130968973;
public static int titleMarginTop = 2130968974;
public static int titleMargins = 2130968975;
public static int titleTextAppearance = 2130968976;
public static int titleTextColor = 2130968977;
public static int titleTextStyle = 2130968978;
public static int toolbarNavigationButtonStyle = 2130968979;
public static int toolbarStyle = 2130968980;
public static int tooltipForegroundColor = 2130968981;
public static int tooltipFrameBackground = 2130968982;
public static int tooltipText = 2130968983;
public static int track = 2130968985;
public static int trackTint = 2130968986;
public static int trackTintMode = 2130968987;
public static int ttcIndex = 2130968988;
public static int viewInflaterClass = 2130968992;
public static int voiceIcon = 2130968993;
public static int windowActionBar = 2130968994;
public static int windowActionBarOverlay = 2130968995;
public static int windowActionModeOverlay = 2130968996;
public static int windowFixedHeightMajor = 2130968997;
public static int windowFixedHeightMinor = 2130968998;
public static int windowFixedWidthMajor = 2130968999;
public static int windowFixedWidthMinor = 2130969000;
public static int windowMinWidthMajor = 2130969001;
public static int windowMinWidthMinor = 2130969002;
public static int windowNoTitle = 2130969003;
}

View File

@@ -0,0 +1,7 @@
package com.helpshift;
/* loaded from: classes3.dex */
public final class R$bool {
public static int abc_action_bar_embed_tabs = 2131034112;
public static int abc_config_actionMenuItemAllCaps = 2131034113;
}

View File

@@ -0,0 +1,88 @@
package com.helpshift;
/* loaded from: classes3.dex */
public final class R$color {
public static int abc_background_cache_hint_selector_material_dark = 2131099650;
public static int abc_background_cache_hint_selector_material_light = 2131099651;
public static int abc_btn_colored_borderless_text_material = 2131099652;
public static int abc_btn_colored_text_material = 2131099653;
public static int abc_color_highlight_material = 2131099654;
public static int abc_hint_foreground_material_dark = 2131099657;
public static int abc_hint_foreground_material_light = 2131099658;
public static int abc_primary_text_disable_only_material_dark = 2131099659;
public static int abc_primary_text_disable_only_material_light = 2131099660;
public static int abc_primary_text_material_dark = 2131099661;
public static int abc_primary_text_material_light = 2131099662;
public static int abc_search_url_text = 2131099663;
public static int abc_search_url_text_normal = 2131099664;
public static int abc_search_url_text_pressed = 2131099665;
public static int abc_search_url_text_selected = 2131099666;
public static int abc_secondary_text_material_dark = 2131099667;
public static int abc_secondary_text_material_light = 2131099668;
public static int abc_tint_btn_checkable = 2131099669;
public static int abc_tint_default = 2131099670;
public static int abc_tint_edittext = 2131099671;
public static int abc_tint_seek_thumb = 2131099672;
public static int abc_tint_spinner = 2131099673;
public static int abc_tint_switch_track = 2131099674;
public static int accent_material_dark = 2131099675;
public static int accent_material_light = 2131099676;
public static int background_floating_material_dark = 2131099709;
public static int background_floating_material_light = 2131099710;
public static int background_material_dark = 2131099711;
public static int background_material_light = 2131099712;
public static int bright_foreground_disabled_material_dark = 2131099714;
public static int bright_foreground_disabled_material_light = 2131099715;
public static int bright_foreground_inverse_material_dark = 2131099716;
public static int bright_foreground_inverse_material_light = 2131099717;
public static int bright_foreground_material_dark = 2131099718;
public static int bright_foreground_material_light = 2131099719;
public static int button_material_dark = 2131099724;
public static int button_material_light = 2131099725;
public static int dim_foreground_disabled_material_dark = 2131099763;
public static int dim_foreground_disabled_material_light = 2131099764;
public static int dim_foreground_material_dark = 2131099765;
public static int dim_foreground_material_light = 2131099766;
public static int error_color_material_dark = 2131099767;
public static int error_color_material_light = 2131099768;
public static int foreground_material_dark = 2131099777;
public static int foreground_material_light = 2131099778;
public static int highlighted_text_material_dark = 2131099779;
public static int highlighted_text_material_light = 2131099780;
public static int material_blue_grey_800 = 2131099807;
public static int material_blue_grey_900 = 2131099808;
public static int material_blue_grey_950 = 2131099809;
public static int material_deep_teal_200 = 2131099810;
public static int material_deep_teal_500 = 2131099811;
public static int material_grey_100 = 2131099812;
public static int material_grey_300 = 2131099813;
public static int material_grey_50 = 2131099814;
public static int material_grey_600 = 2131099815;
public static int material_grey_800 = 2131099816;
public static int material_grey_850 = 2131099817;
public static int material_grey_900 = 2131099818;
public static int notification_action_color_filter = 2131099879;
public static int notification_icon_bg_color = 2131099880;
public static int primary_dark_material_dark = 2131099882;
public static int primary_dark_material_light = 2131099883;
public static int primary_material_dark = 2131099884;
public static int primary_material_light = 2131099885;
public static int primary_text_default_material_dark = 2131099886;
public static int primary_text_default_material_light = 2131099887;
public static int primary_text_disabled_material_dark = 2131099888;
public static int primary_text_disabled_material_light = 2131099889;
public static int ripple_material_dark = 2131099890;
public static int ripple_material_light = 2131099891;
public static int secondary_text_default_material_dark = 2131099892;
public static int secondary_text_default_material_light = 2131099893;
public static int secondary_text_disabled_material_dark = 2131099894;
public static int secondary_text_disabled_material_light = 2131099895;
public static int switch_thumb_disabled_material_dark = 2131099896;
public static int switch_thumb_disabled_material_light = 2131099897;
public static int switch_thumb_material_dark = 2131099898;
public static int switch_thumb_material_light = 2131099899;
public static int switch_thumb_normal_material_dark = 2131099900;
public static int switch_thumb_normal_material_light = 2131099901;
public static int tooltip_background_dark = 2131099902;
public static int tooltip_background_light = 2131099903;
}

View File

@@ -0,0 +1,119 @@
package com.helpshift;
/* loaded from: classes3.dex */
public final class R$dimen {
public static int abc_action_bar_content_inset_material = 2131165184;
public static int abc_action_bar_content_inset_with_nav = 2131165185;
public static int abc_action_bar_default_height_material = 2131165186;
public static int abc_action_bar_default_padding_end_material = 2131165187;
public static int abc_action_bar_default_padding_start_material = 2131165188;
public static int abc_action_bar_elevation_material = 2131165189;
public static int abc_action_bar_icon_vertical_padding_material = 2131165190;
public static int abc_action_bar_overflow_padding_end_material = 2131165191;
public static int abc_action_bar_overflow_padding_start_material = 2131165192;
public static int abc_action_bar_stacked_max_height = 2131165193;
public static int abc_action_bar_stacked_tab_max_width = 2131165194;
public static int abc_action_bar_subtitle_bottom_margin_material = 2131165195;
public static int abc_action_bar_subtitle_top_margin_material = 2131165196;
public static int abc_action_button_min_height_material = 2131165197;
public static int abc_action_button_min_width_material = 2131165198;
public static int abc_action_button_min_width_overflow_material = 2131165199;
public static int abc_alert_dialog_button_bar_height = 2131165200;
public static int abc_alert_dialog_button_dimen = 2131165201;
public static int abc_button_inset_horizontal_material = 2131165202;
public static int abc_button_inset_vertical_material = 2131165203;
public static int abc_button_padding_horizontal_material = 2131165204;
public static int abc_button_padding_vertical_material = 2131165205;
public static int abc_cascading_menus_min_smallest_width = 2131165206;
public static int abc_config_prefDialogWidth = 2131165207;
public static int abc_control_corner_material = 2131165208;
public static int abc_control_inset_material = 2131165209;
public static int abc_control_padding_material = 2131165210;
public static int abc_dialog_corner_radius_material = 2131165211;
public static int abc_dialog_fixed_height_major = 2131165212;
public static int abc_dialog_fixed_height_minor = 2131165213;
public static int abc_dialog_fixed_width_major = 2131165214;
public static int abc_dialog_fixed_width_minor = 2131165215;
public static int abc_dialog_list_padding_bottom_no_buttons = 2131165216;
public static int abc_dialog_list_padding_top_no_title = 2131165217;
public static int abc_dialog_min_width_major = 2131165218;
public static int abc_dialog_min_width_minor = 2131165219;
public static int abc_dialog_padding_material = 2131165220;
public static int abc_dialog_padding_top_material = 2131165221;
public static int abc_dialog_title_divider_material = 2131165222;
public static int abc_disabled_alpha_material_dark = 2131165223;
public static int abc_disabled_alpha_material_light = 2131165224;
public static int abc_dropdownitem_icon_width = 2131165225;
public static int abc_dropdownitem_text_padding_left = 2131165226;
public static int abc_dropdownitem_text_padding_right = 2131165227;
public static int abc_edit_text_inset_bottom_material = 2131165228;
public static int abc_edit_text_inset_horizontal_material = 2131165229;
public static int abc_edit_text_inset_top_material = 2131165230;
public static int abc_floating_window_z = 2131165231;
public static int abc_list_item_padding_horizontal_material = 2131165235;
public static int abc_panel_menu_list_width = 2131165236;
public static int abc_progress_bar_height_material = 2131165237;
public static int abc_search_view_preferred_height = 2131165238;
public static int abc_search_view_preferred_width = 2131165239;
public static int abc_seekbar_track_background_height_material = 2131165240;
public static int abc_seekbar_track_progress_height_material = 2131165241;
public static int abc_select_dialog_padding_start_material = 2131165242;
public static int abc_switch_padding = 2131165246;
public static int abc_text_size_body_1_material = 2131165247;
public static int abc_text_size_body_2_material = 2131165248;
public static int abc_text_size_button_material = 2131165249;
public static int abc_text_size_caption_material = 2131165250;
public static int abc_text_size_display_1_material = 2131165251;
public static int abc_text_size_display_2_material = 2131165252;
public static int abc_text_size_display_3_material = 2131165253;
public static int abc_text_size_display_4_material = 2131165254;
public static int abc_text_size_headline_material = 2131165255;
public static int abc_text_size_large_material = 2131165256;
public static int abc_text_size_medium_material = 2131165257;
public static int abc_text_size_menu_header_material = 2131165258;
public static int abc_text_size_menu_material = 2131165259;
public static int abc_text_size_small_material = 2131165260;
public static int abc_text_size_subhead_material = 2131165261;
public static int abc_text_size_subtitle_material_toolbar = 2131165262;
public static int abc_text_size_title_material = 2131165263;
public static int abc_text_size_title_material_toolbar = 2131165264;
public static int compat_button_inset_horizontal_material = 2131165333;
public static int compat_button_inset_vertical_material = 2131165334;
public static int compat_button_padding_horizontal_material = 2131165335;
public static int compat_button_padding_vertical_material = 2131165336;
public static int compat_control_corner_material = 2131165337;
public static int compat_notification_large_icon_max_height = 2131165338;
public static int compat_notification_large_icon_max_width = 2131165339;
public static int disabled_alpha_material_dark = 2131165341;
public static int disabled_alpha_material_light = 2131165342;
public static int highlight_alpha_material_colored = 2131165382;
public static int highlight_alpha_material_dark = 2131165383;
public static int highlight_alpha_material_light = 2131165384;
public static int hint_alpha_material_dark = 2131165385;
public static int hint_alpha_material_light = 2131165386;
public static int hint_pressed_alpha_material_dark = 2131165387;
public static int hint_pressed_alpha_material_light = 2131165388;
public static int notification_action_icon_size = 2131165445;
public static int notification_action_text_size = 2131165446;
public static int notification_big_circle_margin = 2131165447;
public static int notification_content_margin_start = 2131165448;
public static int notification_large_icon_height = 2131165449;
public static int notification_large_icon_width = 2131165450;
public static int notification_main_column_padding_top = 2131165451;
public static int notification_media_narrow_margin = 2131165452;
public static int notification_right_icon_size = 2131165453;
public static int notification_right_side_padding_top = 2131165454;
public static int notification_small_icon_background_padding = 2131165455;
public static int notification_small_icon_size_as_large = 2131165456;
public static int notification_subtext_size = 2131165457;
public static int notification_top_pad = 2131165458;
public static int notification_top_pad_large_text = 2131165459;
public static int tooltip_corner_radius = 2131165461;
public static int tooltip_horizontal_padding = 2131165462;
public static int tooltip_margin = 2131165463;
public static int tooltip_precise_anchor_extra_offset = 2131165464;
public static int tooltip_precise_anchor_threshold = 2131165465;
public static int tooltip_vertical_padding = 2131165466;
public static int tooltip_y_offset_non_touch = 2131165467;
public static int tooltip_y_offset_touch = 2131165468;
}

View File

@@ -0,0 +1,96 @@
package com.helpshift;
/* loaded from: classes3.dex */
public final class R$drawable {
public static int abc_ab_share_pack_mtrl_alpha = 2131230731;
public static int abc_action_bar_item_background_material = 2131230732;
public static int abc_btn_borderless_material = 2131230733;
public static int abc_btn_check_material = 2131230734;
public static int abc_btn_check_to_on_mtrl_000 = 2131230736;
public static int abc_btn_check_to_on_mtrl_015 = 2131230737;
public static int abc_btn_colored_material = 2131230738;
public static int abc_btn_default_mtrl_shape = 2131230739;
public static int abc_btn_radio_material = 2131230740;
public static int abc_btn_radio_to_on_mtrl_000 = 2131230742;
public static int abc_btn_radio_to_on_mtrl_015 = 2131230743;
public static int abc_btn_switch_to_on_mtrl_00001 = 2131230744;
public static int abc_btn_switch_to_on_mtrl_00012 = 2131230745;
public static int abc_cab_background_internal_bg = 2131230746;
public static int abc_cab_background_top_material = 2131230747;
public static int abc_cab_background_top_mtrl_alpha = 2131230748;
public static int abc_control_background_material = 2131230749;
public static int abc_dialog_material_background = 2131230750;
public static int abc_edit_text_material = 2131230751;
public static int abc_ic_ab_back_material = 2131230752;
public static int abc_ic_arrow_drop_right_black_24dp = 2131230753;
public static int abc_ic_clear_material = 2131230754;
public static int abc_ic_commit_search_api_mtrl_alpha = 2131230755;
public static int abc_ic_go_search_api_material = 2131230756;
public static int abc_ic_menu_copy_mtrl_am_alpha = 2131230757;
public static int abc_ic_menu_cut_mtrl_alpha = 2131230758;
public static int abc_ic_menu_overflow_material = 2131230759;
public static int abc_ic_menu_paste_mtrl_am_alpha = 2131230760;
public static int abc_ic_menu_selectall_mtrl_alpha = 2131230761;
public static int abc_ic_menu_share_mtrl_alpha = 2131230762;
public static int abc_ic_search_api_material = 2131230763;
public static int abc_ic_voice_search_api_material = 2131230764;
public static int abc_item_background_holo_dark = 2131230765;
public static int abc_item_background_holo_light = 2131230766;
public static int abc_list_divider_material = 2131230767;
public static int abc_list_divider_mtrl_alpha = 2131230768;
public static int abc_list_focused_holo = 2131230769;
public static int abc_list_longpressed_holo = 2131230770;
public static int abc_list_pressed_holo_dark = 2131230771;
public static int abc_list_pressed_holo_light = 2131230772;
public static int abc_list_selector_background_transition_holo_dark = 2131230773;
public static int abc_list_selector_background_transition_holo_light = 2131230774;
public static int abc_list_selector_disabled_holo_dark = 2131230775;
public static int abc_list_selector_disabled_holo_light = 2131230776;
public static int abc_list_selector_holo_dark = 2131230777;
public static int abc_list_selector_holo_light = 2131230778;
public static int abc_menu_hardkey_panel_mtrl_mult = 2131230779;
public static int abc_popup_background_mtrl_mult = 2131230780;
public static int abc_ratingbar_indicator_material = 2131230781;
public static int abc_ratingbar_material = 2131230782;
public static int abc_ratingbar_small_material = 2131230783;
public static int abc_scrubber_control_off_mtrl_alpha = 2131230784;
public static int abc_scrubber_control_to_pressed_mtrl_000 = 2131230785;
public static int abc_scrubber_control_to_pressed_mtrl_005 = 2131230786;
public static int abc_scrubber_primary_mtrl_alpha = 2131230787;
public static int abc_scrubber_track_mtrl_alpha = 2131230788;
public static int abc_seekbar_thumb_material = 2131230789;
public static int abc_seekbar_tick_mark_material = 2131230790;
public static int abc_seekbar_track_material = 2131230791;
public static int abc_spinner_mtrl_am_alpha = 2131230792;
public static int abc_spinner_textfield_background_material = 2131230793;
public static int abc_switch_thumb_material = 2131230796;
public static int abc_switch_track_mtrl_alpha = 2131230797;
public static int abc_tab_indicator_material = 2131230798;
public static int abc_tab_indicator_mtrl_alpha = 2131230799;
public static int abc_text_cursor_material = 2131230800;
public static int abc_textfield_activated_mtrl_alpha = 2131230804;
public static int abc_textfield_default_mtrl_alpha = 2131230805;
public static int abc_textfield_search_activated_mtrl_alpha = 2131230806;
public static int abc_textfield_search_default_mtrl_alpha = 2131230807;
public static int abc_textfield_search_material = 2131230808;
public static int abc_vector_test = 2131230809;
public static int hs__chat_icon = 2131231077;
public static int hs__cross_icon = 2131231078;
public static int hs__error_icon = 2131231079;
public static int hs__no_internet_icon = 2131231080;
public static int hs__reload_icon = 2131231081;
public static int notification_action_background = 2131231297;
public static int notification_bg = 2131231298;
public static int notification_bg_low = 2131231299;
public static int notification_bg_low_normal = 2131231300;
public static int notification_bg_low_pressed = 2131231301;
public static int notification_bg_normal = 2131231302;
public static int notification_bg_normal_pressed = 2131231303;
public static int notification_icon_background = 2131231304;
public static int notification_template_icon_bg = 2131231306;
public static int notification_template_icon_low_bg = 2131231307;
public static int notification_tile_bg = 2131231308;
public static int notify_panel_notification_icon_bg = 2131231309;
public static int tooltip_frame_dark = 2131231316;
public static int tooltip_frame_light = 2131231317;
}

View File

@@ -0,0 +1,125 @@
package com.helpshift;
/* loaded from: classes3.dex */
public final class R$id {
public static int action_bar = 2131361835;
public static int action_bar_activity_content = 2131361836;
public static int action_bar_container = 2131361837;
public static int action_bar_root = 2131361838;
public static int action_bar_spinner = 2131361839;
public static int action_bar_subtitle = 2131361840;
public static int action_bar_title = 2131361841;
public static int action_container = 2131361842;
public static int action_context_bar = 2131361843;
public static int action_divider = 2131361844;
public static int action_image = 2131361845;
public static int action_menu_divider = 2131361846;
public static int action_menu_presenter = 2131361847;
public static int action_mode_bar = 2131361848;
public static int action_mode_bar_stub = 2131361849;
public static int action_mode_close_button = 2131361850;
public static int action_text = 2131361852;
public static int actions = 2131361853;
public static int activity_chooser_view_content = 2131361854;
public static int add = 2131361859;
public static int alertTitle = 2131361904;
public static int async = 2131361928;
public static int blocking = 2131361937;
public static int bottom = 2131361938;
public static int buttonPanel = 2131361950;
public static int checkbox = 2131361956;
public static int chronometer = 2131361958;
public static int content = 2131361975;
public static int contentPanel = 2131361976;
public static int custom = 2131361978;
public static int customPanel = 2131361979;
public static int debug_log_message = 2131361981;
public static int decor_content_parent = 2131361982;
public static int default_activity_button = 2131361983;
public static int edit_query = 2131361989;
public static int end = 2131361992;
public static int expand_activities_button = 2131362043;
public static int expanded_menu = 2131362044;
public static int forever = 2131362055;
public static int group_divider = 2131362057;
public static int home = 2131362060;
public static int hs__chat_fragment_layout = 2131362062;
public static int hs__chat_image = 2131362063;
public static int hs__container = 2131362064;
public static int hs__error_image = 2131362065;
public static int hs__helpcenter_layout = 2131362066;
public static int hs__helpcenter_view = 2131362067;
public static int hs__loading_view = 2131362068;
public static int hs__loading_view_close_btn = 2131362069;
public static int hs__progress = 2131362070;
public static int hs__retry_button = 2131362071;
public static int hs__retry_view = 2131362072;
public static int hs__retry_view_close_btn = 2131362073;
public static int hs__webchat_webview = 2131362074;
public static int hs__webview_layout = 2131362075;
public static int icon = 2131362122;
public static int icon_group = 2131362123;
public static int image = 2131362126;
public static int info = 2131362129;
public static int italic = 2131362134;
public static int left = 2131362139;
public static int line1 = 2131362141;
public static int line3 = 2131362142;
public static int listMode = 2131362143;
public static int list_item = 2131362145;
public static int message = 2131362335;
public static int multiply = 2131362342;
public static int none = 2131362350;
public static int normal = 2131362351;
public static int notification_background = 2131362352;
public static int notification_main_column = 2131362353;
public static int notification_main_column_container = 2131362354;
public static int parentPanel = 2131362363;
public static int progress_circular = 2131362366;
public static int progress_horizontal = 2131362367;
public static int radio = 2131362368;
public static int right = 2131362375;
public static int right_icon = 2131362376;
public static int right_side = 2131362377;
public static int screen = 2131362378;
public static int scrollIndicatorDown = 2131362379;
public static int scrollIndicatorUp = 2131362380;
public static int scrollView = 2131362381;
public static int search_badge = 2131362382;
public static int search_bar = 2131362383;
public static int search_button = 2131362384;
public static int search_close_btn = 2131362385;
public static int search_edit_frame = 2131362386;
public static int search_go_btn = 2131362387;
public static int search_mag_icon = 2131362388;
public static int search_plate = 2131362389;
public static int search_src_text = 2131362390;
public static int search_voice_btn = 2131362391;
public static int select_dialog_listview = 2131362392;
public static int shortcut = 2131362393;
public static int spacer = 2131362400;
public static int split_action_bar = 2131362403;
public static int src_atop = 2131362404;
public static int src_in = 2131362405;
public static int src_over = 2131362406;
public static int start = 2131362408;
public static int submenuarrow = 2131362411;
public static int submit_area = 2131362412;
public static int tabMode = 2131362414;
public static int tag_transition_group = 2131362425;
public static int tag_unhandled_key_event_manager = 2131362426;
public static int tag_unhandled_key_listeners = 2131362427;
public static int text = 2131362429;
public static int text2 = 2131362430;
public static int textSpacerNoButtons = 2131362431;
public static int textSpacerNoTitle = 2131362432;
public static int time = 2131362435;
public static int title = 2131362436;
public static int titleDividerNoCustom = 2131362437;
public static int title_template = 2131362438;
public static int top = 2131362439;
public static int topPanel = 2131362440;
public static int uniform = 2131362442;
public static int up = 2131362444;
public static int wrap_content = 2131362456;
}

View File

@@ -0,0 +1,10 @@
package com.helpshift;
/* loaded from: classes3.dex */
public final class R$integer {
public static int abc_config_activityDefaultDur = 2131427328;
public static int abc_config_activityShortDur = 2131427329;
public static int cancel_button_image_alpha = 2131427333;
public static int config_tooltipAnimTime = 2131427338;
public static int status_bar_notification_info_maxnum = 2131427348;
}

View File

@@ -0,0 +1,49 @@
package com.helpshift;
/* loaded from: classes3.dex */
public final class R$layout {
public static int abc_action_bar_title_item = 2131558401;
public static int abc_action_bar_up_container = 2131558402;
public static int abc_action_menu_item_layout = 2131558403;
public static int abc_action_menu_layout = 2131558404;
public static int abc_action_mode_bar = 2131558405;
public static int abc_action_mode_close_item_material = 2131558406;
public static int abc_activity_chooser_view = 2131558407;
public static int abc_activity_chooser_view_list_item = 2131558408;
public static int abc_alert_dialog_button_bar_material = 2131558409;
public static int abc_alert_dialog_material = 2131558410;
public static int abc_alert_dialog_title_material = 2131558411;
public static int abc_cascading_menu_item_layout = 2131558412;
public static int abc_dialog_title_material = 2131558413;
public static int abc_expanded_menu_layout = 2131558414;
public static int abc_list_menu_item_checkbox = 2131558415;
public static int abc_list_menu_item_icon = 2131558416;
public static int abc_list_menu_item_layout = 2131558417;
public static int abc_list_menu_item_radio = 2131558418;
public static int abc_popup_menu_header_item_layout = 2131558419;
public static int abc_popup_menu_item_layout = 2131558420;
public static int abc_screen_content_include = 2131558421;
public static int abc_screen_simple = 2131558422;
public static int abc_screen_simple_overlay_action_mode = 2131558423;
public static int abc_screen_toolbar = 2131558424;
public static int abc_search_dropdown_item_icons_2line = 2131558425;
public static int abc_search_view = 2131558426;
public static int abc_select_dialog_material = 2131558427;
public static int abc_tooltip = 2131558428;
public static int hs__chat_activity_layout = 2131558464;
public static int hs__debug_layout = 2131558465;
public static int hs__helpcenter_layout = 2131558466;
public static int hs__loading_view_layout = 2131558467;
public static int hs__retry_view_layout = 2131558468;
public static int hs__webchat_fragment_layout = 2131558469;
public static int notification_action = 2131558559;
public static int notification_action_tombstone = 2131558560;
public static int notification_template_custom_big = 2131558567;
public static int notification_template_icon_group = 2131558568;
public static int notification_template_part_chronometer = 2131558572;
public static int notification_template_part_time = 2131558573;
public static int select_dialog_item_material = 2131558575;
public static int select_dialog_multichoice_material = 2131558576;
public static int select_dialog_singlechoice_material = 2131558577;
public static int support_simple_spinner_dropdown_item = 2131558578;
}

View File

@@ -0,0 +1,34 @@
package com.helpshift;
/* loaded from: classes3.dex */
public final class R$string {
public static int abc_action_bar_home_description = 2131886103;
public static int abc_action_bar_up_description = 2131886104;
public static int abc_action_menu_overflow_description = 2131886105;
public static int abc_action_mode_done = 2131886106;
public static int abc_activity_chooser_view_see_all = 2131886107;
public static int abc_activitychooserview_choose_application = 2131886108;
public static int abc_capital_off = 2131886109;
public static int abc_capital_on = 2131886110;
public static int abc_menu_alt_shortcut_label = 2131886111;
public static int abc_menu_ctrl_shortcut_label = 2131886112;
public static int abc_menu_delete_shortcut_label = 2131886113;
public static int abc_menu_enter_shortcut_label = 2131886114;
public static int abc_menu_function_shortcut_label = 2131886115;
public static int abc_menu_meta_shortcut_label = 2131886116;
public static int abc_menu_shift_shortcut_label = 2131886117;
public static int abc_menu_space_shortcut_label = 2131886118;
public static int abc_menu_sym_shortcut_label = 2131886119;
public static int abc_prepend_shortcut_label = 2131886120;
public static int abc_search_hint = 2131886121;
public static int abc_searchview_description_clear = 2131886122;
public static int abc_searchview_description_query = 2131886123;
public static int abc_searchview_description_search = 2131886124;
public static int abc_searchview_description_submit = 2131886125;
public static int abc_searchview_description_voice = 2131886126;
public static int abc_shareactionprovider_share_with = 2131886127;
public static int abc_shareactionprovider_share_with_application = 2131886128;
public static int abc_toolbar_collapse_description = 2131886129;
public static int search_menu_title = 2131886465;
public static int status_bar_notification_info_overflow = 2131886471;
}

View File

@@ -0,0 +1,351 @@
package com.helpshift;
/* loaded from: classes3.dex */
public final class R$style {
public static int AlertDialog_AppCompat = 2131951616;
public static int AlertDialog_AppCompat_Light = 2131951617;
public static int Animation_AppCompat_Dialog = 2131951618;
public static int Animation_AppCompat_DropDownUp = 2131951619;
public static int Animation_AppCompat_Tooltip = 2131951620;
public static int Base_AlertDialog_AppCompat = 2131951656;
public static int Base_AlertDialog_AppCompat_Light = 2131951657;
public static int Base_Animation_AppCompat_Dialog = 2131951658;
public static int Base_Animation_AppCompat_DropDownUp = 2131951659;
public static int Base_Animation_AppCompat_Tooltip = 2131951660;
public static int Base_DialogWindowTitleBackground_AppCompat = 2131951663;
public static int Base_DialogWindowTitle_AppCompat = 2131951662;
public static int Base_TextAppearance_AppCompat = 2131951664;
public static int Base_TextAppearance_AppCompat_Body1 = 2131951665;
public static int Base_TextAppearance_AppCompat_Body2 = 2131951666;
public static int Base_TextAppearance_AppCompat_Button = 2131951667;
public static int Base_TextAppearance_AppCompat_Caption = 2131951668;
public static int Base_TextAppearance_AppCompat_Display1 = 2131951669;
public static int Base_TextAppearance_AppCompat_Display2 = 2131951670;
public static int Base_TextAppearance_AppCompat_Display3 = 2131951671;
public static int Base_TextAppearance_AppCompat_Display4 = 2131951672;
public static int Base_TextAppearance_AppCompat_Headline = 2131951673;
public static int Base_TextAppearance_AppCompat_Inverse = 2131951674;
public static int Base_TextAppearance_AppCompat_Large = 2131951675;
public static int Base_TextAppearance_AppCompat_Large_Inverse = 2131951676;
public static int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 2131951677;
public static int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 2131951678;
public static int Base_TextAppearance_AppCompat_Medium = 2131951679;
public static int Base_TextAppearance_AppCompat_Medium_Inverse = 2131951680;
public static int Base_TextAppearance_AppCompat_Menu = 2131951681;
public static int Base_TextAppearance_AppCompat_SearchResult = 2131951682;
public static int Base_TextAppearance_AppCompat_SearchResult_Subtitle = 2131951683;
public static int Base_TextAppearance_AppCompat_SearchResult_Title = 2131951684;
public static int Base_TextAppearance_AppCompat_Small = 2131951685;
public static int Base_TextAppearance_AppCompat_Small_Inverse = 2131951686;
public static int Base_TextAppearance_AppCompat_Subhead = 2131951687;
public static int Base_TextAppearance_AppCompat_Subhead_Inverse = 2131951688;
public static int Base_TextAppearance_AppCompat_Title = 2131951689;
public static int Base_TextAppearance_AppCompat_Title_Inverse = 2131951690;
public static int Base_TextAppearance_AppCompat_Tooltip = 2131951691;
public static int Base_TextAppearance_AppCompat_Widget_ActionBar_Menu = 2131951692;
public static int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 2131951693;
public static int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 2131951694;
public static int Base_TextAppearance_AppCompat_Widget_ActionBar_Title = 2131951695;
public static int Base_TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 2131951696;
public static int Base_TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 2131951697;
public static int Base_TextAppearance_AppCompat_Widget_ActionMode_Title = 2131951698;
public static int Base_TextAppearance_AppCompat_Widget_Button = 2131951699;
public static int Base_TextAppearance_AppCompat_Widget_Button_Borderless_Colored = 2131951700;
public static int Base_TextAppearance_AppCompat_Widget_Button_Colored = 2131951701;
public static int Base_TextAppearance_AppCompat_Widget_Button_Inverse = 2131951702;
public static int Base_TextAppearance_AppCompat_Widget_DropDownItem = 2131951703;
public static int Base_TextAppearance_AppCompat_Widget_PopupMenu_Header = 2131951704;
public static int Base_TextAppearance_AppCompat_Widget_PopupMenu_Large = 2131951705;
public static int Base_TextAppearance_AppCompat_Widget_PopupMenu_Small = 2131951706;
public static int Base_TextAppearance_AppCompat_Widget_Switch = 2131951707;
public static int Base_TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 2131951708;
public static int Base_TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 2131951709;
public static int Base_TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 2131951710;
public static int Base_TextAppearance_Widget_AppCompat_Toolbar_Title = 2131951711;
public static int Base_ThemeOverlay_AppCompat = 2131951726;
public static int Base_ThemeOverlay_AppCompat_ActionBar = 2131951727;
public static int Base_ThemeOverlay_AppCompat_Dark = 2131951728;
public static int Base_ThemeOverlay_AppCompat_Dark_ActionBar = 2131951729;
public static int Base_ThemeOverlay_AppCompat_Dialog = 2131951730;
public static int Base_ThemeOverlay_AppCompat_Dialog_Alert = 2131951731;
public static int Base_ThemeOverlay_AppCompat_Light = 2131951732;
public static int Base_Theme_AppCompat = 2131951712;
public static int Base_Theme_AppCompat_CompactMenu = 2131951713;
public static int Base_Theme_AppCompat_Dialog = 2131951714;
public static int Base_Theme_AppCompat_DialogWhenLarge = 2131951718;
public static int Base_Theme_AppCompat_Dialog_Alert = 2131951715;
public static int Base_Theme_AppCompat_Dialog_FixedSize = 2131951716;
public static int Base_Theme_AppCompat_Dialog_MinWidth = 2131951717;
public static int Base_Theme_AppCompat_Light = 2131951719;
public static int Base_Theme_AppCompat_Light_DarkActionBar = 2131951720;
public static int Base_Theme_AppCompat_Light_Dialog = 2131951721;
public static int Base_Theme_AppCompat_Light_DialogWhenLarge = 2131951725;
public static int Base_Theme_AppCompat_Light_Dialog_Alert = 2131951722;
public static int Base_Theme_AppCompat_Light_Dialog_FixedSize = 2131951723;
public static int Base_Theme_AppCompat_Light_Dialog_MinWidth = 2131951724;
public static int Base_V21_ThemeOverlay_AppCompat_Dialog = 2131951737;
public static int Base_V21_Theme_AppCompat = 2131951733;
public static int Base_V21_Theme_AppCompat_Dialog = 2131951734;
public static int Base_V21_Theme_AppCompat_Light = 2131951735;
public static int Base_V21_Theme_AppCompat_Light_Dialog = 2131951736;
public static int Base_V22_Theme_AppCompat = 2131951738;
public static int Base_V22_Theme_AppCompat_Light = 2131951739;
public static int Base_V23_Theme_AppCompat = 2131951740;
public static int Base_V23_Theme_AppCompat_Light = 2131951741;
public static int Base_V26_Theme_AppCompat = 2131951742;
public static int Base_V26_Theme_AppCompat_Light = 2131951743;
public static int Base_V26_Widget_AppCompat_Toolbar = 2131951744;
public static int Base_V28_Theme_AppCompat = 2131951745;
public static int Base_V28_Theme_AppCompat_Light = 2131951746;
public static int Base_V7_ThemeOverlay_AppCompat_Dialog = 2131951751;
public static int Base_V7_Theme_AppCompat = 2131951747;
public static int Base_V7_Theme_AppCompat_Dialog = 2131951748;
public static int Base_V7_Theme_AppCompat_Light = 2131951749;
public static int Base_V7_Theme_AppCompat_Light_Dialog = 2131951750;
public static int Base_V7_Widget_AppCompat_AutoCompleteTextView = 2131951752;
public static int Base_V7_Widget_AppCompat_EditText = 2131951753;
public static int Base_V7_Widget_AppCompat_Toolbar = 2131951754;
public static int Base_Widget_AppCompat_ActionBar = 2131951755;
public static int Base_Widget_AppCompat_ActionBar_Solid = 2131951756;
public static int Base_Widget_AppCompat_ActionBar_TabBar = 2131951757;
public static int Base_Widget_AppCompat_ActionBar_TabText = 2131951758;
public static int Base_Widget_AppCompat_ActionBar_TabView = 2131951759;
public static int Base_Widget_AppCompat_ActionButton = 2131951760;
public static int Base_Widget_AppCompat_ActionButton_CloseMode = 2131951761;
public static int Base_Widget_AppCompat_ActionButton_Overflow = 2131951762;
public static int Base_Widget_AppCompat_ActionMode = 2131951763;
public static int Base_Widget_AppCompat_ActivityChooserView = 2131951764;
public static int Base_Widget_AppCompat_AutoCompleteTextView = 2131951765;
public static int Base_Widget_AppCompat_Button = 2131951766;
public static int Base_Widget_AppCompat_ButtonBar = 2131951772;
public static int Base_Widget_AppCompat_ButtonBar_AlertDialog = 2131951773;
public static int Base_Widget_AppCompat_Button_Borderless = 2131951767;
public static int Base_Widget_AppCompat_Button_Borderless_Colored = 2131951768;
public static int Base_Widget_AppCompat_Button_ButtonBar_AlertDialog = 2131951769;
public static int Base_Widget_AppCompat_Button_Colored = 2131951770;
public static int Base_Widget_AppCompat_Button_Small = 2131951771;
public static int Base_Widget_AppCompat_CompoundButton_CheckBox = 2131951774;
public static int Base_Widget_AppCompat_CompoundButton_RadioButton = 2131951775;
public static int Base_Widget_AppCompat_CompoundButton_Switch = 2131951776;
public static int Base_Widget_AppCompat_DrawerArrowToggle = 2131951777;
public static int Base_Widget_AppCompat_DrawerArrowToggle_Common = 2131951778;
public static int Base_Widget_AppCompat_DropDownItem_Spinner = 2131951779;
public static int Base_Widget_AppCompat_EditText = 2131951780;
public static int Base_Widget_AppCompat_ImageButton = 2131951781;
public static int Base_Widget_AppCompat_Light_ActionBar = 2131951782;
public static int Base_Widget_AppCompat_Light_ActionBar_Solid = 2131951783;
public static int Base_Widget_AppCompat_Light_ActionBar_TabBar = 2131951784;
public static int Base_Widget_AppCompat_Light_ActionBar_TabText = 2131951785;
public static int Base_Widget_AppCompat_Light_ActionBar_TabText_Inverse = 2131951786;
public static int Base_Widget_AppCompat_Light_ActionBar_TabView = 2131951787;
public static int Base_Widget_AppCompat_Light_PopupMenu = 2131951788;
public static int Base_Widget_AppCompat_Light_PopupMenu_Overflow = 2131951789;
public static int Base_Widget_AppCompat_ListMenuView = 2131951790;
public static int Base_Widget_AppCompat_ListPopupWindow = 2131951791;
public static int Base_Widget_AppCompat_ListView = 2131951792;
public static int Base_Widget_AppCompat_ListView_DropDown = 2131951793;
public static int Base_Widget_AppCompat_ListView_Menu = 2131951794;
public static int Base_Widget_AppCompat_PopupMenu = 2131951795;
public static int Base_Widget_AppCompat_PopupMenu_Overflow = 2131951796;
public static int Base_Widget_AppCompat_PopupWindow = 2131951797;
public static int Base_Widget_AppCompat_ProgressBar = 2131951798;
public static int Base_Widget_AppCompat_ProgressBar_Horizontal = 2131951799;
public static int Base_Widget_AppCompat_RatingBar = 2131951800;
public static int Base_Widget_AppCompat_RatingBar_Indicator = 2131951801;
public static int Base_Widget_AppCompat_RatingBar_Small = 2131951802;
public static int Base_Widget_AppCompat_SearchView = 2131951803;
public static int Base_Widget_AppCompat_SearchView_ActionBar = 2131951804;
public static int Base_Widget_AppCompat_SeekBar = 2131951805;
public static int Base_Widget_AppCompat_SeekBar_Discrete = 2131951806;
public static int Base_Widget_AppCompat_Spinner = 2131951807;
public static int Base_Widget_AppCompat_Spinner_Underlined = 2131951808;
public static int Base_Widget_AppCompat_TextView_SpinnerItem = 2131951810;
public static int Base_Widget_AppCompat_Toolbar = 2131951811;
public static int Base_Widget_AppCompat_Toolbar_Button_Navigation = 2131951812;
public static int Platform_AppCompat = 2131951867;
public static int Platform_AppCompat_Light = 2131951868;
public static int Platform_ThemeOverlay_AppCompat = 2131951869;
public static int Platform_ThemeOverlay_AppCompat_Dark = 2131951870;
public static int Platform_ThemeOverlay_AppCompat_Light = 2131951871;
public static int Platform_V21_AppCompat = 2131951872;
public static int Platform_V21_AppCompat_Light = 2131951873;
public static int Platform_V25_AppCompat = 2131951874;
public static int Platform_V25_AppCompat_Light = 2131951875;
public static int Platform_Widget_AppCompat_Spinner = 2131951876;
public static int RtlOverlay_DialogWindowTitle_AppCompat = 2131951877;
public static int RtlOverlay_Widget_AppCompat_ActionBar_TitleItem = 2131951878;
public static int RtlOverlay_Widget_AppCompat_DialogTitle_Icon = 2131951879;
public static int RtlOverlay_Widget_AppCompat_PopupMenuItem = 2131951880;
public static int RtlOverlay_Widget_AppCompat_PopupMenuItem_InternalGroup = 2131951881;
public static int RtlOverlay_Widget_AppCompat_PopupMenuItem_Shortcut = 2131951882;
public static int RtlOverlay_Widget_AppCompat_PopupMenuItem_SubmenuArrow = 2131951883;
public static int RtlOverlay_Widget_AppCompat_PopupMenuItem_Text = 2131951884;
public static int RtlOverlay_Widget_AppCompat_PopupMenuItem_Title = 2131951885;
public static int RtlOverlay_Widget_AppCompat_SearchView_MagIcon = 2131951891;
public static int RtlOverlay_Widget_AppCompat_Search_DropDown = 2131951886;
public static int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon1 = 2131951887;
public static int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon2 = 2131951888;
public static int RtlOverlay_Widget_AppCompat_Search_DropDown_Query = 2131951889;
public static int RtlOverlay_Widget_AppCompat_Search_DropDown_Text = 2131951890;
public static int RtlUnderlay_Widget_AppCompat_ActionButton = 2131951892;
public static int RtlUnderlay_Widget_AppCompat_ActionButton_Overflow = 2131951893;
public static int TextAppearance_AppCompat = 2131951895;
public static int TextAppearance_AppCompat_Body1 = 2131951896;
public static int TextAppearance_AppCompat_Body2 = 2131951897;
public static int TextAppearance_AppCompat_Button = 2131951898;
public static int TextAppearance_AppCompat_Caption = 2131951899;
public static int TextAppearance_AppCompat_Display1 = 2131951900;
public static int TextAppearance_AppCompat_Display2 = 2131951901;
public static int TextAppearance_AppCompat_Display3 = 2131951902;
public static int TextAppearance_AppCompat_Display4 = 2131951903;
public static int TextAppearance_AppCompat_Headline = 2131951904;
public static int TextAppearance_AppCompat_Inverse = 2131951905;
public static int TextAppearance_AppCompat_Large = 2131951906;
public static int TextAppearance_AppCompat_Large_Inverse = 2131951907;
public static int TextAppearance_AppCompat_Light_SearchResult_Subtitle = 2131951908;
public static int TextAppearance_AppCompat_Light_SearchResult_Title = 2131951909;
public static int TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 2131951910;
public static int TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 2131951911;
public static int TextAppearance_AppCompat_Medium = 2131951912;
public static int TextAppearance_AppCompat_Medium_Inverse = 2131951913;
public static int TextAppearance_AppCompat_Menu = 2131951914;
public static int TextAppearance_AppCompat_SearchResult_Subtitle = 2131951915;
public static int TextAppearance_AppCompat_SearchResult_Title = 2131951916;
public static int TextAppearance_AppCompat_Small = 2131951917;
public static int TextAppearance_AppCompat_Small_Inverse = 2131951918;
public static int TextAppearance_AppCompat_Subhead = 2131951919;
public static int TextAppearance_AppCompat_Subhead_Inverse = 2131951920;
public static int TextAppearance_AppCompat_Title = 2131951921;
public static int TextAppearance_AppCompat_Title_Inverse = 2131951922;
public static int TextAppearance_AppCompat_Tooltip = 2131951923;
public static int TextAppearance_AppCompat_Widget_ActionBar_Menu = 2131951924;
public static int TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 2131951925;
public static int TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 2131951926;
public static int TextAppearance_AppCompat_Widget_ActionBar_Title = 2131951927;
public static int TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 2131951928;
public static int TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 2131951929;
public static int TextAppearance_AppCompat_Widget_ActionMode_Subtitle_Inverse = 2131951930;
public static int TextAppearance_AppCompat_Widget_ActionMode_Title = 2131951931;
public static int TextAppearance_AppCompat_Widget_ActionMode_Title_Inverse = 2131951932;
public static int TextAppearance_AppCompat_Widget_Button = 2131951933;
public static int TextAppearance_AppCompat_Widget_Button_Borderless_Colored = 2131951934;
public static int TextAppearance_AppCompat_Widget_Button_Colored = 2131951935;
public static int TextAppearance_AppCompat_Widget_Button_Inverse = 2131951936;
public static int TextAppearance_AppCompat_Widget_DropDownItem = 2131951937;
public static int TextAppearance_AppCompat_Widget_PopupMenu_Header = 2131951938;
public static int TextAppearance_AppCompat_Widget_PopupMenu_Large = 2131951939;
public static int TextAppearance_AppCompat_Widget_PopupMenu_Small = 2131951940;
public static int TextAppearance_AppCompat_Widget_Switch = 2131951941;
public static int TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 2131951942;
public static int TextAppearance_Compat_Notification = 2131951943;
public static int TextAppearance_Compat_Notification_Info = 2131951944;
public static int TextAppearance_Compat_Notification_Line2 = 2131951946;
public static int TextAppearance_Compat_Notification_Time = 2131951949;
public static int TextAppearance_Compat_Notification_Title = 2131951951;
public static int TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 2131951953;
public static int TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 2131951954;
public static int TextAppearance_Widget_AppCompat_Toolbar_Title = 2131951955;
public static int ThemeOverlay_AppCompat = 2131951982;
public static int ThemeOverlay_AppCompat_ActionBar = 2131951983;
public static int ThemeOverlay_AppCompat_Dark = 2131951984;
public static int ThemeOverlay_AppCompat_Dark_ActionBar = 2131951985;
public static int ThemeOverlay_AppCompat_Dialog = 2131951988;
public static int ThemeOverlay_AppCompat_Dialog_Alert = 2131951989;
public static int ThemeOverlay_AppCompat_Light = 2131951990;
public static int Theme_AppCompat = 2131951956;
public static int Theme_AppCompat_CompactMenu = 2131951957;
public static int Theme_AppCompat_DayNight = 2131951958;
public static int Theme_AppCompat_DayNight_DarkActionBar = 2131951959;
public static int Theme_AppCompat_DayNight_Dialog = 2131951960;
public static int Theme_AppCompat_DayNight_DialogWhenLarge = 2131951963;
public static int Theme_AppCompat_DayNight_Dialog_Alert = 2131951961;
public static int Theme_AppCompat_DayNight_Dialog_MinWidth = 2131951962;
public static int Theme_AppCompat_DayNight_NoActionBar = 2131951964;
public static int Theme_AppCompat_Dialog = 2131951965;
public static int Theme_AppCompat_DialogWhenLarge = 2131951968;
public static int Theme_AppCompat_Dialog_Alert = 2131951966;
public static int Theme_AppCompat_Dialog_MinWidth = 2131951967;
public static int Theme_AppCompat_Light = 2131951970;
public static int Theme_AppCompat_Light_DarkActionBar = 2131951971;
public static int Theme_AppCompat_Light_Dialog = 2131951972;
public static int Theme_AppCompat_Light_DialogWhenLarge = 2131951975;
public static int Theme_AppCompat_Light_Dialog_Alert = 2131951973;
public static int Theme_AppCompat_Light_Dialog_MinWidth = 2131951974;
public static int Theme_AppCompat_Light_NoActionBar = 2131951976;
public static int Theme_AppCompat_NoActionBar = 2131951977;
public static int Widget_AppCompat_ActionBar = 2131951992;
public static int Widget_AppCompat_ActionBar_Solid = 2131951993;
public static int Widget_AppCompat_ActionBar_TabBar = 2131951994;
public static int Widget_AppCompat_ActionBar_TabText = 2131951995;
public static int Widget_AppCompat_ActionBar_TabView = 2131951996;
public static int Widget_AppCompat_ActionButton = 2131951997;
public static int Widget_AppCompat_ActionButton_CloseMode = 2131951998;
public static int Widget_AppCompat_ActionButton_Overflow = 2131951999;
public static int Widget_AppCompat_ActionMode = 2131952000;
public static int Widget_AppCompat_ActivityChooserView = 2131952001;
public static int Widget_AppCompat_AutoCompleteTextView = 2131952002;
public static int Widget_AppCompat_Button = 2131952003;
public static int Widget_AppCompat_ButtonBar = 2131952009;
public static int Widget_AppCompat_ButtonBar_AlertDialog = 2131952010;
public static int Widget_AppCompat_Button_Borderless = 2131952004;
public static int Widget_AppCompat_Button_Borderless_Colored = 2131952005;
public static int Widget_AppCompat_Button_ButtonBar_AlertDialog = 2131952006;
public static int Widget_AppCompat_Button_Colored = 2131952007;
public static int Widget_AppCompat_Button_Small = 2131952008;
public static int Widget_AppCompat_CompoundButton_CheckBox = 2131952011;
public static int Widget_AppCompat_CompoundButton_RadioButton = 2131952012;
public static int Widget_AppCompat_CompoundButton_Switch = 2131952013;
public static int Widget_AppCompat_DrawerArrowToggle = 2131952014;
public static int Widget_AppCompat_DropDownItem_Spinner = 2131952015;
public static int Widget_AppCompat_EditText = 2131952016;
public static int Widget_AppCompat_ImageButton = 2131952017;
public static int Widget_AppCompat_Light_ActionBar = 2131952018;
public static int Widget_AppCompat_Light_ActionBar_Solid = 2131952019;
public static int Widget_AppCompat_Light_ActionBar_Solid_Inverse = 2131952020;
public static int Widget_AppCompat_Light_ActionBar_TabBar = 2131952021;
public static int Widget_AppCompat_Light_ActionBar_TabBar_Inverse = 2131952022;
public static int Widget_AppCompat_Light_ActionBar_TabText = 2131952023;
public static int Widget_AppCompat_Light_ActionBar_TabText_Inverse = 2131952024;
public static int Widget_AppCompat_Light_ActionBar_TabView = 2131952025;
public static int Widget_AppCompat_Light_ActionBar_TabView_Inverse = 2131952026;
public static int Widget_AppCompat_Light_ActionButton = 2131952027;
public static int Widget_AppCompat_Light_ActionButton_CloseMode = 2131952028;
public static int Widget_AppCompat_Light_ActionButton_Overflow = 2131952029;
public static int Widget_AppCompat_Light_ActionMode_Inverse = 2131952030;
public static int Widget_AppCompat_Light_ActivityChooserView = 2131952031;
public static int Widget_AppCompat_Light_AutoCompleteTextView = 2131952032;
public static int Widget_AppCompat_Light_DropDownItem_Spinner = 2131952033;
public static int Widget_AppCompat_Light_ListPopupWindow = 2131952034;
public static int Widget_AppCompat_Light_ListView_DropDown = 2131952035;
public static int Widget_AppCompat_Light_PopupMenu = 2131952036;
public static int Widget_AppCompat_Light_PopupMenu_Overflow = 2131952037;
public static int Widget_AppCompat_Light_SearchView = 2131952038;
public static int Widget_AppCompat_Light_Spinner_DropDown_ActionBar = 2131952039;
public static int Widget_AppCompat_ListMenuView = 2131952040;
public static int Widget_AppCompat_ListPopupWindow = 2131952041;
public static int Widget_AppCompat_ListView = 2131952042;
public static int Widget_AppCompat_ListView_DropDown = 2131952043;
public static int Widget_AppCompat_ListView_Menu = 2131952044;
public static int Widget_AppCompat_PopupMenu = 2131952045;
public static int Widget_AppCompat_PopupMenu_Overflow = 2131952046;
public static int Widget_AppCompat_PopupWindow = 2131952047;
public static int Widget_AppCompat_ProgressBar = 2131952048;
public static int Widget_AppCompat_ProgressBar_Horizontal = 2131952049;
public static int Widget_AppCompat_RatingBar = 2131952050;
public static int Widget_AppCompat_RatingBar_Indicator = 2131952051;
public static int Widget_AppCompat_RatingBar_Small = 2131952052;
public static int Widget_AppCompat_SearchView = 2131952053;
public static int Widget_AppCompat_SearchView_ActionBar = 2131952054;
public static int Widget_AppCompat_SeekBar = 2131952055;
public static int Widget_AppCompat_SeekBar_Discrete = 2131952056;
public static int Widget_AppCompat_Spinner = 2131952057;
public static int Widget_AppCompat_Spinner_DropDown = 2131952058;
public static int Widget_AppCompat_Spinner_DropDown_ActionBar = 2131952059;
public static int Widget_AppCompat_Spinner_Underlined = 2131952060;
public static int Widget_AppCompat_TextView_SpinnerItem = 2131952062;
public static int Widget_AppCompat_Toolbar = 2131952063;
public static int Widget_AppCompat_Toolbar_Button_Navigation = 2131952064;
public static int Widget_Compat_NotificationActionContainer = 2131952065;
public static int Widget_Compat_NotificationActionText = 2131952066;
public static int Widget_Support_CoordinatorLayout = 2131952067;
}

View File

@@ -0,0 +1,492 @@
package com.helpshift;
import com.ea.games.r3_row.R;
/* loaded from: classes3.dex */
public final class R$styleable {
public static int ActionBarLayout_android_layout_gravity = 0;
public static int ActionBar_background = 0;
public static int ActionBar_backgroundSplit = 1;
public static int ActionBar_backgroundStacked = 2;
public static int ActionBar_contentInsetEnd = 3;
public static int ActionBar_contentInsetEndWithActions = 4;
public static int ActionBar_contentInsetLeft = 5;
public static int ActionBar_contentInsetRight = 6;
public static int ActionBar_contentInsetStart = 7;
public static int ActionBar_contentInsetStartWithNavigation = 8;
public static int ActionBar_customNavigationLayout = 9;
public static int ActionBar_displayOptions = 10;
public static int ActionBar_divider = 11;
public static int ActionBar_elevation = 12;
public static int ActionBar_height = 13;
public static int ActionBar_hideOnContentScroll = 14;
public static int ActionBar_homeAsUpIndicator = 15;
public static int ActionBar_homeLayout = 16;
public static int ActionBar_icon = 17;
public static int ActionBar_indeterminateProgressStyle = 18;
public static int ActionBar_itemPadding = 19;
public static int ActionBar_logo = 20;
public static int ActionBar_navigationMode = 21;
public static int ActionBar_popupTheme = 22;
public static int ActionBar_progressBarPadding = 23;
public static int ActionBar_progressBarStyle = 24;
public static int ActionBar_subtitle = 25;
public static int ActionBar_subtitleTextStyle = 26;
public static int ActionBar_title = 27;
public static int ActionBar_titleTextStyle = 28;
public static int ActionMenuItemView_android_minWidth = 0;
public static int ActionMode_background = 0;
public static int ActionMode_backgroundSplit = 1;
public static int ActionMode_closeItemLayout = 2;
public static int ActionMode_height = 3;
public static int ActionMode_subtitleTextStyle = 4;
public static int ActionMode_titleTextStyle = 5;
public static int ActivityChooserView_expandActivityOverflowButtonDrawable = 0;
public static int ActivityChooserView_initialActivityCount = 1;
public static int AlertDialog_android_layout = 0;
public static int AlertDialog_buttonIconDimen = 1;
public static int AlertDialog_buttonPanelSideLayout = 2;
public static int AlertDialog_listItemLayout = 3;
public static int AlertDialog_listLayout = 4;
public static int AlertDialog_multiChoiceItemLayout = 5;
public static int AlertDialog_showTitle = 6;
public static int AlertDialog_singleChoiceItemLayout = 7;
public static int AnimatedStateListDrawableCompat_android_constantSize = 3;
public static int AnimatedStateListDrawableCompat_android_dither = 0;
public static int AnimatedStateListDrawableCompat_android_enterFadeDuration = 4;
public static int AnimatedStateListDrawableCompat_android_exitFadeDuration = 5;
public static int AnimatedStateListDrawableCompat_android_variablePadding = 2;
public static int AnimatedStateListDrawableCompat_android_visible = 1;
public static int AnimatedStateListDrawableItem_android_drawable = 1;
public static int AnimatedStateListDrawableItem_android_id = 0;
public static int AnimatedStateListDrawableTransition_android_drawable = 0;
public static int AnimatedStateListDrawableTransition_android_fromId = 2;
public static int AnimatedStateListDrawableTransition_android_reversible = 3;
public static int AnimatedStateListDrawableTransition_android_toId = 1;
public static int AppCompatImageView_android_src = 0;
public static int AppCompatImageView_srcCompat = 1;
public static int AppCompatImageView_tint = 2;
public static int AppCompatImageView_tintMode = 3;
public static int AppCompatSeekBar_android_thumb = 0;
public static int AppCompatSeekBar_tickMark = 1;
public static int AppCompatSeekBar_tickMarkTint = 2;
public static int AppCompatSeekBar_tickMarkTintMode = 3;
public static int AppCompatTextHelper_android_drawableBottom = 2;
public static int AppCompatTextHelper_android_drawableEnd = 6;
public static int AppCompatTextHelper_android_drawableLeft = 3;
public static int AppCompatTextHelper_android_drawableRight = 4;
public static int AppCompatTextHelper_android_drawableStart = 5;
public static int AppCompatTextHelper_android_drawableTop = 1;
public static int AppCompatTextHelper_android_textAppearance = 0;
public static int AppCompatTextView_android_textAppearance = 0;
public static int AppCompatTextView_autoSizeMaxTextSize = 1;
public static int AppCompatTextView_autoSizeMinTextSize = 2;
public static int AppCompatTextView_autoSizePresetSizes = 3;
public static int AppCompatTextView_autoSizeStepGranularity = 4;
public static int AppCompatTextView_autoSizeTextType = 5;
public static int AppCompatTextView_drawableBottomCompat = 6;
public static int AppCompatTextView_drawableEndCompat = 7;
public static int AppCompatTextView_drawableLeftCompat = 8;
public static int AppCompatTextView_drawableRightCompat = 9;
public static int AppCompatTextView_drawableStartCompat = 10;
public static int AppCompatTextView_drawableTint = 11;
public static int AppCompatTextView_drawableTintMode = 12;
public static int AppCompatTextView_drawableTopCompat = 13;
public static int AppCompatTextView_emojiCompatEnabled = 14;
public static int AppCompatTextView_firstBaselineToTopHeight = 15;
public static int AppCompatTextView_fontFamily = 16;
public static int AppCompatTextView_fontVariationSettings = 17;
public static int AppCompatTextView_lastBaselineToBottomHeight = 18;
public static int AppCompatTextView_lineHeight = 19;
public static int AppCompatTextView_textAllCaps = 20;
public static int AppCompatTextView_textLocale = 21;
public static int AppCompatTheme_actionBarDivider = 2;
public static int AppCompatTheme_actionBarItemBackground = 3;
public static int AppCompatTheme_actionBarPopupTheme = 4;
public static int AppCompatTheme_actionBarSize = 5;
public static int AppCompatTheme_actionBarSplitStyle = 6;
public static int AppCompatTheme_actionBarStyle = 7;
public static int AppCompatTheme_actionBarTabBarStyle = 8;
public static int AppCompatTheme_actionBarTabStyle = 9;
public static int AppCompatTheme_actionBarTabTextStyle = 10;
public static int AppCompatTheme_actionBarTheme = 11;
public static int AppCompatTheme_actionBarWidgetTheme = 12;
public static int AppCompatTheme_actionButtonStyle = 13;
public static int AppCompatTheme_actionDropDownStyle = 14;
public static int AppCompatTheme_actionMenuTextAppearance = 15;
public static int AppCompatTheme_actionMenuTextColor = 16;
public static int AppCompatTheme_actionModeBackground = 17;
public static int AppCompatTheme_actionModeCloseButtonStyle = 18;
public static int AppCompatTheme_actionModeCloseContentDescription = 19;
public static int AppCompatTheme_actionModeCloseDrawable = 20;
public static int AppCompatTheme_actionModeCopyDrawable = 21;
public static int AppCompatTheme_actionModeCutDrawable = 22;
public static int AppCompatTheme_actionModeFindDrawable = 23;
public static int AppCompatTheme_actionModePasteDrawable = 24;
public static int AppCompatTheme_actionModePopupWindowStyle = 25;
public static int AppCompatTheme_actionModeSelectAllDrawable = 26;
public static int AppCompatTheme_actionModeShareDrawable = 27;
public static int AppCompatTheme_actionModeSplitBackground = 28;
public static int AppCompatTheme_actionModeStyle = 29;
public static int AppCompatTheme_actionModeTheme = 30;
public static int AppCompatTheme_actionModeWebSearchDrawable = 31;
public static int AppCompatTheme_actionOverflowButtonStyle = 32;
public static int AppCompatTheme_actionOverflowMenuStyle = 33;
public static int AppCompatTheme_activityChooserViewStyle = 34;
public static int AppCompatTheme_alertDialogButtonGroupStyle = 35;
public static int AppCompatTheme_alertDialogCenterButtons = 36;
public static int AppCompatTheme_alertDialogStyle = 37;
public static int AppCompatTheme_alertDialogTheme = 38;
public static int AppCompatTheme_android_windowAnimationStyle = 1;
public static int AppCompatTheme_android_windowIsFloating = 0;
public static int AppCompatTheme_autoCompleteTextViewStyle = 39;
public static int AppCompatTheme_borderlessButtonStyle = 40;
public static int AppCompatTheme_buttonBarButtonStyle = 41;
public static int AppCompatTheme_buttonBarNegativeButtonStyle = 42;
public static int AppCompatTheme_buttonBarNeutralButtonStyle = 43;
public static int AppCompatTheme_buttonBarPositiveButtonStyle = 44;
public static int AppCompatTheme_buttonBarStyle = 45;
public static int AppCompatTheme_buttonStyle = 46;
public static int AppCompatTheme_buttonStyleSmall = 47;
public static int AppCompatTheme_checkboxStyle = 48;
public static int AppCompatTheme_checkedTextViewStyle = 49;
public static int AppCompatTheme_colorAccent = 50;
public static int AppCompatTheme_colorBackgroundFloating = 51;
public static int AppCompatTheme_colorButtonNormal = 52;
public static int AppCompatTheme_colorControlActivated = 53;
public static int AppCompatTheme_colorControlHighlight = 54;
public static int AppCompatTheme_colorControlNormal = 55;
public static int AppCompatTheme_colorError = 56;
public static int AppCompatTheme_colorPrimary = 57;
public static int AppCompatTheme_colorPrimaryDark = 58;
public static int AppCompatTheme_colorSwitchThumbNormal = 59;
public static int AppCompatTheme_controlBackground = 60;
public static int AppCompatTheme_dialogCornerRadius = 61;
public static int AppCompatTheme_dialogPreferredPadding = 62;
public static int AppCompatTheme_dialogTheme = 63;
public static int AppCompatTheme_dividerHorizontal = 64;
public static int AppCompatTheme_dividerVertical = 65;
public static int AppCompatTheme_dropDownListViewStyle = 66;
public static int AppCompatTheme_dropdownListPreferredItemHeight = 67;
public static int AppCompatTheme_editTextBackground = 68;
public static int AppCompatTheme_editTextColor = 69;
public static int AppCompatTheme_editTextStyle = 70;
public static int AppCompatTheme_homeAsUpIndicator = 71;
public static int AppCompatTheme_imageButtonStyle = 72;
public static int AppCompatTheme_listChoiceBackgroundIndicator = 73;
public static int AppCompatTheme_listChoiceIndicatorMultipleAnimated = 74;
public static int AppCompatTheme_listChoiceIndicatorSingleAnimated = 75;
public static int AppCompatTheme_listDividerAlertDialog = 76;
public static int AppCompatTheme_listMenuViewStyle = 77;
public static int AppCompatTheme_listPopupWindowStyle = 78;
public static int AppCompatTheme_listPreferredItemHeight = 79;
public static int AppCompatTheme_listPreferredItemHeightLarge = 80;
public static int AppCompatTheme_listPreferredItemHeightSmall = 81;
public static int AppCompatTheme_listPreferredItemPaddingEnd = 82;
public static int AppCompatTheme_listPreferredItemPaddingLeft = 83;
public static int AppCompatTheme_listPreferredItemPaddingRight = 84;
public static int AppCompatTheme_listPreferredItemPaddingStart = 85;
public static int AppCompatTheme_panelBackground = 86;
public static int AppCompatTheme_panelMenuListTheme = 87;
public static int AppCompatTheme_panelMenuListWidth = 88;
public static int AppCompatTheme_popupMenuStyle = 89;
public static int AppCompatTheme_popupWindowStyle = 90;
public static int AppCompatTheme_radioButtonStyle = 91;
public static int AppCompatTheme_ratingBarStyle = 92;
public static int AppCompatTheme_ratingBarStyleIndicator = 93;
public static int AppCompatTheme_ratingBarStyleSmall = 94;
public static int AppCompatTheme_searchViewStyle = 95;
public static int AppCompatTheme_seekBarStyle = 96;
public static int AppCompatTheme_selectableItemBackground = 97;
public static int AppCompatTheme_selectableItemBackgroundBorderless = 98;
public static int AppCompatTheme_spinnerDropDownItemStyle = 99;
public static int AppCompatTheme_spinnerStyle = 100;
public static int AppCompatTheme_switchStyle = 101;
public static int AppCompatTheme_textAppearanceLargePopupMenu = 102;
public static int AppCompatTheme_textAppearanceListItem = 103;
public static int AppCompatTheme_textAppearanceListItemSecondary = 104;
public static int AppCompatTheme_textAppearanceListItemSmall = 105;
public static int AppCompatTheme_textAppearancePopupMenuHeader = 106;
public static int AppCompatTheme_textAppearanceSearchResultSubtitle = 107;
public static int AppCompatTheme_textAppearanceSearchResultTitle = 108;
public static int AppCompatTheme_textAppearanceSmallPopupMenu = 109;
public static int AppCompatTheme_textColorAlertDialogListItem = 110;
public static int AppCompatTheme_textColorSearchUrl = 111;
public static int AppCompatTheme_toolbarNavigationButtonStyle = 112;
public static int AppCompatTheme_toolbarStyle = 113;
public static int AppCompatTheme_tooltipForegroundColor = 114;
public static int AppCompatTheme_tooltipFrameBackground = 115;
public static int AppCompatTheme_viewInflaterClass = 116;
public static int AppCompatTheme_windowActionBar = 117;
public static int AppCompatTheme_windowActionBarOverlay = 118;
public static int AppCompatTheme_windowActionModeOverlay = 119;
public static int AppCompatTheme_windowFixedHeightMajor = 120;
public static int AppCompatTheme_windowFixedHeightMinor = 121;
public static int AppCompatTheme_windowFixedWidthMajor = 122;
public static int AppCompatTheme_windowFixedWidthMinor = 123;
public static int AppCompatTheme_windowMinWidthMajor = 124;
public static int AppCompatTheme_windowMinWidthMinor = 125;
public static int AppCompatTheme_windowNoTitle = 126;
public static int ButtonBarLayout_allowStacking = 0;
public static int ColorStateListItem_alpha = 3;
public static int ColorStateListItem_android_alpha = 1;
public static int ColorStateListItem_android_color = 0;
public static int ColorStateListItem_android_lStar = 2;
public static int ColorStateListItem_lStar = 4;
public static int CompoundButton_android_button = 0;
public static int CompoundButton_buttonCompat = 1;
public static int CompoundButton_buttonTint = 2;
public static int CompoundButton_buttonTintMode = 3;
public static int CoordinatorLayout_Layout_android_layout_gravity = 0;
public static int CoordinatorLayout_Layout_layout_anchor = 1;
public static int CoordinatorLayout_Layout_layout_anchorGravity = 2;
public static int CoordinatorLayout_Layout_layout_behavior = 3;
public static int CoordinatorLayout_Layout_layout_dodgeInsetEdges = 4;
public static int CoordinatorLayout_Layout_layout_insetEdge = 5;
public static int CoordinatorLayout_Layout_layout_keyline = 6;
public static int CoordinatorLayout_keylines = 0;
public static int CoordinatorLayout_statusBarBackground = 1;
public static int DrawerArrowToggle_arrowHeadLength = 0;
public static int DrawerArrowToggle_arrowShaftLength = 1;
public static int DrawerArrowToggle_barLength = 2;
public static int DrawerArrowToggle_color = 3;
public static int DrawerArrowToggle_drawableSize = 4;
public static int DrawerArrowToggle_gapBetweenBars = 5;
public static int DrawerArrowToggle_spinBars = 6;
public static int DrawerArrowToggle_thickness = 7;
public static int FontFamilyFont_android_font = 0;
public static int FontFamilyFont_android_fontStyle = 2;
public static int FontFamilyFont_android_fontVariationSettings = 4;
public static int FontFamilyFont_android_fontWeight = 1;
public static int FontFamilyFont_android_ttcIndex = 3;
public static int FontFamilyFont_font = 5;
public static int FontFamilyFont_fontStyle = 6;
public static int FontFamilyFont_fontVariationSettings = 7;
public static int FontFamilyFont_fontWeight = 8;
public static int FontFamilyFont_ttcIndex = 9;
public static int FontFamily_fontProviderAuthority = 0;
public static int FontFamily_fontProviderCerts = 1;
public static int FontFamily_fontProviderFallbackQuery = 2;
public static int FontFamily_fontProviderFetchStrategy = 3;
public static int FontFamily_fontProviderFetchTimeout = 4;
public static int FontFamily_fontProviderPackage = 5;
public static int FontFamily_fontProviderQuery = 6;
public static int FontFamily_fontProviderSystemFontFamily = 7;
public static int GradientColorItem_android_color = 0;
public static int GradientColorItem_android_offset = 1;
public static int GradientColor_android_centerColor = 7;
public static int GradientColor_android_centerX = 3;
public static int GradientColor_android_centerY = 4;
public static int GradientColor_android_endColor = 1;
public static int GradientColor_android_endX = 10;
public static int GradientColor_android_endY = 11;
public static int GradientColor_android_gradientRadius = 5;
public static int GradientColor_android_startColor = 0;
public static int GradientColor_android_startX = 8;
public static int GradientColor_android_startY = 9;
public static int GradientColor_android_tileMode = 6;
public static int GradientColor_android_type = 2;
public static int LinearLayoutCompat_Layout_android_layout_gravity = 0;
public static int LinearLayoutCompat_Layout_android_layout_height = 2;
public static int LinearLayoutCompat_Layout_android_layout_weight = 3;
public static int LinearLayoutCompat_Layout_android_layout_width = 1;
public static int LinearLayoutCompat_android_baselineAligned = 2;
public static int LinearLayoutCompat_android_baselineAlignedChildIndex = 3;
public static int LinearLayoutCompat_android_gravity = 0;
public static int LinearLayoutCompat_android_orientation = 1;
public static int LinearLayoutCompat_android_weightSum = 4;
public static int LinearLayoutCompat_divider = 5;
public static int LinearLayoutCompat_dividerPadding = 6;
public static int LinearLayoutCompat_measureWithLargestChild = 7;
public static int LinearLayoutCompat_showDividers = 8;
public static int ListPopupWindow_android_dropDownHorizontalOffset = 0;
public static int ListPopupWindow_android_dropDownVerticalOffset = 1;
public static int MenuGroup_android_checkableBehavior = 5;
public static int MenuGroup_android_enabled = 0;
public static int MenuGroup_android_id = 1;
public static int MenuGroup_android_menuCategory = 3;
public static int MenuGroup_android_orderInCategory = 4;
public static int MenuGroup_android_visible = 2;
public static int MenuItem_actionLayout = 13;
public static int MenuItem_actionProviderClass = 14;
public static int MenuItem_actionViewClass = 15;
public static int MenuItem_alphabeticModifiers = 16;
public static int MenuItem_android_alphabeticShortcut = 9;
public static int MenuItem_android_checkable = 11;
public static int MenuItem_android_checked = 3;
public static int MenuItem_android_enabled = 1;
public static int MenuItem_android_icon = 0;
public static int MenuItem_android_id = 2;
public static int MenuItem_android_menuCategory = 5;
public static int MenuItem_android_numericShortcut = 10;
public static int MenuItem_android_onClick = 12;
public static int MenuItem_android_orderInCategory = 6;
public static int MenuItem_android_title = 7;
public static int MenuItem_android_titleCondensed = 8;
public static int MenuItem_android_visible = 4;
public static int MenuItem_contentDescription = 17;
public static int MenuItem_iconTint = 18;
public static int MenuItem_iconTintMode = 19;
public static int MenuItem_numericModifiers = 20;
public static int MenuItem_showAsAction = 21;
public static int MenuItem_tooltipText = 22;
public static int MenuView_android_headerBackground = 4;
public static int MenuView_android_horizontalDivider = 2;
public static int MenuView_android_itemBackground = 5;
public static int MenuView_android_itemIconDisabledAlpha = 6;
public static int MenuView_android_itemTextAppearance = 1;
public static int MenuView_android_verticalDivider = 3;
public static int MenuView_android_windowAnimationStyle = 0;
public static int MenuView_preserveIconSpacing = 7;
public static int MenuView_subMenuArrow = 8;
public static int PopupWindowBackgroundState_state_above_anchor = 0;
public static int PopupWindow_android_popupAnimationStyle = 1;
public static int PopupWindow_android_popupBackground = 0;
public static int PopupWindow_overlapAnchor = 2;
public static int RecycleListView_paddingBottomNoButtons = 0;
public static int RecycleListView_paddingTopNoTitle = 1;
public static int SearchView_android_focusable = 0;
public static int SearchView_android_imeOptions = 3;
public static int SearchView_android_inputType = 2;
public static int SearchView_android_maxWidth = 1;
public static int SearchView_closeIcon = 4;
public static int SearchView_commitIcon = 5;
public static int SearchView_defaultQueryHint = 6;
public static int SearchView_goIcon = 7;
public static int SearchView_iconifiedByDefault = 8;
public static int SearchView_layout = 9;
public static int SearchView_queryBackground = 10;
public static int SearchView_queryHint = 11;
public static int SearchView_searchHintIcon = 12;
public static int SearchView_searchIcon = 13;
public static int SearchView_submitBackground = 14;
public static int SearchView_suggestionRowLayout = 15;
public static int SearchView_voiceIcon = 16;
public static int Spinner_android_dropDownWidth = 3;
public static int Spinner_android_entries = 0;
public static int Spinner_android_popupBackground = 1;
public static int Spinner_android_prompt = 2;
public static int Spinner_popupTheme = 4;
public static int StateListDrawableItem_android_drawable = 0;
public static int StateListDrawable_android_constantSize = 3;
public static int StateListDrawable_android_dither = 0;
public static int StateListDrawable_android_enterFadeDuration = 4;
public static int StateListDrawable_android_exitFadeDuration = 5;
public static int StateListDrawable_android_variablePadding = 2;
public static int StateListDrawable_android_visible = 1;
public static int SwitchCompat_android_textOff = 1;
public static int SwitchCompat_android_textOn = 0;
public static int SwitchCompat_android_thumb = 2;
public static int SwitchCompat_showText = 3;
public static int SwitchCompat_splitTrack = 4;
public static int SwitchCompat_switchMinWidth = 5;
public static int SwitchCompat_switchPadding = 6;
public static int SwitchCompat_switchTextAppearance = 7;
public static int SwitchCompat_thumbTextPadding = 8;
public static int SwitchCompat_thumbTint = 9;
public static int SwitchCompat_thumbTintMode = 10;
public static int SwitchCompat_track = 11;
public static int SwitchCompat_trackTint = 12;
public static int SwitchCompat_trackTintMode = 13;
public static int TextAppearance_android_fontFamily = 10;
public static int TextAppearance_android_shadowColor = 6;
public static int TextAppearance_android_shadowDx = 7;
public static int TextAppearance_android_shadowDy = 8;
public static int TextAppearance_android_shadowRadius = 9;
public static int TextAppearance_android_textColor = 3;
public static int TextAppearance_android_textColorHint = 4;
public static int TextAppearance_android_textColorLink = 5;
public static int TextAppearance_android_textFontWeight = 11;
public static int TextAppearance_android_textSize = 0;
public static int TextAppearance_android_textStyle = 2;
public static int TextAppearance_android_typeface = 1;
public static int TextAppearance_fontFamily = 12;
public static int TextAppearance_fontVariationSettings = 13;
public static int TextAppearance_textAllCaps = 14;
public static int TextAppearance_textLocale = 15;
public static int Toolbar_android_gravity = 0;
public static int Toolbar_android_minHeight = 1;
public static int Toolbar_buttonGravity = 2;
public static int Toolbar_collapseContentDescription = 3;
public static int Toolbar_collapseIcon = 4;
public static int Toolbar_contentInsetEnd = 5;
public static int Toolbar_contentInsetEndWithActions = 6;
public static int Toolbar_contentInsetLeft = 7;
public static int Toolbar_contentInsetRight = 8;
public static int Toolbar_contentInsetStart = 9;
public static int Toolbar_contentInsetStartWithNavigation = 10;
public static int Toolbar_logo = 11;
public static int Toolbar_logoDescription = 12;
public static int Toolbar_maxButtonHeight = 13;
public static int Toolbar_menu = 14;
public static int Toolbar_navigationContentDescription = 15;
public static int Toolbar_navigationIcon = 16;
public static int Toolbar_popupTheme = 17;
public static int Toolbar_subtitle = 18;
public static int Toolbar_subtitleTextAppearance = 19;
public static int Toolbar_subtitleTextColor = 20;
public static int Toolbar_title = 21;
public static int Toolbar_titleMargin = 22;
public static int Toolbar_titleMarginBottom = 23;
public static int Toolbar_titleMarginEnd = 24;
public static int Toolbar_titleMarginStart = 25;
public static int Toolbar_titleMarginTop = 26;
public static int Toolbar_titleMargins = 27;
public static int Toolbar_titleTextAppearance = 28;
public static int Toolbar_titleTextColor = 29;
public static int ViewBackgroundHelper_android_background = 0;
public static int ViewBackgroundHelper_backgroundTint = 1;
public static int ViewBackgroundHelper_backgroundTintMode = 2;
public static int ViewStubCompat_android_id = 0;
public static int ViewStubCompat_android_inflatedId = 2;
public static int ViewStubCompat_android_layout = 1;
public static int View_android_focusable = 1;
public static int View_android_theme = 0;
public static int View_paddingEnd = 2;
public static int View_paddingStart = 3;
public static int View_theme = 4;
public static int[] ActionBar = {R.attr.background, R.attr.backgroundSplit, R.attr.backgroundStacked, R.attr.contentInsetEnd, R.attr.contentInsetEndWithActions, R.attr.contentInsetLeft, R.attr.contentInsetRight, R.attr.contentInsetStart, R.attr.contentInsetStartWithNavigation, R.attr.customNavigationLayout, R.attr.displayOptions, R.attr.divider, R.attr.elevation, R.attr.height, R.attr.hideOnContentScroll, R.attr.homeAsUpIndicator, R.attr.homeLayout, R.attr.icon, R.attr.indeterminateProgressStyle, R.attr.itemPadding, R.attr.logo, R.attr.navigationMode, R.attr.popupTheme, R.attr.progressBarPadding, R.attr.progressBarStyle, R.attr.subtitle, R.attr.subtitleTextStyle, R.attr.title, R.attr.titleTextStyle};
public static int[] ActionBarLayout = {android.R.attr.layout_gravity};
public static int[] ActionMenuItemView = {android.R.attr.minWidth};
public static int[] ActionMenuView = new int[0];
public static int[] ActionMode = {R.attr.background, R.attr.backgroundSplit, R.attr.closeItemLayout, R.attr.height, R.attr.subtitleTextStyle, R.attr.titleTextStyle};
public static int[] ActivityChooserView = {R.attr.expandActivityOverflowButtonDrawable, R.attr.initialActivityCount};
public static int[] AlertDialog = {android.R.attr.layout, R.attr.buttonIconDimen, R.attr.buttonPanelSideLayout, R.attr.listItemLayout, R.attr.listLayout, R.attr.multiChoiceItemLayout, R.attr.showTitle, R.attr.singleChoiceItemLayout};
public static int[] AnimatedStateListDrawableCompat = {android.R.attr.dither, android.R.attr.visible, android.R.attr.variablePadding, android.R.attr.constantSize, android.R.attr.enterFadeDuration, android.R.attr.exitFadeDuration};
public static int[] AnimatedStateListDrawableItem = {android.R.attr.id, android.R.attr.drawable};
public static int[] AnimatedStateListDrawableTransition = {android.R.attr.drawable, android.R.attr.toId, android.R.attr.fromId, android.R.attr.reversible};
public static int[] AppCompatImageView = {android.R.attr.src, R.attr.srcCompat, R.attr.tint, R.attr.tintMode};
public static int[] AppCompatSeekBar = {android.R.attr.thumb, R.attr.tickMark, R.attr.tickMarkTint, R.attr.tickMarkTintMode};
public static int[] AppCompatTextHelper = {android.R.attr.textAppearance, android.R.attr.drawableTop, android.R.attr.drawableBottom, android.R.attr.drawableLeft, android.R.attr.drawableRight, android.R.attr.drawableStart, android.R.attr.drawableEnd};
public static int[] AppCompatTextView = {android.R.attr.textAppearance, R.attr.autoSizeMaxTextSize, R.attr.autoSizeMinTextSize, R.attr.autoSizePresetSizes, R.attr.autoSizeStepGranularity, R.attr.autoSizeTextType, R.attr.drawableBottomCompat, R.attr.drawableEndCompat, R.attr.drawableLeftCompat, R.attr.drawableRightCompat, R.attr.drawableStartCompat, R.attr.drawableTint, R.attr.drawableTintMode, R.attr.drawableTopCompat, R.attr.emojiCompatEnabled, R.attr.firstBaselineToTopHeight, R.attr.fontFamily, R.attr.fontVariationSettings, R.attr.lastBaselineToBottomHeight, R.attr.lineHeight, R.attr.textAllCaps, R.attr.textLocale};
public static int[] AppCompatTheme = {android.R.attr.windowIsFloating, android.R.attr.windowAnimationStyle, R.attr.actionBarDivider, R.attr.actionBarItemBackground, R.attr.actionBarPopupTheme, R.attr.actionBarSize, R.attr.actionBarSplitStyle, R.attr.actionBarStyle, R.attr.actionBarTabBarStyle, R.attr.actionBarTabStyle, R.attr.actionBarTabTextStyle, R.attr.actionBarTheme, R.attr.actionBarWidgetTheme, R.attr.actionButtonStyle, R.attr.actionDropDownStyle, R.attr.actionMenuTextAppearance, R.attr.actionMenuTextColor, R.attr.actionModeBackground, R.attr.actionModeCloseButtonStyle, R.attr.actionModeCloseContentDescription, R.attr.actionModeCloseDrawable, R.attr.actionModeCopyDrawable, R.attr.actionModeCutDrawable, R.attr.actionModeFindDrawable, R.attr.actionModePasteDrawable, R.attr.actionModePopupWindowStyle, R.attr.actionModeSelectAllDrawable, R.attr.actionModeShareDrawable, R.attr.actionModeSplitBackground, R.attr.actionModeStyle, R.attr.actionModeTheme, R.attr.actionModeWebSearchDrawable, R.attr.actionOverflowButtonStyle, R.attr.actionOverflowMenuStyle, R.attr.activityChooserViewStyle, R.attr.alertDialogButtonGroupStyle, R.attr.alertDialogCenterButtons, R.attr.alertDialogStyle, R.attr.alertDialogTheme, R.attr.autoCompleteTextViewStyle, R.attr.borderlessButtonStyle, R.attr.buttonBarButtonStyle, R.attr.buttonBarNegativeButtonStyle, R.attr.buttonBarNeutralButtonStyle, R.attr.buttonBarPositiveButtonStyle, R.attr.buttonBarStyle, R.attr.buttonStyle, R.attr.buttonStyleSmall, R.attr.checkboxStyle, R.attr.checkedTextViewStyle, R.attr.colorAccent, R.attr.colorBackgroundFloating, R.attr.colorButtonNormal, R.attr.colorControlActivated, R.attr.colorControlHighlight, R.attr.colorControlNormal, R.attr.colorError, R.attr.colorPrimary, R.attr.colorPrimaryDark, R.attr.colorSwitchThumbNormal, R.attr.controlBackground, R.attr.dialogCornerRadius, R.attr.dialogPreferredPadding, R.attr.dialogTheme, R.attr.dividerHorizontal, R.attr.dividerVertical, R.attr.dropDownListViewStyle, R.attr.dropdownListPreferredItemHeight, R.attr.editTextBackground, R.attr.editTextColor, R.attr.editTextStyle, R.attr.homeAsUpIndicator, R.attr.imageButtonStyle, R.attr.listChoiceBackgroundIndicator, R.attr.listChoiceIndicatorMultipleAnimated, R.attr.listChoiceIndicatorSingleAnimated, R.attr.listDividerAlertDialog, R.attr.listMenuViewStyle, R.attr.listPopupWindowStyle, R.attr.listPreferredItemHeight, R.attr.listPreferredItemHeightLarge, R.attr.listPreferredItemHeightSmall, R.attr.listPreferredItemPaddingEnd, R.attr.listPreferredItemPaddingLeft, R.attr.listPreferredItemPaddingRight, R.attr.listPreferredItemPaddingStart, R.attr.panelBackground, R.attr.panelMenuListTheme, R.attr.panelMenuListWidth, R.attr.popupMenuStyle, R.attr.popupWindowStyle, R.attr.radioButtonStyle, R.attr.ratingBarStyle, R.attr.ratingBarStyleIndicator, R.attr.ratingBarStyleSmall, R.attr.searchViewStyle, R.attr.seekBarStyle, R.attr.selectableItemBackground, R.attr.selectableItemBackgroundBorderless, R.attr.spinnerDropDownItemStyle, R.attr.spinnerStyle, R.attr.switchStyle, R.attr.textAppearanceLargePopupMenu, R.attr.textAppearanceListItem, R.attr.textAppearanceListItemSecondary, R.attr.textAppearanceListItemSmall, R.attr.textAppearancePopupMenuHeader, R.attr.textAppearanceSearchResultSubtitle, R.attr.textAppearanceSearchResultTitle, R.attr.textAppearanceSmallPopupMenu, R.attr.textColorAlertDialogListItem, R.attr.textColorSearchUrl, R.attr.toolbarNavigationButtonStyle, R.attr.toolbarStyle, R.attr.tooltipForegroundColor, R.attr.tooltipFrameBackground, R.attr.viewInflaterClass, R.attr.windowActionBar, R.attr.windowActionBarOverlay, R.attr.windowActionModeOverlay, R.attr.windowFixedHeightMajor, R.attr.windowFixedHeightMinor, R.attr.windowFixedWidthMajor, R.attr.windowFixedWidthMinor, R.attr.windowMinWidthMajor, R.attr.windowMinWidthMinor, R.attr.windowNoTitle};
public static int[] ButtonBarLayout = {R.attr.allowStacking};
public static int[] ColorStateListItem = {android.R.attr.color, android.R.attr.alpha, android.R.attr.lStar, R.attr.alpha, R.attr.lStar};
public static int[] CompoundButton = {android.R.attr.button, R.attr.buttonCompat, R.attr.buttonTint, R.attr.buttonTintMode};
public static int[] CoordinatorLayout = {R.attr.keylines, R.attr.statusBarBackground};
public static int[] CoordinatorLayout_Layout = {android.R.attr.layout_gravity, R.attr.layout_anchor, R.attr.layout_anchorGravity, R.attr.layout_behavior, R.attr.layout_dodgeInsetEdges, R.attr.layout_insetEdge, R.attr.layout_keyline};
public static int[] DrawerArrowToggle = {R.attr.arrowHeadLength, R.attr.arrowShaftLength, R.attr.barLength, R.attr.color, R.attr.drawableSize, R.attr.gapBetweenBars, R.attr.spinBars, R.attr.thickness};
public static int[] FontFamily = {R.attr.fontProviderAuthority, R.attr.fontProviderCerts, R.attr.fontProviderFallbackQuery, R.attr.fontProviderFetchStrategy, R.attr.fontProviderFetchTimeout, R.attr.fontProviderPackage, R.attr.fontProviderQuery, R.attr.fontProviderSystemFontFamily};
public static int[] FontFamilyFont = {android.R.attr.font, android.R.attr.fontWeight, android.R.attr.fontStyle, android.R.attr.ttcIndex, android.R.attr.fontVariationSettings, R.attr.font, R.attr.fontStyle, R.attr.fontVariationSettings, R.attr.fontWeight, R.attr.ttcIndex};
public static int[] GradientColor = {android.R.attr.startColor, android.R.attr.endColor, android.R.attr.type, android.R.attr.centerX, android.R.attr.centerY, android.R.attr.gradientRadius, android.R.attr.tileMode, android.R.attr.centerColor, android.R.attr.startX, android.R.attr.startY, android.R.attr.endX, android.R.attr.endY};
public static int[] GradientColorItem = {android.R.attr.color, android.R.attr.offset};
public static int[] LinearLayoutCompat = {android.R.attr.gravity, android.R.attr.orientation, android.R.attr.baselineAligned, android.R.attr.baselineAlignedChildIndex, android.R.attr.weightSum, R.attr.divider, R.attr.dividerPadding, R.attr.measureWithLargestChild, R.attr.showDividers};
public static int[] LinearLayoutCompat_Layout = {android.R.attr.layout_gravity, android.R.attr.layout_width, android.R.attr.layout_height, android.R.attr.layout_weight};
public static int[] ListPopupWindow = {android.R.attr.dropDownHorizontalOffset, android.R.attr.dropDownVerticalOffset};
public static int[] MenuGroup = {android.R.attr.enabled, android.R.attr.id, android.R.attr.visible, android.R.attr.menuCategory, android.R.attr.orderInCategory, android.R.attr.checkableBehavior};
public static int[] MenuItem = {android.R.attr.icon, android.R.attr.enabled, android.R.attr.id, android.R.attr.checked, android.R.attr.visible, android.R.attr.menuCategory, android.R.attr.orderInCategory, android.R.attr.title, android.R.attr.titleCondensed, android.R.attr.alphabeticShortcut, android.R.attr.numericShortcut, android.R.attr.checkable, android.R.attr.onClick, R.attr.actionLayout, R.attr.actionProviderClass, R.attr.actionViewClass, R.attr.alphabeticModifiers, R.attr.contentDescription, R.attr.iconTint, R.attr.iconTintMode, R.attr.numericModifiers, R.attr.showAsAction, R.attr.tooltipText};
public static int[] MenuView = {android.R.attr.windowAnimationStyle, android.R.attr.itemTextAppearance, android.R.attr.horizontalDivider, android.R.attr.verticalDivider, android.R.attr.headerBackground, android.R.attr.itemBackground, android.R.attr.itemIconDisabledAlpha, R.attr.preserveIconSpacing, R.attr.subMenuArrow};
public static int[] PopupWindow = {android.R.attr.popupBackground, android.R.attr.popupAnimationStyle, R.attr.overlapAnchor};
public static int[] PopupWindowBackgroundState = {R.attr.state_above_anchor};
public static int[] RecycleListView = {R.attr.paddingBottomNoButtons, R.attr.paddingTopNoTitle};
public static int[] SearchView = {android.R.attr.focusable, android.R.attr.maxWidth, android.R.attr.inputType, android.R.attr.imeOptions, R.attr.closeIcon, R.attr.commitIcon, R.attr.defaultQueryHint, R.attr.goIcon, R.attr.iconifiedByDefault, R.attr.layout, R.attr.queryBackground, R.attr.queryHint, R.attr.searchHintIcon, R.attr.searchIcon, R.attr.submitBackground, R.attr.suggestionRowLayout, R.attr.voiceIcon};
public static int[] Spinner = {android.R.attr.entries, android.R.attr.popupBackground, android.R.attr.prompt, android.R.attr.dropDownWidth, R.attr.popupTheme};
public static int[] StateListDrawable = {android.R.attr.dither, android.R.attr.visible, android.R.attr.variablePadding, android.R.attr.constantSize, android.R.attr.enterFadeDuration, android.R.attr.exitFadeDuration};
public static int[] StateListDrawableItem = {android.R.attr.drawable};
public static int[] SwitchCompat = {android.R.attr.textOn, android.R.attr.textOff, android.R.attr.thumb, R.attr.showText, R.attr.splitTrack, R.attr.switchMinWidth, R.attr.switchPadding, R.attr.switchTextAppearance, R.attr.thumbTextPadding, R.attr.thumbTint, R.attr.thumbTintMode, R.attr.track, R.attr.trackTint, R.attr.trackTintMode};
public static int[] TextAppearance = {android.R.attr.textSize, android.R.attr.typeface, android.R.attr.textStyle, android.R.attr.textColor, android.R.attr.textColorHint, android.R.attr.textColorLink, android.R.attr.shadowColor, android.R.attr.shadowDx, android.R.attr.shadowDy, android.R.attr.shadowRadius, android.R.attr.fontFamily, android.R.attr.textFontWeight, R.attr.fontFamily, R.attr.fontVariationSettings, R.attr.textAllCaps, R.attr.textLocale};
public static int[] Toolbar = {android.R.attr.gravity, android.R.attr.minHeight, R.attr.buttonGravity, R.attr.collapseContentDescription, R.attr.collapseIcon, R.attr.contentInsetEnd, R.attr.contentInsetEndWithActions, R.attr.contentInsetLeft, R.attr.contentInsetRight, R.attr.contentInsetStart, R.attr.contentInsetStartWithNavigation, R.attr.logo, R.attr.logoDescription, R.attr.maxButtonHeight, R.attr.menu, R.attr.navigationContentDescription, R.attr.navigationIcon, R.attr.popupTheme, R.attr.subtitle, R.attr.subtitleTextAppearance, R.attr.subtitleTextColor, R.attr.title, R.attr.titleMargin, R.attr.titleMarginBottom, R.attr.titleMarginEnd, R.attr.titleMarginStart, R.attr.titleMarginTop, R.attr.titleMargins, R.attr.titleTextAppearance, R.attr.titleTextColor};
public static int[] View = {android.R.attr.theme, android.R.attr.focusable, R.attr.paddingEnd, R.attr.paddingStart, R.attr.theme};
public static int[] ViewBackgroundHelper = {android.R.attr.background, R.attr.backgroundTint, R.attr.backgroundTintMode};
public static int[] ViewStubCompat = {android.R.attr.id, android.R.attr.layout, android.R.attr.inflatedId};
}

View File

@@ -0,0 +1,14 @@
package com.helpshift.activities;
/* loaded from: classes3.dex */
public interface FragmentTransactionListener {
void changeStatusBarColor(String str);
void closeHelpcenter();
void closeWebchat();
void handleBackPress(boolean z);
void openWebchat();
}

View File

@@ -0,0 +1,79 @@
package com.helpshift.activities;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import com.helpshift.R$id;
import com.helpshift.R$layout;
import com.helpshift.log.LogCollector;
import com.helpshift.storage.HSPersistentStorage;
import com.helpshift.storage.SharedPreferencesStore;
import csdk.gluads.Consts;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.util.Arrays;
/* loaded from: classes3.dex */
public class HSDebugActivity extends AppCompatActivity {
private static final String TAG = "Helpshift_DebugAct";
@Override // androidx.fragment.app.FragmentActivity, androidx.activity.ComponentActivity, androidx.core.app.ComponentActivity, android.app.Activity
public void onCreate(@Nullable Bundle bundle) {
super.onCreate(bundle);
setContentView(R$layout.hs__debug_layout);
}
@Override // androidx.fragment.app.FragmentActivity, android.app.Activity
public void onResume() {
super.onResume();
TextView textView = (TextView) findViewById(R$id.debug_log_message);
textView.setText("Preparing logs...");
try {
HSPersistentStorage hSPersistentStorage = new HSPersistentStorage(new SharedPreferencesStore(this, "__hs_lite_sdk_store", 0));
String str = hSPersistentStorage.getDomain() + Consts.STRING_PERIOD + hSPersistentStorage.getHost();
String appName = getAppName();
File file = new File(getFilesDir() + File.separator + LogCollector.logDirPath);
StringBuilder sb = new StringBuilder();
File[] listFiles = file.listFiles();
if (file.exists() && listFiles != null && listFiles.length > 0) {
Arrays.sort(listFiles);
for (File file2 : listFiles) {
sb.append("Log File: ");
sb.append(file2.getName());
sb.append("\n \n");
BufferedReader bufferedReader = new BufferedReader(new FileReader(file2));
while (true) {
String readLine = bufferedReader.readLine();
if (readLine != null) {
sb.append(readLine);
sb.append("\n");
}
}
sb.append("\n \n");
}
}
Intent intent = new Intent("android.intent.action.SEND");
intent.setType("text/plain");
intent.putExtra("android.intent.extra.EMAIL", new String[]{"bugs@helpshift.com"});
intent.putExtra("android.intent.extra.TEXT", sb.toString());
intent.putExtra("android.intent.extra.SUBJECT", str + " / " + appName + " / " + getPackageName());
startActivity(Intent.createChooser(intent, "Send email..."));
finish();
} catch (Exception e) {
Log.e(TAG, "Error when sharing/reading log", e);
textView.setText("Error preparing logs: " + e.getMessage());
}
}
private String getAppName() {
try {
return getApplicationInfo().loadLabel(getPackageManager()).toString();
} catch (Exception unused) {
return "";
}
}
}

View File

@@ -0,0 +1,369 @@
package com.helpshift.activities;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;
import com.facebook.share.internal.ShareConstants;
import com.helpshift.R$anim;
import com.helpshift.R$drawable;
import com.helpshift.R$id;
import com.helpshift.R$layout;
import com.helpshift.chat.HSChatFragment;
import com.helpshift.config.HSConfigManager;
import com.helpshift.core.HSContext;
import com.helpshift.faq.HSHelpcenterFragment;
import com.helpshift.log.HSLogger;
import com.helpshift.util.ActivityUtil;
import com.helpshift.util.HSTimer;
import com.helpshift.util.ViewUtil;
import java.util.HashMap;
import java.util.List;
/* loaded from: classes3.dex */
public class HSMainActivity extends AppCompatActivity implements View.OnClickListener, FragmentTransactionListener {
private static final String TAG = "chatActvty";
private HSConfigManager configManager;
private ImageView errorImageView;
private FragmentManager fragmentManager;
private boolean isHelpcenterOpenedBefore;
private View retryView;
@Override // androidx.fragment.app.FragmentActivity, androidx.activity.ComponentActivity, androidx.core.app.ComponentActivity, android.app.Activity
public void onCreate(@Nullable Bundle bundle) {
try {
if (!HSContext.installCallSuccessful.get()) {
bundle = null;
}
super.onCreate(bundle);
if (!HSContext.installCallSuccessful.get()) {
Log.e(TAG, "Install call not successful, falling back to launcher activity");
ActivityUtil.startLauncherActivityAndFinish(this);
return;
}
HSLogger.d(TAG, "HSMainActivity onCreate after install call check");
setContentView(R$layout.hs__chat_activity_layout);
try {
setRequestedOrientation(HSContext.getInstance().getPersistentStorage().getRequestedScreenOrientation());
} catch (Exception e) {
HSLogger.e(TAG, "Error setting orientation.", e);
}
initViews();
HSContext hSContext = HSContext.getInstance();
HSContext.getInstance().getAnalyticsEventDM().sendAllAppLaunchEvents();
this.fragmentManager = getSupportFragmentManager();
this.configManager = hSContext.getConfigManager();
initService(getIntent(), false);
initStatusBarColorOnServiceChange();
} catch (Exception e2) {
Log.e(TAG, "Caught exception in HSMainActivity.onCreate()", e2);
if (HSContext.installCallSuccessful.get()) {
return;
}
ActivityUtil.startLauncherActivityAndFinish(this);
}
}
@Override // androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, android.app.Activity
public void onStart() {
super.onStart();
HSLogger.d(TAG, "HSMainActivity onStart");
HSContext hSContext = HSContext.getInstance();
hSContext.setSdkIsOpen(true);
hSContext.getHsEventProxy().sendEvent("helpshiftSessionStarted", new HashMap());
}
@Override // androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, android.app.Activity
public void onStop() {
super.onStop();
HSLogger.d(TAG, "HSMainActivity onStop");
HSContext hSContext = HSContext.getInstance();
hSContext.setSdkIsOpen(false);
hSContext.getHsEventProxy().sendEvent("helpshiftSessionEnded", new HashMap());
}
private void initViews() {
this.retryView = findViewById(R$id.hs__retry_view);
this.errorImageView = (ImageView) findViewById(R$id.hs__error_image);
findViewById(R$id.hs__retry_button).setOnClickListener(this);
findViewById(R$id.hs__retry_view_close_btn).setOnClickListener(this);
}
private void initService(Intent intent, boolean z) {
if (!areConditionsValidToStartService(intent)) {
showError();
return;
}
Bundle extras = intent.getExtras();
this.configManager.saveSDKSource(extras.getString(ShareConstants.FEED_SOURCE_PARAM));
if (isWebchatServiceRequested(extras)) {
startWebchatFlow(z, sourceRequestingWebchat(extras));
} else {
startHelpcenterFlow(intent, z);
}
hideError();
}
private void showError() {
ViewUtil.setVisibility(this.retryView, true);
}
private void hideError() {
ViewUtil.setVisibility(this.retryView, false);
}
private boolean isWebchatServiceRequested(Bundle bundle) {
return "WEBCHAT_SERVICE_FLAG".equalsIgnoreCase(bundle.getString("SERVICE_MODE"));
}
private String sourceRequestingWebchat(Bundle bundle) {
return bundle.getString(ShareConstants.FEED_SOURCE_PARAM);
}
private boolean isHelpcenterServiceRequested(Bundle bundle) {
return "HELP_CENTER_SERVICE_FLAG".equalsIgnoreCase(bundle.getString("SERVICE_MODE"));
}
private boolean areConditionsValidToStartService(Intent intent) {
if (intent.getExtras() == null) {
return false;
}
if (HSContext.getInstance().getDevice().isOnline()) {
return true;
}
this.errorImageView.setImageResource(R$drawable.hs__no_internet_icon);
return false;
}
public boolean isWebchatFragmentInStack() {
boolean z = getSupportFragmentManager().findFragmentByTag(HSChatFragment.TAG) != null;
HSLogger.d(TAG, "isWebchatFragmentInStack: " + z);
return z;
}
private void startWebchatFlow(boolean z, String str) {
HSLogger.d(TAG, "Trying to start webchat flow");
FragmentManager supportFragmentManager = getSupportFragmentManager();
Fragment findFragmentById = supportFragmentManager.findFragmentById(R$id.hs__container);
List<Fragment> fragments = supportFragmentManager.getFragments();
if (findFragmentById instanceof HSChatFragment) {
HSLogger.d(TAG, "HSChatFragment is at top of stack, resuming");
if ("proactive".equals(str)) {
HSLogger.d(TAG, "Update config with proactive outbound config in same webchat session");
((HSChatFragment) findFragmentById).setWebchatSourceChanged("proactive");
return;
}
return;
}
if ((findFragmentById instanceof HSHelpcenterFragment) && fragments != null && fragments.size() > 1) {
HSLogger.d(TAG, "HSHelpcenterFragment at top and HSChatFragment in stack, removing chat fragment");
FragmentTransaction beginTransaction = supportFragmentManager.beginTransaction();
Fragment findFragmentByTag = supportFragmentManager.findFragmentByTag(HSChatFragment.TAG);
if (findFragmentByTag != null) {
beginTransaction.remove(findFragmentByTag);
}
beginTransaction.commitAllowingStateLoss();
supportFragmentManager.executePendingTransactions();
}
HSLogger.d(TAG, "Creating new HSChatFragment: " + str + ", add to backstack: " + z);
Bundle bundle = new Bundle();
if ("api".equalsIgnoreCase(str)) {
bundle.putString(ShareConstants.FEED_SOURCE_PARAM, "api");
} else if (HSContext.getInstance().isIsWebchatOpenedFromHelpcenter()) {
HSTimer.setStartTime("helpcenter");
bundle.putString(ShareConstants.FEED_SOURCE_PARAM, "helpcenter");
} else if ("notification".equalsIgnoreCase(str)) {
HSTimer.setStartTime("notification");
bundle.putString(ShareConstants.FEED_SOURCE_PARAM, "notification");
}
HSChatFragment hSChatFragment = new HSChatFragment();
hSChatFragment.setArguments(bundle);
hSChatFragment.setTransactionListener(this);
FragmentTransaction beginTransaction2 = supportFragmentManager.beginTransaction();
if (z) {
this.isHelpcenterOpenedBefore = true;
int i = R$anim.hs__slide_up;
int i2 = R$anim.hs__slide_down;
beginTransaction2.setCustomAnimations(i, i2, i, i2);
}
beginTransaction2.add(R$id.hs__container, hSChatFragment, HSChatFragment.TAG);
if (z) {
beginTransaction2.addToBackStack(null);
}
beginTransaction2.commitAllowingStateLoss();
}
private void startHelpcenterFlow(Intent intent, boolean z) {
HSHelpcenterFragment newInstance = HSHelpcenterFragment.newInstance(intent.getExtras());
newInstance.setFragmentTransactionListener(this);
FragmentTransaction beginTransaction = this.fragmentManager.beginTransaction();
beginTransaction.add(R$id.hs__container, newInstance, HSHelpcenterFragment.TAG);
if (z) {
beginTransaction.addToBackStack(null);
}
beginTransaction.commitAllowingStateLoss();
}
@Override // androidx.activity.ComponentActivity, android.app.Activity
public void onNewIntent(Intent intent) {
super.onNewIntent(intent);
HSLogger.d(TAG, "HSMainActivity onNewIntent");
if (areConditionsValidToStartService(intent)) {
Bundle extras = intent.getExtras();
String string = extras.getString(ShareConstants.FEED_SOURCE_PARAM);
HSLogger.d(TAG, "HSMainActivity onNewIntent source: " + string);
this.configManager.saveSDKSource(string);
HSHelpcenterFragment helpcenterFragment = getHelpcenterFragment();
if (helpcenterFragment != null && isHelpcenterServiceRequested(extras)) {
helpcenterFragment.reloadIframe(extras);
} else {
initService(intent, true);
}
}
}
@Override // android.view.View.OnClickListener
public void onClick(View view) {
int id = view.getId();
if (id == R$id.hs__retry_view_close_btn) {
finish();
} else if (id == R$id.hs__retry_button) {
initService(getIntent(), false);
}
}
@Override // androidx.activity.ComponentActivity, android.app.Activity
public void onBackPressed() {
HSLogger.d(TAG, "HSMainActivity back press");
Fragment topFragment = getTopFragment();
if (topFragment == null) {
HSHelpcenterFragment hSHelpcenterFragment = (HSHelpcenterFragment) this.fragmentManager.findFragmentByTag(HSHelpcenterFragment.TAG);
if (hSHelpcenterFragment != null && hSHelpcenterFragment.canHelpcenterWebviewGoBack()) {
HSLogger.d(TAG, "HSMainActivity topFragment null, handle back from Helpcenter");
hSHelpcenterFragment.helpcenterWebviewGoBack();
return;
}
HSChatFragment hSChatFragment = (HSChatFragment) this.fragmentManager.findFragmentByTag(HSChatFragment.TAG);
if (hSChatFragment != null) {
HSLogger.d(TAG, "HSMainActivity topFragment null, handle back from Webchat");
hSChatFragment.handleBackPress();
return;
} else {
HSLogger.d(TAG, "HSMainActivity topFragment null, back press delegated to super");
super.onBackPressed();
return;
}
}
if (topFragment instanceof HSHelpcenterFragment) {
HSHelpcenterFragment hSHelpcenterFragment2 = (HSHelpcenterFragment) topFragment;
if (hSHelpcenterFragment2.canHelpcenterWebviewGoBack()) {
HSLogger.d(TAG, "HSMainActivity topFragment not null, handle back press with Helpcenter");
hSHelpcenterFragment2.helpcenterWebviewGoBack();
return;
}
} else if (topFragment instanceof HSChatFragment) {
HSLogger.d(TAG, "HSMainActivity topFragment not null, handle back press from Webchat");
((HSChatFragment) topFragment).handleBackPress();
return;
} else if (this.fragmentManager.getBackStackEntryCount() > 0) {
HSLogger.d(TAG, "HSMainActivity topFragment not null, popping backstack");
this.fragmentManager.popBackStack();
return;
}
HSLogger.d(TAG, "HSMainActivity all checks failed, back press delegated to super");
super.onBackPressed();
}
@Override // com.helpshift.activities.FragmentTransactionListener
public void handleBackPress(boolean z) {
if (z) {
return;
}
if (getTopFragment() == null) {
HSLogger.d(TAG, "HSMainActivity handleBackPress, back press delegated to super");
super.onBackPressed();
} else if (this.fragmentManager.getBackStackEntryCount() > 0) {
HSLogger.d(TAG, "HSMainActivity handleBackPress, popping backstack");
this.fragmentManager.popBackStack();
}
}
/* JADX INFO: Access modifiers changed from: private */
public Fragment getTopFragment() {
if (this.fragmentManager.getBackStackEntryCount() == 0) {
return null;
}
return this.fragmentManager.findFragmentById(R$id.hs__container);
}
private HSHelpcenterFragment getHelpcenterFragment() {
Fragment topFragment = getTopFragment();
if (topFragment == null) {
return (HSHelpcenterFragment) this.fragmentManager.findFragmentByTag(HSHelpcenterFragment.TAG);
}
if (topFragment instanceof HSHelpcenterFragment) {
return (HSHelpcenterFragment) topFragment;
}
return null;
}
@Override // androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, android.app.Activity
public void onDestroy() {
super.onDestroy();
HSLogger.d(TAG, "HSMainActivity onDestroy");
if (HSContext.installCallSuccessful.get()) {
HSContext.getInstance().getAnalyticsEventDM().sendQuitEvent();
}
}
@Override // com.helpshift.activities.FragmentTransactionListener
public void openWebchat() {
startWebchatFlow(true, "helpcenter");
}
@Override // com.helpshift.activities.FragmentTransactionListener
public void closeWebchat() {
onBackPressed();
}
@Override // com.helpshift.activities.FragmentTransactionListener
public void closeHelpcenter() {
onBackPressed();
}
private void initStatusBarColorOnServiceChange() {
FragmentManager fragmentManager = this.fragmentManager;
if (fragmentManager == null) {
return;
}
fragmentManager.addOnBackStackChangedListener(new FragmentManager.OnBackStackChangedListener() { // from class: com.helpshift.activities.HSMainActivity.1
@Override // androidx.fragment.app.FragmentManager.OnBackStackChangedListener
public void onBackStackChanged() {
Fragment topFragment = HSMainActivity.this.getTopFragment();
if (topFragment == null) {
HSMainActivity.this.updateStatusBarColor(false, true);
} else if (topFragment instanceof HSChatFragment) {
HSMainActivity.this.updateStatusBarColor(false, false);
} else if (topFragment instanceof HSHelpcenterFragment) {
HSMainActivity.this.updateStatusBarColor(true, false);
}
}
});
}
/* JADX INFO: Access modifiers changed from: private */
public void updateStatusBarColor(boolean z, boolean z2) {
changeStatusBarColor(((z2 && this.isHelpcenterOpenedBefore) || z) ? this.configManager.getUiConfigDataOfHelpcenter() : this.configManager.getUiConfigDataOfWebchat());
}
@Override // com.helpshift.activities.FragmentTransactionListener
public void changeStatusBarColor(String str) {
ViewUtil.setStatusBarColor(this, str);
}
}

View File

@@ -0,0 +1,231 @@
package com.helpshift.analytics;
import com.helpshift.concurrency.HSThreadingService;
import com.helpshift.log.HSLogger;
import com.helpshift.network.HSRequestData;
import com.helpshift.network.HTTPTransport;
import com.helpshift.network.NetworkConstants;
import com.helpshift.network.POSTNetwork;
import com.helpshift.network.exception.HSRootApiException;
import com.helpshift.platform.Device;
import com.helpshift.storage.HSPersistentStorage;
import com.helpshift.user.UserManager;
import com.helpshift.util.Utils;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.vungle.ads.internal.signals.SignalManager;
import java.util.HashMap;
import java.util.Map;
import org.json.JSONArray;
import org.json.JSONObject;
/* loaded from: classes3.dex */
public class HSAnalyticsEventDM {
public final HSWebchatAnalyticsManager analyticsManager;
public final Device device;
public final HSThreadingService hsServices;
public final HTTPTransport httpTransport;
public final HSPersistentStorage persistentStorage;
public final UserManager userManager;
public HSAnalyticsEventDM(Device device, UserManager userManager, HSPersistentStorage hSPersistentStorage, HSWebchatAnalyticsManager hSWebchatAnalyticsManager, HSThreadingService hSThreadingService, HTTPTransport hTTPTransport) {
this.device = device;
this.userManager = userManager;
this.persistentStorage = hSPersistentStorage;
this.analyticsManager = hSWebchatAnalyticsManager;
this.hsServices = hSThreadingService;
this.httpTransport = hTTPTransport;
}
public synchronized void sendAppLaunchEvent() {
long lastSuccessfulAppLaunchEventSyncTime = this.persistentStorage.getLastSuccessfulAppLaunchEventSyncTime();
long currentTimeMillis = System.currentTimeMillis();
addAppLaunchEventToStorage(currentTimeMillis);
if (currentTimeMillis > SignalManager.TWENTY_FOUR_HOURS_MILLIS + lastSuccessfulAppLaunchEventSyncTime && !Utils.isToday(lastSuccessfulAppLaunchEventSyncTime)) {
sendAppLaunchEventToServer(currentTimeMillis);
}
}
public synchronized void sendAllAppLaunchEvents() {
sendAppLaunchEventToServer(System.currentTimeMillis());
}
public final void sendAppLaunchEventToServer(final long j) {
final JSONArray consumeStoredAppLaunchEventsJson = consumeStoredAppLaunchEventsJson();
if (Utils.isEmpty(consumeStoredAppLaunchEventsJson)) {
return;
}
this.hsServices.getNetworkService().submit(new Runnable() { // from class: com.helpshift.analytics.HSAnalyticsEventDM.1
@Override // java.lang.Runnable
public void run() {
try {
int sendEventsToServer = HSAnalyticsEventDM.this.sendEventsToServer(consumeStoredAppLaunchEventsJson, false);
if (sendEventsToServer < 200 || sendEventsToServer >= 300) {
return;
}
HSAnalyticsEventDM.this.persistentStorage.setLastAppLaunchEventSyncTime(j);
} catch (HSRootApiException e) {
HSLogger.e("analyticsMngr", "Failed to send the app launch events", e);
}
}
});
}
public final int sendEventsToServer(JSONArray jSONArray, boolean z) {
if (Utils.isEmpty(jSONArray)) {
return 200;
}
try {
HSLogger.d("analyticsMngr", z ? "Syncing failed analytics events" : "Syncing analytics events");
Map buildEventRequestMap = buildEventRequestMap();
buildEventRequestMap.put("e", jSONArray.toString());
int status = new POSTNetwork(this.httpTransport, buildAnalyticsRoute()).makeRequest(new HSRequestData(NetworkConstants.buildHeaderMap(this.device, this.persistentStorage.getPlatformId()), buildEventRequestMap)).getStatus();
if ((status < 200 || status >= 300) && !z) {
updateFailedEventsStore(jSONArray);
}
return status;
} catch (HSRootApiException e) {
HSLogger.e("analyticsMngr", "Failed to send the events", e);
if (!z) {
updateFailedEventsStore(jSONArray);
}
throw e;
}
}
public void sendQuitEvent() {
final JSONArray jSONArray = new JSONArray();
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("ts", System.currentTimeMillis());
jSONObject.put("t", CampaignEx.JSON_KEY_AD_Q);
jSONArray.put(jSONObject);
this.hsServices.getNetworkService().submit(new Runnable() { // from class: com.helpshift.analytics.HSAnalyticsEventDM.2
@Override // java.lang.Runnable
public void run() {
try {
HSAnalyticsEventDM.this.sendEventsToServer(jSONArray, false);
} catch (HSRootApiException e) {
HSLogger.e("analyticsMngr", "Failed to send quit event", e);
}
}
});
} catch (Exception e) {
HSLogger.e("analyticsMngr", "Error in creating quit event", e);
}
}
public void sendFailedEvents() {
final JSONArray failedAnalyticsEvents = this.persistentStorage.getFailedAnalyticsEvents();
if (Utils.isEmpty(failedAnalyticsEvents)) {
return;
}
this.hsServices.getNetworkService().submit(new Runnable() { // from class: com.helpshift.analytics.HSAnalyticsEventDM.3
@Override // java.lang.Runnable
public void run() {
try {
int sendEventsToServer = HSAnalyticsEventDM.this.sendEventsToServer(failedAnalyticsEvents, true);
if (sendEventsToServer < 200 || sendEventsToServer >= 300) {
return;
}
HSAnalyticsEventDM.this.persistentStorage.setFailedAnalyticsEvents(new JSONArray());
} catch (HSRootApiException e) {
HSLogger.e("analyticsMngr", "Error trying to sync failed events", e);
}
}
});
}
public final void updateFailedEventsStore(JSONArray jSONArray) {
if (Utils.isEmpty(jSONArray)) {
return;
}
JSONArray failedAnalyticsEvents = this.persistentStorage.getFailedAnalyticsEvents();
if (failedAnalyticsEvents.length() > 1000) {
JSONArray jSONArray2 = new JSONArray();
for (int length = jSONArray.length(); length < 1000; length++) {
jSONArray2.put(failedAnalyticsEvents.get(length));
}
failedAnalyticsEvents = jSONArray2;
}
for (int i = 0; i < jSONArray.length(); i++) {
failedAnalyticsEvents.put(jSONArray.get(i));
}
this.persistentStorage.setFailedAnalyticsEvents(failedAnalyticsEvents);
}
public final void addAppLaunchEventToStorage(long j) {
JSONArray consumeStoredAppLaunchEventsJson = consumeStoredAppLaunchEventsJson();
if (consumeStoredAppLaunchEventsJson.length() >= 1000) {
this.persistentStorage.storeAppLaunchEvents(consumeStoredAppLaunchEventsJson.toString());
return;
}
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("ts", j);
jSONObject.put("t", "a");
consumeStoredAppLaunchEventsJson.put(jSONObject);
} catch (Exception e) {
HSLogger.e("analyticsMngr", "Error in adding app launch event to existing array", e);
}
this.persistentStorage.storeAppLaunchEvents(consumeStoredAppLaunchEventsJson.toString());
}
public final synchronized JSONArray consumeStoredAppLaunchEventsJson() {
JSONArray jSONArray;
JSONArray jSONArray2;
Exception e;
String appLaunchEvents;
jSONArray = new JSONArray();
try {
appLaunchEvents = this.persistentStorage.getAppLaunchEvents();
} catch (Exception e2) {
jSONArray2 = jSONArray;
e = e2;
}
if (!Utils.isEmpty(appLaunchEvents)) {
jSONArray2 = new JSONArray(appLaunchEvents);
try {
this.persistentStorage.clearAppLaunchEvents();
} catch (Exception e3) {
e = e3;
HSLogger.e("analyticsMngr", "Error in getting stored app launch events", e);
jSONArray = jSONArray2;
return jSONArray;
}
jSONArray = jSONArray2;
}
return jSONArray;
}
public final Map buildEventRequestMap() {
HashMap hashMap = new HashMap();
String deviceId = this.device.getDeviceId();
String activeUserId = this.userManager.getActiveUserId();
String legacyAnalyticsEventId = getLegacyAnalyticsEventId(activeUserId);
hashMap.put("did", deviceId);
if (!Utils.isEmpty(legacyAnalyticsEventId)) {
deviceId = legacyAnalyticsEventId;
}
hashMap.put("id", deviceId);
hashMap.put("timestamp", String.valueOf(System.currentTimeMillis()));
if (Utils.isNotEmpty(activeUserId)) {
hashMap.put("uid", activeUserId);
}
String activeUserEmail = this.userManager.getActiveUserEmail();
if (Utils.isNotEmpty(activeUserEmail)) {
hashMap.put("email", activeUserEmail);
}
hashMap.putAll(this.analyticsManager.getCommonAnalyticsMap());
hashMap.put("platform-id", this.persistentStorage.getPlatformId());
return hashMap;
}
public final String getLegacyAnalyticsEventId(String str) {
String string = this.persistentStorage.getString("legacy_event_ids");
return (Utils.isEmpty(string) || !Utils.isValidJsonString(string)) ? "" : new JSONObject(string).getString(str);
}
public final String buildAnalyticsRoute() {
return "https://api." + this.persistentStorage.getHost() + "/events/v1/" + this.persistentStorage.getDomain() + "/websdk/";
}
}

View File

@@ -0,0 +1,125 @@
package com.helpshift.analytics;
import com.helpshift.platform.Device;
import com.helpshift.storage.HSPersistentStorage;
import com.helpshift.util.Utils;
import java.util.HashMap;
import java.util.Map;
/* loaded from: classes3.dex */
public class HSWebchatAnalyticsManager {
public Map analyticsData = new HashMap();
public Map commonAnalyticsMap = new HashMap();
public Device device;
public HSPersistentStorage persistentStorage;
public Map getAnalyticsDataMap() {
return this.analyticsData;
}
public Map getCommonAnalyticsMap() {
return this.commonAnalyticsMap;
}
public HSWebchatAnalyticsManager(HSPersistentStorage hSPersistentStorage, Device device) {
this.persistentStorage = hSPersistentStorage;
this.device = device;
}
public void setAnalyticsEventsData(Map map) {
setCommonAnalyticsMap(map);
this.analyticsData.putAll(this.commonAnalyticsMap);
this.analyticsData.put("rs", this.device.getRom());
String countryCode = this.device.getCountryCode();
if (Utils.isNotEmpty(countryCode)) {
this.analyticsData.put("cc", countryCode);
}
}
/* JADX WARN: Removed duplicated region for block: B:11:0x007f */
/* JADX WARN: Removed duplicated region for block: B:16:0x0098 */
/* JADX WARN: Removed duplicated region for block: B:22:? A[RETURN, SYNTHETIC] */
/* JADX WARN: Removed duplicated region for block: B:8:0x006e */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void setCommonAnalyticsMap(java.util.Map r4) {
/*
r3 = this;
java.util.Map r0 = r3.commonAnalyticsMap
com.helpshift.platform.Device r1 = r3.device
java.lang.String r1 = r1.getSDKVersion()
java.lang.String r2 = "v"
r0.put(r2, r1)
java.util.Map r0 = r3.commonAnalyticsMap
com.helpshift.platform.Device r1 = r3.device
java.lang.String r1 = r1.getDeviceModel()
java.lang.String r2 = "dm"
r0.put(r2, r1)
java.util.Map r0 = r3.commonAnalyticsMap
com.helpshift.platform.Device r1 = r3.device
java.lang.String r1 = r1.getLanguage()
java.lang.String r2 = "ln"
r0.put(r2, r1)
java.util.Map r0 = r3.commonAnalyticsMap
com.helpshift.platform.Device r1 = r3.device
java.lang.String r1 = r1.getAppVersion()
java.lang.String r2 = "av"
r0.put(r2, r1)
java.util.Map r0 = r3.commonAnalyticsMap
com.helpshift.platform.Device r1 = r3.device
java.lang.String r1 = r1.getOSVersion()
java.lang.String r2 = "os"
r0.put(r2, r1)
java.lang.String r0 = "sdkType"
java.lang.Object r0 = r4.get(r0)
boolean r1 = r0 instanceof java.lang.String
java.lang.String r2 = "s"
if (r1 == 0) goto L5b
java.lang.String r0 = (java.lang.String) r0
boolean r1 = com.helpshift.util.Utils.isNotEmpty(r0)
if (r1 == 0) goto L5b
java.util.Map r1 = r3.commonAnalyticsMap
r1.put(r2, r0)
goto L62
L5b:
java.util.Map r0 = r3.commonAnalyticsMap
java.lang.String r1 = "androidx"
r0.put(r2, r1)
L62:
com.helpshift.storage.HSPersistentStorage r0 = r3.persistentStorage
java.lang.String r0 = r0.getLanguage()
boolean r1 = com.helpshift.util.Utils.isNotEmpty(r0)
if (r1 == 0) goto L75
java.util.Map r1 = r3.commonAnalyticsMap
java.lang.String r2 = "dln"
r1.put(r2, r0)
L75:
java.lang.String r0 = "pluginVersion"
java.lang.Object r0 = r4.get(r0)
boolean r1 = r0 instanceof java.lang.String
if (r1 == 0) goto L8e
java.lang.String r0 = (java.lang.String) r0
boolean r1 = com.helpshift.util.Utils.isNotEmpty(r0)
if (r1 == 0) goto L8e
java.util.Map r1 = r3.commonAnalyticsMap
java.lang.String r2 = "pv"
r1.put(r2, r0)
L8e:
java.lang.String r0 = "runtimeVersion"
java.lang.Object r4 = r4.get(r0)
boolean r0 = r4 instanceof java.lang.String
if (r0 == 0) goto La7
java.lang.String r4 = (java.lang.String) r4
boolean r0 = com.helpshift.util.Utils.isNotEmpty(r4)
if (r0 == 0) goto La7
java.util.Map r0 = r3.commonAnalyticsMap
java.lang.String r1 = "rv"
r0.put(r1, r4)
La7:
return
*/
throw new UnsupportedOperationException("Method not decompiled: com.helpshift.analytics.HSWebchatAnalyticsManager.setCommonAnalyticsMap(java.util.Map):void");
}
}

View File

@@ -0,0 +1,9 @@
package com.helpshift.cache;
/* loaded from: classes3.dex */
public class ChatResourceEvictStrategy implements ResourceCacheEvictStrategy {
@Override // com.helpshift.cache.ResourceCacheEvictStrategy
public boolean shouldEvictCache(String str, String str2) {
return str.startsWith(str2);
}
}

View File

@@ -0,0 +1,9 @@
package com.helpshift.cache;
/* loaded from: classes3.dex */
public class HCResourceCacheEvictStrategy implements ResourceCacheEvictStrategy {
@Override // com.helpshift.cache.ResourceCacheEvictStrategy
public boolean shouldEvictCache(String str, String str2) {
return false;
}
}

View File

@@ -0,0 +1,57 @@
package com.helpshift.cache;
import com.helpshift.storage.HSPersistentStorage;
import java.io.File;
/* loaded from: classes3.dex */
public class HelpcenterCacheEvictionManager {
public final String appFileDirPath;
public final HSPersistentStorage persistentStorage;
public String subdirPath;
public HelpcenterCacheEvictionManager(HSPersistentStorage hSPersistentStorage, String str, String str2) {
this.persistentStorage = hSPersistentStorage;
this.appFileDirPath = str;
this.subdirPath = str2;
}
public void deleteOlderHelpcenterCachedFiles() {
long currentTimeMillis = System.currentTimeMillis();
long lastHCCacheEvictedTime = this.persistentStorage.getLastHCCacheEvictedTime();
if (lastHCCacheEvictedTime == 0) {
updateLastCacheEvictedTime(currentTimeMillis);
return;
}
if (currentTimeMillis - lastHCCacheEvictedTime < 604800000) {
return;
}
updateLastCacheEvictedTime(currentTimeMillis);
File[] listFiles = new File(getResourceCacheDirPath()).listFiles();
if (listFiles == null || listFiles.length == 0) {
return;
}
for (File file : listFiles) {
long lastModified = file.lastModified();
if (lastModified != 0 && currentTimeMillis - lastModified > 2592000000L) {
file.delete();
}
}
}
public final void updateLastCacheEvictedTime(long j) {
this.persistentStorage.setLastHCCacheEvictedTime(j);
}
public final String getResourceCacheDirPath() {
StringBuilder sb = new StringBuilder();
sb.append(this.appFileDirPath);
String str = File.separator;
sb.append(str);
sb.append("helpshift");
sb.append(str);
sb.append("resource_cache");
sb.append(str);
sb.append(this.subdirPath);
return sb.toString();
}
}

View File

@@ -0,0 +1,265 @@
package com.helpshift.cache;
import com.helpshift.log.HSLogger;
import com.helpshift.network.HSDownloaderNetwork;
import com.helpshift.network.HSDownloaderResponse;
import com.helpshift.storage.ISharedPreferencesStore;
import com.helpshift.util.FileUtil;
import com.helpshift.util.Utils;
import com.vungle.ads.internal.signals.SignalManager;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import org.json.JSONArray;
import org.json.JSONObject;
/* loaded from: classes3.dex */
public class HelpshiftResourceCacheManager {
public final String appFileDirPath;
public Map cacheURLMapping = new HashMap();
public String cacheUrlConfigFileName;
public String cacheUrlConfigRoute;
public final HSDownloaderNetwork hsDownloaderNetwork;
public final ResourceCacheEvictStrategy resourceCacheEvictStrategy;
public final ISharedPreferencesStore resourceCacheSharedPref;
public String subdirPath;
public HelpshiftResourceCacheManager(ISharedPreferencesStore iSharedPreferencesStore, HSDownloaderNetwork hSDownloaderNetwork, ResourceCacheEvictStrategy resourceCacheEvictStrategy, String str, String str2, String str3, String str4) {
this.hsDownloaderNetwork = hSDownloaderNetwork;
this.resourceCacheSharedPref = iSharedPreferencesStore;
this.resourceCacheEvictStrategy = resourceCacheEvictStrategy;
this.appFileDirPath = str;
this.cacheUrlConfigRoute = str2;
this.cacheUrlConfigFileName = str3;
this.subdirPath = str4;
}
public boolean shouldCacheUrl(String str) {
boolean z = false;
if (Utils.isEmpty(str)) {
return false;
}
Iterator it = this.cacheURLMapping.keySet().iterator();
while (true) {
if (!it.hasNext()) {
break;
}
if (str.startsWith((String) it.next())) {
z = true;
break;
}
}
HSLogger.d("resCacheMngr", "Should cache url? " + z + " with path - " + str);
return z;
}
public final long getTTLForResource(String str) {
if (Utils.isEmpty(str)) {
return 0L;
}
Long l = 0L;
Iterator it = this.cacheURLMapping.keySet().iterator();
while (true) {
if (!it.hasNext()) {
break;
}
String str2 = (String) it.next();
if (str.startsWith(str2)) {
l = (Long) this.cacheURLMapping.get(str2);
break;
}
}
if (l == null) {
return 0L;
}
return l.longValue();
}
public void ensureCacheURLsListAvailable() {
String string = getString("url_mapping_etag");
long j = getLong("url_mapping_last_success_time");
File file = new File(getCacheURLsConfigFilePath());
boolean exists = file.exists();
if (!exists) {
file.getParentFile().mkdirs();
string = "";
}
if (!exists || Utils.isEmpty(string) || j < System.currentTimeMillis() - getCacheURLsConfigTTL() || j < System.currentTimeMillis() - 604800000) {
fetchCacheURLsMapping(string, file);
}
this.cacheURLMapping = getCacheURLMapping();
}
public final Map getCacheURLMapping() {
HashMap hashMap = new HashMap();
try {
JSONArray jSONArray = new JSONObject(FileUtil.readFileToString(getCacheURLsConfigFilePath())).getJSONArray("url_paths");
for (int i = 0; i < jSONArray.length(); i++) {
JSONObject jSONObject = jSONArray.getJSONObject(i);
hashMap.put(jSONObject.getString("path"), Long.valueOf(jSONObject.optLong("ttl", SignalManager.TWENTY_FOUR_HOURS_MILLIS)));
}
} catch (Exception e) {
HSLogger.e("resCacheMngr", "Error getting URLs mapping", e);
}
return hashMap;
}
public final long getCacheURLsConfigTTL() {
try {
return new JSONObject(FileUtil.readFileToString(getCacheURLsConfigFilePath())).optLong("ttl", SignalManager.TWENTY_FOUR_HOURS_MILLIS);
} catch (Exception e) {
HSLogger.e("resCacheMngr", "Error getting cache mapping ttl", e);
return SignalManager.TWENTY_FOUR_HOURS_MILLIS;
}
}
public final void fetchCacheURLsMapping(String str, File file) {
HashMap hashMap = new HashMap();
if (Utils.isNotEmpty(str)) {
hashMap.put("If-None-Match", str);
}
HSDownloaderResponse downloadResource = this.hsDownloaderNetwork.downloadResource(this.cacheUrlConfigRoute, hashMap, file);
if (!downloadResource.isSuccess) {
HSLogger.e("resCacheMngr", "Failed to download the URLs mapping file");
} else {
setString("url_mapping_etag", downloadResource.etag);
setLong("url_mapping_last_success_time", System.currentTimeMillis());
}
}
public InputStream fetchCachedResource(String str, String str2, String str3, Map map) {
String str4 = "text/html";
String generateStorageKey = generateStorageKey(str2, str3);
String str5 = generateStorageKey + "_last_success_time";
long j = this.resourceCacheSharedPref.getLong(str5);
String str6 = generateStorageKey + "_etag";
String string = this.resourceCacheSharedPref.getString(str6);
long tTLForResource = getTTLForResource(str2);
String resourceCacheDirPath = getResourceCacheDirPath();
String str7 = resourceCacheDirPath + File.separator + generateStorageKey;
File file = new File(str7);
boolean exists = file.exists();
if (exists) {
try {
if (!Utils.isEmpty(string)) {
if (j >= System.currentTimeMillis() - tTLForResource) {
if (j < System.currentTimeMillis() - 604800000) {
}
return new BufferedInputStream(new FileInputStream(file));
}
}
} catch (Exception e) {
HSLogger.e("resCacheMngr", "Error while fetching resource file: " + str, e);
return null;
}
}
if (!exists) {
file.getParentFile().mkdirs();
string = "";
}
File file2 = new File(str7 + "_temp");
if (Utils.isNotEmpty(string)) {
map.put("If-None-Match", string);
}
HSDownloaderResponse downloadResource = this.hsDownloaderNetwork.downloadResource(str, map, file2);
if (!downloadResource.isSuccess) {
return null;
}
setString(str6, downloadResource.etag);
setLong(str5, System.currentTimeMillis());
int i = downloadResource.status;
if (i >= 200 && i <= 300) {
file.delete();
if (!file2.renameTo(file)) {
return null;
}
String str8 = generateStorageKey + "_mimetype";
String str9 = downloadResource.mimetype;
if (!str9.contains("text/html")) {
str4 = str9;
}
if (Utils.isNotEmpty(str4)) {
setString(str8, str4);
}
setString(generateStorageKey + "_headers", downloadResource.headers.toString());
}
deleteOlderCachedResource(resourceCacheDirPath, str2, file.getName());
return new BufferedInputStream(new FileInputStream(file));
}
public final void deleteOlderCachedResource(String str, String str2, String str3) {
File[] listFiles = new File(str).listFiles();
if (listFiles == null || listFiles.length == 0) {
return;
}
String generateStorageKey = generateStorageKey(str2, null);
for (File file : listFiles) {
String name = file.getName();
if (!name.equals(str3) && this.resourceCacheEvictStrategy.shouldEvictCache(name, generateStorageKey)) {
file.delete();
}
}
}
public Map getCachedResponseHeadersForResource(String str, String str2) {
return Utils.jsonStringToStringMap(getString(generateStorageKey(str, str2) + "_headers"));
}
public String getResourceMimeType(String str, String str2) {
return this.resourceCacheSharedPref.getString(generateStorageKey(str, str2) + "_mimetype");
}
public final String generateStorageKey(String str, String str2) {
StringBuilder sb = new StringBuilder();
sb.append(str);
sb.append("_");
if (str2 == null) {
str2 = "";
}
sb.append(str2);
return sb.toString().replaceAll("[^a-zA-Z0-9]", "_");
}
public final String getResourceCacheDirPath() {
StringBuilder sb = new StringBuilder();
sb.append(this.appFileDirPath);
String str = File.separator;
sb.append(str);
sb.append("helpshift");
sb.append(str);
sb.append("resource_cache");
sb.append(str);
sb.append(this.subdirPath);
return sb.toString();
}
public final String getCacheURLsConfigFilePath() {
return getResourceCacheDirPath() + File.separator + this.cacheUrlConfigFileName;
}
public final void setString(String str, String str2) {
this.resourceCacheSharedPref.putString(str, str2);
}
public final void setLong(String str, long j) {
this.resourceCacheSharedPref.putLong(str, j);
}
public final String getString(String str) {
return this.resourceCacheSharedPref.getString(str);
}
public final long getLong(String str) {
return this.resourceCacheSharedPref.getLong(str);
}
public void deleteAllCachedFiles() {
FileUtil.deleteDir(getResourceCacheDirPath());
this.resourceCacheSharedPref.clear();
this.cacheURLMapping.clear();
}
}

View File

@@ -0,0 +1,6 @@
package com.helpshift.cache;
/* loaded from: classes3.dex */
public interface ResourceCacheEvictStrategy {
boolean shouldEvictCache(String str, String str2);
}

View File

@@ -0,0 +1,243 @@
package com.helpshift.chat;
import android.content.Intent;
import android.webkit.ValueCallback;
import android.webkit.WebView;
import com.helpshift.cache.HelpshiftResourceCacheManager;
import com.helpshift.concurrency.HSThreadingService;
import com.helpshift.config.HSConfigManager;
import com.helpshift.log.HSLogger;
import com.helpshift.migrator.NativeToSdkxMigrator;
import com.helpshift.storage.HSGenericDataManager;
import com.helpshift.user.UserManager;
import java.lang.ref.WeakReference;
import org.json.JSONObject;
/* loaded from: classes3.dex */
public class HSChatEventsHandler {
public final HSConfigManager configManager;
public final HSGenericDataManager genericDataManager;
public final NativeToSdkxMigrator nativeToSdkxMigrator;
public final HelpshiftResourceCacheManager resourceCacheManager;
public final HSThreadingService services;
public WeakReference uiCallback;
public final UserManager userManager;
public HSChatEventsHandler(UserManager userManager, HSThreadingService hSThreadingService, HSConfigManager hSConfigManager, HelpshiftResourceCacheManager helpshiftResourceCacheManager, HSGenericDataManager hSGenericDataManager, NativeToSdkxMigrator nativeToSdkxMigrator) {
this.services = hSThreadingService;
this.userManager = userManager;
this.configManager = hSConfigManager;
this.resourceCacheManager = helpshiftResourceCacheManager;
this.genericDataManager = hSGenericDataManager;
this.nativeToSdkxMigrator = nativeToSdkxMigrator;
}
public void setUiEventsListener(HSWebchatToUiCallback hSWebchatToUiCallback) {
this.uiCallback = new WeakReference(hSWebchatToUiCallback);
}
public void sdkxMigrationLogSynced(boolean z) {
this.nativeToSdkxMigrator.setErrorLogsSyncedWithWebchat(z);
}
public void onSetLocalStorage(final String str) {
this.services.runSerial(new Runnable() { // from class: com.helpshift.chat.HSChatEventsHandler.1
@Override // java.lang.Runnable
public void run() {
HSChatEventsHandler.this.configManager.setLocalStorageData(str);
}
});
}
public void onRemoveLocalStorage(final String str) {
this.services.runSerial(new Runnable() { // from class: com.helpshift.chat.HSChatEventsHandler.2
@Override // java.lang.Runnable
public void run() {
HSChatEventsHandler.this.configManager.removeLocalStorageData(str);
}
});
}
public void getHelpcenterData() {
HSWebchatToUiCallback hSWebchatToUiCallback = (HSWebchatToUiCallback) this.uiCallback.get();
if (hSWebchatToUiCallback != null) {
hSWebchatToUiCallback.setHelpcenterData();
}
}
public void onReceivePushTokenSyncRequestData(String str) {
this.services.runSerial(new Runnable() { // from class: com.helpshift.chat.HSChatEventsHandler.3
@Override // java.lang.Runnable
public void run() {
HSChatEventsHandler.this.userManager.setPushTokenSynced(true);
}
});
}
public void onRemoveAnonymousUser() {
this.services.runSerial(new Runnable() { // from class: com.helpshift.chat.HSChatEventsHandler.4
@Override // java.lang.Runnable
public void run() {
HSChatEventsHandler.this.userManager.removeAnonymousUser();
}
});
}
public void setPollingStatus(String str) {
try {
this.userManager.setShouldPollFlag(new JSONObject(str).optBoolean("shouldPoll", false));
} catch (Exception e) {
HSLogger.e("wbEvntHndlr", "Error getting polling status", e);
}
}
public void setGenericSdkData(final String str) {
this.services.runSerial(new Runnable() { // from class: com.helpshift.chat.HSChatEventsHandler.5
@Override // java.lang.Runnable
public void run() {
HSChatEventsHandler.this.genericDataManager.saveGenericSdkData(str);
}
});
}
public void setIssueExistsForUser(final String str) {
this.services.runSerial(new Runnable() { // from class: com.helpshift.chat.HSChatEventsHandler.6
@Override // java.lang.Runnable
public void run() {
try {
HSChatEventsHandler.this.userManager.setShowChatIconInHelpcenter(new JSONObject(str).optBoolean("issueExists", false));
} catch (Exception e) {
HSLogger.e("wbEvntHndlr", "error in getting the issue exist flag", e);
}
}
});
}
public void onWebchatClosed() {
this.services.runOnUIThread(new Runnable() { // from class: com.helpshift.chat.HSChatEventsHandler.7
@Override // java.lang.Runnable
public void run() {
HSWebchatToUiCallback hSWebchatToUiCallback = (HSWebchatToUiCallback) HSChatEventsHandler.this.uiCallback.get();
if (hSWebchatToUiCallback != null) {
hSWebchatToUiCallback.onWebchatClosed();
}
}
});
}
public void onWebchatLoaded() {
this.services.runOnUIThread(new Runnable() { // from class: com.helpshift.chat.HSChatEventsHandler.8
@Override // java.lang.Runnable
public void run() {
HSWebchatToUiCallback hSWebchatToUiCallback = (HSWebchatToUiCallback) HSChatEventsHandler.this.uiCallback.get();
if (hSWebchatToUiCallback != null) {
hSWebchatToUiCallback.onWebchatLoaded();
}
}
});
}
public void onWebchatError() {
deleteAllCachedFilesOfWebchat();
this.services.runOnUIThread(new Runnable() { // from class: com.helpshift.chat.HSChatEventsHandler.9
@Override // java.lang.Runnable
public void run() {
HSWebchatToUiCallback hSWebchatToUiCallback = (HSWebchatToUiCallback) HSChatEventsHandler.this.uiCallback.get();
if (hSWebchatToUiCallback != null) {
hSWebchatToUiCallback.onWebchatError();
}
}
});
}
public void onUserAuthenticationFailure() {
deleteAllCachedFilesOfWebchat();
this.services.runOnUIThread(new Runnable() { // from class: com.helpshift.chat.HSChatEventsHandler.10
@Override // java.lang.Runnable
public void run() {
HSWebchatToUiCallback hSWebchatToUiCallback = (HSWebchatToUiCallback) HSChatEventsHandler.this.uiCallback.get();
if (hSWebchatToUiCallback != null) {
hSWebchatToUiCallback.onUserAuthenticationFailure();
}
}
});
}
public final void deleteAllCachedFilesOfWebchat() {
this.services.runSerial(new Runnable() { // from class: com.helpshift.chat.HSChatEventsHandler.11
@Override // java.lang.Runnable
public void run() {
HSChatEventsHandler.this.resourceCacheManager.deleteAllCachedFiles();
}
});
}
public void addWebviewToCurrentUI(final WebView webView) {
this.services.runOnUIThread(new Runnable() { // from class: com.helpshift.chat.HSChatEventsHandler.12
@Override // java.lang.Runnable
public void run() {
HSWebchatToUiCallback hSWebchatToUiCallback = (HSWebchatToUiCallback) HSChatEventsHandler.this.uiCallback.get();
if (hSWebchatToUiCallback != null) {
hSWebchatToUiCallback.addWebviewToCurrentUI(webView);
}
}
});
}
public void onUiConfigChange(final String str) {
saveUiConfigDataForWebchat(str);
this.services.runOnUIThread(new Runnable() { // from class: com.helpshift.chat.HSChatEventsHandler.13
@Override // java.lang.Runnable
public void run() {
HSWebchatToUiCallback hSWebchatToUiCallback = (HSWebchatToUiCallback) HSChatEventsHandler.this.uiCallback.get();
if (hSWebchatToUiCallback != null) {
hSWebchatToUiCallback.onUiConfigChange(str);
}
}
});
}
public final void saveUiConfigDataForWebchat(final String str) {
this.services.runSerial(new Runnable() { // from class: com.helpshift.chat.HSChatEventsHandler.14
@Override // java.lang.Runnable
public void run() {
HSChatEventsHandler.this.configManager.saveUiConfigDataOfWebchat(str);
}
});
}
public void setAttachmentFilePathCallback(ValueCallback valueCallback) {
HSWebchatToUiCallback hSWebchatToUiCallback = (HSWebchatToUiCallback) this.uiCallback.get();
if (hSWebchatToUiCallback != null) {
hSWebchatToUiCallback.setAttachmentFilePathCallback(valueCallback);
}
}
public void openFileChooser(Intent intent, int i) {
HSWebchatToUiCallback hSWebchatToUiCallback = (HSWebchatToUiCallback) this.uiCallback.get();
if (hSWebchatToUiCallback != null) {
hSWebchatToUiCallback.openFileChooser(intent, i);
}
}
public void sendIntentToSystemApp(Intent intent) {
HSWebchatToUiCallback hSWebchatToUiCallback = (HSWebchatToUiCallback) this.uiCallback.get();
if (hSWebchatToUiCallback != null) {
hSWebchatToUiCallback.sendIntentToSystemApp(intent);
}
}
public void requestConversationMetadata(String str) {
HSWebchatToUiCallback hSWebchatToUiCallback = (HSWebchatToUiCallback) this.uiCallback.get();
if (hSWebchatToUiCallback != null) {
hSWebchatToUiCallback.requestConversationMetadata(str);
}
}
public void webchatJsFileLoaded() {
HSWebchatToUiCallback hSWebchatToUiCallback = (HSWebchatToUiCallback) this.uiCallback.get();
if (hSWebchatToUiCallback != null) {
hSWebchatToUiCallback.webchatJsFileLoaded();
}
}
}

View File

@@ -0,0 +1,470 @@
package com.helpshift.chat;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
import android.graphics.Rect;
import android.net.Uri;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.webkit.ValueCallback;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.widget.LinearLayout;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.browser.customtabs.CustomTabsCallback;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import com.applovin.impl.sdk.utils.JsonUtils;
import com.facebook.share.internal.ShareConstants;
import com.helpshift.R$id;
import com.helpshift.R$layout;
import com.helpshift.activities.FragmentTransactionListener;
import com.helpshift.config.HSConfigManager;
import com.helpshift.core.HSContext;
import com.helpshift.log.HSLogger;
import com.helpshift.user_lifecyle.UserLifecycleListener;
import com.helpshift.util.ApplicationUtil;
import com.helpshift.util.HSTimer;
import com.helpshift.util.Utils;
import com.helpshift.util.ViewUtil;
import com.helpshift.util.network.connectivity.HSConnectivityManager;
import com.helpshift.util.network.connectivity.HSNetworkConnectivityCallback;
import com.helpshift.views.HSWebView;
import com.ironsource.nb;
import com.vungle.ads.internal.presenter.MRAIDPresenter;
import org.json.JSONArray;
import org.json.JSONObject;
/* loaded from: classes3.dex */
public class HSChatFragment extends Fragment implements HSWebchatToUiCallback, UserLifecycleListener, View.OnClickListener, HSNetworkConnectivityCallback {
public static final int REQUEST_SELECT_FILE = 1001;
public static final String TAG = "HSChatFragment";
public static final String localHostUrl = "https://localhost/";
private HSChatWebChromeClient chromeClient;
private HSChatEventsHandler eventsHandler;
private ValueCallback<Uri[]> filePathCallback;
private boolean isWebchatSourceChanged;
private View loadingView;
private View retryView;
private FragmentTransactionListener transactionListener;
private HSWebView webView;
private String webchatJsFileLoadingTime;
private String webchatSource;
private LinearLayout webviewLayout;
private boolean shouldSendPollerEvent = true;
private boolean isKeyboardVisible = false;
private final ViewTreeObserver.OnGlobalLayoutListener globalLayoutListener = new ViewTreeObserver.OnGlobalLayoutListener() { // from class: com.helpshift.chat.HSChatFragment.1
@Override // android.view.ViewTreeObserver.OnGlobalLayoutListener
public void onGlobalLayout() {
if (HSChatFragment.this.webView == null) {
return;
}
Rect rect = new Rect();
HSChatFragment.this.webView.getWindowVisibleDisplayFrame(rect);
int height = HSChatFragment.this.webView.getRootView().getHeight();
boolean z = ((double) (height - rect.bottom)) > ((double) height) * 0.15d;
if (z != HSChatFragment.this.isKeyboardVisible) {
HSChatFragment.this.sendKeyboardToggleEvent(z);
}
HSChatFragment.this.isKeyboardVisible = z;
}
};
@Override // com.helpshift.chat.HSWebchatToUiCallback
public void setAttachmentFilePathCallback(ValueCallback<Uri[]> valueCallback) {
this.filePathCallback = valueCallback;
}
public void setTransactionListener(FragmentTransactionListener fragmentTransactionListener) {
this.transactionListener = fragmentTransactionListener;
}
@Override // androidx.fragment.app.Fragment
@Nullable
public View onCreateView(@NonNull LayoutInflater layoutInflater, @Nullable ViewGroup viewGroup, @Nullable Bundle bundle) {
HSLogger.d(TAG, "onCreateView() - " + hashCode());
View inflate = layoutInflater.inflate(R$layout.hs__webchat_fragment_layout, viewGroup, false);
if (getArguments() != null) {
this.webchatSource = getArguments().getString(ShareConstants.FEED_SOURCE_PARAM);
}
return inflate;
}
@Override // androidx.fragment.app.Fragment
public void onViewCreated(@NonNull View view, @Nullable Bundle bundle) {
super.onViewCreated(view, bundle);
HSLogger.d(TAG, "onViewCreated() - " + hashCode());
HSContext.getInstance().getUserManager().setUserLifecycleListener(this);
initViews(view);
startChatView();
}
private void initViews(View view) {
this.loadingView = view.findViewById(R$id.hs__loading_view);
this.retryView = view.findViewById(R$id.hs__retry_view);
this.webviewLayout = (LinearLayout) view.findViewById(R$id.hs__webview_layout);
this.webView = (HSWebView) view.findViewById(R$id.hs__webchat_webview);
view.findViewById(R$id.hs__retry_view_close_btn).setOnClickListener(this);
view.findViewById(R$id.hs__loading_view_close_btn).setOnClickListener(this);
view.findViewById(R$id.hs__retry_button).setOnClickListener(this);
}
private void startChatView() {
String webchatEmbeddedCodeString = HSContext.getInstance().getJsGenerator().getWebchatEmbeddedCodeString(getContext());
if (Utils.isEmpty(webchatEmbeddedCodeString)) {
HSLogger.e(TAG, "Error in reading the source code from assets folder");
onWebchatError();
} else {
showLoadingView();
initWebviewWithWebchat(webchatEmbeddedCodeString);
}
}
private void initWebviewWithWebchat(String str) {
HSLogger.d(TAG, "Webview is launched");
HSContext hSContext = HSContext.getInstance();
HSChatEventsHandler hSChatEventsHandler = new HSChatEventsHandler(hSContext.getUserManager(), hSContext.getHsThreadingService(), hSContext.getConfigManager(), hSContext.getChatResourceCacheManager(), hSContext.getGenericDataManager(), hSContext.getNativeToSdkxMigrator());
this.eventsHandler = hSChatEventsHandler;
hSChatEventsHandler.setUiEventsListener(this);
HSChatWebChromeClient hSChatWebChromeClient = new HSChatWebChromeClient(this.eventsHandler);
this.chromeClient = hSChatWebChromeClient;
hSChatWebChromeClient.setFilePathCallback(this.filePathCallback);
this.webView.setWebChromeClient(this.chromeClient);
this.webView.setWebViewClient(new HSChatWebViewClient(this.eventsHandler, hSContext.getChatResourceCacheManager()));
this.webView.addJavascriptInterface(new HSChatToNativeBridge(hSContext.getHsEventProxy(), this.eventsHandler), "HSInterface");
this.webView.loadDataWithBaseURL(localHostUrl, str, "text/html", nb.N, null);
}
@Override // androidx.fragment.app.Fragment
public void onStop() {
super.onStop();
HSLogger.d(TAG, "onStop() - " + hashCode());
if (this.shouldSendPollerEvent) {
sendLifecycleEventToWebchat(false);
}
HSContext.getInstance().setWebchatUIIsOpen(false);
this.webView.getViewTreeObserver().removeOnGlobalLayoutListener(this.globalLayoutListener);
}
@Override // androidx.fragment.app.Fragment
public void onStart() {
super.onStart();
HSLogger.d(TAG, "onStart() -" + hashCode());
sendLifecycleEventToWebchat(true);
HSContext.getInstance().setWebchatUIIsOpen(true);
this.webView.getViewTreeObserver().addOnGlobalLayoutListener(this.globalLayoutListener);
}
@Override // androidx.fragment.app.Fragment
public void onPause() {
super.onPause();
HSLogger.d(TAG, "onPause() -" + hashCode());
FragmentActivity activity = getActivity();
if (activity != null && !activity.isChangingConfigurations()) {
HSContext.getInstance().getConversationPoller().startPoller();
}
HSConnectivityManager.getInstance(getContext()).unregisterNetworkConnectivityListener(this);
}
@Override // androidx.fragment.app.Fragment
public void onResume() {
super.onResume();
HSLogger.d(TAG, "onResume() -" + hashCode());
FragmentActivity activity = getActivity();
if (activity != null && !activity.isChangingConfigurations()) {
HSContext.getInstance().getConversationPoller().stopPoller();
}
HSConnectivityManager.getInstance(getContext()).registerNetworkConnectivityListener(this);
HSContext hSContext = HSContext.getInstance();
if (hSContext.isWebchatUIOpen() && this.isWebchatSourceChanged) {
HSLogger.d(TAG, "Updating config with latest config in same webchat session");
try {
callWebchatApi("window.helpshiftConfig = JSON.parse(JSON.stringify(" + hSContext.getConfigManager().getWebchatConfigJs(hSContext.isIsWebchatOpenedFromHelpcenter()) + "));Helpshift('updateClientConfigWithoutReload');", null);
} catch (Exception e) {
HSLogger.e(TAG, "Failed to update webchat config with latest config ", e);
}
}
}
@Override // com.helpshift.chat.HSWebchatToUiCallback
public void sendIntentToSystemApp(Intent intent) {
try {
startActivity(intent);
} catch (Exception e) {
HSLogger.e(TAG, "Error in opening a link in system app", e);
}
}
@Override // androidx.fragment.app.Fragment
public void onDestroy() {
super.onDestroy();
HSLogger.d(TAG, "onDestroy() -" + hashCode());
HSContext hSContext = HSContext.getInstance();
hSContext.getUserManager().removeUserLifeCycleListener();
HSChatEventsHandler hSChatEventsHandler = this.eventsHandler;
if (hSChatEventsHandler != null) {
hSChatEventsHandler.setUiEventsListener(null);
}
this.webviewLayout.removeView(this.webView);
this.webView.destroyCustomWebview();
this.webView = null;
hSContext.getPersistentStorage().setLastRequestUnreadCountApiAccess(0L);
hSContext.getUserManager().markAllPushMessagesAsRead();
}
@Override // com.helpshift.chat.HSWebchatToUiCallback
public void onWebchatClosed() {
HSLogger.d(TAG, "onWebchatClosed");
FragmentTransactionListener fragmentTransactionListener = this.transactionListener;
if (fragmentTransactionListener != null) {
fragmentTransactionListener.closeWebchat();
}
}
@Override // com.helpshift.chat.HSWebchatToUiCallback
public void onWebchatLoaded() {
HSLogger.d(TAG, "onWebchatLoaded");
showWebchatView();
clearNotifications();
HSContext.getInstance().getUserManager().markAllMessagesAsRead();
HSContext.getInstance().getUserManager().markAllPushMessagesAsRead();
String migrationErrorLogs = HSContext.getInstance().getNativeToSdkxMigrator().getMigrationErrorLogs();
if (Utils.isNotEmpty(migrationErrorLogs)) {
callWebchatApi("Helpshift('sdkxMigrationLog', '" + migrationErrorLogs + "' ) ", null);
}
sendKeyboardToggleEvent(this.isKeyboardVisible);
sendOrientationChangeEventToWebchat(getResources().getConfiguration().orientation);
sendNetworkConfigurationChangeEvent(HSContext.getInstance().getDevice().isOnline() ? CustomTabsCallback.ONLINE_EXTRAS_KEY : "offline");
if (Utils.isNotEmpty(this.webchatJsFileLoadingTime)) {
sendTimeToLoadWebchatEvent(this.webchatJsFileLoadingTime);
}
}
private void clearNotifications() {
Context context = getContext();
if (context != null) {
ApplicationUtil.cancelNotification(context);
}
}
@Override // com.helpshift.chat.HSWebchatToUiCallback
public void onWebchatError() {
HSLogger.e(TAG, "Received onWebchatError event");
showErrorView();
}
@Override // com.helpshift.chat.HSWebchatToUiCallback
public void addWebviewToCurrentUI(WebView webView) {
this.webviewLayout.addView(webView);
}
@Override // com.helpshift.chat.HSWebchatToUiCallback
public void onUiConfigChange(String str) {
FragmentTransactionListener fragmentTransactionListener = this.transactionListener;
if (fragmentTransactionListener != null) {
fragmentTransactionListener.changeStatusBarColor(str);
}
}
@Override // com.helpshift.chat.HSWebchatToUiCallback
public void onUserAuthenticationFailure() {
HSLogger.e(TAG, "Received onUserAuthenticationFailure event");
showErrorView();
}
@Override // com.helpshift.chat.HSWebchatToUiCallback
public void webchatJsFileLoaded() {
long endTimer = HSTimer.endTimer(this.webchatSource);
if (endTimer > 0) {
this.webchatJsFileLoadingTime = getWebchatJsFileLoadingTime(Long.valueOf(endTimer));
}
HSLogger.d(TAG, "Webchat.js Loaded, Stopping loading timer");
}
private String getWebchatJsFileLoadingTime(Long l) {
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put(ShareConstants.FEED_SOURCE_PARAM, this.webchatSource);
jSONObject.put("time", l.toString());
return jSONObject.toString();
} catch (Exception e) {
HSLogger.e(TAG, "Failed to calculate webchat.js loading time", e);
return "";
}
}
@Override // com.helpshift.chat.HSWebchatToUiCallback
public void requestConversationMetadata(String str) {
try {
JSONObject jSONObject = new JSONObject(str);
int i = jSONObject.getInt("bclConfig");
int i2 = jSONObject.getInt("dbglConfig");
HSLogger.d(TAG, "Log limits: breadcrumb: " + i + ", debug logs: " + i2);
HSConfigManager configManager = HSContext.getInstance().getConfigManager();
JSONArray breadCrumbs = configManager.getBreadCrumbs(i);
JSONArray debugLogs = configManager.getDebugLogs(i2);
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("bcl", breadCrumbs);
jSONObject2.put("dbgl", debugLogs);
String jSONObject3 = jSONObject2.toString();
HSLogger.d(TAG, "Sending log/crumb data to webchat: " + jSONObject3);
callWebchatApi("Helpshift('syncConversationMetadata',JSON.stringify(" + jSONObject3 + "));", null);
} catch (Exception e) {
HSLogger.e(TAG, "Error with request conversation meta call", e);
}
}
@Override // com.helpshift.chat.HSWebchatToUiCallback
public void setHelpcenterData() {
try {
String additionalInfo = HSContext.getInstance().getConfigManager().getAdditionalInfo();
if (Utils.isEmpty(additionalInfo)) {
additionalInfo = JsonUtils.EMPTY_JSON;
}
callWebchatApi("Helpshift('setHelpcenterData','" + additionalInfo + "');", null);
HSLogger.d(TAG, "Called setHelpcenterData function on webchat");
} catch (Exception e) {
HSLogger.e(TAG, "Error with setHelpcenterData call", e);
}
}
@Override // com.helpshift.user_lifecyle.UserLifecycleListener
public void onUserDidLogout() {
updateWebchatConfig();
}
@Override // com.helpshift.user_lifecyle.UserLifecycleListener
public void onUserDidLogin() {
updateWebchatConfig();
}
public void setWebchatSourceChanged(String str) {
this.isWebchatSourceChanged = true;
HSLogger.d(TAG, "Webchat source changed to " + str + " from " + this.webchatSource);
this.webchatSource = str;
}
public void updateWebchatConfig() {
callWebchatApi("window.helpshiftConfig = JSON.parse(JSON.stringify(" + HSContext.getInstance().getConfigManager().getWebchatConfigJs(false) + "));Helpshift('updateHelpshiftConfig')", null);
}
@Override // com.helpshift.chat.HSWebchatToUiCallback
public void openFileChooser(Intent intent, int i) {
this.shouldSendPollerEvent = false;
startActivityForResult(intent, i);
}
@Override // androidx.fragment.app.Fragment
public void onActivityResult(int i, int i2, Intent intent) {
this.shouldSendPollerEvent = true;
HSLogger.d(TAG, "onActivityResult, request code: " + i + " , resultCode: " + i2);
if (i == 0) {
this.filePathCallback.onReceiveValue(null);
return;
}
if (i != 1001) {
super.onActivityResult(i, i2, intent);
return;
}
ValueCallback<Uri[]> valueCallback = this.filePathCallback;
if (valueCallback == null) {
HSLogger.d(TAG, "filePathCallback is null, return");
return;
}
valueCallback.onReceiveValue(WebChromeClient.FileChooserParams.parseResult(i2, intent));
this.filePathCallback = null;
this.chromeClient.setFilePathCallback(null);
}
@Override // android.view.View.OnClickListener
public void onClick(View view) {
int id = view.getId();
if (id == R$id.hs__loading_view_close_btn || id == R$id.hs__retry_view_close_btn) {
onWebchatClosed();
} else if (id == R$id.hs__retry_button) {
startChatView();
}
}
@Override // androidx.fragment.app.Fragment, android.content.ComponentCallbacks
public void onConfigurationChanged(Configuration configuration) {
super.onConfigurationChanged(configuration);
sendOrientationChangeEventToWebchat(configuration.orientation);
}
@Override // com.helpshift.util.network.connectivity.HSNetworkConnectivityCallback
public void onNetworkAvailable() {
sendNetworkConfigurationChangeEvent(CustomTabsCallback.ONLINE_EXTRAS_KEY);
}
@Override // com.helpshift.util.network.connectivity.HSNetworkConnectivityCallback
public void onNetworkUnavailable() {
sendNetworkConfigurationChangeEvent("offline");
}
private void showErrorView() {
ViewUtil.setVisibility(this.retryView, true);
ViewUtil.setVisibility(this.loadingView, false);
}
private void showWebchatView() {
ViewUtil.setVisibility(this.loadingView, false);
ViewUtil.setVisibility(this.retryView, false);
}
private void showLoadingView() {
ViewUtil.setVisibility(this.loadingView, true);
ViewUtil.setVisibility(this.retryView, false);
}
private void callWebchatApi(final String str, final ValueCallback<String> valueCallback) {
HSContext.getInstance().getHsThreadingService().runOnUIThread(new Runnable() { // from class: com.helpshift.chat.HSChatFragment.2
@Override // java.lang.Runnable
public void run() {
if (HSChatFragment.this.webView == null) {
HSLogger.d(HSChatFragment.TAG, "error callWebchatApi, webview is null");
return;
}
HSLogger.d(HSChatFragment.TAG, "Executing command: " + str);
ViewUtil.callJavascriptCode(HSChatFragment.this.webView, str, valueCallback);
}
});
}
public void sendLifecycleEventToWebchat(boolean z) {
callWebchatApi("Helpshift('sdkxIsInForeground'," + z + ");", null);
}
public void sendOrientationChangeEventToWebchat(int i) {
callWebchatApi("Helpshift('onOrientationChange','" + (i == 1 ? "portrait" : "landscape") + "');", null);
}
public void sendKeyboardToggleEvent(boolean z) {
callWebchatApi("Helpshift('onKeyboardToggle','" + (!z ? "close" : MRAIDPresenter.OPEN) + "');", null);
}
public void sendTimeToLoadWebchatEvent(String str) {
callWebchatApi("Helpshift('nativeLoadTime','" + str + "');", null);
}
public void sendNetworkConfigurationChangeEvent(String str) {
callWebchatApi("Helpshift('onNetworkStatusChange','" + str + "');", null);
}
public void handleBackPress() {
callWebchatApi("Helpshift('backBtnPress');", new ValueCallback() { // from class: com.helpshift.chat.HSChatFragment.3
@Override // android.webkit.ValueCallback
public void onReceiveValue(String str) {
HSLogger.d(HSChatFragment.TAG, "Back press handle from webchat" + str);
if (HSChatFragment.this.transactionListener != null) {
HSChatFragment.this.transactionListener.handleBackPress(Boolean.parseBoolean(str));
}
}
});
}
}

View File

@@ -0,0 +1,157 @@
package com.helpshift.chat;
import android.webkit.JavascriptInterface;
import com.helpshift.log.HSLogger;
import com.helpshift.util.Utils;
import com.tapjoy.TJAdUnitConstants;
import java.util.Iterator;
import org.json.JSONException;
import org.json.JSONObject;
/* loaded from: classes3.dex */
public class HSChatToNativeBridge {
public final HSEventProxy delegate;
public final HSChatEventsHandler eventsHandler;
public boolean isWebSdkConfigLoaded;
public HSChatToNativeBridge(HSEventProxy hSEventProxy, HSChatEventsHandler hSChatEventsHandler) {
this.delegate = hSEventProxy;
this.eventsHandler = hSChatEventsHandler;
}
@JavascriptInterface
public void sendEvent(String str) {
HSLogger.d("ChatNativeBridge", "Received event from webview.");
if (this.delegate == null || Utils.isEmpty(str)) {
return;
}
try {
JSONObject jSONObject = new JSONObject(str);
Iterator<String> keys = jSONObject.keys();
while (keys.hasNext()) {
String next = keys.next();
this.delegate.sendEvent(next, Utils.jsonStringToMap(jSONObject.optString(next, "")));
}
} catch (JSONException e) {
HSLogger.e("ChatNativeBridge", "Error in sending public event", e);
}
}
@JavascriptInterface
public void widgetToggle(String str) {
HSLogger.d("ChatNativeBridge", "webchat widget toggle: " + str);
if (Utils.isEmpty(str) || !this.isWebSdkConfigLoaded) {
return;
}
try {
if (new JSONObject(str).optBoolean(TJAdUnitConstants.String.VISIBLE, false)) {
this.eventsHandler.onWebchatLoaded();
} else {
this.eventsHandler.onWebchatClosed();
}
} catch (JSONException e) {
HSLogger.e("ChatNativeBridge", "Error in closing the webchat", e);
}
}
@JavascriptInterface
public void onWebSdkConfigLoad() {
HSLogger.d("ChatNativeBridge", "Received event when web sdk config loaded");
if (this.isWebSdkConfigLoaded) {
return;
}
this.isWebSdkConfigLoaded = true;
this.eventsHandler.onWebchatLoaded();
}
@JavascriptInterface
public void setIssueExistsFlag(String str) {
HSLogger.d("ChatNativeBridge", "Received event to set the issue exist as -" + str);
this.eventsHandler.setIssueExistsForUser(str);
}
@JavascriptInterface
public void setLocalStorage(String str) {
HSLogger.d("ChatNativeBridge", "Received event to set data in local store from webview.");
this.eventsHandler.onSetLocalStorage(str);
}
@JavascriptInterface
public void removeLocalStorage(String str) {
HSLogger.d("ChatNativeBridge", "Received event to remove data from local store from webview.");
this.eventsHandler.onRemoveLocalStorage(str);
}
@JavascriptInterface
public void getHelpcenterData() {
HSLogger.d("ChatNativeBridge", "Received event to get Aditional info of HC from WC from webview.");
this.eventsHandler.getHelpcenterData();
}
@JavascriptInterface
public void onWebchatError() {
HSLogger.d("ChatNativeBridge", "Received error from webview.");
this.eventsHandler.onWebchatError();
}
@JavascriptInterface
public void sendPushTokenSyncRequestData(String str) {
this.eventsHandler.onReceivePushTokenSyncRequestData(str);
}
@JavascriptInterface
public void onUIConfigChange(String str) {
this.eventsHandler.onUiConfigChange(str);
}
@JavascriptInterface
public void sendUserAuthFailureEvent(String str) {
if (this.delegate == null || Utils.isEmpty(str)) {
return;
}
String str2 = "Authentication Failure";
try {
JSONObject jSONObject = new JSONObject(str);
if (jSONObject.has("message")) {
String string = jSONObject.getString("message");
if (!Utils.isEmpty(string.trim())) {
str2 = string;
}
}
} catch (Exception unused) {
HSLogger.e("ChatNativeBridge", "Error in reading auth failure event ");
}
this.eventsHandler.onUserAuthenticationFailure();
this.delegate.sendAuthFailureEvent(str2);
}
@JavascriptInterface
public void onRemoveAnonymousUser() {
this.eventsHandler.onRemoveAnonymousUser();
}
@JavascriptInterface
public void setPollingStatus(String str) {
this.eventsHandler.setPollingStatus(str);
}
@JavascriptInterface
public void setGenericSdkData(String str) {
this.eventsHandler.setGenericSdkData(str);
}
@JavascriptInterface
public void sdkxMigrationLogSynced(boolean z) {
this.eventsHandler.sdkxMigrationLogSynced(z);
}
@JavascriptInterface
public void requestConversationMetadata(String str) {
this.eventsHandler.requestConversationMetadata(str);
}
@JavascriptInterface
public void webchatJsFileLoaded() {
this.eventsHandler.webchatJsFileLoaded();
}
}

View File

@@ -0,0 +1,92 @@
package com.helpshift.chat;
import android.content.ActivityNotFoundException;
import android.content.Intent;
import android.net.Uri;
import android.os.Message;
import android.webkit.ConsoleMessage;
import android.webkit.ValueCallback;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import com.helpshift.log.HSLogger;
import com.helpshift.log.WebviewConsoleLogger;
import com.helpshift.util.Utils;
/* loaded from: classes3.dex */
public class HSChatWebChromeClient extends WebChromeClient {
public final HSChatEventsHandler eventsHandler;
public ValueCallback filePathCallback;
public void setFilePathCallback(ValueCallback valueCallback) {
this.filePathCallback = valueCallback;
}
public HSChatWebChromeClient(HSChatEventsHandler hSChatEventsHandler) {
this.eventsHandler = hSChatEventsHandler;
}
@Override // android.webkit.WebChromeClient
public boolean onConsoleMessage(ConsoleMessage consoleMessage) {
WebviewConsoleLogger.log(consoleMessage.messageLevel(), "chatWVClient", consoleMessage.message() + " -- From line " + consoleMessage.lineNumber() + " of " + consoleMessage.sourceId());
return super.onConsoleMessage(consoleMessage);
}
@Override // android.webkit.WebChromeClient
public boolean onCreateWindow(WebView webView, boolean z, boolean z2, Message message) {
if (!z2) {
return false;
}
WebView.HitTestResult hitTestResult = webView.getHitTestResult();
String createUriForSystemAppLaunch = createUriForSystemAppLaunch(hitTestResult.getType(), hitTestResult.getExtra());
if (Utils.isNotEmpty(createUriForSystemAppLaunch)) {
this.eventsHandler.sendIntentToSystemApp(new Intent("android.intent.action.VIEW", Uri.parse(createUriForSystemAppLaunch)));
return true;
}
WebView webView2 = new WebView(webView.getContext());
this.eventsHandler.addWebviewToCurrentUI(webView2);
((WebView.WebViewTransport) message.obj).setWebView(webView2);
message.sendToTarget();
return true;
}
public final String createUriForSystemAppLaunch(int i, String str) {
if (i != 2) {
return i != 7 ? "" : str;
}
return "tel:" + str;
}
@Override // android.webkit.WebChromeClient
public boolean onShowFileChooser(WebView webView, ValueCallback valueCallback, WebChromeClient.FileChooserParams fileChooserParams) {
if (this.filePathCallback != null) {
HSLogger.d("chatWVClient", "filePathCallback is not null, returning false.");
this.filePathCallback.onReceiveValue(null);
this.filePathCallback = null;
return false;
}
this.filePathCallback = valueCallback;
this.eventsHandler.setAttachmentFilePathCallback(valueCallback);
try {
Intent createIntent = fileChooserParams.createIntent();
createIntent.setType("*/*");
String[] acceptTypes = fileChooserParams.getAcceptTypes();
if (acceptTypes.length != 0) {
createIntent.putExtra("android.intent.extra.MIME_TYPES", acceptTypes);
}
createIntent.setAction("android.intent.action.OPEN_DOCUMENT");
createIntent.addCategory("android.intent.category.OPENABLE");
HSLogger.d("chatWVClient", "Starting open file chooser request.");
this.eventsHandler.openFileChooser(createIntent, 1001);
HSLogger.d("chatWVClient", "onShowFileChooser success, returning true");
return true;
} catch (ActivityNotFoundException e) {
HSLogger.e("chatWVClient", "ActivityNotFoundException error in opening the attachment file chooser.", e);
this.filePathCallback = null;
return true;
} catch (Exception e2) {
HSLogger.e("chatWVClient", "error in opening the attachment in browser window, returning false", e2);
this.filePathCallback = null;
return false;
}
}
}

View File

@@ -0,0 +1,59 @@
package com.helpshift.chat;
import android.content.Intent;
import android.net.Uri;
import android.webkit.WebResourceRequest;
import android.webkit.WebResourceResponse;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import com.helpshift.cache.HelpshiftResourceCacheManager;
import com.helpshift.log.HSLogger;
import com.helpshift.util.ResourceCacheUtil;
/* loaded from: classes3.dex */
public class HSChatWebViewClient extends WebViewClient {
public final HelpshiftResourceCacheManager chatResourceCacheManager;
public final HSChatEventsHandler eventsHandler;
public boolean resourceCacheManagerInitialized;
public HSChatWebViewClient(HSChatEventsHandler hSChatEventsHandler, HelpshiftResourceCacheManager helpshiftResourceCacheManager) {
this.eventsHandler = hSChatEventsHandler;
this.chatResourceCacheManager = helpshiftResourceCacheManager;
}
@Override // android.webkit.WebViewClient
public boolean shouldOverrideUrlLoading(WebView webView, String str) {
this.eventsHandler.sendIntentToSystemApp(new Intent("android.intent.action.VIEW", Uri.parse(str)));
return true;
}
@Override // android.webkit.WebViewClient
public WebResourceResponse shouldInterceptRequest(WebView webView, WebResourceRequest webResourceRequest) {
if (!"GET".equalsIgnoreCase(webResourceRequest.getMethod())) {
return super.shouldInterceptRequest(webView, webResourceRequest);
}
initResourceCacheManager();
if (!this.chatResourceCacheManager.shouldCacheUrl(webResourceRequest.getUrl().getPath())) {
return super.shouldInterceptRequest(webView, webResourceRequest);
}
WebResourceResponse webResourceResponse = ResourceCacheUtil.getWebResourceResponse(this.chatResourceCacheManager, webResourceRequest);
if (webResourceResponse != null) {
return webResourceResponse;
}
WebResourceResponse shouldInterceptRequest = super.shouldInterceptRequest(webView, webResourceRequest);
if (shouldInterceptRequest != null) {
HSLogger.d("ChatWebClient", "Webview response received for request-" + webResourceRequest.toString() + " status:" + shouldInterceptRequest.getStatusCode() + " MimeType:" + shouldInterceptRequest.getMimeType());
} else {
HSLogger.e("ChatWebClient", "Webview response error for request-" + webResourceRequest.getUrl());
}
return shouldInterceptRequest;
}
public final void initResourceCacheManager() {
if (this.resourceCacheManagerInitialized) {
return;
}
this.chatResourceCacheManager.ensureCacheURLsListAvailable();
this.resourceCacheManagerInitialized = true;
}
}

View File

@@ -0,0 +1,53 @@
package com.helpshift.chat;
import com.helpshift.HelpshiftAuthenticationFailureReason;
import com.helpshift.HelpshiftEventsListener;
import com.helpshift.concurrency.HSThreadingService;
import com.helpshift.log.HSLogger;
import java.util.Map;
/* loaded from: classes3.dex */
public class HSEventProxy {
public HelpshiftEventsListener eventsListener;
public final HSThreadingService hsThreadingService;
public void setHelpshiftEventsListener(HelpshiftEventsListener helpshiftEventsListener) {
this.eventsListener = helpshiftEventsListener;
}
public HSEventProxy(HSThreadingService hSThreadingService) {
this.hsThreadingService = hSThreadingService;
}
public void sendEvent(final String str, final Map map) {
HSLogger.d("HSEvntPrxy", "Event occurred: " + str);
this.hsThreadingService.runOnUIThread(new Runnable() { // from class: com.helpshift.chat.HSEventProxy.1
@Override // java.lang.Runnable
public void run() {
if (HSEventProxy.this.eventsListener == null) {
return;
}
HSEventProxy.this.eventsListener.onEventOccurred(str, map);
}
});
}
public void sendAuthFailureEvent(final String str) {
HSLogger.d("HSEvntPrxy", "Authentication failure, reason: " + str);
this.hsThreadingService.runOnUIThread(new Runnable() { // from class: com.helpshift.chat.HSEventProxy.2
@Override // java.lang.Runnable
public void run() {
if (HSEventProxy.this.eventsListener == null) {
return;
}
HelpshiftAuthenticationFailureReason helpshiftAuthenticationFailureReason = HelpshiftAuthenticationFailureReason.UNKNOWN;
if ("missing user auth token".equals(str)) {
helpshiftAuthenticationFailureReason = HelpshiftAuthenticationFailureReason.REASON_AUTH_TOKEN_NOT_PROVIDED;
} else if ("invalid user auth token".equals(str)) {
helpshiftAuthenticationFailureReason = HelpshiftAuthenticationFailureReason.REASON_INVALID_AUTH_TOKEN;
}
HSEventProxy.this.eventsListener.onUserAuthenticationFailure(helpshiftAuthenticationFailureReason);
}
});
}
}

View File

@@ -0,0 +1,32 @@
package com.helpshift.chat;
import android.content.Intent;
import android.webkit.ValueCallback;
import android.webkit.WebView;
/* loaded from: classes3.dex */
public interface HSWebchatToUiCallback {
void addWebviewToCurrentUI(WebView webView);
void onUiConfigChange(String str);
void onUserAuthenticationFailure();
void onWebchatClosed();
void onWebchatError();
void onWebchatLoaded();
void openFileChooser(Intent intent, int i);
void requestConversationMetadata(String str);
void sendIntentToSystemApp(Intent intent);
void setAttachmentFilePathCallback(ValueCallback valueCallback);
void setHelpcenterData();
void webchatJsFileLoaded();
}

View File

@@ -0,0 +1,6 @@
package com.helpshift.concurrency;
/* loaded from: classes3.dex */
public interface HSThreader {
void submit(Runnable runnable);
}

View File

@@ -0,0 +1,40 @@
package com.helpshift.concurrency;
/* loaded from: classes3.dex */
public class HSThreadingService {
public final HSThreader hsuiThreader;
public final HSThreader networkService;
public final HSThreader serialQueue;
public final Object syncLock = new Object();
public HSThreader getNetworkService() {
return this.networkService;
}
public HSThreadingService(HSThreader hSThreader, HSThreader hSThreader2, HSThreader hSThreader3) {
this.networkService = hSThreader;
this.serialQueue = hSThreader2;
this.hsuiThreader = hSThreader3;
}
public void runSerial(Runnable runnable) {
this.serialQueue.submit(runnable);
}
public void runSync(Runnable runnable) {
NotifyingRunnable notifyingRunnable = new NotifyingRunnable(runnable);
synchronized (this.syncLock) {
runSerial(notifyingRunnable);
notifyingRunnable.waitForCompletion();
}
}
public void runOnUIThread(final Runnable runnable) {
this.serialQueue.submit(new Runnable() { // from class: com.helpshift.concurrency.HSThreadingService.2
@Override // java.lang.Runnable
public void run() {
HSThreadingService.this.hsuiThreader.submit(runnable);
}
});
}
}

View File

@@ -0,0 +1,18 @@
package com.helpshift.concurrency;
import android.os.Handler;
import android.os.Looper;
import com.helpshift.util.SafeWrappedRunnable;
/* loaded from: classes3.dex */
public class HSUIThreader implements HSThreader {
@Override // com.helpshift.concurrency.HSThreader
public void submit(Runnable runnable) {
SafeWrappedRunnable safeWrappedRunnable = new SafeWrappedRunnable(runnable);
if (Looper.myLooper() == Looper.getMainLooper()) {
safeWrappedRunnable.run();
} else {
new Handler(Looper.getMainLooper()).post(safeWrappedRunnable);
}
}
}

View File

@@ -0,0 +1,23 @@
package com.helpshift.concurrency;
import com.helpshift.log.HSLogger;
import com.helpshift.util.SafeWrappedRunnable;
import java.util.concurrent.ExecutorService;
/* loaded from: classes3.dex */
public class HSWorkerThreader implements HSThreader {
public ExecutorService executorService;
public HSWorkerThreader(ExecutorService executorService) {
this.executorService = executorService;
}
@Override // com.helpshift.concurrency.HSThreader
public void submit(Runnable runnable) {
try {
this.executorService.submit(new SafeWrappedRunnable(runnable));
} catch (Exception e) {
HSLogger.e("HSThreader", "Error while submitting request.", e);
}
}
}

View File

@@ -0,0 +1,44 @@
package com.helpshift.concurrency;
import com.helpshift.log.HSLogger;
import java.util.concurrent.atomic.AtomicBoolean;
/* loaded from: classes3.dex */
public class NotifyingRunnable implements Runnable {
public final Runnable runnable;
public final Object syncLock = new Object();
public AtomicBoolean isFinished = new AtomicBoolean(false);
public NotifyingRunnable(Runnable runnable) {
this.runnable = runnable;
}
public void waitForCompletion() {
synchronized (this.syncLock) {
while (!this.isFinished.get()) {
try {
this.syncLock.wait();
} catch (InterruptedException e) {
HSLogger.d("NotifyingRunnable", "Exception in NotifyingRunnable", e);
Thread.currentThread().interrupt();
}
}
}
}
@Override // java.lang.Runnable
public void run() {
synchronized (this.syncLock) {
try {
try {
this.runnable.run();
} finally {
this.isFinished.set(true);
this.syncLock.notifyAll();
}
} catch (Throwable th) {
throw th;
}
}
}
}

View File

@@ -0,0 +1,493 @@
package com.helpshift.config;
import com.applovin.impl.sdk.utils.JsonUtils;
import com.ea.nimble.ApplicationEnvironment;
import com.facebook.share.internal.ShareConstants;
import com.glu.plugins.gluanalytics.AnalyticsData;
import com.helpshift.analytics.HSWebchatAnalyticsManager;
import com.helpshift.log.HSLogger;
import com.helpshift.platform.Device;
import com.helpshift.storage.HSPersistentStorage;
import com.helpshift.user.UserManager;
import com.helpshift.util.Utils;
import com.helpshift.util.ValuePair;
import com.ironsource.ad;
import com.ironsource.v8;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.Iterator;
import java.util.Locale;
import java.util.Map;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
/* loaded from: classes3.dex */
public class HSConfigManager {
public Device device;
public boolean hcIsSandbox;
public HSPersistentStorage persistentStorage;
public String sdkSource;
public UserManager userManager;
public HSWebchatAnalyticsManager webchatAnalyticsManager;
public ArrayList debugLogs = new ArrayList();
public ArrayList userTrailList = new ArrayList();
public void saveSDKSource(String str) {
this.sdkSource = str;
}
public HSConfigManager(HSPersistentStorage hSPersistentStorage, HSWebchatAnalyticsManager hSWebchatAnalyticsManager, Device device, UserManager userManager) {
this.persistentStorage = hSPersistentStorage;
this.webchatAnalyticsManager = hSWebchatAnalyticsManager;
this.device = device;
this.userManager = userManager;
}
public void saveInstallKeys(String str, String str2) {
String[] split = str2.split("\\.", 2);
this.persistentStorage.setDomain(split[0]);
this.persistentStorage.setHost(split[1]);
this.persistentStorage.setPlatformId(str);
}
public String getPlatformId() {
return this.persistentStorage.getPlatformId();
}
public String getDomain() {
return this.persistentStorage.getDomain();
}
public void saveConfig(Map map) {
this.persistentStorage.setConfig(Utils.mapToJsonString(map));
}
public void saveCustomIssueFields(Map map) {
this.persistentStorage.setCIFs(Utils.mapToJsonString(map));
}
public void saveLanguage(String str) {
this.persistentStorage.setLanguage(str);
}
public void saveUiConfigDataOfWebchat(String str) {
saveUiConfigDataFor("webchat", str);
}
public void saveUiConfigDataOfHelpcenter(String str) {
saveUiConfigDataFor("helpcenter", str);
}
public String getUiConfigDataOfWebchat() {
return getUiConfigDataFor("webchat");
}
public String getUiConfigDataOfHelpcenter() {
return getUiConfigDataFor("helpcenter");
}
public final void saveUiConfigDataFor(String str, String str2) {
if (Utils.isEmpty(str2) || !Utils.isValidJsonString(str2)) {
return;
}
try {
JSONObject jSONObject = new JSONObject(str2);
if ("webchat".equals(str)) {
this.persistentStorage.setWebchatUiConfigData(jSONObject.toString());
} else if ("helpcenter".equals(str)) {
this.persistentStorage.setHelpcenterUiConfigData(jSONObject.toString());
}
} catch (Exception e) {
HSLogger.e("ConfigMangr", "error in saving the ui config data for " + str, e);
}
}
public final String getUiConfigDataFor(String str) {
if ("webchat".equals(str)) {
return this.persistentStorage.getWebchatUiConfigData();
}
return "helpcenter".equals(str) ? this.persistentStorage.getHelpcenterUiConfigData() : "";
}
public String getCif() {
String cif = this.persistentStorage.getCIF();
return Utils.isEmpty(cif) ? JsonUtils.EMPTY_JSON : cif;
}
public String getHelpcenterConfigJs(String str, String str2, boolean z) {
JSONObject helpshiftConfig = getHelpshiftConfig(false);
JSONObject jSONObject = new JSONObject();
try {
if (Utils.isNotEmpty(str)) {
jSONObject.put("faqId", str);
}
if (Utils.isNotEmpty(str2)) {
jSONObject.put("sectionId", str2);
}
if (z) {
jSONObject.put("showChatIcon", false);
} else if (this.userManager.shouldShowChatIconInHelpcenter()) {
jSONObject.put("showChatIcon", true);
}
String additionalHelpcenterData = this.persistentStorage.getAdditionalHelpcenterData();
if (Utils.isNotEmpty(additionalHelpcenterData) && Utils.isValidJsonString(additionalHelpcenterData)) {
jSONObject.put("additionalInfo", new JSONObject(additionalHelpcenterData));
}
if (this.hcIsSandbox) {
jSONObject.put("hcIsSandbox", true);
}
helpshiftConfig.put("helpcenterConfig", jSONObject);
return helpshiftConfig.toString();
} catch (Exception e) {
HSLogger.e("ConfigMangr", "Error in generating the helpcenter config", e);
return helpshiftConfig.toString();
}
}
public String getWebchatConfigJs(boolean z) {
return getHelpshiftConfig(z).toString();
}
public final JSONObject getHelpshiftConfig(boolean z) {
String platformId = getPlatformId();
String domain = getDomain();
String config = this.persistentStorage.getConfig();
JSONObject liteSdkConfig = getLiteSdkConfig(z);
if (Utils.isEmpty(config)) {
config = JsonUtils.EMPTY_JSON;
}
try {
JSONObject jSONObject = new JSONObject(config);
jSONObject.put("platformId", platformId);
jSONObject.put("domain", domain);
addWidgetOption(jSONObject);
addLanguage(jSONObject);
addUserConfig(jSONObject);
addClearAnonymousUserConfig(jSONObject);
addSDKSource(jSONObject);
if ("proactive".equals(this.sdkSource)) {
addConfigForSubsequentProactiveIssues(jSONObject);
}
addAnonUserIdToLiteSDKConfig(liteSdkConfig);
if (!this.userTrailList.isEmpty()) {
jSONObject.put("userTrail", new JSONArray((Collection) this.userTrailList));
}
jSONObject.put("liteSdkConfig", liteSdkConfig);
return jSONObject;
} catch (JSONException e) {
HSLogger.e("ConfigMangr", "Error in creating the config object", e);
return new JSONObject();
}
}
public final void addAnonUserIdToLiteSDKConfig(JSONObject jSONObject) {
if (Utils.isNotEmpty(this.persistentStorage.getAnonymousUserIdMap())) {
String str = (String) Utils.jsonStringToMap(this.persistentStorage.getAnonymousUserIdMap()).get("userId");
if (Utils.isNotEmpty(str)) {
jSONObject.put("anonUserId", str);
}
}
}
public final void addConfigForSubsequentProactiveIssues(JSONObject jSONObject) {
String localProactiveConfig = this.persistentStorage.getLocalProactiveConfig();
if (Utils.isEmpty(localProactiveConfig)) {
localProactiveConfig = JsonUtils.EMPTY_JSON;
}
try {
jSONObject.put("configForSubsequentProactiveIssues", new JSONObject(localProactiveConfig));
} catch (JSONException e) {
HSLogger.e("ConfigMangr", "Error in setting local proactive config ", e);
}
}
public final void addClearAnonymousUserConfig(JSONObject jSONObject) {
try {
jSONObject.put("clearAnonymousUserOnLogin", this.persistentStorage.isClearAnonymousUser());
} catch (JSONException e) {
HSLogger.e("ConfigMangr", "error in setting clear anonymous user flag ", e);
}
}
public final void addSDKSource(JSONObject jSONObject) {
HSLogger.d("ConfigMangr", "Adding sdk open source value to config : " + this.sdkSource);
if (Utils.isEmpty(this.sdkSource)) {
return;
}
jSONObject.put(ShareConstants.FEED_SOURCE_PARAM, this.sdkSource);
}
public final void addWidgetOption(JSONObject jSONObject) {
if (jSONObject.has("widgetOptions")) {
return;
}
JSONObject jSONObject2 = new JSONObject();
try {
jSONObject2.put("showLauncher", false);
jSONObject2.put("fullScreen", true);
jSONObject.put("widgetOptions", jSONObject2);
} catch (JSONException e) {
HSLogger.e("ConfigMangr", "Error in setting the widget option config", e);
}
}
public final void addLanguage(JSONObject jSONObject) {
if (jSONObject.has("language")) {
return;
}
try {
String language = this.persistentStorage.getLanguage();
if (Utils.isEmpty(language)) {
language = this.device.getLanguage();
}
jSONObject.put("language", language);
} catch (Exception e) {
HSLogger.e("ConfigMangr", "Error in setting the language", e);
}
}
public final void addUserConfig(JSONObject jSONObject) {
String activeUser = this.persistentStorage.getActiveUser();
if (Utils.isNotEmpty(activeUser)) {
try {
JSONObject jSONObject2 = new JSONObject(activeUser);
Iterator<String> keys = jSONObject2.keys();
while (keys.hasNext()) {
String next = keys.next();
jSONObject.put(next, jSONObject2.get(next));
}
} catch (JSONException e) {
HSLogger.e("ConfigMangr", "Error in setting the user config", e);
}
}
}
public synchronized void pushBreadCrumb(String str) {
try {
try {
String format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", Locale.ENGLISH).format(new Date());
JSONArray breadCrumbs = this.persistentStorage.getBreadCrumbs();
if (breadCrumbs == null) {
breadCrumbs = new JSONArray();
}
if (str.length() > 5000) {
str = str.substring(0, 5000);
}
breadCrumbs.put(jsonifyBreadCrumb(str.trim(), format));
int length = breadCrumbs.length();
if (length > 100) {
JSONArray jSONArray = new JSONArray();
for (int i = length - 100; i <= 100; i++) {
jSONArray.put(breadCrumbs.getJSONObject(i));
}
breadCrumbs = jSONArray;
}
this.persistentStorage.setBreadCrumbs(breadCrumbs.toString());
} catch (Exception e) {
HSLogger.e("ConfigMangr", "Error pushing BreadCrumbs", e);
}
} catch (Throwable th) {
throw th;
}
}
public synchronized void clearBreadCrumbs() {
this.persistentStorage.setBreadCrumbs(new JSONArray().toString());
}
public final JSONObject jsonifyBreadCrumb(String str, String str2) {
JSONObject jSONObject = new JSONObject();
jSONObject.put("a", str);
jSONObject.put("d", str2);
return jSONObject;
}
public synchronized JSONArray getDebugLogs(int i) {
JSONArray jSONArray;
jSONArray = new JSONArray();
try {
int min = Math.min(this.debugLogs.size(), i);
for (int i2 = 0; i2 < min; i2++) {
jSONArray.put(this.debugLogs.get(i2));
}
} catch (Exception e) {
HSLogger.e("ConfigMangr", "Error getting DebugLogs.", e);
}
return jSONArray;
}
public synchronized JSONArray getBreadCrumbs(int i) {
JSONArray jSONArray;
jSONArray = new JSONArray();
try {
JSONArray breadCrumbs = this.persistentStorage.getBreadCrumbs();
int length = breadCrumbs.length();
for (int i2 = i < length ? length - i : 0; i2 < length; i2++) {
jSONArray.put(breadCrumbs.get(i2));
}
} catch (Exception e) {
HSLogger.e("ConfigMangr", "Error getting breadcrumbs", e);
}
return jSONArray;
}
public final JSONObject getLiteSdkConfig(boolean z) {
JSONObject jSONObject = new JSONObject();
try {
String localStorageData = this.persistentStorage.getLocalStorageData();
if (Utils.isNotEmpty(localStorageData)) {
jSONObject.put("localStorageData", new JSONObject(localStorageData));
}
jSONObject.put("metaData", generateDeviceMetadata());
jSONObject.put(ad.y, this.device.getOsType());
String currentPushToken = this.persistentStorage.getCurrentPushToken();
if (Utils.isNotEmpty(currentPushToken) && !this.userManager.isPushTokenSynced()) {
jSONObject.put("pushToken", currentPushToken);
}
jSONObject.put("analyticsData", new JSONObject(this.webchatAnalyticsManager.getAnalyticsDataMap()));
jSONObject.put("deviceId", this.device.getDeviceId());
jSONObject.put("launchedFromHelpcenter", z);
return jSONObject;
} catch (JSONException e) {
HSLogger.e("ConfigMangr", "error in generating liteSdkConfig", e);
return jSONObject;
}
}
public final JSONObject generateDeviceMetadata() {
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put(v8.i.W, this.device.getAppVersion());
jSONObject.put("appName", this.device.getAppName());
jSONObject.put("appIdentifier", this.device.getAppIdentifier());
jSONObject.put(v8.i.Y, this.device.getBatteryLevel());
jSONObject.put("batteryStatus", this.device.getBatteryStatus());
jSONObject.put(AnalyticsData.S_CARRIER_NAME, this.device.getCarrierName());
jSONObject.put(ApplicationEnvironment.NIMBLE_PARAMETER_COUNTRY_CODE, this.device.getCountryCode());
jSONObject.put("networkType", this.device.getNetworkType());
ValuePair diskSpace = this.device.getDiskSpace();
jSONObject.put("diskSpace", diskSpace.first);
jSONObject.put("freeSpace", diskSpace.second);
jSONObject.put(AnalyticsData.S_OS_VERSION, this.device.getOSVersion());
jSONObject.put("deviceModel", this.device.getDeviceModel());
jSONObject.put("liteSdkVersion", this.device.getSDKVersion());
jSONObject.put("pluginType", this.webchatAnalyticsManager.getCommonAnalyticsMap().get("s"));
String str = (String) this.webchatAnalyticsManager.getCommonAnalyticsMap().get("pv");
if (!Utils.isEmpty(str)) {
jSONObject.put("pluginVersion", str);
}
} catch (JSONException e) {
HSLogger.e("ConfigMangr", "error in generating device metadata", e);
}
return jSONObject;
}
public void setLocalStorageData(String str) {
if (Utils.isEmpty(str) || !Utils.isValidJsonString(str)) {
return;
}
try {
String localStorageData = this.persistentStorage.getLocalStorageData();
if (Utils.isNotEmpty(localStorageData)) {
JSONObject jSONObject = new JSONObject(str);
JSONObject jSONObject2 = new JSONObject(localStorageData);
Iterator<String> keys = jSONObject.keys();
while (keys.hasNext()) {
String next = keys.next();
jSONObject2.put(next, jSONObject.get(next));
}
this.persistentStorage.saveLocalStorageData(jSONObject2.toString());
return;
}
this.persistentStorage.saveLocalStorageData(str);
} catch (JSONException e) {
HSLogger.e("ConfigMangr", "error in storing local storage data", e);
}
}
public void removeLocalStorageData(String str) {
if (Utils.isEmpty(str) || !Utils.isValidJsonString(str)) {
return;
}
String localStorageData = this.persistentStorage.getLocalStorageData();
if (Utils.isEmpty(localStorageData)) {
return;
}
try {
JSONArray jSONArray = new JSONObject(str).getJSONArray("data");
JSONObject jSONObject = new JSONObject(localStorageData);
for (int i = 0; i < jSONArray.length(); i++) {
String string = jSONArray.getString(i);
if (jSONObject.has(string)) {
jSONObject.remove(string);
}
}
this.persistentStorage.saveLocalStorageData(jSONObject.toString());
} catch (JSONException e) {
HSLogger.e("ConfigMangr", "error in deleting local storage data", e);
}
}
public String getLocalStorageData() {
String localStorageData = this.persistentStorage.getLocalStorageData();
return Utils.isEmpty(localStorageData) ? JsonUtils.EMPTY_JSON : localStorageData;
}
public void setAdditionalHelpcenterData(String str) {
if (Utils.isEmpty(str) || !Utils.isValidJsonString(str)) {
return;
}
try {
String additionalHelpcenterData = this.persistentStorage.getAdditionalHelpcenterData();
if (Utils.isNotEmpty(additionalHelpcenterData)) {
JSONObject jSONObject = new JSONObject(str);
JSONObject jSONObject2 = new JSONObject(additionalHelpcenterData);
Iterator<String> keys = jSONObject.keys();
while (keys.hasNext()) {
String next = keys.next();
jSONObject2.put(next, jSONObject.get(next));
}
this.persistentStorage.saveAdditionalHelpcenterData(jSONObject2.toString());
return;
}
this.persistentStorage.saveAdditionalHelpcenterData(str);
} catch (Exception e) {
HSLogger.e("ConfigMangr", "error in storing additional Helpcenter data", e);
}
}
public String getAdditionalInfo() {
String additionalHelpcenterData = this.persistentStorage.getAdditionalHelpcenterData();
return Utils.isEmpty(additionalHelpcenterData) ? JsonUtils.EMPTY_JSON : additionalHelpcenterData;
}
public void removeAdditionalHelpcenterData(String str) {
if (Utils.isEmpty(str) || !Utils.isValidJsonString(str)) {
return;
}
String additionalHelpcenterData = this.persistentStorage.getAdditionalHelpcenterData();
if (Utils.isEmpty(additionalHelpcenterData)) {
return;
}
try {
JSONArray jSONArray = new JSONObject(str).getJSONArray("data");
JSONObject jSONObject = new JSONObject(additionalHelpcenterData);
for (int i = 0; i < jSONArray.length(); i++) {
String string = jSONArray.getString(i);
if (jSONObject.has(string)) {
jSONObject.remove(string);
}
}
this.persistentStorage.saveAdditionalHelpcenterData(jSONObject.toString());
} catch (Exception e) {
HSLogger.e("ConfigMangr", "error in deleting helpcenter data", e);
}
}
public void clearUserTrail() {
this.userTrailList.clear();
}
}

View File

@@ -0,0 +1,10 @@
package com.helpshift.core;
import android.app.LocaleManager;
/* loaded from: classes3.dex */
public abstract /* synthetic */ class AndroidDevice$$ExternalSyntheticApiModelOutline0 {
public static /* bridge */ /* synthetic */ Class m() {
return LocaleManager.class;
}
}

View File

@@ -0,0 +1,10 @@
package com.helpshift.core;
import android.app.LocaleManager;
/* loaded from: classes3.dex */
public abstract /* synthetic */ class AndroidDevice$$ExternalSyntheticApiModelOutline1 {
public static /* bridge */ /* synthetic */ LocaleManager m(Object obj) {
return (LocaleManager) obj;
}
}

View File

@@ -0,0 +1,5 @@
package com.helpshift.core;
/* loaded from: classes3.dex */
public abstract /* synthetic */ class AndroidDevice$$ExternalSyntheticApiModelOutline2 {
}

View File

@@ -0,0 +1,188 @@
package com.helpshift.core;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.Build;
import android.os.Environment;
import android.os.LocaleList;
import android.os.StatFs;
import android.telephony.TelephonyManager;
import android.util.Base64;
import com.applovin.sdk.AppLovinEventTypes;
import com.facebook.internal.AnalyticsEvents;
import com.facebook.internal.security.CertificateUtil;
import com.helpshift.log.HSLogger;
import com.helpshift.platform.Device;
import com.helpshift.storage.HSPersistentStorage;
import com.helpshift.util.Utils;
import com.helpshift.util.ValuePair;
import java.util.Locale;
import java.util.UUID;
/* loaded from: classes3.dex */
public class AndroidDevice implements Device {
public final Context context;
public HSPersistentStorage persistentStorage;
@Override // com.helpshift.platform.Device
public String getOsType() {
return "android";
}
@Override // com.helpshift.platform.Device
public String getSDKVersion() {
return "10.2.2";
}
public AndroidDevice(Context context, HSPersistentStorage hSPersistentStorage) {
this.context = context;
this.persistentStorage = hSPersistentStorage;
}
@Override // com.helpshift.platform.Device
public String getAppVersion() {
try {
return this.context.getPackageManager().getPackageInfo(getAppIdentifier(), 0).versionName;
} catch (Exception e) {
HSLogger.d("Device", "Error getting app version", e);
return null;
}
}
@Override // com.helpshift.platform.Device
public String getAppName() {
String str;
try {
str = this.context.getPackageManager().getApplicationLabel(this.context.getApplicationInfo()).toString();
} catch (Exception e) {
HSLogger.d("Device", "Error getting application name", e);
str = null;
}
return str == null ? "Support" : str;
}
@Override // com.helpshift.platform.Device
public String getAppIdentifier() {
return this.context.getPackageName();
}
@Override // com.helpshift.platform.Device
public String getDeviceModel() {
return Build.MODEL;
}
@Override // com.helpshift.platform.Device
public String getBatteryLevel() {
if (this.context.registerReceiver(null, new IntentFilter("android.intent.action.BATTERY_CHANGED")) == null) {
return "";
}
return ((int) ((r0.getIntExtra(AppLovinEventTypes.USER_COMPLETED_LEVEL, -1) / r0.getIntExtra("scale", -1)) * 100.0f)) + "%";
}
@Override // com.helpshift.platform.Device
public String getBatteryStatus() {
Intent registerReceiver = this.context.registerReceiver(null, new IntentFilter("android.intent.action.BATTERY_CHANGED"));
if (registerReceiver == null) {
return "Not charging";
}
int intExtra = registerReceiver.getIntExtra("status", -1);
return (intExtra == 2 || intExtra == 5) ? "Charging" : "Not charging";
}
@Override // com.helpshift.platform.Device
public ValuePair getDiskSpace() {
StatFs statFs = new StatFs(Environment.getDataDirectory().getPath());
return new ValuePair((Math.round(((statFs.getBlockCountLong() * statFs.getBlockSizeLong()) / 1.073741824E9d) * 100.0d) / 100.0d) + " GB", (Math.round(((statFs.getAvailableBlocksLong() * statFs.getBlockSizeLong()) / 1.073741824E9d) * 100.0d) / 100.0d) + " GB");
}
@Override // com.helpshift.platform.Device
public String getOSVersion() {
return Build.VERSION.RELEASE;
}
@Override // com.helpshift.platform.Device
public String getCarrierName() {
TelephonyManager telephonyManager = (TelephonyManager) this.context.getSystemService("phone");
return telephonyManager == null ? "" : telephonyManager.getNetworkOperatorName();
}
@Override // com.helpshift.platform.Device
public String getNetworkType() {
NetworkInfo activeNetworkInfo;
String str = null;
try {
ConnectivityManager connectivityManager = (ConnectivityManager) this.context.getSystemService("connectivity");
if (connectivityManager != null && (activeNetworkInfo = connectivityManager.getActiveNetworkInfo()) != null) {
str = activeNetworkInfo.getTypeName();
}
} catch (SecurityException unused) {
}
return str == null ? AnalyticsEvents.PARAMETER_DIALOG_OUTCOME_VALUE_UNKNOWN : str;
}
@Override // com.helpshift.platform.Device
public String getCountryCode() {
TelephonyManager telephonyManager = (TelephonyManager) this.context.getSystemService("phone");
return telephonyManager == null ? "" : telephonyManager.getSimCountryIso();
}
@Override // com.helpshift.platform.Device
public String getRom() {
return System.getProperty("os.version") + CertificateUtil.DELIMITER + Build.FINGERPRINT;
}
@Override // com.helpshift.platform.Device
public String getLanguage() {
String languageTag;
LocaleList applicationLocales;
try {
if (Build.VERSION.SDK_INT >= 33) {
applicationLocales = AndroidDevice$$ExternalSyntheticApiModelOutline1.m(this.context.getSystemService(AndroidDevice$$ExternalSyntheticApiModelOutline0.m())).getApplicationLocales();
if (applicationLocales != null && !applicationLocales.isEmpty()) {
languageTag = applicationLocales.get(0).toLanguageTag();
} else {
languageTag = Locale.getDefault().toLanguageTag();
}
} else {
languageTag = Locale.getDefault().toLanguageTag();
}
return languageTag;
} catch (Exception e) {
HSLogger.e("Device", "Error getting app language", e);
return "unknown";
}
}
@Override // com.helpshift.platform.Device
public boolean isOnline() {
try {
NetworkInfo activeNetworkInfo = ((ConnectivityManager) this.context.getSystemService("connectivity")).getActiveNetworkInfo();
if (activeNetworkInfo != null) {
return activeNetworkInfo.isConnected();
}
return false;
} catch (Exception e) {
HSLogger.e("Device", "Exception while getting system connectivity service", e);
return false;
}
}
@Override // com.helpshift.platform.Device
public String encodeBase64(String str) {
return Base64.encodeToString(str.getBytes(), 2);
}
@Override // com.helpshift.platform.Device
public String getDeviceId() {
String hsDeviceId = this.persistentStorage.getHsDeviceId();
if (!Utils.isEmpty(hsDeviceId)) {
return hsDeviceId;
}
String uuid = UUID.randomUUID().toString();
this.persistentStorage.setHsDeviceId(uuid);
return uuid;
}
}

View File

@@ -0,0 +1,240 @@
package com.helpshift.core;
import android.content.Context;
import com.helpshift.analytics.HSAnalyticsEventDM;
import com.helpshift.analytics.HSWebchatAnalyticsManager;
import com.helpshift.cache.ChatResourceEvictStrategy;
import com.helpshift.cache.HCResourceCacheEvictStrategy;
import com.helpshift.cache.HelpcenterCacheEvictionManager;
import com.helpshift.cache.HelpshiftResourceCacheManager;
import com.helpshift.cache.ResourceCacheEvictStrategy;
import com.helpshift.chat.HSEventProxy;
import com.helpshift.concurrency.HSThreadingService;
import com.helpshift.concurrency.HSUIThreader;
import com.helpshift.concurrency.HSWorkerThreader;
import com.helpshift.config.HSConfigManager;
import com.helpshift.migrator.MigrationFailureLogProvider;
import com.helpshift.migrator.NativeToSdkxMigrator;
import com.helpshift.network.HSDownloaderNetwork;
import com.helpshift.network.HSHttpTransport;
import com.helpshift.network.HTTPTransport;
import com.helpshift.network.URLConnectionProvider;
import com.helpshift.notification.CoreNotificationManager;
import com.helpshift.notification.HSNotificationManager;
import com.helpshift.notification.HSPushTokenManager;
import com.helpshift.notification.RequestUnreadMessageCountHandler;
import com.helpshift.platform.Device;
import com.helpshift.poller.ConversationPoller;
import com.helpshift.poller.ExponentialBackoff;
import com.helpshift.poller.FetchNotificationUpdate;
import com.helpshift.poller.PollerController;
import com.helpshift.storage.HSGenericDataManager;
import com.helpshift.storage.HSPersistentStorage;
import com.helpshift.storage.SharedPreferencesStore;
import com.helpshift.user.UserManager;
import com.helpshift.util.SdkURLs;
import com.mbridge.msdk.newreward.function.common.MBridgeCommon;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.atomic.AtomicBoolean;
/* loaded from: classes3.dex */
public class HSContext {
public static AtomicBoolean installCallSuccessful = new AtomicBoolean(false);
public static HSContext instance;
public HSAnalyticsEventDM analyticsEventDM;
public HSWebchatAnalyticsManager analyticsManager;
public HelpshiftResourceCacheManager chatResourceCacheManager;
public HSConfigManager configManager;
public final Context context;
public ConversationPoller conversationPoller;
public Device device;
public HSGenericDataManager genericDataManager;
public HelpcenterCacheEvictionManager helpcenterCacheEvictionManager;
public HelpshiftResourceCacheManager helpcenterResourceCacheManager;
public HSEventProxy hsEventProxy;
public HSThreadingService hsThreadingService = new HSThreadingService(new HSWorkerThreader(Executors.newFixedThreadPool(2)), new HSWorkerThreader(Executors.newSingleThreadExecutor()), new HSUIThreader());
public HTTPTransport httpTransport;
public boolean isSDKLoggingEnabled;
public boolean isSdkOpen;
public boolean isWebchatOpen;
public boolean isWebchatOpenedFromHelpcenter;
public HSJSGenerator jsGenerator;
public final NativeToSdkxMigrator nativeToSdkxMigrator;
public CoreNotificationManager notificationManager;
public HSPersistentStorage persistentStorage;
public HSPushTokenManager pushTokenManager;
public RequestUnreadMessageCountHandler requestUnreadMessageCountHandler;
public ScheduledThreadPoolExecutor scheduledThreadPoolExecutor;
public UserManager userManager;
public static HSContext getInstance() {
return instance;
}
public HSAnalyticsEventDM getAnalyticsEventDM() {
return this.analyticsEventDM;
}
public HSConfigManager getConfigManager() {
return this.configManager;
}
public ConversationPoller getConversationPoller() {
return this.conversationPoller;
}
public Device getDevice() {
return this.device;
}
public HSGenericDataManager getGenericDataManager() {
return this.genericDataManager;
}
public HSEventProxy getHsEventProxy() {
return this.hsEventProxy;
}
public HSThreadingService getHsThreadingService() {
return this.hsThreadingService;
}
public HSJSGenerator getJsGenerator() {
return this.jsGenerator;
}
public NativeToSdkxMigrator getNativeToSdkxMigrator() {
return this.nativeToSdkxMigrator;
}
public CoreNotificationManager getNotificationManager() {
return this.notificationManager;
}
public HSPersistentStorage getPersistentStorage() {
return this.persistentStorage;
}
public RequestUnreadMessageCountHandler getRequestUnreadMessageCountHandler() {
return this.requestUnreadMessageCountHandler;
}
public UserManager getUserManager() {
return this.userManager;
}
public HSWebchatAnalyticsManager getWebchatAnalyticsManager() {
return this.analyticsManager;
}
public boolean isIsWebchatOpenedFromHelpcenter() {
return this.isWebchatOpenedFromHelpcenter;
}
public boolean isSDKLoggingEnabled() {
return this.isSDKLoggingEnabled;
}
public boolean isSdkOpen() {
return this.isSdkOpen;
}
public boolean isWebchatUIOpen() {
return this.isWebchatOpen;
}
public void setIsWebchatOpenedFromHelpcenter(boolean z) {
this.isWebchatOpenedFromHelpcenter = z;
}
public void setSDKLoggingEnabled(boolean z) {
this.isSDKLoggingEnabled = z;
}
public void setSdkIsOpen(boolean z) {
this.isSdkOpen = z;
}
public void setWebchatUIIsOpen(boolean z) {
this.isWebchatOpen = z;
}
public static synchronized void initInstance(Context context) {
synchronized (HSContext.class) {
if (instance == null) {
instance = new HSContext(context);
}
}
}
public HSContext(Context context) {
this.context = context;
this.persistentStorage = new HSPersistentStorage(new SharedPreferencesStore(context, "__hs_lite_sdk_store", 0));
this.nativeToSdkxMigrator = new NativeToSdkxMigrator(context, this.persistentStorage);
}
public void initialiseComponents(Context context) {
this.scheduledThreadPoolExecutor = new ScheduledThreadPoolExecutor(1, new ThreadFactory() { // from class: com.helpshift.core.HSContext.1
@Override // java.util.concurrent.ThreadFactory
public Thread newThread(Runnable runnable) {
return new Thread(runnable, "hs_notif_poller");
}
});
AndroidDevice androidDevice = new AndroidDevice(context, this.persistentStorage);
this.device = androidDevice;
this.notificationManager = new HSNotificationManager(context, androidDevice, this.persistentStorage, this.hsThreadingService);
this.genericDataManager = new HSGenericDataManager(this.persistentStorage);
this.httpTransport = new HSHttpTransport();
this.analyticsManager = new HSWebchatAnalyticsManager(this.persistentStorage, this.device);
HSEventProxy hSEventProxy = new HSEventProxy(this.hsThreadingService);
this.hsEventProxy = hSEventProxy;
HSPushTokenManager hSPushTokenManager = new HSPushTokenManager(this.device, this.persistentStorage, this.hsThreadingService, hSEventProxy, this.httpTransport, this.genericDataManager);
this.pushTokenManager = hSPushTokenManager;
UserManager userManager = new UserManager(this.persistentStorage, hSPushTokenManager, this.genericDataManager, this.hsThreadingService, this.notificationManager);
this.userManager = userManager;
this.configManager = new HSConfigManager(this.persistentStorage, this.analyticsManager, this.device, userManager);
FetchNotificationUpdate fetchNotificationUpdate = new FetchNotificationUpdate(this.device, this.persistentStorage, this.genericDataManager, this.userManager, this.notificationManager, this.httpTransport, this.hsEventProxy);
ConversationPoller conversationPoller = new ConversationPoller(new PollerController(fetchNotificationUpdate, this.userManager, new ExponentialBackoff(5000, MBridgeCommon.DEFAULT_LOAD_TIMEOUT), this.scheduledThreadPoolExecutor), this.userManager);
this.conversationPoller = conversationPoller;
this.userManager.setConversationPoller(conversationPoller);
this.userManager.setFetchNotificationUpdateFunction(fetchNotificationUpdate);
this.analyticsEventDM = new HSAnalyticsEventDM(this.device, this.userManager, this.persistentStorage, this.analyticsManager, this.hsThreadingService, this.httpTransport);
this.jsGenerator = new HSJSGenerator(this.configManager);
this.requestUnreadMessageCountHandler = new RequestUnreadMessageCountHandler(this.persistentStorage, fetchNotificationUpdate, this.userManager, this.hsEventProxy, this.hsThreadingService);
}
public HelpshiftResourceCacheManager getChatResourceCacheManager() {
if (this.chatResourceCacheManager == null) {
this.chatResourceCacheManager = getHelpshiftResourceCacheManager(new SharedPreferencesStore(this.context, "__hs_chat_resource_cache", 0), new ChatResourceEvictStrategy(), SdkURLs.AWS_CACHE_URLS_CONFIG, "chat_cacheURLs", "webchat");
}
return this.chatResourceCacheManager;
}
public HelpshiftResourceCacheManager getHelpcenterResourceCacheManager() {
if (this.helpcenterResourceCacheManager == null) {
this.helpcenterResourceCacheManager = getHelpshiftResourceCacheManager(new SharedPreferencesStore(this.context, "__hs_helpcenter_resource_cache", 0), new HCResourceCacheEvictStrategy(), SdkURLs.HC_CACHE_URLS_CONFIG, "helpcenter_cacheURLs", "helpcenter");
}
return this.helpcenterResourceCacheManager;
}
public HelpcenterCacheEvictionManager getHelpcenterCacheEvictionManager() {
if (this.helpcenterCacheEvictionManager == null) {
this.helpcenterCacheEvictionManager = new HelpcenterCacheEvictionManager(this.persistentStorage, this.context.getCacheDir().getAbsolutePath(), "helpcenter");
}
return this.helpcenterCacheEvictionManager;
}
public final HelpshiftResourceCacheManager getHelpshiftResourceCacheManager(SharedPreferencesStore sharedPreferencesStore, ResourceCacheEvictStrategy resourceCacheEvictStrategy, String str, String str2, String str3) {
return new HelpshiftResourceCacheManager(sharedPreferencesStore, new HSDownloaderNetwork(new URLConnectionProvider()), resourceCacheEvictStrategy, this.context.getCacheDir().getAbsolutePath(), str, str2, str3);
}
public void sendMigrationFailureLogs() {
new MigrationFailureLogProvider(this.context, this.httpTransport, this.persistentStorage, this.device, this.hsThreadingService).sendMigrationFailureLogs();
}
public static boolean verifyInstall() {
return installCallSuccessful.get();
}
}

View File

@@ -0,0 +1,45 @@
package com.helpshift.core;
import android.content.Context;
import com.helpshift.config.HSConfigManager;
import com.helpshift.util.AssetsUtil;
import com.helpshift.util.SdkURLs;
import com.helpshift.util.Utils;
/* loaded from: classes3.dex */
public class HSJSGenerator {
public static String backBtnClickJs = "Helpcenter( JSON.stringify({ \"eventType\": \"backBtnClick\", \"config\": {} }));";
public static String reloadIframeJS = "Helpcenter( JSON.stringify({ \"eventType\": \"reloadHelpcenter\", \"config\": %helpshiftConfig }));";
public static String sendForegroundEvent = "Helpcenter( JSON.stringify({ \"eventType\": \"sdkxIsInForeground\", \"config\": %foreground }));";
public static String sendWebchatData = "Helpcenter( JSON.stringify({ \"eventType\": \"setWebchatData\", \"config\": %data }));";
public static String showNotificationBadgeJS = "Helpcenter(JSON.stringify({ \"eventType\": \"showNotifBadge\", \"config\": { \"notifCount\": %count } }));";
public HSConfigManager configManager;
public String helpcenterEmbeddedCodeString;
public String webchatEmbeddedCodeString;
public HSJSGenerator(HSConfigManager hSConfigManager) {
this.configManager = hSConfigManager;
}
public String getWebchatEmbeddedCodeString(Context context) {
if (Utils.isEmpty(this.webchatEmbeddedCodeString)) {
String readAssetFileContents = AssetsUtil.readAssetFileContents(context, "helpshift/Webchat.js");
if (Utils.isEmpty(readAssetFileContents)) {
return "";
}
this.webchatEmbeddedCodeString = readAssetFileContents.replace("%cdn", SdkURLs.AWS_WEBCHAT_JS);
}
return this.webchatEmbeddedCodeString.replace("%config", this.configManager.getWebchatConfigJs(HSContext.getInstance().isIsWebchatOpenedFromHelpcenter())).replace("%cifs", this.configManager.getCif());
}
public String getHelpcenterEmbeddedCodeString(Context context, String str, String str2, boolean z) {
if (Utils.isEmpty(this.helpcenterEmbeddedCodeString)) {
String readAssetFileContents = AssetsUtil.readAssetFileContents(context, "helpshift/Helpcenter.js");
if (Utils.isEmpty(readAssetFileContents)) {
return "";
}
this.helpcenterEmbeddedCodeString = readAssetFileContents.replace("%cdn", SdkURLs.HELPCENTER_MIDDLEWARE_JS);
}
return this.helpcenterEmbeddedCodeString.replace("%config", this.configManager.getHelpcenterConfigJs(str, str2, z));
}
}

View File

@@ -0,0 +1,37 @@
package com.helpshift.exception;
import android.util.Log;
import com.helpshift.Helpshift;
import com.helpshift.log.HSLogger;
import java.lang.Thread;
/* loaded from: classes3.dex */
public abstract class HSUncaughtExceptionHandler {
public static void init() {
final Thread.UncaughtExceptionHandler defaultUncaughtExceptionHandler = Thread.getDefaultUncaughtExceptionHandler();
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() { // from class: com.helpshift.exception.HSUncaughtExceptionHandler.1
@Override // java.lang.Thread.UncaughtExceptionHandler
public void uncaughtException(Thread thread, Throwable th) {
if (HSUncaughtExceptionHandler.isCausedByHelpshift(th)) {
HSLogger.e("UncghtExptnHndlr", "UNCAUGHT EXCEPTION ", th);
}
Thread.UncaughtExceptionHandler uncaughtExceptionHandler = defaultUncaughtExceptionHandler;
if (uncaughtExceptionHandler != null) {
uncaughtExceptionHandler.uncaughtException(thread, th);
}
}
});
}
public static boolean isCausedByHelpshift(Throwable th) {
if (th == null) {
return false;
}
try {
return Log.getStackTraceString(th).contains(Helpshift.class.getPackage().getName());
} catch (Exception e) {
HSLogger.e("UncghtExptnHndlr", "Error determining crash from Helpshift", e);
return false;
}
}
}

View File

@@ -0,0 +1,170 @@
package com.helpshift.faq;
import android.content.Intent;
import android.webkit.WebView;
import com.facebook.gamingservices.cloudgaming.internal.SDKConstants;
import com.helpshift.cache.HelpshiftResourceCacheManager;
import com.helpshift.concurrency.HSThreadingService;
import com.helpshift.config.HSConfigManager;
import com.helpshift.log.HSLogger;
import java.lang.ref.WeakReference;
import org.json.JSONArray;
import org.json.JSONException;
/* loaded from: classes3.dex */
public class HSHelpcenterEventsHandler {
public HSConfigManager configManager;
public HelpshiftResourceCacheManager resourceCacheManager;
public HSThreadingService threadingService;
public WeakReference uiCallback;
public HSHelpcenterEventsHandler(HSConfigManager hSConfigManager, HSThreadingService hSThreadingService, HelpshiftResourceCacheManager helpshiftResourceCacheManager) {
this.configManager = hSConfigManager;
this.threadingService = hSThreadingService;
this.resourceCacheManager = helpshiftResourceCacheManager;
}
public void setHelpcenterUiCallback(HelpcenterToUiCallback helpcenterToUiCallback) {
this.uiCallback = new WeakReference(helpcenterToUiCallback);
}
public void onSetAdditionalHelpcenterData(final String str) {
this.threadingService.runSerial(new Runnable() { // from class: com.helpshift.faq.HSHelpcenterEventsHandler.1
@Override // java.lang.Runnable
public void run() {
HSHelpcenterEventsHandler.this.configManager.setAdditionalHelpcenterData(str);
}
});
}
public void onRemoveAdditionalHelpcenterData(final String str) {
this.threadingService.runSerial(new Runnable() { // from class: com.helpshift.faq.HSHelpcenterEventsHandler.2
@Override // java.lang.Runnable
public void run() {
HSHelpcenterEventsHandler.this.configManager.removeAdditionalHelpcenterData(str);
}
});
}
public void closeHelpcenter() {
this.threadingService.runOnUIThread(new Runnable() { // from class: com.helpshift.faq.HSHelpcenterEventsHandler.3
@Override // java.lang.Runnable
public void run() {
HelpcenterToUiCallback helpcenterToUiCallback = (HelpcenterToUiCallback) HSHelpcenterEventsHandler.this.uiCallback.get();
if (helpcenterToUiCallback != null) {
helpcenterToUiCallback.closeHelpcenter();
}
}
});
}
public void openWebchat() {
this.threadingService.runOnUIThread(new Runnable() { // from class: com.helpshift.faq.HSHelpcenterEventsHandler.4
@Override // java.lang.Runnable
public void run() {
HelpcenterToUiCallback helpcenterToUiCallback = (HelpcenterToUiCallback) HSHelpcenterEventsHandler.this.uiCallback.get();
if (helpcenterToUiCallback != null) {
helpcenterToUiCallback.openWebchat();
}
}
});
}
public void onHelpcenterLoaded(final String str) {
this.threadingService.runOnUIThread(new Runnable() { // from class: com.helpshift.faq.HSHelpcenterEventsHandler.5
@Override // java.lang.Runnable
public void run() {
HelpcenterToUiCallback helpcenterToUiCallback = (HelpcenterToUiCallback) HSHelpcenterEventsHandler.this.uiCallback.get();
if (helpcenterToUiCallback != null) {
helpcenterToUiCallback.onHelpcenterLoaded();
helpcenterToUiCallback.setNativeUiColors(str);
helpcenterToUiCallback.showNotificationBadgeOnHCLoad();
}
}
});
this.threadingService.runSerial(new Runnable() { // from class: com.helpshift.faq.HSHelpcenterEventsHandler.6
@Override // java.lang.Runnable
public void run() {
HSHelpcenterEventsHandler.this.configManager.saveUiConfigDataOfHelpcenter(str);
}
});
}
public void addWebviewToUi(final WebView webView) {
this.threadingService.runOnUIThread(new Runnable() { // from class: com.helpshift.faq.HSHelpcenterEventsHandler.7
@Override // java.lang.Runnable
public void run() {
HelpcenterToUiCallback helpcenterToUiCallback = (HelpcenterToUiCallback) HSHelpcenterEventsHandler.this.uiCallback.get();
if (helpcenterToUiCallback != null) {
helpcenterToUiCallback.addWebviewToUi(webView);
}
}
});
}
public void sendEventToSystemApp(final Intent intent) {
this.threadingService.runOnUIThread(new Runnable() { // from class: com.helpshift.faq.HSHelpcenterEventsHandler.8
@Override // java.lang.Runnable
public void run() {
HelpcenterToUiCallback helpcenterToUiCallback = (HelpcenterToUiCallback) HSHelpcenterEventsHandler.this.uiCallback.get();
if (helpcenterToUiCallback != null) {
helpcenterToUiCallback.sendEventToSystemApp(intent);
}
}
});
}
public void onHelpcenterError() {
deleteAllCachedFilesOfHelpcenter();
this.threadingService.runOnUIThread(new Runnable() { // from class: com.helpshift.faq.HSHelpcenterEventsHandler.9
@Override // java.lang.Runnable
public void run() {
HelpcenterToUiCallback helpcenterToUiCallback = (HelpcenterToUiCallback) HSHelpcenterEventsHandler.this.uiCallback.get();
if (helpcenterToUiCallback != null) {
helpcenterToUiCallback.onHelpcenterError();
}
}
});
}
public final void deleteAllCachedFilesOfHelpcenter() {
this.threadingService.runSerial(new Runnable() { // from class: com.helpshift.faq.HSHelpcenterEventsHandler.10
@Override // java.lang.Runnable
public void run() {
HSHelpcenterEventsHandler.this.resourceCacheManager.deleteAllCachedFiles();
}
});
}
public void getWebchatData() {
this.threadingService.runSerial(new Runnable() { // from class: com.helpshift.faq.HSHelpcenterEventsHandler.11
@Override // java.lang.Runnable
public void run() {
HelpcenterToUiCallback helpcenterToUiCallback = (HelpcenterToUiCallback) HSHelpcenterEventsHandler.this.uiCallback.get();
if (helpcenterToUiCallback != null) {
helpcenterToUiCallback.getWebchatData();
}
}
});
}
public void hcActionSync(final String str) {
this.threadingService.runSerial(new Runnable() { // from class: com.helpshift.faq.HSHelpcenterEventsHandler.12
@Override // java.lang.Runnable
public void run() {
try {
JSONArray jSONArray = new JSONArray(str);
for (int i = 0; i < jSONArray.length(); i++) {
String string = jSONArray.getJSONObject(i).getString(SDKConstants.PARAM_GAME_REQUESTS_ACTION_TYPE);
HSLogger.d("HSHelpcenterEventsHandler", "Received action type " + string);
if ("clearUserTrail".equalsIgnoreCase(string)) {
HSHelpcenterEventsHandler.this.configManager.clearUserTrail();
}
}
} catch (JSONException e) {
HSLogger.e("HSHelpcenterEventsHandler", "Error in reading action type content ", e);
}
}
});
}
}

View File

@@ -0,0 +1,297 @@
package com.helpshift.faq;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebView;
import android.widget.ImageView;
import android.widget.LinearLayout;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import com.helpshift.R$id;
import com.helpshift.R$layout;
import com.helpshift.activities.FragmentTransactionListener;
import com.helpshift.activities.HSMainActivity;
import com.helpshift.cache.HelpshiftResourceCacheManager;
import com.helpshift.core.HSContext;
import com.helpshift.core.HSJSGenerator;
import com.helpshift.log.HSLogger;
import com.helpshift.notification.NotificationReceivedCallback;
import com.helpshift.user.UserManager;
import com.helpshift.util.Utils;
import com.helpshift.util.ValuePair;
import com.helpshift.util.ViewUtil;
import com.helpshift.views.HSWebView;
import com.ironsource.nb;
/* loaded from: classes3.dex */
public class HSHelpcenterFragment extends Fragment implements HelpcenterToUiCallback, NotificationReceivedCallback, View.OnClickListener {
public static final String TAG = "HelpCenter";
private HSHelpcenterEventsHandler eventsHandler;
private HSWebView helpCenterWebview;
private LinearLayout helpcenterLayout;
private View loadingView;
private View retryView;
private FragmentTransactionListener transactionListener;
public void setFragmentTransactionListener(FragmentTransactionListener fragmentTransactionListener) {
this.transactionListener = fragmentTransactionListener;
}
public static HSHelpcenterFragment newInstance(Bundle bundle) {
HSHelpcenterFragment hSHelpcenterFragment = new HSHelpcenterFragment();
hSHelpcenterFragment.setArguments(bundle);
return hSHelpcenterFragment;
}
@Override // androidx.fragment.app.Fragment
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
}
@Override // androidx.fragment.app.Fragment
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
HSLogger.d(TAG, "onCreateView - " + hashCode());
return layoutInflater.inflate(R$layout.hs__helpcenter_layout, viewGroup, false);
}
@Override // androidx.fragment.app.Fragment
public void onViewCreated(@NonNull View view, @Nullable Bundle bundle) {
super.onViewCreated(view, bundle);
HSLogger.d(TAG, "onViewCreated - " + hashCode());
Bundle arguments = getArguments();
initViews(view);
startHelpcenter(arguments);
}
private void initViews(View view) {
this.helpCenterWebview = (HSWebView) view.findViewById(R$id.hs__helpcenter_view);
this.loadingView = view.findViewById(R$id.hs__loading_view);
((ImageView) view.findViewById(R$id.hs__chat_image)).setVisibility(8);
this.retryView = view.findViewById(R$id.hs__retry_view);
this.helpcenterLayout = (LinearLayout) view.findViewById(R$id.hs__helpcenter_layout);
view.findViewById(R$id.hs__retry_view_close_btn).setOnClickListener(this);
view.findViewById(R$id.hs__loading_view_close_btn).setOnClickListener(this);
view.findViewById(R$id.hs__retry_button).setOnClickListener(this);
}
private void startHelpcenter(Bundle bundle) {
if (bundle == null) {
HSLogger.e(TAG, "Bundle received in Helpcenter fragment is null.");
onHelpcenterError();
return;
}
String sourceCode = getSourceCode(bundle);
if (Utils.isEmpty(sourceCode)) {
HSLogger.e(TAG, "Error in reading the source code from assets folder.");
onHelpcenterError();
} else {
showLoading();
initWebviewWithHelpcenter(sourceCode);
}
}
private String getSourceCode(Bundle bundle) {
ValuePair helpcenterModes = getHelpcenterModes(bundle);
return HSContext.getInstance().getJsGenerator().getHelpcenterEmbeddedCodeString(getContext(), (String) helpcenterModes.first, (String) helpcenterModes.second, isWebchatInStackAlready());
}
private ValuePair getHelpcenterModes(Bundle bundle) {
String string;
String string2 = bundle.getString("HELPCENTER_MODE");
string2.hashCode();
String str = "";
if (string2.equals("FAQ_SECTION")) {
string = bundle.getString("FAQ_SECTION_ID");
} else if (string2.equals("SINGLE_FAQ")) {
str = bundle.getString("SINGLE_FAQ_PUBLISH_ID");
string = "";
} else {
string = "";
}
return new ValuePair(str, string);
}
private void initWebviewWithHelpcenter(String str) {
HSLogger.d(TAG, "Webview is launched");
HSContext hSContext = HSContext.getInstance();
HelpshiftResourceCacheManager helpcenterResourceCacheManager = hSContext.getHelpcenterResourceCacheManager();
HSHelpcenterEventsHandler hSHelpcenterEventsHandler = new HSHelpcenterEventsHandler(hSContext.getConfigManager(), hSContext.getHsThreadingService(), helpcenterResourceCacheManager);
this.eventsHandler = hSHelpcenterEventsHandler;
hSHelpcenterEventsHandler.setHelpcenterUiCallback(this);
this.helpCenterWebview.setWebViewClient(new HSHelpcenterWebViewClient(helpcenterResourceCacheManager));
this.helpCenterWebview.setWebChromeClient(new HSHelpcenterWebChromeClient(this.eventsHandler));
this.helpCenterWebview.addJavascriptInterface(new HelpcenterToNativeBridge(this.eventsHandler), "HCInterface");
this.helpCenterWebview.loadDataWithBaseURL("https://localhost", str, "text/html", nb.N, null);
}
public boolean canHelpcenterWebviewGoBack() {
return this.helpCenterWebview.canGoBack();
}
public void helpcenterWebviewGoBack() {
callHelpcenterApi(HSJSGenerator.backBtnClickJs);
this.helpCenterWebview.goBack();
}
@Override // androidx.fragment.app.Fragment
public void onStart() {
super.onStart();
HSLogger.d(TAG, "onStart - " + hashCode());
HSContext.getInstance().getNotificationManager().setNotificationReceivedCallback(this);
sendLifecycleEventToHelpCenter(false);
}
@Override // androidx.fragment.app.Fragment
public void onStop() {
super.onStop();
sendLifecycleEventToHelpCenter(true);
}
@Override // androidx.fragment.app.Fragment
public void onDestroy() {
super.onDestroy();
HSLogger.d(TAG, "onDestroy - " + hashCode());
HSContext.getInstance().getNotificationManager().setNotificationReceivedCallback(null);
HSHelpcenterEventsHandler hSHelpcenterEventsHandler = this.eventsHandler;
if (hSHelpcenterEventsHandler != null) {
hSHelpcenterEventsHandler.setHelpcenterUiCallback(null);
}
HSContext.getInstance().setIsWebchatOpenedFromHelpcenter(false);
this.helpcenterLayout.removeView(this.helpCenterWebview);
this.helpCenterWebview.destroyCustomWebview();
this.helpCenterWebview = null;
}
@Override // com.helpshift.faq.HelpcenterToUiCallback
public void closeHelpcenter() {
FragmentTransactionListener fragmentTransactionListener = this.transactionListener;
if (fragmentTransactionListener != null) {
fragmentTransactionListener.closeHelpcenter();
}
}
@Override // com.helpshift.faq.HelpcenterToUiCallback
public void openWebchat() {
if (this.transactionListener != null) {
HSContext.getInstance().setIsWebchatOpenedFromHelpcenter(true);
this.transactionListener.openWebchat();
}
}
@Override // com.helpshift.faq.HelpcenterToUiCallback
public void onHelpcenterLoaded() {
showHelpcenter();
}
@Override // com.helpshift.faq.HelpcenterToUiCallback
public void setNativeUiColors(String str) {
FragmentTransactionListener fragmentTransactionListener = this.transactionListener;
if (fragmentTransactionListener != null) {
fragmentTransactionListener.changeStatusBarColor(str);
}
}
@Override // com.helpshift.faq.HelpcenterToUiCallback
public void addWebviewToUi(WebView webView) {
this.helpcenterLayout.addView(webView);
}
@Override // com.helpshift.faq.HelpcenterToUiCallback
public void sendEventToSystemApp(Intent intent) {
try {
startActivity(intent);
} catch (Exception e) {
HSLogger.e(TAG, "Unable to resolve the activity for this intent", e);
}
}
@Override // com.helpshift.faq.HelpcenterToUiCallback
public void showNotificationBadgeOnHCLoad() {
onNotificationReceived();
}
@Override // com.helpshift.faq.HelpcenterToUiCallback
public void getWebchatData() {
setWebChatLocalStorageData();
}
@Override // android.view.View.OnClickListener
public void onClick(View view) {
int id = view.getId();
if (id == R$id.hs__loading_view_close_btn || id == R$id.hs__retry_view_close_btn) {
closeHelpcenter();
} else if (id == R$id.hs__retry_button) {
startHelpcenter(getArguments());
}
}
public void sendLifecycleEventToHelpCenter(boolean z) {
if (this.loadingView.getVisibility() != 0) {
callHelpcenterApi(HSJSGenerator.sendForegroundEvent.replace("%foreground", "" + z));
}
}
private void showLoading() {
ViewUtil.setVisibility(this.loadingView, true);
ViewUtil.setVisibility(this.retryView, false);
}
private void showHelpcenter() {
ViewUtil.setVisibility(this.loadingView, false);
ViewUtil.setVisibility(this.retryView, false);
}
private void showError() {
ViewUtil.setVisibility(this.retryView, true);
ViewUtil.setVisibility(this.loadingView, false);
}
@Override // com.helpshift.faq.HelpcenterToUiCallback
public void onHelpcenterError() {
showError();
}
@Override // com.helpshift.notification.NotificationReceivedCallback
public void onNotificationReceived() {
UserManager userManager = HSContext.getInstance().getUserManager();
int unreadNotificationCount = userManager.getUnreadNotificationCount();
int pushUnreadNotificationCount = userManager.getPushUnreadNotificationCount();
if (unreadNotificationCount > 0 || pushUnreadNotificationCount > 0) {
callHelpcenterApi(HSJSGenerator.showNotificationBadgeJS.replace("%count", String.valueOf(Math.max(unreadNotificationCount, pushUnreadNotificationCount))));
}
}
public void setWebChatLocalStorageData() {
callHelpcenterApi(HSJSGenerator.sendWebchatData.replace("%data", HSContext.getInstance().getConfigManager().getLocalStorageData()));
}
public void reloadIframe(Bundle bundle) {
ValuePair helpcenterModes = getHelpcenterModes(bundle);
callHelpcenterApi(HSJSGenerator.reloadIframeJS.replace("%helpshiftConfig", HSContext.getInstance().getConfigManager().getHelpcenterConfigJs((String) helpcenterModes.first, (String) helpcenterModes.second, isWebchatInStackAlready())));
}
public void callHelpcenterApi(final String str) {
HSContext.getInstance().getHsThreadingService().runOnUIThread(new Runnable() { // from class: com.helpshift.faq.HSHelpcenterFragment.1
@Override // java.lang.Runnable
public void run() {
if (HSHelpcenterFragment.this.helpCenterWebview == null) {
return;
}
ViewUtil.callJavascriptCode(HSHelpcenterFragment.this.helpCenterWebview, str, null);
}
});
}
private boolean isWebchatInStackAlready() {
FragmentActivity activity = getActivity();
if (activity instanceof HSMainActivity) {
return ((HSMainActivity) activity).isWebchatFragmentInStack();
}
return false;
}
}

View File

@@ -0,0 +1,52 @@
package com.helpshift.faq;
import android.content.Intent;
import android.net.Uri;
import android.os.Message;
import android.webkit.ConsoleMessage;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import com.helpshift.log.WebviewConsoleLogger;
import com.helpshift.util.Utils;
/* loaded from: classes3.dex */
public class HSHelpcenterWebChromeClient extends WebChromeClient {
public HSHelpcenterEventsHandler eventsHandler;
public HSHelpcenterWebChromeClient(HSHelpcenterEventsHandler hSHelpcenterEventsHandler) {
this.eventsHandler = hSHelpcenterEventsHandler;
}
@Override // android.webkit.WebChromeClient
public boolean onConsoleMessage(ConsoleMessage consoleMessage) {
WebviewConsoleLogger.log(consoleMessage.messageLevel(), "HCWVClient", consoleMessage.message() + " -- From line " + consoleMessage.lineNumber() + " of " + consoleMessage.sourceId());
return super.onConsoleMessage(consoleMessage);
}
@Override // android.webkit.WebChromeClient
public boolean onCreateWindow(WebView webView, boolean z, boolean z2, Message message) {
if (!z2) {
return false;
}
WebView.HitTestResult hitTestResult = webView.getHitTestResult();
String createUriForSystemAppLaunch = createUriForSystemAppLaunch(hitTestResult.getType(), hitTestResult.getExtra());
if (Utils.isNotEmpty(createUriForSystemAppLaunch)) {
Intent intent = new Intent("android.intent.action.VIEW");
intent.setData(Uri.parse(createUriForSystemAppLaunch));
this.eventsHandler.sendEventToSystemApp(intent);
return true;
}
WebView webView2 = new WebView(webView.getContext());
this.eventsHandler.addWebviewToUi(webView2);
((WebView.WebViewTransport) message.obj).setWebView(webView2);
message.sendToTarget();
return true;
}
public final String createUriForSystemAppLaunch(int i, String str) {
if (i != 2) {
return i != 7 ? "" : str;
}
return "tel:" + str;
}
}

View File

@@ -0,0 +1,58 @@
package com.helpshift.faq;
import android.webkit.WebResourceRequest;
import android.webkit.WebResourceResponse;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import com.helpshift.cache.HelpshiftResourceCacheManager;
import com.helpshift.log.HSLogger;
import com.helpshift.util.ResourceCacheUtil;
/* loaded from: classes3.dex */
public class HSHelpcenterWebViewClient extends WebViewClient {
public HelpshiftResourceCacheManager helpcenterResourceCacheManager;
public boolean resourceCacheManagerInitialized;
public HSHelpcenterWebViewClient(HelpshiftResourceCacheManager helpshiftResourceCacheManager) {
this.helpcenterResourceCacheManager = helpshiftResourceCacheManager;
}
@Override // android.webkit.WebViewClient
public boolean shouldOverrideUrlLoading(WebView webView, String str) {
if (str.startsWith("https://") || str.startsWith("http://")) {
webView.loadUrl(str);
return false;
}
return super.shouldOverrideUrlLoading(webView, str);
}
@Override // android.webkit.WebViewClient
public WebResourceResponse shouldInterceptRequest(WebView webView, WebResourceRequest webResourceRequest) {
if (!"GET".equalsIgnoreCase(webResourceRequest.getMethod())) {
return super.shouldInterceptRequest(webView, webResourceRequest);
}
initResourceCacheManager();
if (!this.helpcenterResourceCacheManager.shouldCacheUrl(webResourceRequest.getUrl().getPath())) {
return super.shouldInterceptRequest(webView, webResourceRequest);
}
WebResourceResponse webResourceResponse = ResourceCacheUtil.getWebResourceResponse(this.helpcenterResourceCacheManager, webResourceRequest);
if (webResourceResponse != null) {
return webResourceResponse;
}
WebResourceResponse shouldInterceptRequest = super.shouldInterceptRequest(webView, webResourceRequest);
if (shouldInterceptRequest != null) {
HSLogger.d("HelpcntrWebClient", "Webview response received for request-" + webResourceRequest.toString() + " status:" + shouldInterceptRequest.getStatusCode() + " MimeType:" + shouldInterceptRequest.getMimeType());
} else {
HSLogger.e("HelpcntrWebClient", "Webview response error for request-" + webResourceRequest.getUrl());
}
return shouldInterceptRequest;
}
public final void initResourceCacheManager() {
if (this.resourceCacheManagerInitialized) {
return;
}
this.helpcenterResourceCacheManager.ensureCacheURLsListAvailable();
this.resourceCacheManagerInitialized = true;
}
}

View File

@@ -0,0 +1,61 @@
package com.helpshift.faq;
import android.webkit.JavascriptInterface;
import com.helpshift.log.HSLogger;
/* loaded from: classes3.dex */
public class HelpcenterToNativeBridge {
public HSHelpcenterEventsHandler eventsHandler;
public HelpcenterToNativeBridge(HSHelpcenterEventsHandler hSHelpcenterEventsHandler) {
this.eventsHandler = hSHelpcenterEventsHandler;
}
@JavascriptInterface
public void closeHelpcenter() {
HSLogger.d("HelpcnterToNatve", "Received event to close Helpcenter");
this.eventsHandler.closeHelpcenter();
}
@JavascriptInterface
public void openWebchat() {
HSLogger.d("HelpcnterToNatve", "Received event to open Webchat");
this.eventsHandler.openWebchat();
}
@JavascriptInterface
public void helpcenterLoaded(String str) {
HSLogger.d("HelpcnterToNatve", "Received event helpcenter loaded");
this.eventsHandler.onHelpcenterLoaded(str);
}
@JavascriptInterface
public void onHelpcenterError() {
HSLogger.d("HelpcnterToNatve", "Received event helpcenter error");
this.eventsHandler.onHelpcenterError();
}
@JavascriptInterface
public void setAdditionalInfo(String str) {
HSLogger.d("HelpcnterToNatve", "Received event to set additional Helpcenter data from HC WebView.");
this.eventsHandler.onSetAdditionalHelpcenterData(str);
}
@JavascriptInterface
public void removeAdditionalInfo(String str) {
HSLogger.d("HelpcnterToNatve", "Received event to remove additional Helpcenter data from HC WebView.");
this.eventsHandler.onRemoveAdditionalHelpcenterData(str);
}
@JavascriptInterface
public void getWebchatData() {
HSLogger.d("HelpcnterToNatve", "Received event to getWCLocalStorageData from HC WebView.");
this.eventsHandler.getWebchatData();
}
@JavascriptInterface
public void hcActionSync(String str) {
HSLogger.d("HelpcnterToNatve", "Received event to ActionSync from HC WebView.");
this.eventsHandler.hcActionSync(str);
}
}

View File

@@ -0,0 +1,25 @@
package com.helpshift.faq;
import android.content.Intent;
import android.webkit.WebView;
/* loaded from: classes3.dex */
public interface HelpcenterToUiCallback {
void addWebviewToUi(WebView webView);
void closeHelpcenter();
void getWebchatData();
void onHelpcenterError();
void onHelpcenterLoaded();
void openWebchat();
void sendEventToSystemApp(Intent intent);
void setNativeUiColors(String str);
void showNotificationBadgeOnHCLoad();
}

View File

@@ -0,0 +1,26 @@
package com.helpshift.lifecycle;
import com.helpshift.log.HSLogger;
/* loaded from: classes3.dex */
public abstract class BaseLifeCycleTracker {
public HSAppLifeCycleEventsHandler hsAppLifeCycleEventsHandler;
public abstract void onManualAppBackgroundAPI();
public abstract void onManualAppForegroundAPI();
public BaseLifeCycleTracker(HSAppLifeCycleEventsHandler hSAppLifeCycleEventsHandler) {
this.hsAppLifeCycleEventsHandler = hSAppLifeCycleEventsHandler;
}
public void notifyAppForeground() {
HSLogger.d("LifecycleTkr", "App is in foreground");
this.hsAppLifeCycleEventsHandler.onAppForeground();
}
public void notifyAppBackground() {
HSLogger.d("LifecycleTkr", "App is in background");
this.hsAppLifeCycleEventsHandler.onAppBackground();
}
}

View File

@@ -0,0 +1,81 @@
package com.helpshift.lifecycle;
import android.app.Activity;
import android.app.Application;
import android.os.Bundle;
import com.helpshift.HSPluginEventBridge;
import com.helpshift.log.HSLogger;
/* loaded from: classes3.dex */
public class DefaultAppLifeCycleTracker extends BaseLifeCycleTracker implements Application.ActivityLifecycleCallbacks {
public static String TAG = "DALCTracker";
public boolean isAppForeground;
public boolean isConfigurationChanged;
public int started;
public int stopped;
@Override // android.app.Application.ActivityLifecycleCallbacks
public void onActivityCreated(Activity activity, Bundle bundle) {
}
@Override // android.app.Application.ActivityLifecycleCallbacks
public void onActivityDestroyed(Activity activity) {
}
@Override // android.app.Application.ActivityLifecycleCallbacks
public void onActivityPaused(Activity activity) {
}
@Override // android.app.Application.ActivityLifecycleCallbacks
public void onActivityResumed(Activity activity) {
}
@Override // android.app.Application.ActivityLifecycleCallbacks
public void onActivitySaveInstanceState(Activity activity, Bundle bundle) {
}
public DefaultAppLifeCycleTracker(Application application, HSAppLifeCycleEventsHandler hSAppLifeCycleEventsHandler) {
super(hSAppLifeCycleEventsHandler);
this.isConfigurationChanged = false;
application.unregisterActivityLifecycleCallbacks(this);
application.registerActivityLifecycleCallbacks(this);
if (HSPluginEventBridge.shouldCallFirstForegroundEvent()) {
this.started++;
this.isAppForeground = true;
}
}
@Override // com.helpshift.lifecycle.BaseLifeCycleTracker
public void onManualAppForegroundAPI() {
HSLogger.e(TAG, "Install API is called with manualLifeCycleTracking config as false, Ignore this event");
}
@Override // com.helpshift.lifecycle.BaseLifeCycleTracker
public void onManualAppBackgroundAPI() {
HSLogger.e(TAG, "Install API is called with manualLifeCycleTracking config as false, Ignore this event");
}
@Override // android.app.Application.ActivityLifecycleCallbacks
public void onActivityStarted(Activity activity) {
this.started++;
if (!this.isConfigurationChanged) {
if (!this.isAppForeground) {
notifyAppForeground();
}
this.isAppForeground = true;
}
this.isConfigurationChanged = false;
}
@Override // android.app.Application.ActivityLifecycleCallbacks
public void onActivityStopped(Activity activity) {
this.stopped++;
boolean z = activity != null && activity.isChangingConfigurations();
this.isConfigurationChanged = z;
if (z || this.started != this.stopped) {
return;
}
this.isAppForeground = false;
notifyAppBackground();
}
}

View File

@@ -0,0 +1,51 @@
package com.helpshift.lifecycle;
import android.app.Application;
/* loaded from: classes3.dex */
public class HSAppLifeCycleController {
public static HSAppLifeCycleController instance;
public BaseLifeCycleTracker lifeCycleTracker;
public static HSAppLifeCycleController getInstance() {
if (instance == null) {
instance = new HSAppLifeCycleController();
}
return instance;
}
public void init(Application application, boolean z, HSAppLifeCycleEventsHandler hSAppLifeCycleEventsHandler) {
if (this.lifeCycleTracker != null) {
return;
}
if (z) {
this.lifeCycleTracker = new ManualAppLifeCycleTracker(hSAppLifeCycleEventsHandler);
} else {
this.lifeCycleTracker = new DefaultAppLifeCycleTracker(application, hSAppLifeCycleEventsHandler);
}
}
public void onManualAppForegroundAPI() {
BaseLifeCycleTracker baseLifeCycleTracker = this.lifeCycleTracker;
if (baseLifeCycleTracker == null) {
return;
}
baseLifeCycleTracker.onManualAppForegroundAPI();
}
public void onManualAppBackgroundAPI() {
BaseLifeCycleTracker baseLifeCycleTracker = this.lifeCycleTracker;
if (baseLifeCycleTracker == null) {
return;
}
baseLifeCycleTracker.onManualAppBackgroundAPI();
}
public void onAppForeground() {
BaseLifeCycleTracker baseLifeCycleTracker = this.lifeCycleTracker;
if (baseLifeCycleTracker == null) {
return;
}
baseLifeCycleTracker.notifyAppForeground();
}
}

View File

@@ -0,0 +1,31 @@
package com.helpshift.lifecycle;
import com.helpshift.core.HSContext;
/* loaded from: classes3.dex */
public class HSAppLifeCycleEventsHandler {
public void onAppForeground() {
HSContext.getInstance().getHsThreadingService().runSerial(new Runnable() { // from class: com.helpshift.lifecycle.HSAppLifeCycleEventsHandler.1
@Override // java.lang.Runnable
public void run() {
HSContext hSContext = HSContext.getInstance();
hSContext.getAnalyticsEventDM().sendAppLaunchEvent();
hSContext.getAnalyticsEventDM().sendFailedEvents();
hSContext.sendMigrationFailureLogs();
if (hSContext.getUserManager().retryPushTokenSync()) {
return;
}
hSContext.getConversationPoller().startPoller();
}
});
}
public void onAppBackground() {
HSContext.getInstance().getHsThreadingService().runSerial(new Runnable() { // from class: com.helpshift.lifecycle.HSAppLifeCycleEventsHandler.2
@Override // java.lang.Runnable
public void run() {
HSContext.getInstance().getConversationPoller().stopPoller();
}
});
}
}

View File

@@ -0,0 +1,39 @@
package com.helpshift.lifecycle;
import com.helpshift.core.HSContext;
import com.helpshift.log.HSLogger;
/* loaded from: classes3.dex */
public class ManualAppLifeCycleTracker extends BaseLifeCycleTracker {
public static String TAG = "MALCTracker";
public boolean isAppInForeground;
public ManualAppLifeCycleTracker(HSAppLifeCycleEventsHandler hSAppLifeCycleEventsHandler) {
super(hSAppLifeCycleEventsHandler);
this.isAppInForeground = false;
}
@Override // com.helpshift.lifecycle.BaseLifeCycleTracker
public void onManualAppForegroundAPI() {
if (this.isAppInForeground) {
HSLogger.d(TAG, "Application is already in foreground, so ignore this event");
} else if (HSContext.installCallSuccessful.get()) {
this.isAppInForeground = true;
notifyAppForeground();
} else {
HSLogger.e(TAG, "onManualAppForegroundAPI is called without calling install API");
}
}
@Override // com.helpshift.lifecycle.BaseLifeCycleTracker
public void onManualAppBackgroundAPI() {
if (!this.isAppInForeground) {
HSLogger.d(TAG, "Application is already in background, so ignore this event");
} else if (HSContext.installCallSuccessful.get()) {
this.isAppInForeground = false;
notifyAppBackground();
} else {
HSLogger.e(TAG, "onManualAppBackgroundAPI is called without calling install API");
}
}
}

View File

@@ -0,0 +1,46 @@
package com.helpshift.log;
/* loaded from: classes3.dex */
public abstract class HSLogger {
public static ILogger logger;
public static void initLogger(ILogger iLogger) {
logger = iLogger;
}
public static void d(String str, String str2) {
d(str, str2, null);
}
public static void w(String str, String str2) {
w(str, str2, null);
}
public static void e(String str, String str2) {
e(str, str2, null);
}
public static void d(String str, String str2, Throwable th) {
ILogger iLogger = logger;
if (iLogger == null) {
return;
}
iLogger.d(str, str2, th);
}
public static void w(String str, String str2, Throwable th) {
ILogger iLogger = logger;
if (iLogger == null) {
return;
}
iLogger.w(str, str2, th);
}
public static void e(String str, String str2, Throwable th) {
ILogger iLogger = logger;
if (iLogger == null) {
return;
}
iLogger.e(str, str2, th);
}
}

View File

@@ -0,0 +1,17 @@
package com.helpshift.log;
/* loaded from: classes3.dex */
public interface ILogger {
public enum LEVEL {
DEBUG,
WARN,
ERROR
}
void d(String str, String str2, Throwable th);
void e(String str, String str2, Throwable th);
void w(String str, String str2, Throwable th);
}

View File

@@ -0,0 +1,73 @@
package com.helpshift.log;
import android.util.Log;
import com.helpshift.log.ILogger;
/* loaded from: classes3.dex */
public class InternalHelpshiftLogger implements ILogger {
public final boolean isAppInDebugMode;
public LogCollector logCollector;
public final boolean shouldEnableLogging;
public void setLogCollector(LogCollector logCollector) {
this.logCollector = logCollector;
}
public InternalHelpshiftLogger(boolean z, boolean z2) {
this.isAppInDebugMode = z;
this.shouldEnableLogging = z2;
}
@Override // com.helpshift.log.ILogger
public void d(String str, String str2, Throwable th) {
logMessage(ILogger.LEVEL.DEBUG, str, str2, th);
}
@Override // com.helpshift.log.ILogger
public void w(String str, String str2, Throwable th) {
logMessage(ILogger.LEVEL.WARN, str, str2, th);
}
@Override // com.helpshift.log.ILogger
public void e(String str, String str2, Throwable th) {
logMessage(ILogger.LEVEL.ERROR, str, str2, th);
}
public final void logMessage(ILogger.LEVEL level, String str, String str2, Throwable th) {
if (this.shouldEnableLogging) {
String str3 = str + " : " + str2;
int i = AnonymousClass1.$SwitchMap$com$helpshift$log$ILogger$LEVEL[level.ordinal()];
if (i == 1) {
Log.e("Helpshift", str3, th);
} else if (i == 2) {
Log.w("Helpshift", str3, th);
}
LogCollector logCollector = this.logCollector;
if (logCollector != null) {
logCollector.collectLog("Helpshift", str3, th, level);
}
}
}
/* renamed from: com.helpshift.log.InternalHelpshiftLogger$1, reason: invalid class name */
public static /* synthetic */ class AnonymousClass1 {
public static final /* synthetic */ int[] $SwitchMap$com$helpshift$log$ILogger$LEVEL;
static {
int[] iArr = new int[ILogger.LEVEL.values().length];
$SwitchMap$com$helpshift$log$ILogger$LEVEL = iArr;
try {
iArr[ILogger.LEVEL.ERROR.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
$SwitchMap$com$helpshift$log$ILogger$LEVEL[ILogger.LEVEL.WARN.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
$SwitchMap$com$helpshift$log$ILogger$LEVEL[ILogger.LEVEL.DEBUG.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
}
}
}

View File

@@ -0,0 +1,96 @@
package com.helpshift.log;
import android.content.Context;
import android.util.Log;
import com.helpshift.log.ILogger;
import com.helpshift.util.Utils;
import java.io.File;
import java.io.FileOutputStream;
import java.net.UnknownHostException;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
import java.util.Locale;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
/* loaded from: classes3.dex */
public class LogCollector {
public static final String logDirPath = "helpshift" + File.separator + "debugLogs";
public FileOutputStream fos;
public final File logFile;
public final long mainThreadId;
public final ExecutorService executorService = Executors.newSingleThreadExecutor();
public final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS", Locale.US);
public LogCollector(Context context, String str, long j) {
File file = new File(context.getFilesDir(), logDirPath);
file.mkdirs();
deleteOldFiles(file);
this.logFile = new File(file, str + ".txt");
this.mainThreadId = j;
}
public void collectLog(final String str, final String str2, final Throwable th, final ILogger.LEVEL level) {
final long currentTimeMillis = System.currentTimeMillis();
final long id = Thread.currentThread().getId();
if (this.fos == null) {
try {
this.fos = new FileOutputStream(this.logFile, true);
} catch (Exception e) {
Log.e("Heplshift_LogCollector", "Error opening debug log file: " + this.logFile.getAbsolutePath(), e);
return;
}
}
try {
this.executorService.submit(new Runnable() { // from class: com.helpshift.log.LogCollector.1
@Override // java.lang.Runnable
public void run() {
String stackTraceString;
try {
String format = LogCollector.this.dateFormat.format(new Date(currentTimeMillis));
StringBuilder sb = new StringBuilder();
sb.append(format);
sb.append(" ");
sb.append(LogCollector.this.mainThreadId);
sb.append("-");
sb.append(id);
sb.append(" ");
sb.append(level.name());
sb.append("/");
sb.append(str);
sb.append(" ");
sb.append(str2);
Throwable th2 = th;
if (th2 instanceof UnknownHostException) {
stackTraceString = th2.getMessage();
} else {
stackTraceString = Log.getStackTraceString(th2);
}
if (!Utils.isEmpty(stackTraceString)) {
sb.append("\n");
sb.append(stackTraceString);
}
sb.append("\n");
LogCollector.this.fos.write(sb.toString().getBytes());
} catch (Exception e2) {
Log.e("Heplshift_LogCollector", "Error writing to debug log file", e2);
}
}
});
} catch (Exception e2) {
Log.e("Heplshift_LogCollector", "Error submitting to executor", e2);
}
}
public final void deleteOldFiles(File file) {
File[] listFiles = file.listFiles();
if (listFiles == null || listFiles.length <= 5) {
return;
}
Arrays.sort(listFiles);
for (int i = 0; i < listFiles.length - 5; i++) {
listFiles[i].delete();
}
}
}

View File

@@ -0,0 +1,51 @@
package com.helpshift.log;
import android.webkit.ConsoleMessage;
/* loaded from: classes3.dex */
public abstract class WebviewConsoleLogger {
public static void log(ConsoleMessage.MessageLevel messageLevel, String str, String str2) {
if (messageLevel == null) {
HSLogger.d(str, str2);
return;
}
int i = AnonymousClass1.$SwitchMap$android$webkit$ConsoleMessage$MessageLevel[messageLevel.ordinal()];
if (i == 1) {
HSLogger.e(str, str2);
} else if (i == 2) {
HSLogger.w(str, str2);
} else {
HSLogger.d(str, str2);
}
}
/* renamed from: com.helpshift.log.WebviewConsoleLogger$1, reason: invalid class name */
public static /* synthetic */ class AnonymousClass1 {
public static final /* synthetic */ int[] $SwitchMap$android$webkit$ConsoleMessage$MessageLevel;
static {
int[] iArr = new int[ConsoleMessage.MessageLevel.values().length];
$SwitchMap$android$webkit$ConsoleMessage$MessageLevel = iArr;
try {
iArr[ConsoleMessage.MessageLevel.ERROR.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
$SwitchMap$android$webkit$ConsoleMessage$MessageLevel[ConsoleMessage.MessageLevel.WARNING.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
$SwitchMap$android$webkit$ConsoleMessage$MessageLevel[ConsoleMessage.MessageLevel.DEBUG.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
$SwitchMap$android$webkit$ConsoleMessage$MessageLevel[ConsoleMessage.MessageLevel.LOG.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
$SwitchMap$android$webkit$ConsoleMessage$MessageLevel[ConsoleMessage.MessageLevel.TIP.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
}
}
}

View File

@@ -0,0 +1,113 @@
package com.helpshift.migrator;
import android.content.Context;
import android.content.SharedPreferences;
import com.helpshift.concurrency.HSThreadingService;
import com.helpshift.log.HSLogger;
import com.helpshift.network.HSRequestData;
import com.helpshift.network.HTTPTransport;
import com.helpshift.network.NetworkConstants;
import com.helpshift.network.POSTNetwork;
import com.helpshift.platform.Device;
import com.helpshift.storage.HSPersistentStorage;
import com.helpshift.util.Utils;
import com.ironsource.ad;
import csdk.gluads.Consts;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.Locale;
import java.util.TimeZone;
import java.util.UUID;
import java.util.concurrent.atomic.AtomicBoolean;
import org.json.JSONArray;
import org.json.JSONObject;
/* loaded from: classes3.dex */
public class MigrationFailureLogProvider {
public static final AtomicBoolean inProgress = new AtomicBoolean(false);
public final Device device;
public final HSThreadingService hsThreadingService;
public final HTTPTransport httpTransport;
public final HSPersistentStorage persistentStorage;
public final SharedPreferences preferences;
public MigrationFailureLogProvider(Context context, HTTPTransport hTTPTransport, HSPersistentStorage hSPersistentStorage, Device device, HSThreadingService hSThreadingService) {
this.preferences = context.getSharedPreferences("__hs_migration_prefs", 0);
this.httpTransport = hTTPTransport;
this.persistentStorage = hSPersistentStorage;
this.device = device;
this.hsThreadingService = hSThreadingService;
}
public void sendMigrationFailureLogs() {
int i = this.preferences.getInt("migration_state", 0);
if (i == 1 || i == 0 || this.preferences.getBoolean("failure_logs_synced", false)) {
return;
}
this.hsThreadingService.getNetworkService().submit(new Runnable() { // from class: com.helpshift.migrator.MigrationFailureLogProvider.1
@Override // java.lang.Runnable
public void run() {
try {
try {
} catch (Exception e) {
HSLogger.e("MgrFailLog", "Migration failure logs synced failed", e);
}
if (!MigrationFailureLogProvider.inProgress.get()) {
MigrationFailureLogProvider.inProgress.set(true);
String string = MigrationFailureLogProvider.this.preferences.getString("failure_logs", "");
if (!Utils.isEmpty(string)) {
JSONObject jSONObject = new JSONObject(string);
JSONArray jSONArray = new JSONArray();
jSONArray.put(jSONObject);
String appName = MigrationFailureLogProvider.this.device.getAppName();
String appVersion = MigrationFailureLogProvider.this.device.getAppVersion();
ArrayList arrayList = new ArrayList();
arrayList.add(MigrationFailureLogProvider.this.jsonify("domain", MigrationFailureLogProvider.this.persistentStorage.getDomain() + Consts.STRING_PERIOD + MigrationFailureLogProvider.this.persistentStorage.getHost()));
MigrationFailureLogProvider migrationFailureLogProvider = MigrationFailureLogProvider.this;
arrayList.add(migrationFailureLogProvider.jsonify("dm", migrationFailureLogProvider.device.getDeviceModel()));
MigrationFailureLogProvider migrationFailureLogProvider2 = MigrationFailureLogProvider.this;
arrayList.add(migrationFailureLogProvider2.jsonify("did", migrationFailureLogProvider2.device.getDeviceId()));
MigrationFailureLogProvider migrationFailureLogProvider3 = MigrationFailureLogProvider.this;
arrayList.add(migrationFailureLogProvider3.jsonify(ad.y, migrationFailureLogProvider3.device.getOSVersion()));
if (!Utils.isEmpty(appName)) {
arrayList.add(MigrationFailureLogProvider.this.jsonify("an", appName));
}
if (!Utils.isEmpty(appVersion)) {
arrayList.add(MigrationFailureLogProvider.this.jsonify("av", appVersion));
}
JSONArray listToJSONArray = Utils.listToJSONArray(arrayList);
HashMap hashMap = new HashMap();
hashMap.put("id", UUID.randomUUID().toString());
hashMap.put(Consts.KEY_TAPJOY_USER_ID_VERSION, "1");
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss", Locale.ENGLISH);
simpleDateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
hashMap.put("ctime", simpleDateFormat.format(new Date()));
hashMap.put("src", "sdkx.android.10.2.2");
hashMap.put("logs", jSONArray.toString());
hashMap.put(ad.s, listToJSONArray.toString());
hashMap.put("platform-id", MigrationFailureLogProvider.this.persistentStorage.getPlatformId());
int status = new POSTNetwork(MigrationFailureLogProvider.this.httpTransport, MigrationFailureLogProvider.this.buildLogsRoute()).makeRequest(new HSRequestData(NetworkConstants.buildHeaderMap(MigrationFailureLogProvider.this.device, MigrationFailureLogProvider.this.persistentStorage.getPlatformId()), hashMap)).getStatus();
if (status >= 200 && status < 300) {
MigrationFailureLogProvider.this.preferences.edit().putBoolean("failure_logs_synced", true).apply();
MigrationFailureLogProvider.this.preferences.edit().putString("failure_logs", "").commit();
}
MigrationFailureLogProvider.inProgress.set(false);
}
}
} finally {
MigrationFailureLogProvider.inProgress.set(false);
}
}
});
}
public final String buildLogsRoute() {
return "https://api." + this.persistentStorage.getHost() + "/events/v1/" + this.persistentStorage.getDomain() + "/sdkx/crash-log";
}
public final JSONObject jsonify(String str, String str2) {
return new JSONObject().put(str, str2);
}
}

View File

@@ -0,0 +1,47 @@
package com.helpshift.migrator;
import android.content.SharedPreferences;
import android.util.Log;
import com.helpshift.util.Utils;
import org.json.JSONArray;
import org.json.JSONObject;
/* loaded from: classes3.dex */
public class MigrationLogger {
public final SharedPreferences sharedPreferences;
public void d(String str, String str2) {
}
public MigrationLogger(SharedPreferences sharedPreferences) {
this.sharedPreferences = sharedPreferences;
}
public void e(String str, String str2) {
e(str, str2, null);
}
public void e(String str, String str2, Throwable th) {
Log.e(str, str2, th);
try {
String stackTraceToString = stackTraceToString(th);
String string = this.sharedPreferences.getString("error_logs", "");
JSONArray jSONArray = Utils.isEmpty(string) ? new JSONArray() : new JSONArray(string);
JSONObject jSONObject = new JSONObject();
jSONObject.put("timestamp", System.currentTimeMillis());
jSONObject.put("message", str2);
jSONObject.put("error", stackTraceToString);
jSONArray.put(jSONObject);
this.sharedPreferences.edit().putString("error_logs", jSONArray.toString()).commit();
} catch (Exception e) {
Log.e("Helpshift_mgrtLog", "Error setting error logs in prefs", e);
}
}
public final String stackTraceToString(Throwable th) {
if (th == null) {
return "";
}
return th.getMessage() + " \n " + Log.getStackTraceString(th);
}
}

View File

@@ -0,0 +1,535 @@
package com.helpshift.migrator;
import android.content.Context;
import android.content.SharedPreferences;
import android.database.Cursor;
import android.util.Log;
import com.ea.nimble.Global;
import com.facebook.internal.AnalyticsEvents;
import com.google.android.gms.measurement.api.AppMeasurementSdk;
import com.helpshift.migrator.database.HSLegacySupportKeyValueStore;
import com.helpshift.migrator.database.HSNativeSDKUserDBHelper;
import com.helpshift.storage.HSPersistentStorage;
import com.helpshift.util.Utils;
import com.ironsource.ad;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.ObjectInputStream;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.TimeZone;
import org.json.JSONArray;
import org.json.JSONObject;
/* loaded from: classes3.dex */
public class NativeToSdkxMigrator {
public final String DID_KEY;
public final String FAILED_KEY;
public final String LEGACY_ID_KEY;
public final String PUSH_TOKEN_KEY;
public final String SDK_LANG_KEY;
public final String SUCCESS_KEY;
public final String USER_DATA_KEY;
public int attempts;
public final Context context;
public final StringBuilder failureLogBuilder;
public final Map failureMap;
public final MigrationLogger migrationLogger;
public HSNativeSDKUserDBHelper nativeSDKUserDBHelper;
public final HSPersistentStorage persistentStorage;
public final SharedPreferences preferences;
public HSLegacySupportKeyValueStore supportKVStoreDBHelper;
public NativeToSdkxMigrator(Context context, HSPersistentStorage hSPersistentStorage) {
HashMap hashMap = new HashMap();
this.failureMap = hashMap;
this.SUCCESS_KEY = "Success";
this.FAILED_KEY = AnalyticsEvents.PARAMETER_DIALOG_OUTCOME_VALUE_FAILED;
this.DID_KEY = "DeviceId : ";
this.SDK_LANG_KEY = "SDK Language : ";
this.PUSH_TOKEN_KEY = "Push Token : ";
this.USER_DATA_KEY = "User Data : ";
this.LEGACY_ID_KEY = "Legacy Analytics Id : ";
this.attempts = 0;
this.context = context;
SharedPreferences sharedPreferences = context.getSharedPreferences("__hs_migration_prefs", 0);
this.preferences = sharedPreferences;
this.persistentStorage = hSPersistentStorage;
this.migrationLogger = new MigrationLogger(sharedPreferences);
this.failureLogBuilder = new StringBuilder("Migration Result: ");
hashMap.put("DeviceId : ", AnalyticsEvents.PARAMETER_DIALOG_OUTCOME_VALUE_FAILED);
hashMap.put("SDK Language : ", AnalyticsEvents.PARAMETER_DIALOG_OUTCOME_VALUE_FAILED);
hashMap.put("Push Token : ", AnalyticsEvents.PARAMETER_DIALOG_OUTCOME_VALUE_FAILED);
hashMap.put("Legacy Analytics Id : ", AnalyticsEvents.PARAMETER_DIALOG_OUTCOME_VALUE_FAILED);
hashMap.put("User Data : ", AnalyticsEvents.PARAMETER_DIALOG_OUTCOME_VALUE_FAILED);
}
public synchronized void migrate() {
String str;
String str2;
int i;
try {
try {
try {
} catch (Exception e) {
this.migrationLogger.e("Helpshift_Migrator", "Migration failed with exception", e);
try {
HSLegacySupportKeyValueStore hSLegacySupportKeyValueStore = this.supportKVStoreDBHelper;
if (hSLegacySupportKeyValueStore != null) {
hSLegacySupportKeyValueStore.close();
}
HSNativeSDKUserDBHelper hSNativeSDKUserDBHelper = this.nativeSDKUserDBHelper;
if (hSNativeSDKUserDBHelper != null) {
hSNativeSDKUserDBHelper.close();
}
} catch (Exception e2) {
e = e2;
str = "Helpshift_Migrator";
str2 = "Error closing DB instance";
Log.e(str, str2, e);
}
}
if (!shouldMigrate()) {
this.migrationLogger.d("Helpshift_Migrator", "Migration not required, skipping");
return;
}
this.supportKVStoreDBHelper = new HSLegacySupportKeyValueStore(this.context);
this.nativeSDKUserDBHelper = new HSNativeSDKUserDBHelper(this.context);
int i2 = 0;
boolean z = false;
boolean z2 = false;
boolean z3 = false;
while (true) {
i = 1;
if (i2 >= 3) {
break;
}
this.attempts++;
z = migrateKVStoreData();
z2 = migrateUserData();
logMessageOnStep("User data migration", z2);
updateFailuresMap("User Data : ", z2);
z3 = migrateLegacyAnalyticsEventIds();
logMessageOnStep("Legacy analytics event ID data migration", z3);
updateFailuresMap("Legacy Analytics Id : ", z3);
if (z && z2 && z3) {
break;
}
MigrationLogger migrationLogger = this.migrationLogger;
StringBuilder sb = new StringBuilder();
sb.append("Native SDK to SDK X migration failed! Attempt : ");
i2++;
sb.append(i2);
migrationLogger.e("Helpshift_Migrator", sb.toString());
}
if (!z || !z2 || !z3) {
i = -1;
}
addNativeSDKVersionLog(i);
storeFailureLog(i);
this.preferences.edit().putInt("migration_state", i).commit();
try {
HSLegacySupportKeyValueStore hSLegacySupportKeyValueStore2 = this.supportKVStoreDBHelper;
if (hSLegacySupportKeyValueStore2 != null) {
hSLegacySupportKeyValueStore2.close();
}
HSNativeSDKUserDBHelper hSNativeSDKUserDBHelper2 = this.nativeSDKUserDBHelper;
if (hSNativeSDKUserDBHelper2 != null) {
hSNativeSDKUserDBHelper2.close();
}
} catch (Exception e3) {
e = e3;
str = "Helpshift_Migrator";
str2 = "Error closing DB instance";
Log.e(str, str2, e);
}
} catch (Throwable th) {
throw th;
}
} finally {
try {
HSLegacySupportKeyValueStore hSLegacySupportKeyValueStore3 = this.supportKVStoreDBHelper;
if (hSLegacySupportKeyValueStore3 != null) {
hSLegacySupportKeyValueStore3.close();
}
HSNativeSDKUserDBHelper hSNativeSDKUserDBHelper3 = this.nativeSDKUserDBHelper;
if (hSNativeSDKUserDBHelper3 != null) {
hSNativeSDKUserDBHelper3.close();
}
} catch (Exception e4) {
Log.e("Helpshift_Migrator", "Error closing DB instance", e4);
}
}
}
public final void storeFailureLog(int i) {
if (i != -1) {
return;
}
StringBuilder sb = this.failureLogBuilder;
sb.append(" Attempts: ");
sb.append(this.attempts);
sb.append(" , ");
StringBuilder sb2 = this.failureLogBuilder;
sb2.append("DeviceId : ");
sb2.append((String) this.failureMap.get("DeviceId : "));
sb2.append(" , ");
StringBuilder sb3 = this.failureLogBuilder;
sb3.append("User Data : ");
sb3.append((String) this.failureMap.get("User Data : "));
sb3.append(" , ");
StringBuilder sb4 = this.failureLogBuilder;
sb4.append("Push Token : ");
sb4.append((String) this.failureMap.get("Push Token : "));
sb4.append(" , ");
StringBuilder sb5 = this.failureLogBuilder;
sb5.append("SDK Language : ");
sb5.append((String) this.failureMap.get("SDK Language : "));
sb5.append(" , ");
StringBuilder sb6 = this.failureLogBuilder;
sb6.append("Legacy Analytics Id : ");
sb6.append((String) this.failureMap.get("Legacy Analytics Id : "));
try {
JSONObject jSONObject = new JSONObject();
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss", Locale.ENGLISH);
simpleDateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
jSONObject.put(ad.l0, simpleDateFormat.format(new Date()));
jSONObject.put("l", "ERROR");
jSONObject.put("msg", this.failureLogBuilder.toString());
jSONObject.put("src", "sdkx.android.10.2.2");
this.preferences.edit().putString("failure_logs", jSONObject.toString()).commit();
} catch (Exception unused) {
Log.e("Helpshift_Migrator", "Error storing failure log.");
}
}
public final void addNativeSDKVersionLog(int i) {
try {
String str = "Native SDK version: " + this.context.getSharedPreferences("HSJsonData", 0).getString("libraryVersion", "unknown") + " to SDK X version: 10.2.2";
if (i == -1) {
this.migrationLogger.e("Helpshift_Migrator", str);
this.migrationLogger.e("Helpshift_Migrator", " Migration failed!");
} else {
this.migrationLogger.d("Helpshift_Migrator", str);
this.migrationLogger.d("Helpshift_Migrator", "Migration success!");
}
} catch (Exception e) {
this.migrationLogger.e("Helpshift_Migrator", "Error fetching SDK info for logging", e);
}
}
public final boolean shouldMigrate() {
return databaseExists("__hs__db_support_key_values") && this.preferences.getInt("migration_state", 0) == 0;
}
public final void logMessageOnStep(String str, boolean z) {
String str2 = z ? " : Success" : " : Failed";
if (!z) {
this.migrationLogger.e("Helpshift_Migrator", str + str2);
return;
}
this.migrationLogger.d("Helpshift_Migrator", str + str2);
}
public final void updateFailuresMap(String str, boolean z) {
if (z) {
this.failureMap.put(str, "Success");
}
}
public final boolean migrateKVStoreData() {
boolean migrateDeviceId = migrateDeviceId();
logMessageOnStep("DeviceId migration", migrateDeviceId);
updateFailuresMap("DeviceId : ", migrateDeviceId);
boolean migratePushToken = migratePushToken();
logMessageOnStep("Push token migration", migratePushToken);
updateFailuresMap("Push Token : ", migratePushToken);
boolean migrateSDKLanguage = migrateSDKLanguage();
logMessageOnStep("SDK language migration", migrateSDKLanguage);
updateFailuresMap("SDK Language : ", migrateSDKLanguage);
return migrateDeviceId && migratePushToken && migrateSDKLanguage;
}
public final boolean migrateSDKLanguage() {
if (Utils.isNotEmpty(this.persistentStorage.getLanguage())) {
return true;
}
Object readStringFromKVDB = readStringFromKVDB("sdkLanguage");
this.persistentStorage.setLanguage(readStringFromKVDB instanceof String ? (String) readStringFromKVDB : "");
return true;
}
public final boolean migratePushToken() {
if (Utils.isNotEmpty(this.persistentStorage.getCurrentPushToken())) {
return true;
}
Object readStringFromKVDB = readStringFromKVDB("key_push_token");
this.persistentStorage.setCurrentPushToken(readStringFromKVDB instanceof String ? (String) readStringFromKVDB : "");
return true;
}
/* JADX WARN: Code restructure failed: missing block: B:21:0x004b, code lost:
if (r1 == null) goto L20;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final boolean migrateLegacyAnalyticsEventIds() {
/*
r6 = this;
java.lang.String r0 = "__hs_db_helpshift_users"
boolean r0 = r6.databaseExists(r0)
if (r0 != 0) goto La
r0 = 0
return r0
La:
org.json.JSONObject r0 = new org.json.JSONObject
r0.<init>()
r1 = 0
com.helpshift.migrator.database.HSNativeSDKUserDBHelper r2 = r6.nativeSDKUserDBHelper // Catch: java.lang.Throwable -> L3a java.lang.Exception -> L3c
android.database.sqlite.SQLiteDatabase r2 = r2.getReadableDatabase() // Catch: java.lang.Throwable -> L3a java.lang.Exception -> L3c
java.lang.String r3 = "SELECT * FROM legacy_analytics_event_id_table"
android.database.Cursor r1 = r2.rawQuery(r3, r1) // Catch: java.lang.Throwable -> L3a java.lang.Exception -> L3c
L1c:
boolean r2 = r1.moveToNext() // Catch: java.lang.Throwable -> L3a java.lang.Exception -> L3c
if (r2 == 0) goto L3e
java.lang.String r2 = "identifier"
int r2 = r1.getColumnIndex(r2) // Catch: java.lang.Throwable -> L3a java.lang.Exception -> L3c
java.lang.String r2 = r1.getString(r2) // Catch: java.lang.Throwable -> L3a java.lang.Exception -> L3c
java.lang.String r3 = "analytics_event_id"
int r3 = r1.getColumnIndex(r3) // Catch: java.lang.Throwable -> L3a java.lang.Exception -> L3c
java.lang.String r3 = r1.getString(r3) // Catch: java.lang.Throwable -> L3a java.lang.Exception -> L3c
r0.put(r2, r3) // Catch: java.lang.Throwable -> L3a java.lang.Exception -> L3c
goto L1c
L3a:
r0 = move-exception
goto L61
L3c:
r2 = move-exception
goto L42
L3e:
r1.close()
goto L4e
L42:
com.helpshift.migrator.MigrationLogger r3 = r6.migrationLogger // Catch: java.lang.Throwable -> L3a
java.lang.String r4 = "Helpshift_Migrator"
java.lang.String r5 = "Error reading legacy analytics event id."
r3.e(r4, r5, r2) // Catch: java.lang.Throwable -> L3a
if (r1 == 0) goto L4e
goto L3e
L4e:
int r1 = r0.length()
if (r1 <= 0) goto L5f
com.helpshift.storage.HSPersistentStorage r1 = r6.persistentStorage
java.lang.String r2 = "legacy_event_ids"
java.lang.String r0 = r0.toString()
r1.putString(r2, r0)
L5f:
r0 = 1
return r0
L61:
if (r1 == 0) goto L66
r1.close()
L66:
throw r0
*/
throw new UnsupportedOperationException("Method not decompiled: com.helpshift.migrator.NativeToSdkxMigrator.migrateLegacyAnalyticsEventIds():boolean");
}
public final boolean migrateDeviceId() {
if (Utils.isNotEmpty(this.persistentStorage.getHsDeviceId())) {
return true;
}
Object readStringFromKVDB = readStringFromKVDB("key_support_device_id");
if (readStringFromKVDB == null) {
return false;
}
this.persistentStorage.setHsDeviceId((String) readStringFromKVDB);
return true;
}
public final boolean databaseExists(String str) {
return new File(this.context.getDatabasePath(str).getAbsolutePath()).exists();
}
/* JADX WARN: Code restructure failed: missing block: B:14:0x004c, code lost:
if (r1 == null) goto L20;
*/
/* JADX WARN: Removed duplicated region for block: B:19:0x0052 */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final java.lang.Object readStringFromKVDB(java.lang.String r11) {
/*
r10 = this;
r0 = 0
com.helpshift.migrator.database.HSLegacySupportKeyValueStore r1 = r10.supportKVStoreDBHelper // Catch: java.lang.Throwable -> L30 java.lang.Exception -> L32
android.database.sqlite.SQLiteDatabase r2 = r1.getReadableDatabase() // Catch: java.lang.Throwable -> L30 java.lang.Exception -> L32
java.lang.String r5 = "key=?"
java.lang.String[] r6 = new java.lang.String[]{r11} // Catch: java.lang.Throwable -> L30 java.lang.Exception -> L32
java.lang.String r3 = "key_value_store"
r4 = 0
r7 = 0
r8 = 0
r9 = 0
android.database.Cursor r1 = r2.query(r3, r4, r5, r6, r7, r8, r9) // Catch: java.lang.Throwable -> L30 java.lang.Exception -> L32
boolean r2 = r1.moveToFirst() // Catch: java.lang.Throwable -> L27 java.lang.Exception -> L2a
if (r2 == 0) goto L2c
r2 = 1
byte[] r2 = r1.getBlob(r2) // Catch: java.lang.Throwable -> L27 java.lang.Exception -> L2a
java.lang.Object r0 = r10.toObject(r2) // Catch: java.lang.Throwable -> L27 java.lang.Exception -> L2a
goto L2c
L27:
r11 = move-exception
r0 = r1
goto L50
L2a:
r2 = move-exception
goto L34
L2c:
r1.close()
goto L4f
L30:
r11 = move-exception
goto L50
L32:
r2 = move-exception
r1 = r0
L34:
com.helpshift.migrator.MigrationLogger r3 = r10.migrationLogger // Catch: java.lang.Throwable -> L27
java.lang.String r4 = "Helpshift_Migrator"
java.lang.StringBuilder r5 = new java.lang.StringBuilder // Catch: java.lang.Throwable -> L27
r5.<init>() // Catch: java.lang.Throwable -> L27
java.lang.String r6 = "Failed to read the native db or DB does not exist. Key : "
r5.append(r6) // Catch: java.lang.Throwable -> L27
r5.append(r11) // Catch: java.lang.Throwable -> L27
java.lang.String r11 = r5.toString() // Catch: java.lang.Throwable -> L27
r3.e(r4, r11, r2) // Catch: java.lang.Throwable -> L27
if (r1 == 0) goto L4f
goto L2c
L4f:
return r0
L50:
if (r0 == 0) goto L55
r0.close()
L55:
throw r11
*/
throw new UnsupportedOperationException("Method not decompiled: com.helpshift.migrator.NativeToSdkxMigrator.readStringFromKVDB(java.lang.String):java.lang.Object");
}
public final boolean migrateUserData() {
if (!databaseExists("__hs_db_helpshift_users")) {
return false;
}
ArrayList<Map> arrayList = new ArrayList();
Cursor cursor = null;
try {
try {
cursor = this.nativeSDKUserDBHelper.getReadableDatabase().rawQuery("SELECT * FROM user_table", null);
while (cursor.moveToNext()) {
HashMap hashMap = new HashMap();
hashMap.put("anon", String.valueOf(cursor.getInt(cursor.getColumnIndex(Global.NIMBLE_AUTHENTICATOR_ANONYMOUS))));
hashMap.put("userId", cursor.getString(cursor.getColumnIndex("identifier")));
hashMap.put("userName", cursor.getString(cursor.getColumnIndex("name")));
hashMap.put("userEmail", cursor.getString(cursor.getColumnIndex("email")));
hashMap.put("userAuthToken", cursor.getString(cursor.getColumnIndex("auth_token")));
hashMap.put("isActive", String.valueOf(cursor.getInt(cursor.getColumnIndex(AppMeasurementSdk.ConditionalUserProperty.ACTIVE))));
arrayList.add(hashMap);
}
cursor.close();
for (Map map : arrayList) {
try {
boolean equals = "1".equals(map.remove("anon"));
boolean equals2 = "1".equals(map.remove("isActive"));
if (equals) {
JSONObject jSONObject = new JSONObject();
jSONObject.put("userId", map.get("userId"));
this.persistentStorage.storeAnonymousUserIdMap(jSONObject.toString());
} else if (equals2) {
this.persistentStorage.setActiveUser(new JSONObject(map).toString());
}
} catch (Exception e) {
this.migrationLogger.e("Helpshift_Migrator", "Error setting user data in SDK X migration", e);
return false;
}
}
return true;
} catch (Exception e2) {
this.migrationLogger.e("Helpshift_Migrator", "Error getting user data from native SDK", e2);
if (cursor != null) {
cursor.close();
}
return false;
}
} catch (Throwable th) {
if (cursor != null) {
cursor.close();
}
throw th;
}
}
public final Object toObject(byte[] bArr) {
ByteArrayInputStream byteArrayInputStream;
Throwable th;
ObjectInputStream objectInputStream;
try {
byteArrayInputStream = new ByteArrayInputStream(bArr);
try {
objectInputStream = new ObjectInputStream(byteArrayInputStream);
try {
Object readObject = objectInputStream.readObject();
Utils.closeQuietly(byteArrayInputStream);
Utils.closeQuietly(objectInputStream);
return readObject;
} catch (Throwable th2) {
th = th2;
Utils.closeQuietly(byteArrayInputStream);
Utils.closeQuietly(objectInputStream);
throw th;
}
} catch (Throwable th3) {
th = th3;
objectInputStream = null;
}
} catch (Throwable th4) {
byteArrayInputStream = null;
th = th4;
objectInputStream = null;
}
}
public String getMigrationErrorLogs() {
int i;
if (!this.preferences.getBoolean("mig_log_synced_with_webchat", false) && (i = this.preferences.getInt("migration_state", 0)) != 1 && i != 0) {
try {
String string = this.preferences.getString("error_logs", "");
if (Utils.isEmpty(string)) {
string = "[]";
}
JSONArray jSONArray = new JSONArray(string);
JSONObject jSONObject = new JSONObject();
jSONObject.put("migration_state", "FAILED");
jSONObject.put("did", this.persistentStorage.getHsDeviceId());
jSONObject.put("logs", jSONArray);
return jSONObject.toString();
} catch (Exception unused) {
Log.e("Helpshift_Migrator", "Error getting error logs for migration");
}
}
return "";
}
public void setErrorLogsSyncedWithWebchat(boolean z) {
this.preferences.edit().putBoolean("mig_log_synced_with_webchat", z).commit();
}
}

View File

@@ -0,0 +1,20 @@
package com.helpshift.migrator.database;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
/* loaded from: classes3.dex */
public class HSLegacySupportKeyValueStore extends SQLiteOpenHelper {
@Override // android.database.sqlite.SQLiteOpenHelper
public void onCreate(SQLiteDatabase sQLiteDatabase) {
}
@Override // android.database.sqlite.SQLiteOpenHelper
public void onUpgrade(SQLiteDatabase sQLiteDatabase, int i, int i2) {
}
public HSLegacySupportKeyValueStore(Context context) {
super(context, "__hs__db_support_key_values", (SQLiteDatabase.CursorFactory) null, 1);
}
}

View File

@@ -0,0 +1,20 @@
package com.helpshift.migrator.database;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
/* loaded from: classes3.dex */
public class HSNativeSDKUserDBHelper extends SQLiteOpenHelper {
@Override // android.database.sqlite.SQLiteOpenHelper
public void onCreate(SQLiteDatabase sQLiteDatabase) {
}
@Override // android.database.sqlite.SQLiteOpenHelper
public void onUpgrade(SQLiteDatabase sQLiteDatabase, int i, int i2) {
}
public HSNativeSDKUserDBHelper(Context context) {
super(context, "__hs_db_helpshift_users", (SQLiteDatabase.CursorFactory) null, 2);
}
}

View File

@@ -0,0 +1,33 @@
package com.helpshift.network;
import com.helpshift.network.HSResponse;
import com.helpshift.network.exception.HSRootApiException;
import com.helpshift.network.exception.NetworkException;
import com.helpshift.util.Utils;
/* loaded from: classes3.dex */
public class AuthenticationFailureNetwork implements HSNetwork {
public final HSNetwork network;
public AuthenticationFailureNetwork(HSNetwork hSNetwork) {
this.network = hSNetwork;
}
@Override // com.helpshift.network.HSNetwork
public HSResponse makeRequest(HSRequestData hSRequestData) {
HSResponse makeRequest = this.network.makeRequest(hSRequestData);
if (makeRequest.getStatus() == HSResponse.NetworkResponseCodes.UNAUTHORIZED_ACCESS.intValue() && !Utils.isEmpty(makeRequest.getResponseString())) {
if ("missing user auth token".equalsIgnoreCase(makeRequest.getResponseString())) {
NetworkException networkException = NetworkException.AUTH_TOKEN_NOT_PROVIDED;
networkException.serverStatusCode = HSResponse.NetworkResponseCodes.AUTH_TOKEN_NOT_PROVIDED.intValue();
throw HSRootApiException.wrap(null, networkException);
}
if ("invalid user auth token".equalsIgnoreCase(makeRequest.getResponseString())) {
NetworkException networkException2 = NetworkException.INVALID_AUTH_TOKEN;
networkException2.serverStatusCode = HSResponse.NetworkResponseCodes.INVALID_AUTH_TOKEN.intValue();
throw HSRootApiException.wrap(null, networkException2);
}
}
return makeRequest;
}
}

View File

@@ -0,0 +1,35 @@
package com.helpshift.network;
import com.helpshift.network.HSRequest;
import com.helpshift.network.exception.HSRootApiException;
import com.helpshift.network.exception.NetworkException;
import com.helpshift.util.Utils;
import com.ironsource.v8;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Map;
/* loaded from: classes3.dex */
public class GETNetwork extends HSBaseNetwork implements HSNetwork {
public GETNetwork(HTTPTransport hTTPTransport, String str) {
super(hTTPTransport, str);
}
@Override // com.helpshift.network.HSBaseNetwork
public HSRequest getRequest(HSRequestData hSRequestData) {
return new HSRequest(HSRequest.Method.GET, getURL() + "?" + getQuery(hSRequestData.body), hSRequestData.headers, "", 5000);
}
public final String getQuery(Map map) {
ArrayList arrayList = new ArrayList();
for (Map.Entry entry : map.entrySet()) {
try {
arrayList.add(((String) entry.getKey()) + v8.i.b + URLEncoder.encode((String) entry.getValue(), "UTF-8"));
} catch (UnsupportedEncodingException e) {
throw HSRootApiException.wrap(e, NetworkException.UNSUPPORTED_ENCODING_EXCEPTION);
}
}
return Utils.join(v8.i.c, arrayList);
}
}

View File

@@ -0,0 +1,23 @@
package com.helpshift.network;
/* loaded from: classes3.dex */
public abstract class HSBaseNetwork implements HSNetwork {
public HTTPTransport httpTransport;
public String url;
public abstract HSRequest getRequest(HSRequestData hSRequestData);
public String getURL() {
return this.url;
}
public HSBaseNetwork(HTTPTransport hTTPTransport, String str) {
this.httpTransport = hTTPTransport;
this.url = str;
}
@Override // com.helpshift.network.HSNetwork
public HSResponse makeRequest(HSRequestData hSRequestData) {
return this.httpTransport.makeRequest(getRequest(hSRequestData));
}
}

View File

@@ -0,0 +1,304 @@
package com.helpshift.network;
import androidx.webkit.ProxyConfig;
import com.google.firebase.perf.network.FirebasePerfUrlConnection;
import com.helpshift.log.HSLogger;
import com.helpshift.util.ListUtil;
import com.helpshift.util.Utils;
import com.ironsource.nb;
import com.mbridge.msdk.foundation.download.database.DownloadModel;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.net.URLConnection;
import java.net.UnknownHostException;
import java.util.List;
import java.util.Map;
import java.util.zip.GZIPInputStream;
import javax.net.ssl.HttpsURLConnection;
import org.json.JSONObject;
/* loaded from: classes3.dex */
public class HSDownloaderNetwork {
public final URLConnectionProvider urlConnectionProvider;
public HSDownloaderNetwork(URLConnectionProvider uRLConnectionProvider) {
this.urlConnectionProvider = uRLConnectionProvider;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r10v0 */
/* JADX WARN: Type inference failed for: r10v13 */
/* JADX WARN: Type inference failed for: r10v18 */
/* JADX WARN: Type inference failed for: r10v2, types: [java.io.Closeable] */
/* JADX WARN: Type inference failed for: r10v7 */
public HSDownloaderResponse downloadResource(String str, Map map, File file) {
String str2;
boolean z;
Exception exc;
String str3;
UnknownHostException unknownHostException;
?? r10;
FileOutputStream fileOutputStream;
boolean z2;
String str4;
String str5;
String str6;
FileOutputStream fileOutputStream2;
str2 = "";
String str7 = nb.N;
JSONObject jSONObject = new JSONObject();
int i = 404;
try {
try {
try {
HttpsURLConnection httpsURLConnection = (HttpsURLConnection) ((URLConnection) FirebasePerfUrlConnection.instrument(this.urlConnectionProvider.getURL(str).openConnection()));
map.put("Accept-Encoding", "gzip");
for (Map.Entry entry : map.entrySet()) {
try {
httpsURLConnection.setRequestProperty((String) entry.getKey(), (String) entry.getValue());
} catch (UnknownHostException e) {
unknownHostException = e;
str3 = "";
z = false;
fileOutputStream = null;
HSLogger.e("dwnldrNet", "Error downloading resource: " + str + " \n " + unknownHostException.getMessage());
Utils.closeQuietly(fileOutputStream);
r10 = str3;
str5 = str2;
str4 = str7;
z2 = z;
str6 = r10;
return new HSDownloaderResponse(i, jSONObject, str6, str5, str4, z2);
} catch (Exception e2) {
exc = e2;
str3 = "";
z = false;
fileOutputStream = null;
HSLogger.e("dwnldrNet", "Error downloading resource: " + str, exc);
Utils.closeQuietly(fileOutputStream);
r10 = str3;
str5 = str2;
str4 = str7;
z2 = z;
str6 = r10;
return new HSDownloaderResponse(i, jSONObject, str6, str5, str4, z2);
}
}
i = httpsURLConnection.getResponseCode();
str7 = httpsURLConnection.getContentEncoding();
String contentType = httpsURLConnection.getContentType();
try {
Map<String, List<String>> headerFields = httpsURLConnection.getHeaderFields();
for (Map.Entry<String, List<String>> entry2 : headerFields.entrySet()) {
try {
if (entry2.getKey() != null || entry2.getValue() != null) {
if (entry2.getKey() == null) {
jSONObject.put("", generateHeaderValue(entry2.getValue()));
} else {
jSONObject.put(entry2.getKey(), generateHeaderValue(entry2.getValue()));
if (entry2.getKey().equalsIgnoreCase("Access-Control-Allow-Origin")) {
jSONObject.put(entry2.getKey(), ProxyConfig.MATCH_ALL_SCHEMES);
}
}
}
} catch (UnknownHostException e3) {
unknownHostException = e3;
str3 = str2;
str2 = contentType;
z = false;
fileOutputStream = null;
HSLogger.e("dwnldrNet", "Error downloading resource: " + str + " \n " + unknownHostException.getMessage());
Utils.closeQuietly(fileOutputStream);
r10 = str3;
str5 = str2;
str4 = str7;
z2 = z;
str6 = r10;
return new HSDownloaderResponse(i, jSONObject, str6, str5, str4, z2);
} catch (Exception e4) {
exc = e4;
str3 = str2;
str2 = contentType;
z = false;
fileOutputStream = null;
HSLogger.e("dwnldrNet", "Error downloading resource: " + str, exc);
Utils.closeQuietly(fileOutputStream);
r10 = str3;
str5 = str2;
str4 = str7;
z2 = z;
str6 = r10;
return new HSDownloaderResponse(i, jSONObject, str6, str5, str4, z2);
}
}
List<String> list = headerFields.get(DownloadModel.ETAG);
str2 = ListUtil.isNotEmpty(list) ? list.get(0) : "";
if (i < 200 || i > 300) {
z = false;
fileOutputStream2 = null;
} else {
InputStream inputStream = httpsURLConnection.getInputStream();
if (Utils.isNotEmpty(str7) && str7.contains("gzip")) {
inputStream = new GZIPInputStream(inputStream);
}
FileOutputStream fileOutputStream3 = new FileOutputStream(file);
try {
try {
byte[] bArr = new byte[8192];
while (true) {
int read = inputStream.read(bArr);
if (read == -1) {
break;
}
z = false;
try {
fileOutputStream3.write(bArr, 0, read);
} catch (UnknownHostException e5) {
e = e5;
fileOutputStream = fileOutputStream3;
unknownHostException = e;
str3 = str2;
str2 = contentType;
HSLogger.e("dwnldrNet", "Error downloading resource: " + str + " \n " + unknownHostException.getMessage());
Utils.closeQuietly(fileOutputStream);
r10 = str3;
str5 = str2;
str4 = str7;
z2 = z;
str6 = r10;
return new HSDownloaderResponse(i, jSONObject, str6, str5, str4, z2);
} catch (Exception e6) {
e = e6;
fileOutputStream = fileOutputStream3;
exc = e;
str3 = str2;
str2 = contentType;
HSLogger.e("dwnldrNet", "Error downloading resource: " + str, exc);
Utils.closeQuietly(fileOutputStream);
r10 = str3;
str5 = str2;
str4 = str7;
z2 = z;
str6 = r10;
return new HSDownloaderResponse(i, jSONObject, str6, str5, str4, z2);
}
}
z = false;
fileOutputStream2 = fileOutputStream3;
} catch (Throwable th) {
th = th;
r10 = fileOutputStream3;
Utils.closeQuietly(r10);
throw th;
}
} catch (UnknownHostException e7) {
e = e7;
z = false;
} catch (Exception e8) {
e = e8;
z = false;
}
}
if ((i >= 200 && i <= 300) || i == 304) {
try {
HSLogger.d("dwnldrNet", "Successfully downloaded the resource with Url: " + str + " headers: " + map);
z = true;
} catch (UnknownHostException e9) {
unknownHostException = e9;
str3 = str2;
str2 = contentType;
fileOutputStream = fileOutputStream2;
HSLogger.e("dwnldrNet", "Error downloading resource: " + str + " \n " + unknownHostException.getMessage());
Utils.closeQuietly(fileOutputStream);
r10 = str3;
str5 = str2;
str4 = str7;
z2 = z;
str6 = r10;
return new HSDownloaderResponse(i, jSONObject, str6, str5, str4, z2);
} catch (Exception e10) {
exc = e10;
str3 = str2;
str2 = contentType;
fileOutputStream = fileOutputStream2;
HSLogger.e("dwnldrNet", "Error downloading resource: " + str, exc);
Utils.closeQuietly(fileOutputStream);
r10 = str3;
str5 = str2;
str4 = str7;
z2 = z;
str6 = r10;
return new HSDownloaderResponse(i, jSONObject, str6, str5, str4, z2);
} catch (Throwable th2) {
th = th2;
r10 = fileOutputStream2;
Utils.closeQuietly(r10);
throw th;
}
}
Utils.closeQuietly(fileOutputStream2);
str6 = str2;
z2 = z;
str5 = contentType;
str4 = str7;
} catch (UnknownHostException e11) {
z = false;
unknownHostException = e11;
str3 = str2;
str2 = contentType;
fileOutputStream = null;
HSLogger.e("dwnldrNet", "Error downloading resource: " + str + " \n " + unknownHostException.getMessage());
Utils.closeQuietly(fileOutputStream);
r10 = str3;
str5 = str2;
str4 = str7;
z2 = z;
str6 = r10;
return new HSDownloaderResponse(i, jSONObject, str6, str5, str4, z2);
} catch (Exception e12) {
z = false;
exc = e12;
str3 = str2;
str2 = contentType;
fileOutputStream = null;
HSLogger.e("dwnldrNet", "Error downloading resource: " + str, exc);
Utils.closeQuietly(fileOutputStream);
r10 = str3;
str5 = str2;
str4 = str7;
z2 = z;
str6 = r10;
return new HSDownloaderResponse(i, jSONObject, str6, str5, str4, z2);
}
} catch (Throwable th3) {
th = th3;
}
} catch (Throwable th4) {
th = th4;
r10 = 0;
}
} catch (UnknownHostException e13) {
z = false;
unknownHostException = e13;
str3 = "";
} catch (Exception e14) {
z = false;
exc = e14;
str3 = "";
}
return new HSDownloaderResponse(i, jSONObject, str6, str5, str4, z2);
}
public static String generateHeaderValue(List list) {
if (ListUtil.isEmpty(list)) {
return "";
}
StringBuilder sb = new StringBuilder((String) list.get(0));
for (int i = 1; i < list.size(); i++) {
sb.append(";");
sb.append((String) list.get(i));
}
return sb.toString();
}
}

View File

@@ -0,0 +1,22 @@
package com.helpshift.network;
import org.json.JSONObject;
/* loaded from: classes3.dex */
public class HSDownloaderResponse {
public final String encoding;
public final String etag;
public final JSONObject headers;
public final boolean isSuccess;
public final String mimetype;
public final int status;
public HSDownloaderResponse(int i, JSONObject jSONObject, String str, String str2, String str3, boolean z) {
this.status = i;
this.headers = jSONObject;
this.etag = str;
this.mimetype = str2;
this.encoding = str3;
this.isSuccess = z;
}
}

View File

@@ -0,0 +1,73 @@
package com.helpshift.network;
import com.helpshift.util.Utils;
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import javax.net.ssl.HttpsURLConnection;
/* loaded from: classes3.dex */
public class HSHttpTransport implements HTTPTransport {
public final void closeHelpshiftSSLSocketFactorySockets(HttpsURLConnection httpsURLConnection) {
}
public final void fixSSLSocketProtocols(HttpsURLConnection httpsURLConnection) {
}
/* JADX WARN: Not initialized variable reg: 11, insn: 0x03d6: MOVE (r5 I:??[OBJECT, ARRAY]) = (r11 I:??[OBJECT, ARRAY]), block:B:305:0x03d4 */
/* JADX WARN: Not initialized variable reg: 5, insn: 0x03d5: MOVE (r6 I:??[OBJECT, ARRAY]) = (r5 I:??[OBJECT, ARRAY]), block:B:305:0x03d4 */
/* JADX WARN: Removed duplicated region for block: B:58:0x0487 A[Catch: Exception -> 0x048b, TRY_LEAVE, TryCatch #24 {Exception -> 0x048b, blocks: (B:56:0x0482, B:58:0x0487), top: B:55:0x0482 }] */
/* JADX WARN: Removed duplicated region for block: B:61:? A[SYNTHETIC] */
@Override // com.helpshift.network.HTTPTransport
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public com.helpshift.network.HSResponse makeRequest(com.helpshift.network.HSRequest r20) {
/*
Method dump skipped, instructions count: 1169
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.helpshift.network.HSHttpTransport.makeRequest(com.helpshift.network.HSRequest):com.helpshift.network.HSResponse");
}
public final String readStream(InputStream inputStream) {
InputStreamReader inputStreamReader;
Throwable th;
BufferedReader bufferedReader;
if (inputStream == null) {
return null;
}
StringBuilder sb = new StringBuilder();
try {
inputStreamReader = new InputStreamReader(inputStream);
try {
bufferedReader = new BufferedReader(inputStreamReader);
while (true) {
try {
String readLine = bufferedReader.readLine();
if (readLine != null) {
sb.append(readLine);
} else {
Utils.closeQuietly(bufferedReader);
Utils.closeQuietly(inputStreamReader);
return sb.toString();
}
} catch (Throwable th2) {
th = th2;
Utils.closeQuietly(bufferedReader);
Utils.closeQuietly(inputStreamReader);
throw th;
}
}
} catch (Throwable th3) {
th = th3;
bufferedReader = null;
}
} catch (Throwable th4) {
inputStreamReader = null;
th = th4;
bufferedReader = null;
}
}
}

View File

@@ -0,0 +1,6 @@
package com.helpshift.network;
/* loaded from: classes3.dex */
public interface HSNetwork {
HSResponse makeRequest(HSRequestData hSRequestData);
}

View File

@@ -0,0 +1,45 @@
package com.helpshift.network;
import java.util.Map;
/* loaded from: classes3.dex */
public class HSRequest {
public final String body;
public final Map headers;
public final Method method;
public final int timeout;
public final String url;
public enum Method {
POST,
GET
}
public String getBody() {
return this.body;
}
public Map getHeaders() {
return this.headers;
}
public Method getMethod() {
return this.method;
}
public int getTimeout() {
return this.timeout;
}
public String getUrl() {
return this.url;
}
public HSRequest(Method method, String str, Map map, String str2, int i) {
this.method = method;
this.url = str;
this.headers = map;
this.body = str2;
this.timeout = i;
}
}

View File

@@ -0,0 +1,14 @@
package com.helpshift.network;
import java.util.Map;
/* loaded from: classes3.dex */
public class HSRequestData {
public final Map body;
public final Map headers;
public HSRequestData(Map map, Map map2) {
this.headers = map;
this.body = map2;
}
}

View File

@@ -0,0 +1,33 @@
package com.helpshift.network;
import java.util.Map;
/* loaded from: classes3.dex */
public class HSResponse {
public final Map headers;
public final String responseString;
public final int status;
public interface NetworkResponseCodes {
public static final Integer OK = 200;
public static final Integer CONTENT_UNCHANGED = 304;
public static final Integer OBJECT_NOT_FOUND = 400;
public static final Integer UNAUTHORIZED_ACCESS = 401;
public static final Integer AUTH_TOKEN_NOT_PROVIDED = 441;
public static final Integer INVALID_AUTH_TOKEN = 443;
}
public String getResponseString() {
return this.responseString;
}
public int getStatus() {
return this.status;
}
public HSResponse(int i, String str, Map map) {
this.status = i;
this.responseString = str;
this.headers = map;
}
}

View File

@@ -0,0 +1,6 @@
package com.helpshift.network;
/* loaded from: classes3.dex */
public interface HTTPTransport {
HSResponse makeRequest(HSRequest hSRequest);
}

View File

@@ -0,0 +1,16 @@
package com.helpshift.network;
import com.facebook.internal.security.CertificateUtil;
import com.helpshift.platform.Device;
import java.util.HashMap;
import java.util.Map;
/* loaded from: classes3.dex */
public abstract class NetworkConstants {
public static Map buildHeaderMap(Device device, String str) {
HashMap hashMap = new HashMap();
hashMap.put("Authorization", "Basic " + device.encodeBase64(str + CertificateUtil.DELIMITER));
hashMap.put("Accept", "application/vnd+hsapi-v2+json");
return hashMap;
}
}

View File

@@ -0,0 +1,47 @@
package com.helpshift.network;
import com.helpshift.network.HSRequest;
import com.helpshift.network.exception.HSRootApiException;
import com.helpshift.network.exception.NetworkException;
import com.helpshift.util.Utils;
import com.ironsource.v8;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
/* loaded from: classes3.dex */
public class POSTNetwork extends HSBaseNetwork implements HSNetwork {
public POSTNetwork(HTTPTransport hTTPTransport, String str) {
super(hTTPTransport, str);
}
@Override // com.helpshift.network.HSBaseNetwork
public HSRequest getRequest(HSRequestData hSRequestData) {
return new HSRequest(HSRequest.Method.POST, getURL(), hSRequestData.headers, getBody(cleanData(hSRequestData.body)), 5000);
}
public final String getBody(Map map) {
ArrayList arrayList = new ArrayList();
for (Map.Entry entry : map.entrySet()) {
try {
arrayList.add(URLEncoder.encode((String) entry.getKey(), "UTF-8") + v8.i.b + URLEncoder.encode((String) entry.getValue(), "UTF-8"));
} catch (UnsupportedEncodingException e) {
throw HSRootApiException.wrap(e, NetworkException.UNSUPPORTED_ENCODING_EXCEPTION);
}
}
return Utils.join(v8.i.c, arrayList);
}
public static Map cleanData(Map map) {
String str;
HashMap hashMap = new HashMap();
for (String str2 : map.keySet()) {
if (str2 != null && (str = (String) map.get(str2)) != null) {
hashMap.put(str2, str);
}
}
return hashMap;
}
}

View File

@@ -0,0 +1,10 @@
package com.helpshift.network;
import java.net.URL;
/* loaded from: classes3.dex */
public class URLConnectionProvider {
public URL getURL(String str) {
return new URL(str);
}
}

View File

@@ -0,0 +1,39 @@
package com.helpshift.network.exception;
/* loaded from: classes3.dex */
public class HSRootApiException extends RuntimeException {
public final String errorMessage;
public final Exception exception;
public final ExceptionType exceptionType;
public interface ExceptionType {
}
public HSRootApiException(Exception exc, ExceptionType exceptionType, String str) {
super(str, exc);
this.exception = exc;
this.exceptionType = exceptionType;
this.errorMessage = str;
}
public static HSRootApiException wrap(Exception exc, ExceptionType exceptionType) {
return wrap(exc, exceptionType, null);
}
public static HSRootApiException wrap(Exception exc, ExceptionType exceptionType, String str) {
if (exc instanceof HSRootApiException) {
HSRootApiException hSRootApiException = (HSRootApiException) exc;
Exception exc2 = hSRootApiException.exception;
if (exceptionType == null) {
exceptionType = hSRootApiException.exceptionType;
}
if (str == null) {
str = hSRootApiException.errorMessage;
}
exc = exc2;
} else if (exceptionType == null) {
exceptionType = UnexpectedException.GENERIC;
}
return new HSRootApiException(exc, exceptionType, str);
}
}

View File

@@ -0,0 +1,19 @@
package com.helpshift.network.exception;
import com.helpshift.network.exception.HSRootApiException;
/* loaded from: classes3.dex */
public enum NetworkException implements HSRootApiException.ExceptionType {
GENERIC,
NO_CONNECTION,
UNKNOWN_HOST,
SSL_PEER_UNVERIFIED,
SSL_HANDSHAKE,
TIMESTAMP_CORRECTION_RETRIES_EXHAUSTED,
UNSUPPORTED_ENCODING_EXCEPTION,
AUTH_TOKEN_NOT_PROVIDED,
INVALID_AUTH_TOKEN;
public String route;
public int serverStatusCode;
}

View File

@@ -0,0 +1,8 @@
package com.helpshift.network.exception;
import com.helpshift.network.exception.HSRootApiException;
/* loaded from: classes3.dex */
public enum UnexpectedException implements HSRootApiException.ExceptionType {
GENERIC
}

View File

@@ -0,0 +1,20 @@
package com.helpshift.notification;
/* loaded from: classes3.dex */
public interface CoreNotificationManager {
void cancelNotifications();
void setNotificationChannelId(String str);
void setNotificationIcon(int i);
void setNotificationLargeIcon(int i);
void setNotificationReceivedCallback(NotificationReceivedCallback notificationReceivedCallback);
void setNotificationSoundId(int i);
void showDebugLogNotification();
void showNotification(String str, boolean z);
}

View File

@@ -0,0 +1,71 @@
package com.helpshift.notification;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
import androidx.core.app.NotificationCompat;
import androidx.core.view.accessibility.AccessibilityEventCompat;
import com.facebook.share.internal.ShareConstants;
import com.google.android.gms.drive.DriveFile;
import com.helpshift.HSPluginEventBridge;
import com.helpshift.log.HSLogger;
import com.helpshift.platform.Device;
import com.helpshift.util.ApplicationUtil;
import com.helpshift.util.AssetsUtil;
import com.helpshift.util.Utils;
/* loaded from: classes3.dex */
public abstract class HSNotification {
public static NotificationCompat.Builder createNotification(Context context, Device device, String str, int i, int i2, int i3, Class cls) {
String appName = device.getAppName();
if (!Utils.isNotEmpty(str)) {
str = "";
}
HSLogger.d("SDKXNotif", "Creating Support notification :\n Title : " + appName);
int logoResourceValue = ApplicationUtil.getLogoResourceValue(context);
if (!AssetsUtil.resourceExists(context, i)) {
i = logoResourceValue;
}
Bitmap decodeResource = AssetsUtil.resourceExists(context, i2) ? BitmapFactory.decodeResource(context.getResources(), i2) : null;
Intent intent = new Intent(context, (Class<?>) cls);
intent.putExtra("SERVICE_MODE", "WEBCHAT_SERVICE_FLAG");
intent.putExtra(ShareConstants.FEED_SOURCE_PARAM, "notification");
intent.setFlags(DriveFile.MODE_READ_ONLY);
PendingIntent pendingIntentForNotification = HSPluginEventBridge.getPendingIntentForNotification(context, PendingIntent.getActivity(context, 50, intent, AccessibilityEventCompat.TYPE_VIEW_TARGETED_BY_SCROLL));
NotificationCompat.Builder builder = new NotificationCompat.Builder(context);
builder.setSmallIcon(i);
builder.setContentTitle(appName);
builder.setContentText(str);
builder.setContentIntent(pendingIntentForNotification);
builder.setAutoCancel(true);
if (decodeResource != null) {
builder.setLargeIcon(decodeResource);
}
Uri notificationSoundUri = getNotificationSoundUri(context, i3);
if (notificationSoundUri == null) {
if (ApplicationUtil.isPermissionGranted(context, "android.permission.VIBRATE")) {
builder.setDefaults(-1);
} else {
builder.setDefaults(5);
}
} else {
builder.setSound(notificationSoundUri);
if (ApplicationUtil.isPermissionGranted(context, "android.permission.VIBRATE")) {
builder.setDefaults(6);
} else {
builder.setDefaults(4);
}
}
return builder;
}
public static Uri getNotificationSoundUri(Context context, int i) {
if (i == 0) {
return null;
}
return Uri.parse("android.resource://" + context.getPackageName() + "/" + i);
}
}

View File

@@ -0,0 +1,153 @@
package com.helpshift.notification;
import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.content.Context;
import android.media.AudioAttributes;
import android.net.Uri;
import androidx.core.app.NotificationCompat;
import com.helpshift.activities.HSDebugActivity;
import com.helpshift.activities.HSMainActivity;
import com.helpshift.concurrency.HSThreadingService;
import com.helpshift.core.HSContext;
import com.helpshift.log.HSLogger;
import com.helpshift.platform.Device;
import com.helpshift.storage.HSPersistentStorage;
import com.helpshift.util.ApplicationUtil;
import com.helpshift.util.Utils;
import java.lang.ref.WeakReference;
/* loaded from: classes3.dex */
public class HSNotificationManager implements CoreNotificationManager {
public Context context;
public Device device;
public WeakReference notificationReceivedCallback;
public HSPersistentStorage persistentStorage;
public HSThreadingService threadingService;
public HSNotificationManager(Context context, Device device, HSPersistentStorage hSPersistentStorage, HSThreadingService hSThreadingService) {
this.context = context;
this.device = device;
this.persistentStorage = hSPersistentStorage;
this.threadingService = hSThreadingService;
}
@Override // com.helpshift.notification.CoreNotificationManager
public void setNotificationChannelId(String str) {
this.persistentStorage.setNotificationChannelId(str);
}
@Override // com.helpshift.notification.CoreNotificationManager
public void setNotificationSoundId(int i) {
this.persistentStorage.setNotificationSoundId(i);
}
@Override // com.helpshift.notification.CoreNotificationManager
public void setNotificationIcon(int i) {
this.persistentStorage.setNotificationIcon(i);
}
@Override // com.helpshift.notification.CoreNotificationManager
public void setNotificationLargeIcon(int i) {
this.persistentStorage.setNotificationLargeIcon(i);
}
@Override // com.helpshift.notification.CoreNotificationManager
public void setNotificationReceivedCallback(NotificationReceivedCallback notificationReceivedCallback) {
this.notificationReceivedCallback = new WeakReference(notificationReceivedCallback);
}
@Override // com.helpshift.notification.CoreNotificationManager
public void showNotification(final String str, boolean z) {
HSContext hSContext = HSContext.getInstance();
if (hSContext.isSdkOpen()) {
this.threadingService.runOnUIThread(new Runnable() { // from class: com.helpshift.notification.HSNotificationManager.1
@Override // java.lang.Runnable
public void run() {
NotificationReceivedCallback notificationReceivedCallback = (NotificationReceivedCallback) HSNotificationManager.this.notificationReceivedCallback.get();
if (notificationReceivedCallback != null) {
notificationReceivedCallback.onNotificationReceived();
}
}
});
} else {
if (hSContext.isWebchatUIOpen()) {
return;
}
if (z || this.persistentStorage.getEnableInAppNotification()) {
this.threadingService.runOnUIThread(new Runnable() { // from class: com.helpshift.notification.HSNotificationManager.2
@Override // java.lang.Runnable
public void run() {
HSNotificationManager.this.showNotificationInternal(str, HSMainActivity.class);
}
});
}
}
}
@Override // com.helpshift.notification.CoreNotificationManager
public void showDebugLogNotification() {
this.threadingService.runOnUIThread(new Runnable() { // from class: com.helpshift.notification.HSNotificationManager.3
@Override // java.lang.Runnable
public void run() {
HSNotificationManager.this.showNotificationInternal("Helpshift Debugger: Tap to share debug logs", HSDebugActivity.class);
}
});
}
public final void showNotificationInternal(String str, Class cls) {
NotificationCompat.Builder createNotification = HSNotification.createNotification(this.context, this.device, str, this.persistentStorage.getNotificationIcon(), this.persistentStorage.getNotificationLargeIcon(), this.persistentStorage.getNotificationSoundId(), cls);
if (createNotification != null) {
Notification attachChannelId = attachChannelId(createNotification.build(), this.context);
HSLogger.d("notifMngr", "Notification built, trying to post now.");
ApplicationUtil.showNotification(this.context, attachChannelId, cls);
}
}
public final Notification attachChannelId(Notification notification, Context context) {
if (ApplicationUtil.getTargetSDKVersion(context) < 26) {
return notification;
}
Notification.Builder recoverBuilder = Notification.Builder.recoverBuilder(context, notification);
recoverBuilder.setChannelId(getActiveNotificationChannel(context));
return recoverBuilder.build();
}
public final String getActiveNotificationChannel(Context context) {
String notificationChannelId = this.persistentStorage.getNotificationChannelId();
if (Utils.isEmpty(notificationChannelId)) {
ensureDefaultNotificationChannelCreated(context);
return "In-app Support";
}
deleteDefaultNotificationChannel(context);
return notificationChannelId;
}
public final void deleteDefaultNotificationChannel(Context context) {
NotificationManager notificationManager = ApplicationUtil.getNotificationManager(context);
if (notificationManager == null || notificationManager.getNotificationChannel("In-app Support") == null) {
return;
}
notificationManager.deleteNotificationChannel("In-app Support");
}
public final void ensureDefaultNotificationChannelCreated(Context context) {
NotificationManager notificationManager = ApplicationUtil.getNotificationManager(context);
if (notificationManager == null || notificationManager.getNotificationChannel("In-app Support") != null) {
return;
}
NotificationChannel notificationChannel = new NotificationChannel("In-app Support", "In-app Support", 3);
notificationChannel.setDescription("");
Uri notificationSoundUri = HSNotification.getNotificationSoundUri(context, this.persistentStorage.getNotificationSoundId());
if (notificationSoundUri != null) {
notificationChannel.setSound(notificationSoundUri, new AudioAttributes.Builder().build());
}
notificationManager.createNotificationChannel(notificationChannel);
}
@Override // com.helpshift.notification.CoreNotificationManager
public void cancelNotifications() {
ApplicationUtil.cancelNotification(this.context);
}
}

View File

@@ -0,0 +1,105 @@
package com.helpshift.notification;
import com.helpshift.chat.HSEventProxy;
import com.helpshift.concurrency.HSThreadingService;
import com.helpshift.log.HSLogger;
import com.helpshift.network.AuthenticationFailureNetwork;
import com.helpshift.network.HSNetwork;
import com.helpshift.network.HSRequestData;
import com.helpshift.network.HSResponse;
import com.helpshift.network.HTTPTransport;
import com.helpshift.network.POSTNetwork;
import com.helpshift.network.exception.HSRootApiException;
import com.helpshift.network.exception.NetworkException;
import com.helpshift.platform.Device;
import com.helpshift.storage.HSGenericDataManager;
import com.helpshift.storage.HSPersistentStorage;
import com.helpshift.util.Utils;
import com.helpshift.util.ValueListener;
import java.util.Map;
/* loaded from: classes3.dex */
public class HSPushTokenManager {
public Device device;
public HSGenericDataManager genericDataManager;
public HSEventProxy hsEventProxy;
public HSThreadingService hsThreadingService;
public HTTPTransport httpTransport;
public HSPersistentStorage persistentStorage;
public HSPushTokenManager(Device device, HSPersistentStorage hSPersistentStorage, HSThreadingService hSThreadingService, HSEventProxy hSEventProxy, HTTPTransport hTTPTransport, HSGenericDataManager hSGenericDataManager) {
this.device = device;
this.persistentStorage = hSPersistentStorage;
this.hsThreadingService = hSThreadingService;
this.hsEventProxy = hSEventProxy;
this.httpTransport = hTTPTransport;
this.genericDataManager = hSGenericDataManager;
}
public void savePushToken(String str) {
this.persistentStorage.setCurrentPushToken(str);
}
public void registerPushTokenWithBackend(String str, Map map, ValueListener valueListener) {
pushTokenRequest(str, map, false, valueListener);
}
public void deregisterPushTokenForUser(Map map, ValueListener valueListener) {
pushTokenRequest("unreg", map, true, valueListener);
}
public final void pushTokenRequest(String str, Map map, boolean z, ValueListener valueListener) {
if (!this.device.isOnline() || Utils.isEmpty(str) || Utils.isEmpty(map)) {
HSLogger.e("pshTknManagr", "Error in syncing push token, preconditions failed.");
return;
}
Map networkHeaders = this.genericDataManager.getNetworkHeaders();
String pushTokenSyncRoute = this.genericDataManager.getPushTokenSyncRoute();
String platformId = this.persistentStorage.getPlatformId();
String deviceId = this.device.getDeviceId();
if (Utils.isEmpty(networkHeaders) || Utils.isEmpty(pushTokenSyncRoute) || Utils.isEmpty(platformId) || Utils.isEmpty(deviceId)) {
HSLogger.e("pshTknManagr", "Error in reading network header and route data");
return;
}
try {
map.put("token", str);
map.put("did", deviceId);
map.put("platform-id", platformId);
makePushTokenRequest(new AuthenticationFailureNetwork(new POSTNetwork(this.httpTransport, pushTokenSyncRoute)), new HSRequestData(networkHeaders, map), z, valueListener);
} catch (Exception e) {
HSLogger.e("pshTknManagr", "Error in syncing push token", e);
}
}
public final void makePushTokenRequest(final HSNetwork hSNetwork, final HSRequestData hSRequestData, final boolean z, final ValueListener valueListener) {
this.hsThreadingService.getNetworkService().submit(new Runnable() { // from class: com.helpshift.notification.HSPushTokenManager.1
@Override // java.lang.Runnable
public void run() {
try {
HSResponse makeRequest = hSNetwork.makeRequest(hSRequestData);
if (z) {
return;
}
int status = makeRequest.getStatus();
valueListener.update(Boolean.valueOf(status >= 200 && status < 300));
} catch (HSRootApiException e) {
if (!z) {
valueListener.update(Boolean.FALSE);
HSRootApiException.ExceptionType exceptionType = e.exceptionType;
if (exceptionType == NetworkException.INVALID_AUTH_TOKEN) {
HSPushTokenManager.this.hsEventProxy.sendAuthFailureEvent("invalid user auth token");
return;
} else {
if (exceptionType == NetworkException.AUTH_TOKEN_NOT_PROVIDED) {
HSPushTokenManager.this.hsEventProxy.sendAuthFailureEvent("missing user auth token");
return;
}
return;
}
}
HSLogger.e("pshTknManagr", "Network error for deregister push token request", e);
}
}
});
}
}

View File

@@ -0,0 +1,6 @@
package com.helpshift.notification;
/* loaded from: classes3.dex */
public interface NotificationReceivedCallback {
void onNotificationReceived();
}

View File

@@ -0,0 +1,65 @@
package com.helpshift.notification;
import com.helpshift.chat.HSEventProxy;
import com.helpshift.concurrency.HSThreadingService;
import com.helpshift.log.HSLogger;
import com.helpshift.poller.FetchNotificationUpdate;
import com.helpshift.storage.HSPersistentStorage;
import com.helpshift.user.UserManager;
import com.mbridge.msdk.newreward.function.common.MBridgeCommon;
import java.util.HashMap;
/* loaded from: classes3.dex */
public class RequestUnreadMessageCountHandler {
public final HSEventProxy eventProxy;
public final FetchNotificationUpdate fetchNotificationUpdate;
public final HSPersistentStorage persistentStorage;
public final HSThreadingService threadingService;
public final UserManager userManager;
public RequestUnreadMessageCountHandler(HSPersistentStorage hSPersistentStorage, FetchNotificationUpdate fetchNotificationUpdate, UserManager userManager, HSEventProxy hSEventProxy, HSThreadingService hSThreadingService) {
this.persistentStorage = hSPersistentStorage;
this.fetchNotificationUpdate = fetchNotificationUpdate;
this.userManager = userManager;
this.eventProxy = hSEventProxy;
this.threadingService = hSThreadingService;
}
public void handleLocalCacheRequest() {
HSLogger.d("rqUnrdCntHdlr", "Serving count from local cache.");
HashMap hashMap = new HashMap();
hashMap.put("count", Integer.valueOf(Math.max(this.userManager.getUnreadNotificationCount(), this.userManager.getPushUnreadNotificationCount())));
hashMap.put("fromCache", Boolean.TRUE);
this.eventProxy.sendEvent("receivedUnreadMessageCount", hashMap);
}
public void handleRemoteRequest() {
long currentTimeMillis = System.currentTimeMillis();
long lastRequestUnreadCountApiAccess = this.persistentStorage.getLastRequestUnreadCountApiAccess();
int i = this.userManager.shouldPoll() ? MBridgeCommon.DEFAULT_LOAD_TIMEOUT : 300000;
if (lastRequestUnreadCountApiAccess != 0 && currentTimeMillis - lastRequestUnreadCountApiAccess < i) {
handleLocalCacheRequest();
return;
}
this.persistentStorage.setLastRequestUnreadCountApiAccess(currentTimeMillis);
HSLogger.d("rqUnrdCntHdlr", "Fetching unread count from remote.");
this.threadingService.getNetworkService().submit(new Runnable() { // from class: com.helpshift.notification.RequestUnreadMessageCountHandler.1
@Override // java.lang.Runnable
public void run() {
try {
int execute = RequestUnreadMessageCountHandler.this.fetchNotificationUpdate.execute();
boolean z = false;
if (execute >= 200 && execute < 300) {
z = true;
}
HashMap hashMap = new HashMap();
hashMap.put("count", Integer.valueOf(RequestUnreadMessageCountHandler.this.userManager.getUnreadNotificationCount()));
hashMap.put("fromCache", Boolean.valueOf(!z));
RequestUnreadMessageCountHandler.this.eventProxy.sendEvent("receivedUnreadMessageCount", hashMap);
} catch (Exception e) {
HSLogger.e("rqUnrdCntHdlr", "Error in fetching unread count from remote", e);
}
}
});
}
}

View File

@@ -0,0 +1,42 @@
package com.helpshift.platform;
import com.helpshift.util.ValuePair;
/* loaded from: classes3.dex */
public interface Device {
String encodeBase64(String str);
String getAppIdentifier();
String getAppName();
String getAppVersion();
String getBatteryLevel();
String getBatteryStatus();
String getCarrierName();
String getCountryCode();
String getDeviceId();
String getDeviceModel();
ValuePair getDiskSpace();
String getLanguage();
String getNetworkType();
String getOSVersion();
String getOsType();
String getRom();
String getSDKVersion();
boolean isOnline();
}

View File

@@ -0,0 +1,31 @@
package com.helpshift.poller;
import com.helpshift.log.HSLogger;
import com.helpshift.user.UserManager;
/* loaded from: classes3.dex */
public class ConversationPoller {
public PollerController pollerController;
public UserManager userManager;
public ConversationPoller(PollerController pollerController, UserManager userManager) {
this.pollerController = pollerController;
this.userManager = userManager;
}
public synchronized void startPoller() {
boolean shouldPoll = this.userManager.shouldPoll();
boolean isPushTokenSynced = this.userManager.isPushTokenSynced();
if (shouldPoll && !isPushTokenSynced) {
HSLogger.d("ConvPolr", "Starting poller.");
this.pollerController.start();
return;
}
HSLogger.d("ConvPolr", "Not starting poller, shouldPoll: " + shouldPoll + ", push synced: " + isPushTokenSynced);
}
public synchronized void stopPoller() {
HSLogger.d("ConvPolr", "Stopping poller.");
this.pollerController.stop();
}
}

View File

@@ -0,0 +1,45 @@
package com.helpshift.poller;
/* loaded from: classes3.dex */
public class ExponentialBackoff {
public int baseInterval;
public int currentInterval;
public int maxInterval;
public int nextInterval(int i) {
if (i == 0) {
return this.currentInterval;
}
if ((i < 200 || i >= 400) && i < 500) {
this.currentInterval = -1;
} else {
int i2 = this.currentInterval;
int i3 = i2 * 2;
int i4 = this.maxInterval;
if (i3 <= i4) {
i4 = i2 * 2;
}
this.currentInterval = i4;
}
return this.currentInterval;
}
public void reconcileIntervals(int i, int i2) {
if (this.baseInterval == i && this.maxInterval == i2) {
return;
}
this.baseInterval = i;
this.maxInterval = i2;
this.currentInterval = i;
}
public void reset() {
this.currentInterval = this.baseInterval;
}
public ExponentialBackoff(int i, int i2) {
this.baseInterval = i;
this.maxInterval = i2;
this.currentInterval = i;
}
}

View File

@@ -0,0 +1,95 @@
package com.helpshift.poller;
import com.helpshift.chat.HSEventProxy;
import com.helpshift.log.HSLogger;
import com.helpshift.network.AuthenticationFailureNetwork;
import com.helpshift.network.GETNetwork;
import com.helpshift.network.HSRequestData;
import com.helpshift.network.HSResponse;
import com.helpshift.network.HTTPTransport;
import com.helpshift.network.exception.HSRootApiException;
import com.helpshift.network.exception.NetworkException;
import com.helpshift.notification.CoreNotificationManager;
import com.helpshift.platform.Device;
import com.helpshift.storage.HSGenericDataManager;
import com.helpshift.storage.HSPersistentStorage;
import com.helpshift.user.UserManager;
import com.helpshift.util.Utils;
import com.mbridge.msdk.newreward.function.common.MBridgeCommon;
import java.util.Map;
import org.json.JSONException;
import org.json.JSONObject;
/* loaded from: classes3.dex */
public class FetchNotificationUpdate {
public Device device;
public HSGenericDataManager genericDataManager;
public HSEventProxy hsEventProxy;
public HTTPTransport httpTransport;
public CoreNotificationManager notificationManager;
public HSPersistentStorage persistentStorage;
public UserManager userManager;
public FetchNotificationUpdate(Device device, HSPersistentStorage hSPersistentStorage, HSGenericDataManager hSGenericDataManager, UserManager userManager, CoreNotificationManager coreNotificationManager, HTTPTransport hTTPTransport, HSEventProxy hSEventProxy) {
this.device = device;
this.persistentStorage = hSPersistentStorage;
this.genericDataManager = hSGenericDataManager;
this.userManager = userManager;
this.notificationManager = coreNotificationManager;
this.httpTransport = hTTPTransport;
this.hsEventProxy = hSEventProxy;
}
public int execute() {
HSLogger.d("ftchNotif", "Fetching notification count from network.");
Map networkHeaders = this.genericDataManager.getNetworkHeaders();
String pollingRoute = this.genericDataManager.getPollingRoute();
Map activeUserDataForNetworkCall = this.userManager.getActiveUserDataForNetworkCall();
if (Utils.isEmpty(activeUserDataForNetworkCall) || Utils.isEmpty(networkHeaders) || Utils.isEmpty(pollingRoute)) {
HSLogger.d("ftchNotif", "Skipping notification count fetch. Invalid params for network call.");
return -1;
}
long pollerCursor = this.userManager.getPollerCursor();
if (pollerCursor != 0) {
activeUserDataForNetworkCall.put("cursor", String.valueOf(pollerCursor));
}
activeUserDataForNetworkCall.put("did", this.device.getDeviceId());
activeUserDataForNetworkCall.put("platform-id", this.persistentStorage.getPlatformId());
try {
HSResponse makeRequest = new AuthenticationFailureNetwork(new GETNetwork(this.httpTransport, pollingRoute)).makeRequest(new HSRequestData(networkHeaders, activeUserDataForNetworkCall));
JSONObject jSONObject = new JSONObject(makeRequest.getResponseString());
int optInt = jSONObject.optInt("uc", 0);
int optInt2 = jSONObject.optInt("bpi", 5000);
int optInt3 = jSONObject.optInt("mpi", MBridgeCommon.DEFAULT_LOAD_TIMEOUT);
boolean optBoolean = jSONObject.optBoolean("cp", false);
long optLong = jSONObject.optLong("c", 0L);
this.userManager.setPollingBaseInterval(optInt2);
this.userManager.setPollingMaxInterval(optInt3);
this.userManager.setShouldPollFlag(optBoolean);
if (optInt > 0) {
int unreadNotificationCount = this.userManager.getUnreadNotificationCount() + optInt;
this.userManager.updateUnreadCountBy(optInt);
if (!this.userManager.isPushTokenSynced()) {
this.notificationManager.showNotification(this.genericDataManager.getNotificationStringForCount(unreadNotificationCount), false);
}
}
this.userManager.setPollerCursor(optLong);
return makeRequest.getStatus();
} catch (HSRootApiException e) {
HSRootApiException.ExceptionType exceptionType = e.exceptionType;
if (exceptionType == NetworkException.INVALID_AUTH_TOKEN) {
this.hsEventProxy.sendAuthFailureEvent("invalid user auth token");
} else if (exceptionType == NetworkException.AUTH_TOKEN_NOT_PROVIDED) {
this.hsEventProxy.sendAuthFailureEvent("missing user auth token");
}
HSLogger.e("ftchNotif", "HSRootApiException in poller request", e);
return -1;
} catch (JSONException e2) {
HSLogger.e("ftchNotif", "Error parsing poller response", e2);
return -1;
} catch (Exception e3) {
HSLogger.e("ftchNotif", "Error in poller request", e3);
return -1;
}
}
}

View File

@@ -0,0 +1,68 @@
package com.helpshift.poller;
import com.helpshift.log.HSLogger;
import com.helpshift.user.UserManager;
import com.helpshift.util.SafeWrappedRunnable;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
/* loaded from: classes3.dex */
public class PollerController {
public ExponentialBackoff exponentialBackoff;
public boolean isRunning;
public FetchNotificationUpdate pollFunction;
public ScheduledThreadPoolExecutor scheduledThreadPoolExecutor;
public boolean shouldStop;
public UserManager userManager;
public PollerController(FetchNotificationUpdate fetchNotificationUpdate, UserManager userManager, ExponentialBackoff exponentialBackoff, ScheduledThreadPoolExecutor scheduledThreadPoolExecutor) {
this.pollFunction = fetchNotificationUpdate;
this.userManager = userManager;
this.exponentialBackoff = exponentialBackoff;
this.scheduledThreadPoolExecutor = scheduledThreadPoolExecutor;
}
public void start() {
this.shouldStop = false;
if (this.isRunning) {
return;
}
scheduleNextPoll(0);
this.isRunning = true;
}
public void stop() {
this.shouldStop = true;
this.isRunning = false;
this.exponentialBackoff.reset();
try {
this.scheduledThreadPoolExecutor.getQueue().clear();
} catch (Exception e) {
HSLogger.e("PolerCntlr", "Error in clearing the polling queue.", e);
}
}
public final void scheduleNextPoll(int i) {
if (this.shouldStop || !this.userManager.shouldPoll() || i == -1) {
HSLogger.d("PolerCntlr", "Stopping poller, shouldPoll is false or STOP_POLLING received.");
return;
}
this.exponentialBackoff.reconcileIntervals(this.userManager.getPollingBaseInterval(), this.userManager.getPollingMaxInterval());
int nextInterval = this.exponentialBackoff.nextInterval(i);
if (nextInterval == -1) {
HSLogger.d("PolerCntlr", "Stopping poller, request failed");
return;
}
HSLogger.d("PolerCntlr", "Scheduling next poll with interval: " + nextInterval);
try {
this.scheduledThreadPoolExecutor.schedule(new SafeWrappedRunnable(new Runnable() { // from class: com.helpshift.poller.PollerController.1
@Override // java.lang.Runnable
public void run() {
PollerController.this.scheduleNextPoll(PollerController.this.pollFunction.execute());
}
}), nextInterval, TimeUnit.MILLISECONDS);
} catch (Exception e) {
HSLogger.e("PolerCntlr", "Error in scheduling next poll", e);
}
}
}

View File

@@ -0,0 +1,129 @@
package com.helpshift.storage;
import com.helpshift.log.HSLogger;
import com.helpshift.util.Utils;
import java.util.Map;
import org.json.JSONException;
import org.json.JSONObject;
/* loaded from: classes3.dex */
public class HSGenericDataManager {
public HSPersistentStorage persistentStorage;
public HSGenericDataManager(HSPersistentStorage hSPersistentStorage) {
this.persistentStorage = hSPersistentStorage;
}
public void saveGenericSdkData(String str) {
if (Utils.isEmpty(str) || !Utils.isValidJsonString(str)) {
return;
}
try {
JSONObject jSONObject = new JSONObject(str);
savePollingRoute(extractString("polling_route", jSONObject));
savePushTokenRoute(extractString("push_token_sync_route", jSONObject));
saveNetworkHeaders(extractJsonObject("network_headers", jSONObject));
saveNotificationContent(extractJsonObject("notification_content", jSONObject));
saveUserDataKeyMapping(extractJsonObject("user_data_key_mapping", jSONObject));
} catch (Exception e) {
HSLogger.e("genricDataMngr", "Unable to parse the generic sdk data", e);
}
}
public final void saveUserDataKeyMapping(JSONObject jSONObject) {
if (jSONObject != null) {
this.persistentStorage.storeUserDataKeyMapping(jSONObject.toString());
}
}
public final void saveNotificationContent(JSONObject jSONObject) {
if (jSONObject != null) {
this.persistentStorage.storeNotificationContent(jSONObject.toString());
}
}
public final void saveNetworkHeaders(JSONObject jSONObject) {
if (jSONObject != null) {
this.persistentStorage.storeNetworkHeaders(jSONObject.toString());
}
}
public final void savePushTokenRoute(String str) {
if (Utils.isNotEmpty(str)) {
this.persistentStorage.storePushTokenRoute(str);
}
}
public final void savePollingRoute(String str) {
if (Utils.isNotEmpty(str)) {
this.persistentStorage.storePollingRoute(str);
}
}
public final String extractString(String str, JSONObject jSONObject) {
try {
return jSONObject.getString(str);
} catch (JSONException e) {
HSLogger.e("genricDataMngr", "Error in reading the json value for key " + str, e);
return "";
}
}
public final JSONObject extractJsonObject(String str, JSONObject jSONObject) {
try {
return jSONObject.getJSONObject(str);
} catch (JSONException e) {
HSLogger.e("genricDataMngr", "Error in reading the json value for key " + str, e);
return null;
}
}
public Map getNetworkHeaders() {
return Utils.jsonStringToStringMap(this.persistentStorage.getNetworkHeaders());
}
public String getPollingRoute() {
return this.persistentStorage.getPollingRoute();
}
public String getPushTokenSyncRoute() {
return this.persistentStorage.getPushTokenSyncRoute();
}
public Map getUserDataKeyMapping() {
return Utils.jsonStringToStringMap(this.persistentStorage.getUserDataKeyMapping());
}
public String getNotificationStringForCount(int i) {
if (i > 1) {
return getNotificationString(i, "plural_message");
}
return getNotificationString(i, "single_message");
}
public final String getNotificationString(int i, String str) {
JSONObject notificationContent = getNotificationContent();
if (notificationContent == null) {
return "You have new messages";
}
try {
return notificationContent.getString(str).replace(notificationContent.getString("placeholder"), String.valueOf(i));
} catch (Exception e) {
HSLogger.e("genricDataMngr", "Error in constructing unread count string", e);
return "You have new messages";
}
}
public final JSONObject getNotificationContent() {
String notificationContent = this.persistentStorage.getNotificationContent();
if (Utils.isEmpty(notificationContent)) {
return null;
}
try {
return new JSONObject(notificationContent);
} catch (Exception e) {
HSLogger.e("genricDataMngr", "Error in reading unread count notification content", e);
return null;
}
}
}

View File

@@ -0,0 +1,337 @@
package com.helpshift.storage;
import com.helpshift.log.HSLogger;
import com.helpshift.util.Utils;
import org.json.JSONArray;
/* loaded from: classes3.dex */
public class HSPersistentStorage {
public ISharedPreferencesStore preferences;
public HSPersistentStorage(ISharedPreferencesStore iSharedPreferencesStore) {
this.preferences = iSharedPreferencesStore;
}
public void setDomain(String str) {
putString("domain", str);
}
public String getDomain() {
return getString("domain");
}
public void setHost(String str) {
putString("host", str);
}
public String getHost() {
return getString("host");
}
public void setPlatformId(String str) {
putString("platform_id", str);
}
public String getPlatformId() {
return getString("platform_id");
}
public void setCIFs(String str) {
putString("custom_issue_fields", str);
}
public String getCIF() {
return getString("custom_issue_fields");
}
public void setActiveUser(String str) {
putString("active_user", str);
}
public String getActiveUser() {
return getString("active_user");
}
public void removeActiveUser() {
this.preferences.remove("active_user");
}
public void setConfig(String str) {
putString("config", str);
}
public String getConfig() {
return getString("config");
}
public String getLocalProactiveConfig() {
return getString("localProactiveConfig");
}
public void setLanguage(String str) {
putString("language", str);
}
public String getLanguage() {
return getString("language");
}
public void saveLocalStorageData(String str) {
putString("local_storage_data", str);
}
public String getLocalStorageData() {
return getString("local_storage_data");
}
public void saveAdditionalHelpcenterData(String str) {
putString("additional_hc_data", str);
}
public String getAdditionalHelpcenterData() {
return getString("additional_hc_data");
}
public void setCurrentPushToken(String str) {
putString("current_push_token", str);
}
public String getCurrentPushToken() {
return getString("current_push_token");
}
public boolean isClearAnonymousUser() {
return getBoolean("clear_anonymous_user");
}
public int getNotificationSoundId() {
return getInt("notificationSoundId");
}
public String getNotificationChannelId() {
return getString("notificationChannelId");
}
public int getNotificationIcon() {
return getInt("notificationIcon");
}
public int getNotificationLargeIcon() {
return getInt("notificationLargeIcon");
}
public void setNotificationSoundId(int i) {
putInt("notificationSoundId", i);
}
public void setNotificationChannelId(String str) {
putString("notificationChannelId", str);
}
public void setNotificationIcon(int i) {
putInt("notificationIcon", i);
}
public void setNotificationLargeIcon(int i) {
putInt("notificationLargeIcon", i);
}
public void setEnableInAppNotification(boolean z) {
putBoolean("enable_inapp_notificaiton", z);
}
public boolean getEnableInAppNotification() {
return getBoolean("enable_inapp_notificaiton");
}
public void setRequestedScreenOrientation(int i) {
putInt("screenOrientation", i);
}
public int getRequestedScreenOrientation() {
return getInt("screenOrientation");
}
public void setWebchatUiConfigData(String str) {
putString("ui_config_data", str);
}
public String getWebchatUiConfigData() {
return getString("ui_config_data");
}
public void setHelpcenterUiConfigData(String str) {
putString("helpcenter_ui_config_data", str);
}
public String getHelpcenterUiConfigData() {
return getString("helpcenter_ui_config_data");
}
public String getHsDeviceId() {
return getString("hs_did");
}
public void setHsDeviceId(String str) {
putString("hs_did", str);
}
public long getLastSuccessfulAppLaunchEventSyncTime() {
return getLong("app_launch_last_sync_timestamp");
}
public void setLastAppLaunchEventSyncTime(long j) {
putLong("app_launch_last_sync_timestamp", j);
}
public String getAppLaunchEvents() {
return getString("app_launch_events");
}
public void storeAppLaunchEvents(String str) {
putString("app_launch_events", str);
}
public void clearAppLaunchEvents() {
this.preferences.remove("app_launch_events");
}
public void storeUserDataKeyMapping(String str) {
putString("user_data_key_mapping", str);
}
public void storeNotificationContent(String str) {
putString("notification_content", str);
}
public void storeNetworkHeaders(String str) {
putString("network_headers", str);
}
public void storePushTokenRoute(String str) {
putString("push_token_sync_route", str);
}
public void storePollingRoute(String str) {
putString("polling_route", str);
}
public void storeAnonymousUserIdMap(String str) {
putString("anon_user_id_map", str);
}
public String getAnonymousUserIdMap() {
return getString("anon_user_id_map");
}
public void removeAnonymousUserIdMap() {
this.preferences.remove("anon_user_id_map");
}
public String getNetworkHeaders() {
return getString("network_headers");
}
public String getPollingRoute() {
return getString("polling_route");
}
public String getPushTokenSyncRoute() {
return getString("push_token_sync_route");
}
public String getNotificationContent() {
return getString("notification_content");
}
public String getUserDataKeyMapping() {
return getString("user_data_key_mapping");
}
public void setFailedAnalyticsEvents(JSONArray jSONArray) {
if (jSONArray == null) {
jSONArray = new JSONArray();
}
putString("failed_analytics_events", jSONArray.toString());
}
public void setLastRequestUnreadCountApiAccess(long j) {
putLong("last_unread_count_api_access", j);
}
public long getLastRequestUnreadCountApiAccess() {
return getLong("last_unread_count_api_access");
}
public JSONArray getFailedAnalyticsEvents() {
try {
String string = getString("failed_analytics_events");
if (Utils.isEmpty(string)) {
return new JSONArray();
}
return new JSONArray(string);
} catch (Exception e) {
HSLogger.e("hsPerStore", "Error getting failed events", e);
return new JSONArray();
}
}
public void setBreadCrumbs(String str) {
if (Utils.isEmpty(str)) {
str = new JSONArray().toString();
}
putString("breadcrumbs", str);
}
public JSONArray getBreadCrumbs() {
try {
String string = getString("breadcrumbs");
if (!Utils.isEmpty(string)) {
return new JSONArray(string);
}
} catch (Exception e) {
HSLogger.e("hsPerStore", "Error Getting BreadCrumbs", e);
}
return new JSONArray();
}
public void setLastHCCacheEvictedTime(long j) {
putLong("last_helpcenter_cache_eviction_time", j);
}
public long getLastHCCacheEvictedTime() {
return getLong("last_helpcenter_cache_eviction_time");
}
public final void putLong(String str, long j) {
this.preferences.putLong(str, j);
}
public final long getLong(String str) {
return this.preferences.getLong(str);
}
public final void putInt(String str, int i) {
this.preferences.putInt(str, i);
}
public final int getInt(String str) {
return this.preferences.getInt(str);
}
public final void putBoolean(String str, boolean z) {
this.preferences.putBoolean(str, z);
}
public final boolean getBoolean(String str) {
return this.preferences.getBoolean(str);
}
public void putString(String str, String str2) {
this.preferences.putString(str, str2);
}
public String getString(String str) {
return this.preferences.getString(str);
}
}

View File

@@ -0,0 +1,24 @@
package com.helpshift.storage;
/* loaded from: classes3.dex */
public interface ISharedPreferencesStore {
void clear();
boolean getBoolean(String str);
int getInt(String str);
long getLong(String str);
String getString(String str);
void putBoolean(String str, boolean z);
void putInt(String str, int i);
void putLong(String str, long j);
void putString(String str, String str2);
void remove(String str);
}

Some files were not shown because too many files have changed in this diff Show More