Jeff Sharkey | 10b4d8d | 2019-02-04 21:53:22 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2019 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.providers.media.scan; |
| 18 | |
| 19 | import android.content.Context; |
| 20 | import android.net.Uri; |
Jeff Sharkey | 10b4d8d | 2019-02-04 21:53:22 -0700 | [diff] [blame] | 21 | |
Martijn Coenen | b5d6dde | 2021-04-01 16:17:41 +0200 | [diff] [blame] | 22 | import com.android.providers.media.MediaVolume; |
| 23 | |
Jeff Sharkey | 10b4d8d | 2019-02-04 21:53:22 -0700 | [diff] [blame] | 24 | import java.io.File; |
| 25 | |
Jeff Sharkey | 6669e0c | 2019-10-11 15:44:31 -0600 | [diff] [blame] | 26 | @Deprecated |
Jeff Sharkey | 10b4d8d | 2019-02-04 21:53:22 -0700 | [diff] [blame] | 27 | public class LegacyMediaScanner implements MediaScanner { |
| 28 | private final Context mContext; |
| 29 | |
| 30 | public LegacyMediaScanner(Context context) { |
| 31 | mContext = context; |
| 32 | } |
| 33 | |
| 34 | @Override |
| 35 | public Context getContext() { |
| 36 | return mContext; |
| 37 | } |
| 38 | |
| 39 | @Override |
Jeff Sharkey | 3c0a6c6 | 2019-11-15 20:45:41 -0700 | [diff] [blame] | 40 | public void scanDirectory(File file, int reason) { |
Jeff Sharkey | 6669e0c | 2019-10-11 15:44:31 -0600 | [diff] [blame] | 41 | throw new UnsupportedOperationException(); |
Jeff Sharkey | 10b4d8d | 2019-02-04 21:53:22 -0700 | [diff] [blame] | 42 | } |
| 43 | |
| 44 | @Override |
Jeff Sharkey | 3c0a6c6 | 2019-11-15 20:45:41 -0700 | [diff] [blame] | 45 | public Uri scanFile(File file, int reason) { |
Jeff Sharkey | 6669e0c | 2019-10-11 15:44:31 -0600 | [diff] [blame] | 46 | throw new UnsupportedOperationException(); |
Jeff Sharkey | 10b4d8d | 2019-02-04 21:53:22 -0700 | [diff] [blame] | 47 | } |
Jeff Sharkey | 68b2f06 | 2019-03-22 16:54:30 -0600 | [diff] [blame] | 48 | |
| 49 | @Override |
Martijn Coenen | b5d6dde | 2021-04-01 16:17:41 +0200 | [diff] [blame] | 50 | public void onDetachVolume(MediaVolume volume) { |
Jeff Sharkey | 6669e0c | 2019-10-11 15:44:31 -0600 | [diff] [blame] | 51 | throw new UnsupportedOperationException(); |
Jeff Sharkey | 68b2f06 | 2019-03-22 16:54:30 -0600 | [diff] [blame] | 52 | } |
Zim | 32d6b15 | 2020-09-30 18:33:22 +0100 | [diff] [blame] | 53 | |
| 54 | @Override |
| 55 | public void onIdleScanStopped() { |
| 56 | throw new UnsupportedOperationException(); |
| 57 | } |
Zim | 7e730f3 | 2020-09-30 11:38:50 +0100 | [diff] [blame] | 58 | |
| 59 | @Override |
| 60 | public void onDirectoryDirty(File file) { |
| 61 | throw new UnsupportedOperationException(); |
| 62 | } |
Jeff Sharkey | 10b4d8d | 2019-02-04 21:53:22 -0700 | [diff] [blame] | 63 | } |