Home | History | Annotate | Download | only in provider
      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 android.provider;
     18 
     19 import com.android.tools.layoutlib.annotations.LayoutlibDelegate;
     20 
     21 /**
     22  * Delegate that provides alternative implementation for methods in {@link DeviceConfig}
     23  * <p/>
     24  * Through the layoutlib_create tool, selected methods of DeviceConfig have been replaced by
     25  * calls to methods of the same name in this delegate class.
     26  */
     27 public class DeviceConfig_Delegate {
     28 
     29     @LayoutlibDelegate
     30     public static String getString(String namespace, String name, String defaultValue) {
     31         return defaultValue;
     32     }
     33 
     34     @LayoutlibDelegate
     35     public static boolean getBoolean(String namespace, String name, boolean defaultValue) {
     36         return defaultValue;
     37     }
     38 
     39     @LayoutlibDelegate
     40     public static int getInt(String namespace, String name, int defaultValue) {
     41         return defaultValue;
     42     }
     43 
     44     @LayoutlibDelegate
     45     public static long getLong(String namespace, String name, long defaultValue) {
     46         return defaultValue;
     47     }
     48 
     49     @LayoutlibDelegate
     50     public static float getFloat(String namespace, String name, float defaultValue) {
     51         return defaultValue;
     52     }
     53 }
     54