Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7ed32bf4 authored by Makoto Onuki's avatar Makoto Onuki Committed by Automerger Merge Worker
Browse files

Merge "Remove STOPSHIP" into tm-dev am: e1851000

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17890142



Change-Id: I6c0692041279cf62475cdd0fab75d7ce50c71c19
Ignore-AOSP-First: this is an automerge
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 87f7c3e8 e1851000
Loading
Loading
Loading
Loading
+0 −28
Original line number Diff line number Diff line
@@ -30,11 +30,9 @@ import android.content.res.Configuration;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.util.Slog;
import android.view.autofill.AutofillManager;

import java.util.ArrayList;
import java.util.concurrent.atomic.AtomicReference;

/**
 * Base class for maintaining global application state. You can provide your own
@@ -56,9 +54,6 @@ import java.util.concurrent.atomic.AtomicReference;
public class Application extends ContextWrapper implements ComponentCallbacks2 {
    private static final String TAG = "Application";

    /** Whether to enable the check to detect "duplicate application instances". */
    private static final boolean DEBUG_DUP_APP_INSTANCES = true;

    @UnsupportedAppUsage
    private ArrayList<ActivityLifecycleCallbacks> mActivityLifecycleCallbacks =
            new ArrayList<ActivityLifecycleCallbacks>();
@@ -72,9 +67,6 @@ public class Application extends ContextWrapper implements ComponentCallbacks2 {
    @UnsupportedAppUsage
    public LoadedApk mLoadedApk;

    private static final AtomicReference<StackTrace> sConstructorStackTrace =
            new AtomicReference<>();

    public interface ActivityLifecycleCallbacks {

        /**
@@ -240,26 +232,6 @@ public class Application extends ContextWrapper implements ComponentCallbacks2 {

    public Application() {
        super(null);
        if (DEBUG_DUP_APP_INSTANCES) {
            checkDuplicateInstances();
        }
    }

    private void checkDuplicateInstances() {
        // STOPSHIP: Delete this check b/221248960
        // Only run this check for gms-core.
        if (!"com.google.android.gms".equals(ActivityThread.currentOpPackageName())) {
            return;
        }

        final StackTrace previousStackTrace = sConstructorStackTrace.getAndSet(
                new StackTrace("Previous stack trace"));
        if (previousStackTrace == null) {
            // This is the first call.
            return;
        }
        Slog.wtf(TAG, "Application ctor called twice for " + this.getClass(),
                new StackTrace("Current stack trace", previousStackTrace));
    }

    private String getLoadedApkInfo() {