Commit 9a920de9 authored by twellington's avatar twellington Committed by Commit bot

Show AboutChromePreferences "updates no longer supported" warning

Display the "updates no longer supported" warning for devices
< JELLY_BEAN on the About Chrome settings page.

BUG=438861

Review URL: https://codereview.chromium.org/964873004

Cr-Commit-Position: refs/heads/master@{#318967}
parent 5b546a43
...@@ -6,6 +6,7 @@ package org.chromium.chrome.browser.preferences; ...@@ -6,6 +6,7 @@ package org.chromium.chrome.browser.preferences;
import android.content.pm.PackageInfo; import android.content.pm.PackageInfo;
import android.content.pm.PackageManager.NameNotFoundException; import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.preference.Preference; import android.preference.Preference;
import android.preference.PreferenceFragment; import android.preference.PreferenceFragment;
...@@ -16,7 +17,6 @@ import org.chromium.chrome.R; ...@@ -16,7 +17,6 @@ import org.chromium.chrome.R;
import org.chromium.chrome.browser.ChromeVersionInfo; import org.chromium.chrome.browser.ChromeVersionInfo;
import org.chromium.chrome.browser.preferences.PrefServiceBridge.AboutVersionStrings; import org.chromium.chrome.browser.preferences.PrefServiceBridge.AboutVersionStrings;
import org.chromium.chrome.browser.preferences.PrefServiceBridge.ProfilePathCallback; import org.chromium.chrome.browser.preferences.PrefServiceBridge.ProfilePathCallback;
import org.chromium.chrome.browser.util.FeatureUtilities;
import java.util.Calendar; import java.util.Calendar;
...@@ -40,7 +40,7 @@ public class AboutChromePreferences extends PreferenceFragment implements ...@@ -40,7 +40,7 @@ public class AboutChromePreferences extends PreferenceFragment implements
getActivity().setTitle(R.string.prefs_about_chrome); getActivity().setTitle(R.string.prefs_about_chrome);
addPreferencesFromResource(R.xml.about_chrome_preferences); addPreferencesFromResource(R.xml.about_chrome_preferences);
if (!FeatureUtilities.isApplicationUpdateSupported()) { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
ChromeBasePreference deprecationWarning = new ChromeBasePreference( ChromeBasePreference deprecationWarning = new ChromeBasePreference(
new ContextThemeWrapper(getActivity(), new ContextThemeWrapper(getActivity(),
R.style.DeprecationWarningPreferenceTheme)); R.style.DeprecationWarningPreferenceTheme));
......
...@@ -121,9 +121,5 @@ public class FeatureUtilities { ...@@ -121,9 +121,5 @@ public class FeatureUtilities {
nativeSetDocumentModeEnabled(enabled); nativeSetDocumentModeEnabled(enabled);
} }
public static boolean isApplicationUpdateSupported() {
return true;
}
private static native void nativeSetDocumentModeEnabled(boolean enabled); private static native void nativeSetDocumentModeEnabled(boolean enabled);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment