renaming a function
This commit is contained in:
parent
d331d70131
commit
f751d90bea
3 changed files with 3 additions and 3 deletions
|
@ -63,7 +63,7 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:a26066d67d'
|
||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:fad9b2cdb0'
|
||||
|
||||
kapt "androidx.room:room-compiler:2.5.2"
|
||||
implementation "androidx.room:room-runtime:2.5.2"
|
||||
|
|
|
@ -584,7 +584,7 @@ class MainActivity : SimpleActivity(), FlingListener {
|
|||
menu.findItem(R.id.hide_icon).isVisible = gridItem.type == ITEM_TYPE_ICON && isOnAllAppsFragment
|
||||
menu.findItem(R.id.resize).isVisible = gridItem.type == ITEM_TYPE_WIDGET
|
||||
menu.findItem(R.id.app_info).isVisible = gridItem.type == ITEM_TYPE_ICON
|
||||
menu.findItem(R.id.uninstall).isVisible = gridItem.type == ITEM_TYPE_ICON && isUninstallable(gridItem.packageName)
|
||||
menu.findItem(R.id.uninstall).isVisible = gridItem.type == ITEM_TYPE_ICON && canAppBeUninstalled(gridItem.packageName)
|
||||
menu.findItem(R.id.remove).isVisible = !isOnAllAppsFragment
|
||||
setOnMenuItemClickListener { item ->
|
||||
resetFragmentTouches()
|
||||
|
|
|
@ -42,7 +42,7 @@ fun Activity.launchAppInfo(packageName: String) {
|
|||
}
|
||||
}
|
||||
|
||||
fun Activity.isUninstallable(packageName: String): Boolean {
|
||||
fun Activity.canAppBeUninstalled(packageName: String): Boolean {
|
||||
return try {
|
||||
(packageManager.getApplicationInfo(packageName, 0).flags and ApplicationInfo.FLAG_SYSTEM) == 0
|
||||
} catch (ignored: Exception) {
|
||||
|
|
Loading…
Reference in a new issue