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 package com.android.wallpaper.testing;
17 
18 import android.content.res.Resources;
19 
20 import com.android.wallpaper.module.PartnerProvider;
21 
22 import java.io.File;
23 
24 /**
25  * Test implementation for PartnerProvider.
26  */
27 public class TestPartnerProvider implements PartnerProvider {
28     private File mLegacyWallpaperDirectory;
29 
30     @Override
getResources()31     public Resources getResources() {
32         return null;
33     }
34 
35     @Override
getLegacyWallpaperDirectory()36     public File getLegacyWallpaperDirectory() {
37         return mLegacyWallpaperDirectory;
38     }
39 
40     /**
41      * Sets the File to be returned by subsequent calls to getLegacyWallpaperDirectory().
42      *
43      * @param dir The legacy wallpaper directory.
44      */
setLegacyWallpaperDirectory(File dir)45     public void setLegacyWallpaperDirectory(File dir) {
46         mLegacyWallpaperDirectory = dir;
47     }
48 
49     @Override
getPackageName()50     public String getPackageName() {
51         return null;
52     }
53 
54     @Override
shouldHideDefaultWallpaper()55     public boolean shouldHideDefaultWallpaper() {
56         return false;
57     }
58 }
59