Home
last modified time | relevance | path

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

12

/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/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()
DListPreference.java49 mKey = Util.checkNotNull( in ListPreference()
127 if (Util.equals(mEntryValues[i], value)) return i; in findIndexOfValue()
DUtil.java64 public class Util { class
89 private Util() { in Util() method in Util
496 currentActivity.getIntent().getIntExtra(Util.EXTRAS_CAMERA_FACING, -1); in getCameraFacingIntentExtras()
554 context.startActivity(new Intent(Util.REVIEW_ACTION, uri)); in viewUri()
/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()
DImage.java20 import com.android.camera.Util;
160 bitmap = Util.rotate(bitmap, getDegreesRotated()); in thumbBitmap()
/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);
DZoomControlWheel.java20 import com.android.camera.Util;
82 mStrokeWidth = Util.dpToPixel(IndicatorControlWheelContainer.STROKE_WIDTH); in ZoomControlWheel()
146 mCenterX = right - left - Util.dpToPixel( in onLayout()
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()
DRotateTextToast.java20 import com.android.camera.Util;
48 Util.fadeOut(mToast);
DIndicatorControlBar.java21 import com.android.camera.Util;
37 public static final int ICON_SPACING = Util.dpToPixel(16);
DSecondLevelIndicatorControlBar.java22 import com.android.camera.Util;
37 private static int ICON_SPACING = Util.dpToPixel(16);
/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/Calculator/src/com/android/calculator2/
DCalculatorExpressionEvaluator.java21 import org.javia.arity.Util;
74 Util.doubleToString(result, MAX_DIGITS, ROUNDING_DIGITS)); in evaluate()
/packages/apps/CertInstaller/src/com/android/certinstaller/
DUtil.java30 class Util { class
102 private Util() { in Util() method in Util
DCertInstaller.java261 String key = Util.toMd5(cert.getPublicKey().getEncoded()); in installOthers()
292 String key = Util.toMd5(mCredentials.getData(Credentials.EXTRA_PUBLIC_KEY)); in saveKeyPair()
306 byte[] bytes = Util.toBytes(map); in savePkeyMap()
316 (Map<String, byte[]>) Util.fromBytes(bytes); in getPkeyMap()
DCredentialHelper.java120 outStates.putByteArray(CERTS_KEY, Util.toBytes(certs)); in onSaveStates()
135 ArrayList<byte[]> certs = Util.fromBytes(savedStates.getByteArray(CERTS_KEY)); in onRestoreStates()
275 intent.setClassName(Util.SETTINGS_PACKAGE, "com.android.settings.CredentialStorage"); in createSystemInstallIntent()
/packages/apps/Gallery/src/com/android/camera/
DCropImage.java180 Util.startBackgroundJob(this, null, in startFaceDetection()
289 croppedImage = Util.transform(new Matrix(), croppedImage, in onSaveClicked()
290 mOutputX, mOutputY, mScaleUp, Util.RECYCLE_INPUT); in onSaveClicked()
312 Util.startBackgroundJob(this, null, in onSaveClicked()
334 Util.closeSilently(outputStream); in saveOutput()
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/
DPackageIconLoader.java24 import com.android.quicksearchbox.util.Util;
131 return Util.getResourceUri(mPackageContext, resourceId); in getIconUri()

12