Felipe Leme | a4f4d7e | 2016-01-22 16:49:55 -0800 | [diff] [blame] | 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 | |
| 17 | package com.android.documentsui; |
| 18 | |
shawnlin | 9cee68f | 2019-01-25 11:20:18 +0800 | [diff] [blame^] | 19 | import static com.android.documentsui.MetricConsts.SCOPED_DIRECTORY_ACCESS_DEPRECATED; |
Leif Hendrik Wilden | 4205349 | 2018-01-03 11:16:09 -0800 | [diff] [blame] | 20 | import static com.android.documentsui.ScopedAccessMetrics.logInvalidScopedAccessRequest; |
Felipe Leme | a4f4d7e | 2016-01-22 16:49:55 -0800 | [diff] [blame] | 21 | |
Felipe Leme | a4f4d7e | 2016-01-22 16:49:55 -0800 | [diff] [blame] | 22 | import android.app.Activity; |
Felipe Leme | a4f4d7e | 2016-01-22 16:49:55 -0800 | [diff] [blame] | 23 | import android.os.Bundle; |
Felipe Leme | 5228bd0 | 2016-02-17 10:12:04 -0800 | [diff] [blame] | 24 | import android.os.storage.StorageVolume; |
Ben Kwa | f4b0ff6 | 2016-02-02 12:11:10 -0800 | [diff] [blame] | 25 | |
Felipe Leme | a4f4d7e | 2016-01-22 16:49:55 -0800 | [diff] [blame] | 26 | /** |
Felipe Leme | 433d78a | 2018-01-08 16:39:00 -0800 | [diff] [blame] | 27 | * Activity responsible for handling {@link StorageVolume#createAccessIntent(String)}. |
Amin Shaikh | ced7a45 | 2018-10-23 14:22:48 -0400 | [diff] [blame] | 28 | * |
| 29 | * @deprecated This class handles the deprecated {@link StorageVolume#createAccessIntent(String)}. |
Felipe Leme | a4f4d7e | 2016-01-22 16:49:55 -0800 | [diff] [blame] | 30 | */ |
Amin Shaikh | ced7a45 | 2018-10-23 14:22:48 -0400 | [diff] [blame] | 31 | @Deprecated |
| 32 | public class ScopedAccessActivity extends Activity { |
Felipe Leme | a4f4d7e | 2016-01-22 16:49:55 -0800 | [diff] [blame] | 33 | @Override |
| 34 | public void onCreate(Bundle savedInstanceState) { |
| 35 | super.onCreate(savedInstanceState); |
shawnlin | 9cee68f | 2019-01-25 11:20:18 +0800 | [diff] [blame^] | 36 | logInvalidScopedAccessRequest(SCOPED_DIRECTORY_ACCESS_DEPRECATED); |
Amin Shaikh | ced7a45 | 2018-10-23 14:22:48 -0400 | [diff] [blame] | 37 | setResult(RESULT_CANCELED); |
| 38 | finish(); |
Felipe Leme | a4f4d7e | 2016-01-22 16:49:55 -0800 | [diff] [blame] | 39 | } |
| 40 | } |