Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
e
os
App Lounge
Commits
332350cf
Commit
332350cf
authored
Feb 11, 2021
by
Mohit Mali
Browse files
Change variable name
parent
a60f8069
Pipeline
#101181
passed with stage
in 4 minutes and 25 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/foundation/e/apps/application/model/Installer.kt
View file @
332350cf
...
...
@@ -138,21 +138,21 @@ class Installer(private val packageName: String,
}
private
var
receiver
=
object
:
BroadcastReceiver
()
{
override
fun
onReceive
(
p0
:
Context
,
p1
:
Intent
)
{
if
(
p1
.
action
==
Intent
.
ACTION_PACKAGE_ADDED
&&
(
p1
.
data
.
encodedSchemeSpecificPart
==
packageName
))
{
override
fun
onReceive
(
context
:
Context
,
intent
:
Intent
)
{
if
(
intent
.
action
==
Intent
.
ACTION_PACKAGE_ADDED
&&
(
intent
.
data
.
encodedSchemeSpecificPart
==
packageName
))
{
Log
.
i
(
TAG
,
"Broadcast received"
)
var
path
=
apk
.
absolutePath
.
split
(
"Download"
)
//delete all APK file after install
deleteFileOrDir
(
path
[
0
]
+
"Download"
);
callback
.
onInstallationComplete
(
p0
)
callback
.
onInstallationComplete
(
context
)
if
(
packageName
==
Constants
.
MICROG_PACKAGE
)
{
if
(
PreferenceStorage
(
p0
).
getBoolean
(
p0
.
getString
(
R
.
string
.
prefs_microg_vrsn_installed
),
false
)){
PreferenceStorage
(
p0
).
save
(
p0
.
getString
(
R
.
string
.
prefs_microg_vrsn_installed
),
false
)
if
(
PreferenceStorage
(
context
).
getBoolean
(
context
.
getString
(
R
.
string
.
prefs_microg_vrsn_installed
),
false
)){
PreferenceStorage
(
context
).
save
(
context
.
getString
(
R
.
string
.
prefs_microg_vrsn_installed
),
false
)
}
else
{
PreferenceStorage
(
p0
).
save
(
p0
.
getString
(
R
.
string
.
prefs_microg_vrsn_installed
),
true
)
PreferenceStorage
(
context
).
save
(
context
.
getString
(
R
.
string
.
prefs_microg_vrsn_installed
),
true
)
}
}
...
...
Write
Preview
Supports
Markdown
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