Skip to content
This repository has been archived by the owner on Jun 18, 2023. It is now read-only.

Commit

Permalink
Fix refresh all settings in client
Browse files Browse the repository at this point in the history
  • Loading branch information
JulioV committed Mar 31, 2020
1 parent cc436a9 commit 54fe2e6
Showing 1 changed file with 50 additions and 1 deletion.
51 changes: 50 additions & 1 deletion aware-phone/src/main/java/com/aware/phone/Aware_Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ protected void onProgressUpdate(Preference... values) {

if (ListPreference.class.isInstance(pref)) {
ListPreference list = (ListPreference) findPreference(pref.getKey());
list.setValue(Aware.getSetting(getApplicationContext(), pref.getKey()));
list.setSummary(list.getEntry());
}

Expand Down Expand Up @@ -364,38 +365,82 @@ protected void onResume() {
findPreference(Aware_Preferences.DEVICE_LABEL),
findPreference(Aware_Preferences.AWARE_VERSION),
findPreference(Aware_Preferences.STATUS_ACCELEROMETER),
findPreference(Aware_Preferences.FREQUENCY_ACCELEROMETER),
findPreference(Aware_Preferences.FREQUENCY_ACCELEROMETER_ENFORCE),
findPreference(Aware_Preferences.THRESHOLD_ACCELEROMETER),
findPreference(Aware_Preferences.STATUS_APPLICATIONS),
findPreference(Aware_Preferences.FREQUENCY_APPLICATIONS),
findPreference(Aware_Preferences.STATUS_BAROMETER),
findPreference(Aware_Preferences.FREQUENCY_BAROMETER),
findPreference(Aware_Preferences.FREQUENCY_BAROMETER_ENFORCE),
findPreference(Aware_Preferences.THRESHOLD_BAROMETER),
findPreference(Aware_Preferences.STATUS_BATTERY),
findPreference(Aware_Preferences.STATUS_BLUETOOTH),
findPreference(Aware_Preferences.FREQUENCY_BLUETOOTH),
findPreference(Aware_Preferences.STATUS_CALLS),
findPreference(Aware_Preferences.STATUS_COMMUNICATION_EVENTS),
findPreference(Aware_Preferences.STATUS_CRASHES),
findPreference(Aware_Preferences.STATUS_ESM),
findPreference(Aware_Preferences.STATUS_GRAVITY),
findPreference(Aware_Preferences.FREQUENCY_GRAVITY),
findPreference(Aware_Preferences.FREQUENCY_GRAVITY_ENFORCE),
findPreference(Aware_Preferences.THRESHOLD_GRAVITY),
findPreference(Aware_Preferences.STATUS_GYROSCOPE),
findPreference(Aware_Preferences.FREQUENCY_GYROSCOPE),
findPreference(Aware_Preferences.FREQUENCY_GYROSCOPE_ENFORCE),
findPreference(Aware_Preferences.THRESHOLD_GYROSCOPE),
findPreference(Aware_Preferences.STATUS_INSTALLATIONS),
findPreference(Aware_Preferences.STATUS_KEYBOARD),
findPreference(Aware_Preferences.MASK_KEYBOARD),
findPreference(Aware_Preferences.STATUS_LIGHT),
findPreference(Aware_Preferences.FREQUENCY_LIGHT),
findPreference(Aware_Preferences.FREQUENCY_LIGHT_ENFORCE),
findPreference(Aware_Preferences.THRESHOLD_LIGHT),
findPreference(Aware_Preferences.STATUS_LINEAR_ACCELEROMETER),
findPreference(Aware_Preferences.FREQUENCY_LINEAR_ACCELEROMETER),
findPreference(Aware_Preferences.FREQUENCY_LINEAR_ACCELEROMETER_ENFORCE),
findPreference(Aware_Preferences.THRESHOLD_LINEAR_ACCELEROMETER),
findPreference(Aware_Preferences.STATUS_LOCATION_GPS),
findPreference(Aware_Preferences.FREQUENCY_LOCATION_GPS),
findPreference(Aware_Preferences.MIN_LOCATION_GPS_ACCURACY),
findPreference(Aware_Preferences.STATUS_LOCATION_NETWORK),
findPreference(Aware_Preferences.FREQUENCY_LOCATION_NETWORK),
findPreference(Aware_Preferences.MIN_LOCATION_NETWORK_ACCURACY),
findPreference(Aware_Preferences.LOCATION_EXPIRATION_TIME),
findPreference(Aware_Preferences.LOCATION_GEOFENCE),
findPreference(Aware_Preferences.LOCATION_SAVE_ALL),
findPreference(Aware_Preferences.STATUS_LOCATION_PASSIVE),
findPreference(Aware_Preferences.STATUS_MAGNETOMETER),
findPreference(Aware_Preferences.FREQUENCY_MAGNETOMETER),
findPreference(Aware_Preferences.FREQUENCY_MAGNETOMETER_ENFORCE),
findPreference(Aware_Preferences.THRESHOLD_MAGNETOMETER),
findPreference(Aware_Preferences.STATUS_MESSAGES),
findPreference(Aware_Preferences.STATUS_MQTT),
findPreference(Aware_Preferences.STATUS_NETWORK_EVENTS),
findPreference(Aware_Preferences.STATUS_NETWORK_TRAFFIC),
findPreference(Aware_Preferences.FREQUENCY_NETWORK_TRAFFIC),
findPreference(Aware_Preferences.STATUS_NOTIFICATIONS),
findPreference(Aware_Preferences.STATUS_PROCESSOR),
findPreference(Aware_Preferences.FREQUENCY_PROCESSOR),
findPreference(Aware_Preferences.STATUS_PROXIMITY),
findPreference(Aware_Preferences.FREQUENCY_PROXIMITY),
findPreference(Aware_Preferences.FREQUENCY_PROXIMITY_ENFORCE),
findPreference(Aware_Preferences.THRESHOLD_PROXIMITY),
findPreference(Aware_Preferences.STATUS_ROTATION),
findPreference(Aware_Preferences.FREQUENCY_ROTATION),
findPreference(Aware_Preferences.FREQUENCY_ROTATION_ENFORCE),
findPreference(Aware_Preferences.THRESHOLD_ROTATION),
findPreference(Aware_Preferences.STATUS_SCREEN),
findPreference(Aware_Preferences.STATUS_SIGNIFICANT_MOTION),
findPreference(Aware_Preferences.STATUS_TEMPERATURE),
findPreference(Aware_Preferences.FREQUENCY_TEMPERATURE),
findPreference(Aware_Preferences.FREQUENCY_TEMPERATURE_ENFORCE),
findPreference(Aware_Preferences.THRESHOLD_TEMPERATURE),
findPreference(Aware_Preferences.STATUS_TELEPHONY),
findPreference(Aware_Preferences.STATUS_TIMEZONE),
findPreference(Aware_Preferences.FREQUENCY_TIMEZONE),
findPreference(Aware_Preferences.STATUS_WIFI),
findPreference(Aware_Preferences.FREQUENCY_WIFI),
findPreference(Aware_Preferences.STATUS_WEBSERVICE),
findPreference(Aware_Preferences.MQTT_SERVER),
findPreference(Aware_Preferences.MQTT_PORT),
Expand All @@ -416,8 +461,12 @@ protected void onResume() {
findPreference(Aware_Preferences.DEBUG_DB_SLOW),
findPreference(Aware_Preferences.FOREGROUND_PRIORITY),
findPreference(Aware_Preferences.STATUS_TOUCH),
findPreference(Aware_Preferences.MASK_TOUCH_TEXT),
findPreference(Aware_Preferences.STATUS_WEBSOCKET),
findPreference(Aware_Preferences.WEBSOCKET_SERVER)
findPreference(Aware_Preferences.WEBSOCKET_SERVER),
findPreference(Aware_Preferences.DEBUG_FLAG),
findPreference(Aware_Preferences.DEBUG_TAG),
findPreference(Aware_Preferences.ENFORCE_FREQUENCY_ALL)
);
}

Expand Down

0 comments on commit 54fe2e6

Please sign in to comment.