Home
last modified time | relevance | path

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

1234

/packages/modules/DnsResolver/
Dgetaddrinfo.cpp181 #define GET_AI(ai, afd, addr) \ argument
184 (ai) = get_ai(pai, (afd), (addr)); \
185 if ((ai) == NULL) { \
191 #define GET_PORT(ai, serv) \ argument
194 error = get_port((ai), (serv), 0); \
207 void freeaddrinfo(struct addrinfo* ai) { in freeaddrinfo() argument
208 while (ai) { in freeaddrinfo()
209 struct addrinfo* next = ai->ai_next; in freeaddrinfo()
210 if (ai->ai_canonname) free(ai->ai_canonname); in freeaddrinfo()
212 free(ai); in freeaddrinfo()
[all …]
DDnsProxyListener.cpp202 for (const addrinfo* ai = result; ai; ai = ai->ai_next) { in extractGetAddrInfoAnswers() local
203 sockaddr* ai_addr = ai->ai_addr; in extractGetAddrInfoAnswers()
205 addIpAddrWithinLimit(ip_addrs, ai_addr, ai->ai_addrlen); in extractGetAddrInfoAnswers()
384 for (const addrinfo* ai = res; ai; ai = ai->ai_next) in onlyIPv4Answers() local
385 if (ai->ai_family != AF_INET) return false; in onlyIPv4Answers()
421 for (const addrinfo* ai = res; ai; ai = ai->ai_next) { in onlyNonSpecialUseIPv4Addresses() local
422 if (ai->ai_family != AF_INET) return false; in onlyNonSpecialUseIPv4Addresses()
423 if (isSpecialUseIPv4Address(ai->ai_addr)) return false; in onlyNonSpecialUseIPv4Addresses()
449 const addrinfo* ai; in logDnsQueryResult() local
451 for (ai = res, i = 0; ai; ai = ai->ai_next, i++) { in logDnsQueryResult()
[all …]
/packages/modules/DnsResolver/tests/
Dresolv_test_utils.cpp36 std::string ToString(const addrinfo* ai) { in ToString() argument
37 if (!ai) return "<null>"; in ToString()
40 int rv = getnameinfo(ai->ai_addr, ai->ai_addrlen, host, sizeof(host), nullptr, 0, in ToString()
46 std::string ToString(const ScopedAddrinfo& ai) { in ToString() argument
47 return ToString(ai.get()); in ToString()
80 std::vector<std::string> ToStrings(const addrinfo* ai) { in ToStrings() argument
82 if (!ai) { in ToStrings()
86 for (const auto* aip = ai; aip != nullptr; aip = aip->ai_next) { in ToStrings()
102 std::vector<std::string> ToStrings(const ScopedAddrinfo& ai) { in ToStrings() argument
103 return ToStrings(ai.get()); in ToStrings()
Dresolv_test_utils.h188 std::string ToString(const addrinfo* ai);
189 std::string ToString(const android::netdutils::ScopedAddrinfo& ai);
192 std::vector<std::string> ToStrings(const addrinfo* ai);
193 std::vector<std::string> ToStrings(const android::netdutils::ScopedAddrinfo& ai);
/packages/modules/DnsResolver/tests/dns_responder/
Ddns_tls_frontend.cpp111 for (const addrinfo* ai = frontend_ai_res; ai; ai = ai->ai_next) { in startServer() local
112 android::base::unique_fd s(socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol)); in startServer()
119 std::string host_str = addr2str(ai->ai_addr, ai->ai_addrlen); in startServer()
120 if (bind(s.get(), ai->ai_addr, ai->ai_addrlen)) { in startServer()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/inputmethod/
DAvailableVirtualKeyboardFragment.java113 final ApplicationInfo ai = si != null ? si.applicationInfo : null; in getInputMethodIcon() local
115 if (si == null || ai == null || packageName == null) { in getInputMethodIcon()
120 Drawable drawable = loadDrawable(packageManager, packageName, si.logo, ai); in getInputMethodIcon()
124 drawable = loadDrawable(packageManager, packageName, si.icon, ai); in getInputMethodIcon()
130 drawable = loadDrawable(packageManager, packageName, ai.logo, ai); in getInputMethodIcon()
134 drawable = loadDrawable(packageManager, packageName, ai.icon, ai); in getInputMethodIcon()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/inputmethod/
DAvailableVirtualKeyboardFragment.java114 final ApplicationInfo ai = si != null ? si.applicationInfo : null; in getInputMethodIcon() local
116 if (si == null || ai == null || packageName == null) { in getInputMethodIcon()
121 Drawable drawable = loadDrawable(packageManager, packageName, si.logo, ai); in getInputMethodIcon()
125 drawable = loadDrawable(packageManager, packageName, si.icon, ai); in getInputMethodIcon()
131 drawable = loadDrawable(packageManager, packageName, ai.logo, ai); in getInputMethodIcon()
135 drawable = loadDrawable(packageManager, packageName, ai.icon, ai); in getInputMethodIcon()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/system/development/
DAppPicker.java100 for (final ApplicationInfo ai : pkgs) { in onCreateActions()
101 if (ai.uid == Process.SYSTEM_UID) { in onCreateActions()
110 if ((ai.flags&ApplicationInfo.FLAG_DEBUGGABLE) == 0 in onCreateActions()
120 PackageInfo pi = pm.getPackageInfo(ai.packageName, in onCreateActions()
140 ai.packageName, ai.loadLabel(pm).toString(), ai.loadIcon(pm))); in onCreateActions()
/packages/apps/Settings/src/com/android/settings/applications/
DRunningProcessesView.java190 ActiveItem ai = new ActiveItem(); in bind() local
191 ai.mRootView = rootView; in bind()
192 ai.mItem = item; in bind()
193 ai.mHolder = this; in bind()
194 ai.mFirstRunTime = item.mActiveSince; in bind()
203 ai.updateTime(rootView.getContext(), builder); in bind()
204 return ai; in bind()
311 ActiveItem ai = vh.bind(mState, item, mBuilder); in bindView() local
312 mActiveItems.put(view, ai); in bindView()
494 ActiveItem ai = it.next(); in updateTimes() local
[all …]
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/applications/
DRunningProcessesView.java190 ActiveItem ai = new ActiveItem(); in bind() local
191 ai.mRootView = rootView; in bind()
192 ai.mItem = item; in bind()
193 ai.mHolder = this; in bind()
194 ai.mFirstRunTime = item.mActiveSince; in bind()
203 ai.updateTime(rootView.getContext(), builder); in bind()
204 return ai; in bind()
311 ActiveItem ai = vh.bind(mState, item, mBuilder); in bindView() local
312 mActiveItems.put(view, ai); in bindView()
494 ActiveItem ai = it.next(); in updateTimes() local
[all …]
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/development/
DMockLocationAppPreferenceController.java107 final ApplicationInfo ai = mPackageManager.getApplicationInfo( in writeMockLocation() local
109 mAppsOpsManager.setMode(AppOpsManager.OP_MOCK_LOCATION, ai.uid, in writeMockLocation()
119 final ApplicationInfo ai = mPackageManager.getApplicationInfo( in getAppLabel() local
121 final CharSequence appLabel = mPackageManager.getApplicationLabel(ai); in getAppLabel()
145 final ApplicationInfo ai = mPackageManager.getApplicationInfo( in removeMockLocationForApp() local
147 mAppsOpsManager.setMode(AppOpsManager.OP_MOCK_LOCATION, ai.uid, in removeMockLocationForApp()
DAppPicker.java103 ApplicationInfo ai = pkgs.get(i); in AppListAdapter() local
104 if (ai.uid == Process.SYSTEM_UID) { in AppListAdapter()
113 if ((ai.flags&ApplicationInfo.FLAG_DEBUGGABLE) == 0 in AppListAdapter()
120 if (mNonSystemOnly && ai.isSystemApp()) { in AppListAdapter()
128 PackageInfo pi = getPackageManager().getPackageInfo(ai.packageName, in AppListAdapter()
148 info.info = ai; in AppListAdapter()
/packages/apps/Settings/src/com/android/settings/development/
DMockLocationAppPreferenceController.java113 final ApplicationInfo ai = mPackageManager.getApplicationInfo( in writeMockLocation() local
115 mAppsOpsManager.setMode(AppOpsManager.OP_MOCK_LOCATION, ai.uid, in writeMockLocation()
125 final ApplicationInfo ai = mPackageManager.getApplicationInfo( in getAppLabel() local
127 final CharSequence appLabel = mPackageManager.getApplicationLabel(ai); in getAppLabel()
151 final ApplicationInfo ai = mPackageManager.getApplicationInfo( in removeMockLocationForApp() local
153 mAppsOpsManager.setMode(AppOpsManager.OP_MOCK_LOCATION, ai.uid, in removeMockLocationForApp()
DAppPicker.java103 ApplicationInfo ai = pkgs.get(i); in AppListAdapter() local
104 if (ai.uid == Process.SYSTEM_UID) { in AppListAdapter()
113 if ((ai.flags&ApplicationInfo.FLAG_DEBUGGABLE) == 0 in AppListAdapter()
120 if (mNonSystemOnly && ai.isSystemApp()) { in AppListAdapter()
128 PackageInfo pi = getPackageManager().getPackageInfo(ai.packageName, in AppListAdapter()
148 info.info = ai; in AppListAdapter()
/packages/services/Car/car-usb-handler/src/android/car/usb/handler/
DUsbDeviceHandlerResolver.java236 ActivityInfo ai = resolveInfo.activityInfo; in getDeviceMatches() local
237 ComponentName activity = new ComponentName(ai.packageName, ai.name); in getDeviceMatches()
279 private UsbDeviceFilter packageMatches(ActivityInfo ai, String metaDataName, UsbDevice device, in packageMatches() argument
282 Log.d(TAG, "packageMatches ai: " + ai + "metaDataName: " + metaDataName + " forAoap: " in packageMatches()
286 try (XmlResourceParser parser = ai.loadXmlMetaData(mPackageManager, metaDataName)) { in packageMatches()
288 Log.w(TAG, "no meta-data for " + ai); in packageMatches()
304 Log.w(TAG, "Unable to load component info " + ai.toString(), e); in packageMatches()
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/
DAppWorkaroundsTests.java37 for (ApplicationInfo ai : pm.getInstalledApplications(0 /* flags */)) { in setUp()
38 if (ai.targetSdkVersion < VERSION_CODES.JELLY_BEAN) { in setUp()
39 packageNameOfAppBeforeJellyBean = ai.packageName; in setUp()
41 packageNameOfAppAfterJellyBean = ai.packageName; in setUp()
/packages/apps/Settings/src/com/android/settings/applications/specialaccess/deviceadmin/
DDeviceAdminListPreferenceController.java244 final ActivityInfo ai; in addActiveAdminsForProfile() local
246 ai = mIPackageManager.getReceiverInfo(activeAdmin, in addActiveAdminsForProfile()
255 final DeviceAdminInfo deviceAdminInfo = createDeviceAdminInfo(mContext, ai); in addActiveAdminsForProfile()
310 private static DeviceAdminInfo createDeviceAdminInfo(Context context, ActivityInfo ai) { in createDeviceAdminInfo() argument
312 return new DeviceAdminInfo(context, ai); in createDeviceAdminInfo()
314 Log.w(TAG, "Skipping " + ai, e); in createDeviceAdminInfo()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/applications/specialaccess/deviceadmin/
DDeviceAdminListPreferenceController.java244 final ActivityInfo ai; in addActiveAdminsForProfile() local
246 ai = mIPackageManager.getReceiverInfo(activeAdmin, in addActiveAdminsForProfile()
255 final DeviceAdminInfo deviceAdminInfo = createDeviceAdminInfo(mContext, ai); in addActiveAdminsForProfile()
310 private static DeviceAdminInfo createDeviceAdminInfo(Context context, ActivityInfo ai) { in createDeviceAdminInfo() argument
312 return new DeviceAdminInfo(context, ai); in createDeviceAdminInfo()
314 Log.w(TAG, "Skipping " + ai, e); in createDeviceAdminInfo()
/packages/apps/Nfc/src/com/android/nfc/
DRegisteredComponentCache.java180 ActivityInfo ai = info.activityInfo; in parseComponentInfo() local
184 parser = ai.loadXmlMetaData(pm, mMetaDataName); in parseComponentInfo()
189 parseTechLists(pm.getResourcesForApplication(ai.applicationInfo), ai.packageName, in parseComponentInfo()
192 throw new XmlPullParserException("Unable to load resources for " + ai.packageName); in parseComponentInfo()
/packages/providers/ContactsProvider/src/com/android/providers/contacts/util/
DPackageUtils.java35 final ApplicationInfo ai = context.getPackageManager().getApplicationInfo(packageName, in isPackageInstalled() local
39 return (ai != null) && ((ai.flags & ApplicationInfo.FLAG_INSTALLED) != 0); in isPackageInstalled()
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/utils/
DApplicationUtils.java38 final ActivityInfo ai = context.getPackageManager().getActivityInfo(cn, 0); in getActivityTitleResId() local
39 if (ai != null) { in getActivityTitleResId()
40 return ai.labelRes; in getActivityTitleResId()
/packages/apps/DocumentsUI/src/com/android/documentsui/base/
DShared.java197 private static boolean isSystemApp(ApplicationInfo ai) { in isSystemApp() argument
198 return (ai.flags & ApplicationInfo.FLAG_SYSTEM) != 0; in isSystemApp()
201 private static boolean isUpdatedSystemApp(ApplicationInfo ai) { in isUpdatedSystemApp() argument
202 return (ai.flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0; in isUpdatedSystemApp()
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/common/
DUtils.java281 for (ActivityInfo ai : packageInfo.receivers) { in findDeviceAdminInPackage()
282 if (TextUtils.equals(ai.permission, android.Manifest.permission.BIND_DEVICE_ADMIN)) { in findDeviceAdminInPackage()
287 mdmComponentName = new ComponentName(packageName, ai.name); in findDeviceAdminInPackage()
296 for (ActivityInfo ai : pi.receivers) { in isComponentInPackageInfo()
297 if (dpcComponentName.getClassName().equals(ai.name)) { in isComponentInPackageInfo()
320 final ApplicationInfo ai = pm.getApplicationInfoAsUser(packageName, in isPackageTestOnly() local
323 return ai != null && (ai.flags & ApplicationInfo.FLAG_TEST_ONLY) != 0; in isPackageTestOnly()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/fuelgauge/
DBatteryEntry.java298 final ApplicationInfo ai = ipm.getApplicationInfo(packageLabels[i], in loadNameAndIcon() local
300 if (ai == null) { in loadNameAndIcon()
305 CharSequence label = ai.loadLabel(pm); in loadNameAndIcon()
309 if (ai.icon != 0) { in loadNameAndIcon()
311 icon = ai.loadIcon(pm); in loadNameAndIcon()
/packages/apps/Settings/src/com/android/settings/fuelgauge/
DBatteryEntry.java298 final ApplicationInfo ai = ipm.getApplicationInfo(packageLabels[i], in loadNameAndIcon() local
300 if (ai == null) { in loadNameAndIcon()
305 CharSequence label = ai.loadLabel(pm); in loadNameAndIcon()
309 if (ai.icon != 0) { in loadNameAndIcon()
311 icon = ai.loadIcon(pm); in loadNameAndIcon()

1234