forked from recloudstream/cloudstream
possible crash fix for android 12 and minor UI changes
This commit is contained in:
parent
695c75af10
commit
f9ef71a389
2 changed files with 10 additions and 8 deletions
|
@ -19,7 +19,6 @@ import androidx.work.Data
|
|||
import androidx.work.ExistingWorkPolicy
|
||||
import androidx.work.OneTimeWorkRequest
|
||||
import androidx.work.WorkManager
|
||||
import com.bumptech.glide.Glide
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import com.lagradost.cloudstream3.MainActivity
|
||||
import com.lagradost.cloudstream3.R
|
||||
|
@ -215,7 +214,7 @@ object VideoDownloadManager {
|
|||
}
|
||||
}
|
||||
|
||||
suspend fun createNotification(
|
||||
private suspend fun createNotification(
|
||||
context: Context,
|
||||
source: String?,
|
||||
linkName: String?,
|
||||
|
@ -256,7 +255,11 @@ object VideoDownloadManager {
|
|||
data = source.toUri()
|
||||
flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK
|
||||
}
|
||||
val pendingIntent: PendingIntent = PendingIntent.getActivity(context, 0, intent, 0)
|
||||
val pendingIntent: PendingIntent = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_IMMUTABLE)
|
||||
} else {
|
||||
PendingIntent.getActivity(context, 0, intent, 0)
|
||||
}
|
||||
builder.setContentIntent(pendingIntent)
|
||||
}
|
||||
|
||||
|
|
|
@ -416,6 +416,7 @@
|
|||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_marginBottom="10dp"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -423,7 +424,6 @@
|
|||
<com.google.android.material.button.MaterialButton
|
||||
tools:visibility="visible"
|
||||
tools:text="Season 1"
|
||||
|
||||
android:nextFocusUp="@id/result_descript"
|
||||
android:nextFocusRight="@id/result_episode_select"
|
||||
android:nextFocusLeft="@id/result_episode_select"
|
||||
|
@ -432,9 +432,8 @@
|
|||
android:id="@+id/result_season_button"
|
||||
android:visibility="gone"
|
||||
android:layout_gravity="center_vertical"
|
||||
|
||||
style="@style/MultiSelectButton"
|
||||
android:layout_marginEnd="10dp">
|
||||
android:layout_marginStart="0dp"
|
||||
style="@style/MultiSelectButton">
|
||||
</com.google.android.material.button.MaterialButton>
|
||||
<com.google.android.material.button.MaterialButton
|
||||
tools:visibility="visible"
|
||||
|
@ -448,7 +447,7 @@
|
|||
android:id="@+id/result_episode_select"
|
||||
android:visibility="gone"
|
||||
android:layout_gravity="center_vertical"
|
||||
|
||||
android:layout_marginStart="0dp"
|
||||
style="@style/MultiSelectButton"
|
||||
>
|
||||
</com.google.android.material.button.MaterialButton>
|
||||
|
|
Loading…
Reference in a new issue