mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 14:37:59 +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() {
|
||||
if (!isOreoPlus()) return
|
||||
if (!isOreoPlus()) {
|
||||
return
|
||||
}
|
||||
val manager = getSystemService(ShortcutManager::class.java)
|
||||
if (manager.isRequestPinShortcutSupported) {
|
||||
val medium = getCurrentMedium() ?: return
|
||||
|
|
|
@ -549,7 +549,9 @@ class DirectoryAdapter(
|
|||
}
|
||||
|
||||
private fun createShortcut() {
|
||||
if (!isOreoPlus()) return
|
||||
if (!isOreoPlus()) {
|
||||
return
|
||||
}
|
||||
val manager = activity.getSystemService(ShortcutManager::class.java)
|
||||
if (manager.isRequestPinShortcutSupported) {
|
||||
val dir = getFirstSelectedItem() ?: return
|
||||
|
|
|
@ -386,7 +386,9 @@ class MediaAdapter(
|
|||
}
|
||||
|
||||
private fun createShortcut() {
|
||||
if (!isOreoPlus()) return
|
||||
if (!isOreoPlus()) {
|
||||
return
|
||||
}
|
||||
val manager = activity.getSystemService(ShortcutManager::class.java)
|
||||
if (manager.isRequestPinShortcutSupported) {
|
||||
val path = getSelectedPaths().first()
|
||||
|
|
Loading…
Reference in a new issue