1 /* 2 * Copyright (C) 2016 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package com.android.documentsui.base; 17 18 import android.net.Uri; 19 20 import com.android.documentsui.archives.ArchivesProvider; 21 22 /** 23 * Details about various system providers. These all need to be in sync with the 24 * resources in their respective packages. 25 */ 26 public final class Providers { 27 28 public static final String AUTHORITY_STORAGE = "com.android.externalstorage.documents"; 29 public static final String ROOT_ID_DEVICE = "primary"; 30 public static final String ROOT_ID_HOME = "home"; 31 32 public static final String AUTHORITY_DOWNLOADS = "com.android.providers.downloads.documents"; 33 public static final String ROOT_ID_DOWNLOADS = "downloads"; 34 35 public static final String AUTHORITY_MEDIA = "com.android.providers.media.documents"; 36 public static final String ROOT_ID_IMAGES = "images_root"; 37 public static final String ROOT_ID_VIDEOS = "videos_root"; 38 public static final String ROOT_ID_AUDIO = "audio_root"; 39 40 public static final String AUTHORITY_MTP = "com.android.mtp.documents"; 41 isArchiveUri(Uri uri)42 public static boolean isArchiveUri(Uri uri) { 43 return uri != null && ArchivesProvider.AUTHORITY.equals(uri.getAuthority()); 44 } 45 } 46