private int getNotificationDefaults(PhoneAccountHandle accountHandle) { if (ContactsUtils.FLAG_N_FEATURE) { return TelephonyManagerCompat.isVoicemailVibrationEnabled(getTelephonyManager(), accountHandle) ? Notification.DEFAULT_VIBRATE : 0; } return Notification.DEFAULT_ALL; }
&& TelephonyManagerCompat.getPhoneCount(telephonyManager) <= 1) { Header callSettingsHeader = new Header(); Intent callSettingsIntent = new Intent(TelecomManager.ACTION_SHOW_CALL_SETTINGS); && (TelephonyManagerCompat.isTtyModeSupported(telephonyManager) || TelephonyManagerCompat.isHearingAidCompatibilitySupported(telephonyManager))) { Header accessibilitySettingsHeader = new Header(); Intent accessibilitySettingsIntent =
static boolean handleDeviceIdDisplay(Context context, String input) { TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); if (telephonyManager != null && input.equals(MMI_IMEI_DISPLAY)) { int labelResId = (telephonyManager.getPhoneType() == TelephonyManager.PHONE_TYPE_GSM) ? R.string.imei : R.string.meid; List<String> deviceIds = new ArrayList<String>(); if (TelephonyManagerCompat.getPhoneCount(telephonyManager) > 1 && CompatUtils.isMethodAvailable(TelephonyManagerCompat.TELEPHONY_MANAGER_CLASS, "getDeviceId", Integer.TYPE)) { for (int slot = 0; slot < telephonyManager.getPhoneCount(); slot++) { String deviceId = telephonyManager.getDeviceId(slot); if (!TextUtils.isEmpty(deviceId)) { deviceIds.add(deviceId); } } } else { deviceIds.add(telephonyManager.getDeviceId()); } AlertDialog alert = new AlertDialog.Builder(context) .setTitle(labelResId) .setItems(deviceIds.toArray(new String[deviceIds.size()]), null) .setPositiveButton(android.R.string.ok, null) .setCancelable(false) .show(); return true; } return false; }
TelephonyManagerCompat.getVoicemailRingtoneUri( getTelephonyManager(), accountHandle), getNotificationDefaults(accountHandle));