Skip to content

Commit 2061207

Browse files
Merge pull request nextcloud#5531 from nextcloud/fix/AS36
Update to Android Studio 3.6
2 parents bac4e9b + b9df3de commit 2061207

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1536
-337
lines changed

.idea/codeStyles/Project.xml

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.gradle

+1-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ buildscript {
2020
mavenCentral()
2121
}
2222
dependencies {
23-
classpath 'com.android.tools.build:gradle:3.5.3'
23+
classpath 'com.android.tools.build:gradle:3.6.1'
2424
classpath('com.dicedmelon.gradle:jacoco-android:0.1.4') {
2525
exclude group: 'org.codehaus.groovy', module: 'groovy-all'
2626
}
@@ -333,9 +333,6 @@ dependencies {
333333
kapt "com.google.dagger:dagger-compiler:$daggerVersion"
334334
kapt "com.google.dagger:dagger-android-processor:$daggerVersion"
335335

336-
compileOnly "org.projectlombok:lombok:1.18.12"
337-
annotationProcessor "org.projectlombok:lombok:1.18.12"
338-
339336
ktlint "com.pinterest:ktlint:0.36.0"
340337
implementation 'org.conscrypt:conscrypt-android:2.2.1'
341338

scripts/analysis/findbugs-results.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
382
1+
381

scripts/analysis/lint-results.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
DO NOT TOUCH; GENERATED BY DRONE
2-
<span class="mdl-layout-title">Lint Report: 76 warnings</span>
2+
<span class="mdl-layout-title">Lint Report: 92 warnings</span>

src/main/java/com/nextcloud/android/sso/PlainHeader.java

+8-4
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,10 @@
2727
import java.io.ObjectOutputStream;
2828
import java.io.Serializable;
2929

30-
import lombok.Getter;
31-
3230
public class PlainHeader implements Serializable {
3331
private static final long serialVersionUID = 3284979177401282512L;
3432

35-
@Getter
3633
private String name;
37-
@Getter
3834
private String value;
3935

4036
PlainHeader(String name, String value) {
@@ -51,4 +47,12 @@ private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundE
5147
name = (String) in.readObject();
5248
value = (String) in.readObject();
5349
}
50+
51+
public String getName() {
52+
return this.name;
53+
}
54+
55+
public String getValue() {
56+
return this.value;
57+
}
5458
}

src/main/java/com/nextcloud/android/sso/Response.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,7 @@
3030
import java.util.ArrayList;
3131
import java.util.List;
3232

33-
import lombok.Getter;
34-
3533
public class Response {
36-
@Getter
3734
private InputStream body;
3835
private Header[] headers;
3936

@@ -62,4 +59,8 @@ public String getPlainHeadersString() {
6259
Gson gson = new Gson();
6360
return gson.toJson(arrayList);
6461
}
62+
63+
public InputStream getBody() {
64+
return this.body;
65+
}
6566
}

src/main/java/com/owncloud/android/datamodel/ArbitraryDataSet.java src/main/java/com/owncloud/android/datamodel/ArbitraryDataSet.kt

+3-19
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,9 @@
1919
* You should have received a copy of the GNU Affero General Public License
2020
* along with this program. If not, see <https://www.gnu.org/licenses/>.
2121
*/
22-
23-
package com.owncloud.android.datamodel;
24-
25-
import lombok.Getter;
22+
package com.owncloud.android.datamodel
2623

2724
/**
28-
* Data set for {@link ArbitraryDataProvider}
25+
* Data set for [ArbitraryDataProvider]
2926
*/
30-
@Getter
31-
class ArbitraryDataSet {
32-
private int id;
33-
private String cloudId;
34-
private String key;
35-
private String value;
36-
37-
ArbitraryDataSet(int id, String cloudId, String key, String value) {
38-
this.id = id;
39-
this.cloudId = cloudId;
40-
this.key = key;
41-
this.value = value;
42-
}
43-
}
27+
internal class ArbitraryDataSet(val id: Int, val cloudId: String, val key: String, val value: String)

src/main/java/com/owncloud/android/datamodel/DecryptedFolderMetadata.java

+133-17
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,9 @@
2424
import java.util.HashMap;
2525
import java.util.Map;
2626

27-
import lombok.AllArgsConstructor;
28-
import lombok.Getter;
29-
import lombok.Setter;
30-
3127
/**
3228
* Decrypted class representation of metadata json of folder metadata.
3329
*/
34-
@Getter
35-
@Setter
36-
@AllArgsConstructor
3730
public class DecryptedFolderMetadata {
3831
private Metadata metadata;
3932
private Map<String, DecryptedFile> files;
@@ -43,8 +36,27 @@ public DecryptedFolderMetadata() {
4336
this.files = new HashMap<>();
4437
}
4538

46-
@Getter
47-
@Setter
39+
public DecryptedFolderMetadata(Metadata metadata, Map<String, DecryptedFile> files) {
40+
this.metadata = metadata;
41+
this.files = files;
42+
}
43+
44+
public Metadata getMetadata() {
45+
return this.metadata;
46+
}
47+
48+
public Map<String, DecryptedFile> getFiles() {
49+
return this.files;
50+
}
51+
52+
public void setMetadata(Metadata metadata) {
53+
this.metadata = metadata;
54+
}
55+
56+
public void setFiles(Map<String, DecryptedFile> files) {
57+
this.files = files;
58+
}
59+
4860
public static class Metadata {
4961
private Map<Integer, String> metadataKeys; // each keys is encrypted on its own, decrypt on use
5062
private Sharing sharing;
@@ -54,36 +66,140 @@ public static class Metadata {
5466
public String toString() {
5567
return String.valueOf(version);
5668
}
69+
70+
public Map<Integer, String> getMetadataKeys() {
71+
return this.metadataKeys;
72+
}
73+
74+
public Sharing getSharing() {
75+
return this.sharing;
76+
}
77+
78+
public int getVersion() {
79+
return this.version;
80+
}
81+
82+
public void setMetadataKeys(Map<Integer, String> metadataKeys) {
83+
this.metadataKeys = metadataKeys;
84+
}
85+
86+
public void setSharing(Sharing sharing) {
87+
this.sharing = sharing;
88+
}
89+
90+
public void setVersion(int version) {
91+
this.version = version;
92+
}
5793
}
5894

59-
@Getter
60-
@Setter
6195
public static class Encrypted {
6296
private Map<Integer, String> metadataKeys;
97+
98+
public Map<Integer, String> getMetadataKeys() {
99+
return this.metadataKeys;
100+
}
101+
102+
public void setMetadataKeys(Map<Integer, String> metadataKeys) {
103+
this.metadataKeys = metadataKeys;
104+
}
63105
}
64106

65-
@Getter
66-
@Setter
67107
public static class Sharing {
68108
private Map<String, String> recipient;
69109
private String signature;
110+
111+
public Map<String, String> getRecipient() {
112+
return this.recipient;
113+
}
114+
115+
public String getSignature() {
116+
return this.signature;
117+
}
118+
119+
public void setRecipient(Map<String, String> recipient) {
120+
this.recipient = recipient;
121+
}
122+
123+
public void setSignature(String signature) {
124+
this.signature = signature;
125+
}
70126
}
71127

72-
@Getter
73-
@Setter
74128
public static class DecryptedFile {
75129
private Data encrypted;
76130
private String initializationVector;
77131
private String authenticationTag;
78132
private int metadataKey;
133+
134+
public Data getEncrypted() {
135+
return this.encrypted;
136+
}
137+
138+
public String getInitializationVector() {
139+
return this.initializationVector;
140+
}
141+
142+
public String getAuthenticationTag() {
143+
return this.authenticationTag;
144+
}
145+
146+
public int getMetadataKey() {
147+
return this.metadataKey;
148+
}
149+
150+
public void setEncrypted(Data encrypted) {
151+
this.encrypted = encrypted;
152+
}
153+
154+
public void setInitializationVector(String initializationVector) {
155+
this.initializationVector = initializationVector;
156+
}
157+
158+
public void setAuthenticationTag(String authenticationTag) {
159+
this.authenticationTag = authenticationTag;
160+
}
161+
162+
public void setMetadataKey(int metadataKey) {
163+
this.metadataKey = metadataKey;
164+
}
79165
}
80166

81-
@Getter
82-
@Setter
83167
public static class Data {
84168
private String key;
85169
private String filename;
86170
private String mimetype;
87171
private int version;
172+
173+
public String getKey() {
174+
return this.key;
175+
}
176+
177+
public String getFilename() {
178+
return this.filename;
179+
}
180+
181+
public String getMimetype() {
182+
return this.mimetype;
183+
}
184+
185+
public int getVersion() {
186+
return this.version;
187+
}
188+
189+
public void setKey(String key) {
190+
this.key = key;
191+
}
192+
193+
public void setFilename(String filename) {
194+
this.filename = filename;
195+
}
196+
197+
public void setMimetype(String mimetype) {
198+
this.mimetype = mimetype;
199+
}
200+
201+
public void setVersion(int version) {
202+
this.version = version;
203+
}
88204
}
89205
}

0 commit comments

Comments
 (0)