• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2022 Google LLC
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.google.android.libraries.mobiledatadownload;
17 
18 import com.google.common.base.Optional;
19 import com.google.mobiledatadownload.DownloadConfigProto.DownloadConditions;
20 import com.google.mobiledatadownload.DownloadConfigProto.DownloadConditions.DeviceNetworkPolicy;
21 import com.google.mobiledatadownload.DownloadConfigProto.DownloadConditions.DeviceStoragePolicy;
22 
23 /** External MDD Constants */
24 public final class Constants {
25   // TODO: Figure out if we can add a test to keep in sync with DownloadCondition
26   /** To download under any conditions, clients should use constant. */
27   // LINT.IfChange
28   public static final Optional<DownloadConditions> NO_RESTRICTIONS_DOWNLOAD_CONDITIONS =
29       Optional.of(
30           DownloadConditions.newBuilder()
31               .setDeviceNetworkPolicy(DeviceNetworkPolicy.DOWNLOAD_ON_ANY_NETWORK)
32               .setDeviceStoragePolicy(DeviceStoragePolicy.BLOCK_DOWNLOAD_LOWER_THRESHOLD)
33               .build());
34   // LINT.ThenChange(<internal>)
35 
36   /** The version of MDD library. Same as mdi_download module version. */
37   // TODO(b/122271766): Figure out how to update this automatically.
38   // LINT.IfChange
39   public static final int MDD_LIB_VERSION = 516938429;
40   // LINT.ThenChange(<internal>)
41 
42   // <internal>
Constants()43   private Constants() {}
44 }
45