Loading res/values/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -92,4 +92,7 @@ <bool name="config_hotspot_need_show_activated_dialog">false</bool> <bool name="config_keep_hotspot_on_10mins_default">false</bool> <bool name="hotspot_show_alert_for_open_security">false</bool> <!--Config to enable/disable Wi-Fi Calling based on provisioning sms --> <bool name="config_provision_wificalling_pref">false</bool> </resources> src/com/android/settings/DeviceInfoSettings.java +29 −3 Original line number Diff line number Diff line Loading @@ -78,6 +78,7 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment implements In private static final String KEY_QGP_VERSION = "qgp_version"; private static final String PROPERTY_QGP_VERSION = "persist.qgp.version"; private static final String MBN_VERSION_PATH = "/persist/speccfg/mbnversion"; private static final String QGP_VERSION_PATH = "/persist/speccfg/qgpversion"; static final int TAPS_TO_BE_A_DEVELOPER = 7; Loading Loading @@ -126,10 +127,15 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment implements In setStringSummary(KEY_DEVICE_MODEL, Build.MODEL); setStringSummary(KEY_BUILD_NUMBER, Build.DISPLAY); findPreference(KEY_BUILD_NUMBER).setEnabled(true); setValueSummary(KEY_QGP_VERSION, PROPERTY_QGP_VERSION); //setValueSummary(KEY_QGP_VERSION, PROPERTY_QGP_VERSION); // Remove QGP Version if property is not present removePreferenceIfPropertyMissing(getPreferenceScreen(), KEY_QGP_VERSION, PROPERTY_QGP_VERSION); //removePreferenceIfPropertyMissing(getPreferenceScreen(), KEY_QGP_VERSION, // PROPERTY_QGP_VERSION); String mQGPVersion = getQGPVersionValue(); setStringSummary(KEY_QGP_VERSION, mQGPVersion); if(mQGPVersion == null){ getPreferenceScreen().removePreference(findPreference(KEY_QGP_VERSION)); } findPreference(KEY_KERNEL_VERSION).setSummary(DeviceInfoUtils.customizeFormatKernelVersion( getResources().getBoolean(R.bool.def_hide_kernel_version_name))); String mMbnVersion = getMBNVersionValue(); Loading Loading @@ -391,6 +397,26 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment implements In return mVersion; } private String getQGPVersionValue() { String mVersion = null; if (RegionalizationEnvironment.isSupported()) { mRegionalizationService = RegionalizationEnvironment.getRegionalizationService(); } if(mRegionalizationService != null){ try{ if(!mRegionalizationService.checkFileExists(QGP_VERSION_PATH)) return null; if(mRegionalizationService.readFile(QGP_VERSION_PATH, "").size() > 0){ mVersion = mRegionalizationService.readFile(QGP_VERSION_PATH, "").get(0); } Log.d(LOG_TAG,"read QGPVersion="+mVersion); }catch (Exception e) { Log.e(LOG_TAG, "IOException:"+ e.getMessage()); } } return mVersion; } private void setValueSummary(String preference, String property) { try { findPreference(preference).setSummary( Loading src/com/android/settings/HotspotPreference.java +17 −7 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ public class HotspotPreference extends Preference implements OnCheckedChangeList private TextView mSubSummary; private Context mContext; private boolean mSwitchEnabled; private CharSequence mSummary; public HotspotPreference(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); mContext = context; Loading @@ -67,12 +67,21 @@ public class HotspotPreference extends Preference implements OnCheckedChangeList @Override public void onBindViewHolder(PreferenceViewHolder view) { super.onBindViewHolder(view); if (mSubSummary == null) { mSubSummary = (TextView) view.findViewById(R.id.subsummary); if (mSummary != null && !mSummary.toString().isEmpty()) { mSubSummary.setVisibility(View.VISIBLE); } else { mSubSummary.setVisibility(View.GONE); } mSubSummary.setText(mSummary); } if (mSwitch == null) { mSwitch = (Switch) view.findViewById(R.id.switchWidget); mSwitch.setOnCheckedChangeListener(this); setChecked(mSwitchEnabled); } } public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { Loading @@ -81,6 +90,7 @@ public class HotspotPreference extends Preference implements OnCheckedChangeList } public void setSummary(CharSequence summary) { mSummary = summary; if (mSubSummary == null) { return; } Loading src/com/android/settings/WirelessSettings.java +12 −0 Original line number Diff line number Diff line Loading @@ -125,9 +125,11 @@ public class WirelessSettings extends SettingsPreferenceFragment implements Inde private UserManager mUm; boolean mIsNetworkSettingsAvailable = false; boolean mProvisioningVWiFiEnabled = false; private static final int MANAGE_MOBILE_PLAN_DIALOG_ID = 1; private static final String SAVED_MANAGE_MOBILE_PLAN_MSG = "mManageMobilePlanMessage"; private final String KEY = "persist.sys.provisioning"; private Preference mButtonWfc; private boolean mEnhancedWFCSettingsEnabled = false; Loading Loading @@ -430,6 +432,16 @@ public class WirelessSettings extends SettingsPreferenceFragment implements Inde }); } else { mButtonWfc = (PreferenceScreen) findPreference(KEY_WFC_SETTINGS); mProvisioningVWiFiEnabled = this.getResources(). getBoolean(R.bool.config_provision_wificalling_pref); if (mProvisioningVWiFiEnabled) { String value = SystemProperties.get(KEY,"false"); if (!Boolean.parseBoolean(value)) { final Context context = getActivity(); ImsManager.setWfcSetting(context, false); } mButtonWfc.setEnabled(Boolean.parseBoolean(value)); } removePreference(KEY_WFC_ENHANCED_SETTINGS); } Loading src/com/android/settings/fingerprint/FingerprintEnrollIntroduction.java +12 −1 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.hardware.fingerprint.FingerprintManager; import android.os.Bundle; import android.os.UserHandle; import android.os.UserManager; import android.provider.Settings.Global; import android.text.Annotation; import android.text.SpannableString; import android.text.SpannableStringBuilder; Loading Loading @@ -69,9 +70,15 @@ public class FingerprintEnrollIntroduction extends FingerprintEnrollBase final RecyclerItemAdapter adapter = (RecyclerItemAdapter) layout.getAdapter(); adapter.setOnItemSelectedListener(this); Item item = (Item) adapter.findItemById(R.id.fingerprint_introduction_message); String linkUrl = getString(R.string.help_url_fingerprint); if (Global.getInt(getContentResolver(), Global.DEVICE_PROVISIONED, 0) == 0) { // If the device is not provisioned, help intents from HelpUtils will be null, so don't // show the link at all. linkUrl = ""; } item.setTitle(LearnMoreSpan.linkify( getText(R.string.security_settings_fingerprint_enroll_introduction_message), getString(R.string.help_url_fingerprint))); linkUrl)); // setupwizard library automatically sets the divider inset to // R.dimen.suw_items_icon_divider_inset. We adjust this back to 0 as we do not want // an inset within settings. Loading Loading @@ -187,6 +194,10 @@ public class FingerprintEnrollIntroduction extends FingerprintEnrollBase public void onClick(View widget) { Context ctx = widget.getContext(); Intent intent = HelpUtils.getHelpIntent(ctx, getURL(), ctx.getClass().getName()); if (intent == null) { Log.w(LearnMoreSpan.TAG, "Null help intent."); return; } try { // This needs to be startActivityForResult even though we do not care about the // actual result because the help app needs to know about who invoked it. Loading Loading
res/values/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -92,4 +92,7 @@ <bool name="config_hotspot_need_show_activated_dialog">false</bool> <bool name="config_keep_hotspot_on_10mins_default">false</bool> <bool name="hotspot_show_alert_for_open_security">false</bool> <!--Config to enable/disable Wi-Fi Calling based on provisioning sms --> <bool name="config_provision_wificalling_pref">false</bool> </resources>
src/com/android/settings/DeviceInfoSettings.java +29 −3 Original line number Diff line number Diff line Loading @@ -78,6 +78,7 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment implements In private static final String KEY_QGP_VERSION = "qgp_version"; private static final String PROPERTY_QGP_VERSION = "persist.qgp.version"; private static final String MBN_VERSION_PATH = "/persist/speccfg/mbnversion"; private static final String QGP_VERSION_PATH = "/persist/speccfg/qgpversion"; static final int TAPS_TO_BE_A_DEVELOPER = 7; Loading Loading @@ -126,10 +127,15 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment implements In setStringSummary(KEY_DEVICE_MODEL, Build.MODEL); setStringSummary(KEY_BUILD_NUMBER, Build.DISPLAY); findPreference(KEY_BUILD_NUMBER).setEnabled(true); setValueSummary(KEY_QGP_VERSION, PROPERTY_QGP_VERSION); //setValueSummary(KEY_QGP_VERSION, PROPERTY_QGP_VERSION); // Remove QGP Version if property is not present removePreferenceIfPropertyMissing(getPreferenceScreen(), KEY_QGP_VERSION, PROPERTY_QGP_VERSION); //removePreferenceIfPropertyMissing(getPreferenceScreen(), KEY_QGP_VERSION, // PROPERTY_QGP_VERSION); String mQGPVersion = getQGPVersionValue(); setStringSummary(KEY_QGP_VERSION, mQGPVersion); if(mQGPVersion == null){ getPreferenceScreen().removePreference(findPreference(KEY_QGP_VERSION)); } findPreference(KEY_KERNEL_VERSION).setSummary(DeviceInfoUtils.customizeFormatKernelVersion( getResources().getBoolean(R.bool.def_hide_kernel_version_name))); String mMbnVersion = getMBNVersionValue(); Loading Loading @@ -391,6 +397,26 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment implements In return mVersion; } private String getQGPVersionValue() { String mVersion = null; if (RegionalizationEnvironment.isSupported()) { mRegionalizationService = RegionalizationEnvironment.getRegionalizationService(); } if(mRegionalizationService != null){ try{ if(!mRegionalizationService.checkFileExists(QGP_VERSION_PATH)) return null; if(mRegionalizationService.readFile(QGP_VERSION_PATH, "").size() > 0){ mVersion = mRegionalizationService.readFile(QGP_VERSION_PATH, "").get(0); } Log.d(LOG_TAG,"read QGPVersion="+mVersion); }catch (Exception e) { Log.e(LOG_TAG, "IOException:"+ e.getMessage()); } } return mVersion; } private void setValueSummary(String preference, String property) { try { findPreference(preference).setSummary( Loading
src/com/android/settings/HotspotPreference.java +17 −7 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ public class HotspotPreference extends Preference implements OnCheckedChangeList private TextView mSubSummary; private Context mContext; private boolean mSwitchEnabled; private CharSequence mSummary; public HotspotPreference(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); mContext = context; Loading @@ -67,12 +67,21 @@ public class HotspotPreference extends Preference implements OnCheckedChangeList @Override public void onBindViewHolder(PreferenceViewHolder view) { super.onBindViewHolder(view); if (mSubSummary == null) { mSubSummary = (TextView) view.findViewById(R.id.subsummary); if (mSummary != null && !mSummary.toString().isEmpty()) { mSubSummary.setVisibility(View.VISIBLE); } else { mSubSummary.setVisibility(View.GONE); } mSubSummary.setText(mSummary); } if (mSwitch == null) { mSwitch = (Switch) view.findViewById(R.id.switchWidget); mSwitch.setOnCheckedChangeListener(this); setChecked(mSwitchEnabled); } } public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { Loading @@ -81,6 +90,7 @@ public class HotspotPreference extends Preference implements OnCheckedChangeList } public void setSummary(CharSequence summary) { mSummary = summary; if (mSubSummary == null) { return; } Loading
src/com/android/settings/WirelessSettings.java +12 −0 Original line number Diff line number Diff line Loading @@ -125,9 +125,11 @@ public class WirelessSettings extends SettingsPreferenceFragment implements Inde private UserManager mUm; boolean mIsNetworkSettingsAvailable = false; boolean mProvisioningVWiFiEnabled = false; private static final int MANAGE_MOBILE_PLAN_DIALOG_ID = 1; private static final String SAVED_MANAGE_MOBILE_PLAN_MSG = "mManageMobilePlanMessage"; private final String KEY = "persist.sys.provisioning"; private Preference mButtonWfc; private boolean mEnhancedWFCSettingsEnabled = false; Loading Loading @@ -430,6 +432,16 @@ public class WirelessSettings extends SettingsPreferenceFragment implements Inde }); } else { mButtonWfc = (PreferenceScreen) findPreference(KEY_WFC_SETTINGS); mProvisioningVWiFiEnabled = this.getResources(). getBoolean(R.bool.config_provision_wificalling_pref); if (mProvisioningVWiFiEnabled) { String value = SystemProperties.get(KEY,"false"); if (!Boolean.parseBoolean(value)) { final Context context = getActivity(); ImsManager.setWfcSetting(context, false); } mButtonWfc.setEnabled(Boolean.parseBoolean(value)); } removePreference(KEY_WFC_ENHANCED_SETTINGS); } Loading
src/com/android/settings/fingerprint/FingerprintEnrollIntroduction.java +12 −1 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.hardware.fingerprint.FingerprintManager; import android.os.Bundle; import android.os.UserHandle; import android.os.UserManager; import android.provider.Settings.Global; import android.text.Annotation; import android.text.SpannableString; import android.text.SpannableStringBuilder; Loading Loading @@ -69,9 +70,15 @@ public class FingerprintEnrollIntroduction extends FingerprintEnrollBase final RecyclerItemAdapter adapter = (RecyclerItemAdapter) layout.getAdapter(); adapter.setOnItemSelectedListener(this); Item item = (Item) adapter.findItemById(R.id.fingerprint_introduction_message); String linkUrl = getString(R.string.help_url_fingerprint); if (Global.getInt(getContentResolver(), Global.DEVICE_PROVISIONED, 0) == 0) { // If the device is not provisioned, help intents from HelpUtils will be null, so don't // show the link at all. linkUrl = ""; } item.setTitle(LearnMoreSpan.linkify( getText(R.string.security_settings_fingerprint_enroll_introduction_message), getString(R.string.help_url_fingerprint))); linkUrl)); // setupwizard library automatically sets the divider inset to // R.dimen.suw_items_icon_divider_inset. We adjust this back to 0 as we do not want // an inset within settings. Loading Loading @@ -187,6 +194,10 @@ public class FingerprintEnrollIntroduction extends FingerprintEnrollBase public void onClick(View widget) { Context ctx = widget.getContext(); Intent intent = HelpUtils.getHelpIntent(ctx, getURL(), ctx.getClass().getName()); if (intent == null) { Log.w(LearnMoreSpan.TAG, "Null help intent."); return; } try { // This needs to be startActivityForResult even though we do not care about the // actual result because the help app needs to know about who invoked it. Loading