/packages/apps/Contacts/tests/src/com/android/contacts/compat/ |
D | CompatUtilsTest.java | 27 assertFalse(CompatUtils.isClassAvailable(null)); in testIsClassAvailable_NullClassName() 31 assertFalse(CompatUtils.isClassAvailable("")); in testIsClassAvailable_EmptyClassName() 35 assertFalse(CompatUtils.isClassAvailable("com.android.contacts.common.NonexistentClass")); in testIsClassAvailable_NonexistentClass() 39 assertTrue(CompatUtils.isClassAvailable(BaseClass.class.getName())); in testIsClassAvailable() 43 assertFalse(CompatUtils.isMethodAvailable(null, "methodName")); in testIsMethodAvailable_NullClassName() 47 assertFalse(CompatUtils.isMethodAvailable("", "methodName")); in testIsMethodAvailable_EmptyClassName() 51 assertFalse(CompatUtils.isMethodAvailable("className", null)); in testIsMethodAvailable_NullMethodName() 55 assertFalse(CompatUtils.isMethodAvailable("className", "")); in testIsMethodAvailable_EmptyMethodName() 59 assertFalse(CompatUtils.isMethodAvailable("com.android.contacts.common.NonexistentClass", in testIsMethodAvailable_NonexistentClass() 64 assertFalse(CompatUtils.isMethodAvailable(BaseClass.class.getName(), "derivedMethod")); in testIsMethodAvailable_NonexistentMethod() [all …]
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/compat/ |
D | NotificationCompatUtils.java | 28 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 …]
|
D | CompatUtils.java | 27 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 …]
|
D | ViewCompatUtils.java | 29 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()
|
D | LocaleListCompatUtils.java | 23 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()
|
D | InputMethodSubtypeCompatUtils.java | 40 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()
|
D | InputMethodManagerCompatWrapper.java | 28 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()
|
D | TextInfoCompatUtils.java | 30 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()
|
D | EditorInfoCompatUtils.java | 27 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()
|
D | InputConnectionCompatUtils.java | 23 private static final CompatUtils.ClassWrapper sInputConnectionType; 24 private static final CompatUtils.ToBooleanMethodWrapper sRequestCursorUpdatesMethod; 26 sInputConnectionType = new CompatUtils.ClassWrapper(InputConnection.class);
|
D | LocaleSpanCompatUtils.java | 49 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()
|
D | InputMethodServiceCompatUtils.java | 27 CompatUtils.getMethod(InputMethodService.class, "enableHardwareAcceleration"); 34 return (Boolean)CompatUtils.invoke(ims, false /* defaultValue */, in enableHardwareAcceleration()
|
D | SettingsSecureCompatUtils.java | 24 private static final Field FIELD_ACCESSIBILITY_SPEAK_PASSWORD = CompatUtils.getField( 34 public static final String ACCESSIBILITY_SPEAK_PASSWORD = (String) CompatUtils.getFieldValue(
|
D | IntentCompatUtils.java | 25 (String)CompatUtils.getFieldValue(null /* receiver */, null /* defaultValue */, 26 CompatUtils.getField(Intent.class, "ACTION_USER_INITIALIZE"));
|
D | LooperCompatUtils.java | 32 private static final Method METHOD_quitSafely = CompatUtils.getMethod( 37 CompatUtils.invoke(looper, null /* default return value */, METHOD_quitSafely); in quitSafely()
|
D | ConnectivityManagerCompatUtils.java | 26 private static final Method METHOD_isActiveNetworkMetered = CompatUtils.getMethod( 30 return (Boolean)CompatUtils.invoke(manager, in isActiveNetworkMetered()
|
D | SuggestionsInfoCompatUtils.java | 27 CompatUtils.getField(SuggestionsInfo.class, "RESULT_ATTR_HAS_RECOMMENDED_SUGGESTIONS"); 29 (Integer) CompatUtils.getFieldValue(null /* receiver */, null /* defaultValue */,
|
/packages/apps/Contacts/src/com/android/contacts/compat/ |
D | TelephonyManagerCompat.java | 46 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 …]
|
D | PhoneNumberUtilsCompat.java | 42 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()
|
D | PhoneAccountCompat.java | 44 if (CompatUtils.isMarshmallowCompatible()) { in getIcon() 67 if (CompatUtils.isMarshmallowCompatible()) { in createIconDrawable() 71 if (CompatUtils.isLollipopMr1Compatible()) { in createIconDrawable()
|
/packages/apps/Contacts/tests/src/com/android/contacts/model/ |
D | RawContactDeltaTests.java | 31 import com.android.contacts.compat.CompatUtils; 153 : builderWrapper.getType() == CompatUtils.TYPE_DELETE; in testValuesDiffDelete() 191 assertTrue("Expected version enforcement", CompatUtils.isAssertQueryCompat(cpoWrapper)); in testEntityDiffNoneInsert() 196 assertTrue("Expected aggregation mode change", CompatUtils.isUpdateCompat(cpoWrapper)); in testEntityDiffNoneInsert() 202 assertTrue("Incorrect type", CompatUtils.isInsertCompat(cpoWrapper)); in testEntityDiffNoneInsert() 208 assertTrue("Expected aggregation mode change", CompatUtils.isUpdateCompat(cpoWrapper)); in testEntityDiffNoneInsert() 234 assertTrue("Expected version enforcement", CompatUtils.isAssertQueryCompat(cpoWrapper)); in testEntityDiffUpdateInsert() 239 assertTrue("Expected aggregation mode change", CompatUtils.isUpdateCompat(cpoWrapper)); in testEntityDiffUpdateInsert() 245 assertTrue("Incorrect type", CompatUtils.isUpdateCompat(cpoWrapper)); in testEntityDiffUpdateInsert() 251 assertTrue("Incorrect type", CompatUtils.isInsertCompat(cpoWrapper)); in testEntityDiffUpdateInsert() [all …]
|
D | RawContactModifierTests.java | 37 import com.android.contacts.compat.CompatUtils; 391 assertTrue("Expected aggregation mode change", CompatUtils.isUpdateCompat(cpoWrapper)); in testTrimEmptySingle() 397 assertTrue("Incorrect type", CompatUtils.isInsertCompat(cpoWrapper)); in testTrimEmptySingle() 403 assertTrue("Expected aggregation mode change", CompatUtils.isUpdateCompat(cpoWrapper)); in testTrimEmptySingle() 415 assertTrue("Incorrect type", CompatUtils.isDeleteCompat(cpoWrapper)); in testTrimEmptySingle() 526 assertTrue("Expected aggregation mode change", CompatUtils.isUpdateCompat(cpoWrapper)); in testTrimEmptyAfterUpdate() 532 assertTrue("Incorrect type", CompatUtils.isUpdateCompat(cpoWrapper)); in testTrimEmptyAfterUpdate() 538 assertTrue("Expected aggregation mode change", CompatUtils.isUpdateCompat(cpoWrapper)); in testTrimEmptyAfterUpdate() 550 assertTrue("Incorrect type", CompatUtils.isDeleteCompat(cpoWrapper)); in testTrimEmptyAfterUpdate() 573 assertTrue("Incorrect type", CompatUtils.isInsertCompat(cpoWrapper)); in testTrimInsertEmpty() [all …]
|
D | ValuesDeltaTests.java | 27 import com.android.contacts.compat.CompatUtils; 54 : builderWrapper.getType() == CompatUtils.TYPE_INSERT; in testValuesDiffInsert() 87 : builderWrapper.getType() == CompatUtils.TYPE_UPDATE; in testValuesDiffUpdate()
|
/packages/apps/Contacts/src/com/android/contacts/util/ |
D | ViewUtil.java | 27 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/Contacts/src/com/android/contacts/ |
D | CallUtil.java | 33 import com.android.contacts.compat.CompatUtils; 154 || !CompatUtils.isVideoCompatible()) { in getVideoCallingAvailability() 170 if (!CompatUtils.isVideoPresenceCompatible()) { in getVideoCallingAvailability() 201 || !CompatUtils.isCallSubjectCompatible()) { in isCallWithSubjectSupported() 238 || !CompatUtils.isNCompatible()) { in isTachyonEnabled()
|