use of android.os.PersistableBundle in project android_packages_apps_Settings by DirtyUnicorns.
the class SimStatus method updatePreference.
private void updatePreference() {
if (mPhone.getPhoneType() != TelephonyManager.PHONE_TYPE_CDMA) {
mShowLatestAreaInfo = Resources.getSystem().getBoolean(com.android.internal.R.bool.config_showAreaUpdateInfoSettings);
}
PersistableBundle carrierConfig = mCarrierConfigManager.getConfigForSubId(mSir.getSubscriptionId());
mShowICCID = carrierConfig.getBoolean(CarrierConfigManager.KEY_SHOW_ICCID_IN_SIM_STATUS_BOOL);
// If formattedNumber is null or empty, it'll display as "Unknown".
setSummaryText(KEY_PHONE_NUMBER, DeviceInfoUtils.getFormattedPhoneNumber(getContext(), mSir));
setSummaryText(KEY_IMEI, mPhone.getImei());
setSummaryText(KEY_IMEI_SV, mPhone.getDeviceSvn());
if (!mShowICCID) {
removePreferenceFromScreen(KEY_ICCID);
} else {
// Get ICCID, which is SIM serial number
String iccid = mTelephonyManager.getSimSerialNumber(mSir.getSubscriptionId());
setSummaryText(KEY_ICCID, iccid);
}
if (!mShowLatestAreaInfo) {
removePreferenceFromScreen(KEY_LATEST_AREA_INFO);
}
}
use of android.os.PersistableBundle in project android_packages_apps_Settings by DirtyUnicorns.
the class RestrictedDashboardFragment method ensurePin.
private void ensurePin() {
if (!mChallengeSucceeded && !mChallengeRequested && mRestrictionsManager.hasRestrictionsProvider()) {
Intent intent = mRestrictionsManager.createLocalApprovalIntent();
if (intent != null) {
mChallengeRequested = true;
mChallengeSucceeded = false;
PersistableBundle request = new PersistableBundle();
request.putString(RestrictionsManager.REQUEST_KEY_MESSAGE, getResources().getString(R.string.restr_pin_enter_admin_pin));
intent.putExtra(RestrictionsManager.EXTRA_REQUEST_BUNDLE, request);
startActivityForResult(intent, REQUEST_PIN_CHALLENGE);
}
}
}
use of android.os.PersistableBundle in project android_packages_apps_Settings by DirtyUnicorns.
the class WifiCallingSettings method getCarrierActivityIntent.
/*
* Get the Intent to launch carrier emergency address management activity.
* Return null when no activity found.
*/
private static Intent getCarrierActivityIntent(Context context) {
// Retrive component name from carrirt config
CarrierConfigManager configManager = context.getSystemService(CarrierConfigManager.class);
if (configManager == null)
return null;
PersistableBundle bundle = configManager.getConfig();
if (bundle == null)
return null;
String carrierApp = bundle.getString(CarrierConfigManager.KEY_WFC_EMERGENCY_ADDRESS_CARRIER_APP_STRING);
if (TextUtils.isEmpty(carrierApp))
return null;
ComponentName componentName = ComponentName.unflattenFromString(carrierApp);
if (componentName == null)
return null;
// Build and return intent
Intent intent = new Intent();
intent.setComponent(componentName);
return intent;
}
use of android.os.PersistableBundle in project MiMangaNu by raulhaag.
the class MainActivity method onSaveInstanceState.
@Override
public void onSaveInstanceState(Bundle outState, PersistableBundle outPersistentState) {
Bundle bundle = new Bundle();
super.onSaveInstanceState(bundle, outPersistentState);
}
use of android.os.PersistableBundle in project platform_packages_apps_Settings by BlissRoms.
the class SimStatus method updatePreference.
private void updatePreference() {
if (mPhone.getPhoneType() != TelephonyManager.PHONE_TYPE_CDMA) {
mShowLatestAreaInfo = Resources.getSystem().getBoolean(com.android.internal.R.bool.config_showAreaUpdateInfoSettings);
}
PersistableBundle carrierConfig = mCarrierConfigManager.getConfigForSubId(mSir.getSubscriptionId());
mShowICCID = carrierConfig.getBoolean(CarrierConfigManager.KEY_SHOW_ICCID_IN_SIM_STATUS_BOOL);
// If formattedNumber is null or empty, it'll display as "Unknown".
setSummaryText(KEY_PHONE_NUMBER, DeviceInfoUtils.getFormattedPhoneNumber(getContext(), mSir));
setSummaryText(KEY_IMEI, mPhone.getImei());
setSummaryText(KEY_IMEI_SV, mPhone.getDeviceSvn());
if (!mShowICCID) {
removePreferenceFromScreen(KEY_ICCID);
} else {
// Get ICCID, which is SIM serial number
String iccid = mTelephonyManager.getSimSerialNumber(mSir.getSubscriptionId());
setSummaryText(KEY_ICCID, iccid);
}
if (!mShowLatestAreaInfo) {
removePreferenceFromScreen(KEY_LATEST_AREA_INFO);
}
}
Aggregations