Home
last modified time | relevance | path

Searched refs:Preconditions (Results 1 – 25 of 564) sorted by relevance

12345678910>>...23

/packages/modules/Connectivity/nearby/service/java/com/android/server/nearby/presence/
DDataElementHeader.java24 import com.android.internal.util.Preconditions;
71 Preconditions.checkArgument(version == BroadcastRequest.PRESENCE_VERSION_V1, in DataElementHeader()
73 Preconditions.checkArgument(dataLength >= 0, "Length should not be negative."); in DataElementHeader()
74 Preconditions.checkArgument(dataLength < (1 << TAG_OFFSET), in DataElementHeader()
99 Preconditions.checkState(mVersion == BroadcastRequest.PRESENCE_VERSION_V1,
167 Preconditions.checkArgument(length >= 0, "Length should not be negative.");
168 Preconditions.checkArgument(length < (1 << SINGLE_AVAILABLE_LENGTH_BIT),
178 Preconditions.checkArgument(type >= 0, "Type should not be negative.");
179 Preconditions.checkArgument(type < (1 << SINGLE_AVAILABLE_TYPE_BIT),
189 Preconditions.checkArgument(!isExtending(header),
[all …]
DFastAdvertisement.java24 import com.android.internal.util.Preconditions;
67 Preconditions.checkArgument( in createFromRequest()
70 Preconditions.checkArgument( in createFromRequest()
73 Preconditions.checkArgument( in createFromRequest()
75 Preconditions.checkArgument( in createFromRequest()
132 Preconditions.checkArgument( in FastAdvertisement()
/packages/services/Car/car-builtin-lib/src/android/car/builtin/media/
DAudioManagerHelper.java47 import com.android.internal.util.Preconditions;
81 Preconditions.checkNotNull(audioManager, in setAudioDeviceGain()
105 Preconditions.checkStringNotEmpty(address, "Device Address can not be empty"); in getAudioDeviceInfo()
123 Preconditions.checkArgument(deviceport.gains().length > 0, in getAudioGain()
135 Preconditions.checkArgument(audioGain.maxValue() >= audioGain.minValue(), in checkAudioGainConfiguration()
138 Preconditions.checkArgument((audioGain.defaultValue() >= audioGain.minValue()) in checkAudioGainConfiguration()
142 Preconditions.checkArgument( in checkAudioGainConfiguration()
146 Preconditions.checkArgument( in checkAudioGainConfiguration()
172 Preconditions.checkNotNull(sourceDevice, in createAudioPatch()
174 Preconditions.checkNotNull(sinkDevice, in createAudioPatch()
[all …]
/packages/modules/AdServices/adservices/framework/java/android/adservices/adselection/
DReportEventRequest.java27 import com.android.internal.util.Preconditions;
62 Preconditions.checkArgument( in ReportEventRequest()
64 Preconditions.checkArgument( in ReportEventRequest()
67 Preconditions.checkArgument( in ReportEventRequest()
70 Preconditions.checkArgument( in ReportEventRequest()
179 Preconditions.checkArgument( in Builder()
181 Preconditions.checkArgument( in Builder()
184 Preconditions.checkArgument( in Builder()
187 Preconditions.checkArgument( in Builder()
205 Preconditions.checkArgument( in setAdSelectionId()
[all …]
DUpdateAdCounterHistogramRequest.java28 import com.android.internal.util.Preconditions;
150 Preconditions.checkArgument( in Builder()
152 Preconditions.checkArgument( in Builder()
154 Preconditions.checkArgument( in Builder()
172 Preconditions.checkArgument( in setAdSelectionId()
186 Preconditions.checkArgument( in setAdEventType()
188 Preconditions.checkArgument( in setAdEventType()
/packages/modules/Connectivity/remoteauth/service/java/com/android/server/remoteauth/ranging/
DSessionParameters.java24 import com.android.internal.util.Preconditions;
207 Preconditions.checkNotNull(baseKey); in setBaseKey()
219 Preconditions.checkNotNull(syncData); in setSyncData()
230 Preconditions.checkArgument(!mDeviceId.isEmpty(), "deviceId must not be empty."); in build()
231 Preconditions.checkArgument( in build()
233 Preconditions.checkArgument(mDeviceRole != DEVICE_ROLE_UNKNOWN, "Unknown deviceRole"); in build()
234 Preconditions.checkArgument( in build()
237 Preconditions.checkArgument( in build()
245 Preconditions.checkArgument( in build()
248 Preconditions.checkArgument( in build()
/packages/services/Car/libs/car-helper-lib/src/com/android/car/internal/user/
DUserHelper.java30 import com.android.internal.util.Preconditions;
77 Preconditions.checkArgument(context != null, "Context cannot be null"); in grantAdminPermissions()
78 Preconditions.checkArgument(user != null, "User cannot be null"); in grantAdminPermissions()
104 Preconditions.checkArgument(context != null, "Context cannot be null"); in setDefaultNonAdminRestrictions()
105 Preconditions.checkArgument(user != null, "User cannot be null"); in setDefaultNonAdminRestrictions()
122 Preconditions.checkArgument(context != null, "Context cannot be null"); in assignDefaultIcon()
123 Preconditions.checkArgument(user != null, "User cannot be null"); in assignDefaultIcon()
143 Preconditions.checkArgument(context != null, "Context cannot be null"); in getGuestDefaultIcon()
157 Preconditions.checkArgument(context != null, "Context cannot be null"); in getUserNameIconColor()
158 Preconditions.checkArgument(user != null, "User cannot be null"); in getUserNameIconColor()
/packages/modules/Connectivity/remoteauth/service/java/com/android/server/remoteauth/connectivity/
DCdmConnectivityManager.java31 import com.android.internal.util.Preconditions;
71 Preconditions.checkNotNull(discoveredDeviceReceiver); in notifyOnDiscovered()
72 Preconditions.checkNotNull(device); in notifyOnDiscovered()
86 Preconditions.checkNotNull(discoveryFilter); in startDiscoveryAsync()
87 Preconditions.checkNotNull(discoveredDeviceReceiver); in startDiscoveryAsync()
144 Preconditions.checkNotNull(mCompanionDeviceManagerWrapper); in startDiscovery()
145 Preconditions.checkNotNull(discoveryFilter); in startDiscovery()
146 Preconditions.checkNotNull(discoveredDeviceReceiver); in startDiscovery()
164 Preconditions.checkNotNull(discoveryFilter); in stopDiscovery()
165 Preconditions.checkNotNull(discoveredDeviceReceiver); in stopDiscovery()
/packages/services/Car/service/src/com/android/car/audio/hal/
DHalAudioDeviceInfo.java32 import com.android.internal.util.Preconditions;
51 Preconditions.checkArgument(port.ext.getTag() == AUDIO_PORT_EXT_DEVICE, in HalAudioDeviceInfo()
143 Preconditions.checkArgument((device.type.type == OUT_DEVICE) in checkIfAudioDeviceIsValidOutputBus()
147 Preconditions.checkArgument(device.type.connection.equals(CONNECTION_BUS), in checkIfAudioDeviceIsValidOutputBus()
151 Preconditions.checkStringNotEmpty(device.address.getId(), in checkIfAudioDeviceIsValidOutputBus()
157 Preconditions.checkArgument(gains.length > 0, "Audio port must have gains defined"); in getAudioGain()
168 Preconditions.checkArgument(gain.maxValue >= gain.minValue, in checkAudioGainConfiguration()
171 Preconditions.checkArgument((gain.defaultValue >= gain.minValue) in checkAudioGainConfiguration()
175 Preconditions.checkArgument(gain.stepValue > 0, in checkAudioGainConfiguration()
177 Preconditions.checkArgument( in checkAudioGainConfiguration()
[all …]
/packages/services/Car/car-lib/src/android/car/oem/
DOemCarAudioFocusEvaluationRequest.java32 import com.android.internal.util.Preconditions;
210 Preconditions.checkArgument(mutedVolumeGroups != null, in OemCarAudioFocusEvaluationRequest()
212 Preconditions.checkArgument(focusHolders != null, in OemCarAudioFocusEvaluationRequest()
214 Preconditions.checkArgument(focusLosers != null, in OemCarAudioFocusEvaluationRequest()
260 Preconditions.checkArgument(mutedVolumeGroups != null, in Builder()
262 Preconditions.checkArgument(focusHolders != null, in Builder()
264 Preconditions.checkArgument(focusLosers != null, in Builder()
299 Preconditions.checkArgument(audioFocusRequest != null, in setAudioFocusRequest()
312 Preconditions.checkArgument(mutedVolumeGroups != null, in setMutedVolumeGroups()
321 Preconditions.checkArgument(mutedVolumeGroup != null, in addMutedVolumeGroups()
[all …]
DOemCarAudioFocusResult.java33 import com.android.internal.util.Preconditions;
59 Preconditions.checkArgument(newlyLostAudioFocusEntries != null, in OemCarAudioFocusResult()
61 Preconditions.checkArgument(newlyBlockedAudioFocusEntries != null, in OemCarAudioFocusResult()
273 Preconditions.checkState(carAudioFadeManagerConfiguration(), in ensureCarAudioFadeManagerConfigIsEnabled()
301 Preconditions.checkArgument(newlyLostAudioFocusEntries != null, in Builder()
303 Preconditions.checkArgument(newlyBlockedAudioFocusEntries != null, in Builder()
313 Preconditions.checkArgument(focusEntry != null, in setAudioFocusEntry()
325 Preconditions.checkArgument(newlyLostAudioFocusEntries != null, in setNewlyLostAudioFocusEntries()
336 Preconditions.checkArgument(lossEntry != null, in addNewlyLostAudioFocusEntry()
349 Preconditions.checkArgument(newlyBlockedAudioFocusEntries != null, in setNewlyBlockedAudioFocusEntries()
[all …]
/packages/apps/Tag/src/com/android/apps/tag/record/
DTextRecord.java21 import com.google.common.base.Preconditions;
49 mLanguageCode = Preconditions.checkNotNull(languageCode); in TextRecord()
50 mText = Preconditions.checkNotNull(text); in TextRecord()
81 Preconditions.checkArgument(record.getTnf() == NdefRecord.TNF_WELL_KNOWN); in parse()
82 Preconditions.checkArgument(Arrays.equals(record.getType(), NdefRecord.RTD_TEXT)); in parse()
86 Preconditions.checkArgument(payload.length > 0); in parse()
104 Preconditions.checkArgument(payload.length - languageCodeLength - 1 >= 0); in parse()
134 Preconditions.checkNotNull(text); in newTextRecord()
135 Preconditions.checkNotNull(locale); in newTextRecord()
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/adselection/encryption/
DJoinEncryptionKeyParser.java25 import com.google.common.base.Preconditions;
50 Preconditions.checkNotNull(dbEncryptionKey, "DBEncryption key is null."); in parseDbEncryptionKey()
51 Preconditions.checkArgument( in parseDbEncryptionKey()
66 Preconditions.checkArgument( in getDbEncryptionKeys()
69 Preconditions.checkArgument( in getDbEncryptionKeys()
75 Preconditions.checkArgument( in getDbEncryptionKeys()
102 Preconditions.checkNotNull(key, "AdSelectionEncryptionKey is null."); in getObliviousHttpKeyConfig()
103 Preconditions.checkArgument( in getObliviousHttpKeyConfig()
/packages/providers/MediaProvider/pdf/framework/java/android/graphics/pdf/models/
DFormWidgetInfo.java27 import android.graphics.pdf.utils.Preconditions;
359 mWidgetRect = Preconditions.checkNotNull(widgetRect, "widgetRect cannot be null"); in Builder()
360 mTextValue = Preconditions.checkNotNull(textValue, "textValue cannot be null"); in Builder()
361 mAccessibilityLabel = Preconditions.checkNotNull(accessibilityLabel, in Builder()
380 Preconditions.checkArgument(mWidgetType == WIDGET_TYPE_COMBOBOX in setEditableText()
395 Preconditions.checkArgument(mWidgetType == WIDGET_TYPE_LISTBOX, in setMultiSelect()
408 Preconditions.checkArgument(mWidgetType == WIDGET_TYPE_TEXTFIELD, in setMultiLineText()
423 Preconditions.checkArgument(maxLength > 0, "Invalid max length"); in setMaxLength()
424 Preconditions.checkArgument(mWidgetType == WIDGET_TYPE_TEXTFIELD, in setMaxLength()
438 Preconditions.checkArgument(fontSize > 0, "Invalid font size"); in setFontSize()
[all …]
DFormEditRecord.java26 import android.graphics.pdf.utils.Preconditions;
241 Preconditions.checkArgument(pageNumber >= 0, "Invalid pageNumber."); in Builder()
242 Preconditions.checkArgument(widgetIndex >= 0, "Invalid widgetIndex."); in Builder()
260 Preconditions.checkNotNull( in build()
264 Preconditions.checkNotNull( in build()
269 Preconditions.checkNotNull( in build()
284 Preconditions.checkArgument( in setClickPoint()
286 Preconditions.checkNotNull(clickPoint, "Click point cannot be null"); in setClickPoint()
298 Preconditions.checkArgument( in setSelectedIndices()
312 Preconditions.checkArgument( in setText()
/packages/providers/MediaProvider/pdf/framework/java/android/graphics/pdf/content/
DPdfPageGotoLinkContent.java25 import android.graphics.pdf.utils.Preconditions;
67 Preconditions.checkNotNull(bounds, "Bounds cannot be null"); in PdfPageGotoLinkContent()
68 Preconditions.checkArgument(!bounds.isEmpty(), "Bounds cannot be empty"); in PdfPageGotoLinkContent()
69 Preconditions.checkNotNull(destination, "Destination cannot be null"); in PdfPageGotoLinkContent()
155 Preconditions.checkArgument(pageNumber >= 0, "Page number must be" in Destination()
157 Preconditions.checkArgument(xCoordinate >= 0, "X coordinate " in Destination()
159 Preconditions.checkArgument(yCoordinate >= 0, "Y coordinate must " in Destination()
161 Preconditions.checkArgument(zoom >= 0, "Zoom factor number must be " in Destination()
DPdfPageTextContent.java23 import android.graphics.pdf.utils.Preconditions;
47 Preconditions.checkNotNull(text, "Text cannot be null"); in PdfPageTextContent()
61 Preconditions.checkNotNull(text, "Text cannot be null"); in PdfPageTextContent()
62 Preconditions.checkNotNull(bounds, "Bounds cannot be null"); in PdfPageTextContent()
63 Preconditions.checkArgument(!bounds.isEmpty(), "Bounds cannot be empty"); in PdfPageTextContent()
/packages/providers/MediaProvider/pdf/framework/java/android/graphics/pdf/
DPdfProcessor.java41 import android.graphics.pdf.utils.Preconditions;
102 Preconditions.checkNotNull(fileDescriptor, "Input FD cannot be null"); in create()
239 Preconditions.checkNotNull(bitmap, "Destination bitmap cannot be null"); in renderPage()
240 Preconditions.checkNotNull(params, "RenderParams cannot be null"); in renderPage()
241 Preconditions.checkArgument(bitmap.getConfig() == Bitmap.Config.ARGB_8888, in renderPage()
243 Preconditions.checkArgument(transform == null || transform.isAffine(), in renderPage()
246 Preconditions.checkArgument(renderMode == RenderParams.RENDER_MODE_FOR_DISPLAY in renderPage()
248 Preconditions.checkArgument(clipInBitmap(destClip, bitmap), "destClip not in bounds"); in renderPage()
295 Preconditions.checkNotNull(query, "Search query cannot be null"); in searchPageText()
328 Preconditions.checkNotNull(start, "Start selection boundary cannot be null"); in selectPageText()
[all …]
/packages/apps/Settings/src/com/android/settings/deletionhelper/
DAutomaticStorageManagerSwitchBarController.java29 import com.android.internal.util.Preconditions;
52 mContext = Preconditions.checkNotNull(context); in AutomaticStorageManagerSwitchBarController()
53 mSwitchBar = Preconditions.checkNotNull(switchBar); in AutomaticStorageManagerSwitchBarController()
54 mMetrics = Preconditions.checkNotNull(metrics); in AutomaticStorageManagerSwitchBarController()
55 mDaysToRetainPreference = Preconditions.checkNotNull(daysToRetainPreference); in AutomaticStorageManagerSwitchBarController()
56 mFragmentManager = Preconditions.checkNotNull(fragmentManager); in AutomaticStorageManagerSwitchBarController()
/packages/modules/Permission/framework-s/java/android/app/role/
DRoleControllerService.java38 import com.android.internal.util.Preconditions;
143 Preconditions.checkStringNotEmpty(roleName, "roleName cannot be null or empty"); in onBind()
144 Preconditions.checkStringNotEmpty(packageName, in onBind()
162 Preconditions.checkStringNotEmpty(roleName, "roleName cannot be null or empty"); in onBind()
163 Preconditions.checkStringNotEmpty(packageName, in onBind()
180 Preconditions.checkStringNotEmpty(roleName, "roleName cannot be null or empty"); in onBind()
223 Preconditions.checkStringNotEmpty(roleName, "roleName cannot be null or empty");
224 Preconditions.checkStringNotEmpty(packageName,
238 Preconditions.checkStringNotEmpty(roleName, "roleName cannot be null or empty");
239 Preconditions.checkStringNotEmpty(packageName,
[all …]
DRoleManager.java49 import com.android.internal.util.Preconditions;
302 Preconditions.checkStringNotEmpty(roleName, "roleName cannot be null or empty"); in createRequestRoleIntent()
318 Preconditions.checkStringNotEmpty(roleName, "roleName cannot be null or empty"); in isRoleAvailable()
336 Preconditions.checkStringNotEmpty(roleName, "roleName cannot be null or empty"); in isRoleHeld()
390 Preconditions.checkStringNotEmpty(roleName, "roleName cannot be null or empty"); in getRoleHoldersAsUser()
425 Preconditions.checkStringNotEmpty(roleName, "roleName cannot be null or empty"); in addRoleHolderAsUser()
426 Preconditions.checkStringNotEmpty(packageName, "packageName cannot be null or empty"); in addRoleHolderAsUser()
463 Preconditions.checkStringNotEmpty(roleName, "roleName cannot be null or empty"); in removeRoleHolderAsUser()
464 Preconditions.checkStringNotEmpty(packageName, "packageName cannot be null or empty"); in removeRoleHolderAsUser()
500 Preconditions.checkStringNotEmpty(roleName, "roleName cannot be null or empty"); in clearRoleHoldersAsUser()
[all …]
/packages/apps/Camera2/src/com/android/camera/util/
DJpegUtilNative.java25 import com.google.common.base.Preconditions;
212 Preconditions.checkState((degrees % 90) == 0, "Rotation must be a multiple of 90 degrees," + in compressJpegFromYUV420Image()
216 Preconditions.checkState(outBuf.isDirect(), "Output buffer must be direct"); in compressJpegFromYUV420Image()
217 Preconditions.checkState(crop.left < crop.right, "Invalid crop rectangle: " + in compressJpegFromYUV420Image()
219 Preconditions.checkState(crop.top < crop.bottom, "Invalid crop rectangle: " + in compressJpegFromYUV420Image()
222 Preconditions.checkState(img.getFormat() == ImageFormat.YUV_420_888, "Only " + in compressJpegFromYUV420Image()
225 Preconditions.checkState(planeList.size() == NUM_PLANES); in compressJpegFromYUV420Image()
234 Preconditions.checkState(plane.getBuffer().isDirect()); in compressJpegFromYUV420Image()
/packages/modules/Connectivity/nearby/framework/java/android/nearby/
DNearbyManager.java39 import com.android.internal.util.Preconditions;
216 Preconditions.checkState(transport.isRegistered()); in startScan()
246 Preconditions.checkArgument(scanCallback != null, in stopScan()
286 Preconditions.checkState(transport.isRegistered()); in startBroadcast()
351 Preconditions.checkArgument(executor != null, "illegal null executor"); in OffloadTransport()
352 Preconditions.checkArgument(consumer != null, "illegal null consumer"); in OffloadTransport()
375 Preconditions.checkArgument(scanCallback != null, in ScanListenerTransport()
377 Preconditions.checkState(ScanRequest.isValidScanType(scanType), in ScanListenerTransport()
386 Preconditions.checkArgument( in setExecutor()
454 Preconditions.checkArgument( in setExecutor()
[all …]
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/adselection/
DAdCounterHistogramUpdaterImpl.java31 import com.google.common.base.Preconditions;
63 Preconditions.checkArgument(absoluteMaxTotalHistogramEventCount > 0); in AdCounterHistogramUpdaterImpl()
64 Preconditions.checkArgument(lowerMaxTotalHistogramEventCount > 0); in AdCounterHistogramUpdaterImpl()
65 Preconditions.checkArgument(absoluteMaxPerBuyerHistogramEventCount > 0); in AdCounterHistogramUpdaterImpl()
66 Preconditions.checkArgument(lowerMaxPerBuyerHistogramEventCount > 0); in AdCounterHistogramUpdaterImpl()
67 Preconditions.checkArgument( in AdCounterHistogramUpdaterImpl()
69 Preconditions.checkArgument( in AdCounterHistogramUpdaterImpl()
162 Preconditions.checkArgument( in updateNonWinHistogram()
/packages/apps/Camera2/src/com/android/camera/processing/memory/
DLruPool.java19 import com.google.common.base.Preconditions;
121 Preconditions.checkArgument(maxSize > 0, "maxSize must be > 0."); in LruPool()
146 Preconditions.checkNotNull(key); in acquire()
172 Preconditions.checkNotNull(key); in add()
173 Preconditions.checkNotNull(value); in add()
252 Preconditions.checkArgument(result >= 0, "Size was < 0."); in checkedSizeOf()

12345678910>>...23