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,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");
}
}
}