当前位置: 首页>>代码示例>>Java>>正文


Java CameraUtil.showErrorAndFinish方法代码示例

本文整理汇总了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);
}
 
开发者ID:jameliu,项目名称:Camera2,代码行数:9,代码来源:CameraActivity.java

示例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);
}
 
开发者ID:jameliu,项目名称:Camera2,代码行数:9,代码来源:CameraActivity.java

示例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);
}
 
开发者ID:jameliu,项目名称:Camera2,代码行数:9,代码来源:CameraActivity.java

示例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);
    }
}
 
开发者ID:jameliu,项目名称:Camera2,代码行数:16,代码来源:CameraActivity.java

示例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);
}
 
开发者ID:jameliu,项目名称:Camera2,代码行数:6,代码来源:CameraActivity.java

示例6: showErrorAndFinish

import com.android.camera.util.CameraUtil; //导入方法依赖的package包/类
@Override
public void showErrorAndFinish(int messageId) {
    CameraUtil.showErrorAndFinish(this, messageId);
}
 
开发者ID:jameliu,项目名称:Camera2,代码行数:5,代码来源:CameraActivity.java

示例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);
        }
    }
}
 
开发者ID:asm-products,项目名称:nexus-camera,代码行数:65,代码来源:PhotoModule.java

示例8: onCameraDisabled

import com.android.camera.util.CameraUtil; //导入方法依赖的package包/类
@Override
public void onCameraDisabled(int cameraId) {
    CameraUtil.showErrorAndFinish(CameraActivity.this,
            R.string.camera_disabled);
}
 
开发者ID:asm-products,项目名称:nexus-camera,代码行数:6,代码来源:CameraActivity.java

示例9: onDeviceOpenFailure

import com.android.camera.util.CameraUtil; //导入方法依赖的package包/类
@Override
public void onDeviceOpenFailure(int cameraId) {
    CameraUtil.showErrorAndFinish(CameraActivity.this,
            R.string.cannot_connect_camera);
}
 
开发者ID:asm-products,项目名称:nexus-camera,代码行数:6,代码来源:CameraActivity.java

示例10: onReconnectionFailure

import com.android.camera.util.CameraUtil; //导入方法依赖的package包/类
@Override
public void onReconnectionFailure(CameraManager mgr) {
    CameraUtil.showErrorAndFinish(CameraActivity.this,
            R.string.cannot_connect_camera);
}
 
开发者ID:asm-products,项目名称:nexus-camera,代码行数:6,代码来源:CameraActivity.java


注:本文中的com.android.camera.util.CameraUtil.showErrorAndFinish方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。