feat: add menu option for Documents UI
* On Pixel (and possibly Android One) devices, the default Documents UI is hidden behind Google Files, making it hard to use File Shuttle because the Google one does not work well with Shelter as a custom FileProvider. * Let's offer an option in menu to open the original AOSP one.
This commit is contained in:
parent
3852bd83b5
commit
a121eec480
|
@ -424,6 +424,11 @@ public class MainActivity extends AppCompatActivity {
|
|||
update.run();
|
||||
}
|
||||
return true;
|
||||
case R.id.main_menu_documents_ui:
|
||||
Intent documentsUiIntent = new Intent(Intent.ACTION_VIEW);
|
||||
documentsUiIntent.setDataAndType(null, "vnd.android.document/root");
|
||||
startActivity(documentsUiIntent);
|
||||
return true;
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
|
|
@ -28,6 +28,10 @@
|
|||
android:id="@+id/main_menu_install_app_to_profile"
|
||||
android:title="@string/install_app_to_profile" />
|
||||
|
||||
<item
|
||||
android:id="@+id/main_menu_documents_ui"
|
||||
android:title="@string/documents_ui" />
|
||||
|
||||
<item
|
||||
android:id="@+id/main_menu_show_all"
|
||||
android:title="@string/show_all"
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
<string name="install_app_to_profile_success">已成功在工作用户内安装 APK</string>
|
||||
<string name="show_all">显示全部应用</string>
|
||||
<string name="show_all_warning">对列表中默认隐藏的应用执行操作可能导致崩溃以及其他各种无法预料的行为。但是,当您的手机厂商没有正确在工作用户中开启所有必要的系统组件应用的时候,这个功能可以帮助您解决问题。如果您选择继续,您确保您了解您在做什么,Shelter 无法提供任何保证。</string>
|
||||
<string name="documents_ui">打开文件管理器</string>
|
||||
|
||||
<!-- Settings Options -->
|
||||
<string name="settings">设置</string>
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
<string name="install_app_to_profile_success">Application installation finished in work profile.</string>
|
||||
<string name="show_all">Show All Apps</string>
|
||||
<string name="show_all_warning">Manipulating apps that are hidden from the list could cause crashes and all sorts of unexpected behavior. However, this feature can be useful when faulty vendor-customized ROMs does not enable all necessary system apps in work profile by default. If you continue, you are on your own.</string>
|
||||
<string name="documents_ui">Open Documents UI</string>
|
||||
|
||||
<!-- Settings Options -->
|
||||
<string name="settings">Settings</string>
|
||||
|
|
Loading…
Reference in a new issue