Skip to content

Commit

Permalink
but on proxy option corrected
Browse files Browse the repository at this point in the history
  • Loading branch information
cdpointpoint committed Oct 15, 2015
1 parent 3dceddc commit a7835c3
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 12 deletions.
4 changes: 2 additions & 2 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.ocsinventoryng.android.agent"
android:installLocation="auto"
android:versionCode="24"
android:versionName="2.1.6c" >
android:versionCode="25"
android:versionName="2.1.7" >

<uses-sdk
android:minSdkVersion="9"
Expand Down
3 changes: 3 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,6 @@ Revision history for Ocsinventory NG Android Agent
2.1.6
* Bugs correction on package installation managment notifications
* Add InstallReceiver class
2.1.7
* Bug on proxy option corrected. The option was not applied.

13 changes: 11 additions & 2 deletions src/org/ocsinventoryng/android/actions/Inventory.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,9 @@ public void BuildInventory(Context ctx) {
hardware.setIpAddress(pn.getIpAdress());
}

ocslog.debug("drives...");
ocslog.debug("OCSdrives...");
this.drives=new OCSDrives();
ocslog.debug("OCSStorages...");
this.storages=new OCSStorages();

if ( settings.getDeviceUid() == null ) {
Expand All @@ -108,12 +109,16 @@ public void BuildInventory(Context ctx) {
this.videos = new OCSVideos(ctx);
ocslog.debug("OCSSoftwares...");
this.softwares = new OCSSoftwares(ctx);
ocslog.debug("OCSInputs...");
this.inputs=new OCSInputs(ctx.getApplicationContext());
ocslog.debug("OCSJavaInfos...");
this.javainfos= new OCSJavaInfos();
ocslog.debug("OCSSims...");
this.sims= new OCSSims(ctx);

/* Mise a jour du checksum */
mCtx=ctx;
ocslog.debug("CHECKSUM update");
loadSectionsFP(ctx);
currentFP=new Hashtable<String, String>();

Expand Down Expand Up @@ -251,7 +256,11 @@ public List<OCSSection> getSections( String sName ) {

return null;
}


/**
Load sections checksum from file
@param ctx application context
**/
private void loadSectionsFP(Context ctx ) {
lastFP=new Hashtable<String, String>();

Expand Down
2 changes: 1 addition & 1 deletion src/org/ocsinventoryng/android/actions/OCSSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class OCSSettings
final String KDEBUG = "k_debug";
final String KGZIP = "k_gzip";
final String KSTRICTSSL = "k_strictssl";
final String KPROXY = "k_proxyl";
final String KPROXY = "k_proxy";
final String KPROXYADR = "k_proxyadr";
final String KPROXYPORT = "k_proxyport";
final String KCACHE = "k_cache";
Expand Down
17 changes: 11 additions & 6 deletions src/org/ocsinventoryng/android/sections/OCSInputs.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ public OCSInputs(Context ctx) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
ocslog.debug("OCSInputs BUILD Build.VERSION.SDK_INT ");
Configuration config = ctx.getResources().getConfiguration();
ocslog.debug("config.keyboard"+ config.keyboard);
ocslog.debug("config.touchscreen"+ config.keyboard);
ocslog.debug("config.keyboard "+ config.keyboard);
ocslog.debug("config.touchscreen "+ config.touchscreen);

OCSInput inkb = new OCSInput ();
inkb.setType("keybord");
Expand Down Expand Up @@ -66,8 +66,10 @@ public OCSInputs(Context ctx) {
}
inputs.add(ocsin);
}

// Infos sur les apareils photo
/*
// About cameras
ocslog.debug("Search camera infos on build : "+Build.VERSION.SDK_INT );
// Test if build < GINGERBREAD November 2010: Android 2.3
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.GINGERBREAD) {
OCSInput ocsci = new OCSInput ();
ocsci.setType("Camera");
Expand All @@ -77,8 +79,8 @@ public OCSInputs(Context ctx) {
inputs.add(ocsci);
} else {
int numberOfCameras = Camera.getNumberOfCameras();
ocslog.debug("Number of cameras : "+numberOfCameras);
CameraInfo cameraInfo = new CameraInfo();

for (int i = 0; i < numberOfCameras; i++) {
OCSInput ocsci = new OCSInput ();
String sSz = getCameraMaxImgSize(openCamera(i));
Expand All @@ -91,10 +93,13 @@ public OCSInputs(Context ctx) {
ocsci.setDescription("Image size "+sSz);
inputs.add(ocsci);
}
}
}
*/
ocslog.debug("OCSInputs done");
}

// Build.VERSION.SDK_INT < Build.VERSION_CODES.GINGERBREAD
@TargetApi(Build.VERSION_CODES.GINGERBREAD)
private Camera openCamera() {
try {
return Camera.open();
Expand Down
8 changes: 7 additions & 1 deletion src/org/ocsinventoryng/android/sections/OCSSection.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
package org.ocsinventoryng.android.sections;
import org.ocsinventoryng.android.actions.OCSLog;

import java.util.HashMap;
import java.util.Map;

public class OCSSection {
String name; // Section name ie BIOS
String titre; // Section title for display
Map<String, String> attrs;
private OCSLog ocslog = OCSLog.getInstance();
public OCSSection(String pName) {
name = pName;
attrs = new HashMap<String, String>();
Expand All @@ -30,8 +33,11 @@ public String toXML() {
public String toString() {
StringBuffer strOut = new StringBuffer("");
for ( String k : attrs.keySet() ) {
ocslog.debug("Key : "+k);
String v = attrs.get(k);
strOut.append(k).append(": ").append(v).append("\n");
ocslog.debug("Val : "+v);
if ( v != null )
strOut.append(k).append(": ").append(v).append("\n");
}
return strOut.toString();
}
Expand Down

0 comments on commit a7835c3

Please sign in to comment.