Merge "Show hidden API warning once per process"
am: 880839d2d1
Change-Id: I2da706085d0ee0cb047b6b5c516c8a91487b77eb
This commit is contained in:
@@ -7071,7 +7071,10 @@ public class Activity extends ContextThemeWrapper
|
||||
boolean isApiWarningEnabled = SystemProperties.getInt("ro.art.hiddenapi.warning", 0) == 1;
|
||||
|
||||
if (isAppDebuggable || isApiWarningEnabled) {
|
||||
if (VMRuntime.getRuntime().hasUsedHiddenApi()) {
|
||||
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 compatiblity\n"
|
||||
|
||||
@@ -266,6 +266,7 @@ public final class ActivityThread {
|
||||
boolean mJitEnabled = false;
|
||||
boolean mSomeActivitiesChanged = false;
|
||||
boolean mUpdatingSystemConfig = false;
|
||||
/* package */ boolean mHiddenApiWarningShown = false;
|
||||
|
||||
// These can be accessed by multiple threads; mResourcesManager is the lock.
|
||||
// XXX For now we keep around information about all packages we have
|
||||
|
||||
Reference in New Issue
Block a user