Repository navigation
Set status - #7149
Set status#7149
Conversation
adba8f0 to
45ad179
Compare
45ad179 to
f3522a8
Compare
|
Issues
======
- Added 10
Complexity increasing per file
==============================
- src/main/java/com/owncloud/android/ui/StatusDrawable.java 5
- src/main/java/com/owncloud/android/ui/asynctasks/RetrieveStatusAsyncTask.java 2
- src/main/java/com/owncloud/android/providers/FileContentProvider.java 3
- src/main/java/com/owncloud/android/providers/UsersAndGroupsSearchProvider.java 13
- src/main/java/com/owncloud/android/utils/DisplayUtils.java 2
Clones added
============
- src/main/java/com/nextcloud/ui/SetStatusTask.kt 1
- src/main/java/com/nextcloud/ui/SetUserDefinedCustomStatusTask.kt 4
- src/main/java/com/nextcloud/ui/SetPredefinedCustomStatusTask.kt 2
- src/main/java/com/nextcloud/ui/ClearStatusTask.kt 1
See the complete overview on Codacy |
| NextcloudClient client = clientFactory.createNextcloudClient(user); | ||
| RemoteOperationResult result = new GetStatusRemoteOperation().execute(client); | ||
|
|
||
| return (com.owncloud.android.lib.resources.users.Status) result.getSingleData(); |
There was a problem hiding this comment.
|
|
||
| default: | ||
| // do not show | ||
| backgroundPaint = null; |
There was a problem hiding this comment.
Codacy found an issue: Assigning an Object to null is a code smell. Consider refactoring.
| statusObject.isNull("icon") ? "" : statusObject.getString("icon"), | ||
| statusObject.isNull("clearAt") ? -1 : statusObject.getLong("clearAt")); | ||
| } else { | ||
| status = new Status(StatusType.OFFLINE, "", "", -1); |
There was a problem hiding this comment.
Codacy found an issue: Avoid instantiating new objects inside loops
| byte[] bitmapData = bos.toByteArray(); | ||
|
|
||
| //write the bytes in file | ||
| try (FileOutputStream fos = new FileOutputStream(f)) { |
There was a problem hiding this comment.
Codacy found an issue: Avoid instantiating FileInputStream, FileOutputStream, FileReader, or FileWriter
| case USER: | ||
| displayName = userName; | ||
| icon = R.drawable.ic_user; | ||
| subline = status.getMessage().isEmpty() ? null : status.getMessage(); |
There was a problem hiding this comment.
Codacy found an issue: Assigning an Object to null is a code smell. Consider refactoring.
| */ | ||
| private float mRadius; | ||
|
|
||
| private boolean bigText = false; |
There was a problem hiding this comment.
Codacy found an issue: Avoid using redundant field initializer for 'bigText'
| } | ||
|
|
||
| @Override | ||
| protected void onPostExecute(com.owncloud.android.lib.resources.users.Status status) { |
There was a problem hiding this comment.
| JSONObject statusObject = item.optJSONObject("status"); | ||
|
|
||
| if (statusObject != null) { | ||
| status = new Status(StatusType.valueOf(statusObject.getString("status")), |
There was a problem hiding this comment.
Codacy found an issue: Avoid instantiating new objects inside loops
| } | ||
|
|
||
| @Override | ||
| protected com.owncloud.android.lib.resources.users.Status doInBackground(Void... voids) { |
There was a problem hiding this comment.
| return (com.owncloud.android.lib.resources.users.Status) result.getSingleData(); | ||
|
|
||
| } catch (ClientFactory.CreationException e) { | ||
| return new com.owncloud.android.lib.resources.users.Status(StatusType.OFFLINE, "", "", -1); |
There was a problem hiding this comment.
Signed-off-by: tobiasKaminsky <[email protected]>
Signed-off-by: Andy Scherzinger <[email protected]>
Signed-off-by: Andy Scherzinger <[email protected]>
Signed-off-by: Andy Scherzinger <[email protected]>
Signed-off-by: Andy Scherzinger <[email protected]>
Signed-off-by: Andy Scherzinger <[email protected]>
Signed-off-by: Andy Scherzinger <[email protected]>
Signed-off-by: tobiasKaminsky <[email protected]>
Signed-off-by: tobiasKaminsky <[email protected]>
Signed-off-by: tobiasKaminsky <[email protected]>
Signed-off-by: tobiasKaminsky <[email protected]>
Signed-off-by: tobiasKaminsky <[email protected]>
Signed-off-by: tobiasKaminsky <[email protected]>
Signed-off-by: tobiasKaminsky <[email protected]>
Signed-off-by: Andy Scherzinger <[email protected]>
Signed-off-by: tobiasKaminsky <[email protected]>
Signed-off-by: tobiasKaminsky <[email protected]>
75d71b4 to
e8cfaaf
Compare
Signed-off-by: Andy Scherzinger <[email protected]>
Signed-off-by: Andy Scherzinger <[email protected]>
Signed-off-by: tobiasKaminsky <[email protected]>
Signed-off-by: tobiasKaminsky <[email protected]>
Signed-off-by: tobiasKaminsky <[email protected]>
e8cfaaf to
6d1d4a7
Compare
Signed-off-by: Andy Scherzinger <[email protected]>
|
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/16384.apk |
|
master-light-blue-Screenshot test failed: https://www.kaminsky.me/nc-dev/android-integrationTests/16384-Screenshot-master-light-blue |
CodacyLint
SpotBugs (new)
SpotBugs (master)
|
|
stable-light-blue-Screenshot test failed: https://www.kaminsky.me/nc-dev/android-integrationTests/16384-Screenshot-stable-light-blue |
|
master-IT test failed: https://www.kaminsky.me/nc-dev/android-integrationTests/16384-IT-master |
|
master-dark-blue-Screenshot test failed: https://www.kaminsky.me/nc-dev/android-integrationTests/16384-Screenshot-master-dark-blue |
|
stable-dark-blue-Screenshot test failed: https://www.kaminsky.me/nc-dev/android-integrationTests/16384-Screenshot-stable-dark-blue |
Set status Signed-off-by: thelittlefireman <[email protected]>

Fix #7016
Testing
Writing tests is very important. Please try to write some tests for your PR.
If you need help, please do not hesitate to ask in this PR for help.
unit tests
instrumented tests
UI tests