mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-06-19 09:15:23 +12:00
REMOVE MANAGER STORAGE PERMISSIONS
This commit is contained in:
parent
bf9ac28770
commit
e57755d866
3 changed files with 1 additions and 15 deletions
|
@ -2,10 +2,6 @@
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
|
||||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="28" />
|
|
||||||
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" tools:ignore="ScopedStorage"/>
|
|
||||||
|
|
||||||
<uses-feature
|
<uses-feature
|
||||||
android:required="true"
|
android:required="true"
|
||||||
android:glEsVersion="0x0030001"/>
|
android:glEsVersion="0x0030001"/>
|
||||||
|
|
|
@ -34,16 +34,6 @@ public class MainActivity extends BaseActivity implements NavigationBarView.OnIt
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
|
||||||
if (!Environment.isExternalStorageManager()) {
|
|
||||||
Intent intent = new Intent(ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION);
|
|
||||||
startActivity(intent);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
ActivityCompat.requestPermissions(this, new String[] {READ_EXTERNAL_STORAGE}, PERMISSION_REQUEST_CODE);
|
|
||||||
ActivityCompat.requestPermissions(this, new String[] {WRITE_EXTERNAL_STORAGE}, PERMISSION_REQUEST_CODE);
|
|
||||||
}
|
|
||||||
|
|
||||||
setContentView(R.layout.activity_main);
|
setContentView(R.layout.activity_main);
|
||||||
|
|
||||||
NavigationBarView bar = findViewById(R.id.navigation);
|
NavigationBarView bar = findViewById(R.id.navigation);
|
||||||
|
|
|
@ -49,7 +49,7 @@ public class GamesFragment extends Fragment implements ActivityResultCallback<Ur
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
String uri = result.toString();
|
String uri = result.toString();
|
||||||
if (GameUtils.findByRomPath(uri) == null) {
|
if (GameUtils.findByRomPath(uri) == null) {
|
||||||
if (FileUtils.obtainRealPath(uri) == null) {
|
if (!FileUtils.exists(uri)) {
|
||||||
Toast.makeText(getContext(), "Invalid file path", Toast.LENGTH_LONG).show();
|
Toast.makeText(getContext(), "Invalid file path", Toast.LENGTH_LONG).show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue