blob: 425c275d809e399fc27daa7a43725bd659027391 [file] [log] [blame]
Felipe Lemea4f4d7e2016-01-22 16:49:55 -08001/*
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
17package com.android.documentsui;
18
shawnlin9cee68f2019-01-25 11:20:18 +080019import static com.android.documentsui.MetricConsts.SCOPED_DIRECTORY_ACCESS_DEPRECATED;
Leif Hendrik Wilden42053492018-01-03 11:16:09 -080020import static com.android.documentsui.ScopedAccessMetrics.logInvalidScopedAccessRequest;
Felipe Lemea4f4d7e2016-01-22 16:49:55 -080021
Felipe Lemea4f4d7e2016-01-22 16:49:55 -080022import android.app.Activity;
Felipe Lemea4f4d7e2016-01-22 16:49:55 -080023import android.os.Bundle;
Felipe Leme5228bd02016-02-17 10:12:04 -080024import android.os.storage.StorageVolume;
Ben Kwaf4b0ff62016-02-02 12:11:10 -080025
Felipe Lemea4f4d7e2016-01-22 16:49:55 -080026/**
Felipe Leme433d78a2018-01-08 16:39:00 -080027 * Activity responsible for handling {@link StorageVolume#createAccessIntent(String)}.
Amin Shaikhced7a452018-10-23 14:22:48 -040028 *
29 * @deprecated This class handles the deprecated {@link StorageVolume#createAccessIntent(String)}.
Felipe Lemea4f4d7e2016-01-22 16:49:55 -080030 */
Amin Shaikhced7a452018-10-23 14:22:48 -040031@Deprecated
32public class ScopedAccessActivity extends Activity {
Felipe Lemea4f4d7e2016-01-22 16:49:55 -080033 @Override
34 public void onCreate(Bundle savedInstanceState) {
35 super.onCreate(savedInstanceState);
shawnlin9cee68f2019-01-25 11:20:18 +080036 logInvalidScopedAccessRequest(SCOPED_DIRECTORY_ACCESS_DEPRECATED);
Amin Shaikhced7a452018-10-23 14:22:48 -040037 setResult(RESULT_CANCELED);
38 finish();
Felipe Lemea4f4d7e2016-01-22 16:49:55 -080039 }
40}