Home
last modified time | relevance | path

Searched refs:CompatUtils (Results 1 – 25 of 85) sorted by relevance

1234

/packages/apps/Contacts/tests/src/com/android/contacts/compat/
DCompatUtilsTest.java26 assertFalse(CompatUtils.isClassAvailable(null)); in testIsClassAvailable_NullClassName()
30 assertFalse(CompatUtils.isClassAvailable("")); in testIsClassAvailable_EmptyClassName()
34 assertFalse(CompatUtils.isClassAvailable("com.android.contacts.common.NonexistentClass")); in testIsClassAvailable_NonexistentClass()
38 assertTrue(CompatUtils.isClassAvailable(BaseClass.class.getName())); in testIsClassAvailable()
42 assertFalse(CompatUtils.isMethodAvailable(null, "methodName")); in testIsMethodAvailable_NullClassName()
46 assertFalse(CompatUtils.isMethodAvailable("", "methodName")); in testIsMethodAvailable_EmptyClassName()
50 assertFalse(CompatUtils.isMethodAvailable("className", null)); in testIsMethodAvailable_NullMethodName()
54 assertFalse(CompatUtils.isMethodAvailable("className", "")); in testIsMethodAvailable_EmptyMethodName()
58 assertFalse(CompatUtils.isMethodAvailable("com.android.contacts.common.NonexistentClass", in testIsMethodAvailable_NonexistentClass()
63 assertFalse(CompatUtils.isMethodAvailable(BaseClass.class.getName(), "derivedMethod")); in testIsMethodAvailable_NonexistentMethod()
[all …]
/packages/apps/Dialer/java/com/android/contacts/common/compat/telecom/
DTelecomManagerCompat.java28 import com.android.dialer.compat.CompatUtils;
57 if (CompatUtils.isMarshmallowCompatible()) { in placeCall()
76 && (CompatUtils.isMarshmallowCompatible() in getAdnUriForPhoneAccount()
77 || CompatUtils.isMethodAvailable( in getAdnUriForPhoneAccount()
95 && (CompatUtils.isMarshmallowCompatible() in getCallCapablePhoneAccounts()
96 || CompatUtils.isMethodAvailable( in getCallCapablePhoneAccounts()
112 if (telecomManager != null && CompatUtils.isDefaultDialerCompatible()) { in getDefaultDialerPackage()
138 && (CompatUtils.isMarshmallowCompatible() in getDefaultOutgoingPhoneAccount()
139 || CompatUtils.isMethodAvailable( in getDefaultOutgoingPhoneAccount()
161 if (telecomManager != null && CompatUtils.isMarshmallowCompatible()) { in getLine1Number()
[all …]
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/compat/
DNotificationCompatUtils.java28 CompatUtils.getMethod(Notification.Builder.class, "setColor", int.class);
30 CompatUtils.getMethod(Notification.Builder.class, "setVisibility", int.class);
32 CompatUtils.getMethod(Notification.Builder.class, "setCategory", String.class);
34 CompatUtils.getMethod(Notification.Builder.class, "setPriority", int.class);
36 CompatUtils.getMethod(Notification.Builder.class, "build");
38 CompatUtils.getField(Notification.class, "VISIBILITY_SECRET");
40 : (Integer) CompatUtils.getFieldValue(null /* receiver */, null /* defaultValue */,
43 CompatUtils.getField(Notification.class, "CATEGORY_RECOMMENDATION");
45 : (String) CompatUtils.getFieldValue(null /* receiver */, null /* defaultValue */,
48 CompatUtils.getField(Notification.class, "PRIORITY_LOW");
[all …]
DCompatUtils.java27 public final class CompatUtils { class
28 private static final String TAG = CompatUtils.class.getSimpleName();
30 private CompatUtils() { in CompatUtils() method in CompatUtils
147 return new ToObjectMethodWrapper<>(CompatUtils.getMethod(mClass, name, parameterTypes), in getMethod()
153 return new ToIntMethodWrapper(CompatUtils.getMethod(mClass, name, parameterTypes), in getPrimitiveMethod()
159 return new ToFloatMethodWrapper(CompatUtils.getMethod(mClass, name, parameterTypes), in getPrimitiveMethod()
165 return new ToBooleanMethodWrapper(CompatUtils.getMethod(mClass, name, parameterTypes), in getPrimitiveMethod()
179 return (T) CompatUtils.invoke(receiver, mDefaultValue, mMethod, args); in invoke()
191 return (int) CompatUtils.invoke(receiver, mDefaultValue, mMethod, args); in invoke()
203 return (float) CompatUtils.invoke(receiver, mDefaultValue, mMethod, args); in invoke()
[all …]
DViewCompatUtils.java29 private static final Method METHOD_getPaddingEnd = CompatUtils.getMethod(
31 private static final Method METHOD_setPaddingRelative = CompatUtils.getMethod(
35 private static final Method METHOD_setTextAlignment = CompatUtils.getMethod(
46 return (Integer)CompatUtils.invoke(view, 0, METHOD_getPaddingEnd); in getPaddingEnd()
55 CompatUtils.invoke(view, null, METHOD_setPaddingRelative, start, top, end, bottom); in setPaddingRelative()
68 CompatUtils.invoke(view, null, METHOD_setTextAlignment, textAlignment); in setTextAlignment()
DInputMethodSubtypeCompatUtils.java40 CompatUtils.getConstructor(InputMethodSubtype.class,
53 private static final Method METHOD_isAsciiCapable = CompatUtils.getMethod(
70 return (InputMethodSubtype) CompatUtils.newInstance(CONSTRUCTOR_INPUT_METHOD_SUBTYPE, in newInputMethodSubtype()
86 CompatUtils.getMethod(InputMethodSubtype.class, "getLanguageTag");
91 final String languageTag = (String) CompatUtils.invoke(subtype, null, GET_LANGUAGE_TAG); in getLocaleObject()
101 return (Boolean)CompatUtils.invoke(subtype, false, METHOD_isAsciiCapable); in isAsciiCapableWithAPI()
DLocaleListCompatUtils.java23 private static final Class CLASS_LocaleList = CompatUtils.getClass("android.os.LocaleList");
25 CompatUtils.getMethod(CLASS_LocaleList, "get", int.class);
27 CompatUtils.getMethod(CLASS_LocaleList, "isEmpty");
34 return (Boolean) CompatUtils.invoke(localeList, Boolean.FALSE, METHOD_isEmpty); in isEmpty()
38 return (Locale) CompatUtils.invoke(localeList, null, METHOD_get, index); in get()
DInputMethodManagerCompatWrapper.java28 private static final Method METHOD_switchToNextInputMethod = CompatUtils.getMethod(
34 CompatUtils.getMethod(InputMethodManager.class,
44 return (Boolean)CompatUtils.invoke(mImm, false /* defaultValue */, in switchToNextInputMethod()
49 return (Boolean)CompatUtils.invoke(mImm, false /* defaultValue */, in shouldOfferSwitchingToNextInputMethod()
DTextInfoCompatUtils.java30 CompatUtils.getMethod(TextInfo.class, "getCharSequence");
32 CompatUtils.getConstructor(TextInfo.class, CharSequence.class, int.class, int.class,
45 return (TextInfo) CompatUtils.newInstance(TEXT_INFO_CONSTRUCTOR_FOR_CHAR_SEQUENCE, in newInstance()
64 return (CharSequence) CompatUtils.invoke(textInfo, defaultValue, in getCharSequenceOrString()
DEditorInfoCompatUtils.java27 private static final Field FIELD_IME_FLAG_FORCE_ASCII = CompatUtils.getField(
29 private static final Integer OBJ_IME_FLAG_FORCE_ASCII = (Integer) CompatUtils.getFieldValue(
31 private static final Field FIELD_HINT_LOCALES = CompatUtils.getField(
89 final Object localeList = CompatUtils.getFieldValue(editorInfo, null, FIELD_HINT_LOCALES); in getPrimaryHintLocale()
DLocaleSpanCompatUtils.java49 LOCALE_SPAN_CONSTRUCTOR = CompatUtils.getConstructor(LOCALE_SPAN_TYPE, Locale.class);
50 LOCALE_SPAN_GET_LOCALE = CompatUtils.getMethod(LOCALE_SPAN_TYPE, "getLocale");
60 return CompatUtils.newInstance(LOCALE_SPAN_CONSTRUCTOR, locale); in newLocaleSpan()
65 return (Locale) CompatUtils.invoke(localeSpan, null, LOCALE_SPAN_GET_LOCALE); in getLocaleFromLocaleSpan()
DInputConnectionCompatUtils.java23 private static final CompatUtils.ClassWrapper sInputConnectionType;
24 private static final CompatUtils.ToBooleanMethodWrapper sRequestCursorUpdatesMethod;
26 sInputConnectionType = new CompatUtils.ClassWrapper(InputConnection.class);
/packages/apps/Contacts/src/com/android/contacts/compat/
DTelephonyManagerCompat.java46 if (CompatUtils.isLollipopMr1Compatible() in isVoiceCapable()
47 || CompatUtils.isMethodAvailable(TELEPHONY_MANAGER_CLASS, "isVoiceCapable")) { in isVoiceCapable()
69 if (CompatUtils.isMarshmallowCompatible() || CompatUtils in getPhoneCount()
90 if (CompatUtils.isMarshmallowCompatible() in getDeviceId()
91 || CompatUtils.isMethodAvailable(TELEPHONY_MANAGER_CLASS, in getDeviceId()
109 if (CompatUtils.isMarshmallowCompatible() in isTtyModeSupported()
110 || CompatUtils.isMethodAvailable(TELEPHONY_MANAGER_CLASS, "isTtyModeSupported")) { in isTtyModeSupported()
128 if (CompatUtils.isMarshmallowCompatible() in isHearingAidCompatibilitySupported()
129 || CompatUtils.isMethodAvailable(TELEPHONY_MANAGER_CLASS, in isHearingAidCompatibilitySupported()
148 if (!CompatUtils.isNCompatible()) { in getVoicemailRingtoneUri()
[all …]
DPhoneNumberUtilsCompat.java42 if (CompatUtils.isLollipopCompatible()) { in normalizeNumber()
75 if (CompatUtils.isLollipopCompatible()) { in formatNumber()
84 if (CompatUtils.isMarshmallowCompatible()) { in createTtsSpannable()
92 if (CompatUtils.isMarshmallowCompatible()) { in createTtsSpan()
94 } else if (CompatUtils.isLollipopCompatible()) { in createTtsSpan()
117 if (CompatUtils.isMarshmallowCompatible()) { in addTtsSpan()
/packages/apps/Contacts/tests/src/com/android/contacts/model/
DRawContactDeltaTests.java30 import com.android.contacts.compat.CompatUtils;
152 : builderWrapper.getType() == CompatUtils.TYPE_DELETE; in testValuesDiffDelete()
190 assertTrue("Expected version enforcement", CompatUtils.isAssertQueryCompat(cpoWrapper)); in testEntityDiffNoneInsert()
195 assertTrue("Expected aggregation mode change", CompatUtils.isUpdateCompat(cpoWrapper)); in testEntityDiffNoneInsert()
201 assertTrue("Incorrect type", CompatUtils.isInsertCompat(cpoWrapper)); in testEntityDiffNoneInsert()
207 assertTrue("Expected aggregation mode change", CompatUtils.isUpdateCompat(cpoWrapper)); in testEntityDiffNoneInsert()
233 assertTrue("Expected version enforcement", CompatUtils.isAssertQueryCompat(cpoWrapper)); in testEntityDiffUpdateInsert()
238 assertTrue("Expected aggregation mode change", CompatUtils.isUpdateCompat(cpoWrapper)); in testEntityDiffUpdateInsert()
244 assertTrue("Incorrect type", CompatUtils.isUpdateCompat(cpoWrapper)); in testEntityDiffUpdateInsert()
250 assertTrue("Incorrect type", CompatUtils.isInsertCompat(cpoWrapper)); in testEntityDiffUpdateInsert()
[all …]
DRawContactModifierTests.java36 import com.android.contacts.compat.CompatUtils;
390 assertTrue("Expected aggregation mode change", CompatUtils.isUpdateCompat(cpoWrapper)); in testTrimEmptySingle()
396 assertTrue("Incorrect type", CompatUtils.isInsertCompat(cpoWrapper)); in testTrimEmptySingle()
402 assertTrue("Expected aggregation mode change", CompatUtils.isUpdateCompat(cpoWrapper)); in testTrimEmptySingle()
414 assertTrue("Incorrect type", CompatUtils.isDeleteCompat(cpoWrapper)); in testTrimEmptySingle()
525 assertTrue("Expected aggregation mode change", CompatUtils.isUpdateCompat(cpoWrapper)); in testTrimEmptyAfterUpdate()
531 assertTrue("Incorrect type", CompatUtils.isUpdateCompat(cpoWrapper)); in testTrimEmptyAfterUpdate()
537 assertTrue("Expected aggregation mode change", CompatUtils.isUpdateCompat(cpoWrapper)); in testTrimEmptyAfterUpdate()
549 assertTrue("Incorrect type", CompatUtils.isDeleteCompat(cpoWrapper)); in testTrimEmptyAfterUpdate()
572 assertTrue("Incorrect type", CompatUtils.isInsertCompat(cpoWrapper)); in testTrimInsertEmpty()
[all …]
DRawContactDeltaListTests.java32 import com.android.contacts.compat.CompatUtils;
196 if (CompatUtils.isDeleteCompat(expected)) continue; in assertDiffPattern()
215 if (CompatUtils.isAssertQueryCompat(cpoWrapper)) { in getTypeString()
217 } else if (CompatUtils.isInsertCompat(cpoWrapper)) { in getTypeString()
219 } else if (CompatUtils.isUpdateCompat(cpoWrapper)) { in getTypeString()
221 } else if (CompatUtils.isDeleteCompat(cpoWrapper)) { in getTypeString()
303 && CompatUtils.isUpdateCompat(cpoWrapper)) { in countExceptionUpdates()
/packages/apps/Dialer/java/com/android/contacts/common/compat/
DTelephonyManagerCompat.java30 import com.android.dialer.compat.CompatUtils;
66 if (CompatUtils.isLollipopMr1Compatible() in isVoiceCapable()
67 || CompatUtils.isMethodAvailable(TELEPHONY_MANAGER_CLASS, "isVoiceCapable")) { in isVoiceCapable()
88 if (CompatUtils.isMarshmallowCompatible() in getPhoneCount()
89 || CompatUtils.isMethodAvailable(TELEPHONY_MANAGER_CLASS, "getPhoneCount")) { in getPhoneCount()
108 if (CompatUtils.isMarshmallowCompatible() in getDeviceId()
109 || CompatUtils.isMethodAvailable(TELEPHONY_MANAGER_CLASS, "getDeviceId", Integer.class)) { in getDeviceId()
125 if (CompatUtils.isMarshmallowCompatible() in isTtyModeSupported()
126 || CompatUtils.isMethodAvailable(TELEPHONY_MANAGER_CLASS, "isTtyModeSupported")) { in isTtyModeSupported()
144 if (CompatUtils.isMarshmallowCompatible() in isHearingAidCompatibilitySupported()
[all …]
DPhoneNumberUtilsCompat.java23 import com.android.dialer.compat.CompatUtils;
41 if (CompatUtils.isLollipopCompatible()) { in normalizeNumber()
72 if (CompatUtils.isLollipopCompatible()) { in formatNumber()
81 if (CompatUtils.isMarshmallowCompatible()) { in createTtsSpannable()
89 if (CompatUtils.isMarshmallowCompatible()) { in createTtsSpan()
91 } else if (CompatUtils.isLollipopCompatible()) { in createTtsSpan()
110 if (CompatUtils.isMarshmallowCompatible()) { in addTtsSpan()
DPhoneAccountCompat.java24 import com.android.dialer.compat.CompatUtils;
43 if (CompatUtils.isMarshmallowCompatible()) { in getIcon()
65 if (CompatUtils.isMarshmallowCompatible()) { in createIconDrawable()
69 if (CompatUtils.isLollipopMr1Compatible()) { in createIconDrawable()
/packages/apps/Contacts/src/com/android/contacts/util/
DViewUtil.java27 import com.android.contacts.compat.CompatUtils;
62 if (CompatUtils.isLollipopCompatible()) {
76 if (CompatUtils.isLollipopCompatible()) {
95 if (CompatUtils.isLollipopCompatible()) { in addRectangularOutlineProvider()
106 if (CompatUtils.isLollipopCompatible()) { in setupFloatingActionButton()
/packages/apps/Dialer/java/com/android/dialer/util/
DCallUtil.java24 import com.android.dialer.compat.CompatUtils;
68 || !CompatUtils.isVideoCompatible()) { in getVideoCallingAvailability()
82 if (!CompatUtils.isVideoPresenceCompatible()) { in getVideoCallingAvailability()
118 || !CompatUtils.isCallSubjectCompatible()) { in isCallWithSubjectSupported()
/packages/apps/Contacts/src/com/android/contacts/
DCallUtil.java28 import com.android.contacts.compat.CompatUtils;
130 || !CompatUtils.isVideoCompatible()) { in getVideoCallingAvailability()
146 if (!CompatUtils.isVideoPresenceCompatible()) { in getVideoCallingAvailability()
177 || !CompatUtils.isCallSubjectCompatible()) { in isCallWithSubjectSupported()
/packages/apps/Dialer/java/com/android/incallui/
DVideoCallPresenter.java32 import com.android.dialer.compat.CompatUtils;
165 if (!CompatUtils.isVideoCompatible()) { in showIncomingVideo()
194 if (!CompatUtils.isVideoCompatible()) { in showOutgoingVideo()
311 if (!CompatUtils.isVideoCompatible()) { in onVideoCallScreenUiReady()
343 if (!CompatUtils.isVideoCompatible()) { in onVideoCallScreenUiUnready()
1241 return CompatUtils.isVideoCompatible() && VideoProfile.isBidirectional(call.getVideoState()); in isBidirectionalVideoCall()
1267 if (!CompatUtils.isVideoCompatible()) { in isAudioCall()
1279 return CompatUtils.isVideoCompatible() in isVideoCall()
/packages/apps/Contacts/src/com/android/contacts/model/
DRawContactDeltaList.java33 import com.android.contacts.compat.CompatUtils;
167 diffWrapper.add(new CPOWrapper(builder.build(), CompatUtils.TYPE_UPDATE)); in buildDiffWrapper()
182 diffWrapper.add(new CPOWrapper(builder.build(), CompatUtils.TYPE_UPDATE)); in buildDiffWrapper()
194 diffWrapper.add(new CPOWrapper(builder.build(), CompatUtils.TYPE_UPDATE)); in buildDiffWrapper()
258 diff.add(new CPOWrapper(builder.build(), CompatUtils.TYPE_UPDATE)); in buildSplitContactDiffWrapper()

1234