Skip to content

Commit 7ad7ddd

Browse files
committed
fix(javadoc): fix javadoc
Signed-off-by: Teclib <skita@teclib.com>
1 parent ed6d514 commit 7ad7ddd

File tree

15 files changed

+54
-45
lines changed

15 files changed

+54
-45
lines changed

inventory/src/main/java/org/flyve/inventory/FlyveException.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ public FlyveException() {
3939

4040
/**
4141
* The superclass constructor with a matching argument is called
42-
* @param message
43-
* @param cause
42+
* @param message String
43+
* @param cause Throwable
4444
*/
4545
public FlyveException(String message, Throwable cause)
4646
{

inventory/src/main/java/org/flyve/inventory/InventoryTask.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ public Boolean isRunning() {
8585
* This constructor return a Success XML or Error on asynchronous way
8686
* @param context The context to be use
8787
* @param appVersion The name of the agent
88+
* @param storeResult Boolean
8889
*/
8990
public InventoryTask(Context context, String appVersion, Boolean storeResult) {
9091
this(storeResult);
@@ -95,6 +96,8 @@ public InventoryTask(Context context, String appVersion, Boolean storeResult) {
9596
* This constructor return a Success XML or Error on asynchronous way
9697
* @param context The context to be use
9798
* @param appVersion The name of the agent
99+
* @param storeResult Boolean
100+
* @param categories String[]
98101
*/
99102
public InventoryTask(Context context, String appVersion, Boolean storeResult, String[] categories) {
100103
this(storeResult);
@@ -292,7 +295,7 @@ public void run() {
292295
}
293296

294297
/**
295-
* Return a JSON String synchronously
298+
* @return json String
296299
*/
297300
public String getJSONSync() {
298301
try {
@@ -312,7 +315,7 @@ public String getJSONSync() {
312315
}
313316

314317
/**
315-
* Return a XML String synchronously
318+
* @return xml String
316319
*/
317320
public String getXMLSyn() {
318321
try {

inventory/src/main/java/org/flyve/inventory/Utils.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,9 @@ public static boolean isEmulator() {
154154
* Create a JSON String with al the Categories available
155155
* @param categories ArrayList with the categories
156156
* @param appVersion Name of the agent
157+
* @param context Context
158+
* @param isPrivate boolean
159+
* @param tag String
157160
* @return String with JSON
158161
* @throws FlyveException Exception
159162
*/
@@ -209,6 +212,9 @@ protected static String createJSON(Context context, ArrayList<Categories> catego
209212
* Create a XML String with al the Categories available
210213
* @param categories ArrayList with the categories
211214
* @param appVersion Name of the agent
215+
* @param context Context
216+
* @param isPrivate boolean
217+
* @param tag String
212218
* @return String with XML
213219
* @throws FlyveException Exception
214220
*/

inventory/src/main/java/org/flyve/inventory/categories/Battery.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public class Battery extends Categories {
6060

6161
/**
6262
* Indicates whether some other object is "equal to" this one
63-
* @param Object obj the reference object with which to compare.
63+
* @param obj Object the reference object with which to compare.
6464
* @return boolean true if the object is the same as the one given in argument
6565
*/
6666
@Override

inventory/src/main/java/org/flyve/inventory/categories/Bluetooth.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public class Bluetooth extends Categories {
5353

5454
/**
5555
* Indicates whether some other object is "equal to" this one
56-
* @param Object obj the reference object with which to compare
56+
* @param obj Object the reference object with which to compare
5757
* @return boolean true if the object is the same as the one given in argument
5858
*/
5959
@Override

inventory/src/main/java/org/flyve/inventory/categories/Cameras.java

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* LICENSE
33
*
44
* This file is part of Flyve MDM Inventory Library for Android.
5-
*
5+
*
66
* Inventory Library for Android is a subproject of Flyve MDM.
77
* Flyve MDM is a mobile device management software.
88
*
@@ -51,7 +51,6 @@
5151
import java.nio.charset.Charset;
5252
import java.nio.charset.StandardCharsets;
5353
import java.util.ArrayList;
54-
import java.util.Iterator;
5554
import java.util.List;
5655
import java.util.Locale;
5756

@@ -137,7 +136,7 @@ public int getCountCamera(Context xCtx) {
137136

138137
/**
139138
* Get info characteristics of the camera
140-
* @param xCtx
139+
* @param xCtx Context
141140
* @param index number of the camera
142141
* @return CameraCharacteristics type object
143142
*/
@@ -157,7 +156,7 @@ public CameraCharacteristics getCharacteristics(Context xCtx, int index) {
157156

158157
/**
159158
* Get resolution from the camera
160-
* @param characteristics
159+
* @param characteristics CameraCharacteristics
161160
* @return String resolution camera
162161
*/
163162
public String getResolution(CameraCharacteristics characteristics) {
@@ -194,7 +193,7 @@ public String getResolution(CameraCharacteristics characteristics) {
194193

195194
/**
196195
* Get direction the camera faces relative to device screen
197-
* @param characteristics
196+
* @param characteristics CameraCharacteristics
198197
* @return String The camera device faces the same direction as the device's screen
199198
*/
200199
public String getFacingState(CameraCharacteristics characteristics) {
@@ -224,7 +223,7 @@ public String getFacingState(CameraCharacteristics characteristics) {
224223

225224
/**
226225
* Whether this camera device has a flash unit.
227-
* @param characteristics
226+
* @param characteristics CameraCharacteristics
228227
* @return String 0 no available, 1 is available
229228
*/
230229
public String getFlashUnit(CameraCharacteristics characteristics) {
@@ -242,7 +241,7 @@ public String getFlashUnit(CameraCharacteristics characteristics) {
242241

243242
/**
244243
* Get image format camera
245-
* @param characteristics
244+
* @param characteristics CameraCharacteristics
246245
* @return String image format camera
247246
*/
248247
public ArrayList<String> getImageFormat(CameraCharacteristics characteristics) {
@@ -321,7 +320,7 @@ private String typeFormat(int i) {
321320

322321
/**
323322
* Get orientation camera
324-
* @param characteristics
323+
* @param characteristics CameraCharacteristics
325324
* @return String orientation camera
326325
*/
327326
public String getOrientation(CameraCharacteristics characteristics) {
@@ -346,7 +345,7 @@ public String getOrientation(CameraCharacteristics characteristics) {
346345
*/
347346
public ArrayList<String> getVideoResolution(int index) {
348347
ArrayList<String> resolutions = new ArrayList<>();
349-
String value = "N/A";
348+
String value;
350349
try {
351350
Camera open = Camera.open(index);
352351
Camera.Parameters parameters = open.getParameters();
@@ -369,7 +368,7 @@ public ArrayList<String> getVideoResolution(int index) {
369368

370369
/**
371370
* Get focal length camera
372-
* @param characteristics
371+
* @param characteristics CameraCharacteristics
373372
* @return String focal length camera
374373
*/
375374
public String getFocalLength(CameraCharacteristics characteristics) {
@@ -396,7 +395,7 @@ public String getFocalLength(CameraCharacteristics characteristics) {
396395

397396
/**
398397
* Get sensor size camera
399-
* @param characteristics
398+
* @param characteristics CameraCharacteristics
400399
* @return String sensor size camera
401400
*/
402401
public String getSensorSize(CameraCharacteristics characteristics) {
@@ -411,10 +410,8 @@ public String getSensorSize(CameraCharacteristics characteristics) {
411410
return Math.round(width * 100) / 100.0d + "x" + Math.round(height * 100) / 100.0d;
412411
}
413412
}
414-
return value;
415-
} else {
416-
return value;
417413
}
414+
return value;
418415
} catch (Exception ex) {
419416
InventoryLog.e(InventoryLog.getMessage(context, CommonErrorType.CAMERA_SENSOR_SIZE, ex.getMessage()));
420417
}
@@ -485,9 +482,8 @@ public String getModel(int index) {
485482
*/
486483
public ArrayList<String> getSupportValue() {
487484
ArrayList<String> arrayList = new ArrayList<>();
488-
Iterator it = getCatInfoCamera("/system/lib/libcameracustom.so", "SENSOR_DRVNAME_", 100).iterator();
489-
while (it.hasNext()) {
490-
arrayList.add(((String) it.next()).toLowerCase(Locale.US));
485+
for (String s : getCatInfoCamera("/system/lib/libcameracustom.so", "SENSOR_DRVNAME_", 100)) {
486+
arrayList.add(s.toLowerCase(Locale.US));
491487
}
492488
return arrayList;
493489
}

inventory/src/main/java/org/flyve/inventory/categories/Category.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ public int hashCode() {
8686

8787
/**
8888
* This constructor load the Context of the instance and the name of the node in XML
89-
* @param xType name of the node
89+
* @param xType String name of the node
90+
* @param tagName String name of the tag
9091
*/
9192
public Category(String xType, String tagName) {
9293
mType = xType;
@@ -222,6 +223,7 @@ private void setChildXMLValue(XmlSerializer serializer, String xmlName, String x
222223

223224
/**
224225
* This is a public function that create a JSON
226+
* @return JSONObject
225227
*/
226228
public JSONObject toJSON() {
227229
try {

inventory/src/main/java/org/flyve/inventory/categories/CategoryValue.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ public class CategoryValue {
4141

4242
private static final String REGEX="[<>&]";
4343
/** Normal category
44-
* @param value
45-
* @param xmlName
46-
* @param jsonName
44+
* @param value String value
45+
* @param xmlName String xml name
46+
* @param jsonName String json name
4747
*/
4848
public CategoryValue(String value, String xmlName, String jsonName) {
4949
if (value == null) {
@@ -94,9 +94,9 @@ public CategoryValue(String value, String xmlName, String jsonName, Boolean isPr
9494
}
9595

9696
/** Insert list of values to the Category
97-
* @param values
98-
* @param xmlName
99-
* @param jsonName
97+
* @param values List<String> list of values
98+
* @param xmlName String xml name
99+
* @param jsonName String json name
100100
*/
101101
public CategoryValue(List<String> values, String xmlName, String jsonName) {
102102
if (values == null) {

inventory/src/main/java/org/flyve/inventory/categories/Hardware.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public class Hardware extends Categories {
8181

8282
/**
8383
* Indicates whether some other object is "equal to" this one
84-
* @param Object obj the reference object with which to compare
84+
* @param obj Object the reference object with which to compare
8585
* @return boolean true if the object is the same as the one given in argument
8686
*/
8787
@Override

inventory/src/main/java/org/flyve/inventory/categories/Inputs.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public class Inputs extends Categories {
5353

5454
/**
5555
* Indicates whether some other object is "equal to" this one
56-
* @param Object obj the reference object with which to compare
56+
* @param obj Object the reference object with which to compare
5757
* @return boolean true if the object is the same as the one given in argument
5858
*/
5959
@Override

0 commit comments

Comments
 (0)