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
android_packages_apps_Updater
Commits
27e0e40c
Commit
27e0e40c
authored
Mar 23, 2021
by
Aayush Gupta
Browse files
updater: Enable auto deletion of updates by default
Signed-off-by:
Aayush Gupta
<
theimpulson@e.email
>
parent
2d1bb8b3
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/org/lineageos/updater/UpdatesActivity.java
View file @
27e0e40c
...
...
@@ -421,7 +421,7 @@ public class UpdatesActivity extends UpdatesListActivity {
SharedPreferences
prefs
=
PreferenceManager
.
getDefaultSharedPreferences
(
this
);
autoCheckInterval
.
setSelection
(
Utils
.
getUpdateCheckSetting
(
this
));
autoDelete
.
setChecked
(
prefs
.
getBoolean
(
Constants
.
PREF_AUTO_DELETE_UPDATES
,
fals
e
));
autoDelete
.
setChecked
(
prefs
.
getBoolean
(
Constants
.
PREF_AUTO_DELETE_UPDATES
,
tru
e
));
dataWarning
.
setChecked
(
prefs
.
getBoolean
(
Constants
.
PREF_MOBILE_DATA_WARNING
,
true
));
abPerfMode
.
setChecked
(
prefs
.
getBoolean
(
Constants
.
PREF_AB_PERF_MODE
,
false
));
...
...
src/org/lineageos/updater/controller/UpdaterService.java
View file @
27e0e40c
...
...
@@ -408,7 +408,7 @@ public class UpdaterService extends Service {
mNotificationManager
.
notify
(
NOTIFICATION_ID
,
mNotificationBuilder
.
build
());
SharedPreferences
pref
=
PreferenceManager
.
getDefaultSharedPreferences
(
this
);
boolean
deleteUpdate
=
pref
.
getBoolean
(
Constants
.
PREF_AUTO_DELETE_UPDATES
,
fals
e
);
boolean
deleteUpdate
=
pref
.
getBoolean
(
Constants
.
PREF_AUTO_DELETE_UPDATES
,
tru
e
);
if
(
deleteUpdate
)
{
mUpdaterController
.
deleteUpdate
(
update
.
getDownloadId
());
}
...
...
src/org/lineageos/updater/misc/Utils.java
View file @
27e0e40c
...
...
@@ -314,7 +314,7 @@ public class Utils {
long
prevTimestamp
=
preferences
.
getLong
(
Constants
.
PREF_INSTALL_OLD_TIMESTAMP
,
0
);
String
lastUpdatePath
=
preferences
.
getString
(
Constants
.
PREF_INSTALL_PACKAGE_PATH
,
null
);
boolean
reinstalling
=
preferences
.
getBoolean
(
Constants
.
PREF_INSTALL_AGAIN
,
false
);
boolean
deleteUpdates
=
preferences
.
getBoolean
(
Constants
.
PREF_AUTO_DELETE_UPDATES
,
fals
e
);
boolean
deleteUpdates
=
preferences
.
getBoolean
(
Constants
.
PREF_AUTO_DELETE_UPDATES
,
tru
e
);
if
((
buildTimestamp
!=
prevTimestamp
||
reinstalling
)
&&
deleteUpdates
&&
lastUpdatePath
!=
null
)
{
File
lastUpdate
=
new
File
(
lastUpdatePath
);
...
...
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