|
7 | 7 |
|
8 | 8 | package com.smartpack.busyboxinstaller; |
9 | 9 |
|
10 | | -import android.Manifest; |
11 | 10 | import android.annotation.SuppressLint; |
12 | 11 | import android.app.Activity; |
13 | 12 | import android.content.Intent; |
|
22 | 21 | import androidx.appcompat.app.AppCompatActivity; |
23 | 22 | import androidx.appcompat.widget.AppCompatImageButton; |
24 | 23 | import androidx.appcompat.widget.PopupMenu; |
25 | | -import androidx.core.app.ActivityCompat; |
26 | 24 |
|
27 | 25 | import com.google.android.material.checkbox.MaterialCheckBox; |
28 | 26 | import com.google.android.material.dialog.MaterialAlertDialogBuilder; |
|
39 | 37 | public class MainActivity extends AppCompatActivity { |
40 | 38 |
|
41 | 39 | private boolean mExit; |
42 | | - private Handler mHandler = new Handler(); |
| 40 | + private final Handler mHandler = new Handler(); |
43 | 41 | private LinearLayout mInstall; |
44 | 42 | private LinearLayout mProgress; |
45 | 43 | private MaterialTextView mInstallText; |
@@ -213,12 +211,6 @@ private void installDialog() { |
213 | 211 | Utils.snackbar(mInstall, getString(R.string.no_root_message)); |
214 | 212 | return; |
215 | 213 | } |
216 | | - if (!Utils.checkWriteStoragePermission(this)) { |
217 | | - ActivityCompat.requestPermissions(this, new String[]{ |
218 | | - Manifest.permission.WRITE_EXTERNAL_STORAGE},1); |
219 | | - Utils.snackbar(mInstall, getString(R.string.no_permission_message)); |
220 | | - return; |
221 | | - } |
222 | 214 | MaterialAlertDialogBuilder install = new MaterialAlertDialogBuilder(this); |
223 | 215 | install.setIcon(R.mipmap.ic_launcher); |
224 | 216 | if (Utils.getArch().equals("aarch64") || Utils.getArch().equals("armv7l") || Utils.getArch().equals("armv8l") |
@@ -471,8 +463,7 @@ private void refreshTitles() { |
471 | 463 | public void onStart() { |
472 | 464 | super.onStart(); |
473 | 465 |
|
474 | | - if (!RootUtils.rootAccess() || !Utils.checkWriteStoragePermission(this) |
475 | | - || !Utils.getBoolean("update_dialogue", true, this)) { |
| 466 | + if (!RootUtils.rootAccess() || !Utils.getBoolean("update_dialogue", true, this)) { |
476 | 467 | return; |
477 | 468 | } |
478 | 469 |
|
|
0 commit comments