| OLD | NEW |
| 1 /* | 1 /* |
| 2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
| 3 * Copyright (C) 2006-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 Eyeo GmbH |
| 4 * | 4 * |
| 5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
| 6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
| 7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
| 8 * | 8 * |
| 9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 * GNU General Public License for more details. | 12 * GNU General Public License for more details. |
| 13 * | 13 * |
| 14 * You should have received a copy of the GNU General Public License | 14 * You should have received a copy of the GNU General Public License |
| 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. | 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
| 16 */ | 16 */ |
| 17 | 17 |
| 18 package org.adblockplus.libadblockplus; | 18 package org.adblockplus.libadblockplus; |
| 19 | 19 |
| 20 public class AppInfo | 20 public class AppInfo |
| 21 { | 21 { |
| 22 public final String id; | |
| 23 public final String version; | 22 public final String version; |
| 24 public final String name; | 23 public final String name; |
| 25 public final String application; | 24 public final String application; |
| 26 public final String applicationVersion; | 25 public final String applicationVersion; |
| 27 public final String locale; | 26 public final String locale; |
| 28 public final boolean developmentBuild; | 27 public final boolean developmentBuild; |
| 29 | 28 |
| 30 private AppInfo(final String id, final String version, final String name, fina
l String application, final String applicationVersion, | 29 private AppInfo(final String version, final String name, final String applicat
ion, final String applicationVersion, |
| 31 final String locale, final boolean developmentBuild) | 30 final String locale, final boolean developmentBuild) |
| 32 { | 31 { |
| 33 this.id = id; | |
| 34 this.version = version; | 32 this.version = version; |
| 35 this.name = name; | 33 this.name = name; |
| 36 this.application = application; | 34 this.application = application; |
| 37 this.applicationVersion = applicationVersion; | 35 this.applicationVersion = applicationVersion; |
| 38 this.locale = locale; | 36 this.locale = locale; |
| 39 this.developmentBuild = developmentBuild; | 37 this.developmentBuild = developmentBuild; |
| 40 } | 38 } |
| 41 | 39 |
| 42 public static Builder builder() | 40 public static Builder builder() |
| 43 { | 41 { |
| 44 return new Builder(); | 42 return new Builder(); |
| 45 } | 43 } |
| 46 | 44 |
| 47 public static class Builder | 45 public static class Builder |
| 48 { | 46 { |
| 49 private String id = ""; | |
| 50 private String version = "0"; | 47 private String version = "0"; |
| 51 private String name = "adblockplusandroid"; | 48 private String name = "adblockplusandroid"; |
| 52 private String application = "android"; | 49 private String application = "android"; |
| 53 private String applicationVersion = "0"; | 50 private String applicationVersion = "0"; |
| 54 private String locale = "en_US"; | 51 private String locale = "en_US"; |
| 55 private boolean developmentBuild = false; | 52 private boolean developmentBuild = false; |
| 56 | 53 |
| 57 private Builder() | 54 private Builder() |
| 58 { | 55 { |
| 59 | 56 |
| 60 } | 57 } |
| 61 | 58 |
| 62 public Builder setId(final String id) | |
| 63 { | |
| 64 this.id = id; | |
| 65 return this; | |
| 66 } | |
| 67 | |
| 68 public Builder setVersion(final String version) | 59 public Builder setVersion(final String version) |
| 69 { | 60 { |
| 70 this.version = version; | 61 this.version = version; |
| 71 return this; | 62 return this; |
| 72 } | 63 } |
| 73 | 64 |
| 74 public Builder setName(final String name) | 65 public Builder setName(final String name) |
| 75 { | 66 { |
| 76 this.name = name; | 67 this.name = name; |
| 77 return this; | 68 return this; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 96 } | 87 } |
| 97 | 88 |
| 98 public Builder setDevelopmentBuild(final boolean developmentBuild) | 89 public Builder setDevelopmentBuild(final boolean developmentBuild) |
| 99 { | 90 { |
| 100 this.developmentBuild = developmentBuild; | 91 this.developmentBuild = developmentBuild; |
| 101 return this; | 92 return this; |
| 102 } | 93 } |
| 103 | 94 |
| 104 public AppInfo build() | 95 public AppInfo build() |
| 105 { | 96 { |
| 106 return new AppInfo(this.id, this.version, this.name, this.application, thi
s.applicationVersion, this.locale, this.developmentBuild); | 97 return new AppInfo(this.version, this.name, this.application, this.applica
tionVersion, this.locale, this.developmentBuild); |
| 107 } | 98 } |
| 108 } | 99 } |
| 109 } | 100 } |
| OLD | NEW |