|
|
@@ -115,7 +115,12 @@ public class CameraUtil {
|
|
|
}
|
|
|
|
|
|
public static boolean hasCamera() {
|
|
|
- return hasBackFacingCamera() || hasFrontFacingCamera();
|
|
|
+ Intent captureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
|
|
+ if (captureIntent.resolveActivity(SheepApp.getInstance().getPackageManager()) == null) {
|
|
|
+ G.shortToast("相机不可用");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ return true;
|
|
|
}
|
|
|
|
|
|
public static boolean hasBackFacingCamera() {
|