本文整理汇总了Java中com.android.camera.util.CameraUtil.showErrorAndFinish方法的典型用法代码示例。如果您正苦于以下问题:Java CameraUtil.showErrorAndFinish方法的具体用法?Java CameraUtil.showErrorAndFinish怎么用?Java CameraUtil.showErrorAndFinish使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.android.camera.util.CameraUtil
的用法示例。
在下文中一共展示了CameraUtil.showErrorAndFinish方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCameraDisabled
import com.android.camera.util.CameraUtil; //导入方法依赖的package包/类
@Override
public void onCameraDisabled(int cameraId) {
UsageStatistics.instance().cameraFailure(
eventprotos.CameraFailure.FailureReason.SECURITY, null,
UsageStatistics.NONE, UsageStatistics.NONE);
Log.w(TAG, "Camera disabled: " + cameraId);
CameraUtil.showErrorAndFinish(this, R.string.camera_disabled);
}
示例2: onDeviceOpenFailure
import com.android.camera.util.CameraUtil; //导入方法依赖的package包/类
@Override
public void onDeviceOpenFailure(int cameraId, String info) {
UsageStatistics.instance().cameraFailure(
eventprotos.CameraFailure.FailureReason.OPEN_FAILURE, info,
UsageStatistics.NONE, UsageStatistics.NONE);
Log.w(TAG, "Camera open failure: " + info);
CameraUtil.showErrorAndFinish(this, R.string.cannot_connect_camera);
}
示例3: onReconnectionFailure
import com.android.camera.util.CameraUtil; //导入方法依赖的package包/类
@Override
public void onReconnectionFailure(CameraAgent mgr, String info) {
UsageStatistics.instance().cameraFailure(
eventprotos.CameraFailure.FailureReason.RECONNECT_FAILURE, null,
UsageStatistics.NONE, UsageStatistics.NONE);
Log.w(TAG, "Camera reconnection failure:" + info);
CameraUtil.showErrorAndFinish(this, R.string.cannot_connect_camera);
}
示例4: onFatalError
import com.android.camera.util.CameraUtil; //导入方法依赖的package包/类
private void onFatalError() {
if (mCameraFatalError) {
return;
}
mCameraFatalError = true;
// If the activity receives exception during onPause, just exit the app.
if (mPaused && !isFinishing()) {
Log.e(TAG, "Fatal error during onPause, call Activity.finish()");
finish();
} else {
CameraUtil.showErrorAndFinish(CameraActivity.this,
R.string.cannot_connect_camera);
}
}
示例5: onDeviceOpenedAlready
import com.android.camera.util.CameraUtil; //导入方法依赖的package包/类
@Override
public void onDeviceOpenedAlready(int cameraId, String info) {
Log.w(TAG, "Camera open already: " + cameraId + "," + info);
CameraUtil.showErrorAndFinish(this, R.string.cannot_connect_camera);
}
示例6: showErrorAndFinish
import com.android.camera.util.CameraUtil; //导入方法依赖的package包/类
@Override
public void showErrorAndFinish(int messageId) {
CameraUtil.showErrorAndFinish(this, messageId);
}
示例7: handleMessage
import com.android.camera.util.CameraUtil; //导入方法依赖的package包/类
@Override
public void handleMessage(Message msg) {
switch (msg.what) {
case SETUP_PREVIEW: {
setupPreview();
break;
}
case CLEAR_SCREEN_DELAY: {
mActivity.getWindow().clearFlags(
WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
break;
}
case FIRST_TIME_INIT: {
initializeFirstTime();
break;
}
case SET_CAMERA_PARAMETERS_WHEN_IDLE: {
setCameraParametersWhenIdle(0);
break;
}
case SHOW_TAP_TO_FOCUS_TOAST: {
showTapToFocusToast();
break;
}
case SWITCH_CAMERA: {
switchCamera();
break;
}
case SWITCH_CAMERA_START_ANIMATION: {
// TODO: Need to revisit
// ((CameraScreenNail) mActivity.mCameraScreenNail).animateSwitchCamera();
break;
}
case CAMERA_OPEN_DONE: {
onCameraOpened();
break;
}
case OPEN_CAMERA_FAIL: {
mOpenCameraFail = true;
CameraUtil.showErrorAndFinish(mActivity,
R.string.cannot_connect_camera);
break;
}
case CAMERA_DISABLED: {
mCameraDisabled = true;
CameraUtil.showErrorAndFinish(mActivity,
R.string.camera_disabled);
break;
}
case SWITCH_TO_GCAM_MODULE: {
mActivity.onModuleSelected(ModuleSwitcher.GCAM_MODULE_INDEX);
}
}
}
示例8: onCameraDisabled
import com.android.camera.util.CameraUtil; //导入方法依赖的package包/类
@Override
public void onCameraDisabled(int cameraId) {
CameraUtil.showErrorAndFinish(CameraActivity.this,
R.string.camera_disabled);
}
示例9: onDeviceOpenFailure
import com.android.camera.util.CameraUtil; //导入方法依赖的package包/类
@Override
public void onDeviceOpenFailure(int cameraId) {
CameraUtil.showErrorAndFinish(CameraActivity.this,
R.string.cannot_connect_camera);
}
示例10: onReconnectionFailure
import com.android.camera.util.CameraUtil; //导入方法依赖的package包/类
@Override
public void onReconnectionFailure(CameraManager mgr) {
CameraUtil.showErrorAndFinish(CameraActivity.this,
R.string.cannot_connect_camera);
}