2097 Commits

Author SHA1 Message Date
Hans-Christoph Steiner
b8261fcecf EXTRA_REPO_ERRORS in Intents should be a CharSequence[], not an ArrayList
This was including the instance of the ArrayList in the Intent, rather than
the expected CharSequence[].
2015-08-03 11:58:34 +02:00
Hans-Christoph Steiner
60f02c0181 in Downloader, instance vars that are set in constructor should be final 2015-08-01 21:02:39 +02:00
Hans-Christoph Steiner
5582e906c8 disable Install/Run/Uninstall button when the install process is running
To make things less confusing, this disables the main button on AppDetails
when something is running.  During install, it also changes the text of the
button to "Installing..."
2015-08-01 21:02:39 +02:00
Hans-Christoph Steiner
7d48ad736c replace Downloader's ProgressListener with local broadcasts
This removes lots of boiler plate, makes it much easier to get the info
where it is needed, and puts the code in line with rest of FDroid. The
ProgressListener pattern was forcing a lot of passing the listener
instances around through classes that never used the listener even.
2015-08-01 21:02:38 +02:00
Hans-Christoph Steiner
e984ed82ef run index update in the background after adding a new repo
That makes that repo automatically ready for use based on user actions like
adding a new repo, switching an existing repo on, etc.

This also lowers the priority of the "update" menu item since it shouldn't
be needed any more.  But leave it for now, just in case.
2015-08-01 21:02:38 +02:00
Hans-Christoph Steiner
cd0b5b80f9 purge unused methods from ApkDownloader and AsyncDownloadWrapper 2015-08-01 20:58:14 +02:00
Hans-Christoph Steiner
5d4bdf6139 all Downloaders have a URL, so make the base class store it for use
This lets the local broadcasts include the URL as an extra, and other
tricks.
2015-08-01 20:58:14 +02:00
Hans-Christoph Steiner
9a9bf92126 make all Downloaders get a Context so the base class can use those tricks
Having a Context in Downloader means that the communications can be changed
to a LocalBroadcastManager, following the pattern that is in a lot of this
app already.
2015-08-01 20:58:14 +02:00
Hans-Christoph Steiner
80063eb786 simplify Downloader constructors
Since all Downloaders are created via the DownloaderFactory, put the temp
file creation there, then we can remove lots of constructors.
2015-08-01 20:58:14 +02:00
Hans-Christoph Steiner
4fd914ac7a convert repo update dialog to a notification
Since the repo updates are happening in an IntentService, they are already
running in a separate thread.  Ironically, the dialog was showing in spite
of that.  This removes the dialog entirely and instead puts up a
Notification with the same messages.  Ultimately, the "refresh" button
should go away, the repos should be updated whenever someone goes to
install an app, and all APK downloads should also show up in the same
Notification.

This removes UpdateReceiver entirely and replaces it with local broadcasts,
since that is a common pattern in FDroid and Android.  It also reduces the
amount of code here.

refs #103 https://gitlab.com/fdroid/fdroidclient/issues/103
2015-08-01 20:58:14 +02:00
Hans-Christoph Steiner
1d263b2aee fix sending repo via NFC
This was my stupid mistake: using a String for a class, instead of a .class
so that when ManageRepo was renamed to ManageRepoActivity, this broke.
2015-08-01 20:55:37 +02:00
Hans-Christoph Steiner
46978e1086 make RepoDetails scrollable and add a QR code to the bottom
Having a QR Code of the repo makes it easy for people to share the repo to
someone else.
2015-08-01 20:55:37 +02:00
Hans-Christoph Steiner
7ea294bb66 switch RepoDetailsActivity to plain structure, purge RepoDetailsFragment
No need for a reusable Fragment here, its only used in one place.  This
changes the structure to be a regular Activity, with all View and Menu
setup in XML files loaded in onCreate().

This also converts the URL to a TextView.  Having it editable in this
Activity makes for a confusing user experience.  Instead, the "Add Repo"
input should validate the URL and not allow creating repos that don't work.

This also purges the use of UpdateService.UpdateReceiver, it will be going
away in the upcoming commits.
2015-08-01 20:55:37 +02:00
Daniel Martí
50ac03e97d Bump gradle plugin to 1.3.0 2015-07-31 17:13:42 -07:00
Daniel Martí
7f3acb215e Bundling support-v4 as a binary dep is no longer necessary 2015-07-30 20:24:25 -07:00
Daniel Martí
040c900be5 Bump to 0.95-alpha2, prepare for stable v0.95-alpha2 2015-07-30 10:28:40 -07:00
Daniel Martí
e9ce43832a Finish up changelog
* Don't imply that material design is completely finished
* Shorten changelog links item
2015-07-30 10:24:11 -07:00
Daniel Martí
4935ba5c8d Merge branch 'ensure-large-icon-urls-exist' of https://gitlab.com/pserwylo/fdroidclient 2015-07-30 10:19:49 -07:00
Peter Serwylo
92f7d5e197 Add changelog entry about changelogs. Mind blown.
Made sure to include a comment about needing to update the index
in order to get changelogs to show.
2015-07-30 21:39:59 +10:00
Peter Serwylo
4565f58a75 Clear out the etag from the repo table to "force" update.
We are not forcing an update, in the sense that we make the update
service run. Rather, we are ensuring that the next update wont return
after doing nothing, with the message "repos already up to date".
In this case, the repo metadata (and hence its etag) is the same,
but we made changes in the client to handle the metadata correctly.
Thus, we don't care that it hasn't changed, we want to update anyhow.
2015-07-30 21:06:30 +10:00
Peter Serwylo
e1a8c42f9e Ensure icon URLs are always populated when database is upgraded.
Did this by using the same query which is used to update the icon URLs
after updating the index. To make this same method accessible, without
causing sad database locking, had to expose the method from AppProvider
in a way which would let DBHelper access it. See comments in code for
further explainations.

While there, removed the final lint warning in my Android Studio for
the AppProvider. This was a warning because we could have ended up
iterating over a null object. Although it turns out there was a correct
guard in place which would ensure this didn't happen, it wasn't in such
a way that lint would understand. Thus, I changed the guard condition
around `for( String blah : CommaSeparatedList.make() ) {}` to let lint
relax and not be so pedantic.
db-version/50
2015-07-30 21:06:30 +10:00
Daniel Martí
a5c65f7b30 Unused resource cleanup #2 2015-07-28 22:15:58 -07:00
Daniel Martí
6ebd24e2bb Re-run remove-unused-trans after unused resource cleanup 2015-07-28 22:08:26 -07:00
Daniel Martí
083ceca893 Remove unused resources
These went unnoticed because apparently lint.xml was omitting all unused
resources, not just default_repo.xml.
2015-07-28 22:04:45 -07:00
Daniel Martí
b152c682fa Move lint config to build.gradle
* Removed UnusedResources from default_repo.xml, since there are none of those
  warnings anymore
* Same for TrulyRandom in the whole project
2015-07-28 21:39:33 -07:00
Daniel Martí
f3e08bdc68 Add a few changelog items 2015-07-25 21:24:35 -07:00
Daniel Martí
378c177490 Remove android-support-v4 jar since it was only needed by ant 2015-07-25 21:15:22 -07:00
Daniel Martí
96906ec35a Remove test jar libs since gradle pulls them from jcenter 2015-07-25 21:13:55 -07:00
Daniel Martí
5e0683df23 Remove ant stuff from the test project
Forgot to get rid of those when removing ant support
2015-07-25 21:06:53 -07:00
Daniel Martí
07c19aef37 Prepare jenkins-build for gradle 2015-07-25 21:04:32 -07:00
Daniel Martí
49400a9ed9 Remove ant from HACKING 2015-07-25 21:02:40 -07:00
Daniel Martí
340cba3ebe Bump gradle plugin version 2015-07-25 21:01:39 -07:00
Daniel Martí
17b6ca83d7 Merge branch 'master' of https://gitlab.com/relan/fdroidclient 2015-07-24 10:21:08 -07:00
relan
8f2c827280 Fix padding in dialogs
Padding around content area should be 24dp. See the Material Design spec:

	http://www.google.com/design/spec/components/dialogs.html#dialogs-specs
2015-07-23 09:47:27 +03:00
relan
28ba6921d1 Tint links
Apply the accent color to links.
2015-07-23 09:46:33 +03:00
relan
0b7c5fb616 Tint preference dialogs
Apply the accent color to EditTextPreference and ListPreference. They
use android.app.AlertDialog.Builder, not
android.support.v7.app.AlertDialog.Builder, so the theme has to be
specified using "android:alertDialogTheme" attribute in addition to
AppCompat's "alertDialogTheme". For the same reason those dialogs won't
be tinted on pre-Lollipop Android versions.
2015-07-23 09:41:37 +03:00
relan
04e8b591ab Tint alert dialogs
Apply the accent color to alert dialog buttons. Note that without
"android:windowMinWidthMajor" and "android:windowMinWidthMinor" attributes
dialog width is calculated incorrectly resulting in visual artifacts.
2015-07-23 09:19:20 +03:00
Daniel Martí
85ae6f86b1 Quote version patterns as well 0.95-alpha1 2015-07-21 11:48:09 -07:00
Daniel Martí
cfff0ba0e8 Bump to 0.95-alpha1 2015-07-21 11:47:14 -07:00
Daniel Martí
79943b9d4a Explain new versioning scheme in the README 2015-07-21 11:47:14 -07:00
Daniel Martí
97f5697af7 Don't have extremely long lines in the README 2015-07-21 11:06:13 -07:00
relan
4b699d5376 Use AlertDialog from the support library
This unifies look of alert dialogs across various Android versions and
allows proper tinting.
2015-07-20 11:17:40 +03:00
Daniel Martí
c9f6be61b5 Merge branch 'crash-app-on-unknown-cursor-column' of https://gitlab.com/slackydeb/fdroidclient 2015-07-19 20:43:15 -07:00
Luca Favatella
b7527e78e7 Log error when view finds unknown column in model
This stricter behaviour would have reported a more meaningful error
easing investigation for issue #276 on Android 2.1.
2015-07-20 03:26:22 +01:00
Daniel Martí
f875c6902f Merge branch 'master' of https://gitlab.com/relan/fdroidclient 2015-07-19 11:55:22 -07:00
relan
bcb3ac1fe0 Fix identical bitmaps across various configurations
No need to put mdpi images into drawable/ directory since F-Droid does not
support Android 1.5. This fixes appropriate warning from lint.
2015-07-19 19:34:25 +03:00
Daniel Martí
f97b1851e6 Merge branch 'master' of https://gitlab.com/relan/fdroidclient 2015-07-17 09:52:09 -07:00
relan
6ddd1571c7 Change repositories icon
Use ic_toc_white instead of ic_view_headline_white. The latter often used
to show navigation drawer and thus may be confusing.
2015-07-17 15:43:42 +03:00
relan
2dc689e2a1 Remove icons from dialogs titles
Dialogs should not have icons in their title bars. See the Material Design
spec:

    http://www.google.com/design/spec/components/dialogs.html
2015-07-17 09:59:34 +03:00
relan
f0f0bd09d3 Reuse existing refresh icon
Use Material-style icon instead of the old Holo-style one.
2015-07-17 09:20:47 +03:00