Commit Graph

69 Commits

Author SHA1 Message Date
Torsten Grote decc2cc6e3
Add ktlint and run it in CI
Fixes formatting issues it found.

Also remove version variables from gradle scripts as they are not wanted by the project.
2022-02-16 09:43:19 -03:00
Torsten Grote 062c870f23
Move (Http)Downloader into download library 2022-02-16 09:43:18 -03:00
Raphael Michel 362e9f7a06
fix navigation in basic build (fix #2261) 2022-01-19 16:13:53 +01:00
Konrad Pozniak ee5c2b6632 remove unneeded saved state handling in MainActivity 2021-06-02 10:24:26 +00:00
proletarius101 e48c49ce0c Change the bottom navigation bar to the material component one 2021-05-18 12:39:58 +00:00
Hans-Christoph Steiner cf94cfb543
run Android Studio's Ctrl-Alt-O Organize Imports on all .java files 2021-04-13 10:23:59 +02:00
proletarius101 755588202f feat: rebase app themes to material themes 2021-04-12 16:36:17 +00:00
Hans-Christoph Steiner 018e3221a7 prevent search terms triggering SQL injection vulns 2021-02-23 13:28:32 +01:00
Isira Seneviratne 8b9c624d75 Use ContextCompat.startForegroundService(). 2020-11-06 16:26:37 +05:30
Hans-Christoph Steiner 1ee0d7568b Merge branch 'bottom-nav-colors' into 'master'
make bottom nav color configurable

See merge request fdroid/fdroidclient!906
2020-07-15 08:17:16 +00:00
Marcus Hoffmann 18592150c1 perform androidX migration through android studio
Project compiles and works fine after this.
2020-07-14 14:10:21 +02:00
Dominik Schürmann f9e4506f2d make bottom nav color configurable 2020-07-13 13:36:50 +02:00
Hans-Christoph Steiner ca5996c5b3 detect when USB OTG device is plugged in and show Nearby tab 2019-06-17 18:37:26 +02:00
Hans-Christoph Steiner 23b296a012 add Intent Extra to force Nearby tab to show, like the other tabs have 2019-06-17 18:37:00 +02:00
Hans-Christoph Steiner 525f99b056 implement mirror/repos on USB OTG via Storage Access Framework
* https://developer.android.com/training/articles/scoped-directory-access

One potential future direction, if this proves too limiting:
https://github.com/magnusja/libaums
2019-06-17 18:36:58 +02:00
Hans-Christoph Steiner 15d349f863 move LocalHTTPD and WifiStateChangeService into ".nearby" package 2019-06-17 11:18:07 +02:00
Hans-Christoph Steiner 43c7574228 fold ".views.swap" package into ".nearby" class 2019-06-17 10:50:56 +02:00
Hans-Christoph Steiner 790b5ab27d rename 'localrepo' package to 'nearby' to cover the whole thing 2019-06-17 10:50:56 +02:00
Hans-Christoph Steiner df3a09dd2b ensure SwapService is running first, after Location perm prompt 2019-06-14 11:25:41 +02:00
Michael Pöhn 292950898e replace prone useTor preference mirror value from FDroidApp with direct preference calls 2019-06-11 16:23:22 +02:00
Hans-Christoph Steiner d5f2e26ea7 use one method everywhere for the "swap back" requests 2019-05-24 10:00:07 +02:00
Hans-Christoph Steiner 81139c40fa trigger WifiStateChangeService after user accepts location perms
Normally, WifiStateChangeService finds the SSID when F-Droid starts. But if
the user hasn't granted location permissions yet, then WifiStateChangeService
won't have been able to read the SSID yet.
2019-03-29 00:11:16 +01:00
Hans-Christoph Steiner 0aab6bc422 standardize on EXTRA_CANONICAL_URL throughout the code base
There were a few different constants used, this unifies them all into one,
so that it is easy to track where it is used, and what it means.
2019-03-28 11:41:10 +01:00
Hans-Christoph Steiner 823ddcaca8 use separate titles for Updates pref and Updates tab
https://gitlab.com/fdroid/fdroidclient/merge_requests/773#note_127475129
2019-01-02 23:23:28 +01:00
Hans-Christoph Steiner 0a306a4df2 after requesting Storage permissions, start SDCard scan 2018-12-21 23:06:10 +01:00
Hans-Christoph Steiner ae0c712a3e remove animation from BottomBar to make more text fit into labels
For many languages, there are unavoidable long words needed for the labels
on the button bar, for example, the standard word for Settings can be up to
15 characters long:
https://gitlab.com/fdroid/fdroidclient/issues/1569#note_126469088

The BottomBar was scaling the active one up, and sizing all the fields based
on that size.  This removes that animation, and sets all tabs to always have
the same text size.  That makes it possible to make the spacing tighter.
This also sets the text truncating mode to "middle" which sticks an elipsis
in the middle of the truncated word and shows the start and end.

closes #1569
closes !756
2018-12-21 14:27:57 +01:00
Hans-Christoph Steiner 69e2ca4283 keep F-Droid visible after adding removeable storage mirror 2018-12-21 00:06:15 +01:00
Hans-Christoph Steiner 90c3baf5af scanning WiFi/Bluetooth in android-23 requires location permission
This requires that admin#65 is fixed, otherwise every F-Droid update will
require Unknown Sources with Privileged Extension.

https://developer.android.com/about/versions/marshmallow/android-6.0-changes.html#behavior-hardware-id
https://stackoverflow.com/a/44200390

closes #656
2018-12-21 00:06:13 +01:00
Hans-Christoph Steiner 1571e28f68 support swapping with removable storage on android-21+
This uses the new Storage Access Framework, which was required for
accessing files on the SD Card starting in android-19.  But the API
was really limited until android-21, and not really complete until
android-23 or even android-26.  So the levels of usability will vary a
lot based on how new the version of Android is.
2018-12-21 00:03:39 +01:00
Hans-Christoph Steiner 148d1cdc8a rename AppDetails2 to AppDetailsActivity
This also moves it into org.fdroid.fdroid.views
2018-12-17 17:16:51 +01:00
Hans-Christoph Steiner af7b94ff4c add Latest view to basic flavor
This is a quick hack to reuse the Latest view with a slightly simpler
layout.  It makes the "basic" flavor fully functional as an fdroid client.
The goal here is just to have something simpler with as little new code as
possible.  It is essential that the whitelabeling and "Light" aka "basic"
flavor does not increase the maintenance load.

closes fdroid/fdroidclient#48
fdroid/fdroidclient!692
fdroid/fdroidclient!695
2018-07-31 15:06:09 +02:00
Hans-Christoph Steiner 048d5531be only first trigger initial repo update if it is not already happening
I was seeing double index updates on first start.
2018-07-19 16:35:29 +02:00
Hans-Christoph Steiner 0d386b824f merges triedEmptyUpdate and lastUpdateCheck prefs into one useful one
This merges the triedEmptyUpdate preference into the lastUpdateCheck pref,
and uses that to determine whether the index update has ever run.  It seems
that lastUpdateCheck used to be used for that, but was semi-disabled. Then
triedEmptyUpdate was added. This merges the two into lastUpdateCheck, which
also tracks the timestamp of the last index update.
2018-07-19 16:34:14 +02:00
Hans-Christoph Steiner 0952f3ba71 track pending installs from first request to confirmed install
This changes the logic to only use a SharedPreference to track pending
installs, and to set the "pending install" mark as soon as possible
while waiting until final confirmation to unmark.  Before, there was a
complicated combination of a SharedPreference and the use of the APK in the
cache as a mark.

!488
refs #962
closes #1311
closes #1031
closes #1271
2018-07-13 13:34:15 +02:00
Hans-Christoph Steiner 654d2ca40e Merge branch 'whitelabel-overhaul' into 'master'
whitelabel overhaul

See merge request fdroid/fdroidclient!692
2018-06-25 18:48:18 +00:00
Hans-Christoph Steiner 06e922a35e when adding new repos via Intents, clean out Activities from the Task 2018-06-25 11:58:19 +02:00
Hans-Christoph Steiner c87f6a64f9 get "basic" flavor building and running 2018-06-18 16:46:26 +02:00
Hans-Christoph Steiner c81e3f3d02 define default main tab as 0th element to support flavors 2018-06-01 11:56:47 +02:00
Hans-Christoph Steiner e00fe0dcda switch to latest official BottomNavigation release
#1379
2018-04-19 15:51:44 +02:00
Hans-Christoph Steiner 2a9c3fee5b purge all code blocks for < android-14, except installer stuff
The installer stuff should hopefully become a standalone library, so that
might as well keep the old support in place.

#1379
2018-04-19 15:51:44 +02:00
Hans-Christoph Steiner 3938146f93 set up "Android App Links" handling aka "Digital Asset Links"
Add all the new URL path possibilities with the new website to the filter,
and the possible, official host names.  This makes it more likely that
f-droid.org links go straight to F-Droid.

* https://developers.google.com/digital-asset-links/v1/getting-started
* https://developer.android.com/training/app-links/verify-site-associations.html

fdroid-website#165
2018-01-12 13:50:32 +01:00
Peter Serwylo b5ae78cf4d Specify whether dismissing an item requires a list rebuild or not.
The controller in charge of dismissing an item will have an insight into
whether it will cause a re-query for an existing cursor or not. If a re-query
will occur in response to a `ContentResolver#notifyChange()` invokation (in this
case in response to updating `AppPrefs`), then the `UpdatesAdapter` doesn't
need to rebuild itself yet. If it is a status update, then it should update
the adapter right away.

Seeing as the controller was already returning one thing (a message to be
displayed in a `Toast` and now it also needs to return an opinion on whether
to rebuild the adapter or not, this has been extracted into a value object
which has a message and a rebuild adapter flag.
2017-09-27 23:48:43 +10:00
Peter Serwylo 25897df85b Update the badge on the bottom nav when dismissing 'ready to install' apps 2017-09-27 23:31:20 +10:00
Peter Serwylo 13e2eddb6a Static import of inner class to improve readability 2017-09-27 23:31:17 +10:00
Christine Emrich bd796136f7 Set sane colors for night and dark themes 2017-09-25 09:48:08 +10:00
Peter Serwylo ba96819e40 Prompt user to go to settings to help with incompatible versions 2017-09-05 17:02:04 +10:00
Peter Serwylo f3c48f8d6b Ensure apps are not kept in "Updates" when their repo is disabled.
This caused problems when users then tried to action the pending
install, where it would no longer have enough information to install the
app. Although it may be technically possible to keep enough information
around in memory to make the app installable, but it is not worth the
effort. If a user intentionally disables a repo, we should no longer be
responsible for keeping information about its apps around.

Fixes #995.
2017-08-08 21:12:59 +10:00
Chirayu Desai 0d8b0c7fd4 Introduce FileInstaller, a way to handle media files from F-Droid
* This installer is invoked when for non-apk/media files, and
  copies them to an appropriate folder on the sdcard.
* We also introduce a FileInstallerActivity to ask for storage
  permissions at runtime, as needed by Android 6.0 and above,
  and handle the install/uninstall process.
* A toast is shown with the install path after installation.

TODO:
* Manage Installed Apps screen doesn't show media files.
2017-07-07 12:10:48 +05:30
Hans-Christoph Steiner 48fd6d287d enforce max line length at 118
gitlab's diff views wrap badly when lines are longer than 118.  Android
Studio places a grey line in the UI at 120.

@SuppressWarnings("LineLength") is added to a bunch of files to prevent
making this commit huge.  People can remove that as they work on those
files, and fix the issues then.

I also ran Android Studio's default Ctrl-Alt-L code formatter, where it was
easy to do, and I was already in the file.
2017-06-06 16:12:23 +02:00
Peter Serwylo 93e39d895c Fix for API 15- having really busted navigation 2017-04-17 17:31:32 +10:00