Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
com.ccwangluo.accelerator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sheteng
com.ccwangluo.accelerator
Commits
24ae1b8e
Commit
24ae1b8e
authored
Mar 02, 2019
by
Mygod
Committed by
Max Lv
Mar 08, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove divider
parent
92e5648a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
10 deletions
+6
-10
mobile/build.gradle
mobile/build.gradle
+2
-4
mobile/src/main/java/com/github/shadowsocks/AppManager.kt
mobile/src/main/java/com/github/shadowsocks/AppManager.kt
+4
-6
No files found.
mobile/build.gradle
View file @
24ae1b8e
...
...
@@ -57,19 +57,17 @@ androidExtensions {
dependencies
{
implementation
project
(
':core'
)
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.firebase:firebase-ads:17.1.3'
implementation
'com.google.guava:guava:27.0.1-android'
implementation
"com.takisoft.preferencex:preferencex-simplemenu:$preferencexVersion"
implementation
'com.twofortyfouram:android-plugin-api-for-locale:1.0.4'
implementation
'net.glxn.qrgen:android:2.0'
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"
androidTestImplementation
"androidx.test:runner:$androidTestVersion"
androidTestImplementation
"androidx.test.espresso:espresso-core:$androidEspressoVersion"
}
repositories
{
mavenCentral
()
...
...
mobile/src/main/java/com/github/shadowsocks/AppManager.kt
View file @
24ae1b8e
...
...
@@ -41,7 +41,6 @@ import androidx.appcompat.app.AppCompatActivity
import
androidx.appcompat.widget.Toolbar
import
androidx.core.content.getSystemService
import
androidx.recyclerview.widget.DefaultItemAnimator
import
androidx.recyclerview.widget.DividerItemDecoration
import
androidx.recyclerview.widget.LinearLayoutManager
import
androidx.recyclerview.widget.RecyclerView
import
com.github.shadowsocks.Core.app
...
...
@@ -72,9 +71,9 @@ class AppManager : AppCompatActivity() {
// Labels and icons can change on configuration (locale, etc.) changes, therefore they are not cached.
val
cachedApps
=
cachedApps
?:
pm
.
getInstalledPackages
(
PackageManager
.
GET_PERMISSIONS
)
.
filter
{
when
{
it
.
packageName
==
app
.
packageName
->
false
it
.
packageName
==
"android"
->
true
when
(
it
.
packageName
)
{
app
.
packageName
->
false
"android"
->
true
else
->
it
.
requestedPermissions
?.
contains
(
Manifest
.
permission
.
INTERNET
)
?:
false
}
}
...
...
@@ -90,7 +89,7 @@ class AppManager : AppCompatActivity() {
val
packageName
:
String
)
{
val
name
:
CharSequence
=
appInfo
.
loadLabel
(
pm
)
// cached for sorting
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
{
...
...
@@ -288,7 +287,6 @@ class AppManager : AppCompatActivity() {
loadingView
=
findViewById
(
R
.
id
.
loading
)
appListView
=
findViewById
(
R
.
id
.
list
)
appListView
.
layoutManager
=
LinearLayoutManager
(
this
,
RecyclerView
.
VERTICAL
,
false
)
appListView
.
addItemDecoration
(
DividerItemDecoration
(
this
,
RecyclerView
.
VERTICAL
))
appListView
.
itemAnimator
=
DefaultItemAnimator
()
appsAdapter
=
AppsAdapter
()
appListView
.
adapter
=
appsAdapter
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment