1/*
2 * Copyright (C) 2012 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
17package com.android.location.provider;
18
19import com.android.internal.location.ProviderProperties;
20
21/**
22 * This class is an interface to Provider Properties for unbundled applications.
23 *
24 * <p>IMPORTANT: This class is effectively a public API for unbundled
25 * applications, and must remain API stable. See README.txt in the root
26 * of this package for more information.
27 */
28public final class ProviderPropertiesUnbundled {
29    private final ProviderProperties mProperties;
30
31    public static ProviderPropertiesUnbundled create(boolean requiresNetwork,
32            boolean requiresSatellite, boolean requiresCell, boolean hasMonetaryCost,
33            boolean supportsAltitude, boolean supportsSpeed, boolean supportsBearing,
34            int powerRequirement, int accuracy) {
35        return new ProviderPropertiesUnbundled(new ProviderProperties(requiresNetwork,
36                requiresSatellite, requiresCell, hasMonetaryCost, supportsAltitude, supportsSpeed,
37                supportsBearing, powerRequirement, accuracy));
38    }
39
40    private ProviderPropertiesUnbundled(ProviderProperties properties) {
41        mProperties = properties;
42    }
43
44    public ProviderProperties getProviderProperties() {
45        return mProperties;
46    }
47
48    @Override
49    public String toString() {
50        return mProperties.toString();
51    }
52}
53