Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
HelloHuDi committed May 20, 2018
1 parent c25816f commit b7fb599
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.hd.screencapture.capture;

/**
* Created by hd on 2018/5/20 .
*/
public class AudioRecorder extends Recorder {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.hd.screencapture.capture;

/**
* Created by hd on 2018/5/20 .
*/
public abstract class Recorder {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.hd.screencapture.capture;

/**
* Created by hd on 2018/5/20 .
*/
public class VideoRecorder extends Recorder {

}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import android.util.Log;

import com.hd.screencapture.config.ScreenCaptureConfig;
import com.hd.screencapture.capture.ScreenCaptureRecorder;
import com.hd.screencapture.observer.CaptureObserver;

import static android.Manifest.permission.RECORD_AUDIO;
Expand Down Expand Up @@ -161,12 +160,13 @@ private void requestPermission() {
return;
}
new AlertDialog.Builder(getActivity())//
.setMessage("Using your mic to record audio and your sd card to save video file")//
.setCancelable(false)//
.setPositiveButton(android.R.string.ok, (dialog, which) -> requestPermissions(permissions, PERMISSIONS_REQUEST_CODE))//
.setNegativeButton(android.R.string.cancel, null)//
.create()//
.show();
.setMessage("Using your mic to record audio and your sd card to save video file")//
.setCancelable(false)//
.setPositiveButton(android.R.string.ok, (dialog, which) -> //
requestPermissions(permissions, PERMISSIONS_REQUEST_CODE))//
.setNegativeButton(android.R.string.cancel, null)//
.create()//
.show();
}

private boolean hasPermissions() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.hd.screencapture.capture;
package com.hd.screencapture.help;

import android.annotation.TargetApi;
import android.hardware.display.DisplayManager;
Expand All @@ -15,7 +15,6 @@
import android.view.Surface;

import com.hd.screencapture.config.ScreenCaptureConfig;
import com.hd.screencapture.help.ScreenCaptureState;
import com.hd.screencapture.observer.CaptureObserver;

import java.io.IOException;
Expand Down Expand Up @@ -52,7 +51,7 @@ public class ScreenCaptureRecorder extends Thread {

private Surface mSurface;

public ScreenCaptureRecorder(@NonNull MediaProjection mediaProjection, @NonNull ScreenCaptureConfig config) {
ScreenCaptureRecorder(@NonNull MediaProjection mediaProjection, @NonNull ScreenCaptureConfig config) {
this.mediaProjection = mediaProjection;
this.config = config;
}
Expand Down

0 comments on commit b7fb599

Please sign in to comment.