1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-06-02 03:16:07 +02:00

Changed API version and everything else required.

(cherry picked from commit db1a282)
This commit is contained in:
TaaviE 2018-01-20 21:27:37 +01:00 committed by Daniele Gobbetti
parent 553f30f152
commit 18cec2087f
4 changed files with 19 additions and 17 deletions

View File

@ -16,10 +16,10 @@ android:
- tools
# The BuildTools version used by your project
- build-tools-26.0.2
- build-tools-27.0.3
# The SDK version used to compile your project
- android-25
- android-27
# Additional components
- extra-android-m2repository

View File

@ -17,13 +17,13 @@ android {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
compileSdkVersion 25
buildToolsVersion '26.0.2'
compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "nodomain.freeyourgadget.gadgetbridge"
minSdkVersion 19
targetSdkVersion 25
targetSdkVersion 27
// note: always bump BOTH versionCode and versionName!
versionName "0.24.5"
@ -64,13 +64,13 @@ dependencies {
testCompile "org.robolectric:robolectric:3.5.1"
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:25.4.0'
compile 'com.android.support:cardview-v7:25.4.0'
compile 'com.android.support:recyclerview-v7:25.4.0'
compile 'com.android.support:support-v4:25.4.0'
compile 'com.android.support:gridlayout-v7:25.4.0'
compile 'com.android.support:design:25.4.0'
compile 'com.android.support:palette-v7:25.4.0'
compile 'com.android.support:appcompat-v7:27.0.2'
compile 'com.android.support:cardview-v7:27.0.2'
compile 'com.android.support:recyclerview-v7:27.0.2'
compile 'com.android.support:support-v4:27.0.2'
compile 'com.android.support:gridlayout-v7:27.0.2'
compile 'com.android.support:design:27.0.2'
compile 'com.android.support:palette-v7:27.0.2'
compile('com.github.tony19:logback-android-classic:1.1.1-6') {
exclude group: 'com.google.android', module: 'android'
}

View File

@ -38,13 +38,13 @@ import android.os.PowerManager;
import android.os.RemoteException;
import android.service.notification.NotificationListenerService;
import android.service.notification.StatusBarNotification;
import android.support.v4.app.NotificationCompat;
import android.support.v4.app.RemoteInput;
import android.support.v4.content.LocalBroadcastManager;
import android.support.v4.media.MediaMetadataCompat;
import android.support.v4.media.session.MediaControllerCompat;
import android.support.v4.media.session.MediaSessionCompat;
import android.support.v4.media.session.PlaybackStateCompat;
import android.support.v7.app.NotificationCompat;
import android.support.v7.graphics.Palette;
import org.slf4j.Logger;
@ -67,6 +67,8 @@ import nodomain.freeyourgadget.gadgetbridge.util.LimitedQueue;
import nodomain.freeyourgadget.gadgetbridge.util.PebbleUtils;
import nodomain.freeyourgadget.gadgetbridge.util.Prefs;
import static android.support.v4.media.app.NotificationCompat.MediaStyle.getMediaSession;
public class NotificationListener extends NotificationListenerService {
private static final Logger LOG = LoggerFactory.getLogger(NotificationListener.class);
@ -203,7 +205,7 @@ public class NotificationListener extends NotificationListenerService {
String source = sbn.getPackageName().toLowerCase();
Notification notification = sbn.getNotification();
NotificationSpec notificationSpec = new NotificationSpec();
notificationSpec.id = (int) sbn.getPostTime(); //FIMXE: a truly unique id would be better
notificationSpec.id = (int) sbn.getPostTime(); //FIXME: a truly unique id would be better
// determinate Source App Name ("Label")
PackageManager pm = getPackageManager();
@ -434,7 +436,7 @@ public class NotificationListener extends NotificationListenerService {
private boolean shouldIgnoreNotification(Notification notification, String source) {
MediaSessionCompat.Token mediaSession = NotificationCompat.getMediaSession(notification);
MediaSessionCompat.Token mediaSession = getMediaSession(notification);
//try to handle media session notifications
if (mediaSession != null && handleMediaSessionNotification(mediaSession))
return true;

View File

@ -1,6 +1,6 @@
#Fri Mar 03 09:26:56 CET 2017
#Sat Jan 20 22:13:05 EET 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip