File tree Expand file tree Collapse file tree 5 files changed +10
-2
lines changed
app/src/main/java/xyz/ivaniskandar/shouko Expand file tree Collapse file tree 5 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ import androidx.compose.material3.MaterialTheme
2626import androidx.compose.material3.ModalBottomSheet
2727import androidx.compose.material3.Text
2828import androidx.compose.runtime.Composable
29+ import androidx.compose.runtime.Immutable
2930import androidx.compose.ui.Modifier
3031import androidx.compose.ui.graphics.ImageBitmap
3132import androidx.compose.ui.graphics.asImageBitmap
@@ -121,6 +122,7 @@ class LinkTargetChooserActivity : ComponentActivity() {
121122 }
122123}
123124
125+ @Immutable
124126private data class Target (
125127 val component : ComponentName ,
126128 val title : String ,
Original file line number Diff line number Diff line change 11package xyz.ivaniskandar.shouko.item
22
33import android.content.ComponentName
4+ import androidx.compose.runtime.Immutable
45import androidx.compose.ui.graphics.ImageBitmap
56
7+ @Immutable
68data class ApplicationItem (
79 val componentName : ComponentName ,
810 val label : String ,
Original file line number Diff line number Diff line change 11package xyz.ivaniskandar.shouko.item
22
3+ import androidx.compose.runtime.Immutable
34import androidx.compose.ui.graphics.ImageBitmap
45
6+ @Immutable
57data class LinkHandlerAppItem (
68 val packageName : String ,
79 val label : String ,
Original file line number Diff line number Diff line change 11package xyz.ivaniskandar.shouko.item
22
33import android.content.ComponentName
4+ import androidx.compose.runtime.Immutable
45import androidx.compose.ui.graphics.ImageBitmap
56
7+ @Immutable
68data class ShortcutCreatorItem (
79 val componentName : ComponentName ,
810 val label : String ,
Original file line number Diff line number Diff line change @@ -12,10 +12,10 @@ import androidx.annotation.RequiresApi
1212import androidx.core.net.toUri
1313
1414val Context .canReadSystemLogs
15- get() = checkSelfPermission(Manifest .permission.READ_LOGS ) == PackageManager .PERMISSION_GRANTED
15+ inline get() = checkSelfPermission(Manifest .permission.READ_LOGS ) == PackageManager .PERMISSION_GRANTED
1616
1717val Context .canWriteSecureSettings: Boolean
18- get() = checkSelfPermission(Manifest .permission.WRITE_SECURE_SETTINGS ) == PackageManager .PERMISSION_GRANTED
18+ inline get() = checkSelfPermission(Manifest .permission.WRITE_SECURE_SETTINGS ) == PackageManager .PERMISSION_GRANTED
1919
2020fun Context.isPackageInstalled (packageName : String ): Boolean = try {
2121 packageManager.getApplicationInfoCompat(packageName, 0 ).enabled
You can’t perform that action at this time.
0 commit comments