- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
338 lines
8.4 KiB
Java
338 lines
8.4 KiB
Java
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);
|
|
}
|
|
}
|