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

Commit c2a8de54 authored by David Brazdil's avatar David Brazdil
Browse files

Remove non-SDK API toast

It served its purpose but it's time to remove it.

Test: m
Change-Id: Idc36cacae89e74f5ce01bcf51dce24cdedfda40f
parent dffb7d98
Loading
Loading
Loading
Loading
+0 −27
Original line number Diff line number Diff line
@@ -131,8 +131,6 @@ import com.android.internal.app.ToolbarActionBar;
import com.android.internal.app.WindowDecorActionBar;
import com.android.internal.policy.PhoneWindow;

import dalvik.system.VMRuntime;

import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.lang.annotation.Retention;
@@ -7235,31 +7233,6 @@ public class Activity extends ContextThemeWrapper
            }
        }

        // This property is set for all non-user builds except final release
        boolean isApiWarningEnabled = SystemProperties.getInt("ro.art.hiddenapi.warning", 0) == 1;

        if (isAppDebuggable || isApiWarningEnabled) {
            if (!mMainThread.mHiddenApiWarningShown && VMRuntime.getRuntime().hasUsedHiddenApi()) {
                // Only show the warning once per process.
                mMainThread.mHiddenApiWarningShown = true;

                String appName = getApplicationInfo().loadLabel(getPackageManager())
                        .toString();
                String warning = "Detected problems with API compatibility\n"
                                 + "(visit g.co/dev/appcompat for more info)";
                if (isAppDebuggable) {
                    new AlertDialog.Builder(this)
                        .setTitle(appName)
                        .setMessage(warning)
                        .setPositiveButton(android.R.string.ok, null)
                        .setCancelable(false)
                        .show();
                } else {
                    Toast.makeText(this, appName + "\n" + warning, Toast.LENGTH_LONG).show();
                }
            }
        }

        mActivityTransitionState.enterReady(this);
    }