1b515ab4e50cca0cc28e903e717607a4e2038cd18Jeff Sharkey/* 2b515ab4e50cca0cc28e903e717607a4e2038cd18Jeff Sharkey * Copyright (C) 2015 The Android Open Source Project 3b515ab4e50cca0cc28e903e717607a4e2038cd18Jeff Sharkey * 4b515ab4e50cca0cc28e903e717607a4e2038cd18Jeff Sharkey * Licensed under the Apache License, Version 2.0 (the "License"); 5b515ab4e50cca0cc28e903e717607a4e2038cd18Jeff Sharkey * you may not use this file except in compliance with the License. 6b515ab4e50cca0cc28e903e717607a4e2038cd18Jeff Sharkey * You may obtain a copy of the License at 7b515ab4e50cca0cc28e903e717607a4e2038cd18Jeff Sharkey * 8b515ab4e50cca0cc28e903e717607a4e2038cd18Jeff Sharkey * http://www.apache.org/licenses/LICENSE-2.0 9b515ab4e50cca0cc28e903e717607a4e2038cd18Jeff Sharkey * 10b515ab4e50cca0cc28e903e717607a4e2038cd18Jeff Sharkey * Unless required by applicable law or agreed to in writing, software 11b515ab4e50cca0cc28e903e717607a4e2038cd18Jeff Sharkey * distributed under the License is distributed on an "AS IS" BASIS, 12b515ab4e50cca0cc28e903e717607a4e2038cd18Jeff Sharkey * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13b515ab4e50cca0cc28e903e717607a4e2038cd18Jeff Sharkey * See the License for the specific language governing permissions and 14b515ab4e50cca0cc28e903e717607a4e2038cd18Jeff Sharkey * limitations under the License. 15b515ab4e50cca0cc28e903e717607a4e2038cd18Jeff Sharkey */ 16b515ab4e50cca0cc28e903e717607a4e2038cd18Jeff Sharkey 17b515ab4e50cca0cc28e903e717607a4e2038cd18Jeff Sharkeypackage android.support.v4.content; 18b515ab4e50cca0cc28e903e717607a4e2038cd18Jeff Sharkey 19b515ab4e50cca0cc28e903e717607a4e2038cd18Jeff Sharkeyimport android.content.Context; 20b515ab4e50cca0cc28e903e717607a4e2038cd18Jeff Sharkey 211488388ea40813d23f2791eb03158bbb337d1cc2Jeff Sharkeyimport java.io.File; 221488388ea40813d23f2791eb03158bbb337d1cc2Jeff Sharkey 2344a4d2aad648f052f824074cac0908a6f78ece4fAlan Viveretteclass ContextCompatApi24 { 241488388ea40813d23f2791eb03158bbb337d1cc2Jeff Sharkey public static File getDataDir(Context context) { 251488388ea40813d23f2791eb03158bbb337d1cc2Jeff Sharkey return context.getDataDir(); 261488388ea40813d23f2791eb03158bbb337d1cc2Jeff Sharkey } 271488388ea40813d23f2791eb03158bbb337d1cc2Jeff Sharkey 28b458fb60ed7b60ade0b7ece1322f1d809fce3a54Jeff Sharkey public static Context createDeviceProtectedStorageContext(Context context) { 29b458fb60ed7b60ade0b7ece1322f1d809fce3a54Jeff Sharkey return context.createDeviceProtectedStorageContext(); 30b515ab4e50cca0cc28e903e717607a4e2038cd18Jeff Sharkey } 31b515ab4e50cca0cc28e903e717607a4e2038cd18Jeff Sharkey 32b458fb60ed7b60ade0b7ece1322f1d809fce3a54Jeff Sharkey public static boolean isDeviceProtectedStorage(Context context) { 33b458fb60ed7b60ade0b7ece1322f1d809fce3a54Jeff Sharkey return context.isDeviceProtectedStorage(); 34b515ab4e50cca0cc28e903e717607a4e2038cd18Jeff Sharkey } 35b515ab4e50cca0cc28e903e717607a4e2038cd18Jeff Sharkey} 36