Skip to content

Commit

Permalink
fix(inputs): manage exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelje authored and Hector Rondon committed Jan 18, 2018
1 parent a6097d9 commit 43a1792
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions inventory/src/main/java/org/flyve/inventory/categories/Inputs.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
import android.content.Context;
import android.content.res.Configuration;

import org.flyve.inventory.FILog;

/**
* This class get all the information of the Inputs
*/
Expand Down Expand Up @@ -88,23 +90,27 @@ public Inputs(Context xCtx) {

config = xCtx.getResources().getConfiguration();

if(getKeyboard()) {
Category c = new Category("INPUTS", "inputs");
try {
if (getKeyboard()) {
Category c = new Category("INPUTS", "inputs");

c.put("CAPTION", new CategoryValue("Keyboard", "CAPTION", "caption"));
c.put("DESCRIPTION", new CategoryValue("Keyboard", "DESCRIPTION", "description"));
c.put("TYPE", new CategoryValue("Keyboard", "TYPE", "type"));
c.put("CAPTION", new CategoryValue("Keyboard", "CAPTION", "caption"));
c.put("DESCRIPTION", new CategoryValue("Keyboard", "DESCRIPTION", "description"));
c.put("TYPE", new CategoryValue("Keyboard", "TYPE", "type"));

this.add(c);
}
this.add(c);
}

Category c = new Category("INPUTS", "inputs");
Category c = new Category("INPUTS", "inputs");

c.put("CAPTION", new CategoryValue("Touch Screen", "CAPTION", "caption"));
c.put("DESCRIPTION", new CategoryValue("Touch Screen", "DESCRIPTION", "description"));
c.put("TYPE", new CategoryValue(getTouchscreen(), "TYPE", "type"));
c.put("CAPTION", new CategoryValue("Touch Screen", "CAPTION", "caption"));
c.put("DESCRIPTION", new CategoryValue("Touch Screen", "DESCRIPTION", "description"));
c.put("TYPE", new CategoryValue(getTouchscreen(), "TYPE", "type"));

this.add(c);
this.add(c);
} catch (Exception ex) {
FILog.e(ex.getMessage());
}
}

/**
Expand Down

0 comments on commit 43a1792

Please sign in to comment.