Loading Android.bp +14 −5 Original line number Diff line number Diff line Loading @@ -27,6 +27,14 @@ license { license_text: [], } java_library { name: "docsui-change-ids", srcs: ["src/com/android/documentsui/ChangeIds.java"], libs: ["app-compat-annotations"], min_sdk_version: "29", sdk_version: "system_current", } java_defaults { name: "documentsui_defaults", Loading @@ -40,14 +48,11 @@ java_defaults { "androidx.transition_transition", "apache-commons-compress", "com.google.android.material_material", "docsui-change-ids", "guava", "modules-utils-build_system", ], libs: [ "app-compat-annotations", ], privileged: true, certificate: "platform", Loading @@ -63,7 +68,7 @@ java_defaults { platform_compat_config { name: "documents-ui-compat-config", src: ":DocumentsUI", src: ":docsui-change-ids", } java_library { Loading Loading @@ -101,8 +106,12 @@ android_library { "--auto-add-overlay", ], // This is included in `documentsui_defaults`. exclude_srcs: ["src/com/android/documentsui/ChangeIds.java"], srcs: [ "src/**/*.java", "src/**/*.kt", ":statslog-docsui-java-gen", ], Loading src/com/android/documentsui/ChangeIds.java 0 → 100644 +32 −0 Original line number Diff line number Diff line /* * Copyright (C) 2024 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.documentsui; import android.compat.annotation.ChangeId; import android.compat.annotation.EnabledAfter; import android.os.Build; public final class ChangeIds { /** * We support restrict Storage Access Framework from {@link Build.VERSION_CODES#R}. * App Compatibility flag that indicates whether the app should be restricted or not. * This flag is turned on by default for all apps targeting > * {@link Build.VERSION_CODES#Q}. */ @ChangeId @EnabledAfter(targetSdkVersion = Build.VERSION_CODES.Q) public static final long RESTRICT_STORAGE_ACCESS_FRAMEWORK = 141600225L; } src/com/android/documentsui/base/Shared.java +1 −12 Original line number Diff line number Diff line Loading @@ -17,11 +17,10 @@ package com.android.documentsui.base; import static com.android.documentsui.base.SharedMinimal.TAG; import static com.android.documentsui.ChangeIds.RESTRICT_STORAGE_ACCESS_FRAMEWORK; import android.app.Activity; import android.app.compat.CompatChanges; import android.compat.annotation.ChangeId; import android.compat.annotation.EnabledAfter; import android.content.ComponentName; import android.content.ContentResolver; import android.content.Context; Loading Loading @@ -143,16 +142,6 @@ public final class Shared { private static final Collator sCollator; /** * We support restrict Storage Access Framework from {@link android.os.Build.VERSION_CODES#R}. * App Compatibility flag that indicates whether the app should be restricted or not. * This flag is turned on by default for all apps targeting > * {@link android.os.Build.VERSION_CODES#Q}. */ @ChangeId @EnabledAfter(targetSdkVersion = android.os.Build.VERSION_CODES.Q) private static final long RESTRICT_STORAGE_ACCESS_FRAMEWORK = 141600225L; static { sCollator = Collator.getInstance(); sCollator.setStrength(Collator.SECONDARY); Loading Loading
Android.bp +14 −5 Original line number Diff line number Diff line Loading @@ -27,6 +27,14 @@ license { license_text: [], } java_library { name: "docsui-change-ids", srcs: ["src/com/android/documentsui/ChangeIds.java"], libs: ["app-compat-annotations"], min_sdk_version: "29", sdk_version: "system_current", } java_defaults { name: "documentsui_defaults", Loading @@ -40,14 +48,11 @@ java_defaults { "androidx.transition_transition", "apache-commons-compress", "com.google.android.material_material", "docsui-change-ids", "guava", "modules-utils-build_system", ], libs: [ "app-compat-annotations", ], privileged: true, certificate: "platform", Loading @@ -63,7 +68,7 @@ java_defaults { platform_compat_config { name: "documents-ui-compat-config", src: ":DocumentsUI", src: ":docsui-change-ids", } java_library { Loading Loading @@ -101,8 +106,12 @@ android_library { "--auto-add-overlay", ], // This is included in `documentsui_defaults`. exclude_srcs: ["src/com/android/documentsui/ChangeIds.java"], srcs: [ "src/**/*.java", "src/**/*.kt", ":statslog-docsui-java-gen", ], Loading
src/com/android/documentsui/ChangeIds.java 0 → 100644 +32 −0 Original line number Diff line number Diff line /* * Copyright (C) 2024 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.documentsui; import android.compat.annotation.ChangeId; import android.compat.annotation.EnabledAfter; import android.os.Build; public final class ChangeIds { /** * We support restrict Storage Access Framework from {@link Build.VERSION_CODES#R}. * App Compatibility flag that indicates whether the app should be restricted or not. * This flag is turned on by default for all apps targeting > * {@link Build.VERSION_CODES#Q}. */ @ChangeId @EnabledAfter(targetSdkVersion = Build.VERSION_CODES.Q) public static final long RESTRICT_STORAGE_ACCESS_FRAMEWORK = 141600225L; }
src/com/android/documentsui/base/Shared.java +1 −12 Original line number Diff line number Diff line Loading @@ -17,11 +17,10 @@ package com.android.documentsui.base; import static com.android.documentsui.base.SharedMinimal.TAG; import static com.android.documentsui.ChangeIds.RESTRICT_STORAGE_ACCESS_FRAMEWORK; import android.app.Activity; import android.app.compat.CompatChanges; import android.compat.annotation.ChangeId; import android.compat.annotation.EnabledAfter; import android.content.ComponentName; import android.content.ContentResolver; import android.content.Context; Loading Loading @@ -143,16 +142,6 @@ public final class Shared { private static final Collator sCollator; /** * We support restrict Storage Access Framework from {@link android.os.Build.VERSION_CODES#R}. * App Compatibility flag that indicates whether the app should be restricted or not. * This flag is turned on by default for all apps targeting > * {@link android.os.Build.VERSION_CODES#Q}. */ @ChangeId @EnabledAfter(targetSdkVersion = android.os.Build.VERSION_CODES.Q) private static final long RESTRICT_STORAGE_ACCESS_FRAMEWORK = 141600225L; static { sCollator = Collator.getInstance(); sCollator.setStrength(Collator.SECONDARY); Loading