From 17cab296b860e3748ae9fc7276709540b12b4cd4 Mon Sep 17 00:00:00 2001 From: xufulong <839789740@qq.com> Date: Fri, 10 Apr 2020 22:36:22 +0800 Subject: [PATCH] translate the note of MediaPlayerActivity into English translate the note of MediaPlayerActivity into English --- .../com/frank/ffmpeg/activity/BaseActivity.java | 14 ++++++++------ .../frank/ffmpeg/activity/MediaPlayerActivity.java | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/com/frank/ffmpeg/activity/BaseActivity.java b/app/src/main/java/com/frank/ffmpeg/activity/BaseActivity.java index d5ab932..a3d9c0c 100644 --- a/app/src/main/java/com/frank/ffmpeg/activity/BaseActivity.java +++ b/app/src/main/java/com/frank/ffmpeg/activity/BaseActivity.java @@ -5,8 +5,10 @@ import android.content.Intent; import android.content.pm.PackageManager; import android.os.Build; import android.os.Bundle; + import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; + import android.text.TextUtils; import android.util.Log; import android.view.Menu; @@ -18,7 +20,7 @@ import com.frank.ffmpeg.R; import com.frank.ffmpeg.util.ContentUtil; /** - * Activity基类 + * base Activity * Created by frank on 2019/11/2. */ @@ -27,7 +29,7 @@ public abstract class BaseActivity extends AppCompatActivity implements View.OnC private final static String TAG = BaseActivity.class.getSimpleName(); private final static int REQUEST_CODE = 1234; - private final static String[] permissions = new String[] { + private final static String[] permissions = new String[]{ Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.CAMERA, @@ -39,7 +41,7 @@ public abstract class BaseActivity extends AppCompatActivity implements View.OnC if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && checkSelfPermission(permissions[0]) != PackageManager.PERMISSION_GRANTED - && checkSelfPermission(permissions[1]) != PackageManager.PERMISSION_GRANTED ) { + && checkSelfPermission(permissions[1]) != PackageManager.PERMISSION_GRANTED) { requestPermission(); } setContentView(getLayoutId()); @@ -84,9 +86,9 @@ public abstract class BaseActivity extends AppCompatActivity implements View.OnC protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { super.onActivityResult(requestCode, resultCode, data); - if(data != null && data.getData() != null) { - String filePath = ContentUtil.getPath(this,data.getData()); - Log.i(TAG,"filePath="+ filePath); + if (data != null && data.getData() != null) { + String filePath = ContentUtil.getPath(this, data.getData()); + Log.i(TAG, "filePath=" + filePath); onSelectedFile(filePath); } } diff --git a/app/src/main/java/com/frank/ffmpeg/activity/MediaPlayerActivity.java b/app/src/main/java/com/frank/ffmpeg/activity/MediaPlayerActivity.java index 69a1204..359c1a7 100644 --- a/app/src/main/java/com/frank/ffmpeg/activity/MediaPlayerActivity.java +++ b/app/src/main/java/com/frank/ffmpeg/activity/MediaPlayerActivity.java @@ -12,7 +12,7 @@ import com.frank.ffmpeg.R; import com.frank.ffmpeg.util.FileUtil; /** - * 音视频解码播放 + * mediaPlayer, which decode by software * Created by frank on 2018/2/12. */