Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
botbahlul authored Mar 2, 2023
1 parent 34e6ca2 commit 9951cfd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 23 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ android {
minSdkVersion 23
targetSdkVersion 30
versionCode 1
versionName "1.0.3"
versionName "1.0.4"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
Expand Down
22 changes: 0 additions & 22 deletions app/src/main/java/com/app/livesubtitle/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -177,17 +177,6 @@ protected void onCreate(Bundle savedInstanceState) {
ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.RECORD_AUDIO}, 1);
}

if (Build.VERSION.SDK_INT > Build.VERSION_CODES.Q && !Environment.isExternalStorageLegacy()) {
if (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
Uri uri = Uri.parse("package:" + MainActivity.this.getPackageName());
startActivity(new Intent(Settings.ACTION_MANAGE_WRITE_SETTINGS, uri));
}
} else {
if (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, 1);
}
}

checkbox_debug_mode.setOnClickListener(view -> {
if(((CompoundButton) view).isChecked()){
textview_src_dialect.setVisibility(View.VISIBLE);
Expand Down Expand Up @@ -693,17 +682,6 @@ private boolean isPackageInstalled(String packageName, PackageManager packageMan
}

private void check_mlkit_dictionary() {
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.Q && !Environment.isExternalStorageLegacy()) {
if (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
Uri uri = Uri.parse("package:" + this.getPackageName());
startActivity(new Intent(Settings.ACTION_MANAGE_WRITE_SETTINGS, uri));
}
} else {
if (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, 1);
}
}

if (Objects.equals(LANGUAGE.SRC, LANGUAGE.DST)) {
MLKIT_DICTIONARY.READY = true;
mlkit_status_message = "";
Expand Down

0 comments on commit 9951cfd

Please sign in to comment.