• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2021 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;
18 
19 import android.net.Uri;
20 import android.os.Bundle;
21 import java.io.PrintWriter;
22 
23 import java.util.ArrayList;
24 import java.util.List;
25 
26 /**
27  * No-op transcode helper to avoid loading MediaTranscodeManager classes in Android R
28  */
29 public class TranscodeHelperNoOp implements TranscodeHelper {
freeCache(long bytes)30     public void freeCache(long bytes) {}
31 
onAnrDelayStarted(String packageName, int uid, int tid, int reason)32     public void onAnrDelayStarted(String packageName, int uid, int tid, int reason) {}
33 
transcode(String src, String dst, int uid, int reason)34     public boolean transcode(String src, String dst, int uid, int reason) {
35         return false;
36     }
37 
prepareIoPath(String path, int uid)38     public String prepareIoPath(String path, int uid) {
39         return null;
40     }
41 
shouldTranscode(String path, int uid, Bundle bundle)42     public int shouldTranscode(String path, int uid, Bundle bundle) {
43         return 0;
44     }
45 
supportsTranscode(String path)46     public boolean supportsTranscode(String path) {
47         return false;
48     }
49 
onUriPublished(Uri uri)50     public void onUriPublished(Uri uri) {}
51 
onFileOpen(String path, String ioPath, int uid, int transformsReason)52     public void onFileOpen(String path, String ioPath, int uid, int transformsReason) {}
53 
isTranscodeFileCached(String path, String transcodePath)54     public boolean isTranscodeFileCached(String path, String transcodePath) {
55         return false;
56     }
57 
deleteCachedTranscodeFile(long rowId)58     public boolean deleteCachedTranscodeFile(long rowId) {
59         return false;
60     }
61 
dump(PrintWriter writer)62     public void dump(PrintWriter writer) {}
63 
getSupportedRelativePaths()64     public List<String> getSupportedRelativePaths() {
65         return new ArrayList<String>();
66     }
67 }
68