Home
last modified time | relevance | path

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

12345678910>>...24

/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/devicepolicy/
DScreenCaptureDevicePolicyResolverTest.kt35 abstract class BaseScreenCaptureDevicePolicyResolverTest(private val precondition: Preconditions) :
38 abstract class Preconditions( class
98 Preconditions( in getParams()
109 Preconditions( in getParams()
120 Preconditions( in getParams()
131 Preconditions( in getParams()
142 Preconditions( in getParams()
153 Preconditions( in getParams()
164 Preconditions( in getParams()
175 Preconditions( in getParams()
[all …]
/frameworks/base/core/java/android/privacy/internal/rappor/
DRapporConfig.java22 import com.android.internal.util.Preconditions;
55 Preconditions.checkArgument(!TextUtils.isEmpty(encoderId), "encoderId cannot be empty"); in RapporConfig()
57 Preconditions.checkArgument(numBits > 0, "numBits needs to be > 0"); in RapporConfig()
59 Preconditions.checkArgument(probabilityF >= 0 && probabilityF <= 1, in RapporConfig()
62 Preconditions.checkArgument(probabilityP >= 0 && probabilityP <= 1, in RapporConfig()
65 Preconditions.checkArgument(probabilityQ >= 0 && probabilityQ <= 1, in RapporConfig()
68 Preconditions.checkArgument(numCohorts > 0, "numCohorts needs to be > 0"); in RapporConfig()
70 Preconditions.checkArgument(numBloomHashes > 0, "numBloomHashes needs to be > 0"); in RapporConfig()
/frameworks/base/services/core/java/com/android/server/location/provider/
DDelegateLocationProvider.java23 import com.android.internal.util.Preconditions;
56 Preconditions.checkState(!mInitialized); in initializeDelegate()
69 Preconditions.checkState(mInitialized); in waitForInitialization()
87 Preconditions.checkState(mInitialized); in onStart()
93 Preconditions.checkState(mInitialized); in onStop()
99 Preconditions.checkState(mInitialized); in onSetRequest()
105 Preconditions.checkState(mInitialized); in onFlush()
111 Preconditions.checkState(mInitialized); in onExtraCommand()
117 Preconditions.checkState(mInitialized); in dump()
/frameworks/base/services/core/java/com/android/server/location/gnss/hal/
DGnssNative.java41 import com.android.internal.util.Preconditions;
370 Preconditions.checkState(isSupported()); in create()
371 Preconditions.checkState(sInstance == null); in create()
425 Preconditions.checkState(!mRegistered); in addBaseCallbacks()
430 Preconditions.checkState(!mRegistered); in addStatusCallbacks()
436 Preconditions.checkState(!mRegistered); in addSvStatusCallbacks()
442 Preconditions.checkState(!mRegistered); in addNmeaCallbacks()
448 Preconditions.checkState(!mRegistered); in addLocationCallbacks()
454 Preconditions.checkState(!mRegistered); in addMeasurementCallbacks()
460 Preconditions.checkState(!mRegistered); in addAntennaInfoCallbacks()
[all …]
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/domain/startable/
DScrimStartableTest.kt78 Preconditions( in <lambda>()
87 Preconditions( in <lambda>()
96 Preconditions( in <lambda>()
104 Preconditions( in <lambda>()
113 Preconditions( in <lambda>()
121 Preconditions( in <lambda>()
131 Preconditions( in <lambda>()
139 Preconditions( in <lambda>()
148 Preconditions( in <lambda>()
156 Preconditions( in <lambda>()
[all …]
/frameworks/base/media/java/android/media/
DHwAudioSource.java23 import com.android.internal.util.Preconditions;
58 Preconditions.checkNotNull(device); in HwAudioSource()
59 Preconditions.checkNotNull(attributes); in HwAudioSource()
60 Preconditions.checkArgument(device.isSource(), "Requires a source device"); in HwAudioSource()
142 Preconditions.checkState(!isPlaying(), "HwAudioSource is currently playing"); in start()
233 Preconditions.checkNotNull(attributes); in setAudioAttributes()
245 Preconditions.checkNotNull(info); in setAudioDeviceInfo()
246 Preconditions.checkArgument(info.isSource()); in setAudioDeviceInfo()
257 Preconditions.checkNotNull(mAudioDeviceInfo); in build()
DAudioPlaybackCaptureConfiguration.java27 import com.android.internal.util.Preconditions;
159 Preconditions.checkNotNull(projection); in Builder()
161 Preconditions.checkArgument(projection.getProjection().canProjectAudio(), in Builder()
180 Preconditions.checkState( in addMatchingUsage()
197 Preconditions.checkState( in addMatchingUid()
214 Preconditions.checkState( in excludeUsage()
233 Preconditions.checkState( in excludeUid()
/frameworks/base/core/java/android/provider/
DFontRequest.java21 import com.android.internal.util.Preconditions;
50 mProviderAuthority = Preconditions.checkNotNull(providerAuthority); in FontRequest()
51 mQuery = Preconditions.checkNotNull(query); in FontRequest()
52 mProviderPackage = Preconditions.checkNotNull(providerPackage); in FontRequest()
71 mProviderAuthority = Preconditions.checkNotNull(providerAuthority); in FontRequest()
72 mProviderPackage = Preconditions.checkNotNull(providerPackage); in FontRequest()
73 mQuery = Preconditions.checkNotNull(query); in FontRequest()
74 mCertificates = Preconditions.checkNotNull(certificates); in FontRequest()
/frameworks/base/core/java/android/service/controls/
DControl.java34 import com.android.internal.util.Preconditions;
157 Preconditions.checkNotNull(controlId); in Control()
158 Preconditions.checkNotNull(title); in Control()
159 Preconditions.checkNotNull(subtitle); in Control()
160 Preconditions.checkNotNull(appIntent); in Control()
161 Preconditions.checkNotNull(controlTemplate); in Control()
162 Preconditions.checkNotNull(statusText); in Control()
448 Preconditions.checkNotNull(controlId); in StatelessBuilder()
449 Preconditions.checkNotNull(appIntent); in StatelessBuilder()
460 Preconditions.checkNotNull(control); in StatelessBuilder()
[all …]
/frameworks/base/media/java/android/mtp/
DMtpObjectInfo.java22 import com.android.internal.util.Preconditions;
106 Preconditions.checkState(mCompressedSize >= 0); in getCompressedSize()
136 Preconditions.checkState(mThumbCompressedSize >= 0); in getThumbCompressedSize()
157 Preconditions.checkState(mThumbPixWidth >= 0); in getThumbPixWidth()
178 Preconditions.checkState(mThumbPixHeight >= 0); in getThumbPixHeight()
199 Preconditions.checkState(mImagePixWidth >= 0); in getImagePixWidth()
220 Preconditions.checkState(mImagePixHeight >= 0); in getImagePixHeight()
241 Preconditions.checkState(mImagePixDepth >= 0); in getImagePixDepth()
298 Preconditions.checkState(mSequenceNumber >= 0); in getSequenceNumber()
445 Preconditions.checkNotNull(value); in setKeywords()
[all …]
/frameworks/base/core/java/android/os/
DHidlMemoryUtil.java28 import com.android.internal.util.Preconditions;
73 Preconditions.checkNotNull(input); in byteArrayToHidlMemory()
115 Preconditions.checkNotNull(input); in byteListToHidlMemory()
142 Preconditions.checkNotNull(mem); in hidlMemoryToByteArray()
143 Preconditions.checkArgumentInRange(mem.getSize(), 0L, (long) Integer.MAX_VALUE, in hidlMemoryToByteArray()
145 Preconditions.checkArgument(mem.getSize() == 0 || mem.getName().equals("ashmem"), in hidlMemoryToByteArray()
168 Preconditions.checkNotNull(mem); in hidlMemoryToByteList()
169 Preconditions.checkArgumentInRange(mem.getSize(), 0L, (long) Integer.MAX_VALUE, in hidlMemoryToByteList()
171 Preconditions.checkArgument(mem.getSize() == 0 || mem.getName().equals("ashmem"), in hidlMemoryToByteList()
211 Preconditions.checkArgument(fd != null || size == 0); in fileDescriptorToHidlMemory()
/frameworks/base/location/java/android/location/
DLocationManager.java72 import com.android.internal.util.Preconditions;
771 Preconditions.checkArgument(provider != null, "invalid null provider"); in isProviderEnabledForUser()
800 Preconditions.checkArgument(provider != null, "invalid null provider"); in setProviderEnabledForUser()
912 Preconditions.checkArgument(provider != null, "invalid null provider"); in getLastKnownLocation()
913 Preconditions.checkArgument(lastLocationRequest != null, in getLastKnownLocation()
979 Preconditions.checkArgument(locationRequest.getProvider() != null); in getCurrentLocation()
1025 Preconditions.checkArgument(provider != null, "invalid null provider"); in getCurrentLocation()
1026 Preconditions.checkArgument(locationRequest != null, "invalid null location request"); in getCurrentLocation()
1070 Preconditions.checkArgument(provider != null, "invalid null provider"); in requestSingleUpdate()
1109 Preconditions.checkArgument(criteria != null, "invalid null criteria"); in requestSingleUpdate()
[all …]
/frameworks/base/core/java/android/privacy/internal/longitudinalreporting/
DLongitudinalReportingConfig.java23 import com.android.internal.util.Preconditions;
66 Preconditions.checkArgument(probabilityF >= 0 && probabilityF <= 1, in LongitudinalReportingConfig()
69 Preconditions.checkArgument(probabilityP >= 0 && probabilityP <= 1, in LongitudinalReportingConfig()
72 Preconditions.checkArgument(probabilityQ >= 0 && probabilityQ <= 1, in LongitudinalReportingConfig()
75 Preconditions.checkArgument(!TextUtils.isEmpty(encoderId), "encoderId cannot be empty"); in LongitudinalReportingConfig()
/frameworks/base/services/core/java/com/android/server/cpu/
DCpuAvailabilityInfo.java22 import com.android.internal.util.Preconditions;
90 this.cpuset = Preconditions.checkArgumentInRange(cpuset, CPUSET_ALL, CPUSET_BACKGROUND, in CpuAvailabilityInfo()
93 Preconditions.checkArgumentNonnegative(dataTimestampUptimeMillis); in CpuAvailabilityInfo()
94 this.latestAvgAvailabilityPercent = Preconditions.checkArgumentNonnegative( in CpuAvailabilityInfo()
97 this.pastNMillisDuration = Preconditions.checkArgumentNonnegative( in CpuAvailabilityInfo()
/frameworks/base/services/core/java/com/android/server/location/injector/
DSystemAppOpsHelper.java24 import com.android.internal.util.Preconditions;
61 Preconditions.checkState(mAppOps != null); in startOpNoThrow()
79 Preconditions.checkState(mAppOps != null); in finishOp()
95 Preconditions.checkState(mAppOps != null); in checkOpNoThrow()
110 Preconditions.checkState(mAppOps != null); in noteOp()
127 Preconditions.checkState(mAppOps != null); in noteOpNoThrow()
/frameworks/base/graphics/java/android/graphics/text/
DTextRunShaper.java25 import com.android.internal.util.Preconditions;
68 Preconditions.checkNotNull(text); in shapeTextRun()
69 Preconditions.checkNotNull(paint); in shapeTextRun()
98 Preconditions.checkNotNull(text); in shapeTextRun()
99 Preconditions.checkNotNull(paint); in shapeTextRun()
DPositionedGlyphs.java28 import com.android.internal.util.Preconditions;
134 Preconditions.checkArgumentInRange(index, 0, glyphCount() - 1, "index"); in getFont()
146 Preconditions.checkArgumentInRange(index, 0, glyphCount() - 1, "index"); in getGlyphId()
157 Preconditions.checkArgumentInRange(index, 0, glyphCount() - 1, "index"); in getGlyphX()
168 Preconditions.checkArgumentInRange(index, 0, glyphCount() - 1, "index"); in getGlyphY()
180 Preconditions.checkArgumentInRange(index, 0, glyphCount() - 1, "index"); in getFakeBold()
192 Preconditions.checkArgumentInRange(index, 0, glyphCount() - 1, "index"); in getFakeItalic()
212 Preconditions.checkArgumentInRange(index, 0, glyphCount() - 1, "index"); in getWeightOverride()
230 Preconditions.checkArgumentInRange(index, 0, glyphCount() - 1, "index"); in getItalicOverride()
/frameworks/base/core/java/android/service/autofill/
DValidators.java20 import com.android.internal.util.Preconditions;
69 Preconditions.checkArgument(validator instanceof InternalValidator, in not()
75 Preconditions.checkArrayElementsNotNull(validators, "validators"); in getInternalValidators()
80 Preconditions.checkArgument((validators[i] instanceof InternalValidator), in getInternalValidators()
/frameworks/base/packages/PrintRecommendationService/src/com/android/printservice/recommendation/
DRemotePrintServicePlugin.java23 import com.android.printservice.recommendation.util.Preconditions;
80 name = Preconditions.checkArgumentPositive(mPlugin.getName(), "name"); in RemotePrintServicePlugin()
81 packageName = Preconditions.checkStringNotEmpty(mPlugin.getPackageName(), in RemotePrintServicePlugin()
133 Preconditions.checkState(isRunning); in onChanged()
138 mPrinters = Preconditions.checkCollectionElementsNotNull(discoveredPrinters, in onChanged()
/frameworks/base/core/tests/coretests/src/android/widget/espresso/
DCustomViewActions.java29 import com.android.internal.util.Preconditions;
48 Preconditions.checkNotNull(hRef); in longPressAtRelativeCoordinates()
49 Preconditions.checkNotNull(vRef); in longPressAtRelativeCoordinates()
78 this.hRef = Preconditions.checkNotNull(hRef); in RelativeCoordinatesProvider()
79 this.vRef = Preconditions.checkNotNull(vRef); in RelativeCoordinatesProvider()
/frameworks/base/core/java/android/graphics/fonts/
DFontFamilyUpdateRequest.java23 import com.android.internal.util.Preconditions;
90 Preconditions.checkStringNotEmpty(name); in Builder()
92 Preconditions.checkCollectionElementsNotNull(fonts, "fonts"); in Builder()
93 Preconditions.checkCollectionNotEmpty(fonts, "fonts"); in Builder()
180 Preconditions.checkStringNotEmpty(postScriptName); in Builder()
192 Preconditions.checkCollectionElementsNotNull(axes, "axes"); in setAxes()
203 Preconditions.checkArgumentNonnegative(index); in setIndex()
/frameworks/base/services/core/java/com/android/server/servicewatcher/
DServiceWatcherImpl.java38 import com.android.internal.util.Preconditions;
98 Preconditions.checkState(!mRegistered); in register()
109 Preconditions.checkState(mRegistered); in unregister()
199 Preconditions.checkState(Looper.myLooper() == mHandler.getLooper()); in bind()
228 Preconditions.checkState(Looper.myLooper() == mHandler.getLooper()); in unbind()
249 Preconditions.checkState(Looper.myLooper() == mHandler.getLooper()); in runOnBinder()
268 Preconditions.checkState(Looper.myLooper() == mHandler.getLooper()); in onServiceConnected()
269 Preconditions.checkState(mBinder == null); in onServiceConnected()
288 Preconditions.checkState(Looper.myLooper() == mHandler.getLooper()); in onServiceDisconnected()
304 Preconditions.checkState(Looper.myLooper() == mHandler.getLooper()); in onBindingDied()
/frameworks/base/core/java/android/service/credentials/
DCredentialEntry.java29 import com.android.internal.util.Preconditions;
86 mBeginGetCredentialOptionId = Preconditions.checkStringNotEmpty( in CredentialEntry()
89 mType = Preconditions.checkStringNotEmpty(type, "type must not be null, or " in CredentialEntry()
111 mBeginGetCredentialOptionId = Preconditions.checkStringNotEmpty( in CredentialEntry()
114 mType = Preconditions.checkStringNotEmpty(beginGetCredentialOption.getType(), in CredentialEntry()
/frameworks/base/core/java/android/app/people/
DPeopleManager.java34 import com.android.internal.util.Preconditions;
100 Preconditions.checkStringNotEmpty(packageName); in isConversation()
101 Preconditions.checkStringNotEmpty(shortcutId); in isConversation()
125 Preconditions.checkStringNotEmpty(conversationId); in addOrUpdateStatus()
144 Preconditions.checkStringNotEmpty(conversationId); in clearStatus()
145 Preconditions.checkStringNotEmpty(statusId); in clearStatus()
161 Preconditions.checkStringNotEmpty(conversationId); in clearStatuses()
/frameworks/opt/tv/tvsystem/java/com/android/libraries/tv/tvsystem/wifi/
DSoftApConfiguration.java28 import com.android.internal.util.Preconditions;
192 Preconditions.checkStringNotEmpty(ssid); in setSsid()
193 Preconditions.checkArgument(StandardCharsets.UTF_8.newEncoder().canEncode(ssid)); in setSsid()
211 Preconditions.checkArgument(!bssid.equals( in setBssid()
213 Preconditions.checkArgument(!bssid.equals(MacAddress.BROADCAST_ADDRESS)); in setBssid()
231 Preconditions.checkStringNotEmpty(passphrase); in setWpa2Passphrase()

12345678910>>...24