1727 Commits

Author SHA1 Message Date
Daniel Martí
db803bfb0c Split up search terms by whitespaces. Fixes #58 2015-03-31 02:13:15 +02:00
Daniel Martí
60cd63c274 Forgot to fix up the receiver package names 2015-03-30 21:18:43 +02:00
Daniel Martí
ac820baf72 Don't use ArrayList over List unless necessary 2015-03-30 21:07:58 +02:00
Daniel Martí
e1df9c600c Move receivers into subdir 2015-03-30 20:57:31 +02:00
Daniel Martí
82f4a975bb Don't inline log tags, add missing TAG constants 2015-03-30 20:52:40 +02:00
Daniel Martí
fdfdb0935f Remove apparently useless uri logs 2015-03-30 20:37:01 +02:00
Daniel Martí
c1cdd5dce1 Remove unused imports 2015-03-30 20:25:37 +02:00
Daniel Martí
bc1b057324 Remove empty lines at beggining of java files 2015-03-30 20:14:52 +02:00
Daniel Martí
e887379dc2 Small style fix 2015-03-30 20:12:20 +02:00
Daniel Martí
d90ea02b50 Add feature requested in #154 to the changelog 2015-03-30 19:12:53 +02:00
Daniel Martí
e6efffb981 Add support for amazon app links 2015-03-30 19:02:16 +02:00
Daniel Martí
8239f12ff7 Add support for play.google.com search urls 2015-03-30 18:36:32 +02:00
Daniel Martí
53aa7ec849 Add support for play.google.com app links
As requested in #154
2015-03-30 18:07:03 +02:00
Daniel Martí
d22c714dbd Ignore leading and trailing whitespaces in search keywords
As reported in #58
2015-03-30 17:41:35 +02:00
Daniel Martí
85d7752d0a Use the same logging tag scheme everywhere
We were using different methods and violating the correctness error
"Log tags are only allowed to be at most 23 tag characters long." as reported
by lint.

Changes:

* Always start tags by "fdroid." (even though it's a bit redundant)
* Replace "org.fdroid.fdroid." by "fdroid."
* Don't include "compat.", "data." "views.fragments." et al (these didn't and
  shouldn't be namespaces really, only for file/code organisation)
* Do include parent classes for subclasses, e.g. "fdroid.RepoProvider.Helper"
  since these can conflict
2015-03-30 17:16:56 +02:00
Daniel Martí
97b93aaa2b Start changelog for the upcoming release 2015-03-30 16:59:37 +02:00
Daniel Martí
76396f224f Bump gradle plugin to 1.1.3
We also no longer depend on the undocumented internal variable sdkFolder
2015-03-30 16:49:56 +02:00
Daniel Martí
cd667371e6 Merge branch 'fix-85/remove-downloaded-index-files' of https://gitlab.com/pserwylo/fdroidclient 2015-03-30 16:39:45 +02:00
Daniel Martí
ebacde9631 Bump build-tools to 22.0.1 2015-03-30 16:38:11 +02:00
Daniel Martí
bd4cd81f50 Merge branch 'fix/issue-34-empty-list' of https://gitlab.com/pserwylo/fdroidclient 2015-03-30 16:22:22 +02:00
Daniel Martí
c11fdd11d8 Bump to 0.83 0.83 2015-03-26 19:07:25 +01:00
Daniel Martí
f1084452d4 Add remove-empty-trans script and run it 2015-03-26 19:05:36 +01:00
Daniel Martí
0ced75d451 Bump to 0.82 0.82 2015-03-23 16:44:45 +01:00
Daniel Martí
bb775bde08 Run translation fixing scripts 2015-03-23 16:43:38 +01:00
Daniel Martí
61f9d3ac86 Run fix-apostrophes 2015-03-23 12:21:08 +01:00
F-Droid Translatebot
cb9ef84027 Translation updates 2015-03-23 08:55:31 +00:00
Daniel Martí
bc69c8d6ed Run fix-apostrophes 2015-03-19 19:43:18 +01:00
F-Droid Translatebot
0736aef5fc Translation updates 2015-03-19 18:37:46 +00:00
Daniel Martí
40308ce8cb Prepare changelog for release 2015-03-19 19:35:12 +01:00
Peter Serwylo
eaea0e2c23 Fix #85: Remove downloaded index files that hang around.
If the download process is interrupted, a "dl-" file hangs around in
F-Droid's cache directory. If the download succeeds, extracts an xml
file from the downloaded .jar file, and then the rest of the process
is interrupted, then a "index-*.xml" file hangs around in F-Droids
files directory.

This fix removes these two types of left over files when F-Droid
is started. In addition, it also makes it so that the downloaded
repo indexes are now more clearly named "index-*-downloaded" (with no
extension, because the code which does it doesn't know whether it is
a .jar or .xml file, and it doesn't matter anyway). Also, it extracts
the .xml files to the cache directory too (instead of the files dir)
and names them "index-*-extracted.xml".

There is some code which removes the old "dl-" files that will become
redundant after the first time it is executed on a users device after
upgrading F-Droid. It is a very small amount of code run on startup,
so I am not concerned about the performance implications of leaving it
there, but I put a comment explaining that it can be removed in the
future.

Includes minor formatting changes, and a few annotations.
2015-03-19 07:38:54 +11:00
Daniel Martí
8e394563e4 A couple more things in the changelog 2015-03-16 20:28:24 +01:00
Peter Serwylo
3abb426fc3 Added a message when any of the app lists are empty.
Previously, a few people have been confused by an empty list when they first
open F-Droid (e.g. if they are not connected to the internet, and repos didn't
update). This provides some feedback so that there is never a blank screen.

Fixes Issue #34.
2015-03-16 21:42:10 +11:00
Daniel Martí
c2eb9a9b67 Bump to 0.81-test 0.81-test 2015-03-15 19:14:04 +01:00
Daniel Martí
f77f9c5435 Run remove-partial-arrays 2015-03-15 19:13:30 +01:00
Daniel Martí
8b03a0c196 Update the changelog with recent fixes/changes 2015-03-15 17:29:11 +01:00
Daniel Martí
680a468b6c Don't use fragment adapter if it's null (fixes #82) 2015-03-15 17:13:42 +01:00
Daniel Martí
06ae1bc044 Merge branch 'fix/issue-5-guess-repo-path' of https://gitlab.com/pserwylo/fdroidclient 2015-03-15 16:58:06 +01:00
Peter Serwylo
09029dd193 Merge branch 'refresh_header_161' into 'master'
Refresh AppDetails header on package state change (fix #161)

Update the application details to display the correct state on
application install/uninstall.

Should fix issue #161
https://gitlab.com/fdroid/fdroidclient/issues/161

See merge request !56
2015-03-13 14:03:25 +00:00
Romain Vimont
f0a8780755 Use the same fragment id for portrait & landscape
To refresh the header, we retrieve the fragment from its id.

But the landscape layout used another id for the same fragment, so it
could not be retrieved, leading to a NullPointerException in landscape.

Therefore, use the same fragment id as in the portrait layout.
2015-03-13 14:48:58 +01:00
Romain Vimont
cb3b2e0d8e Refresh AppDetails header on package state change
Update the application details to display the correct state on
application install/uninstall.

Should fix issue #161
https://gitlab.com/fdroid/fdroidclient/issues/161
2015-03-13 14:48:58 +01:00
Peter Serwylo
74b285a77f Fix Issue #5: Guess at common repo paths (/, /fdroid/repo, /repo)
When adding repositories using the Manage Repos activity, firstly look
for an /index.jar appended on the URL provided by the user. If that
doesn't work (HTTP status code other than 200) then it will try
/fdroid/repo/index.jar, then /repo/index.jar. If it can't establish a
connection to the server, or if none of the above attempts results
in a 200, then the path provided by the user is kept (even though we
have a hunch it might be wrong).

This is to cover for the case where people arn't connected to the net.
Another way to deal with no internet connectivity is provided by a
"Skip" button on the dialog while searching for the index.jar.

The searching for index.jar is done by doing a HTTP HEAD request, so
the entire jar needn't be downloaded.

Finally, to make this happen in a clean sort of way, I refactored the
ManageReposActivity a little bit to encapsulate all of the add repo
dialog handling into a subclass. This way, the outer class doesn't
need to know things like: Is the dialog showing, what state is it in,
is the background task to search for index.jar files running, how and
when to cancel that task, etc.
2015-03-14 00:44:17 +11:00
Peter Serwylo
d7c19c76c9 Merge branch 'npe_135' into 'master'
Do not manually call onChange() (fix NPE)

If the AppDetails activity has been destroyed by the system during an
application installation/remove, it is recreated once it should be
displayed again (this behavior can be forced by enabling "Don't keep
activities" in Android developer options).

In onCreate(), it passes its instance of myInstallerCallback to an
Installer. In onActivityResult() (which is called before onResume()),
this installer calls a method (onSuccess() or onError()) on this
callback. The implementation of these methods (the anonymous inner class
assigned to myInstallerCallback) dereference myAppObserver, which is
still null, because it will be initialized in onResume(), so a
NullPointerException is thrown.

However, the problem is not only that myAppObserver.onChange() is called
when myAppObserver is null, but that it should not be called manually at
all: it is a ContentObserver, so it is automatically called when
registered to the content resolver. As a consequence, this callback was
called twice.

Removing these calls fix both problems.

Should fix issue #135
https://gitlab.com/fdroid/fdroidclient/issues/135

See merge request !58
2015-03-13 12:37:34 +00:00
Romain Vimont
eef1e0a406 Externalize application changed actions
When we receive notifications indicating that the app has changed, the
App object needs to be changed and the view updated.

These notifications can be received from two sources:
 - the ContentObserver;
 - onActivityResult().

Thus, the implementation should not be related to the ContentObserver
(in theory, we might want to keep only the onActivityResult()
notification). Therefore, move it to a separate method in AppDetails.

This also preventively avoids bugs when the ContentObserver is null.
2015-03-13 10:57:29 +01:00
Romain Vimont
578084ff96 Revert "Do not manually call onChange() (fix NPE)"
This reverts commit 47e065442edc108d4bb38f9daaa7cdb3fff26b49.

Now that the ContentObserver is created when activity is started (even if not
resumed), then it will be non-null during onActivityResult(). Therefore,
the calls to onChange() will not lead to NullPointerException anymore.

The reason why we want to manually call onChange() is that the
ContentObserver notifications may happen several seconds later:
https://gitlab.com/fdroid/fdroidclient/merge_requests/58#note_948719
2015-03-13 10:26:42 +01:00
Romain Vimont
cda80f5de6 Register ContentObserver when activity is started
The ContentObserver was registered only when the activity was in resumed
state. However, in started but paused state (when the activity is
visible but not in focus), we still want to receive these notifications
to update the view.

Therefore, register it on start and unregister it on stop.

As a consequence, myAppObserver will be non-null during
onActivityResult().
2015-03-13 10:22:06 +01:00
Romain Vimont
4e2ab4c048 Call super.onPause() first
super.onPause() should always be called first:
http://developer.android.com/training/basics/activity-lifecycle/pausing.html#Pause
2015-03-13 10:18:26 +01:00
Romain Vimont
47e065442e Do not manually call onChange() (fix NPE)
If the AppDetails activity has been destroyed by the system during an
application installation/remove, it is recreated once it should be
displayed again (this behavior can be forced by enabling "Don't keep
activities" in Android developer options).

In onCreate(), it passes its instance of myInstallerCallback to an
Installer. In onActivityResult() (which is called before onResume()),
this installer calls a method (onSuccess() or onError()) on this
callback. The implementation of these methods (the anonymous inner class
assigned to myInstallerCallback) dereference myAppObserver, which is
still null, because it will be initialized in onResume(), so a
NullPointerException is thrown.

However, the problem is not only that myAppObserver.onChange() is called
when myAppObserver is null, but that it should not be called manually at
all: it is a ContentObserver, so it is automatically called when
registered to the content resolver. As a consequence, this callback was
called twice.

Removing these calls fix both problems.

Should fix issue #135
https://gitlab.com/fdroid/fdroidclient/issues/135
2015-03-12 16:21:19 +01:00
Daniel Martí
070054892e Run optipng -o9 on all png images 2015-03-11 23:35:03 +01:00
Daniel Martí
bd6e2a3046 Bump gradle plugin to 1.0.1
I tried 1.1.3, but it failed. Needs further investigation.
2015-03-11 23:32:05 +01:00
Daniel Martí
6eff521459 Bump build-tools to 22.0.0 2015-03-11 23:09:42 +01:00