File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
keyboard/src/main/java/cn/hadcn/keyboard Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -518,15 +518,17 @@ private class RecordingTouchListener implements OnTouchListener {
518
518
519
519
@ Override
520
520
public boolean onTouch (View view , MotionEvent motionEvent ) {
521
- if (motionEvent .getAction () == MotionEvent .ACTION_DOWN ) {
522
- if (ActivityCompat .checkSelfPermission (mContext , Manifest .permission
523
- .RECORD_AUDIO ) != PackageManager .PERMISSION_GRANTED ) {
524
- if (mOnChatKeyBoardListener != null ) {
525
- mOnChatKeyBoardListener .onRecordingAction (RecordingAction
526
- .PERMISSION_NOT_GRANTED );
527
- }
528
- return true ;
521
+ if (ActivityCompat .checkSelfPermission (mContext , Manifest .permission .RECORD_AUDIO )
522
+ != PackageManager .PERMISSION_GRANTED
523
+ || ActivityCompat .checkSelfPermission (mContext , Manifest .permission
524
+ .WRITE_EXTERNAL_STORAGE ) != PackageManager .PERMISSION_GRANTED ) {
525
+ if (mOnChatKeyBoardListener != null ) {
526
+ mOnChatKeyBoardListener .onRecordingAction (RecordingAction
527
+ .PERMISSION_NOT_GRANTED );
529
528
}
529
+ return true ;
530
+ }
531
+ if (motionEvent .getAction () == MotionEvent .ACTION_DOWN ) {
530
532
startY = motionEvent .getRawY ();
531
533
btnRecording .setText (getResources ().getString (R .string .recording_end ));
532
534
btnRecording .setBackgroundResource (R .drawable .recording_p );
You can’t perform that action at this time.
0 commit comments