diff --git a/aware-core/aware.gradle b/aware-core/aware.gradle index 342de6fd3..2cff5ddb3 100644 --- a/aware-core/aware.gradle +++ b/aware-core/aware.gradle @@ -1,14 +1,43 @@ -ext { - mqtt_libs = '1.2.1' - ion_libs = "2.+" - support_libs = "28.0.0" - google_libs = "16.0.0" - version_code = 815 - version_readable = "4.0." + version_code + "." + "bundle" - compile_sdk = 28 - target_sdk = 28 - minimum_sdk = 19 - build_tools = "28.0.3" - aware_libs = "master-SNAPSHOT" +//shared with all modules +buildscript { + ext { + mqtt_libs = '1.2.1' + ion_libs = "2.+" + google_libs = "17.0.0" + version_code = 816 + version_readable = "4.0." + version_code + "." + "bundle" + compile_sdk = 28 + target_sdk = 28 + minimum_sdk = 24 + build_tools = "28.0.3" + aware_libs = "master-SNAPSHOT" + kotlin_version = "1.3.41" + build_gradle = "3.4.2" + } + + repositories { + maven { + url 'https://maven.google.com' + } + google() + jcenter() + mavenCentral() + maven { url "https://jitpack.io" } + } + dependencies { + classpath "com.android.tools.build:gradle:$build_gradle" + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } } +allprojects { + repositories { + maven { + url 'https://maven.google.com' + } + google() + jcenter() + mavenCentral() + maven { url "https://jitpack.io" } //MPAndroidChart, AWARE + } +} \ No newline at end of file diff --git a/aware-core/build.gradle b/aware-core/build.gradle index 1b212fc1b..89498e398 100644 --- a/aware-core/build.gradle +++ b/aware-core/build.gradle @@ -2,6 +2,7 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' +apply plugin: 'kotlin-kapt' android { compileSdkVersion compile_sdk @@ -57,16 +58,25 @@ android { lintOptions { abortOnError false } + + compileOptions { + targetCompatibility 1.8 + sourceCompatibility 1.8 + } } dependencies { implementation "org.eclipse.paho:org.eclipse.paho.client.mqttv3:$mqtt_libs" implementation 'com.koushikdutta.ion:ion:2.2.1' - implementation "com.android.support:design:$support_libs" - implementation "com.android.support:gridlayout-v7:$support_libs" - implementation "com.android.support:cardview-v7:$support_libs" - implementation "com.android.support:appcompat-v7:$support_libs" - implementation "com.android.support:support-annotations:$support_libs" + implementation "com.google.android.material:material:1.1.0-alpha09" + implementation "androidx.gridlayout:gridlayout:1.0.0" + implementation "androidx.cardview:cardview:1.0.0" + + implementation "androidx.annotation:annotation:1.1.0" + implementation "androidx.core:core:1.2.0-alpha02" + implementation "com.google.android.material:material:1.1.0-alpha09" + implementation "androidx.appcompat:appcompat:1.0.2" + implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0-alpha' implementation"org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" } diff --git a/aware-core/src/main/AndroidManifest.xml b/aware-core/src/main/AndroidManifest.xml index 6edef7c20..8786d79f8 100644 --- a/aware-core/src/main/AndroidManifest.xml +++ b/aware-core/src/main/AndroidManifest.xml @@ -418,7 +418,7 @@ android:writePermission="com.aware.WRITE_CONTEXT_DATA" /> diff --git a/aware-core/src/main/java/com/aware/Applications.java b/aware-core/src/main/java/com/aware/Applications.java index 7add73bf7..0fe03b565 100644 --- a/aware-core/src/main/java/com/aware/Applications.java +++ b/aware-core/src/main/java/com/aware/Applications.java @@ -3,19 +3,10 @@ import android.accessibilityservice.AccessibilityService; import android.accessibilityservice.AccessibilityServiceInfo; -import android.app.ActivityManager; +import android.app.*; import android.app.ActivityManager.ProcessErrorStateInfo; import android.app.ActivityManager.RunningAppProcessInfo; -import android.app.IntentService; -import android.app.Notification; -import android.app.NotificationManager; -import android.app.PendingIntent; -import android.content.ContentResolver; -import android.content.ContentValues; -import android.content.Context; -import android.content.Intent; -import android.content.IntentFilter; -import android.content.SyncRequest; +import android.content.*; import android.content.pm.ApplicationInfo; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; @@ -27,14 +18,13 @@ import android.os.Build; import android.os.Bundle; import android.provider.Settings; -import android.support.v4.app.NotificationCompat; -import android.support.v4.content.WakefulBroadcastReceiver; -import android.support.v4.view.accessibility.AccessibilityEventCompat; -import android.support.v4.view.accessibility.AccessibilityManagerCompat; import android.util.Log; import android.view.accessibility.AccessibilityEvent; import android.view.accessibility.AccessibilityManager; - +import androidx.core.app.NotificationCompat; +import androidx.core.view.accessibility.AccessibilityEventCompat; +import androidx.core.view.accessibility.AccessibilityManagerCompat; +import androidx.legacy.content.WakefulBroadcastReceiver; import com.aware.providers.Applications_Provider; import com.aware.providers.Applications_Provider.Applications_Crashes; import com.aware.providers.Applications_Provider.Applications_Foreground; @@ -45,7 +35,6 @@ import com.aware.utils.Converters; import com.aware.utils.Encrypter; import com.aware.utils.Scheduler; - import org.json.JSONException; import java.util.Iterator; diff --git a/aware-core/src/main/java/com/aware/Aware.java b/aware-core/src/main/java/com/aware/Aware.java index 874968eee..62a7112ad 100644 --- a/aware-core/src/main/java/com/aware/Aware.java +++ b/aware-core/src/main/java/com/aware/Aware.java @@ -4,22 +4,8 @@ import android.Manifest; import android.accounts.Account; import android.accounts.AccountManager; -import android.app.ActivityManager; -import android.app.NotificationChannel; -import android.app.NotificationManager; -import android.app.PendingIntent; -import android.app.Service; -import android.app.UiModeManager; -import android.content.BroadcastReceiver; -import android.content.ComponentName; -import android.content.ContentResolver; -import android.content.ContentValues; -import android.content.Context; -import android.content.Intent; -import android.content.IntentFilter; -import android.content.PeriodicSync; -import android.content.SharedPreferences; -import android.content.SyncRequest; +import android.app.*; +import android.content.*; import android.content.pm.ApplicationInfo; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; @@ -36,17 +22,9 @@ import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.net.Uri; -import android.os.AsyncTask; -import android.os.BatteryManager; -import android.os.Build; -import android.os.Bundle; -import android.os.Environment; -import android.os.IBinder; -import android.os.PowerManager; +import android.os.*; import android.preference.PreferenceManager; import android.provider.Settings; -import android.support.v4.app.NotificationCompat; -import android.support.v4.content.PermissionChecker; import android.telephony.TelephonyManager; import android.util.Log; import android.util.TypedValue; @@ -56,43 +34,24 @@ import android.widget.LinearLayout; import android.widget.TextView; import android.widget.Toast; - +import androidx.core.app.NotificationCompat; +import androidx.core.content.PermissionChecker; import com.aware.providers.Aware_Provider; import com.aware.providers.Aware_Provider.Aware_Device; import com.aware.providers.Aware_Provider.Aware_Plugins; import com.aware.providers.Aware_Provider.Aware_Settings; import com.aware.providers.Battery_Provider; import com.aware.providers.Scheduler_Provider; -import com.aware.utils.Aware_Accounts; -import com.aware.utils.Aware_Plugin; -import com.aware.utils.DownloadPluginService; -import com.aware.utils.Http; -import com.aware.utils.Https; -import com.aware.utils.PluginsManager; -import com.aware.utils.SSLManager; -import com.aware.utils.Scheduler; -import com.aware.utils.StudyUtils; - +import com.aware.utils.*; +import dalvik.system.DexFile; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; -import java.io.BufferedWriter; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileWriter; -import java.io.IOException; +import java.io.*; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.Enumeration; -import java.util.Hashtable; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.UUID; - -import dalvik.system.DexFile; +import java.util.*; /** * Main AWARE framework service. awareContext will start and manage all the services and settings. diff --git a/aware-core/src/main/java/com/aware/Bluetooth.java b/aware-core/src/main/java/com/aware/Bluetooth.java index d4d7faf7d..d5c77d0fc 100644 --- a/aware-core/src/main/java/com/aware/Bluetooth.java +++ b/aware-core/src/main/java/com/aware/Bluetooth.java @@ -13,13 +13,7 @@ import android.bluetooth.le.ScanCallback; import android.bluetooth.le.ScanResult; import android.bluetooth.le.ScanSettings; -import android.content.BroadcastReceiver; -import android.content.ContentResolver; -import android.content.ContentValues; -import android.content.Context; -import android.content.Intent; -import android.content.IntentFilter; -import android.content.SyncRequest; +import android.content.*; import android.content.pm.PackageManager; import android.database.Cursor; import android.database.SQLException; @@ -28,9 +22,8 @@ import android.os.Bundle; import android.os.Handler; import android.os.IBinder; -import android.support.v4.app.NotificationCompat; import android.util.Log; - +import androidx.core.app.NotificationCompat; import com.aware.providers.Bluetooth_Provider; import com.aware.providers.Bluetooth_Provider.Bluetooth_Data; import com.aware.providers.Bluetooth_Provider.Bluetooth_Sensor; diff --git a/aware-core/src/main/java/com/aware/ESM.java b/aware-core/src/main/java/com/aware/ESM.java index 4a897be36..0d850f2e4 100644 --- a/aware-core/src/main/java/com/aware/ESM.java +++ b/aware-core/src/main/java/com/aware/ESM.java @@ -3,14 +3,7 @@ import android.app.NotificationManager; import android.app.PendingIntent; -import android.content.ActivityNotFoundException; -import android.content.BroadcastReceiver; -import android.content.ContentResolver; -import android.content.ContentValues; -import android.content.Context; -import android.content.Intent; -import android.content.IntentFilter; -import android.content.SyncRequest; +import android.content.*; import android.database.Cursor; import android.database.sqlite.SQLiteException; import android.net.Uri; @@ -18,17 +11,15 @@ import android.os.Build; import android.os.Bundle; import android.os.IBinder; -import android.support.v4.app.NotificationCompat; import android.util.Log; import android.widget.Toast; - +import androidx.core.app.NotificationCompat; import com.aware.providers.ESM_Provider; import com.aware.providers.ESM_Provider.ESM_Data; import com.aware.ui.ESM_Queue; import com.aware.ui.esms.ESMFactory; import com.aware.ui.esms.ESM_Question; import com.aware.utils.Aware_Sensor; - import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; diff --git a/aware-core/src/main/java/com/aware/syncadapters/Accelerometer_Sync.java b/aware-core/src/main/java/com/aware/syncadapters/Accelerometer_Sync.java index 1c4a81fea..2d419fa3d 100644 --- a/aware-core/src/main/java/com/aware/syncadapters/Accelerometer_Sync.java +++ b/aware-core/src/main/java/com/aware/syncadapters/Accelerometer_Sync.java @@ -4,8 +4,7 @@ import android.content.Intent; import android.net.Uri; import android.os.IBinder; -import android.support.annotation.Nullable; - +import androidx.annotation.Nullable; import com.aware.providers.Accelerometer_Provider; /** diff --git a/aware-core/src/main/java/com/aware/syncadapters/Applications_Sync.java b/aware-core/src/main/java/com/aware/syncadapters/Applications_Sync.java index 8866c27b8..18c8024f7 100644 --- a/aware-core/src/main/java/com/aware/syncadapters/Applications_Sync.java +++ b/aware-core/src/main/java/com/aware/syncadapters/Applications_Sync.java @@ -4,8 +4,7 @@ import android.content.Intent; import android.net.Uri; import android.os.IBinder; -import android.support.annotation.Nullable; - +import androidx.annotation.Nullable; import com.aware.providers.Applications_Provider; /** diff --git a/aware-core/src/main/java/com/aware/syncadapters/AwareSyncAdapter.java b/aware-core/src/main/java/com/aware/syncadapters/AwareSyncAdapter.java index 2524a35fe..b374875b3 100644 --- a/aware-core/src/main/java/com/aware/syncadapters/AwareSyncAdapter.java +++ b/aware-core/src/main/java/com/aware/syncadapters/AwareSyncAdapter.java @@ -4,26 +4,17 @@ import android.app.ActivityManager; import android.app.NotificationManager; import android.app.PendingIntent; -import android.content.AbstractThreadedSyncAdapter; -import android.content.ComponentName; -import android.content.ContentProviderClient; -import android.content.Context; -import android.content.Intent; -import android.content.IntentFilter; -import android.content.SyncResult; +import android.content.*; import android.database.Cursor; -import android.database.DatabaseUtils; -import android.database.sqlite.SQLiteDatabase; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.net.Uri; import android.os.BatteryManager; import android.os.Build; import android.os.Bundle; -import android.support.v4.app.NotificationCompat; import android.text.format.DateUtils; import android.util.Log; - +import androidx.core.app.NotificationCompat; import com.aware.Applications; import com.aware.Aware; import com.aware.Aware_Preferences; @@ -32,7 +23,6 @@ import com.aware.utils.Http; import com.aware.utils.Https; import com.aware.utils.SSLManager; - import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; diff --git a/aware-core/src/main/java/com/aware/syncadapters/Aware_Sync.java b/aware-core/src/main/java/com/aware/syncadapters/Aware_Sync.java index dc43607e6..8dff45770 100644 --- a/aware-core/src/main/java/com/aware/syncadapters/Aware_Sync.java +++ b/aware-core/src/main/java/com/aware/syncadapters/Aware_Sync.java @@ -4,8 +4,7 @@ import android.content.Intent; import android.net.Uri; import android.os.IBinder; -import android.support.annotation.Nullable; - +import androidx.annotation.Nullable; import com.aware.providers.Aware_Provider; /** diff --git a/aware-core/src/main/java/com/aware/syncadapters/Barometer_Sync.java b/aware-core/src/main/java/com/aware/syncadapters/Barometer_Sync.java index a0a1c44d6..ea422d79d 100644 --- a/aware-core/src/main/java/com/aware/syncadapters/Barometer_Sync.java +++ b/aware-core/src/main/java/com/aware/syncadapters/Barometer_Sync.java @@ -4,8 +4,7 @@ import android.content.Intent; import android.net.Uri; import android.os.IBinder; -import android.support.annotation.Nullable; - +import androidx.annotation.Nullable; import com.aware.providers.Barometer_Provider; /** diff --git a/aware-core/src/main/java/com/aware/syncadapters/Battery_Sync.java b/aware-core/src/main/java/com/aware/syncadapters/Battery_Sync.java index 87d47b424..34d552626 100644 --- a/aware-core/src/main/java/com/aware/syncadapters/Battery_Sync.java +++ b/aware-core/src/main/java/com/aware/syncadapters/Battery_Sync.java @@ -4,8 +4,7 @@ import android.content.Intent; import android.net.Uri; import android.os.IBinder; -import android.support.annotation.Nullable; - +import androidx.annotation.Nullable; import com.aware.providers.Battery_Provider; /** diff --git a/aware-core/src/main/java/com/aware/syncadapters/Bluetooth_Sync.java b/aware-core/src/main/java/com/aware/syncadapters/Bluetooth_Sync.java index b6d6dabb4..cff8fc8c4 100644 --- a/aware-core/src/main/java/com/aware/syncadapters/Bluetooth_Sync.java +++ b/aware-core/src/main/java/com/aware/syncadapters/Bluetooth_Sync.java @@ -4,8 +4,7 @@ import android.content.Intent; import android.net.Uri; import android.os.IBinder; -import android.support.annotation.Nullable; - +import androidx.annotation.Nullable; import com.aware.providers.Bluetooth_Provider; /** diff --git a/aware-core/src/main/java/com/aware/syncadapters/Communications_Sync.java b/aware-core/src/main/java/com/aware/syncadapters/Communications_Sync.java index 8f72c6ecc..03434bad1 100644 --- a/aware-core/src/main/java/com/aware/syncadapters/Communications_Sync.java +++ b/aware-core/src/main/java/com/aware/syncadapters/Communications_Sync.java @@ -4,8 +4,7 @@ import android.content.Intent; import android.net.Uri; import android.os.IBinder; -import android.support.annotation.Nullable; - +import androidx.annotation.Nullable; import com.aware.providers.Communication_Provider; /** diff --git a/aware-core/src/main/java/com/aware/syncadapters/ESM_Sync.java b/aware-core/src/main/java/com/aware/syncadapters/ESM_Sync.java index 04cf32c5d..2f6b1ca8b 100644 --- a/aware-core/src/main/java/com/aware/syncadapters/ESM_Sync.java +++ b/aware-core/src/main/java/com/aware/syncadapters/ESM_Sync.java @@ -4,8 +4,7 @@ import android.content.Intent; import android.net.Uri; import android.os.IBinder; -import android.support.annotation.Nullable; - +import androidx.annotation.Nullable; import com.aware.providers.ESM_Provider; /** diff --git a/aware-core/src/main/java/com/aware/syncadapters/Gravity_Sync.java b/aware-core/src/main/java/com/aware/syncadapters/Gravity_Sync.java index b7ac6fa56..2191ed1ad 100644 --- a/aware-core/src/main/java/com/aware/syncadapters/Gravity_Sync.java +++ b/aware-core/src/main/java/com/aware/syncadapters/Gravity_Sync.java @@ -4,8 +4,7 @@ import android.content.Intent; import android.net.Uri; import android.os.IBinder; -import android.support.annotation.Nullable; - +import androidx.annotation.Nullable; import com.aware.providers.Gravity_Provider; /** diff --git a/aware-core/src/main/java/com/aware/syncadapters/Gyroscope_Sync.java b/aware-core/src/main/java/com/aware/syncadapters/Gyroscope_Sync.java index cfdc0fdf6..c096683d4 100644 --- a/aware-core/src/main/java/com/aware/syncadapters/Gyroscope_Sync.java +++ b/aware-core/src/main/java/com/aware/syncadapters/Gyroscope_Sync.java @@ -4,8 +4,7 @@ import android.content.Intent; import android.net.Uri; import android.os.IBinder; -import android.support.annotation.Nullable; - +import androidx.annotation.Nullable; import com.aware.providers.Gyroscope_Provider; /** diff --git a/aware-core/src/main/java/com/aware/syncadapters/Installations_Sync.java b/aware-core/src/main/java/com/aware/syncadapters/Installations_Sync.java index aa6abde44..a61c3ebd8 100644 --- a/aware-core/src/main/java/com/aware/syncadapters/Installations_Sync.java +++ b/aware-core/src/main/java/com/aware/syncadapters/Installations_Sync.java @@ -4,8 +4,7 @@ import android.content.Intent; import android.net.Uri; import android.os.IBinder; -import android.support.annotation.Nullable; - +import androidx.annotation.Nullable; import com.aware.providers.Installations_Provider; /** diff --git a/aware-core/src/main/java/com/aware/syncadapters/Keyboard_Sync.java b/aware-core/src/main/java/com/aware/syncadapters/Keyboard_Sync.java index 3ac8f3cbc..634066117 100644 --- a/aware-core/src/main/java/com/aware/syncadapters/Keyboard_Sync.java +++ b/aware-core/src/main/java/com/aware/syncadapters/Keyboard_Sync.java @@ -4,8 +4,7 @@ import android.content.Intent; import android.net.Uri; import android.os.IBinder; -import android.support.annotation.Nullable; - +import androidx.annotation.Nullable; import com.aware.providers.Keyboard_Provider; /** diff --git a/aware-core/src/main/java/com/aware/syncadapters/Light_Sync.java b/aware-core/src/main/java/com/aware/syncadapters/Light_Sync.java index df2db8af9..b4bd2ddd2 100644 --- a/aware-core/src/main/java/com/aware/syncadapters/Light_Sync.java +++ b/aware-core/src/main/java/com/aware/syncadapters/Light_Sync.java @@ -4,8 +4,7 @@ import android.content.Intent; import android.net.Uri; import android.os.IBinder; -import android.support.annotation.Nullable; - +import androidx.annotation.Nullable; import com.aware.providers.Light_Provider; /** diff --git a/aware-core/src/main/java/com/aware/syncadapters/LinearAccelerometer_Sync.java b/aware-core/src/main/java/com/aware/syncadapters/LinearAccelerometer_Sync.java index e498beb40..0ec03a1ec 100644 --- a/aware-core/src/main/java/com/aware/syncadapters/LinearAccelerometer_Sync.java +++ b/aware-core/src/main/java/com/aware/syncadapters/LinearAccelerometer_Sync.java @@ -4,8 +4,7 @@ import android.content.Intent; import android.net.Uri; import android.os.IBinder; -import android.support.annotation.Nullable; - +import androidx.annotation.Nullable; import com.aware.providers.Linear_Accelerometer_Provider; /** diff --git a/aware-core/src/main/java/com/aware/syncadapters/Locations_Sync.java b/aware-core/src/main/java/com/aware/syncadapters/Locations_Sync.java index 1a81b9d22..a17657f91 100644 --- a/aware-core/src/main/java/com/aware/syncadapters/Locations_Sync.java +++ b/aware-core/src/main/java/com/aware/syncadapters/Locations_Sync.java @@ -4,8 +4,7 @@ import android.content.Intent; import android.net.Uri; import android.os.IBinder; -import android.support.annotation.Nullable; - +import androidx.annotation.Nullable; import com.aware.providers.Locations_Provider; /** diff --git a/aware-core/src/main/java/com/aware/syncadapters/Magnetometer_Sync.java b/aware-core/src/main/java/com/aware/syncadapters/Magnetometer_Sync.java index f1cdd4ce2..83b0a074d 100644 --- a/aware-core/src/main/java/com/aware/syncadapters/Magnetometer_Sync.java +++ b/aware-core/src/main/java/com/aware/syncadapters/Magnetometer_Sync.java @@ -4,8 +4,7 @@ import android.content.Intent; import android.net.Uri; import android.os.IBinder; -import android.support.annotation.Nullable; - +import androidx.annotation.Nullable; import com.aware.providers.Magnetometer_Provider; /** diff --git a/aware-core/src/main/java/com/aware/syncadapters/Network_Sync.java b/aware-core/src/main/java/com/aware/syncadapters/Network_Sync.java index 5fe2d578f..20e64b487 100644 --- a/aware-core/src/main/java/com/aware/syncadapters/Network_Sync.java +++ b/aware-core/src/main/java/com/aware/syncadapters/Network_Sync.java @@ -4,8 +4,7 @@ import android.content.Intent; import android.net.Uri; import android.os.IBinder; -import android.support.annotation.Nullable; - +import androidx.annotation.Nullable; import com.aware.providers.Network_Provider; /** diff --git a/aware-core/src/main/java/com/aware/syncadapters/Processor_Sync.java b/aware-core/src/main/java/com/aware/syncadapters/Processor_Sync.java index 504f6ba0c..16d438c3a 100644 --- a/aware-core/src/main/java/com/aware/syncadapters/Processor_Sync.java +++ b/aware-core/src/main/java/com/aware/syncadapters/Processor_Sync.java @@ -4,8 +4,7 @@ import android.content.Intent; import android.net.Uri; import android.os.IBinder; -import android.support.annotation.Nullable; - +import androidx.annotation.Nullable; import com.aware.providers.Processor_Provider; /** diff --git a/aware-core/src/main/java/com/aware/syncadapters/Proximity_Sync.java b/aware-core/src/main/java/com/aware/syncadapters/Proximity_Sync.java index 957378a68..1f1d572b9 100644 --- a/aware-core/src/main/java/com/aware/syncadapters/Proximity_Sync.java +++ b/aware-core/src/main/java/com/aware/syncadapters/Proximity_Sync.java @@ -4,8 +4,7 @@ import android.content.Intent; import android.net.Uri; import android.os.IBinder; -import android.support.annotation.Nullable; - +import androidx.annotation.Nullable; import com.aware.providers.Proximity_Provider; /** diff --git a/aware-core/src/main/java/com/aware/syncadapters/Rotation_Sync.java b/aware-core/src/main/java/com/aware/syncadapters/Rotation_Sync.java index 0002ce624..555aff4f3 100644 --- a/aware-core/src/main/java/com/aware/syncadapters/Rotation_Sync.java +++ b/aware-core/src/main/java/com/aware/syncadapters/Rotation_Sync.java @@ -4,8 +4,7 @@ import android.content.Intent; import android.net.Uri; import android.os.IBinder; -import android.support.annotation.Nullable; - +import androidx.annotation.Nullable; import com.aware.providers.Rotation_Provider; /** diff --git a/aware-core/src/main/java/com/aware/syncadapters/Screen_Sync.java b/aware-core/src/main/java/com/aware/syncadapters/Screen_Sync.java index 874e9ff9d..6e734c102 100644 --- a/aware-core/src/main/java/com/aware/syncadapters/Screen_Sync.java +++ b/aware-core/src/main/java/com/aware/syncadapters/Screen_Sync.java @@ -4,8 +4,7 @@ import android.content.Intent; import android.net.Uri; import android.os.IBinder; -import android.support.annotation.Nullable; - +import androidx.annotation.Nullable; import com.aware.providers.Screen_Provider; /** diff --git a/aware-core/src/main/java/com/aware/syncadapters/Significant_Sync.java b/aware-core/src/main/java/com/aware/syncadapters/Significant_Sync.java index 9f7bf8279..163ea31bb 100644 --- a/aware-core/src/main/java/com/aware/syncadapters/Significant_Sync.java +++ b/aware-core/src/main/java/com/aware/syncadapters/Significant_Sync.java @@ -4,8 +4,7 @@ import android.content.Intent; import android.net.Uri; import android.os.IBinder; -import android.support.annotation.Nullable; - +import androidx.annotation.Nullable; import com.aware.providers.Significant_Provider; /** diff --git a/aware-core/src/main/java/com/aware/syncadapters/Telephony_Sync.java b/aware-core/src/main/java/com/aware/syncadapters/Telephony_Sync.java index 276cedcb2..0c0fdfc22 100644 --- a/aware-core/src/main/java/com/aware/syncadapters/Telephony_Sync.java +++ b/aware-core/src/main/java/com/aware/syncadapters/Telephony_Sync.java @@ -4,8 +4,7 @@ import android.content.Intent; import android.net.Uri; import android.os.IBinder; -import android.support.annotation.Nullable; - +import androidx.annotation.Nullable; import com.aware.providers.Telephony_Provider; /** diff --git a/aware-core/src/main/java/com/aware/syncadapters/Temperature_Sync.java b/aware-core/src/main/java/com/aware/syncadapters/Temperature_Sync.java index f63b7db30..f96e73f50 100644 --- a/aware-core/src/main/java/com/aware/syncadapters/Temperature_Sync.java +++ b/aware-core/src/main/java/com/aware/syncadapters/Temperature_Sync.java @@ -4,8 +4,7 @@ import android.content.Intent; import android.net.Uri; import android.os.IBinder; -import android.support.annotation.Nullable; - +import androidx.annotation.Nullable; import com.aware.providers.Temperature_Provider; /** diff --git a/aware-core/src/main/java/com/aware/syncadapters/Timezone_Sync.java b/aware-core/src/main/java/com/aware/syncadapters/Timezone_Sync.java index 943070ffa..15a0a530c 100644 --- a/aware-core/src/main/java/com/aware/syncadapters/Timezone_Sync.java +++ b/aware-core/src/main/java/com/aware/syncadapters/Timezone_Sync.java @@ -4,8 +4,7 @@ import android.content.Intent; import android.net.Uri; import android.os.IBinder; -import android.support.annotation.Nullable; - +import androidx.annotation.Nullable; import com.aware.providers.TimeZone_Provider; /** diff --git a/aware-core/src/main/java/com/aware/syncadapters/Traffic_Sync.java b/aware-core/src/main/java/com/aware/syncadapters/Traffic_Sync.java index fdb39f853..e413bcf27 100644 --- a/aware-core/src/main/java/com/aware/syncadapters/Traffic_Sync.java +++ b/aware-core/src/main/java/com/aware/syncadapters/Traffic_Sync.java @@ -4,8 +4,7 @@ import android.content.Intent; import android.net.Uri; import android.os.IBinder; -import android.support.annotation.Nullable; - +import androidx.annotation.Nullable; import com.aware.providers.Traffic_Provider; /** diff --git a/aware-core/src/main/java/com/aware/syncadapters/Wifi_Sync.java b/aware-core/src/main/java/com/aware/syncadapters/Wifi_Sync.java index 2a6744ae3..055bc041b 100644 --- a/aware-core/src/main/java/com/aware/syncadapters/Wifi_Sync.java +++ b/aware-core/src/main/java/com/aware/syncadapters/Wifi_Sync.java @@ -4,8 +4,7 @@ import android.content.Intent; import android.net.Uri; import android.os.IBinder; -import android.support.annotation.Nullable; - +import androidx.annotation.Nullable; import com.aware.providers.WiFi_Provider; /** diff --git a/aware-core/src/main/java/com/aware/ui/AppCompatPreferenceActivity.java b/aware-core/src/main/java/com/aware/ui/AppCompatPreferenceActivity.java index bcccd6ef7..4353737f9 100755 --- a/aware-core/src/main/java/com/aware/ui/AppCompatPreferenceActivity.java +++ b/aware-core/src/main/java/com/aware/ui/AppCompatPreferenceActivity.java @@ -8,15 +8,15 @@ import android.preference.Preference; import android.preference.PreferenceActivity; import android.preference.PreferenceGroup; -import android.support.annotation.LayoutRes; -import android.support.annotation.Nullable; -import android.support.v7.app.ActionBar; -import android.support.v7.app.AppCompatDelegate; -import android.support.v7.widget.*; +import androidx.appcompat.app.ActionBar; import android.util.AttributeSet; import android.view.MenuInflater; import android.view.View; import android.view.ViewGroup; +import androidx.annotation.LayoutRes; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AppCompatDelegate; +import androidx.appcompat.widget.*; /** * Created by denzil on 09/10/15. diff --git a/aware-core/src/main/java/com/aware/ui/ESM_Queue.java b/aware-core/src/main/java/com/aware/ui/ESM_Queue.java index 36fa95d24..0092e0afe 100644 --- a/aware-core/src/main/java/com/aware/ui/ESM_Queue.java +++ b/aware-core/src/main/java/com/aware/ui/ESM_Queue.java @@ -1,25 +1,18 @@ package com.aware.ui; import android.app.NotificationManager; -import android.content.BroadcastReceiver; -import android.content.ContentValues; -import android.content.Context; -import android.content.Intent; -import android.content.IntentFilter; +import android.content.*; import android.database.Cursor; import android.os.Bundle; -import android.support.v4.app.FragmentActivity; -import android.support.v4.app.FragmentManager; import android.util.Log; - +import androidx.fragment.app.FragmentActivity; +import androidx.fragment.app.FragmentManager; import com.aware.Aware; import com.aware.Aware_Preferences; import com.aware.ESM; import com.aware.providers.ESM_Provider.ESM_Data; import com.aware.ui.esms.ESMFactory; import com.aware.ui.esms.ESM_Question; - -import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; diff --git a/aware-core/src/main/java/com/aware/ui/PermissionsHandler.java b/aware-core/src/main/java/com/aware/ui/PermissionsHandler.java index 8cd32a1bb..2a53d554f 100644 --- a/aware-core/src/main/java/com/aware/ui/PermissionsHandler.java +++ b/aware-core/src/main/java/com/aware/ui/PermissionsHandler.java @@ -3,11 +3,10 @@ import android.app.Activity; import android.content.ComponentName; import android.content.Intent; +import android.content.pm.PackageManager; import android.os.Bundle; -import android.support.v4.app.ActivityCompat; -import android.support.v4.content.PermissionChecker; import android.util.Log; - +import androidx.core.app.ActivityCompat; import com.aware.Aware; import java.util.ArrayList; @@ -83,7 +82,7 @@ public void onRequestPermissionsResult(int requestCode, String[] permissions, in if (requestCode == RC_PERMISSIONS) { int not_granted = 0; for (int i = 0; i < permissions.length; i++) { - if (grantResults[i] != PermissionChecker.PERMISSION_GRANTED) { + if (grantResults[i] != PackageManager.PERMISSION_GRANTED) { not_granted++; Log.d(Aware.TAG, permissions[i] + " was not granted"); } else { diff --git a/aware-core/src/main/java/com/aware/ui/esms/ESM_Checkbox.java b/aware-core/src/main/java/com/aware/ui/esms/ESM_Checkbox.java index 05ef6cd7d..aca4d0c87 100644 --- a/aware-core/src/main/java/com/aware/ui/esms/ESM_Checkbox.java +++ b/aware-core/src/main/java/com/aware/ui/esms/ESM_Checkbox.java @@ -6,24 +6,17 @@ import android.content.Context; import android.content.Intent; import android.os.Bundle; -import android.support.annotation.NonNull; import android.util.Log; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; import android.view.WindowManager; -import android.widget.Button; -import android.widget.CheckBox; -import android.widget.CompoundButton; -import android.widget.EditText; -import android.widget.LinearLayout; -import android.widget.TextView; - +import android.widget.*; +import androidx.annotation.NonNull; import com.aware.Aware; import com.aware.ESM; import com.aware.R; import com.aware.providers.ESM_Provider; - import org.json.JSONArray; import org.json.JSONException; diff --git a/aware-core/src/main/java/com/aware/ui/esms/ESM_Date.java b/aware-core/src/main/java/com/aware/ui/esms/ESM_Date.java index 319fbab59..3d3984f1f 100644 --- a/aware-core/src/main/java/com/aware/ui/esms/ESM_Date.java +++ b/aware-core/src/main/java/com/aware/ui/esms/ESM_Date.java @@ -7,26 +7,18 @@ import android.content.Intent; import android.os.Build; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.design.widget.TabLayout; -import android.support.v4.view.PagerAdapter; -import android.support.v4.view.ViewPager; -import android.text.format.DateFormat; import android.util.Log; import android.view.LayoutInflater; import android.view.View; -import android.view.ViewGroup; import android.widget.Button; import android.widget.CalendarView; import android.widget.DatePicker; import android.widget.TextView; -import android.widget.TimePicker; - +import androidx.annotation.NonNull; import com.aware.Aware; import com.aware.ESM; import com.aware.R; import com.aware.providers.ESM_Provider; - import org.json.JSONException; import java.text.SimpleDateFormat; diff --git a/aware-core/src/main/java/com/aware/ui/esms/ESM_DateTime.java b/aware-core/src/main/java/com/aware/ui/esms/ESM_DateTime.java index e2f317f26..bc42414be 100644 --- a/aware-core/src/main/java/com/aware/ui/esms/ESM_DateTime.java +++ b/aware-core/src/main/java/com/aware/ui/esms/ESM_DateTime.java @@ -7,10 +7,6 @@ import android.content.Intent; import android.os.Build; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.design.widget.TabLayout; -import android.support.v4.view.PagerAdapter; -import android.support.v4.view.ViewPager; import android.text.format.DateFormat; import android.util.Log; import android.view.LayoutInflater; @@ -20,12 +16,14 @@ import android.widget.DatePicker; import android.widget.TextView; import android.widget.TimePicker; - +import androidx.annotation.NonNull; +import androidx.viewpager.widget.PagerAdapter; +import androidx.viewpager.widget.ViewPager; import com.aware.Aware; import com.aware.ESM; import com.aware.R; import com.aware.providers.ESM_Provider; - +import com.google.android.material.tabs.TabLayout; import org.json.JSONException; import java.text.SimpleDateFormat; diff --git a/aware-core/src/main/java/com/aware/ui/esms/ESM_Freetext.java b/aware-core/src/main/java/com/aware/ui/esms/ESM_Freetext.java index da7962828..8c4060b62 100644 --- a/aware-core/src/main/java/com/aware/ui/esms/ESM_Freetext.java +++ b/aware-core/src/main/java/com/aware/ui/esms/ESM_Freetext.java @@ -6,7 +6,6 @@ import android.content.Context; import android.content.Intent; import android.os.Bundle; -import android.support.annotation.NonNull; import android.util.Log; import android.view.LayoutInflater; import android.view.View; @@ -14,12 +13,11 @@ import android.widget.Button; import android.widget.EditText; import android.widget.TextView; - +import androidx.annotation.NonNull; import com.aware.Aware; import com.aware.ESM; import com.aware.R; import com.aware.providers.ESM_Provider; - import org.json.JSONException; /** diff --git a/aware-core/src/main/java/com/aware/ui/esms/ESM_Likert.java b/aware-core/src/main/java/com/aware/ui/esms/ESM_Likert.java index 057ecc9c3..4bf2b9f51 100644 --- a/aware-core/src/main/java/com/aware/ui/esms/ESM_Likert.java +++ b/aware-core/src/main/java/com/aware/ui/esms/ESM_Likert.java @@ -6,19 +6,17 @@ import android.content.Context; import android.content.Intent; import android.os.Bundle; -import android.support.annotation.NonNull; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.widget.Button; import android.widget.RatingBar; import android.widget.TextView; - +import androidx.annotation.NonNull; import com.aware.Aware; import com.aware.ESM; import com.aware.R; import com.aware.providers.ESM_Provider; - import org.json.JSONException; /** diff --git a/aware-core/src/main/java/com/aware/ui/esms/ESM_Number.java b/aware-core/src/main/java/com/aware/ui/esms/ESM_Number.java index bf8d33515..3d70263e8 100644 --- a/aware-core/src/main/java/com/aware/ui/esms/ESM_Number.java +++ b/aware-core/src/main/java/com/aware/ui/esms/ESM_Number.java @@ -6,7 +6,6 @@ import android.content.Context; import android.content.Intent; import android.os.Bundle; -import android.support.annotation.NonNull; import android.util.Log; import android.view.LayoutInflater; import android.view.View; @@ -14,12 +13,11 @@ import android.widget.Button; import android.widget.EditText; import android.widget.TextView; - +import androidx.annotation.NonNull; import com.aware.Aware; import com.aware.ESM; import com.aware.R; import com.aware.providers.ESM_Provider; - import org.json.JSONException; /** diff --git a/aware-core/src/main/java/com/aware/ui/esms/ESM_PAM.java b/aware-core/src/main/java/com/aware/ui/esms/ESM_PAM.java index b6b88226e..c22d65519 100644 --- a/aware-core/src/main/java/com/aware/ui/esms/ESM_PAM.java +++ b/aware-core/src/main/java/com/aware/ui/esms/ESM_PAM.java @@ -6,21 +6,19 @@ import android.content.Context; import android.content.Intent; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v7.widget.GridLayout; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.widget.Button; import android.widget.ImageView; import android.widget.TextView; - +import androidx.annotation.NonNull; +import androidx.gridlayout.widget.GridLayout; import com.aware.Aware; import com.aware.ESM; import com.aware.R; import com.aware.providers.ESM_Provider; import com.koushikdutta.ion.Ion; - import org.json.JSONArray; import org.json.JSONException; diff --git a/aware-core/src/main/java/com/aware/ui/esms/ESM_Question.java b/aware-core/src/main/java/com/aware/ui/esms/ESM_Question.java index f66e71769..406b47645 100644 --- a/aware-core/src/main/java/com/aware/ui/esms/ESM_Question.java +++ b/aware-core/src/main/java/com/aware/ui/esms/ESM_Question.java @@ -11,16 +11,14 @@ import android.database.Cursor; import android.os.AsyncTask; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.DialogFragment; import android.util.Log; import android.view.ViewGroup; - +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.DialogFragment; import com.aware.Aware; import com.aware.ESM; import com.aware.providers.ESM_Provider; - import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; diff --git a/aware-core/src/main/java/com/aware/ui/esms/ESM_QuickAnswer.java b/aware-core/src/main/java/com/aware/ui/esms/ESM_QuickAnswer.java index a5dadc4e0..010613680 100644 --- a/aware-core/src/main/java/com/aware/ui/esms/ESM_QuickAnswer.java +++ b/aware-core/src/main/java/com/aware/ui/esms/ESM_QuickAnswer.java @@ -6,7 +6,6 @@ import android.content.Context; import android.content.Intent; import android.os.Bundle; -import android.support.annotation.NonNull; import android.util.Log; import android.view.LayoutInflater; import android.view.View; @@ -14,12 +13,11 @@ import android.widget.Button; import android.widget.LinearLayout; import android.widget.TextView; - +import androidx.annotation.NonNull; import com.aware.Aware; import com.aware.ESM; import com.aware.R; import com.aware.providers.ESM_Provider; - import org.json.JSONArray; import org.json.JSONException; diff --git a/aware-core/src/main/java/com/aware/ui/esms/ESM_Radio.java b/aware-core/src/main/java/com/aware/ui/esms/ESM_Radio.java index a929b7df8..32183323a 100644 --- a/aware-core/src/main/java/com/aware/ui/esms/ESM_Radio.java +++ b/aware-core/src/main/java/com/aware/ui/esms/ESM_Radio.java @@ -6,24 +6,17 @@ import android.content.Context; import android.content.Intent; import android.os.Bundle; -import android.support.annotation.NonNull; import android.util.Log; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; import android.view.WindowManager; -import android.widget.Button; -import android.widget.EditText; -import android.widget.LinearLayout; -import android.widget.RadioButton; -import android.widget.RadioGroup; -import android.widget.TextView; - +import android.widget.*; +import androidx.annotation.NonNull; import com.aware.Aware; import com.aware.ESM; import com.aware.R; import com.aware.providers.ESM_Provider; - import org.json.JSONArray; import org.json.JSONException; diff --git a/aware-core/src/main/java/com/aware/ui/esms/ESM_Scale.java b/aware-core/src/main/java/com/aware/ui/esms/ESM_Scale.java index abc8a6e1a..612d5aa8b 100644 --- a/aware-core/src/main/java/com/aware/ui/esms/ESM_Scale.java +++ b/aware-core/src/main/java/com/aware/ui/esms/ESM_Scale.java @@ -6,19 +6,17 @@ import android.content.Context; import android.content.Intent; import android.os.Bundle; -import android.support.annotation.NonNull; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.widget.Button; import android.widget.SeekBar; import android.widget.TextView; - +import androidx.annotation.NonNull; import com.aware.Aware; import com.aware.ESM; import com.aware.R; import com.aware.providers.ESM_Provider; - import org.json.JSONException; /** diff --git a/aware-core/src/main/java/com/aware/ui/esms/ESM_Web.java b/aware-core/src/main/java/com/aware/ui/esms/ESM_Web.java index 8445c904f..7678ae148 100644 --- a/aware-core/src/main/java/com/aware/ui/esms/ESM_Web.java +++ b/aware-core/src/main/java/com/aware/ui/esms/ESM_Web.java @@ -6,7 +6,6 @@ import android.content.Context; import android.content.Intent; import android.os.Bundle; -import android.support.annotation.NonNull; import android.util.Log; import android.view.LayoutInflater; import android.view.View; @@ -16,6 +15,7 @@ import android.widget.Button; import android.widget.LinearLayout; import android.widget.TextView; +import androidx.annotation.NonNull; import com.aware.Aware; import com.aware.Aware_Preferences; import com.aware.ESM; diff --git a/aware-core/src/main/java/com/aware/utils/Aware_Accounts.java b/aware-core/src/main/java/com/aware/utils/Aware_Accounts.java index cdef97884..333e673c2 100644 --- a/aware-core/src/main/java/com/aware/utils/Aware_Accounts.java +++ b/aware-core/src/main/java/com/aware/utils/Aware_Accounts.java @@ -9,7 +9,7 @@ import android.content.Intent; import android.os.Bundle; import android.os.IBinder; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; /** * Created by denzil on 18/07/2017. diff --git a/aware-core/src/main/java/com/aware/utils/Aware_Plugin.java b/aware-core/src/main/java/com/aware/utils/Aware_Plugin.java index 922045fc9..f96be2b17 100644 --- a/aware-core/src/main/java/com/aware/utils/Aware_Plugin.java +++ b/aware-core/src/main/java/com/aware/utils/Aware_Plugin.java @@ -3,17 +3,12 @@ import android.Manifest; import android.app.Service; -import android.content.BroadcastReceiver; -import android.content.ContentResolver; -import android.content.Context; -import android.content.Intent; -import android.content.IntentFilter; +import android.content.*; import android.os.Build; import android.os.Bundle; import android.os.IBinder; -import android.support.v4.content.PermissionChecker; import android.util.Log; - +import androidx.core.content.PermissionChecker; import com.aware.Aware; import com.aware.Aware_Preferences; import com.aware.ui.PermissionsHandler; diff --git a/aware-core/src/main/java/com/aware/utils/Aware_Sensor.java b/aware-core/src/main/java/com/aware/utils/Aware_Sensor.java index b6d9afe8c..7a7d55749 100644 --- a/aware-core/src/main/java/com/aware/utils/Aware_Sensor.java +++ b/aware-core/src/main/java/com/aware/utils/Aware_Sensor.java @@ -3,18 +3,13 @@ import android.Manifest; import android.app.Service; -import android.content.BroadcastReceiver; -import android.content.ContentResolver; -import android.content.Context; -import android.content.Intent; -import android.content.IntentFilter; +import android.content.*; import android.os.AsyncTask; import android.os.Build; import android.os.Bundle; import android.os.IBinder; -import android.support.v4.content.PermissionChecker; import android.util.Log; - +import androidx.core.content.PermissionChecker; import com.aware.Aware; import com.aware.Aware_Preferences; import com.aware.ui.PermissionsHandler; diff --git a/aware-core/src/main/java/com/aware/utils/DatabaseHelper.java b/aware-core/src/main/java/com/aware/utils/DatabaseHelper.java index e19193709..58066b0c5 100644 --- a/aware-core/src/main/java/com/aware/utils/DatabaseHelper.java +++ b/aware-core/src/main/java/com/aware/utils/DatabaseHelper.java @@ -1,25 +1,18 @@ package com.aware.utils; -import android.Manifest; import android.content.Context; -import android.content.pm.PackageManager; import android.database.Cursor; -import android.database.SQLException; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteDatabase.CursorFactory; import android.database.sqlite.SQLiteException; import android.database.sqlite.SQLiteOpenHelper; import android.os.Build; import android.os.Environment; -import android.support.v4.content.ContextCompat; -import android.support.v4.content.PermissionChecker; import android.text.TextUtils; import android.util.Log; - -import com.aware.Aware; +import androidx.core.content.ContextCompat; import com.aware.R; - import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; diff --git a/aware-core/src/main/java/com/aware/utils/DownloadPluginService.java b/aware-core/src/main/java/com/aware/utils/DownloadPluginService.java index e184ef6f9..308b73923 100644 --- a/aware-core/src/main/java/com/aware/utils/DownloadPluginService.java +++ b/aware-core/src/main/java/com/aware/utils/DownloadPluginService.java @@ -7,20 +7,20 @@ import android.net.Uri; import android.os.Build; import android.os.Environment; -import android.support.v4.app.NotificationCompat; -import android.support.v4.content.FileProvider; import android.util.Log; import android.widget.Toast; - +import androidx.core.app.NotificationCompat; +import androidx.core.content.FileProvider; import com.aware.Aware; import com.aware.Aware_Preferences; import com.aware.R; import com.koushikdutta.async.future.FutureCallback; import com.koushikdutta.ion.Ion; - import org.json.JSONException; import org.json.JSONObject; +import javax.net.ssl.SSLContext; +import javax.net.ssl.TrustManagerFactory; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; @@ -34,9 +34,6 @@ import java.security.cert.CertificateFactory; import java.util.Random; -import javax.net.ssl.SSLContext; -import javax.net.ssl.TrustManagerFactory; - /** * Created by denzil on 17/01/15. */ diff --git a/aware-core/src/main/java/com/aware/utils/PluginsManager.java b/aware-core/src/main/java/com/aware/utils/PluginsManager.java index 974b0fe23..5d63e5432 100644 --- a/aware-core/src/main/java/com/aware/utils/PluginsManager.java +++ b/aware-core/src/main/java/com/aware/utils/PluginsManager.java @@ -2,58 +2,29 @@ package com.aware.utils; import android.app.ActivityManager; -import android.app.Service; -import android.content.BroadcastReceiver; import android.content.ComponentName; import android.content.ContentValues; import android.content.Context; -import android.content.Intent; -import android.content.IntentFilter; -import android.content.pm.ApplicationInfo; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; import android.content.pm.ServiceInfo; import android.database.Cursor; import android.graphics.Bitmap; -import android.graphics.BitmapFactory; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; -import android.os.AsyncTask; -import android.os.IBinder; -import android.support.annotation.Nullable; import android.util.Log; - import com.aware.Aware; -import com.aware.Aware_Preferences; import com.aware.providers.Aware_Provider; import com.aware.providers.Aware_Provider.Aware_Plugins; - import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import java.io.ByteArrayOutputStream; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.InputStream; -import java.net.HttpURLConnection; -import java.net.MalformedURLException; -import java.net.URL; -import java.security.KeyManagementException; -import java.security.KeyStore; -import java.security.KeyStoreException; -import java.security.NoSuchAlgorithmException; -import java.security.cert.Certificate; -import java.security.cert.CertificateException; -import java.security.cert.CertificateFactory; import java.util.ArrayList; import java.util.List; -import javax.net.ssl.HttpsURLConnection; -import javax.net.ssl.SSLContext; -import javax.net.ssl.TrustManagerFactory; - /** * Helper class for fetching information on installed plugins * diff --git a/aware-core/src/main/java/com/aware/utils/SSLManager.java b/aware-core/src/main/java/com/aware/utils/SSLManager.java index 292ae6aee..330bbf804 100644 --- a/aware-core/src/main/java/com/aware/utils/SSLManager.java +++ b/aware-core/src/main/java/com/aware/utils/SSLManager.java @@ -4,37 +4,18 @@ import android.net.Uri; import android.os.AsyncTask; import android.os.Environment; -import android.support.v4.content.ContextCompat; import android.util.Log; - +import androidx.core.content.ContextCompat; import com.aware.Aware; import com.aware.Aware_Preferences; import com.aware.R; -import com.koushikdutta.async.future.Future; -import com.koushikdutta.async.future.FutureCallback; -import com.koushikdutta.ion.Ion; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.OutputStreamWriter; -import java.net.MalformedURLException; -import java.net.URL; -import java.security.cert.Certificate; -import java.security.cert.CertificateEncodingException; -import java.security.cert.CertificateException; -import java.security.cert.CertificateFactory; -import java.security.cert.X509Certificate; -import java.util.Date; -import java.util.concurrent.ExecutionException; import javax.net.ssl.HttpsURLConnection; import javax.net.ssl.SSLPeerUnverifiedException; +import java.io.*; +import java.net.MalformedURLException; +import java.net.URL; +import java.security.cert.*; /** * Created by denzil on 15/12/15. diff --git a/aware-phone/build.gradle b/aware-phone/build.gradle index 1f07f11f7..4ed55579e 100755 --- a/aware-phone/build.gradle +++ b/aware-phone/build.gradle @@ -102,13 +102,11 @@ if (System.getenv("storeFile") != null && System.getenv("storePassword") != null } dependencies { - implementation('me.dm7.barcodescanner:zbar:1.9.8') { - exclude group: 'com.android.support', module: "support-v4" - } + implementation "me.dm7.barcodescanner:zbar:1.9.8" + + implementation "com.google.android.material:material:1.1.0-alpha09" + implementation "androidx.appcompat:appcompat:1.0.2" - implementation "com.android.support:appcompat-v7:$support_libs" - implementation "com.android.support:design:$support_libs" - api (project(':aware-core')) api (project(":com.aware.plugin.ambient_noise")) api (project(":com.aware.plugin.device_usage")) diff --git a/aware-phone/src/main/java/com/aware/phone/Aware_Client.java b/aware-phone/src/main/java/com/aware/phone/Aware_Client.java index b08a5a242..a607f3803 100755 --- a/aware-phone/src/main/java/com/aware/phone/Aware_Client.java +++ b/aware-phone/src/main/java/com/aware/phone/Aware_Client.java @@ -5,11 +5,7 @@ import android.app.Dialog; import android.app.NotificationChannel; import android.app.NotificationManager; -import android.content.Context; -import android.content.DialogInterface; -import android.content.Intent; -import android.content.IntentFilter; -import android.content.SharedPreferences; +import android.content.*; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.graphics.Color; @@ -22,22 +18,15 @@ import android.os.AsyncTask; import android.os.Build; import android.os.Bundle; -import android.preference.CheckBoxPreference; -import android.preference.EditTextPreference; -import android.preference.ListPreference; -import android.preference.Preference; -import android.preference.PreferenceGroup; -import android.preference.PreferenceManager; -import android.preference.PreferenceScreen; +import android.preference.*; import android.provider.Settings; -import android.support.v4.content.ContextCompat; -import android.support.v4.content.PermissionChecker; -import android.support.v7.widget.Toolbar; import android.util.Log; import android.view.ViewGroup; import android.widget.ListAdapter; import android.widget.Toast; - +import androidx.appcompat.widget.Toolbar; +import androidx.core.content.ContextCompat; +import androidx.core.content.PermissionChecker; import com.aware.Applications; import com.aware.Aware; import com.aware.Aware_Preferences; @@ -49,12 +38,7 @@ import java.io.FileNotFoundException; import java.lang.reflect.Field; -import java.util.ArrayList; -import java.util.Hashtable; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.UUID; +import java.util.*; /** * @author df diff --git a/aware-phone/src/main/java/com/aware/phone/ui/About.java b/aware-phone/src/main/java/com/aware/phone/ui/About.java index f16190c0f..883a08218 100755 --- a/aware-phone/src/main/java/com/aware/phone/ui/About.java +++ b/aware-phone/src/main/java/com/aware/phone/ui/About.java @@ -18,7 +18,7 @@ protected void onCreate(Bundle savedInstanceState) { WebView about_us = (WebView) findViewById(R.id.about_us); WebSettings settings = about_us.getSettings(); settings.setJavaScriptEnabled(true); - about_us.loadUrl("http://www.awareframework.com/team/"); + about_us.loadUrl("https://awareframework.com/team/"); } @Override diff --git a/aware-phone/src/main/java/com/aware/phone/ui/AppCompatPreferenceActivity.java b/aware-phone/src/main/java/com/aware/phone/ui/AppCompatPreferenceActivity.java index 480a21d23..17f35e90f 100755 --- a/aware-phone/src/main/java/com/aware/phone/ui/AppCompatPreferenceActivity.java +++ b/aware-phone/src/main/java/com/aware/phone/ui/AppCompatPreferenceActivity.java @@ -8,25 +8,15 @@ import android.preference.Preference; import android.preference.PreferenceActivity; import android.preference.PreferenceGroup; -import android.support.annotation.LayoutRes; -import android.support.annotation.Nullable; -import android.support.v7.app.ActionBar; -import android.support.v7.app.AppCompatDelegate; -import android.support.v7.widget.AppCompatAutoCompleteTextView; -import android.support.v7.widget.AppCompatButton; -import android.support.v7.widget.AppCompatCheckBox; -import android.support.v7.widget.AppCompatCheckedTextView; -import android.support.v7.widget.AppCompatEditText; -import android.support.v7.widget.AppCompatRadioButton; -import android.support.v7.widget.AppCompatRatingBar; -import android.support.v7.widget.AppCompatSeekBar; -import android.support.v7.widget.AppCompatSpinner; -import android.support.v7.widget.AppCompatTextView; -import android.support.v7.widget.Toolbar; import android.util.AttributeSet; import android.view.MenuInflater; import android.view.View; import android.view.ViewGroup; +import androidx.annotation.LayoutRes; +import androidx.annotation.Nullable; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.app.AppCompatDelegate; +import androidx.appcompat.widget.*; /** * Created by denzil on 09/10/15. diff --git a/aware-phone/src/main/java/com/aware/phone/ui/Aware_Activity.java b/aware-phone/src/main/java/com/aware/phone/ui/Aware_Activity.java index 32b30c0f5..d7d4ae960 100755 --- a/aware-phone/src/main/java/com/aware/phone/ui/Aware_Activity.java +++ b/aware-phone/src/main/java/com/aware/phone/ui/Aware_Activity.java @@ -1,25 +1,21 @@ package com.aware.phone.ui; import android.Manifest; -import android.content.ActivityNotFoundException; import android.content.Intent; import android.content.pm.PackageManager; -import android.net.Uri; import android.os.Build; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.design.widget.BottomNavigationView; -import android.support.v4.content.PermissionChecker; -import android.util.Log; import android.view.Menu; import android.view.MenuItem; import android.widget.Toast; - +import androidx.annotation.NonNull; +import androidx.core.content.PermissionChecker; import com.aware.Aware; import com.aware.Aware_Preferences; import com.aware.phone.Aware_Client; import com.aware.phone.R; import com.aware.ui.PermissionsHandler; +import com.google.android.material.bottomnavigation.BottomNavigationView; import java.util.ArrayList; diff --git a/aware-phone/src/main/java/com/aware/phone/ui/Aware_Join_Study.java b/aware-phone/src/main/java/com/aware/phone/ui/Aware_Join_Study.java index c9c7afa76..7c0c411ae 100755 --- a/aware-phone/src/main/java/com/aware/phone/ui/Aware_Join_Study.java +++ b/aware-phone/src/main/java/com/aware/phone/ui/Aware_Join_Study.java @@ -2,14 +2,7 @@ import android.app.Activity; import android.app.ProgressDialog; -import android.content.BroadcastReceiver; -import android.content.ContentResolver; -import android.content.ContentValues; -import android.content.Context; -import android.content.DialogInterface; -import android.content.Intent; -import android.content.IntentFilter; -import android.content.SharedPreferences; +import android.content.*; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.database.Cursor; @@ -17,9 +10,6 @@ import android.net.Uri; import android.os.AsyncTask; import android.os.Bundle; -import android.support.v7.app.AlertDialog; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; import android.text.Editable; import android.text.Html; import android.text.TextWatcher; @@ -28,18 +18,15 @@ import android.view.View; import android.view.ViewGroup; import android.widget.*; - +import androidx.appcompat.app.AlertDialog; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import com.aware.Aware; import com.aware.Aware_Preferences; import com.aware.phone.Aware_Client; import com.aware.phone.R; import com.aware.providers.Aware_Provider; -import com.aware.utils.Http; -import com.aware.utils.Https; -import com.aware.utils.PluginsManager; -import com.aware.utils.SSLManager; -import com.aware.utils.StudyUtils; - +import com.aware.utils.*; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; diff --git a/aware-phone/src/main/java/com/aware/phone/ui/Plugins_Manager.java b/aware-phone/src/main/java/com/aware/phone/ui/Plugins_Manager.java index a7e412078..05c6d2420 100755 --- a/aware-phone/src/main/java/com/aware/phone/ui/Plugins_Manager.java +++ b/aware-phone/src/main/java/com/aware/phone/ui/Plugins_Manager.java @@ -2,14 +2,7 @@ package com.aware.phone.ui; import android.app.AlertDialog; -import android.content.BroadcastReceiver; -import android.content.ComponentName; -import android.content.ContentValues; -import android.content.Context; -import android.content.DialogInterface; -import android.content.Intent; -import android.content.IntentFilter; -import android.content.SharedPreferences; +import android.content.*; import android.content.pm.ApplicationInfo; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; @@ -18,27 +11,20 @@ import android.database.Cursor; import android.graphics.BitmapFactory; import android.os.Bundle; -import android.support.v4.content.ContextCompat; import android.util.Base64; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; -import android.widget.BaseAdapter; -import android.widget.GridView; -import android.widget.ImageView; -import android.widget.TextView; -import android.widget.Toast; - +import android.widget.*; +import androidx.core.content.ContextCompat; import com.aware.Aware; - import com.aware.phone.R; import com.aware.providers.Aware_Provider; import com.aware.providers.Aware_Provider.Aware_Plugins; import com.aware.utils.Aware_Plugin; import com.aware.utils.DatabaseHelper; import com.aware.utils.PluginsManager; - import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; diff --git a/aware-phone/src/main/res/layout/aware_controller.xml b/aware-phone/src/main/res/layout/aware_controller.xml index e269adeac..4060cfcb3 100644 --- a/aware-phone/src/main/res/layout/aware_controller.xml +++ b/aware-phone/src/main/res/layout/aware_controller.xml @@ -1,5 +1,6 @@ - - - \ No newline at end of file + \ No newline at end of file diff --git a/aware-phone/src/main/res/layout/plugins_store_pkg_list_item.xml b/aware-phone/src/main/res/layout/plugins_store_pkg_list_item.xml index 5abff204c..097688f23 100755 --- a/aware-phone/src/main/res/layout/plugins_store_pkg_list_item.xml +++ b/aware-phone/src/main/res/layout/plugins_store_pkg_list_item.xml @@ -1,5 +1,6 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/aware-phone/src/main/res/layout/stream_ui.xml b/aware-phone/src/main/res/layout/stream_ui.xml index b72395098..a3b15592f 100755 --- a/aware-phone/src/main/res/layout/stream_ui.xml +++ b/aware-phone/src/main/res/layout/stream_ui.xml @@ -21,7 +21,7 @@ android:orientation="vertical" android:padding="0dp" /> -