Fixes app due to dependency upgrades
This commit is contained in:
parent
c7501312c1
commit
8da8afed49
8 changed files with 33 additions and 29 deletions
|
|
@ -1,6 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
|
||||
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
|
||||
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
|
||||
<uses-permission android:name="android.permission.VIBRATE" />
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
|
|
|
|||
|
|
@ -105,8 +105,8 @@ public class TimerService extends Service {
|
|||
Intent exerciseIntent = new Intent(this, ExerciseActivity.class);
|
||||
exerciseIntent.putExtra("SCHEDULED", scheduled);
|
||||
|
||||
PendingIntent startExercises = PendingIntent.getActivity(this, 0, exerciseIntent, FLAG_CANCEL_CURRENT);
|
||||
PendingIntent snoozeExercise = PendingIntent.getService(this, 0, snoozeIntent, FLAG_UPDATE_CURRENT);
|
||||
PendingIntent startExercises = PendingIntent.getActivity(this, 0, exerciseIntent, FLAG_CANCEL_CURRENT | PendingIntent.FLAG_IMMUTABLE);
|
||||
PendingIntent snoozeExercise = PendingIntent.getService(this, 0, snoozeIntent, FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE);
|
||||
|
||||
NotificationCompat.Builder builder = new NotificationCompat.Builder(this, "timer_done");
|
||||
builder.setContentTitle(getString(R.string.app_name))
|
||||
|
|
@ -122,11 +122,11 @@ public class TimerService extends Service {
|
|||
.setVibrate(new long[] { 0, 1000, 1000, 1000, 1000, 1000, 1000 })
|
||||
.setSound(Settings.System.DEFAULT_NOTIFICATION_URI)
|
||||
.setOnlyAlertOnce(false)
|
||||
.setDeleteIntent(PendingIntent.getBroadcast(getApplicationContext(), 0, new Intent(ACTION_NOTIFICATION_DELETED), FLAG_UPDATE_CURRENT));
|
||||
.setDeleteIntent(PendingIntent.getBroadcast(getApplicationContext(), 0, new Intent(ACTION_NOTIFICATION_DELETED), FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE));
|
||||
|
||||
SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
if(pref.getBoolean(PREF_EXERCISE_CONTINUOUS, false)) {
|
||||
builder.addAction(0, getString(R.string.dismiss_and_dont_repeat), PendingIntent.getBroadcast(getApplicationContext(), 0, new Intent(ACTION_NOTIFICATION_CANCELED), FLAG_UPDATE_CURRENT));
|
||||
builder.addAction(0, getString(R.string.dismiss_and_dont_repeat), PendingIntent.getBroadcast(getApplicationContext(), 0, new Intent(ACTION_NOTIFICATION_CANCELED), FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE));
|
||||
}
|
||||
|
||||
builder.addAction(R.drawable.ic_replay_black_48dp, getString(R.string.snooze), snoozeExercise);
|
||||
|
|
@ -327,7 +327,7 @@ public class TimerService extends Service {
|
|||
|
||||
Intent exerciseIntent = new Intent(this, ExerciseActivity.class);
|
||||
exerciseIntent.putExtra("SCHEDULED", scheduled);
|
||||
PendingIntent startExercises = PendingIntent.getActivity(this, 0, exerciseIntent, FLAG_CANCEL_CURRENT);
|
||||
PendingIntent startExercises = PendingIntent.getActivity(this, 0, exerciseIntent, FLAG_CANCEL_CURRENT | PendingIntent.FLAG_IMMUTABLE);
|
||||
|
||||
builder.setContentText(time);
|
||||
builder.setColor(ContextCompat.getColor(this, R.color.colorAccent));
|
||||
|
|
@ -341,21 +341,21 @@ public class TimerService extends Service {
|
|||
|
||||
Intent intent = new Intent(this, TimerActivity.class);
|
||||
intent.addFlags(FLAG_ACTIVITY_CLEAR_TOP);
|
||||
builder.setContentIntent(PendingIntent.getActivity(this, 0, intent, FLAG_UPDATE_CURRENT));
|
||||
builder.setContentIntent(PendingIntent.getActivity(this, 0, intent, FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE));
|
||||
|
||||
builder.addAction(R.drawable.ic_play_arrow_black, getString(R.string.start_break), startExercises);
|
||||
|
||||
Intent stopIntent = new Intent(this, TimerService.class);
|
||||
stopIntent.setAction(ACTION_STOP_TIMER);
|
||||
builder.addAction(R.drawable.ic_replay_black_48dp, getString(R.string.stop), PendingIntent.getService(this, 0, stopIntent, FLAG_UPDATE_CURRENT));
|
||||
builder.addAction(R.drawable.ic_replay_black_48dp, getString(R.string.stop), PendingIntent.getService(this, 0, stopIntent, FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE));
|
||||
|
||||
Intent pauseIntent = new Intent(this, TimerService.class);
|
||||
if(!isPaused()) {
|
||||
pauseIntent.setAction(ACTION_PAUSE_TIMER);
|
||||
builder.addAction(R.drawable.ic_pause_black_48dp, getString(R.string.pause), PendingIntent.getService(this, 0, pauseIntent, FLAG_UPDATE_CURRENT));
|
||||
builder.addAction(R.drawable.ic_pause_black_48dp, getString(R.string.pause), PendingIntent.getService(this, 0, pauseIntent, FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE));
|
||||
} else {
|
||||
pauseIntent.setAction(ACTION_RESUME_TIMER);
|
||||
builder.addAction(R.drawable.ic_play_arrow_black, getString(R.string.resume), PendingIntent.getService(this, 0, pauseIntent, FLAG_UPDATE_CURRENT));
|
||||
builder.addAction(R.drawable.ic_play_arrow_black, getString(R.string.resume), PendingIntent.getService(this, 0, pauseIntent, FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE));
|
||||
}
|
||||
|
||||
return builder.build();
|
||||
|
|
|
|||
|
|
@ -5,5 +5,5 @@
|
|||
android:viewportWidth="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01,-.25 1.97,-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0,-4.42,-3.58,-8,-8,-8zm0 14c-3.31 0,-6,-2.69,-6,-6 0,-1.01.25,-1.97.7,-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4,-4,-4,-4v3z" />
|
||||
android:pathData="M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01,-0.25 1.97,-0.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0,-4.42,-3.58,-8,-8,-8zm0 14c-3.31 0,-6,-2.69,-6,-6 0,-1.01 0.25,-1.97 0.7,-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4,-4,-4,-4v3z" />
|
||||
</vector>
|
||||
|
|
@ -5,5 +5,5 @@
|
|||
android:viewportWidth="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01,-.25 1.97,-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0,-4.42,-3.58,-8,-8,-8zm0 14c-3.31 0,-6,-2.69,-6,-6 0,-1.01.25,-1.97.7,-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4,-4,-4,-4v3z" />
|
||||
android:pathData="M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01,-0.25 1.97,-0.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0,-4.42,-3.58,-8,-8,-8zm0 14c-3.31 0,-6,-2.69,-6,-6 0,-1.01 0.25,-1.97 0.7,-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4,-4,-4,-4v3z" />
|
||||
</vector>
|
||||
|
|
@ -20,11 +20,11 @@
|
|||
android:hapticFeedbackEnabled="true"
|
||||
android:onClick="onClick"
|
||||
android:scaleType="fitXY"
|
||||
android:tint="@color/colorPrimary"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:srcCompat="@drawable/ic_play_arrow_black" />
|
||||
app:srcCompat="@drawable/ic_play_arrow_black"
|
||||
app:tint="@color/colorPrimary" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/button_next"
|
||||
|
|
@ -39,12 +39,12 @@
|
|||
android:hapticFeedbackEnabled="true"
|
||||
android:onClick="onClick"
|
||||
android:scaleType="fitXY"
|
||||
android:tint="@color/colorPrimary"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:srcCompat="@drawable/ic_skip_next_black_48dp"
|
||||
app:layout_constraintHorizontal_bias="0.6666" />
|
||||
app:layout_constraintHorizontal_bias="0.6666"
|
||||
app:tint="@color/colorPrimary" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/button_prev"
|
||||
|
|
@ -59,12 +59,12 @@
|
|||
android:hapticFeedbackEnabled="true"
|
||||
android:onClick="onClick"
|
||||
android:scaleType="fitXY"
|
||||
android:tint="@color/colorPrimary"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:srcCompat="@drawable/ic_skip_previous_black_48dp"
|
||||
app:layout_constraintHorizontal_bias="0.3333" />
|
||||
app:layout_constraintHorizontal_bias="0.3333"
|
||||
app:tint="@color/colorPrimary" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/button_repeat"
|
||||
|
|
@ -80,12 +80,12 @@
|
|||
android:hapticFeedbackEnabled="true"
|
||||
android:onClick="onClick"
|
||||
android:scaleType="fitXY"
|
||||
android:tint="@color/middlegrey"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.8333"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:srcCompat="@drawable/ic_repeat_black_48dp" />
|
||||
app:srcCompat="@drawable/ic_repeat_black_48dp"
|
||||
app:tint="@color/middlegrey" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/button_continuous"
|
||||
|
|
@ -101,12 +101,12 @@
|
|||
android:hapticFeedbackEnabled="true"
|
||||
android:onClick="onClick"
|
||||
android:scaleType="fitXY"
|
||||
android:tint="@color/middlegrey"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.1666"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:srcCompat="@drawable/ic_update_black_40dp" />
|
||||
app:srcCompat="@drawable/ic_update_black_40dp"
|
||||
app:tint="@color/middlegrey" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/exercise_layout"
|
||||
|
|
@ -199,7 +199,7 @@
|
|||
app:layout_constraintRight_toRightOf="@+id/exercise_image"
|
||||
app:layout_constraintTop_toTopOf="@+id/exercise_image"
|
||||
app:srcCompat="@drawable/ic_about"
|
||||
android:tint="@color/black"/>
|
||||
app:tint="@color/black" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
|
|
|||
|
|
@ -288,11 +288,11 @@
|
|||
android:background="?android:selectableItemBackgroundBorderless"
|
||||
android:hapticFeedbackEnabled="true"
|
||||
android:onClick="onClick"
|
||||
android:tint="@color/darkblue"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:srcCompat="@drawable/ic_replay_black_48dp" />
|
||||
app:srcCompat="@drawable/ic_replay_black_48dp"
|
||||
app:tint="@color/darkblue" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/button_playPause"
|
||||
|
|
@ -305,12 +305,12 @@
|
|||
android:hapticFeedbackEnabled="true"
|
||||
android:onClick="onClick"
|
||||
android:scaleType="fitXY"
|
||||
android:tint="@color/darkblue"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:srcCompat="@drawable/ic_play_arrow_black" />
|
||||
app:srcCompat="@drawable/ic_play_arrow_black"
|
||||
app:tint="@color/darkblue" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
app:layout_constraintRight_toRightOf="@+id/exercise_image"
|
||||
app:layout_constraintTop_toTopOf="@+id/exercise_image"
|
||||
app:srcCompat="@drawable/ic_about"
|
||||
android:tint="@color/black"/>
|
||||
app:tint="@color/black" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/exercise_checkbox"
|
||||
|
|
|
|||
|
|
@ -50,11 +50,11 @@
|
|||
android:layout_marginTop="8dp"
|
||||
android:background="?android:selectableItemBackgroundBorderless"
|
||||
android:hapticFeedbackEnabled="true"
|
||||
android:tint="@color/colorAccent"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_mode_edit_black_24dp" />
|
||||
app:srcCompat="@drawable/ic_mode_edit_black_24dp"
|
||||
app:tint="@color/colorAccent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/exercise_set_time_short"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue