Home
last modified time | relevance | path

Searched refs:Util (Results 1 – 25 of 65) sorted by relevance

123

/packages/apps/LegacyCamera/tests/src/com/android/camera/unittest/
DCameraTest.java21 import com.android.camera.Util;
33 int h = Util.ORIENTATION_HYSTERESIS; in testRoundOrientation()
34 assertEquals(0, Util.roundOrientation(0, 0)); in testRoundOrientation()
35 assertEquals(0, Util.roundOrientation(359, 0)); in testRoundOrientation()
36 assertEquals(0, Util.roundOrientation(0 + 44 + h, 0)); in testRoundOrientation()
37 assertEquals(90, Util.roundOrientation(0 + 45 + h, 0)); in testRoundOrientation()
38 assertEquals(0, Util.roundOrientation(360 - 44 - h, 0)); in testRoundOrientation()
39 assertEquals(270, Util.roundOrientation(360 - 45 - h, 0)); in testRoundOrientation()
41 assertEquals(90, Util.roundOrientation(90, 90)); in testRoundOrientation()
42 assertEquals(90, Util.roundOrientation(90 + 44 + h, 90)); in testRoundOrientation()
[all …]
/packages/apps/Bluetooth/src/com/android/bluetooth/audio_util/
DMediaPlayerWrapper.java95 mCurrentData.queue = Util.toMetadataList(mContext, getQueue()); in MediaPlayerWrapper()
96 mCurrentData.metadata = Util.toMetadata(mContext, getMetadata()); in MediaPlayerWrapper()
120 return Util.toMetadata(mContext, getMetadata()); in getCurrentMetadata()
232 Metadata qitem = Util.toMetadata(mContext, currItem); in isMetadataSynced()
233 Metadata mdata = Util.toMetadata(mContext, getMetadata()); in isMetadataSynced()
264 Util.toMetadata(mContext, getMetadata()), in registerCallback()
266 Util.toMetadataList(mContext, getQueue())); in registerCallback()
301 Util.toMetadata(mContext, getMetadata()), in updateMediaController()
303 Util.toMetadataList(mContext, getQueue())); in updateMediaController()
311 Util.toMetadata(mContext, getMetadata()), in sendMediaUpdate()
[all …]
DMediaPlayerList.java79 private static final String NOW_PLAYING_ID_PATTERN = Util.NOW_PLAYING_PREFIX + "([0-9]*)";
304 return Util.NOW_PLAYING_PREFIX + state.getActiveQueueItemId(); in getCurrentMediaId()
310 if (player == null) return Util.empty_data(); in getCurrentSongInfo()
396 String displayName = Util.getDisplayName(mContext, player.getPackageName()); in getFolderItemsMediaPlayerList()
560 queue.add(Util.empty_data()); in removeMediaPlayer()
562 Util.empty_data(), in removeMediaPlayer()
719 queue.add(Util.empty_data()); in updateMediaForAudioPlayback()
721 Util.empty_data(), in updateMediaForAudioPlayback()
DGPMWrapper.java54 Metadata qitem = Util.toMetadata(mContext, currItem); in isMetadataSynced()
55 Metadata mdata = Util.toMetadata(mContext, getMetadata()); in isMetadataSynced()
/packages/apps/LegacyCamera/src/com/android/camera/
DCamera.java305 if (Util.getDisplayRotation(Camera.this) != mDisplayRotation) { in handleMessage()
390 Util.initializeScreenBrightness(getWindow(), getContentResolver()); in initializeFirstTime()
424 if ((mThumbnail == null || !Util.isUriValid(mThumbnail.getUri(), mContentResolver)) in updateThumbnailButton()
563 if (!Util.pointInView(e.getX(), e.getY(), popup) in onDown()
564 && !Util.pointInView(e.getX(), e.getY(), mIndicatorControlContainer) in onDown()
565 && !Util.pointInView(e.getX(), e.getY(), mPreviewFrame)) { in onDown()
993 String title = Util.createJpegName(dateTaken); in storeImage()
1020 Util.broadcastNewPicture(Camera.this, uri); in storeImage()
1050 Util.setRotationParameter(mParameters, mCameraId, mOrientation); in capture()
1052 Util.setGpsParameters(mParameters, loc); in capture()
[all …]
DVideoCamera.java298 if ((Util.getDisplayRotation(VideoCamera.this) != mDisplayRotation) in handleMessage()
356 Util.initializeScreenBrightness(getWindow(), getContentResolver()); in onCreate()
363 int intentCameraId = Util.getCameraFacingIntentExtras(this); in onCreate()
388 mCameraDevice = Util.openCamera(VideoCamera.this, mCameraId); in onCreate()
400 Util.enterLightsOutMode(getWindow()); in onCreate()
467 Util.showErrorAndFinish(this, R.string.cannot_connect_camera); in onCreate()
470 Util.showErrorAndFinish(this, R.string.camera_disabled); in onCreate()
552 mOrientation = Util.roundOrientation(orientation, mOrientation); in onOrientationChanged()
556 + Util.getDisplayRotation(VideoCamera.this); in onOrientationChanged()
808 Size optimalSize = Util.getOptimalPreviewSize(this, sizes, in getDesiredPreviewSize()
[all …]
DThumbnail.java118 Util.closeSilently(f); in saveTo()
119 Util.closeSilently(b); in saveTo()
120 Util.closeSilently(d); in saveTo()
145 Util.closeSilently(f); in loadFrom()
146 Util.closeSilently(b); in loadFrom()
147 Util.closeSilently(d); in loadFrom()
175 if (Util.isUriValid(lastMedia.uri, resolver)) { in getLastThumbnail()
DFocusManager.java127 Util.prepareMatrix(matrix, mirror, displayOrientation, in initialize()
278 int left = Util.clamp(x - focusWidth / 2, 0, previewWidth - focusWidth); in onTouch()
279 int top = Util.clamp(y - focusHeight / 2, 0, previewHeight - focusHeight); in onTouch()
451 int left = Util.clamp(x - areaWidth / 2, 0, previewWidth - areaWidth); in calculateTapArea()
452 int top = Util.clamp(y - areaHeight / 2, 0, previewHeight - areaHeight); in calculateTapArea()
456 Util.rectFToRect(rectF, rect); in calculateTapArea()
/packages/apps/SecureElement/src/com/android/se/security/
DApduFilter.java38 import com.android.se.internal.Util;
65 mApdu = Util.getMid(apduAndMask, 0, 4); in ApduFilter()
66 mMask = Util.getMid(apduAndMask, 4, 4); in ApduFilter()
103 return Util.mergeBytes(mApdu, mMask); in toBytes()
/packages/apps/Gallery/src/com/android/camera/gallery/
DBaseImage.java20 import com.android.camera.Util;
97 Bitmap b = Util.makeBitmap(minSideLength, maxNumberOfPixels, in fullSizeBitmap()
101 b = Util.rotate(b, getDegreesRotated()); in fullSizeBitmap()
154 Util.closeSilently(input); in setupDimension()
179 b = Util.rotate(b, getDegreesRotated()); in miniThumbBitmap()
DBaseImageList.java20 import com.android.camera.Util;
180 return Util.equals(base.getScheme(), uri.getScheme()) in isChildImageUri()
181 && Util.equals(base.getHost(), uri.getHost()) in isChildImageUri()
182 && Util.equals(base.getAuthority(), uri.getAuthority()) in isChildImageUri()
183 && Util.equals(base.getPath(), getPathWithoutId(uri)); in isChildImageUri()
DUriImage.java20 import com.android.camera.Util;
94 Bitmap b = Util.makeBitmap(minSideLength, maxNumberOfPixels, in fullSizeBitmap()
134 Util.closeSilently(input); in snifBitmapOptions()
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/audio_util/
DMediaPlayerWrapperTest.java274 Util.toMetadata(mMockContext, mTestMetadata.build())); in testNoQueueMediaUpdates()
296 Util.toMetadata(mMockContext, mTestMetadata.build())); in testNoQueueMediaUpdates()
346 Util.toMetadata(mMockContext, mTestMetadata.build())); in testDataOnUpdateNoQueue()
380 Util.toMetadata(mMockContext, mTestMetadata.build())); in testNullMetadata()
421 Util.toMetadataList(mMockContext, getQueueFromDescriptions(mTestQueue))); in testQueueCached()
463 Util.toMetadata(mMockContext, mTestMetadata.build())); in testPlaybackStateUpdateSpam()
580 Util.toMetadata(mMockContext, mTestMetadata.build())); in testMetadataSync()
588 Util.toMetadataList(mMockContext, getQueueFromDescriptions(mTestQueue))); in testMetadataSync()
630 Util.toMetadata(mMockContext, mTestMetadata.build())); in testMetadataSyncFail()
638 Util.toMetadataList(mMockContext, getQueueFromDescriptions(mTestQueue))); in testMetadataSyncFail()
[all …]
/packages/apps/LegacyCamera/src/com/android/camera/ui/
DFaceView.java20 import com.android.camera.Util;
124 Util.prepareMatrix(mMatrix, mMirror, mDisplayOrientation, getWidth(), getHeight()); in onDraw()
134 if (LOGV) Util.dumpRect(mRect, "Original rect"); in onDraw()
136 if (LOGV) Util.dumpRect(mRect, "Transformed rect"); in onDraw()
DZoomControlBar.java20 import com.android.camera.Util;
32 private static final int THRESHOLD_FIRST_MOVE = Util.dpToPixel(10); // pixels
34 private static final int ICON_SPACING = Util.dpToPixel(12);
DIndicatorControlWheelContainer.java22 import com.android.camera.Util;
53 mShutterButtonRadius = Util.dpToPixel(SHUTTER_BUTTON_RADIUS); in onFinishInflate()
106 mCenterX = right - left - Util.dpToPixel(FULL_WHEEL_RADIUS); in onLayout()
DZoomControlWheel.java20 import com.android.camera.Util;
82 mStrokeWidth = Util.dpToPixel(IndicatorControlWheelContainer.STROKE_WIDTH); in ZoomControlWheel()
146 mCenterX = right - left - Util.dpToPixel( in onLayout()
DRotateTextToast.java20 import com.android.camera.Util;
48 Util.fadeOut(mToast);
/packages/apps/LegacyCamera/src/com/android/camera/panorama/
DPanoramaActivity.java32 import com.android.camera.Util;
217 mDeviceOrientation = Util.roundOrientation(orientation, mDeviceOrientation); in onOrientationChanged()
221 + Util.getDisplayRotation(PanoramaActivity.this); in onOrientationChanged()
273 Util.enterLightsOutMode(window); in onCreate()
274 Util.initializeScreenBrightness(window, getContentResolver()); in onCreate()
367 mCameraDevice = Util.openCamera(this, backCameraId); in openCamera()
368 mCameraOrientation = Util.getCameraOrientation(backCameraId); in openCamera()
819 if ((mThumbnail == null || !Util.isUriValid(mThumbnail.getUri(), contentResolver))) { in updateThumbnailButton()
871 Util.broadcastNewPicture(PanoramaActivity.this, uri); in saveHighResMosaic()
1040 Util.showErrorAndFinish(this, R.string.cannot_connect_camera); in doOnResume()
[all …]
/packages/apps/SecureElement/src/com/android/se/security/arf/PKCS15/
DEFACMain.java44 import com.android.se.internal.Util;
119 return decodeDER(readBinary(0, Util.END)); in analyseFile()
DEFDODF.java40 import com.android.se.internal.Util;
120 return decodeDER(readBinary(0, Util.END)); in analyseFile()
DEFODF.java45 import com.android.se.internal.Util;
136 return decodeDER(readBinary(0, Util.END)); in analyseFile()
/packages/apps/Contacts/src/com/android/contacts/util/
DDeviceLocalAccountTypeFactory.java50 class Util { class
51 private Util() { } in Util() method in DeviceLocalAccountTypeFactory.Util
/packages/apps/CertInstaller/src/com/android/certinstaller/
DUtil.java30 class Util { class
100 private Util() { in Util() method in Util
/packages/apps/Bluetooth/src/com/android/bluetooth/audio_util/helpers/
DMetadata.java133 if ((mContext != null && Util.areUriImagesSupported(mContext) in fromMediaMetadata()
167 } else if (mContext != null && Util.areUriImagesSupported(mContext) in fromMediaDescription()
214 if ((mContext != null && Util.areUriImagesSupported(mContext) in fromBundle()

123