| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package org.chromium.net; | 5 package org.chromium.net; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Version based on chrome/VERSION. | 8 * Version based on chrome/VERSION. |
| 9 * {@hide as it's only used internally} | 9 * {@hide as it's only used internally} |
| 10 */ | 10 */ |
| 11 public class ApiVersion { | 11 public class ApiVersion { |
| 12 public static final String CRONET_VERSION = "@MAJOR@.@MINOR@.@BUILD@.@PATCH@
"; | 12 private static final String CRONET_VERSION = "@MAJOR@.@MINOR@.@BUILD@.@PATCH
@"; |
| 13 public static final String LAST_CHANGE = "@LASTCHANGE@"; | 13 private static final int API_LEVEL = @API_LEVEL@; |
| 14 private static final String LAST_CHANGE = "@LASTCHANGE@"; |
| 14 | 15 |
| 15 public static String getVersion() { | 16 /** |
| 17 * Private constructor. All members of this class should be static. |
| 18 */ |
| 19 private ApiVersion() {} |
| 20 |
| 21 public static String getCronetVersionWithLastChange() { |
| 16 return CRONET_VERSION + "@" + LAST_CHANGE.substring(0, 8); | 22 return CRONET_VERSION + "@" + LAST_CHANGE.substring(0, 8); |
| 17 } | 23 } |
| 24 |
| 25 public static int getApiLevel() { |
| 26 return API_LEVEL; |
| 27 } |
| 28 |
| 29 public static String getCronetVersion() { |
| 30 return CRONET_VERSION; |
| 31 } |
| 32 |
| 33 public static String getLastChange() { |
| 34 return LAST_CHANGE; |
| 35 } |
| 18 } | 36 } |
| OLD | NEW |