79 Commits

Author SHA1 Message Date
Hans-Christoph Steiner
ab767ce621 purge deprecated, broken ExtensionInstaller, only works < android-20
This code is unmaintained, semi-broken, and only works on old Android
versions.  Time to go!

closes #982
2018-07-20 14:18:57 +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
7043627a3a basic Install History viewer, available only when logging is enabled
This provides a super simple way to view the install history directly in
F-Droid.
2018-06-27 20:45:27 +02:00
Hans-Christoph Steiner
c87f6a64f9 get "basic" flavor building and running 2018-06-18 16:46:26 +02:00
Hans-Christoph Steiner
36b51c506f use separate IntentFilters to make App Links work
The App Links thing is quite strict, all possible scheme/hosts must have
a valid /.well-known/assetlinks.json file that is HTTP 200.

These two URLs are not 200, so they will fail for App Links:
* http://f-droid.org/.well-known/assetlinks.json
* http://www.f-droid.org/.well-known/assetlinks.json
2018-04-25 22:46:42 +02:00
Hans-Christoph Steiner
b1f0f43546 bump targetSdkVersion to 25
We have a lot of work to do to bump to the latest version: #1440
2018-04-25 22:46:42 +02:00
Hans-Christoph Steiner
e6fb837af0 use JobSchedule to better schedule CleanCacheService
#588
 #1426
2018-04-24 21:09:41 +02:00
Hans-Christoph Steiner
34ac465438 convert ConnectivityMonitorService to JobIntentService #1426 2018-04-24 21:09:41 +02:00
Hans-Christoph Steiner
07ada4e6b2 switch UpdateService to a JobIntentService
closes #1426
2018-04-24 21:09:36 +02:00
Hans-Christoph Steiner
fe260d931c use JobIntentService for CleanCache, DeleteCache, Installer, InstalledApp
This should ensure that these jobs complete before sleep, and also, they
should work more reliably with the new Android 8.0 background restrictions.
https://developer.android.com/reference/android/support/v4/app/JobIntentService.html #1426
2018-04-24 21:05:43 +02:00
Hans-Christoph Steiner
71f7762521 remove unused NFC-ish <intent-filter> with lint error
Looks like an aborted effort to do:
https://developer.android.com/guide/topics/connectivity/nfc/nfc.html#mime
2018-04-19 16:36:35 +02:00
Hans-Christoph Steiner
15b0736252 new lint is more aggressive about erroring on upper case URI schemes 2018-04-19 16:29:53 +02:00
Hans-Christoph Steiner
5ec9789e73 switch minSdkVersion to 14 (Android 4.0)
#1379
2018-04-19 11:28:27 +02:00
Hans-Christoph Steiner
9e0de9ac69 rudimentary support for JobScheduler to run updates
The new JobScheduler API can opportunitistically run a job based on whether
there is good internet, connected to power, etc.  This is very useful for
running updates.  Ideally, updates would always happen in the background
while on unmetered internet and connected to power.

#588
2018-04-18 23:07:36 +02:00
Hans-Christoph Steiner
1e6fb13ebc register to receive gitlab nightly URLs
They have one more path segment than the others, e.g.:
https://gitlab.com/fdroid/fdroidclient-nightly/raw/master/fdroid/repo
2018-04-11 11:26:55 +02:00
Hans-Christoph Steiner
fbf7e98df9 no need to export WifiStateChangeService to the world 2018-04-06 15:51:00 +02:00
Hans-Christoph Steiner
5bd276c804 make "Only on WiFi" also apply to updates, graphics, and icons
The "Only on WiFi" pref originally only controlled index updates, but now
it makes sense to include all of the various files that are downloaded.

#1381
2018-04-06 15:50:57 +02:00
Hans-Christoph Steiner
c1656f61a7 if device storage is really low, delete the entire cache 2018-04-05 23:28:53 +02:00
Hans-Christoph Steiner
af32e4ac85 trigger CleanCacheService if device storage is low 2018-04-05 23:28:53 +02:00
Hans-Christoph Steiner
0159020c2e whitespace code format changes for AndroidManifest.xml
This moves towards the standard Android Studio Ctrl-Alt-L code format with
only whitespace changes.  This just removes this one kind of space, since
its widespread, and easy to track.  I did this using:

sed -i 's," />,"/>,g' app/src/main/AndroidManifest.xml
2018-02-08 23:47:53 +01:00
Torsten Grote
6067c15085
Implement App Hiding
This commit allows F-Droid to hide itself from the laucher.
It can be hidden either as response to a panic trigger
or as a manual action by long pressing the floating search button.
The latter needs to be explicitly enabled in the settings.

Once hidden, a semi-functional fake calculator app appears in the
launcher that can be used to bring F-Droid back by entering a
pre-defined PIN.
2018-01-27 16:42:59 -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
Torsten Grote
512789aafa
Basic PanicKit Support with one default action
The default action closes F-Droid and removes it from the list of recent
apps.

Destructive action will be added later.
2017-12-06 16:25:01 -02:00
Torsten Grote
4149cf7e8c
Remove dependence on "org.fdroid.fdroid" to make whitelabel clients easier 2017-11-22 13:21:06 -02:00
Christine Emrich
e38d02a59c Add full screen detail view to swipe through screenshots 2017-11-08 13:58:24 +01:00
Peter Serwylo
91a03be6f4 Allow any path when adding fdroidrepo(s):// intents.
When explicitly given an fdroidrepo(s) intent, it seems silly to restrict it based on
a path of /fdroid/repo, because it is plainly obvious it is an F-Droid repo.
Manifest and NewRepoConfig both had to be amended to allow this behaviour.

Fixes #1171.
2017-09-25 15:43:32 +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
Stephen Michel
876f94e7ca Update repo management screen title 2017-05-15 12:02:02 -04:00
Peter Serwylo
b0803432d8 Ensure PendingIntents use explicit Intents.
The only pending intents that were not explicit were the four from
the NotificationHelper class. These now explicitly specify the
NotificationBroadcastReceiver as their destination, which is not
exported. That then forwards the intents onto relevant methods of
AppUpdateStatusManager.
2017-04-20 17:03:37 +10:00
Hans-Christoph Steiner
1054d57b02 Merge branch 'new-ui--more-fixes' into 'master'
More misc UI fixes, mainly for older devices.

Closes #906 and #866

See merge request !465
2017-04-07 07:47:42 +00:00
Peter Serwylo
655c4bfdd3 Reinstate the About dialog.
Currently available as the first entry in Preferences. Used to be
available in the main action bar menu.

Fixes #906.
2017-04-07 09:55:14 +10:00
Peter Serwylo
5ebe3b2420 Remove references to unused classes in AndroidManifest.xml 2017-04-07 08:30:30 +10:00
Peter Serwylo
60a2ebe9fa Make back behaviour work better for manage repos/installed apps/search. 2017-03-22 08:55:27 +11:00
Peter Serwylo
df5db32451 Check downloaded apks on F-Droid first start.
This will read downloaded .apk files from the disk cache in the background.
For each apk that corresponds to an app which can be updated, the status
manager is notified.
2017-03-22 08:55:26 +11:00
Peter Serwylo
a1a7427cd2 Added "Installed Apps" activity to top of settings.
This is as per the mockup in issue #840, and does the following:

 * Adds a new `PreferencesCategory` of "My Apps" at the top of the
   preferences screen.
 * Adds a "Manage Installed Apps" preference, and moves the
   "Repositories" preference into this category.
 * Repeals an existing change which prevented "updateable" apps from
   appearing in the list of "installed" apps. This is because the two
   lists of apps are no longer displayed alongside eachother.
 * Enhances the `AppListItemController` to also be able to display
   whether or not the currently installed version is the recommended
   version or not.
 * Also adds option to display whether the user has asked to ignore any
   updates for any specific apps.
2017-03-08 10:34:22 +11:00
Peter Serwylo
92943ebdf3 Port intent which handles incoming fdroid repos from NFC.
Moved intent-filter from FDroid to MainActivity. Can test from the
command line with:

```
adb shell am start -a android.nfc.action.NDEF_DISCOVERED \
 -d fdroidrepo://10.0.1.10:8888/fdroid/repo
```
2017-03-08 10:33:32 +11:00
Peter Serwylo
5e6eed9963 Ported 'Add repo' intents from FDroid to MainActivity 2017-03-08 10:33:32 +11:00
Peter Serwylo
3bc97d931b Ported 'View App' and 'Search' intents from FDroid to MainActivity 2017-03-08 10:33:32 +11:00
Peter Serwylo
09af5402e8 Reference MainActivity instead of FDroid where appropriate.
Left old references to FDroid from within classes that are only part
of the old UI. These are to be removed once the new UI is done.
2017-03-08 09:42:32 +11:00
Peter Serwylo
26b9e09f2f Launch AppDetails2 instead of AppDetails in most places. 2017-03-07 18:21:17 +11:00
Peter Serwylo
9bc72ff102 App list: Show a list of apps matching a particular category.
This populates a search box with the category name and shows a
clear button to the right and a back button to the left of the
text input.
2017-03-07 18:21:17 +11:00
Peter Serwylo
b151374a6c Introduce new main activity, currently mostly empty.
This activity so far has a bottom navigation bar with 5 tabs.
The tabs can be changed, but no content is shown.
2017-03-03 13:14:05 +11:00
Chirayu Desai
5e59138082 Remove unused permission org.fdroid.fdroid.privileged.USE_SERVICE
* This was removed by [1] and a whitelist is being used instead
  of this signature protected permission
* Closes #861

[1]: 80452dec24
2017-02-23 22:46:20 +05:30
mvp76
34450569b3 Initial work on details view 2016-11-18 15:39:53 +01:00
Peter Serwylo
8757acca1a Added category provider.
Not used by anything yet.
2016-11-10 08:09:49 +11:00
Hans-Christoph Steiner
8affa08d11 auto-download and -install any associated OBB files
This implements the APK Extension Files spec for finding, downloading, and
installing OBB files that are extension packs for APKs.

This needs WRITE_EXTERNAL_STORAGE since "installing" OBB files is just
copying them to a specific path on the external storage.

https://developer.android.com/google/play/expansion-files.html
2016-10-06 19:12:01 +02:00
Hans-Christoph Steiner
a5e6dad9bf allow apps to request OBB download URLs from F-Droid
By sending an Intent to F-Droid, it will reply with the full download URL
to the OBB file, if one exists for the currently installed version of the
requesting app.
2016-10-06 18:00:25 +02:00
Peter Serwylo
8ed884887a WIP: Making metadata table work. Requires significant refactorings throughout :( 2016-10-06 03:01:07 +11:00
Hans-Christoph Steiner
f102ccff60 allow install history to be read from an ContentProvider
This allows a designated app to read the install history from F-Droid via a
ContentProvider.  The app is designated by the packageName defined in the
string install_history_reader_packageName.
2016-09-29 12:09:50 +02:00
Hans-Christoph Steiner
c02125db01 store install/uninstall history for later use
The install and uninstall history has lots of uses, including displaying
to the user in the app itself, reporting to the Device Administrator to
enable tracking of installs/uninstalls from the admin's app repo, etc.  It
can also be used as part of a "popularity contest" #396
2016-09-29 12:09:50 +02:00