/frameworks/base/core/tests/coretests/src/android/app/ |
D | PropertyInvalidatedCacheTests.java | 51 boolean query(int x) { in query() method in PropertyInvalidatedCacheTests.ServerProxy 78 return mServer.query(x); in apply() 111 assertEquals(tester.value(3), testCache.query(3)); in testBasicCache() 113 assertEquals(tester.value(3), testCache.query(3)); in testBasicCache() 116 assertEquals(tester.value(3), testCache.query(3)); in testBasicCache() 118 assertEquals(tester.value(5), testCache.query(5)); in testBasicCache() 120 assertEquals(tester.value(5), testCache.query(5)); in testBasicCache() 122 assertEquals(tester.value(3), testCache.query(3)); in testBasicCache() 127 assertEquals(tester.value(3), testCache.query(3)); in testBasicCache() 131 assertEquals(tester.value(12), testCache.query(12)); in testBasicCache() [all …]
|
/frameworks/base/core/tests/coretests/src/android/os/ |
D | IpcDataCacheTest.java | 51 boolean query(int x) { in query() method in IpcDataCacheTest.ServerProxy 57 boolean query(int x, boolean y) throws RemoteException { in query() method in IpcDataCacheTest.ServerProxy 61 return query(x); in query() 86 return mServer.query(x); in apply() 119 assertEquals(tester.value(3), testCache.query(3)); in testBasicCache() 121 assertEquals(tester.value(3), testCache.query(3)); in testBasicCache() 124 assertEquals(tester.value(3), testCache.query(3)); in testBasicCache() 126 assertEquals(tester.value(5), testCache.query(5)); in testBasicCache() 128 assertEquals(tester.value(5), testCache.query(5)); in testBasicCache() 130 assertEquals(tester.value(3), testCache.query(3)); in testBasicCache() [all …]
|
/frameworks/base/telephony/common/android/telephony/ |
D | LocationAccessPolicy.java | 217 private static void logError(Context context, LocationPermissionQuery query, String errorMsg) { in logError() argument 218 if (query.logAsInfo) { in logError() 255 LocationPermissionQuery query, String permissionToCheck) { in checkAppLocationPermissionHelper() argument 261 boolean hasManifestPermission = checkManifestPermission(context, query.callingPid, in checkAppLocationPermissionHelper() 262 query.callingUid, permissionToCheck); in checkAppLocationPermissionHelper() 267 .noteOpNoThrow(getAppOpsString(permissionToCheck), query.callingUid, in checkAppLocationPermissionHelper() 268 query.callingPackage, query.callingFeatureId, null); in checkAppLocationPermissionHelper() 276 Log.i(TAG, query.callingPackage + " is aware of " + locationTypeForLog + " but the" in checkAppLocationPermissionHelper() 283 ? query.minSdkVersionForFine : query.minSdkVersionForCoarse; in checkAppLocationPermissionHelper() 287 String errorMsg = "Allowing " + query.callingPackage + " " + locationTypeForLog in checkAppLocationPermissionHelper() [all …]
|
/frameworks/base/core/java/android/app/compat/ |
D | ChangeIdStateCache.java | 87 public Boolean recompute(ChangeIdStateQuery query) { in recompute() argument 90 if (query.type == ChangeIdStateQuery.QUERY_BY_PACKAGE_NAME) { in recompute() 91 return getPlatformCompatService().isChangeEnabledByPackageName(query.changeId, in recompute() 92 query.packageName, in recompute() 93 query.userId); in recompute() 94 } else if (query.type == ChangeIdStateQuery.QUERY_BY_UID) { in recompute() 95 return getPlatformCompatService().isChangeEnabledByUid(query.changeId, query.uid); in recompute() 97 throw new IllegalArgumentException("Invalid query type: " + query.type); in recompute()
|
/frameworks/base/core/java/android/database/sqlite/ |
D | SQLiteDirectCursorDriver.java | 45 public Cursor query(CursorFactory factory, String[] selectionArgs) { in query() method in SQLiteDirectCursorDriver 46 final SQLiteQuery query = new SQLiteQuery(mDatabase, mSql, mCancellationSignal); in query() local 49 query.bindAllArgsAsStrings(selectionArgs); in query() 52 cursor = new SQLiteCursor(this, mEditTable, query); in query() 54 cursor = factory.newCursor(mDatabase, this, mEditTable, query); in query() 57 query.close(); in query() 61 mQuery = query; in query()
|
D | SQLiteQueryBuilder.java | 381 StringBuilder query = new StringBuilder(120); in buildQueryString() local 383 query.append("SELECT "); in buildQueryString() 385 query.append("DISTINCT "); in buildQueryString() 388 appendColumns(query, columns); in buildQueryString() 390 query.append("* "); in buildQueryString() 392 query.append("FROM "); in buildQueryString() 393 query.append(tables); in buildQueryString() 394 appendClause(query, " WHERE ", where); in buildQueryString() 395 appendClause(query, " GROUP BY ", groupBy); in buildQueryString() 396 appendClause(query, " HAVING ", having); in buildQueryString() [all …]
|
D | SQLiteCursor.java | 84 String editTable, SQLiteQuery query) { in SQLiteCursor() argument 85 this(driver, editTable, query); in SQLiteCursor() 98 public SQLiteCursor(SQLiteCursorDriver driver, String editTable, SQLiteQuery query) { in SQLiteCursor() argument 99 if (query == null) { in SQLiteCursor() 105 mQuery = query; in SQLiteCursor() 107 mColumns = query.getColumnNames(); in SQLiteCursor()
|
/frameworks/ex/common/java/com/android/common/ |
D | Search.java | 64 public static Cursor getSuggestions(Context context, SearchableInfo searchable, String query) { in getSuggestions() argument 65 return getSuggestions(context, searchable, query, -1); in getSuggestions() 78 String query, int limit) { in getSuggestions() argument 91 .query("") // TODO: Remove, workaround for a bug in Uri.writeToParcel() in getSuggestions() 108 selArgs = new String[] { query }; in getSuggestions() 110 uriBuilder.appendPath(query); in getSuggestions() 121 return context.getContentResolver().query(uri, null, selection, selArgs, null); in getSuggestions()
|
/frameworks/base/core/java/com/android/internal/os/ |
D | BatteryUsageStatsProvider.java | 115 BatteryUsageStatsQuery query = queries.get(i); in shouldUpdateStats() local 116 allowableStatsAge = Math.min(allowableStatsAge, query.getMaxStatsAge()); in shouldUpdateStats() 141 public BatteryUsageStats getBatteryUsageStats(BatteryUsageStatsQuery query) { in getBatteryUsageStats() argument 143 return getBatteryUsageStats(query, currentTimeMillis()); in getBatteryUsageStats() 148 private BatteryUsageStats getBatteryUsageStats(BatteryUsageStatsQuery query, in getBatteryUsageStats() argument 150 if (query.getToTimestamp() == 0) { in getBatteryUsageStats() 151 return getCurrentBatteryUsageStats(query, currentTimeMs); in getBatteryUsageStats() 153 return getAggregatedBatteryUsageStats(query); in getBatteryUsageStats() 158 private BatteryUsageStats getCurrentBatteryUsageStats(BatteryUsageStatsQuery query, in getCurrentBatteryUsageStats() argument 163 final boolean includePowerModels = (query.getFlags() in getCurrentBatteryUsageStats() [all …]
|
D | PowerCalculator.java | 56 long rawRealtimeUs, long rawUptimeUs, BatteryUsageStatsQuery query) { in calculate() argument 61 calculateApp(app, app.getBatteryStatsUid(), rawRealtimeUs, rawUptimeUs, query); in calculate() 74 long rawRealtimeUs, long rawUptimeUs, BatteryUsageStatsQuery query) { in calculateApp() argument 84 long measuredEnergyUC, @NonNull BatteryUsageStatsQuery query) { in getPowerModel() argument 86 && !query.shouldForceUsePowerProfileModel()) { in getPowerModel()
|
D | BluetoothPowerCalculator.java | 70 long rawRealtimeUs, long rawUptimeUs, BatteryUsageStatsQuery query) { in calculate() argument 83 if (query.isProcessStateDataNeeded()) { in calculate() 91 calculateApp(app, powerAndDuration, query); in calculate() 95 final int powerModel = getPowerModel(measuredChargeUC, query); in calculate() 99 activityCounter, query.shouldForceUsePowerProfileModel(), powerAndDuration); in calculate() 127 BatteryUsageStatsQuery query) { in calculateApp() argument 130 final int powerModel = getPowerModel(measuredChargeUC, query); in calculateApp() 134 activityCounter, query.shouldForceUsePowerProfileModel(), powerAndDuration); in calculateApp() 147 if (query.isProcessStateDataNeeded() && powerAndDuration.keys != null) { in calculateApp()
|
/frameworks/base/core/java/android/net/ |
D | Uri.java | 667 private Part query; field in Uri.StringUri 670 return query == null in getQueryPart() 671 ? query = Part.fromEncoded(parseQuery()) : query; in getQueryPart() 826 .query(getQueryPart()) in buildUpon() 1192 private final Part query; field in Uri.HierarchicalUri 1196 Part query, Part fragment) { in HierarchicalUri() argument 1200 this.query = Part.nonNull(query); in HierarchicalUri() 1212 final Part query = Part.readFrom(parcel); in readFrom() local 1214 return new HierarchicalUri(scheme, authority, path, query, fragment); in readFrom() 1226 query.writeTo(parcel); in writeToParcel() [all …]
|
/frameworks/base/core/java/android/app/ |
D | PropertyInvalidatedCache.java | 263 public abstract @Nullable R apply(@NonNull Q query); in apply() argument 269 public boolean shouldBypassCache(@NonNull Q query) { in shouldBypassCache() argument 508 public Result apply(Query query) { in apply() argument 509 return mCache.recompute(query); in apply() 774 public Result recompute(@NonNull Query query) { 775 return mComputer.apply(query); 785 public boolean bypass(@NonNull Query query) { 786 return mComputer.shouldBypassCache(query); 815 protected Result refresh(Result oldResult, Query query) { 911 public @Nullable Result query(@NonNull Query query) { [all …]
|
D | SearchManager.java | 743 public void triggerSearch(String query, in triggerSearch() argument 746 if (query == null || TextUtils.getTrimmedLength(query) == 0) { in triggerSearch() 750 startSearch(query, false, launchActivity, appSearchData, false); in triggerSearch() 880 public Cursor getSuggestions(SearchableInfo searchable, String query) { in getSuggestions() argument 881 return getSuggestions(searchable, query, -1); in getSuggestions() 896 public Cursor getSuggestions(SearchableInfo searchable, String query, int limit) { in getSuggestions() argument 909 .query("") // TODO: Remove, workaround for a bug in Uri.writeToParcel() in getSuggestions() 926 selArgs = new String[] { query }; in getSuggestions() 928 uriBuilder.appendPath(query); in getSuggestions() 938 return mContext.getContentResolver().query(uri, null, selection, selArgs, null); in getSuggestions()
|
/frameworks/base/services/tests/PackageManagerServiceTests/server/src/com/android/server/ |
D | PreferredComponentTest.java | 66 final List<ResolveInfo> query = new ArrayList<>(); in testPreferredComponent_sameSet_withAppInstalledByDeviceSetup() local 67 query.add(createResolveInfo(0, userId)); in testPreferredComponent_sameSet_withAppInstalledByDeviceSetup() 68 query.add(createResolveInfo(1, userId)); in testPreferredComponent_sameSet_withAppInstalledByDeviceSetup() 70 final ComponentName component = query.get(0).getComponentInfo().getComponentName(); in testPreferredComponent_sameSet_withAppInstalledByDeviceSetup() 92 assertTrue(pa.mPref.sameSet(query, true /* excludeSetupWizardPackage */, userId)); in testPreferredComponent_sameSet_withAppInstalledByDeviceSetup() 99 final List<ResolveInfo> query = new ArrayList<>(); in testPreferredComponent_notSameSet_withAppNotInstalledByDeviceSetup() local 100 query.add(createResolveInfo(0, userId)); in testPreferredComponent_notSameSet_withAppNotInstalledByDeviceSetup() 101 query.add(createResolveInfo(1, userId)); in testPreferredComponent_notSameSet_withAppNotInstalledByDeviceSetup() 103 final ComponentName component = query.get(0).getComponentInfo().getComponentName(); in testPreferredComponent_notSameSet_withAppNotInstalledByDeviceSetup() 125 assertFalse(pa.mPref.sameSet(query, true /* excludeSetupWizardPackage */, userId)); in testPreferredComponent_notSameSet_withAppNotInstalledByDeviceSetup()
|
/frameworks/base/tests/LocationTracker/src/com/android/locationtracker/data/ |
D | TrackerDataHelper.java | 108 public Cursor query(String tag, int limit) { in query() method in TrackerDataHelper 111 Cursor cursor = mContext.getContentResolver().query( in query() 128 public Cursor query(int limit) { in query() method in TrackerDataHelper 129 return query(null, limit); in query() 139 public Cursor query(String tag) { in query() method in TrackerDataHelper 140 return query(tag, Integer.MAX_VALUE); in query()
|
/frameworks/native/libs/vr/libbufferhubqueue/tests/ |
D | buffer_hub_queue_producer-test.cpp | 189 EXPECT_EQ(OK, mProducer->query(NATIVE_WINDOW_WIDTH, &value)); in TEST_F() 192 EXPECT_EQ(OK, mProducer->query(NATIVE_WINDOW_HEIGHT, &value)); in TEST_F() 195 EXPECT_EQ(OK, mProducer->query(NATIVE_WINDOW_FORMAT, &value)); in TEST_F() 198 EXPECT_EQ(OK, mProducer->query(NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS, &value)); in TEST_F() 203 mProducer->query(NATIVE_WINDOW_CONSUMER_RUNNING_BEHIND, &value)); in TEST_F() 206 EXPECT_EQ(OK, mProducer->query(NATIVE_WINDOW_CONSUMER_USAGE_BITS, &value)); in TEST_F() 219 EXPECT_EQ(BAD_VALUE, mProducer->query(/*what*/ -1, &value)); in TEST_F() 220 EXPECT_EQ(BAD_VALUE, mProducer->query(/*what*/ 0xDEADBEEF, &value)); in TEST_F() 222 mProducer->query(NATIVE_WINDOW_QUERY_LAST_OFF_BY_ONE, &value)); in TEST_F() 226 mProducer->query(NATIVE_WINDOW_QUEUES_TO_WINDOW_COMPOSER, &value)); in TEST_F() [all …]
|
/frameworks/base/core/java/android/content/pm/ |
D | ShortcutQueryWrapper.java | 37 public ShortcutQueryWrapper(LauncherApps.ShortcutQuery query) { in ShortcutQueryWrapper() argument 39 mChangedSince = query.mChangedSince; in ShortcutQueryWrapper() 40 mPackage = query.mPackage; in ShortcutQueryWrapper() 41 mLocusIds = query.mLocusIds; in ShortcutQueryWrapper() 42 mShortcutIds = query.mShortcutIds; in ShortcutQueryWrapper() 43 mActivity = query.mActivity; in ShortcutQueryWrapper() 44 mQueryFlags = query.mQueryFlags; in ShortcutQueryWrapper()
|
/frameworks/base/services/core/java/com/android/server/pm/ |
D | PreferredComponent.java | 198 public boolean sameSet(List<ResolveInfo> query, boolean excludeSetupWizardPackage, int userId) { in sameSet() argument 200 return query == null; in sameSet() 202 if (query == null) { in sameSet() 205 final int NQ = query.size(); in sameSet() 211 ResolveInfo ri = query.get(i); in sameSet() 295 public boolean isSuperset(List<ResolveInfo> query, boolean excludeSetupWizardPackage) { in isSuperset() argument 297 return query == null; in isSuperset() 299 if (query == null) { in isSuperset() 302 final int NQ = query.size(); in isSuperset() 310 ResolveInfo ri = query.get(i); in isSuperset() [all …]
|
/frameworks/native/libs/nativewindow/ |
D | ANativeWindow.cpp | 30 static int32_t query(ANativeWindow* window, int what) { in query() function 32 int res = window->query(window, what, &value); in query() 78 return query(window, NATIVE_WINDOW_WIDTH); in ANativeWindow_getWidth() 82 return query(window, NATIVE_WINDOW_HEIGHT); in ANativeWindow_getHeight() 86 return query(window, NATIVE_WINDOW_FORMAT); in ANativeWindow_getFormat() 126 if (!window || !query(window, NATIVE_WINDOW_IS_VALID)) in ANativeWindow_setBuffersTransform() 182 if (!window || !query(window, NATIVE_WINDOW_IS_VALID) || in ANativeWindow_setBuffersDataSpace() 191 if (!window || !query(window, NATIVE_WINDOW_IS_VALID)) in ANativeWindow_getBuffersDataSpace() 193 return query(window, NATIVE_WINDOW_DATASPACE); in ANativeWindow_getBuffersDataSpace() 202 if (!window || !query(window, NATIVE_WINDOW_IS_VALID)) { in ANativeWindow_tryAllocateBuffers() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/people/data/ |
D | ContactsQueryHelperTest.java | 98 assertFalse(mHelper.query(contactUri.toString())); in testQuerySQLiteException_returnsFalse() 106 assertFalse(mHelper.query(contactUri.toString())); in testQueryIllegalArgumentException_returnsFalse() 116 assertTrue(mHelper.query(contactUri.toString())); in testQueryWithUri() 129 assertTrue(mHelper.query(contactUri.toString())); in testQueryWithUriNotStarredNoPhoneNumber() 139 assertFalse(mHelper.query(contactUri.toString())); in testQueryWithUriNotFound() 148 assertTrue(mHelper.query(contactUri)); in testQueryWithPhoneNumber() 159 assertTrue(mHelper.query(contactUri)); in testQueryWithEmail() 183 assertFalse(mHelper.query(contactUri)); in testQueryWithUnsupportedScheme() 193 public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, in query() method in ContactsQueryHelperTest.ContactsContentProvider
|
/frameworks/base/core/java/android/os/ |
D | IpcDataCache.java | 257 public abstract @Nullable R apply(@NonNull Q query); in apply() argument 263 public boolean shouldBypassCache(@NonNull Q query) { in shouldBypassCache() argument 359 public @Nullable Result query(@NonNull Query query) { in query() argument 360 return super.query(query); in query() 558 Result apply(Query query) throws RemoteException; in apply() argument 574 public Result apply(Query query) { in apply() argument 576 return mHandler.apply(query); in apply()
|
/frameworks/av/media/codec2/hidl/1.0/utils/ |
D | Configurable.cpp | 59 Return<void> CachedConfigurable::query( in query() function in android::hardware::media::c2::V1_0::utils::CachedConfigurable 68 c2_status_t c2res = mIntf->query( in query() 161 for (const FieldSupportedValuesQuery &query : inFields) { in querySupportedValues() local 163 query.field.index, in querySupportedValues() 164 query.field.fieldId.offset, in querySupportedValues() 165 query.field.fieldId.size), in querySupportedValues() 166 query.type == FieldSupportedValuesQuery::Type::POSSIBLE ? in querySupportedValues()
|
/frameworks/base/core/java/com/android/internal/content/ |
D | SelectionBuilder.java | 99 public Cursor query(SQLiteDatabase db, String table, String[] columns, String orderBy) { in query() method in SelectionBuilder 100 return query(db, table, columns, null, null, orderBy, null); in query() 106 public Cursor query(SQLiteDatabase db, String table, String[] columns, String groupBy, in query() method in SelectionBuilder 108 return db.query(table, columns, getSelection(), getSelectionArgs(), groupBy, having, in query()
|
/frameworks/base/tests/BandwidthTests/src/com/android/tests/bandwidthenforcement/ |
D | BandwidthEnforcementTestService.java | 165 final byte[] query = buildDnsQuery("www", "android", "com"); in testDns() 167 query, query.length, InetAddress.parseNumericAddress("8.8.8.8"), 53); in testDns() 170 final byte[] reply = new byte[query.length]; in testDns() 190 private static byte[] buildDnsQuery(String... query) throws IOException { in buildDnsQuery() argument 204 for (String phrase : query) { in buildDnsQuery()
|