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.systemui.plugins; 17 18 import com.android.systemui.plugins.annotations.ProvidesInterface; 19 20 /** 21 * Plugin to support customizing resource 22 */ 23 @ProvidesInterface(action = ResourceProvider.ACTION, version = ResourceProvider.VERSION) 24 public interface ResourceProvider extends Plugin { 25 String ACTION = "com.android.launcher3.action.PLUGIN_DYNAMIC_RESOURCE"; 26 int VERSION = 1; 27 28 /** 29 * @see android.content.res.Resources#getInteger(int) 30 */ getInt(int resId)31 int getInt(int resId); 32 33 /** 34 * @see android.content.res.Resources#getFraction(int, int, int) 35 */ getFraction(int resId)36 float getFraction(int resId); 37 38 /** 39 * @see android.content.res.Resources#getDimension(int) 40 */ getDimension(int resId)41 float getDimension(int resId); 42 43 /** 44 * @see android.content.res.Resources#getColor(int) 45 */ getColor(int resId)46 int getColor(int resId); 47 48 /** 49 * @see android.content.res.Resources#getFloat(int) 50 */ getFloat(int resId)51 float getFloat(int resId); 52 } 53