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

Commit

Permalink
- Updated to use Android X and Jetpack
Browse files Browse the repository at this point in the history
- Bump minimum SDK to 24 (due to update to Android X & Jetpack)
- Fixed Contacts List Provider authority
- Make Ambient Noise not record raw audio by default.
  • Loading branch information
denzilferreira committed Aug 6, 2019
1 parent 2e382f4 commit 1e49fa5
Show file tree
Hide file tree
Showing 84 changed files with 217 additions and 446 deletions.
53 changes: 41 additions & 12 deletions aware-core/aware.gradle
Original file line number Diff line number Diff line change
@@ -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
}
}
20 changes: 15 additions & 5 deletions aware-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
}
Expand Down
2 changes: 1 addition & 1 deletion aware-core/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@
android:writePermission="com.aware.WRITE_CONTEXT_DATA" />

<provider
android:name="android.support.v4.content.FileProvider"
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.provider.storage"
android:exported="false"
android:grantUriPermissions="true">
Expand Down
23 changes: 6 additions & 17 deletions aware-core/src/main/java/com/aware/Applications.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down
59 changes: 9 additions & 50 deletions aware-core/src/main/java/com/aware/Aware.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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.
Expand Down
11 changes: 2 additions & 9 deletions aware-core/src/main/java/com/aware/Bluetooth.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
13 changes: 2 additions & 11 deletions aware-core/src/main/java/com/aware/ESM.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,23 @@

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;
import android.os.AsyncTask;
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down
Loading

0 comments on commit 1e49fa5

Please sign in to comment.