Home
last modified time | relevance | path

Searched refs:clazz (Results 1 – 25 of 252) sorted by relevance

1234567891011

/packages/services/Car/car-lib/src/com/android/car/internal/util/
DConstantDebugUtils.java57 private ConstantDebugUtils(Class<?> clazz) { in ConstantDebugUtils() argument
58 mClazzDeclaredFields = clazz.getDeclaredFields(); in ConstantDebugUtils()
66 public static String toName(Class<?> clazz, int value) { in toName() argument
67 return cacheClazzToConstantDebugUtilsMapping(clazz).toName(value); in toName()
75 public static Integer toValue(Class<?> clazz, String name) { in toValue() argument
76 return cacheClazzToConstantDebugUtilsMapping(clazz).toValue(name); in toValue()
82 public static Collection<Integer> getValues(Class<?> clazz) { in getValues() argument
84 clazz).cacheConstantNameToValueMapping().values(); in getValues()
87 private static ConstantDebugUtils cacheClazzToConstantDebugUtilsMapping(Class<?> clazz) { in cacheClazzToConstantDebugUtilsMapping() argument
91 if (clazzToConstantDebugUtils == null || clazzToConstantDebugUtils.get(clazz) == null) { in cacheClazzToConstantDebugUtilsMapping()
[all …]
DDebugUtils.java37 public static String valueToString(Class<?> clazz, String prefix, int value) { in valueToString() argument
38 for (Field field : clazz.getDeclaredFields()) { in valueToString()
59 public static String flagsToString(Class<?> clazz, String prefix, int flagsToConvert) { in flagsToString() argument
64 for (Field field : clazz.getDeclaredFields()) { in flagsToString()
96 public static String constantToString(Class<?> clazz, int value) { in constantToString() argument
97 return constantToString(clazz, "", value); in constantToString()
105 public static String constantToString(Class<?> clazz, String prefix, int value) { in constantToString() argument
106 for (Field field : clazz.getDeclaredFields()) { in constantToString()
/packages/services/Car/car-lib/src/com/android/car/internal/property/
DCarPropertyHelper.java117 public static <T> T getDefaultValue(Class<T> clazz) { in getDefaultValue() argument
118 if (clazz.equals(Boolean.class)) { in getDefaultValue()
121 if (clazz.equals(Integer.class)) { in getDefaultValue()
124 if (clazz.equals(Long.class)) { in getDefaultValue()
127 if (clazz.equals(Float.class)) { in getDefaultValue()
130 if (clazz.equals(Integer[].class)) { in getDefaultValue()
133 if (clazz.equals(Long[].class)) { in getDefaultValue()
136 if (clazz.equals(Float[].class)) { in getDefaultValue()
139 if (clazz.equals(byte[].class)) { in getDefaultValue()
142 if (clazz.equals(Object[].class)) { in getDefaultValue()
[all …]
/packages/services/Car/libs/car-test-lib/src/android/car/test/
DApiHelper.java110 Class<?> clazz = Class.forName(className); in getMethod() local
122 return getMethodWithParameters(clazz, methodName, paramTypesNames); in getMethod()
124 return getMethodWithoutParameters(clazz, methodName); in getMethod()
128 private static Method getMethodWithParameters(Class<?> clazz, String methodName, in getMethodWithParameters() argument
131 Log.d(TAG, "getMethod(" + clazz + ", " + methodName + ", " in getMethodWithParameters()
146 Method[] allMethods = clazz.getDeclaredMethods(); in getMethodWithParameters()
179 private static Method getMethodWithoutParameters(Class<?> clazz, String methodName) { in getMethodWithoutParameters() argument
184 for (Method method : clazz.getDeclaredMethods()) { in getMethodWithoutParameters()
197 Log.d(TAG, "No method named " + methodName + " on " + clazz); in getMethodWithoutParameters()
199 Log.d(TAG, "Found " + methods.size() + " methods on " + clazz + ": " + methods); in getMethodWithoutParameters()
[all …]
/packages/modules/Connectivity/service-t/jni/
Dcom_android_server_net_NetworkStatsFactory.cpp96 static int statsLinesToNetworkStats(JNIEnv* env, jclass clazz, jobject stats, in statsLinesToNetworkStats() argument
173 static int readNetworkStatsDetail(JNIEnv* env, jclass clazz, jobject stats) { in readNetworkStatsDetail() argument
179 return statsLinesToNetworkStats(env, clazz, stats, lines); in readNetworkStatsDetail()
182 static int readNetworkStatsDev(JNIEnv* env, jclass clazz, jobject stats) { in readNetworkStatsDev() argument
188 return statsLinesToNetworkStats(env, clazz, stats, lines); in readNetworkStatsDev()
205 jclass clazz = env->FindClass("android/net/NetworkStats"); in register_android_server_net_NetworkStatsFactory() local
206 gNetworkStatsClassInfo.size = env->GetFieldID(clazz, "size", "I"); in register_android_server_net_NetworkStatsFactory()
207 gNetworkStatsClassInfo.capacity = env->GetFieldID(clazz, "capacity", "I"); in register_android_server_net_NetworkStatsFactory()
208 gNetworkStatsClassInfo.iface = env->GetFieldID(clazz, "iface", "[Ljava/lang/String;"); in register_android_server_net_NetworkStatsFactory()
209 gNetworkStatsClassInfo.uid = env->GetFieldID(clazz, "uid", "[I"); in register_android_server_net_NetworkStatsFactory()
[all …]
/packages/modules/Connectivity/framework/jni/
Dandroid_net_NetworkUtils.cpp47 jclass clazz = env->FindClass(class_name); in FindClassOrDie() local
48 LOG_ALWAYS_FATAL_IF(clazz == NULL, "Unable to find class %s", class_name); in FindClassOrDie()
49 return clazz; in FindClassOrDie()
59 static void android_net_utils_attachDropAllBPFFilter(JNIEnv *env, jclass clazz, jobject javaFd) in android_net_utils_attachDropAllBPFFilter() argument
76 static void android_net_utils_detachBPFFilter(JNIEnv *env, jclass clazz, jobject javaFd) in android_net_utils_detachBPFFilter() argument
87 static jboolean android_net_utils_bindProcessToNetworkHandle(JNIEnv *env, jclass clazz, in android_net_utils_bindProcessToNetworkHandle() argument
93 static jlong android_net_utils_getBoundNetworkHandleForProcess(JNIEnv *env, jclass clazz) in android_net_utils_getBoundNetworkHandleForProcess() argument
104 static jboolean android_net_utils_bindProcessToNetworkForHostResolution(JNIEnv *env, jclass clazz, in android_net_utils_bindProcessToNetworkForHostResolution() argument
110 static jint android_net_utils_bindSocketToNetworkHandle(JNIEnv *env, jclass clazz, jobject javaFd, in android_net_utils_bindSocketToNetworkHandle() argument
124 static jobject android_net_utils_resNetworkQuery(JNIEnv *env, jclass clazz, jlong netHandle, in android_net_utils_resNetworkQuery() argument
[all …]
/packages/apps/Settings/tests/unit/src/com/android/settings/search/
DSearchIndexProviderCodeInspector.java91 for (Class clazz : mClasses) { in run()
92 if (!isConcreteSettingsClass(clazz)) { in run()
95 final String className = clazz.getName(); in run()
97 if (!SettingsPreferenceFragment.class.isAssignableFrom(clazz)) { in run()
100 final boolean hasSearchIndexProvider = hasSearchIndexProvider(clazz); in run()
111 .isSharingPreferenceControllers(clazz); in run()
119 if (!providerClasses.contains(clazz)) { in run()
125 if (!hasValidResourceFromProvider(clazz)) { in run()
161 private boolean hasSearchIndexProvider(Class clazz) { in hasSearchIndexProvider() argument
163 final Field f = clazz.getField( in hasSearchIndexProvider()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/search/
DSearchIndexProviderCodeInspector.java91 for (Class clazz : mClasses) { in run()
92 if (!isConcreteSettingsClass(clazz)) { in run()
95 final String className = clazz.getName(); in run()
97 if (!SettingsPreferenceFragment.class.isAssignableFrom(clazz)) { in run()
100 final boolean hasSearchIndexProvider = hasSearchIndexProvider(clazz); in run()
111 .isSharingPreferenceControllers(clazz); in run()
119 if (!providerClasses.contains(clazz)) { in run()
125 if (!hasValidResourceFromProvider(clazz)) { in run()
161 private boolean hasSearchIndexProvider(Class clazz) { in hasSearchIndexProvider() argument
163 final Field f = clazz.getField( in hasSearchIndexProvider()
[all …]
/packages/modules/AdServices/shared/libraries/device-side/java/com/android/adservices/shared/testing/junit/
DSafeAndroidJUnitRunner.java68 public SafeTestClass(Class<?> clazz) { in SafeTestClass() argument
69 super(clazz); in SafeTestClass()
80 Class<?> clazz = getJavaClass(); in scanAnnotatedMembers() local
81 for (Class<?> eachClass : getSuperClasses(clazz)) { in scanAnnotatedMembers()
100 private static Method[] getSafeDeclaredMethods(Class<?> clazz) { in getSafeDeclaredMethods() argument
101 Log.d(TAG, "getSafeDeclaredMethods() for " + clazz); in getSafeDeclaredMethods()
102 Method[] allMethods = clazz.getMethods(); in getSafeDeclaredMethods()
108 if (!method.getDeclaringClass().equals(clazz)) { in getSafeDeclaredMethods()
122 if (VERBOSE && !clazz.equals(Object.class)) { in getSafeDeclaredMethods()
129 + clazz in getSafeDeclaredMethods()
[all …]
/packages/modules/Connectivity/tools/
Dgen_jarjar.py77 clazz = line.replace('/', '.').split(';')[0][1:]
78 out.add(_get_toplevel_class(clazz))
82 def _get_toplevel_class(clazz): argument
84 if '$' not in clazz:
85 return clazz
86 return clazz.split('$')[0]
118 for clazz in jar_classes:
119 if (not clazz.startswith(args.prefix + '.') and
120 _get_toplevel_class(clazz) not in excluded_classes and
121 not any(r.fullmatch(clazz) for r in exclude_regexes)):
[all …]
/packages/services/DeviceAsWebcam/jni/
DDeviceAsWebcamNative.cpp49 jclass clazz = env->FindClass(class_name); in FindClassOrDie() local
50 LOG_ALWAYS_FATAL_IF(clazz == nullptr, "Unable to find class %s", class_name); in FindClassOrDie()
51 return clazz; in FindClassOrDie()
54 static inline jmethodID GetMethodIdOrDie(JNIEnv* env, jclass clazz, const char* method_name, in GetMethodIdOrDie() argument
56 jmethodID res = env->GetMethodID(clazz, method_name, method_signature); in GetMethodIdOrDie()
79 jclass clazz = FindClassOrDie(e, clsName); in registerJNIMethods() local
80 kJavaMethods.setStreamConfig = GetMethodIdOrDie(e, clazz, "setStreamConfig", "(ZIII)V"); in registerJNIMethods()
81 kJavaMethods.startStreaming = GetMethodIdOrDie(e, clazz, "startStreaming", "()V"); in registerJNIMethods()
82 kJavaMethods.stopStreaming = GetMethodIdOrDie(e, clazz, "stopStreaming", "()V"); in registerJNIMethods()
83 kJavaMethods.stopService = GetMethodIdOrDie(e, clazz, "stopService", "()V"); in registerJNIMethods()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/core/
DXmlControllerAttributeTest.java78 Class<?> clazz = getClassFromClassName(controllerClassName); in testAllIndexableXML_onlyValidBasePreferenceControllersAdded() local
80 if (clazz == null) { in testAllIndexableXML_onlyValidBasePreferenceControllersAdded()
85 Constructor<?> constructor = getConstructorFromClass(clazz); in testAllIndexableXML_onlyValidBasePreferenceControllersAdded()
92 if (!isBasePreferenceController(clazz)) { in testAllIndexableXML_onlyValidBasePreferenceControllersAdded()
179 private Constructor<?> getConstructorFromClass(Class<?> clazz) { in getConstructorFromClass() argument
182 constructor = clazz.getConstructor(Context.class); in getConstructorFromClass()
191 constructor = clazz.getConstructor(Context.class, String.class); in getConstructorFromClass()
201 private boolean isBasePreferenceController(Class<?> clazz) { in isBasePreferenceController() argument
202 while (clazz != null) { in isBasePreferenceController()
203 clazz = clazz.getSuperclass(); in isBasePreferenceController()
[all …]
/packages/apps/Contacts/tests/src/com/android/contacts/
DRunMethodInstrumentation.java113 Class<?> clazz = null; in invokeMethod() local
116 clazz = getTargetContext().getClassLoader().loadClass(className); in invokeMethod()
120 clazz = getContext().getClassLoader().loadClass(className); in invokeMethod()
128 method = clazz.getMethod(methodName, Context.class, Bundle.class); in invokeMethod()
134 method.invoke(clazz, methodArgs); in invokeMethod()
139 method = clazz.getMethod(methodName, Context.class); in invokeMethod()
145 method.invoke(clazz, methodArgs); in invokeMethod()
149 method = clazz.getMethod(methodName); in invokeMethod()
150 method.invoke(clazz); in invokeMethod()
/packages/modules/Bluetooth/android/app/jni/
Dcom_android_bluetooth_le_audio.cpp62 jclass clazz; member
74 jclass clazz; member
79 jclass clazz; member
85 jclass clazz; member
90 jclass clazz; member
95 jclass clazz; member
100 jclass clazz; member
105 jclass clazz; member
126 android_bluetooth_BluetoothLeAudioCodecConfig.clazz, in prepareCodecConfigObj()
140 android_bluetooth_BluetoothLeAudioCodecConfig.clazz, nullptr); in prepareArrayOfCodecConfigs()
[all …]
/packages/apps/Settings/tests/unit/src/com/android/settings/slices/
DSliceControllerInXmlCodeInspector.java103 for (Class<?> clazz : mClasses) { in run()
104 if (!isConcreteSettingsClass(clazz)) { in run()
108 if (!isInlineSliceClass(clazz)) { in run()
113 if (!mXmlDeclaredControllers.contains(clazz.getName())) { in run()
115 missingControllersInXml.add(clazz.getName()); in run()
128 private boolean isInlineSliceClass(Class clazz) { in isInlineSliceClass() argument
129 while (clazz != null) { in isInlineSliceClass()
130 clazz = clazz.getSuperclass(); in isInlineSliceClass()
131 if (sSliceControllerClasses.contains(clazz)) { in isInlineSliceClass()
/packages/apps/Settings/tests/robotests/src/com/android/settings/slices/
DSliceControllerInXmlCodeInspector.java103 for (Class<?> clazz : mClasses) { in run()
104 if (!isConcreteSettingsClass(clazz)) { in run()
108 if (!isInlineSliceClass(clazz)) { in run()
113 if (!mXmlDeclaredControllers.contains(clazz.getName())) { in run()
115 missingControllersInXml.add(clazz.getName()); in run()
128 private boolean isInlineSliceClass(Class clazz) { in isInlineSliceClass() argument
129 while (clazz != null) { in isInlineSliceClass()
130 clazz = clazz.getSuperclass(); in isInlineSliceClass()
131 if (mSliceControllerClasses.contains(clazz)) { in isInlineSliceClass()
/packages/modules/Bluetooth/system/blueberry/tests/pbat/
Dbluetooth_acceptance_suite.py51 for index, clazz in enumerate(TEST_CLASSES):
55 matched_tests = list(set(selected_tests) & set(dir(clazz)))
59 clazz=clazz,
62 logging.info('Added the tests of "%s": %s', clazz.__name__,
66 clazz=clazz,
/packages/apps/SettingsIntelligence/src/com/android/settings/intelligence/search/sitemap/
DSiteMapManager.java54 public static boolean isTopLevelSettings(String clazz) { in isTopLevelSettings() argument
55 return TextUtils.equals(TOP_LEVEL_SETTINGS, clazz); in isTopLevelSettings()
66 public synchronized List<String> buildBreadCrumb(Context context, String clazz, in buildBreadCrumb() argument
78 String currentClass = clazz; in buildBreadCrumb()
98 public synchronized SiteMapPair getTopLevelPair(Context context, String clazz, in getTopLevelPair() argument
106 if (!TextUtils.isEmpty(clazz)) { in getTopLevelPair()
108 if (TextUtils.equals(pair.getChildClass(), clazz)) { in getTopLevelPair()
119 String currentClass = clazz; in getTopLevelPair()
181 private SiteMapPair lookUpParent(String clazz, String title) { in lookUpParent() argument
183 if (TextUtils.equals(pair.getChildClass(), clazz) in lookUpParent()
/packages/services/Car/service/src/com/android/car/hal/property/
DHalPropertyDebugUtils.java135 private static String convertAreaIdToDebugString(Class<?> clazz, int areaId) { in convertAreaIdToDebugString() argument
139 if (clazzToAreaBits == null || clazzToAreaBits.get(clazz) == null) { in convertAreaIdToDebugString()
140 clazzToAreaBits = getClazzToAreaBitsMapping(clazzToAreaBits, clazz); in convertAreaIdToDebugString()
145 for (int i = 0; i < clazzToAreaBits.get(clazz).size(); i++) { in convertAreaIdToDebugString()
146 int areaBit = clazzToAreaBits.get(clazz).get(i).intValue(); in convertAreaIdToDebugString()
155 output += toName(clazz, areaBit); in convertAreaIdToDebugString()
160 output += "INVALID_" + clazz.getSimpleName() + "_AREA_ID"; in convertAreaIdToDebugString()
168 @Nullable Map<Class<?>, List<Integer>> clazzToAreaBits, Class<?> clazz) { in getClazzToAreaBitsMapping() argument
177 List<Integer> areaBits = new ArrayList<>(ConstantDebugUtils.getValues(clazz)); in getClazzToAreaBitsMapping()
180 outputClazzToAreaBits.put(clazz, areaBits); in getClazzToAreaBitsMapping()
[all …]
/packages/services/Car/service/src/com/android/car/hal/
DHalPropValue.java285 Class<?> clazz = CarPropertyUtils.getJavaClass(getPropId() & VehiclePropertyType.MASK); in toCarPropertyValue() local
291 if (Boolean.class == clazz) { in toCarPropertyValue()
297 } else if (Float.class == clazz) { in toCarPropertyValue()
303 } else if (Integer.class == clazz) { in toCarPropertyValue()
309 } else if (Long.class == clazz) { in toCarPropertyValue()
315 } else if (Float[].class == clazz) { in toCarPropertyValue()
317 } else if (Integer[].class == clazz) { in toCarPropertyValue()
319 } else if (Long[].class == clazz) { in toCarPropertyValue()
321 } else if (String.class == clazz) { in toCarPropertyValue()
323 } else if (byte[].class == clazz) { in toCarPropertyValue()
[all …]
/packages/services/Car/libs/car-test-lib/src/android/car/test/mocks/
DMockSettings.java120 private <T> T getAnswer(InvocationOnMock invocation, Class<T> clazz, int keyIndex, in getAnswer() argument
125 defaultValue = safeCast(invocation.getArguments()[defaultValueIndex], clazz); in getAnswer()
127 return get(key, defaultValue, clazz); in getAnswer()
131 private <T> T get(String key, T defaultValue, Class<T> clazz) { in get() argument
133 Log.v(TAG, "get(): key=" + key + ", default=" + defaultValue + ", class=" + clazz); in get()
146 return safeCast(value, clazz); in get()
149 private static <T> T safeCast(Object value, Class<T> clazz) { in safeCast() argument
153 Preconditions.checkArgument(value.getClass() == clazz, in safeCast()
155 value.getClass(), clazz); in safeCast() local
156 return clazz.cast(value); in safeCast()
DAbstractExtendedMockitoTestCase.java556 protected final void assertSpied(Class<?> clazz) { in assertSpied() argument
557 Preconditions.checkArgument(mStaticSpiedClasses.contains(clazz), in assertSpied()
558 "did not call spyStatic() on %s", clazz.getName()); in assertSpied()
564 protected final void assertMocked(Class<?> clazz) { in assertMocked() argument
565 Preconditions.checkArgument(mStaticMockedClasses.contains(clazz), in assertMocked()
566 "did not call mockStatic() on %s", clazz.getName()); in assertMocked()
594 public <T> CustomMockitoSessionBuilder spyStatic(Class<T> clazz) { in spyStatic() argument
595 Preconditions.checkState(!mStaticSpiedClasses.contains(clazz), in spyStatic()
596 "already called spyStatic() on " + clazz); in spyStatic()
597 mStaticSpiedClasses.add(clazz); in spyStatic()
[all …]
/packages/modules/OnDevicePersonalization/pluginlib/src/com/android/ondevicepersonalization/libraries/plugin/internal/
DIsolationClassLoader.java90 Class<?> clazz = null; in loadClass() local
99 clazz = getSystemClassLoader().loadClass(name); in loadClass()
105 if (clazz == null in loadClass()
108 clazz = super.loadClass(name, resolve); in loadClass()
112 if (clazz == null) { in loadClass()
116 return clazz; in loadClass()
/packages/inputmethods/LatinIME/native/jni/
Dcom_android_inputmethod_latin_BinaryDictionary.cpp45 static jlong latinime_BinaryDictionary_open(JNIEnv *env, jclass clazz, jstring sourceDir, in latinime_BinaryDictionary_open() argument
71 static jlong latinime_BinaryDictionary_createOnMemory(JNIEnv *env, jclass clazz, in latinime_BinaryDictionary_createOnMemory() argument
99 static bool latinime_BinaryDictionary_flush(JNIEnv *env, jclass clazz, jlong dict, in latinime_BinaryDictionary_flush() argument
110 static bool latinime_BinaryDictionary_needsToRunGC(JNIEnv *env, jclass clazz, in latinime_BinaryDictionary_needsToRunGC() argument
117 static bool latinime_BinaryDictionary_flushWithGC(JNIEnv *env, jclass clazz, jlong dict, in latinime_BinaryDictionary_flushWithGC() argument
128 static void latinime_BinaryDictionary_close(JNIEnv *env, jclass clazz, jlong dict) { in latinime_BinaryDictionary_close() argument
134 static void latinime_BinaryDictionary_getHeaderInfo(JNIEnv *env, jclass clazz, jlong dict, in latinime_BinaryDictionary_getHeaderInfo() argument
170 static int latinime_BinaryDictionary_getFormatVersion(JNIEnv *env, jclass clazz, jlong dict) { in latinime_BinaryDictionary_getFormatVersion() argument
178 static void latinime_BinaryDictionary_getSuggestions(JNIEnv *env, jclass clazz, jlong dict, in latinime_BinaryDictionary_getSuggestions() argument
263 static jint latinime_BinaryDictionary_getProbability(JNIEnv *env, jclass clazz, jlong dict, in latinime_BinaryDictionary_getProbability() argument
[all …]
Djni_common.cpp65 jclass clazz = env->FindClass(className); in registerNativeMethods() local
66 if (!clazz) { in registerNativeMethods()
70 if (env->RegisterNatives(clazz, methods, numMethods) != 0) { in registerNativeMethods()
72 env->DeleteLocalRef(clazz); in registerNativeMethods()
75 env->DeleteLocalRef(clazz); in registerNativeMethods()

1234567891011