Skip to content

Commit

Permalink
Indentation is added
Browse files Browse the repository at this point in the history
  • Loading branch information
oaliaga committed Jun 30, 2021
1 parent 1cdc9ea commit 07bf542
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions app/src/main/java/com/prey/events/factories/EventFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ public static Event getEvent(final Context ctx, Intent intent) {
if ("ABSENT".equals(state)) {
JSONObject info = new JSONObject();
try {
String simSerial=PreyConfig.getPreyConfig(ctx).getSimSerialNumber();
String simSerial = PreyConfig.getPreyConfig(ctx).getSimSerialNumber();
if (simSerial != null && !"".equals(simSerial)) {
info.put("sim_serial_number", simSerial);
}
} catch (Exception e) {
PreyLogger.e("Error:"+e.getMessage(),e);
PreyLogger.e("Error:" + e.getMessage(), e);
}
new SimTriggerReceiver().onReceive(ctx, intent);
if (UtilConnection.isInternetAvailable(ctx)) {
Expand All @@ -84,8 +84,8 @@ public static Event getEvent(final Context ctx, Intent intent) {
}
}
}
if(LOCATION_PROVIDERS_CHANGED.equals(intent.getAction())||LOCATION_MODE_CHANGED.equals(intent.getAction())
){
if (LOCATION_PROVIDERS_CHANGED.equals(intent.getAction()) || LOCATION_MODE_CHANGED.equals(intent.getAction())
) {
new Thread() {
public void run() {
sendLocationAware(ctx);
Expand Down Expand Up @@ -125,7 +125,7 @@ public void run() {
info.put("connected", "mobile");
}
} catch (Exception e) {
PreyLogger.e("Error getEvent:"+e.getMessage(),e);
PreyLogger.e("Error getEvent:" + e.getMessage(), e);
}
return new Event(Event.WIFI_CHANGED, info.toString());
}
Expand Down Expand Up @@ -155,8 +155,8 @@ public void run() {
if (USER_PRESENT.equals(intent.getAction())) {
PreyLogger.d("EventFactory USER_PRESENT");
int minuteScheduled = PreyConfig.getPreyConfig(ctx).getMinuteScheduled();
if(minuteScheduled>0){
PreyBetaController.startPrey(ctx,null);
if (minuteScheduled > 0) {
PreyBetaController.startPrey(ctx, null);
}
return null;
}
Expand All @@ -165,16 +165,16 @@ public void run() {

public static void sendLocationAware(final Context ctx) {
try {
boolean isTimeLocationAware=PreyConfig.getPreyConfig(ctx).isTimeLocationAware();
PreyLogger.d("sendLocation isTimeLocationAware:"+isTimeLocationAware);
boolean isTimeLocationAware = PreyConfig.getPreyConfig(ctx).isTimeLocationAware();
PreyLogger.d("sendLocation isTimeLocationAware:" + isTimeLocationAware);
if (!isTimeLocationAware) {
PreyLocation locationNow = LocationUtil.getLocation(ctx, null, false);
AwareController.sendAware(ctx, locationNow);
GeofenceController.verifyGeozone(ctx, locationNow);
PreyConfig.getPreyConfig(ctx).setTimeLocationAware();
PreyLocation locationNow = LocationUtil.getLocation(ctx, null, false);
AwareController.sendAware(ctx, locationNow);
GeofenceController.verifyGeozone(ctx, locationNow);
PreyConfig.getPreyConfig(ctx).setTimeLocationAware();
}
} catch (Exception e){
PreyLogger.e("Error sendLocation:"+e.getMessage(),e);
} catch (Exception e) {
PreyLogger.e("Error sendLocation:" + e.getMessage(), e);
}
}

Expand Down Expand Up @@ -211,9 +211,9 @@ public static void notification(Context ctx) {
PreyConfig.getPreyConfig(ctx).setCanAccessCamara(PreyPermission.canAccessCamera(ctx));
PreyConfig.getPreyConfig(ctx).setCanAccessCoarseLocation(PreyPermission.canAccessCoarseLocation(ctx));
PreyConfig.getPreyConfig(ctx).setCanAccessFineLocation(PreyPermission.canAccessFineLocation(ctx));
boolean warnnig=!PreyPermission.canAccessCamera(ctx) || !PreyPermission.canAccessCoarseLocation(ctx) || !PreyPermission.canAccessFineLocation(ctx);
PreyLogger.i("notification warnnig:"+warnnig);
if (warnnig) {
boolean warning = !PreyPermission.canAccessCamera(ctx) || !PreyPermission.canAccessCoarseLocation(ctx) || !PreyPermission.canAccessFineLocation(ctx);
PreyLogger.d("notification warning:" + warning);
if (warning) {
Intent intentPassword = new Intent(ctx, CheckPasswordHtmlActivity.class);
intentPassword.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK |
Intent.FLAG_ACTIVITY_CLEAR_TASK);
Expand Down

0 comments on commit 07bf542

Please sign in to comment.