Commit 24ae1b8e authored by Mygod's avatar Mygod Committed by Max Lv

Remove divider

parent 92e5648a
...@@ -57,19 +57,17 @@ androidExtensions { ...@@ -57,19 +57,17 @@ androidExtensions {
dependencies { dependencies {
implementation project(':core') implementation project(':core')
implementation "androidx.browser:browser:1.0.0" implementation "androidx.browser:browser:1.0.0"
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.gms:play-services-vision:17.0.2' implementation 'com.google.android.gms:play-services-vision:17.0.2'
implementation 'com.google.firebase:firebase-ads:17.1.3' implementation 'com.google.firebase:firebase-ads:17.1.3'
implementation 'com.google.guava:guava:27.0.1-android'
implementation "com.takisoft.preferencex:preferencex-simplemenu:$preferencexVersion" implementation "com.takisoft.preferencex:preferencex-simplemenu:$preferencexVersion"
implementation 'com.twofortyfouram:android-plugin-api-for-locale:1.0.4' implementation 'com.twofortyfouram:android-plugin-api-for-locale:1.0.4'
implementation 'net.glxn.qrgen:android:2.0' implementation 'net.glxn.qrgen:android:2.0'
implementation 'xyz.belvi.mobilevision:barcodescanner:2.0.3' implementation 'xyz.belvi.mobilevision:barcodescanner:2.0.3'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.guava:guava:27.0.1-android'
testImplementation "junit:junit:$junitVersion" testImplementation "junit:junit:$junitVersion"
androidTestImplementation "androidx.test:runner:$androidTestVersion" androidTestImplementation "androidx.test:runner:$androidTestVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$androidEspressoVersion" androidTestImplementation "androidx.test.espresso:espresso-core:$androidEspressoVersion"
} }
repositories { repositories {
mavenCentral() mavenCentral()
......
...@@ -41,7 +41,6 @@ import androidx.appcompat.app.AppCompatActivity ...@@ -41,7 +41,6 @@ import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.widget.Toolbar import androidx.appcompat.widget.Toolbar
import androidx.core.content.getSystemService import androidx.core.content.getSystemService
import androidx.recyclerview.widget.DefaultItemAnimator import androidx.recyclerview.widget.DefaultItemAnimator
import androidx.recyclerview.widget.DividerItemDecoration
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import com.github.shadowsocks.Core.app import com.github.shadowsocks.Core.app
...@@ -72,9 +71,9 @@ class AppManager : AppCompatActivity() { ...@@ -72,9 +71,9 @@ class AppManager : AppCompatActivity() {
// Labels and icons can change on configuration (locale, etc.) changes, therefore they are not cached. // Labels and icons can change on configuration (locale, etc.) changes, therefore they are not cached.
val cachedApps = cachedApps ?: pm.getInstalledPackages(PackageManager.GET_PERMISSIONS) val cachedApps = cachedApps ?: pm.getInstalledPackages(PackageManager.GET_PERMISSIONS)
.filter { .filter {
when { when (it.packageName) {
it.packageName == app.packageName -> false app.packageName -> false
it.packageName == "android" -> true "android" -> true
else -> it.requestedPermissions?.contains(Manifest.permission.INTERNET) ?: false else -> it.requestedPermissions?.contains(Manifest.permission.INTERNET) ?: false
} }
} }
...@@ -90,7 +89,7 @@ class AppManager : AppCompatActivity() { ...@@ -90,7 +89,7 @@ class AppManager : AppCompatActivity() {
val packageName: String) { val packageName: String) {
val name: CharSequence = appInfo.loadLabel(pm) // cached for sorting val name: CharSequence = appInfo.loadLabel(pm) // cached for sorting
val icon: Drawable get() = appInfo.loadIcon(pm) val icon: Drawable get() = appInfo.loadIcon(pm)
val uid = appInfo.uid val uid get() = appInfo.uid
} }
private inner class AppViewHolder(view: View) : RecyclerView.ViewHolder(view), View.OnClickListener { private inner class AppViewHolder(view: View) : RecyclerView.ViewHolder(view), View.OnClickListener {
...@@ -288,7 +287,6 @@ class AppManager : AppCompatActivity() { ...@@ -288,7 +287,6 @@ class AppManager : AppCompatActivity() {
loadingView = findViewById(R.id.loading) loadingView = findViewById(R.id.loading)
appListView = findViewById(R.id.list) appListView = findViewById(R.id.list)
appListView.layoutManager = LinearLayoutManager(this, RecyclerView.VERTICAL, false) appListView.layoutManager = LinearLayoutManager(this, RecyclerView.VERTICAL, false)
appListView.addItemDecoration(DividerItemDecoration(this, RecyclerView.VERTICAL))
appListView.itemAnimator = DefaultItemAnimator() appListView.itemAnimator = DefaultItemAnimator()
appsAdapter = AppsAdapter() appsAdapter = AppsAdapter()
appListView.adapter = appsAdapter appListView.adapter = appsAdapter
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment