Commit 0268a69e authored by Toni Beier's avatar Toni Beier

Merge branch 'revise_build_compile-sdk-28' into 'develop'

Kompiliervorgang benutzt SDK-Version 28

See merge request OpenASiST/openasist4android_core!22
parents 964099e5 3cfbb2e4
...@@ -59,9 +59,6 @@ ...@@ -59,9 +59,6 @@
<action android:name="android.intent.action.DATE_CHANGED" /> <action android:name="android.intent.action.DATE_CHANGED" />
</intent-filter> </intent-filter>
</receiver> </receiver>
<uses-library android:name="com.google.android.maps" />
<activity <activity
android:name=".module.start.AsistStartActivity" android:name=".module.start.AsistStartActivity"
android:configChanges="orientation|keyboardHidden|screenSize" android:configChanges="orientation|keyboardHidden|screenSize"
......
...@@ -30,7 +30,7 @@ android { ...@@ -30,7 +30,7 @@ android {
androidTest.setRoot('tests') androidTest.setRoot('tests')
} }
compileSdkVersion 'Google Inc.:Google APIs:24' compileSdkVersion 28
buildToolsVersion '25.0.3' buildToolsVersion '25.0.3'
defaultConfig { defaultConfig {
minSdkVersion 14 minSdkVersion 14
...@@ -134,11 +134,6 @@ dependencies { ...@@ -134,11 +134,6 @@ dependencies {
compile 'com.fasterxml.jackson.core:jackson-databind:2.9.4' compile 'com.fasterxml.jackson.core:jackson-databind:2.9.4'
//android support libraries //android support libraries
compile 'com.android.support:support-v4:25.3.1'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:support-annotations:25.3.1'
compile 'com.android.support:support-vector-drawable:25.3.1'
//simply compile google maps only //simply compile google maps only
//compile 'com.google.android.gms:play-services:11.8.0' //compile 'com.google.android.gms:play-services:11.8.0'
...@@ -153,7 +148,14 @@ dependencies { ...@@ -153,7 +148,14 @@ dependencies {
compile 'org.greenrobot:eventbus:3.0.0' compile 'org.greenrobot:eventbus:3.0.0'
compile fileTree(include: ['*.jar'], dir: 'libs') compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support.constraint:constraint-layout:1.1.3' compile 'com.android.support.constraint:constraint-layout:1.1.3'
compile 'com.android.support:preference-v7:25.3.1' compile 'com.android.support:preference-v7:28.0.0'
// AndroidX Libraries
implementation 'androidx.work:work-runtime:2.0.0'
implementation group: 'androidx.appcompat', name: 'appcompat', version: '1.0.2'
// Material Design Libraries
implementation 'com.google.android.material:material:1.0.0'
} }
allprojects { allprojects {
......
package de.bps.asist; package de.bps.asist;
import android.app.Activity; import android.app.Activity;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;
import android.support.v7.app.ActionBar.Tab;
import android.support.v7.app.ActionBar.TabListener;
public class ASiSTTabListener<T extends Fragment> implements TabListener { import androidx.appcompat.app.ActionBar;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentTransaction;
public class ASiSTTabListener<T extends Fragment> implements ActionBar.TabListener {
private Fragment mFragment; private Fragment mFragment;
private final Activity mActivity; private final Activity mActivity;
private final String mTag; private final String mTag;
...@@ -25,7 +25,7 @@ public class ASiSTTabListener<T extends Fragment> implements TabListener { ...@@ -25,7 +25,7 @@ public class ASiSTTabListener<T extends Fragment> implements TabListener {
/* The following are each of the ActionBar.TabListener callbacks */ /* The following are each of the ActionBar.TabListener callbacks */
public void onTabSelected(Tab tab, FragmentTransaction ft) { public void onTabSelected(ActionBar.Tab tab, FragmentTransaction ft) {
// Check if the fragment is already initialized // Check if the fragment is already initialized
if (mFragment == null) { if (mFragment == null) {
// If not, instantiate and add it to the activity // If not, instantiate and add it to the activity
...@@ -37,14 +37,14 @@ public class ASiSTTabListener<T extends Fragment> implements TabListener { ...@@ -37,14 +37,14 @@ public class ASiSTTabListener<T extends Fragment> implements TabListener {
} }
} }
public void onTabUnselected(Tab tab, FragmentTransaction ft) { public void onTabUnselected(ActionBar.Tab tab, FragmentTransaction ft) {
if (mFragment != null) { if (mFragment != null) {
// Detach the fragment, because another one is being attached // Detach the fragment, because another one is being attached
ft.detach(mFragment); ft.detach(mFragment);
} }
} }
public void onTabReselected(Tab tab, FragmentTransaction ft) { public void onTabReselected(ActionBar.Tab tab, FragmentTransaction ft) {
// User selected the already selected tab. Usually do nothing. // User selected the already selected tab. Usually do nothing.
} }
} }
...@@ -17,7 +17,6 @@ package de.bps.asist; ...@@ -17,7 +17,6 @@ package de.bps.asist;
import android.app.Activity; import android.app.Activity;
import android.graphics.Color; import android.graphics.Color;
import android.support.v7.app.ActionBarActivity;
import android.text.Spannable; import android.text.Spannable;
import android.text.SpannableString; import android.text.SpannableString;
import android.text.style.ForegroundColorSpan; import android.text.style.ForegroundColorSpan;
...@@ -26,10 +25,11 @@ import android.view.MenuItem; ...@@ -26,10 +25,11 @@ import android.view.MenuItem;
import java.io.Serializable; import java.io.Serializable;
import androidx.appcompat.app.AppCompatActivity;
import de.bps.asist.gui.list.AbstractGenericListCallback; import de.bps.asist.gui.list.AbstractGenericListCallback;
public abstract class AbstractAsistActivity extends ActionBarActivity { public abstract class AbstractAsistActivity extends AppCompatActivity {
@Override @Override
public boolean onPrepareOptionsMenu(Menu menu) { public boolean onPrepareOptionsMenu(Menu menu) {
......
...@@ -5,10 +5,10 @@ import android.app.NotificationManager; ...@@ -5,10 +5,10 @@ import android.app.NotificationManager;
import android.app.PendingIntent; import android.app.PendingIntent;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.support.v4.app.NotificationCompat;
import java.util.List; import java.util.List;
import androidx.core.app.NotificationCompat;
import de.bps.asist.R; import de.bps.asist.R;
import de.bps.asist.context.ASiSTConstants; import de.bps.asist.context.ASiSTConstants;
import de.bps.asist.core.manager.ASiSTModuleManager; import de.bps.asist.core.manager.ASiSTModuleManager;
......
...@@ -3,10 +3,9 @@ package de.bps.asist.core.receiver; ...@@ -3,10 +3,9 @@ package de.bps.asist.core.receiver;
import android.app.Notification; import android.app.Notification;
import android.app.NotificationManager; import android.app.NotificationManager;
import android.app.PendingIntent; import android.app.PendingIntent;
import android.app.TaskStackBuilder;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.support.v4.app.NotificationCompat;
import android.support.v4.app.TaskStackBuilder;
import android.util.JsonReader; import android.util.JsonReader;
import android.util.Log; import android.util.Log;
...@@ -20,6 +19,7 @@ import java.io.Serializable; ...@@ -20,6 +19,7 @@ import java.io.Serializable;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import androidx.core.app.NotificationCompat;
import de.bps.asist.R; import de.bps.asist.R;
import de.bps.asist.core.manager.database.DatabaseManager; import de.bps.asist.core.manager.database.DatabaseManager;
import de.bps.asist.core.manager.environment.EnvironmentManager; import de.bps.asist.core.manager.environment.EnvironmentManager;
......
...@@ -3,12 +3,12 @@ package de.bps.asist.gui; ...@@ -3,12 +3,12 @@ package de.bps.asist.gui;
import android.app.Activity; import android.app.Activity;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.View; import android.view.View;
import java.io.Serializable; import java.io.Serializable;
import androidx.fragment.app.Fragment;
import de.bps.asist.gui.list.AbstractGenericListCallback; import de.bps.asist.gui.list.AbstractGenericListCallback;
public abstract class AbstractASiSTFragment extends Fragment { public abstract class AbstractASiSTFragment extends Fragment {
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
package de.bps.asist.gui.code; package de.bps.asist.gui.code;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.text.Editable; import android.text.Editable;
import android.text.TextWatcher; import android.text.TextWatcher;
import android.view.View; import android.view.View;
...@@ -13,6 +12,7 @@ import android.widget.EditText; ...@@ -13,6 +12,7 @@ import android.widget.EditText;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import androidx.appcompat.widget.Toolbar;
import de.bps.asist.R; import de.bps.asist.R;
import de.bps.asist.module.AsistModuleActivity; import de.bps.asist.module.AsistModuleActivity;
......
...@@ -5,8 +5,8 @@ import android.app.AlertDialog; ...@@ -5,8 +5,8 @@ import android.app.AlertDialog;
import android.app.Dialog; import android.app.Dialog;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.os.Bundle; import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import androidx.fragment.app.DialogFragment;
import de.bps.asist.R; import de.bps.asist.R;
/** /**
......
...@@ -6,6 +6,7 @@ import android.os.Parcelable; ...@@ -6,6 +6,7 @@ import android.os.Parcelable;
import java.io.Serializable; import java.io.Serializable;
import java.util.List; import java.util.List;
import androidx.fragment.app.Fragment;
import de.bps.asist.core.database.AbstractDatabaseObject; import de.bps.asist.core.database.AbstractDatabaseObject;
import de.bps.asist.module.settings.model.SettingsConfig; import de.bps.asist.module.settings.model.SettingsConfig;
import de.bps.asist.module.start.tree.StartTreeConfig; import de.bps.asist.module.start.tree.StartTreeConfig;
...@@ -38,7 +39,7 @@ public abstract class AbstractAsistModule { ...@@ -38,7 +39,7 @@ public abstract class AbstractAsistModule {
return "" + getName(); // FIXME return "" + getName(); // FIXME
} }
public abstract android.support.v4.app.Fragment getInitialFragment(); public abstract Fragment getInitialFragment();
public void updateData(final Context context) { public void updateData(final Context context) {
// do nothing by default // do nothing by default
......
...@@ -2,10 +2,10 @@ package de.bps.asist.module.canteen; ...@@ -2,10 +2,10 @@ package de.bps.asist.module.canteen;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.support.v4.app.FragmentManager;
import android.view.Menu; import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
import androidx.fragment.app.FragmentManager;
import de.bps.asist.R; import de.bps.asist.R;
import de.bps.asist.module.AsistModuleActivity; import de.bps.asist.module.AsistModuleActivity;
import de.bps.asist.module.start.AsistStartActivity; import de.bps.asist.module.start.AsistStartActivity;
......
...@@ -5,6 +5,7 @@ import android.content.Context; ...@@ -5,6 +5,7 @@ import android.content.Context;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import androidx.fragment.app.Fragment;
import de.bps.asist.R; import de.bps.asist.R;
import de.bps.asist.core.ASiSTApplication; import de.bps.asist.core.ASiSTApplication;
import de.bps.asist.core.database.AbstractDatabaseObject; import de.bps.asist.core.database.AbstractDatabaseObject;
...@@ -54,7 +55,7 @@ public class CanteenModule extends AbstractAsistModule { ...@@ -54,7 +55,7 @@ public class CanteenModule extends AbstractAsistModule {
} }
@Override @Override
public android.support.v4.app.Fragment getInitialFragment() { public Fragment getInitialFragment() {
return new MensaFragment(); return new MensaFragment();
} }
......
...@@ -5,12 +5,12 @@ import android.os.Bundle; ...@@ -5,12 +5,12 @@ import android.os.Bundle;
import android.preference.ListPreference; import android.preference.ListPreference;
import android.preference.PreferenceFragment; import android.preference.PreferenceFragment;
import android.preference.PreferenceManager; import android.preference.PreferenceManager;
import android.support.annotation.Nullable;
import java.util.Collections; import java.util.Collections;
import java.util.Comparator; import java.util.Comparator;
import java.util.List; import java.util.List;
import androidx.annotation.Nullable;
import de.bps.asist.R; import de.bps.asist.R;
import de.bps.asist.module.canteen.model.Canteen; import de.bps.asist.module.canteen.model.Canteen;
......
...@@ -3,7 +3,6 @@ package de.bps.asist.module.canteen; ...@@ -3,7 +3,6 @@ package de.bps.asist.module.canteen;
import android.content.Context; import android.content.Context;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.preference.PreferenceManager; import android.preference.PreferenceManager;
import android.support.v7.widget.RecyclerView;
import android.text.TextUtils; import android.text.TextUtils;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
......
...@@ -5,26 +5,27 @@ import android.content.Intent; ...@@ -5,26 +5,27 @@ import android.content.Intent;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.os.Bundle; import android.os.Bundle;
import android.preference.PreferenceManager; import android.preference.PreferenceManager;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.Toast; import android.widget.Toast;
import com.google.android.material.tabs.TabLayout;
import java.util.Collection; import java.util.Collection;
import java.util.Collections; import java.util.Collections;
import java.util.Comparator; import java.util.Comparator;
import java.util.List; import java.util.List;
import androidx.fragment.app.FragmentPagerAdapter;
import androidx.viewpager.widget.ViewPager;
import de.bps.asist.R; import de.bps.asist.R;
import de.bps.asist.gui.AbstractASiSTFragment; import de.bps.asist.gui.AbstractASiSTFragment;
import de.bps.asist.module.canteen.model.Canteen; import de.bps.asist.module.canteen.model.Canteen;
/** /**
* A simple {@link Fragment} subclass. * A simple {@link androidx.fragment.app.Fragment} subclass.
*/ */
public class MensaFragment extends AbstractASiSTFragment { public class MensaFragment extends AbstractASiSTFragment {
......
...@@ -4,7 +4,6 @@ import android.app.AlertDialog; ...@@ -4,7 +4,6 @@ import android.app.AlertDialog;
import android.graphics.ColorFilter; import android.graphics.ColorFilter;
import android.graphics.LightingColorFilter; import android.graphics.LightingColorFilter;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.view.View; import android.view.View;
import android.widget.ImageButton; import android.widget.ImageButton;
import android.widget.ListView; import android.widget.ListView;
...@@ -19,6 +18,7 @@ import java.util.List; ...@@ -19,6 +18,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.TreeMap; import java.util.TreeMap;
import androidx.appcompat.app.ActionBar;
import de.bps.asist.R; import de.bps.asist.R;
import de.bps.asist.core.manager.database.DatabaseManager; import de.bps.asist.core.manager.database.DatabaseManager;
import de.bps.asist.gui.list.CategoryListViewAdapter; import de.bps.asist.gui.list.CategoryListViewAdapter;
......
package de.bps.asist.module.canteen; package de.bps.asist.module.canteen;
import android.content.Context; import android.content.Context;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.widget.TextView; import android.widget.TextView;
...@@ -11,13 +8,16 @@ import android.widget.TextView; ...@@ -11,13 +8,16 @@ import android.widget.TextView;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;
import de.bps.asist.R; import de.bps.asist.R;
/** /**
* Adapter for TabLayout in MensaFragment * Adapter for TabLayout in MensaFragment
*/ */
public class ViewPagerAdapter extends FragmentPagerAdapter{ public class ViewPagerAdapter extends FragmentPagerAdapter {
private final List<Fragment> FragmentList = new ArrayList<>(); private final List<Fragment> FragmentList = new ArrayList<>();
private final List<String> TitelList = new ArrayList<>(); private final List<String> TitelList = new ArrayList<>();
......
...@@ -6,7 +6,6 @@ import android.graphics.Bitmap; ...@@ -6,7 +6,6 @@ import android.graphics.Bitmap;
import android.hardware.Camera; import android.hardware.Camera;
import android.location.Location; import android.location.Location;
import android.os.Bundle; import android.os.Bundle;
import android.support.annotation.Nullable;
import android.util.Log; import android.util.Log;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.MenuItem; import android.view.MenuItem;
......
...@@ -20,6 +20,7 @@ import java.util.HashMap; ...@@ -20,6 +20,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import androidx.fragment.app.Fragment;
import de.bps.asist.BuildConfig; import de.bps.asist.BuildConfig;
import de.bps.asist.R; import de.bps.asist.R;
import de.bps.asist.core.database.AbstractDatabaseObject; import de.bps.asist.core.database.AbstractDatabaseObject;
...@@ -84,7 +85,7 @@ public class FeedbackModule extends AbstractAsistModule { ...@@ -84,7 +85,7 @@ public class FeedbackModule extends AbstractAsistModule {
* @see de.bps.asist.module.AbstractAsistModule#getInitialFragment() * @see de.bps.asist.module.AbstractAsistModule#getInitialFragment()
*/ */
@Override @Override
public android.support.v4.app.Fragment getInitialFragment() { public Fragment getInitialFragment() {
return new FeedbackFragment(); return new FeedbackFragment();
} }
......
package de.bps.asist.module.feedback; package de.bps.asist.module.feedback;
import android.os.Bundle; import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import androidx.fragment.app.DialogFragment;
import de.bps.asist.R; import de.bps.asist.R;
/** /**
......
...@@ -2,10 +2,10 @@ package de.bps.asist.module.feeds; ...@@ -2,10 +2,10 @@ package de.bps.asist.module.feeds;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.support.v4.app.FragmentManager;
import android.view.Menu; import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
import androidx.fragment.app.FragmentManager;
import de.bps.asist.R; import de.bps.asist.R;
import de.bps.asist.module.AsistModuleActivity; import de.bps.asist.module.AsistModuleActivity;
import de.bps.asist.module.start.AsistStartActivity; import de.bps.asist.module.start.AsistStartActivity;
......
...@@ -11,6 +11,7 @@ import java.util.HashMap; ...@@ -11,6 +11,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import androidx.fragment.app.Fragment;
import de.bps.asist.R; import de.bps.asist.R;
import de.bps.asist.core.database.AbstractDatabaseObject; import de.bps.asist.core.database.AbstractDatabaseObject;
import de.bps.asist.core.manager.database.DatabaseManager; import de.bps.asist.core.manager.database.DatabaseManager;
...@@ -57,7 +58,7 @@ public class FeedModule extends AbstractAsistModule { ...@@ -57,7 +58,7 @@ public class FeedModule extends AbstractAsistModule {
} }