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 @@
<action android:name="android.intent.action.DATE_CHANGED" />
</intent-filter>
</receiver>
<uses-library android:name="com.google.android.maps" />
<activity
android:name=".module.start.AsistStartActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
......
......@@ -30,7 +30,7 @@ android {
androidTest.setRoot('tests')
}
compileSdkVersion 'Google Inc.:Google APIs:24'
compileSdkVersion 28
buildToolsVersion '25.0.3'
defaultConfig {
minSdkVersion 14
......@@ -134,11 +134,6 @@ dependencies {
compile 'com.fasterxml.jackson.core:jackson-databind:2.9.4'
//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
//compile 'com.google.android.gms:play-services:11.8.0'
......@@ -153,7 +148,14 @@ dependencies {
compile 'org.greenrobot:eventbus:3.0.0'
compile fileTree(include: ['*.jar'], dir: 'libs')
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 {
......
package de.bps.asist;
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 final Activity mActivity;
private final String mTag;
......@@ -25,7 +25,7 @@ public class ASiSTTabListener<T extends Fragment> implements TabListener {
/* 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
if (mFragment == null) {
// If not, instantiate and add it to the activity
......@@ -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) {
// Detach the fragment, because another one is being attached
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.
}
}
......@@ -17,7 +17,6 @@ package de.bps.asist;
import android.app.Activity;
import android.graphics.Color;
import android.support.v7.app.ActionBarActivity;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.style.ForegroundColorSpan;
......@@ -26,10 +25,11 @@ import android.view.MenuItem;
import java.io.Serializable;
import androidx.appcompat.app.AppCompatActivity;
import de.bps.asist.gui.list.AbstractGenericListCallback;
public abstract class AbstractAsistActivity extends ActionBarActivity {
public abstract class AbstractAsistActivity extends AppCompatActivity {
@Override
public boolean onPrepareOptionsMenu(Menu menu) {
......
......@@ -5,10 +5,10 @@ import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.support.v4.app.NotificationCompat;
import java.util.List;
import androidx.core.app.NotificationCompat;
import de.bps.asist.R;
import de.bps.asist.context.ASiSTConstants;
import de.bps.asist.core.manager.ASiSTModuleManager;
......
......@@ -3,10 +3,9 @@ package de.bps.asist.core.receiver;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.TaskStackBuilder;
import android.content.Context;
import android.content.Intent;
import android.support.v4.app.NotificationCompat;
import android.support.v4.app.TaskStackBuilder;
import android.util.JsonReader;
import android.util.Log;
......@@ -20,6 +19,7 @@ import java.io.Serializable;
import java.util.List;
import java.util.Map;
import androidx.core.app.NotificationCompat;
import de.bps.asist.R;
import de.bps.asist.core.manager.database.DatabaseManager;
import de.bps.asist.core.manager.environment.EnvironmentManager;
......
......@@ -3,12 +3,12 @@ package de.bps.asist.gui;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.MenuItem;
import android.view.View;
import java.io.Serializable;
import androidx.fragment.app.Fragment;
import de.bps.asist.gui.list.AbstractGenericListCallback;
public abstract class AbstractASiSTFragment extends Fragment {
......
......@@ -4,7 +4,6 @@
package de.bps.asist.gui.code;
import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.View;
......@@ -13,6 +12,7 @@ import android.widget.EditText;
import java.util.ArrayList;
import java.util.List;
import androidx.appcompat.widget.Toolbar;
import de.bps.asist.R;
import de.bps.asist.module.AsistModuleActivity;
......
......@@ -5,8 +5,8 @@ import android.app.AlertDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import androidx.fragment.app.DialogFragment;
import de.bps.asist.R;
/**
......
......@@ -6,6 +6,7 @@ import android.os.Parcelable;
import java.io.Serializable;
import java.util.List;
import androidx.fragment.app.Fragment;
import de.bps.asist.core.database.AbstractDatabaseObject;
import de.bps.asist.module.settings.model.SettingsConfig;
import de.bps.asist.module.start.tree.StartTreeConfig;
......@@ -38,7 +39,7 @@ public abstract class AbstractAsistModule {
return "" + getName(); // FIXME
}
public abstract android.support.v4.app.Fragment getInitialFragment();
public abstract Fragment getInitialFragment();
public void updateData(final Context context) {
// do nothing by default
......
......@@ -2,10 +2,10 @@ package de.bps.asist.module.canteen;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.FragmentManager;
import android.view.Menu;
import android.view.MenuItem;
import androidx.fragment.app.FragmentManager;
import de.bps.asist.R;
import de.bps.asist.module.AsistModuleActivity;
import de.bps.asist.module.start.AsistStartActivity;
......
......@@ -5,6 +5,7 @@ import android.content.Context;
import java.util.ArrayList;
import java.util.List;
import androidx.fragment.app.Fragment;
import de.bps.asist.R;
import de.bps.asist.core.ASiSTApplication;
import de.bps.asist.core.database.AbstractDatabaseObject;
......@@ -54,7 +55,7 @@ public class CanteenModule extends AbstractAsistModule {
}
@Override
public android.support.v4.app.Fragment getInitialFragment() {
public Fragment getInitialFragment() {
return new MensaFragment();
}
......
......@@ -5,12 +5,12 @@ import android.os.Bundle;
import android.preference.ListPreference;
import android.preference.PreferenceFragment;
import android.preference.PreferenceManager;
import android.support.annotation.Nullable;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import androidx.annotation.Nullable;
import de.bps.asist.R;
import de.bps.asist.module.canteen.model.Canteen;
......
......@@ -3,7 +3,6 @@ package de.bps.asist.module.canteen;
import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import android.support.v7.widget.RecyclerView;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
......
......@@ -5,26 +5,27 @@ import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
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.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Toast;
import com.google.android.material.tabs.TabLayout;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import androidx.fragment.app.FragmentPagerAdapter;
import androidx.viewpager.widget.ViewPager;
import de.bps.asist.R;
import de.bps.asist.gui.AbstractASiSTFragment;
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 {
......
......@@ -4,7 +4,6 @@ import android.app.AlertDialog;
import android.graphics.ColorFilter;
import android.graphics.LightingColorFilter;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.view.View;
import android.widget.ImageButton;
import android.widget.ListView;
......@@ -19,6 +18,7 @@ import java.util.List;
import java.util.Map;
import java.util.TreeMap;
import androidx.appcompat.app.ActionBar;
import de.bps.asist.R;
import de.bps.asist.core.manager.database.DatabaseManager;
import de.bps.asist.gui.list.CategoryListViewAdapter;
......
package de.bps.asist.module.canteen;
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.View;
import android.widget.TextView;
......@@ -11,13 +8,16 @@ import android.widget.TextView;
import java.util.ArrayList;
import java.util.List;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;
import de.bps.asist.R;
/**
* 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<String> TitelList = new ArrayList<>();
......
......@@ -6,7 +6,6 @@ import android.graphics.Bitmap;
import android.hardware.Camera;
import android.location.Location;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.MenuItem;
......
......@@ -20,6 +20,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import androidx.fragment.app.Fragment;
import de.bps.asist.BuildConfig;
import de.bps.asist.R;
import de.bps.asist.core.database.AbstractDatabaseObject;
......@@ -84,7 +85,7 @@ public class FeedbackModule extends AbstractAsistModule {
* @see de.bps.asist.module.AbstractAsistModule#getInitialFragment()
*/
@Override
public android.support.v4.app.Fragment getInitialFragment() {
public Fragment getInitialFragment() {
return new FeedbackFragment();
}
......
package de.bps.asist.module.feedback;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.fragment.app.DialogFragment;
import de.bps.asist.R;
/**
......
......@@ -2,10 +2,10 @@ package de.bps.asist.module.feeds;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.FragmentManager;
import android.view.Menu;
import android.view.MenuItem;
import androidx.fragment.app.FragmentManager;
import de.bps.asist.R;
import de.bps.asist.module.AsistModuleActivity;
import de.bps.asist.module.start.AsistStartActivity;
......
......@@ -11,6 +11,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import androidx.fragment.app.Fragment;
import de.bps.asist.R;
import de.bps.asist.core.database.AbstractDatabaseObject;
import de.bps.asist.core.manager.database.DatabaseManager;
......@@ -57,7 +58,7 @@ public class FeedModule extends AbstractAsistModule {
}
@Override
public android.support.v4.app.Fragment getInitialFragment() {
public Fragment getInitialFragment() {
return new FeedFragment();
}
......
......@@ -3,13 +3,13 @@ package de.bps.asist.module.feeds;
import android.app.AlertDialog;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.widget.SwipeRefreshLayout;
import android.widget.ListView;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import de.bps.asist.R;
import de.bps.asist.core.manager.database.DatabaseManager;
import de.bps.asist.gui.detail.DetailsActivity;
......
package de.bps.asist.module.impressum;
import android.support.v4.app.Fragment;
import java.util.List;
import androidx.fragment.app.Fragment;
import de.bps.asist.R;
import de.bps.asist.core.database.AbstractDatabaseObject;
import de.bps.asist.module.AbstractAsistModule;
......@@ -25,7 +24,7 @@ public class ImpressumModule extends AbstractAsistModule {
@Override
public android.support.v4.app.Fragment getInitialFragment() {
public Fragment getInitialFragment() {
return new ImpressumFragment();
}
......
package de.bps.asist.module.library;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import androidx.fragment.app.Fragment;
import de.bps.asist.R;
import de.bps.asist.core.model.IListItem;
import de.bps.asist.module.AsistModuleActivity;
......
......@@ -6,6 +6,7 @@ package de.bps.asist.module.library;
import java.util.ArrayList;
import java.util.List;
import androidx.fragment.app.Fragment;
import de.bps.asist.R;
import de.bps.asist.core.database.AbstractDatabaseObject;
import de.bps.asist.module.AbstractAsistModule;
......@@ -30,7 +31,7 @@ public class LibraryModule extends AbstractAsistModule {
}
@Override
public android.support.v4.app.Fragment getInitialFragment() {
public Fragment getInitialFragment() {
return new LibraryFragment();
}
......
......@@ -2,10 +2,10 @@ package de.bps.asist.module.lostandfound;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.FragmentManager;
import android.view.Menu;
import android.view.MenuItem;
import androidx.fragment.app.FragmentManager;
import de.bps.asist.R;
import de.bps.asist.module.AsistModuleActivity;
import de.bps.asist.module.start.AsistStartActivity;
......
......@@ -5,7 +5,6 @@ package de.bps.asist.module.lostandfound;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.widget.SwipeRefreshLayout;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
......@@ -20,6 +19,7 @@ import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import de.bps.asist.R;
import de.bps.asist.core.manager.database.DatabaseManager;
import de.bps.asist.gui.AbstractASiSTFragment;
......
......@@ -14,6 +14,7 @@ import java.util.Map;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import androidx.fragment.app.Fragment;
import de.bps.asist.R;
import de.bps.asist.core.database.AbstractDatabaseObject;
import de.bps.asist.core.manager.database.DatabaseManager;
......@@ -58,7 +59,7 @@ public class LostAndFoundModule extends AbstractAsistModule {
* @see de.bps.asist.module.AbstractAsistModule#getInitialFragment()
*/
@Override
public android.support.v4.app.Fragment getInitialFragment() {
public Fragment getInitialFragment() {
return new LostAndFoundFragment();
}
......
......@@ -2,7 +2,6 @@ package de.bps.asist.module.lostandfound;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.widget.SwipeRefreshLayout;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.ListView;
......@@ -10,6 +9,7 @@ import android.widget.ListView;
import java.util.Collections;
import java.util.List;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import de.bps.asist.R;
import de.bps.asist.gui.list.AbstractGenericListCallback;
import de.bps.asist.gui.list.OnRefreshFinishedListener;
......
......@@ -12,6 +12,7 @@ import java.util.List;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import androidx.fragment.app.Fragment;
import de.bps.asist.BuildConfig;
import de.bps.asist.R;
import de.bps.asist.core.database.AbstractDatabaseObject;
......@@ -48,7 +49,7 @@ public class OccupancyModule extends AbstractAsistModule {
}
@Override
public android.support.v4.app.Fragment getInitialFragment() {
public Fragment getInitialFragment() {
return new OccupancyFragment();
}
......
......@@ -9,6 +9,7 @@ import java.util.List;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import androidx.fragment.app.Fragment;
import de.bps.asist.BuildConfig;
import de.bps.asist.R;
import de.bps.asist.core.database.AbstractDatabaseObject;
......@@ -70,7 +71,7 @@ public class OfficeHoursModule extends AbstractAsistModule {
* @see de.bps.asist.module.AbstractAsistModule#getInitialFragment()
*/
@Override
public android.support.v4.app.Fragment getInitialFragment() {
public Fragment getInitialFragment() {
return new OfficeHoursFragment();
}
......
......@@ -5,12 +5,12 @@ import android.content.Intent;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.os.Bundle;
import android.support.v4.app.FragmentManager;
import android.view.Menu;
import android.view.MenuItem;
import java.util.Locale;
import androidx.fragment.app.FragmentManager;
import de.bps.asist.R;
import de.bps.asist.core.ASiSTApplication;
import de.bps.asist.module.AsistModuleActivity;
......
......@@ -16,8 +16,6 @@ import android.os.Environment;
import android.os.Handler;
import android.os.Message;
import android.provider.MediaStore;
import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
import android.util.Log;
import android.view.KeyEvent;
import android.view.LayoutInflater;
......
......@@ -8,6 +8,7 @@ import android.content.SharedPreferences;
import java.util.List;
import androidx.fragment.app.Fragment;
import de.bps.asist.R;
import de.bps.asist.core.database.AbstractDatabaseObject;
import de.bps.asist.module.AbstractAsistModule;
......@@ -44,7 +45,7 @@ public class OlatModule extends AbstractAsistModule {
* @see de.bps.asist.module.AbstractAsistModule#getInitialFragment()
*/
@Override
public android.support.v4.app.Fragment getInitialFragment() {
public Fragment getInitialFragment() {
return new OlatFragment();
}
......
......@@ -2,9 +2,9 @@ package de.bps.asist.module.poi;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.FragmentManager;
import android.view.MenuItem;
import androidx.fragment.app.FragmentManager;
import de.bps.asist.R;
import de.bps.asist.module.AsistModuleActivity;
import de.bps.asist.module.poi.model.PoiItem;
......
......@@ -9,13 +9,10 @@ import android.app.Dialog;
import android.content.DialogInterface;
import android.content.IntentSender;
import android.content.pm.PackageManager;
import android.location.Location;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Looper;
import android.support.annotation.NonNull;
import android.support.v4.app.ActivityCompat;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.content.ContextCompat;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
......@@ -50,6 +47,10 @@ import com.j256.ormlite.stmt.query.In;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import androidx.annotation.NonNull;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import androidx.fragment.app.FragmentManager;
import de.bps.asist.R;
import de.bps.asist.core.model.common.Position;
import de.bps.asist.gui.AbstractASiSTFragment;
......
......@@ -14,6 +14,7 @@ import java.util.List;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;