1282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski/*
2282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski * Copyright (C) 2013 The Android Open Source Project
3282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski *
4282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski * Licensed under the Apache License, Version 2.0 (the "License");
5282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski * you may not use this file except in compliance with the License.
6282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski * You may obtain a copy of the License at
7282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski *
8282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski *      http://www.apache.org/licenses/LICENSE-2.0
9282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski *
10282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski * Unless required by applicable law or agreed to in writing, software
11282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski * distributed under the License is distributed on an "AS IS" BASIS,
12282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski * See the License for the specific language governing permissions and
14282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski * limitations under the License.
15282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski */
16282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski
17282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinskipackage android.text.format;
18282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski
19282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinskiimport com.android.tools.layoutlib.annotations.LayoutlibDelegate;
20282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski
21282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinskiimport android.content.Context;
22282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski
23282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski
24282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski/**
25282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski * Delegate used to provide new implementation for the native methods of {@link DateFormat}
26282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski *
27282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski * Through the layoutlib_create tool, the original  methods of DateFormat have been replaced
28282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski * by calls to methods of the same name in this delegate class.
29282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski *
30282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski */
31282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinskipublic class DateFormat_Delegate {
32282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski
33282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski    @LayoutlibDelegate
34282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski    /*package*/ static boolean is24HourFormat(Context context) {
35282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski        return false;
36282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski    }
376aede34e246e03be618c30504fc2fc8b07f23225Deepanshu Gupta
386aede34e246e03be618c30504fc2fc8b07f23225Deepanshu Gupta    @LayoutlibDelegate
396aede34e246e03be618c30504fc2fc8b07f23225Deepanshu Gupta    /*package*/ static boolean is24HourFormat(Context context, int userHandle) {
406aede34e246e03be618c30504fc2fc8b07f23225Deepanshu Gupta        return false;
416aede34e246e03be618c30504fc2fc8b07f23225Deepanshu Gupta    }
42282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski}
43