Skip to content

Commit 695eb06

Browse files
committed
add debug
1 parent 3f286a4 commit 695eb06

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

app/src/main/java/org/glpi/inventory/agent/ui/ActivityMain.java

+5
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ public static void enterpriseFeedback(Context context,
173173
}
174174

175175
private void resolveRestrictions() {
176+
AgentLog.e("EMM - START resolve restrictions");
176177
RestrictionsManager myRestrictionsMgr = null;
177178
myRestrictionsMgr = (RestrictionsManager) getSystemService(Context.RESTRICTIONS_SERVICE);
178179
Bundle appRestrictions = myRestrictionsMgr.getApplicationRestrictions();
@@ -191,14 +192,18 @@ private void resolveRestrictions() {
191192
jo.put("pass", serverConfig.getString("server_password"));
192193
jo.put("itemtype", serverConfig.getString("server_itemtype"));
193194
jo.put("serial", serverConfig.getString("server_custom_asset_serial"));
195+
AgentLog.e("EMM - JSON " + jo.toString(););
194196
preferences.saveJSONObject(serverConfig.getString("server_url"), jo);
195197
enterpriseFeedback(getApplicationContext(), "server_url", "server added / updated successfully", serverConfig.getString("server_url"), KeyedAppState.SEVERITY_INFO);
196198
} catch (JSONException e) {
197199
enterpriseFeedback(getApplicationContext(), "server_url", "error while adding/updating server -> " + e.getMessage(), serverConfig.getString("server_url"), KeyedAppState.SEVERITY_ERROR);
198200
AgentLog.e(e.getMessage());
199201
}
200202
}
203+
} else {
204+
AgentLog.e("EMM - 'server_configuration' key is empty");
201205
}
206+
AgentLog.e("EMM - END resolve restrictions");
202207
}
203208

204209
@Override

0 commit comments

Comments
 (0)