Loading AndroidManifest.xml +5 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,7 @@ <activity android:name=".picker.PickActivity" android:theme="@style/DocumentsTheme" android:exported="true" android:visibleToInstantApps="true"> <intent-filter android:priority="100"> <action android:name="android.intent.action.OPEN_DOCUMENT" /> Loading Loading @@ -96,6 +97,7 @@ android:name=".LauncherActivity" android:targetActivity=".files.LauncherActivity" android:label="@string/launcher_label" android:exported="true" android:icon="@drawable/launcher_icon" > <intent-filter> <action android:name="android.intent.action.MAIN" /> Loading @@ -108,6 +110,7 @@ <activity android:name=".files.FilesActivity" android:documentLaunchMode="intoExisting" android:exported="true" android:theme="@style/DocumentsTheme"> <intent-filter> <action android:name="android.intent.action.MAIN" /> Loading @@ -126,6 +129,7 @@ <activity-alias android:name=".ViewDownloadsActivity" android:targetActivity=".files.FilesActivity" android:exported="true" android:enabled="@bool/handle_view_downloads_intent"> <intent-filter> <action android:name="android.intent.action.VIEW_DOWNLOADS" /> Loading @@ -135,6 +139,7 @@ <activity android:name=".ScopedAccessActivity" android:exported="true" android:theme="@android:style/Theme.Translucent.NoTitleBar"> <intent-filter> <action android:name="android.os.storage.action.OPEN_EXTERNAL_DIRECTORY" /> Loading src/com/android/documentsui/files/Config.java +9 −2 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.documentsui.files; import com.android.documentsui.ActivityConfig; import com.android.documentsui.base.DocumentStack; import com.android.documentsui.base.RootInfo; import com.android.documentsui.util.VersionUtils; /** * Provides support for Files activity specific specializations. Loading @@ -27,11 +28,17 @@ public final class Config extends ActivityConfig { @Override public boolean managedModeEnabled(DocumentStack stack) { // This method helps us understand when to kick in special manage mode behaviors. final RootInfo root = stack.getRoot(); // When in Files activity, allow External Storage provider to view // Android/[data|obb|sandbox] directories which are otherwise hidden for privacy reasons. if (VersionUtils.isAtLeastR() && root != null && root.isExternalStorage()) { return true; } // When in downloads top level directory, we also show active downloads. // And while we don't allow folders in Downloads, we do allow Zip files in // downloads that themselves can be opened and viewed like directories. // This method helps us understand when to kick in on those special behaviors. final RootInfo root = stack.getRoot(); return root != null && root.isDownloads() && stack.size() == 1; Loading tests/functional/com/android/documentsui/DialogUiTest.java +4 −3 Original line number Diff line number Diff line Loading @@ -201,10 +201,11 @@ public class DialogUiTest { final TextInputEditText inputView = mCreateDirectoryFragment.getDialog().getWindow().findViewById(android.R.id.text1); Paint paint = inputView.getPaint(); final float textSize = paint.getTextSize(); assertTrue(inputView.getHeight() > Math.round(textSize)); assertTrue( "Failed with inputView height " + inputView.getHeight() + " and input text height " + getInputTextHeight(inputView), inputView.getHeight() > getInputTextHeight(inputView)); switchOrientation(mActivityTestRule.getActivity()); } Loading Loading
AndroidManifest.xml +5 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,7 @@ <activity android:name=".picker.PickActivity" android:theme="@style/DocumentsTheme" android:exported="true" android:visibleToInstantApps="true"> <intent-filter android:priority="100"> <action android:name="android.intent.action.OPEN_DOCUMENT" /> Loading Loading @@ -96,6 +97,7 @@ android:name=".LauncherActivity" android:targetActivity=".files.LauncherActivity" android:label="@string/launcher_label" android:exported="true" android:icon="@drawable/launcher_icon" > <intent-filter> <action android:name="android.intent.action.MAIN" /> Loading @@ -108,6 +110,7 @@ <activity android:name=".files.FilesActivity" android:documentLaunchMode="intoExisting" android:exported="true" android:theme="@style/DocumentsTheme"> <intent-filter> <action android:name="android.intent.action.MAIN" /> Loading @@ -126,6 +129,7 @@ <activity-alias android:name=".ViewDownloadsActivity" android:targetActivity=".files.FilesActivity" android:exported="true" android:enabled="@bool/handle_view_downloads_intent"> <intent-filter> <action android:name="android.intent.action.VIEW_DOWNLOADS" /> Loading @@ -135,6 +139,7 @@ <activity android:name=".ScopedAccessActivity" android:exported="true" android:theme="@android:style/Theme.Translucent.NoTitleBar"> <intent-filter> <action android:name="android.os.storage.action.OPEN_EXTERNAL_DIRECTORY" /> Loading
src/com/android/documentsui/files/Config.java +9 −2 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.documentsui.files; import com.android.documentsui.ActivityConfig; import com.android.documentsui.base.DocumentStack; import com.android.documentsui.base.RootInfo; import com.android.documentsui.util.VersionUtils; /** * Provides support for Files activity specific specializations. Loading @@ -27,11 +28,17 @@ public final class Config extends ActivityConfig { @Override public boolean managedModeEnabled(DocumentStack stack) { // This method helps us understand when to kick in special manage mode behaviors. final RootInfo root = stack.getRoot(); // When in Files activity, allow External Storage provider to view // Android/[data|obb|sandbox] directories which are otherwise hidden for privacy reasons. if (VersionUtils.isAtLeastR() && root != null && root.isExternalStorage()) { return true; } // When in downloads top level directory, we also show active downloads. // And while we don't allow folders in Downloads, we do allow Zip files in // downloads that themselves can be opened and viewed like directories. // This method helps us understand when to kick in on those special behaviors. final RootInfo root = stack.getRoot(); return root != null && root.isDownloads() && stack.size() == 1; Loading
tests/functional/com/android/documentsui/DialogUiTest.java +4 −3 Original line number Diff line number Diff line Loading @@ -201,10 +201,11 @@ public class DialogUiTest { final TextInputEditText inputView = mCreateDirectoryFragment.getDialog().getWindow().findViewById(android.R.id.text1); Paint paint = inputView.getPaint(); final float textSize = paint.getTextSize(); assertTrue(inputView.getHeight() > Math.round(textSize)); assertTrue( "Failed with inputView height " + inputView.getHeight() + " and input text height " + getInputTextHeight(inputView), inputView.getHeight() > getInputTextHeight(inputView)); switchOrientation(mActivityTestRule.getActivity()); } Loading