Browse Source

Migrate to AndroidX support library

merge-requests/7/head
Trevor Slocum 2 years ago
parent
commit
4c2d3e82af
  1. 20
      MeditationAssistant/build.gradle
  2. 2
      MeditationAssistant/src/main/AndroidManifest.xml
  3. 2
      MeditationAssistant/src/main/java/sh/ftp/rocketninelabs/meditationassistant/AboutActivity.java
  4. 4
      MeditationAssistant/src/main/java/sh/ftp/rocketninelabs/meditationassistant/AuthConfiguration.java
  5. 6
      MeditationAssistant/src/main/java/sh/ftp/rocketninelabs/meditationassistant/AuthResultActivity.java
  6. 6
      MeditationAssistant/src/main/java/sh/ftp/rocketninelabs/meditationassistant/AuthStateManager.java
  7. 2
      MeditationAssistant/src/main/java/sh/ftp/rocketninelabs/meditationassistant/CalendarFragment.java
  8. 4
      MeditationAssistant/src/main/java/sh/ftp/rocketninelabs/meditationassistant/DailyReminderReceiver.java
  9. 4
      MeditationAssistant/src/main/java/sh/ftp/rocketninelabs/meditationassistant/MeditationAssistant.java
  10. 2
      MeditationAssistant/src/main/java/sh/ftp/rocketninelabs/meditationassistant/NumberPicker.java
  11. 14
      MeditationAssistant/src/main/java/sh/ftp/rocketninelabs/meditationassistant/ProgressActivity.java
  12. 2
      MeditationAssistant/src/main/java/sh/ftp/rocketninelabs/meditationassistant/SessionsFragment.java
  13. 10
      MeditationAssistant/src/main/java/sh/ftp/rocketninelabs/meditationassistant/SettingsActivity.java
  14. 2
      MeditationAssistant/src/main/java/sh/ftp/rocketninelabs/meditationassistant/StatsFragment.java
  15. 6
      MeditationAssistant/src/main/res/layout/activity_progress.xml
  16. 3
      gradle.properties

20
MeditationAssistant/build.gradle

@ -1,12 +1,12 @@
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
compileSdkVersion 29
buildToolsVersion '29.0.2'
defaultConfig {
minSdkVersion 16
targetSdkVersion 28
targetSdkVersion 29
versionCode 158
versionName "1.5.8"
@ -75,13 +75,13 @@ android {
}
dependencies {
implementation "com.android.support:support-compat:28.0.0"
implementation "com.android.support:support-core-utils:28.0.0"
implementation "com.android.support:support-core-ui:28.0.0"
implementation "com.android.support:support-media-compat:28.0.0"
implementation "com.android.support:support-fragment:28.0.0"
implementation "com.android.support:recyclerview-v7:28.0.0"
implementation "com.android.support:design:28.0.0"
implementation 'androidx.core:core:1.1.0'
implementation 'androidx.legacy:legacy-support-core-utils:1.0.0'
implementation 'androidx.legacy:legacy-support-core-ui:1.0.0'
implementation 'androidx.media:media:1.1.0'
implementation 'androidx.fragment:fragment:1.1.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'com.google.android.material:material:1.0.0'
implementation "net.openid:appauth:0.7.1"
implementation "com.squareup.okio:okio:2.2.2"
implementation 'com.opencsv:opencsv:4.6'

2
MeditationAssistant/src/main/AndroidManifest.xml

@ -116,7 +116,7 @@
</intent-filter>
</activity>
<provider
android:name="android.support.v4.content.FileProvider"
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.provider"
android:exported="false"
android:grantUriPermissions="true">

2
MeditationAssistant/src/main/java/sh/ftp/rocketninelabs/meditationassistant/AboutActivity.java

@ -6,7 +6,7 @@ import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.NavUtils;
import androidx.core.app.NavUtils;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;

4
MeditationAssistant/src/main/java/sh/ftp/rocketninelabs/meditationassistant/AuthConfiguration.java

@ -6,8 +6,8 @@ import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.Resources;
import android.net.Uri;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import net.openid.appauth.connectivity.ConnectionBuilder;
import net.openid.appauth.connectivity.DefaultConnectionBuilder;

6
MeditationAssistant/src/main/java/sh/ftp/rocketninelabs/meditationassistant/AuthResultActivity.java

@ -3,9 +3,9 @@ package sh.ftp.rocketninelabs.meditationassistant;
import android.app.Activity;
import android.os.Bundle;
import android.support.annotation.MainThread;
import android.support.annotation.Nullable;
import android.support.annotation.WorkerThread;
import androidx.annotation.MainThread;
import androidx.annotation.Nullable;
import androidx.annotation.WorkerThread;
import android.util.Log;
import net.openid.appauth.AppAuthConfiguration;

6
MeditationAssistant/src/main/java/sh/ftp/rocketninelabs/meditationassistant/AuthStateManager.java

@ -2,9 +2,9 @@ package sh.ftp.rocketninelabs.meditationassistant;
import android.content.Context;
import android.content.SharedPreferences;
import android.support.annotation.AnyThread;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import androidx.annotation.AnyThread;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import android.util.Log;
import net.openid.appauth.AuthState;

2
MeditationAssistant/src/main/java/sh/ftp/rocketninelabs/meditationassistant/CalendarFragment.java

@ -3,7 +3,7 @@ package sh.ftp.rocketninelabs.meditationassistant;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import androidx.fragment.app.Fragment;
import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.util.Log;

4
MeditationAssistant/src/main/java/sh/ftp/rocketninelabs/meditationassistant/DailyReminderReceiver.java

@ -8,8 +8,8 @@ import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.provider.Settings;
import android.support.v4.app.NotificationCompat;
import android.support.v4.app.TaskStackBuilder;
import androidx.core.app.NotificationCompat;
import androidx.core.app.TaskStackBuilder;
import android.util.Log;
import java.text.SimpleDateFormat;

4
MeditationAssistant/src/main/java/sh/ftp/rocketninelabs/meditationassistant/MeditationAssistant.java

@ -28,8 +28,8 @@ import android.os.Looper;
import android.os.Vibrator;
import android.preference.PreferenceManager;
import android.provider.Settings;
import android.support.annotation.RequiresApi;
import android.support.v4.app.NotificationCompat;
import androidx.annotation.RequiresApi;
import androidx.core.app.NotificationCompat;
import android.util.Log;
import android.util.TypedValue;
import android.view.LayoutInflater;

2
MeditationAssistant/src/main/java/sh/ftp/rocketninelabs/meditationassistant/NumberPicker.java

@ -1967,7 +1967,7 @@ public class NumberPicker extends LinearLayout {
/**
* @hide
*/
public static class CustomEditText extends android.support.v7.widget.AppCompatEditText {
public static class CustomEditText extends androidx.appcompat.widget.AppCompatEditText {
public CustomEditText(Context context, AttributeSet attrs) {
super(context, attrs);

14
MeditationAssistant/src/main/java/sh/ftp/rocketninelabs/meditationassistant/ProgressActivity.java

@ -3,13 +3,13 @@ package sh.ftp.rocketninelabs.meditationassistant;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.app.NavUtils;
import android.support.v4.view.PagerTabStrip;
import android.support.v4.view.ViewPager;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;
import androidx.core.app.NavUtils;
import androidx.viewpager.widget.PagerTabStrip;
import androidx.viewpager.widget.ViewPager;
import android.util.SparseArray;
import android.view.LayoutInflater;
import android.view.Menu;

2
MeditationAssistant/src/main/java/sh/ftp/rocketninelabs/meditationassistant/SessionsFragment.java

@ -4,7 +4,7 @@ import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.v4.app.ListFragment;
import androidx.fragment.app.ListFragment;
import android.util.Log;
import android.view.View;
import android.view.WindowManager;

10
MeditationAssistant/src/main/java/sh/ftp/rocketninelabs/meditationassistant/SettingsActivity.java

@ -25,8 +25,8 @@ import android.preference.PreferenceActivity;
import android.preference.PreferenceCategory;
import android.preference.PreferenceFragment;
import android.preference.RingtonePreference;
import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import android.text.TextUtils;
import android.util.Log;
import android.view.Menu;
@ -346,8 +346,8 @@ public class SettingsActivity extends PreferenceActivity {
public void onClick(DialogInterface dialogInterface, int i) {
}
}).show();
break;
}
break;
}
case PERMISSION_REQUEST_IMPORT_READ_EXTERNAL_STORAGE: {
if ((grantResults.length > 0
@ -386,8 +386,8 @@ public class SettingsActivity extends PreferenceActivity {
public void onClick(DialogInterface dialogInterface, int i) {
}
}).show();
break;
}
break;
}
case PERMISSION_REQUEST_EXPORT_WRITE_EXTERNAL_STORAGE: {
if ((grantResults.length > 0
@ -426,8 +426,8 @@ public class SettingsActivity extends PreferenceActivity {
public void onClick(DialogInterface dialogInterface, int i) {
}
}).show();
break;
}
break;
}
}
}

2
MeditationAssistant/src/main/java/sh/ftp/rocketninelabs/meditationassistant/StatsFragment.java

@ -3,7 +3,7 @@ package sh.ftp.rocketninelabs.meditationassistant;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import androidx.fragment.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;

6
MeditationAssistant/src/main/res/layout/activity_progress.xml

@ -11,19 +11,19 @@
android:layout_weight="1"
android:orientation="vertical">
<android.support.v4.view.ViewPager
<androidx.viewpager.widget.ViewPager
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
tools:ignore="NestedWeights">
<android.support.v4.view.PagerTabStrip
<androidx.viewpager.widget.PagerTabStrip
android:id="@+id/titles"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
</android.support.v4.view.ViewPager>
</androidx.viewpager.widget.ViewPager>
</LinearLayout>

3
gradle.properties

@ -13,4 +13,5 @@
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
#Thu May 28 12:58:03 PDT 2015
org.gradle.jvmargs=-Xmx4096m -XX\:MaxPermSize\=1024m -XX\:+HeapDumpOnOutOfMemoryError -Dfile.encoding\=UTF-8
android.enableJetifier=true
android.useAndroidX=true
Loading…
Cancel
Save