mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-30 08:18:00 +01:00
Apply project's code style to api version checks
This commit is contained in:
parent
0e1a1cfb90
commit
dd8cd61450
3 changed files with 9 additions and 3 deletions
|
@ -716,7 +716,9 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun createShortcut() {
|
private fun createShortcut() {
|
||||||
if (!isOreoPlus()) return
|
if (!isOreoPlus()) {
|
||||||
|
return
|
||||||
|
}
|
||||||
val manager = getSystemService(ShortcutManager::class.java)
|
val manager = getSystemService(ShortcutManager::class.java)
|
||||||
if (manager.isRequestPinShortcutSupported) {
|
if (manager.isRequestPinShortcutSupported) {
|
||||||
val medium = getCurrentMedium() ?: return
|
val medium = getCurrentMedium() ?: return
|
||||||
|
|
|
@ -549,7 +549,9 @@ class DirectoryAdapter(
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun createShortcut() {
|
private fun createShortcut() {
|
||||||
if (!isOreoPlus()) return
|
if (!isOreoPlus()) {
|
||||||
|
return
|
||||||
|
}
|
||||||
val manager = activity.getSystemService(ShortcutManager::class.java)
|
val manager = activity.getSystemService(ShortcutManager::class.java)
|
||||||
if (manager.isRequestPinShortcutSupported) {
|
if (manager.isRequestPinShortcutSupported) {
|
||||||
val dir = getFirstSelectedItem() ?: return
|
val dir = getFirstSelectedItem() ?: return
|
||||||
|
|
|
@ -386,7 +386,9 @@ class MediaAdapter(
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun createShortcut() {
|
private fun createShortcut() {
|
||||||
if (!isOreoPlus()) return
|
if (!isOreoPlus()) {
|
||||||
|
return
|
||||||
|
}
|
||||||
val manager = activity.getSystemService(ShortcutManager::class.java)
|
val manager = activity.getSystemService(ShortcutManager::class.java)
|
||||||
if (manager.isRequestPinShortcutSupported) {
|
if (manager.isRequestPinShortcutSupported) {
|
||||||
val path = getSelectedPaths().first()
|
val path = getSelectedPaths().first()
|
||||||
|
|
Loading…
Reference in a new issue