|
|
|
@ -3,7 +3,6 @@ package com.xypower.mpapp.video;
|
|
|
|
|
import android.Manifest;
|
|
|
|
|
import android.app.Activity;
|
|
|
|
|
import android.app.Dialog;
|
|
|
|
|
import android.content.ComponentName;
|
|
|
|
|
import android.content.Context;
|
|
|
|
|
import android.content.DialogInterface;
|
|
|
|
|
import android.content.Intent;
|
|
|
|
@ -18,7 +17,6 @@ import android.graphics.PorterDuff;
|
|
|
|
|
import android.graphics.Rect;
|
|
|
|
|
import android.graphics.RectF;
|
|
|
|
|
import android.graphics.SurfaceTexture;
|
|
|
|
|
import android.graphics.drawable.BitmapDrawable;
|
|
|
|
|
import android.hardware.camera2.CameraAccessException;
|
|
|
|
|
import android.hardware.camera2.CameraCaptureSession;
|
|
|
|
|
import android.hardware.camera2.CameraCharacteristics;
|
|
|
|
@ -36,8 +34,6 @@ import androidx.appcompat.app.AlertDialog;
|
|
|
|
|
import androidx.core.app.ActivityCompat;
|
|
|
|
|
import androidx.fragment.app.DialogFragment;
|
|
|
|
|
import androidx.fragment.app.Fragment;
|
|
|
|
|
import androidx.legacy.app.FragmentCompat;
|
|
|
|
|
import androidx.legacy.app.FragmentCompat;
|
|
|
|
|
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
|
|
|
|
|
|
|
|
|
import android.os.Environment;
|
|
|
|
@ -54,7 +50,6 @@ import android.view.TextureView;
|
|
|
|
|
import android.view.View;
|
|
|
|
|
import android.view.ViewGroup;
|
|
|
|
|
import android.widget.Button;
|
|
|
|
|
import android.widget.Toast;
|
|
|
|
|
|
|
|
|
|
import com.xypower.mpapp.MicroPhotoService;
|
|
|
|
|
import com.xypower.mpapp.R;
|
|
|
|
@ -76,7 +71,7 @@ import java.util.concurrent.TimeUnit;
|
|
|
|
|
* Use the {@link VideoFragment#newInstance} factory method to
|
|
|
|
|
* create an instance of this fragment.
|
|
|
|
|
*/
|
|
|
|
|
public class VideoFragment extends Fragment implements View.OnClickListener, MediaRecorder.OnInfoListener, FragmentCompat.OnRequestPermissionsResultCallback {
|
|
|
|
|
public class VideoFragment extends Fragment implements View.OnClickListener, MediaRecorder.OnInfoListener {
|
|
|
|
|
|
|
|
|
|
public static final String ACTION_FINISH = "com.xypower.mvapp.ACT_FINISH";
|
|
|
|
|
public static final String ACTION_MP_VIDEO_FINISHED = "com.xypower.mpapp.ACT_V_FINISHED";
|
|
|
|
|