API used in `SettingsActivity` and `SettingsFragment` has
been deprecated, e.g. `PreferenceFragment` was deprecated in
API level 28 [1].
Port that to non-deprecated API from the androidx.preference
library [2].
This addresses these deprecation warnings:
/home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:14: warning: [deprecation] PreferenceFragment in android.preference has been deprecated
import android.preference.PreferenceFragment;
^
/home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:15: warning: [deprecation] PreferenceGroup in android.preference has been deprecated
/home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:23: warning: [deprecation] getFragmentManager() in Activity has been deprecated
getFragmentManager().beginTransaction()
^
/home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:23: warning: [deprecation] beginTransaction() in FragmentManager has been deprecated
getFragmentManager().beginTransaction()
^
/home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:24: warning: [deprecation] replace(int,Fragment) in FragmentTransaction has been deprecated
.replace(android.R.id.content, new SettingsFragment())
^
/home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:25: warning: [deprecation] commit() in FragmentTransaction has been deprecated
.commit();
^
/home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:28: warning: [deprecation] PreferenceFragment in android.preference has been deprecated
public static class SettingsFragment extends PreferenceFragment implements SharedPreferences.OnSharedPreferenceChangeListener {
^
/home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:28: warning: [deprecation] PreferenceFragment() in PreferenceFragment has been deprecated
public static class SettingsFragment extends PreferenceFragment implements SharedPreferences.OnSharedPreferenceChangeListener {
^
/home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:30: warning: [deprecation] onCreate(Bundle) in PreferenceFragment has been deprecated
public void onCreate(Bundle savedInstanceState) {
^
/home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:31: warning: [deprecation] onCreate(Bundle) in PreferenceFragment has been deprecated
super.onCreate(savedInstanceState);
^
/home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:32: warning: [deprecation] addPreferencesFromResource(int) in PreferenceFragment has been deprecated
addPreferencesFromResource(R.xml.libreoffice_preferences);
^
/home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:34: warning: [deprecation] PreferenceGroup in android.preference has been deprecated
PreferenceGroup generalGroup = (PreferenceGroup) findPreference("PREF_CATEGORY_GENERAL");
^
/home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:34: warning: [deprecation] PreferenceGroup in android.preference has been deprecated
PreferenceGroup generalGroup = (PreferenceGroup) findPreference("PREF_CATEGORY_GENERAL");
^
/home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:34: warning: [deprecation] findPreference(CharSequence) in PreferenceFragment has been deprecated
PreferenceGroup generalGroup = (PreferenceGroup) findPreference("PREF_CATEGORY_GENERAL");
^
/home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:35: warning: [deprecation] findPreference(CharSequence) in PreferenceGroup has been deprecated
generalGroup.removePreference(generalGroup.findPreference("ENABLE_EXPERIMENTAL"));
^
/home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:35: warning: [deprecation] removePreference(Preference) in PreferenceGroup has been deprecated
generalGroup.removePreference(generalGroup.findPreference("ENABLE_EXPERIMENTAL"));
^
/home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:36: warning: [deprecation] findPreference(CharSequence) in PreferenceGroup has been deprecated
generalGroup.removePreference(generalGroup.findPreference("ENABLE_DEVELOPER"));
^
/home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:36: warning: [deprecation] removePreference(Preference) in PreferenceGroup has been deprecated
generalGroup.removePreference(generalGroup.findPreference("ENABLE_DEVELOPER"));
^
/home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:41: warning: [deprecation] onResume() in Fragment has been deprecated
public void onResume() {
^
/home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:42: warning: [deprecation] onResume() in Fragment has been deprecated
super.onResume();
^
/home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:43: warning: [deprecation] getPreferenceScreen() in PreferenceFragment has been deprecated
getPreferenceScreen().getSharedPreferences()
^
/home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:43: warning: [deprecation] getSharedPreferences() in Preference has been deprecated
getPreferenceScreen().getSharedPreferences()
^
/home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:48: warning: [deprecation] onPause() in Fragment has been deprecated
public void onPause() {
^
/home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:49: warning: [deprecation] onPause() in Fragment has been deprecated
super.onPause();
^
/home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:50: warning: [deprecation] getPreferenceScreen() in PreferenceFragment has been deprecated
getPreferenceScreen().getSharedPreferences()
^
/home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:50: warning: [deprecation] getSharedPreferences() in Preference has been deprecated
getPreferenceScreen().getSharedPreferences()
^
/home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/SettingsActivity.java:58: warning: [deprecation] getActivity() in Fragment has been deprecated
[1] https://developer.android.com/reference/android/preference/PreferenceFragment
[2] https://developer.android.com/reference/androidx/preference/package-summary
Change-Id: I3365a487345787056c91fa7addf987edca38e94f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167717
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
The `android.preference.PreferenceManager` class was
deprecated in API level 29 [1].
Port to `androidx.preference.PreferenceManager` from
the AndroidX Preference library instead.
All that needs to be done for this is to add the new library
dependency and adjust the import, no further code changes
needed for this step. (There are uses of more deprecated
preferences-related classes, though. Those will have to be
dealt with separately.)
This addresses depreaction warnings like
> Task :compileStrippedUIEditingDebugJavaWithJavac
/home/michi/development/git/libreoffice-WORKTREE-android/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java:16: warning: [deprecation] PreferenceManager in android.preference has been deprecated
import android.preference.PreferenceManager;
^
[1] https://developer.android.com/reference/android/preference/PreferenceManager
Change-Id: Ied168ffbd0591d69e0797e2a0a5bab067e133d22
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167716
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Set the `android.ndkVersion` property [1] for
the Android Gradle Plugin, in addition to `android.ndkPath`
that is set there already.
This addresses the warning
> Task :stripStrippedUIEditingDebugDebugSymbols
[CXX1100] android.ndkVersion is [26.1.10909125] but android.ndkPath /home/michi/Android/Sdk/ndk/25.1.8937393 refers to a different version [25.1.8937393].
[CXX1100] android.ndkVersion is [26.1.10909125] but android.ndkPath /home/michi/Android/Sdk/ndk/25.1.8937393 refers to a different version [25.1.8937393].
[CXX1100] android.ndkVersion is [26.1.10909125] but android.ndkPath /home/michi/Android/Sdk/ndk/25.1.8937393 refers to a different version [25.1.8937393].
[CXX1100] android.ndkVersion is [26.1.10909125] but android.ndkPath /home/michi/Android/Sdk/ndk/25.1.8937393 refers to a different version [25.1.8937393].
[CXX1100] android.ndkVersion is [26.1.10909125] but android.ndkPath /home/michi/Android/Sdk/ndk/25.1.8937393 refers to a different version [25.1.8937393].
[CXX1100] android.ndkVersion is [26.1.10909125] but android.ndkPath /home/michi/Android/Sdk/ndk/25.1.8937393 refers to a different version [25.1.8937393].
[CXX1100] android.ndkVersion is [26.1.10909125] but android.ndkPath /home/michi/Android/Sdk/ndk/25.1.8937393 refers to a different version [25.1.8937393].
[CXX1100] android.ndkVersion is [26.1.10909125] but android.ndkPath /home/michi/Android/Sdk/ndk/25.1.8937393 refers to a different version [25.1.8937393].
[CXX1100] android.ndkVersion is [26.1.10909125] but android.ndkPath /home/michi/Android/Sdk/ndk/25.1.8937393 refers to a different version [25.1.8937393].
[CXX1100] android.ndkVersion is [26.1.10909125] but android.ndkPath /home/michi/Android/Sdk/ndk/25.1.8937393 refers to a different version [25.1.8937393].
[CXX1100] android.ndkVersion is [26.1.10909125] but android.ndkPath /home/michi/Android/Sdk/ndk/25.1.8937393 refers to a different version [25.1.8937393].
[CXX1100] android.ndkVersion is [26.1.10909125] but android.ndkPath /home/michi/Android/Sdk/ndk/25.1.8937393 refers to a different version [25.1.8937393].
[CXX1100] android.ndkVersion is [26.1.10909125] but android.ndkPath /home/michi/Android/Sdk/ndk/25.1.8937393 refers to a different version [25.1.8937393].
[CXX1100] android.ndkVersion is [26.1.10909125] but android.ndkPath /home/michi/Android/Sdk/ndk/25.1.8937393 refers to a different version [25.1.8937393].
Unable to strip the following libraries, packaging them as they are: libc++_shared.so, libfreebl3.so, liblo-native-code.so, libnspr4.so, libnss3.so, libnssckbi.so, libnssdbm3.so, libnssutil3.so, libplc4.so, libplds4.so, libsmime3.so, libsoftokn3.so, libsqlite3.so, libssl3.so.
that started to show up in a local
`--with-android-ndk=$HOME/Android/Sdk/ndk/25.1.8937393`
Android build after
commit 1610ebc06b
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Mon May 13 10:47:49 2024 +0200
android: Update Android Gradle Plugin to 8.4.0
... and gradle to 8.6, as suggested by Android Studio.
As described at [2], that Android Gradle Plugin defaults to
NDK 26.1.10909125.
[1] https://developer.android.com/studio/projects/install-ndk#apply-specific-version
[2] https://developer.android.com/build/releases/gradle-plugin
Change-Id: Ied81f13f535303f9578177646f177b4ef791eefa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167715
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
At least on recent devices (seen e.g. on an AVD
with API level 34 and a Fairphone 3 with LineageOS 20
(based on Android 13)), inserting a picture by
taking a photo using the camera didn't work,
"nothing was happening" when choosing the corresponding
option from the formatting toolbar with experimental
editing mode enabled.
This is due to the system filtering information about
other apps/packages with target API level >= 30 for
privacy reasons, see [1] for more details.
As described at [2], requesting the `CAMERA`
permission is not required:
> Users might take pictures in your app, using the pre-installed
> system camera app.
>
> In this situation, don't declare the CAMERA permission. Instead,
> invoke the ACTION_IMAGE_CAPTURE intent action.
In fact, specifying the permission is even counter-productive
and would cause this to not work, as also described at [2]:
> Note: If your app declares Manifest.permission.CAMERA
> permission and is not granted, then the action results in
> a SecurityException.
Rather than explicitly requesting the permission, just
drop it from the AndroidManifest, as it's not needed.
Also drop the additional code interacting with the package
manager, as that doesn't work with newer API
versions as described above.
With these changes in place, inserting a photo works fine
in tests in API 21 and API 34 AVDs and on the
above-mentioned Fairphone 3.
[1] https://developer.android.com/training/package-visibility
[2] https://developer.android.com/privacy-and-security/minimize-permission-requests#take-photo
Change-Id: Ia1ee4e4de577a269e2b79bf5460d08b1bf2bee56
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167603
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Check for `FEATURE_CAMERA_ANY` ("The device has at least
one camera pointing in some direction, or can support an
external camera being connected to it.") [1] instead
of only the rear camera via `FEATURE_CAMERA`
("The device has a camera facing away from the screen.") [2]
when taking a photo is selected in the "Insert" menu, as
there's no need to restrict this to the rear camera.
This addresses this warning shown in Android Studio:
> You should look for any camera available on the device, not just the rear
Note however that trying to use that feature (with or
without this change in place) currently doesn't actually
work at least on a current device (e.g. an API 34 AVD),
"nothing happens" rather than the camera showing up to
be able to take a photo. This will be addressed
in an upcoming commit.
[1] https://developer.android.com/reference/android/content/pm/PackageManager#FEATURE_CAMERA_ANY
[2] https://developer.android.com/reference/android/content/pm/PackageManager#FEATURE_CAMERA
Change-Id: I52d2147df8fb3f1fdfb277376d7796380f9a8da0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167602
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
... and gradle to 8.6, as suggested by Android Studio.
Update the lint baseline file to initially ignore
new warnings that the new version reports.
These can be handled separately.
Change-Id: I6ecd7300072c16ea583b5ba19b03de89d671b87e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167586
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
…by a simple/static $(gb_CustomTarget_workdir)/foo
The build system has a lot of overly complicated leftovers from when it
was introduced and had not only deal with split repositories but also
had to coexist with another buildsystem. Along with lots of copy'n'paste
along the years the makefiles became hard to grasp for newcomers with
all our calls and evals.
As a first step to streamline that, the macros from TargetLocations that
simply prefix a static path to the argument (and similar of the same
kind) are a natural pick before simplifying the rules themselves/getting
rid of a bunch of eval statements.
Change-Id: Ia06dbbcd5d1994755a2ff05b84f72ccbc4e3cab5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167005
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
... as suggested by Android Studio.
Also update the Lint baseline file, as the build would
otherwise fail due to this new warning:
> Task :lintReportStrippedUIEditingDebug
Wrote HTML report to file:///home/michi/development/git/libreoffice-WORKTREE-android/android/source/build/reports/lint-results-strippedUIEditingDebug.html
> Task :lintStrippedUIEditingDebug FAILED
/home/michi/development/git/libreoffice-WORKTREE-android/android/source/lint-baseline.xml: Information: 213 errors and 1 warning were filtered out because they are listed in the baseline file, lint-baseline.xml
[LintBaseline]
/home/michi/development/git/libreoffice-WORKTREE-android/android/source/lint-baseline.xml: Information: 6 errors/warnings were listed in the baseline file (lint-baseline.xml) but not found in the project; perhaps they have been fixed? Another possible explanation is that lint recently stopped analyzing (and including results from) dependent projects by default. You can turn this back on with android.lintOptions.checkDependencies=true. Unmatched issue types: PrivateResource, RedundantNamespace, TypographyEllipsis (3), UnusedNamespace [LintBaseline]
/home/michi/development/git/libreoffice-WORKTREE-android/android/source/AndroidManifest.xml:109: Error: Should not restrict activity to fixed orientation. This may not be suitable for different form factors, causing the app to be letterboxed. [DiscouragedApi]
android:screenOrientation="landscape" >
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Explanation for issues of type "DiscouragedApi":
Discouraged APIs are allowed and are not deprecated, but they may be unfit
for common use (e.g. due to slow performance or subtle behavior).
1 errors, 0 warnings (213 errors, 1 warning filtered by baseline lint-baseline.xml)
FAILURE: Build failed with an exception.
Change-Id: I621b2334fef954bcd341cdde9034187f455339e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166114
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Commit the result of running
./gradlew wrapper --distribution-type all --gradle-version 8.5 --gradle-distribution-sha256-sum=c16d517b50dd28b3f5838f0e844b7520b8f1eb610f2f29de7e4e04a1b7c9c79b
(minus the automatically added `networkTimeout=10000` in
`android/source/gradle/wrapper/gradle-wrapper.properties`).
This includes the following upstream change for gradle
to port from the use of `which` to the more portable
`command -v`: [1]
Thanks to Eli Schwartz for pointing this out in his previous
Gerrit change [2] that was suggesting to only backport
that particular change to the wrapper script.
[1] https://github.com/gradle/gradle/pull/23961
[2] https://gerrit.libreoffice.org/c/core/+/160667
Change-Id: I1c230c75d2d8583852c59ff43ddfdf77daf5d5ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162081
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Rename the file for the keyboard icon from
`ic_keyboard_black_24dp.png` to
`ic_keyboard_black__24dp.png` (note the extra underscore)
to avoid a name clash with an icon of the same name
in the Material components: [1]
Keeping the same name would result in this lint error when
upgrading to material 1.11.0 (which an upcoming commit will
do):
> Task :lintStrippedUIEditingDebug FAILED
/home/michi/development/git/libreoffice-WORKTREE-android/android/source/lint-baseline.xml: Information: 213 errors and 1 warning were filtered out because they are listed in the baseline file, lint-baseline.xml
[LintBaseline]
/home/michi/development/git/libreoffice-WORKTREE-android/android/source/lint-baseline.xml: Information: 6 errors/warnings were listed in the baseline file (lint-baseline.xml) but not found in the project; perhaps they have been fixed? Another possible explanation is that lint recently stopped analyzing (and including results from) dependent projects by default. You can turn this back on with android.lintOptions.checkDependencies=true. Unmatched issue types: PrivateResource, RedundantNamespace, TypographyEllipsis (3), UnusedNamespace [LintBaseline]
/home/michi/development/git/libreoffice-WORKTREE-android/android/source/res/drawable-hdpi/ic_keyboard.xml:4: Error: The resource @drawable/ic_keyboard_black_24dp is marked as private in com.google.android.material:material:1.11.0 [PrivateResource]
android:src="@drawable/ic_keyboard_black_24dp"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Explanation for issues of type "PrivateResource":
Private resources should not be referenced; the may not be present
everywhere, and even where they are they may disappear without notice.
To fix this, copy the resource into your own project instead.
1 errors, 0 warnings (213 errors, 1 warning filtered by baseline lint-baseline.xml)
(For the currently-used material 1.10.0, this warning was previously
ignored since it's already listed in the lint-baseline.xml file, but that doesn't
apply any more after an update.)
[1] https://github.com/material-components/material-components-android/blob/bb351291a360319df31d5cee27e091c3e64f65a4/lib/java/com/google/android/material/timepicker/res/drawable/ic_keyboard_black_24dp.xml
Change-Id: I2babc445c69f1043967118be81905c334a0285d2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161889
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Change-Id: I55e7159ff10e7bb0ee32651a8f23f2f3a4e1282c
android-viewer translated using Weblate
Asturian currently translated at 100.0% (118 of 118 strings)
Change-Id: Ica863fed7663f5f5c17820a4010262101fcc358c
android-viewer translated using Weblate
Nepali currently translated at 16.9% (20 of 118 strings)
Change-Id: Ifc64ae37b7faa5bad89f70178565595630993420
android-viewer translated using Weblate
Greek currently translated at 100.0% (118 of 118 strings)
Change-Id: Icb257e6a5cfd38de5a27425f69294e059796e596
android-viewer translated using Weblate
Ukrainian currently translated at 100.0% (118 of 118 strings)
Change-Id: Iddf1e095b789f2a324fbc614d57b98ab3df8ed0e
android-viewer translated using Weblate
Asturian currently translated at 100.0% (118 of 118 strings)
Change-Id: I318be3807e77e190d857f1d9edd25fc9d7a60c0a
android-viewer translated using Weblate
Asturian currently translated at 100.0% (118 of 118 strings)
Change-Id: If8105733d78073254da1ccd16817581d53ab55b8
android-viewer translated using Weblate
Chinese (Traditional) currently translated at 100.0% (118 of 118 strings)
Change-Id: I7ef697098031684e32aed137b2ac6bd844ed94fb
Added translation for android-viewer using Weblate (Nepali)
Change-Id: I2d68cb2696827a6cd6e2ad634873857344c8ac9f
android-viewer translated using Weblate
Greek currently translated at 57.6% (68 of 118 strings)
Change-Id: Ic029d631692c1f47a9d7eeda13ce6ac38a59c3b8
android-viewer translated using Weblate
Greek currently translated at 56.7% (67 of 118 strings)
Change-Id: Id3456928ecb1a9aab0c27e77fbe49a02540fd8c4
android-viewer translated using Weblate
Asturian currently translated at 58.4% (69 of 118 strings)
Change-Id: Ibaf90837a1f25d070f9dd8ac183fbca6c26e85c4
android-viewer translated using Weblate
Italian currently translated at 11.8% (14 of 118 strings)
Change-Id: I64eb0e5cbf5a6ab050c6ef18a1adae68317005d8
android-viewer translated using Weblate
Asturian currently translated at 32.2% (38 of 118 strings)
Change-Id: Ie470cf5f249a0e498413571cd0b56a5421f5710a
android-viewer translated using Weblate
Asturian currently translated at 32.2% (38 of 118 strings)
Change-Id: I687ae9fe76f85a03f0876f4eda55d943f51b43fb
android-viewer translated using Weblate
Slovenian currently translated at 100.0% (118 of 118 strings)
Change-Id: I0c0cc15c6d5f245311c12d05afd4742db649389d
android-viewer translated using Weblate
Chinese (Traditional) currently translated at 100.0% (118 of 118 strings)
Change-Id: I2ddc5b6a36a512e6e4d1e52c96e282b0ff05f2ea
android-viewer translated using Weblate
Welsh currently translated at 100.0% (118 of 118 strings)
Change-Id: I34dbcafeaf61e7400d07910976ff71fdbe8ae4b0
Added translation for android-viewer using Weblate (Greek)
Change-Id: Idfc6ee0a0988f3c414e6e6beee58a96ab5fb9547
Co-authored-by: Adolfo Jayme Barrientos <fito@libreoffice.org>
Co-authored-by: Andika Triwidada <andika@gmail.com>
Co-authored-by: Cheng-Chia Tseng <pswo10680@gmail.com>
Co-authored-by: Dimitris Spingos <dmtrs32@gmail.com>
Co-authored-by: Elisabetta Manuele <calembour@hotmail.it>
Co-authored-by: Martin Srebotnjak <miles@filmsi.net>
Co-authored-by: Po-Yen Huang <jeff.huang@ossii.com.tw>
Co-authored-by: Rhoslyn Prys <post@meddal.com>
Co-authored-by: Saroj Dhakal <lotusnagarkot@gmail.com>
Co-authored-by: Weblate <noreply@documentfoundation.org>
Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: Xandru Martino Ruz <xandrumartino@softastur.org>
Co-authored-by: Євген Кондратюк <lachend@gmail.com>
Translate-URL: https://translations.documentfoundation.org/projects/android-viewer/android-strings/ast/
Translate-URL: https://translations.documentfoundation.org/projects/android-viewer/android-strings/cy/
Translate-URL: https://translations.documentfoundation.org/projects/android-viewer/android-strings/el/
Translate-URL: https://translations.documentfoundation.org/projects/android-viewer/android-strings/it/
Translate-URL: https://translations.documentfoundation.org/projects/android-viewer/android-strings/ne/
Translate-URL: https://translations.documentfoundation.org/projects/android-viewer/android-strings/sl/
Translate-URL: https://translations.documentfoundation.org/projects/android-viewer/android-strings/uk/
Translate-URL: https://translations.documentfoundation.org/projects/android-viewer/android-strings/zh_Hant/
Translation: android-viewer/android-strings
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160909
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Updated by "Cleanup translation files" hook in Weblate.
Change-Id: Ie0d7d835fba42e9a8cfb73370a8b153168a9cf9e
android-viewer translated using Weblate
Slovenian currently translated at 100.0% (132 of 132 strings)
Change-Id: Id07e5c018310b97460f7750c2db2f43127c483c5
Added translation for android-viewer using Weblate (Slovenian)
Change-Id: Ie9008b437173feb5a871e119fd00e5f134dd0da9
android-viewer translated using Weblate
Polish currently translated at 100.0% (132 of 132 strings)
Change-Id: Iacacacd662c48986358e904598d458c44ca8805f
Added translation for android-viewer using Weblate (Japanese)
Change-Id: I3373654075eabc79c42cd2c67daf62f5f7111158
Added translation for android-viewer using Weblate (Chinese (Traditional))
Change-Id: I7af06e08b6567f990641ad532b8b94df2ec7d367
android-viewer translated using Weblate
Basque currently translated at 100.0% (132 of 132 strings)
Change-Id: I9b29af97d0642fa36c09ce38bf14290f60ccb8cd
android-viewer translated using Weblate
Polish currently translated at 100.0% (132 of 132 strings)
Change-Id: Ie0b345d1dc63102120cb871f8066ed710917e72f
android-viewer translated using Weblate
Portuguese (Brazil) currently translated at 54.5% (72 of 132 strings)
Change-Id: I652b6dde8cd02c9b4baff5ba5453f7471f8eb896
android-viewer translated using Weblate
Catalan currently translated at 100.0% (132 of 132 strings)
Change-Id: Ic7b42998072d6bb02937e88af76620564abc51b8
Added translation for android-viewer using Weblate (Finnish)
Change-Id: Iae55f9b007d7d34162d77c8f62d025fa54ff8035
Added translation for android-viewer using Weblate (Basque)
Change-Id: I88291444f52d5f4189c17330f855683268a2bffc
android-viewer translated using Weblate
Catalan currently translated at 62.1% (82 of 132 strings)
Change-Id: I28ec1b2f54d39209f7d802ba9aa899d12b2a3b35
android-viewer translated using Weblate
Persian currently translated at 2.2% (3 of 132 strings)
Change-Id: I7ba58594540aff2ad592771e73efeeccdff027db
android-viewer translated using Weblate
Portuguese (Brazil) currently translated at 33.3% (44 of 132 strings)
Change-Id: I092277ffea906ad3da9b73e7831536a482bb104f
android-viewer translated using Weblate
French currently translated at 1.5% (2 of 132 strings)
Change-Id: Ia8553c387bec6c66c6def3de9b4b41016ead2bb1
Added translation for android-viewer using Weblate (Polish)
Change-Id: Ibe83470b27b286030024f654df5cf30b2cb727ed
Added translation for android-viewer using Weblate (Persian)
Change-Id: I67bb9684aaa873ca4129139fb340b84634c9fe7e
android-viewer translated using Weblate
Portuguese (Brazil) currently translated at 20.4% (27 of 132 strings)
Change-Id: I628da41052ac2957601226a5e03796bd67744863
Added translation for android-viewer using Weblate (Portuguese (Brazil))
Change-Id: I8ee44239235aaba0c44f805d93d2cb8db4383fab
android-viewer translated using Weblate
Punjabi currently translated at 87.8% (116 of 132 strings)
Change-Id: Ic9ae2d4d5d007638ecf8d58c9069c103d30af7c1
android-viewer translated using Weblate
Catalan currently translated at 59.0% (78 of 132 strings)
Change-Id: Ib6d7f7e1adf85c57f6de66cf21795c27d6945a03
Added translation for android-viewer using Weblate (French)
Change-Id: I936f355b82bf58baea5f1738227b7b1755b23193
Co-authored-by: A S Alam <amanpreet.alam@gmail.com>
Co-authored-by: Adam Rak <kitynska@gmail.com>
Co-authored-by: Aitor Salaberria <trslbrr@gmail.com>
Co-authored-by: Hossein <hossein@libreoffice.org>
Co-authored-by: Joan Montané <joan@montane.cat>
Co-authored-by: Martin Srebotnjak <miles@filmsi.net>
Co-authored-by: Naruhiko Ogasawara <naruoga@gmail.com>
Co-authored-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Co-authored-by: Tuomas Hietala <tuomas.hietala@iki.fi>
Co-authored-by: Weblate <noreply@documentfoundation.org>
Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: sophie <gautier.sophie@gmail.com>
Translate-URL: https://translations.documentfoundation.org/projects/android-viewer/android-strings/
Translate-URL: https://translations.documentfoundation.org/projects/android-viewer/android-strings/ca/
Translate-URL: https://translations.documentfoundation.org/projects/android-viewer/android-strings/eu/
Translate-URL: https://translations.documentfoundation.org/projects/android-viewer/android-strings/fa/
Translate-URL: https://translations.documentfoundation.org/projects/android-viewer/android-strings/fr/
Translate-URL: https://translations.documentfoundation.org/projects/android-viewer/android-strings/pa/
Translate-URL: https://translations.documentfoundation.org/projects/android-viewer/android-strings/pl/
Translate-URL: https://translations.documentfoundation.org/projects/android-viewer/android-strings/pt_BR/
Translate-URL: https://translations.documentfoundation.org/projects/android-viewer/android-strings/sl/
Translation: android-viewer/android-strings
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160824
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Update the list of known (tolerated for now) issues by deleting
lint-baseline.xml and running `make` to regenerate
the file, so recent translation-related (config) changes are
reflected.
Change-Id: If8a39d72ba83c2a2e0bab9830c69095445943b09
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160818
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This also avoids that these will show up in Weblate,
causing unnecessary work for translators since they're
unused anyway.
IIUC, dropping the strings in already existing translations
should be handled automatically by Weblate.
(Leave them there to see whether this actually works as
expected.)
Change-Id: Icab66a1768f5c6250598fcf788377575d3f6f611
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160821
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
These should be managed automatically via weblate, s. [1],
so there shouldn't be any need to manually remove stale
strings for all translations.
There are 2 lint checks for these, `ExtraTranslations`
and `UnusedResources`.
Disable `ExtraTranslations` altogether.
The `UnusedResources` check seems useful in general,
so only disable that for the translations by adding
a lint config file `lint.xml` (s.a. [2]) using a
wildcard for the path that matches the translation's
string.xml files.
This is in preparation for
Change-Id: Icab66a1768f5c6250598fcf788377575d3f6f611
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Fri Dec 15 10:28:21 2023 +0100
android lint: Drop unused string resources
This also avoids that these will show up in Weblate,
causing unnecessary work for translators since they're
unused anyway.
IIUC, dropping the strings in already existing translations
should be handled automatically by Weblate.
(Leave them there to see whether this actually works as
expected.)
[1] https://gerrit.libreoffice.org/c/impress_remote/+/155966/comments/769f76c5_c3c499ec
[2] https://developer.android.com/studio/write/lint
Change-Id: Ic7c7a1c4c5583bf1a42004480435aac70a88dee0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160822
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Address this lint warning listed in the lint-baseline.xml:
<issue
id="TypographyEllipsis"
message="Replace "..." with ellipsis character (…, &#8230;) ?"
errorLine1=" <string name="action_save_as">Save As...</string>"
errorLine2=" ~~~~~~~~~~">
<location
file="res/values/strings.xml"
line="53"
column="35"/>
</issue>
This also helps to avoid introducing more issues of that kind in newly
added translations, quoting from cloph's Gerrit comment [1]:
> and FYI: if the source-string would end in an Ellipsis, then weblate could
> enforce the translation ending in an ellipsis [...]
>
> ( https://docs.weblate.org/en/latest/user/checks.html#mismatched-ellipsis )
[1] https://gerrit.libreoffice.org/c/core/+/160614/comments/5ef2dc6d_75cde15f
Change-Id: Ic056849dd56d7e6c50615ffd62d470df4ab337bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160817
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Translations are handled in Weblate now, so missing
translations are tracked there.
Therefore, ignore them in the lint check, since there's
no added value in having them listed in the
`android/source/lint-baseline.xml` file in addition any more.
Change-Id: I82945c0eebe015ca9695813dd19613108884c648
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160816
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
After new translations got added in
commit 40f850279d
Author: Weblate <noreply@documentfoundation.org>
Date: Wed Dec 13 15:33:50 2023 +0100
android-viewer translated using Weblate (Welsh)
, the android build started failing like this:
> Task :lintReportStrippedUIEditingDebug
Wrote HTML report to file:///home/michi/development/git/libreoffice-WORKTREE-android/android/source/build/reports/lint-results-strippedUIEditingDebug.html
> Task :lintStrippedUIEditingDebug FAILED
Lint found 3 errors, 0 warnings (232 errors, 3 warnings filtered by baseline lint-baseline.xml). First failure:
/home/michi/development/git/libreoffice-WORKTREE-android/android/source/res/values-hy/strings.xml:36: Error: Replace "..." with ellipsis character (…, …) ? [TypographyEllipsis]
<string name="action_save_as">Պահել որպես...</string>
~~~~~~~~~~~~~~
The full lint text report is located at:
/home/michi/development/git/libreoffice-WORKTREE-android/android/source/build/intermediates/lint_intermediate_text_report/strippedUIEditingDebug/lint-results-strippedUIEditingDebug.txt
FAILURE: Build failed with an exception.
Downgrade that type of lint check to severity informational
to not cause the build to fail.
(Changes to address these will need to be done in Weblate,
which is now the source of truth for translations.)
Change-Id: Ibc82f96d29c8ac76f98db0259e1ee3cae4a986f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160772
Tested-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
In order to avoid introducing new lint errors,
also run the `lint<buildVariant>` gradle target when building
Android Viewer and set the `warningsAsErrors true`
lint option.
This makes the build fail on (new) lint errors.
See [1] for more details.
Downgrade missing translations and issues that can "suddenly"
appear without any code changes to the app itself to informational,
to prevent (CI) builds from suddenly starting to fail just because
a new Android Gradle Plugin version or external library becomes
available etc.
To be able to avoid introducing new issues without having to address
all existing ones right now, use a baseline file ("lint-baseline.xml")
as described at [2] which lists all existing issues, so they don't
result in a failing build.
Those should still be looked into at some point.
Updating the baseline file can be done by just removing the
existing one and running the build again. (Build will create the
new baseline file and fail on first run after deleting the file,
then find the new file and succeed in subsequent builds.)
[1] https://developer.android.com/studio/write/lint
[2] https://developer.android.com/studio/write/lint#customize-the-baseline
Change-Id: Iddbe432519ab3040c83c0e977a584b51d3ef1e5b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160199
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Since these are produced by the build, they should also
be removed in the "clean" target.
Without this, Jenkins CI builds for the upcoming
Change-Id: Iddbe432519ab3040c83c0e977a584b51d3ef1e5b
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Fri Dec 8 14:57:14 2023 +0100
android: Make the build fail on new lint warnings
were seen failing, despite the example file no longer being
part of the generated resources since
commit 1d7b1e2d40
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Wed Nov 15 13:16:26 2023 +0100
android: Drop "More Info" item in "About" dialog
, but apparently the file was still lingering around
from previous builds.
Build failure/Lint error from CI build [1]:
> Task :lintReportStrippedUIEditingDebug
Wrote HTML report to file:///home/tdf/lode/jenkins/workspace/android_arm/android/source/build/reports/lint-results-strippedUIEditingDebug.html
> Task :lintStrippedUIEditingDebug FAILED
/home/tdf/lode/jenkins/workspace/android_arm/android/source/lint-baseline.xml: Information: 237 errors and 11 warnings were filtered out because they are listed in the baseline file, lint-baseline.xml
[LintBaseline]
/home/tdf/lode/jenkins/workspace/android_arm/android/source/res_generated/raw/example.odt: Error: The resource R.raw.example appears to be unused [UnusedResources]
Explanation for issues of type "UnusedResources":
Unused resources make applications larger and slow down builds.
The unused resource check can ignore tests. If you want to include
resources that are only referenced from tests, consider packaging them in a
test source set instead.
You can include test sources in the unused resource check by setting the
system property lint.unused-resources.include-tests =true, and to exclude
them (usually for performance reasons), use
lint.unused-resources.exclude-tests =true.
,
1 errors, 0 warnings (237 errors, 11 warnings filtered by baseline lint-baseline.xml)
FAILURE: Build failed with an exception.
This could also be reproduced locally:
After a
$ touch android/source/res_generated/example.odt
, the above error would on build, and neither `make clean`
nor `make android.clean` would remove the file and thus
fix the problem for subsequent builds.
Add removing the directory to the top-level and Android-specific
clean targets, so either of these commands now takes care of this.
[1] https://ci.libreoffice.org/job/gerrit_android_arm/33845/console
Change-Id: I91c83ce4ddb236d87d7c51f4dcce85e99aae0107
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160612
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This was accidently added in
commit a21e7a76d7
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Thu Nov 9 10:24:13 2023 +0100
android a11y: Add content labels
and now reported by lint:
<issue
id="ExtraText"
message="Unexpected text found in layout file: "/>""
errorLine1=" />"
errorLine2=" ~~">
<location
file="res/layout/toolbar_bottom.xml"
line="481"
column="13"/>
</issue>
Change-Id: If4a17c4cd10450c2f5e13ead88a7511684ab9956
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160469
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
`DocumentsContract.EXTRA_INITIAL_URI` was added in API level 26,
so only set it conditionally when that API level is avaible.
Change-Id: I6783e89f50354c017968b74cc45fb1a3b6faab83
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160468
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
NDK 26 dropped support for API levels < 21 [1] [2].
Do the same for our Android build, to ease the
maintenance.
Adapt configure.ac accordingly and drop the
now obsolete code paths in Android Viewer
Java code.
This in also means that the same minSdkVersion will
be used for all architectures now, while API level 21
was already used for the 64-bit variants (for which
the minimum supported version was 21 anyway) and
API level 19 was used for x86 and 32-bit ARM when
building with NDK 24/25, API level 16 when building
with NDK 23.
According to [1] and [3], more than 99% of
Android devices have at least Android version 5,
i.e. support API level 21.
[1] https://github.com/android/ndk/issues/1751
[2] https://developer.android.com/ndk/downloads/revision_history
[3] https://apilevels.com/
Change-Id: I875e784dd4e62993f51059ae6a280d425cb49c0a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160334
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Configure the gradle build to show detailed warnings
about the use of deprecated API, instead of just
> Task :compileStrippedUIEditingDebugJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
With this in place, 78 specific warnings about the use
of deprecated API are now shown in the build output,
which can be addressed at some point.
Change-Id: I9f3b484b6dfad1fc57895efa7d3426b625030ee7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160198
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
So far, the build ID in liboSettings.gradle, and
therefore in the about dialog in Android Viewer
was not reliably updated in incremental builds.
For example, after a full build, then
git commit --allow-empty -m "Dummy"
make
, the build ID would still refer to the commit
from the full build, not the new dummy commit.
Since `instdir/program/versionrc` on Linux
and `instdir/program/version.ini` on Windows
gets updated properly, add an optional make
dependency on these files, using a wildcard.
Change-Id: If3b1d4d811a5e4316a26bb17f246b66858dcf80f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160157
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>