Commit Graph

308 Commits

Author SHA1 Message Date
LineageOS Infra
0e9f297968 Automatic translation import
Change-Id: Id72a218d8a991e8f2669a8090e7b70bc4f7c292e
2024-01-01 17:11:55 +00:00
LineageOS Infra
5b0f26e70c Automatic translation import
Change-Id: Ia954613a9079ff50c000a1859e2805714e026118
2023-12-15 20:35:36 +00:00
LineageOS Infra
1052ca58a2 Automatic translation import
Change-Id: I25cc3145715ebfe4f47a2d603a30b7cc10e2dbee
2023-10-15 18:22:12 +00:00
LineageOS Infra
f35070f528 Automatic translation import
Change-Id: I38958ec6064db828d4ce4cc1c968d91399ba0d4e
2023-09-15 16:38:17 +00:00
LineageOS Infra
7679b15c50 Automatic translation import
Change-Id: I2cb3993fc11c24379e7e3e15cd3afb03ab7520a8
2023-07-15 16:40:32 +00:00
LineageOS Infra
b29b3b73aa Automatic translation import
Change-Id: I8382ade5509c984c4fd04104bbc73b4927dc4c23
2023-07-01 17:31:24 +00:00
LineageOS Infra
2c156bbddc Automatic translation import
Change-Id: I733df5d244e17b176811023ca0c37f70d42e1ac1
2023-06-15 12:06:58 +00:00
LineageOS Infra
f32a7e2996 Automatic translation import
Change-Id: I49a5f12f4543123b461d8e5830489f06c05883e7
2023-06-01 10:19:52 +00:00
LineageOS Infra
84ea99a7e8 Automatic translation import
Change-Id: Ia026f9cd3b6529e4876646250e0c9097bc4451d0
2023-05-15 13:15:55 +00:00
LineageOS Infra
f73716d370 Automatic translation import
Change-Id: I8b8560517a639776b26d4799f9e88b01a6be2a0e
2023-04-24 14:26:20 +00:00
Tommaso Fonda
b9527f6b6f Updater: Show the correct percentage during package installation
Fixes the mismatch between the progress bar's status and the percentage
displayed next to it.

Fixes: https://gitlab.com/LineageOS/issues/android/-/issues/4830
Change-Id: I5c243acda4f06561cbd5b3a73060205b32d8d41d
2023-04-13 17:38:33 +02:00
Aaron Kling
a44034fb5c Use -television instead of -large-notouch for atv resources
Mobile builds on devices with no touch panel are also getting these
settings applied, which is not intended.

Change-Id: I02fac65dc7042c04259d6f65a957185aac32a252
2022-08-02 20:50:20 -05:00
Timi Rautamäki
131e969d05 fixup! Updater: Move progress next to progressbar
Fix crash on ATV devices by applying same layout changes to
layout-large-notouch.

Change-Id: Id6eabcf8b1960106eb63bd15bcf97f9b4cf0bbc8
2022-03-06 13:31:11 +00:00
Michael Bestas
f7f4e1a0fc Automatic translation import
Change-Id: I4e61ee0e45bb2d878e219c3a1e66202121e0692e
2022-02-13 21:58:37 +01:00
Michael W
25104aef77 Updater: Don't show thousands of days
* When pausing and resuming, the ETA calculation is off by a lot
  due to the time diff since the last calculation resulting in a
  big delta and therefore a very low speed
* By fixing this, we also need to set the last byte count to the total
  byte count there, otherwise the downloaded bytes since last calculation
  will be larger than in reality, resulting in too fast speeds calculated

Change-Id: Ica1053cc297ff59221ea2bc0014f20973a080c88
2022-02-11 18:24:41 +01:00
Michael W
99e4d424a5 Updater: Move progress next to progressbar
* The progress text can get very long, resulting in jumping marquee text
* In order to reduce the length, move the percentage out of the text
  and next to the progressbar
* The behavior can be observed e.g. on pro1 in german, where the button
  is also wider due to the german text

Change-Id: I0276182efed757c0929b31434edad9be548b841c
2022-02-11 18:16:02 +01:00
Alexander Martinz
c4e34d5b07 Updater: layout: activity_updates: add spacing between build info and last checked entry
Change-Id: Ie85fecb30ba12b056569049aac674dc1b8653942
Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
2022-02-10 15:52:20 +01:00
Alexander Martinz
66fc964521 Updater: Allow starting activities from background
-----

05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: FATAL EXCEPTION: main
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: Process: com.shiftos.updater, PID: 19707
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=com.shiftos.updater/org.lineageos.updater.controller.UpdaterService }: app is in background uid UidRecord{1463ce2 u0a63 TPSL bg:+47m50s26ms idle change:idle procs:1 seq(0,0,0)}
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: 	at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1616)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: 	at android.app.ContextImpl.startService(ContextImpl.java:1571)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: 	at android.content.ContextWrapper.startService(ContextWrapper.java:669)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: 	at org.lineageos.updater.UpdatesActivity.onStart(UpdatesActivity.java:181)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: 	at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1433)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: 	at android.app.Activity.performStart(Activity.java:7847)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: 	at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3295)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: 	at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:221)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: 	at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: 	at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: 	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2017)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:107)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:214)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7397)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491)
05-06 17:21:58.988 10063 19707 19707 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)

-----

Change-Id: Ibc2d471b028c1d4e824b3ede4bbc336d76801f88
Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
2022-02-10 15:52:11 +01:00
Joey
3c7a7cd432 Updater: use consistent format for file sizes
Change-Id: I9a17cf2df69e2e39e90de169ca108511c71d4e31
Signed-off-by: Joey <joey@lineageos.org>
2022-02-10 15:50:56 +01:00
Michael W
1d3758d5b5 Updater: Show toast when starting export
* It's not immediately clear that an export is started since the
  notification isn't intrusive
* Show a toast - that will be clear enough

Change-Id: I78d78b23884df3ddb37bc486c1d6012f899c888d
2022-02-10 15:45:29 +01:00
Michael W
12a22e43e2 Updater: Switch to destination selector
* Let the user decide where to store the file
* That way it's not located in /storage/emulated/0/Android/data/...
  ...org.lineageos.updater/files/LineageOS updates/*.zip
  -> The user knows where the file is stored
  -> We don't have to care about WRITE_EXTERNAL_STORAGE etc
* Remove the cancel button - after closing the file stream we loose
  permission to access it, therefore can't delete it anymore
  -> Let the user handle deletion manually
* Since we don't use WRITE_EXTERNAL_STORAGE anymore, remove it from
  Manifest and also remove PermissionUtils (+calls) - we can now export
  immediately.
  -> This also solves the
  "TODO: start exporting once the permission has been granted"

Change-Id: I50afa403f2803569aa9def807ea20ee72c582284
2022-02-10 15:45:29 +01:00
Michael W
2623730bef Updater: No need to install every update
* Apparently users are not aware that they don't have to install every
  update we ever released (weeklies) after they have skipped some due
  to various reasons
* Since we are providing full installation packages, remind the user that
  it's ok to only ever choose the newest one

Change-Id: I70f9acd70344f36aaae7e45b848f6bcb7a8b3c0f
2022-02-10 15:45:29 +01:00
Michael W
f2ac903e3e Updater: We don't do upgrades
* We are actually updating, but especially between translations and
  non native speakers, drawing a semantical difference is more harmful
  than helpful
* Use "install" instead

Change-Id: Icdf1ce45d6cd35334b5c8ac13af3ec6741d837b6
2022-02-10 15:45:29 +01:00
Michael Bestas
8f332103fe Updater: Add exported flags in manifest
Targeting S+ (version 31 and above) requires that an explicit value
for android:exported be defined when intent filters are present

Change-Id: I2ce2b2cd1dcd69e343ae8577587483b19d825fdc
2022-02-10 15:45:28 +01:00
Michael Bestas
e0bcaec5b6 Updater: Add FLAG_IMMUTABLE flag to PendingIntent
Fixes:
Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE
or FLAG_MUTABLE be specified when creating a PendingIntent.

Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some
functionality depends on the PendingIntent being mutable,
e.g. if it needs to be used with inline replies or bubbles.

Change-Id: I63b25512d3bf6e0d3b0cc95d91295f4065175848
2022-02-10 15:45:17 +01:00
Michael W
46c06ad958 Updater: The great cleanup
* Make final where possible
* Remove unused casts, imports, methods, enums and constructors
* Add null checks

Change-Id: Idd1a16426dd1928e2ed9922f5a35ba32ce4f808b
2022-02-10 15:44:46 +01:00
Michael W
bdb6a3ff66 Updater: update dependencies
Change-Id: I0686b28e7f6754c1b11b219b9036ea372032070b
2022-02-10 15:40:01 +01:00
Michael W
16cc9dd259 Updater: Replace lintOptions with lint
* As per AS recommendation

Change-Id: Id3668f21f356f13dcce4576c528b8af06d77a95f
2022-02-10 15:40:01 +01:00
Michael W
541e70f789 Updater: Compile with and target Sdk version 30
Change-Id: Ie479a27173e9941ab3152eb3ce6078c794b5aa7f
2022-02-10 15:40:01 +01:00
Michael W
45bb652a10 Updater: Change gradle from 3.5 to 7.1
Change-Id: Ia70512a77cdb30c6315863dcb65233d38cb5c9b9
2022-02-10 15:39:58 +01:00
Michael W
69b461369c Updater: Replace jcenter with mavenCentral
Change-Id: I0b6ae6553f106eef4cb7d331e3b089b74a66abcb
2022-01-31 16:05:42 +01:00
Luca Stefani
28dd829142 fixup! Updater: add a 3-dot menu for update item
Change-Id: I10fe453c5f14d1a0ca49b734df517047cb7ee802
2021-11-01 22:02:08 +02:00
Michael W
1500f2f68e Automatic translation import
Change-Id: Ibbfc884c22676ca287f8bda05e35b2b5b28d980c
2021-10-26 20:49:28 +02:00
Timi Rautamäki
affcb29065 Updater: add a 3-dot menu for update item
A menu opening with only a long press is not intuitive and often not
found by user.

Change-Id: I7f819b77e2cbc534cafe488edadc4d3dd9b87d01
2021-10-13 18:09:21 +02:00
Timi Rautamäki
81dc120f09 Updater: follow TwoPanelSettings styling
Change-Id: I8d0957288fca25f1584f5ddb35c994c7ac2575f7
2021-09-14 17:51:38 +00:00
Timi Rautamäki
a96d54f236 Updater: initial layout for TV
Change-Id: Ia4704f7a15d9c1179ec93c1cab28707ba8115e70
2021-09-14 17:51:36 +00:00
Michael Bestas
6e5bbdaae1 Automatic translation import
Change-Id: I2d7ce9569a264be7d739f96328948c45516ffa5c
2021-08-21 04:07:41 +03:00
LineageOS Builder
a5492459f9 Automatic translation import
Change-Id: Icf76cbc53dd4b000862d76f470f6ad737b96c829
2021-05-01 15:56:43 +00:00
Dhina17
a36be60f98 Updater: appbar: Set the collapsing animation duration to 0ms
- Fixes lately fading out title of the expanded bar when collapsing (parallax)

Change-Id: I86062153b84ca4f82649862e15baa30aba2e6995
2021-04-28 11:58:07 +05:30
Michael W
7cfeb81a45 Updater: Fix exporting updates
* getExternalStorageDirectory was deprecated in API level 29
* Use the proposed Context#getExternalFilesDirs(String) instead

The following message can be found in the logs, followed by a crash:
MediaProvider: Creating a non-default top level directory or
deleting an existing one is not allowed!

Fixes: https://gitlab.com/LineageOS/issues/android/-/issues/3358
Change-Id: I81412985abc0f64d0fccb0d3069ac57ef6b4ffef
2021-04-19 13:42:15 +02:00
Michael Bestas
5a9c7479e7 Automatic translation import
Change-Id: I13c96b381b0fcc17c127fe64c6fc7e3997b8f248
2021-02-28 02:41:28 +02:00
chrmhoffmann
29ca6e5f3f update push script: remove bashisms
* [[ and == are bash-only. /bin/sh does not necessarily default to bash

Change-Id: I2e47f514568fc8cc94f387c82a86bea141345ba5
2020-12-28 11:10:55 +01:00
Pavel Salomatov
ffe5b527f6 UpdatesDbHelper: Move identical code into helper method
Change-Id: I2e19d9756fab94d9fcd3352b0baef45300044d3a
2020-12-17 13:11:05 +01:00
Alessandro Astone
9689a6b8bb Updater: Retrieve recovery update setting using the prop itself
This makes it easier to share the setting with SetupWizard.

Change-Id: I9a69df99c1b9a198ef9d5a039a090721b0195064
2020-11-23 17:14:24 +01:00
Nolen Johnson
a3c6c19a5f Updater: Clarify explanation for why A/B can't disable recovery update
Change-Id: Ia8cd1ec8c1ed5b5c8c2b9761da6782d66d1f67cd
2020-11-14 07:28:51 +01:00
Bruno Martins
96626c2fde Updater: Add setting for updating recovery
When enabled, the recovery of the device will be updated with the
version of the installed system. This is only applicable to devices
with a dedicated recovery partition and not A/B.

Change-Id: I4c1701b09c000b4cdb044069fa9ba857500f9cb1
2020-11-12 16:47:30 +00:00
LuK1337
1f8b7d56b0 Updater: Sign with platform key
Change-Id: Ia54f30e697d82d522a8dbe8e157b8f9f9e15daa8
2020-09-29 12:28:27 +02:00
LineageOS Builder
e3b26100c5 Automatic translation import
Change-Id: I84df5f5257fc5ee97ad307d289f3f503100c4e70
2020-09-20 10:11:28 +00:00
LineageOS Builder
1de5ff5239 Automatic translation import
Change-Id: Ifdc568ca60c3c2892993296017cfbbe1341989ce
2020-09-11 11:11:55 +00:00
Michael Bestas
4f8f00148a Automatic translation import
Change-Id: If04e431e80d0d9cd7ca4753be5f9aeb454e1fd66
2020-05-23 18:21:58 +03:00