1813 Commits

Author SHA1 Message Date
Daniel Martí
3d55c0b45b Remove unused jdk* spongycastle source files 2015-04-07 10:47:24 +02:00
Daniel Martí
c7b16c6713 Only use 3.X workarounds on 3.X 2015-04-07 10:44:33 +02:00
Daniel Martí
2f80d37c24 Add name for 5.1 (22) 2015-04-07 10:44:33 +02:00
Daniel Martí
b18231c25d Don't shadow PreferenceFragment class name
I chose PreferencesFragment (plural) in concordance with PreferencesActivity.
2015-04-07 10:44:28 +02:00
Daniel Martí
dc86129cca More final keywords 2015-04-06 17:54:28 +02:00
Daniel Martí
14a38f2f50 Better explain our code style 2015-04-06 17:54:28 +02:00
Daniel Martí
81c44ef4ae Merge branch 'fix168' into 'master'
Fix #168: Not enough space for version number and license

downgrade weight from 2 to 1 and from 1 to 0

See merge request !62
2015-04-05 16:57:11 +00:00
Daniel Martí
9261f60225 Merge branch 'fix127' into 'master'
Fix #127: Add text wrapping in application view

Similar fix like in #168.

See merge request !63
2015-04-05 16:56:34 +00:00
Nico Alt
b017f35010 fix #127: Add text wrapping in application view 2015-04-04 22:30:18 +02:00
Nico Alt
d6cac24fed fix #168: Not enough space for version number and license
downgrade weight from 2 to 1 and from 1 to 0
2015-04-04 22:11:10 +02:00
Daniel Martí
8dfeabcf18 Fix broken link (spongycastle java file moved/gone) 2015-04-03 00:08:21 +02:00
Daniel Martí
d70252a3f2 Add HACKING md file 2015-04-02 09:57:47 +02:00
Daniel Martí
822a75258c Shorten some logging tags 2015-04-02 09:46:32 +02:00
Peter Serwylo
d62a3c711d Correctly select swappable apps from list.
Previously, there was a bug with an off-by-one error, as android-11
or later was treating the headerView different to android-10 and
earlier. They now both have the same understanding about the header
view.
2015-04-02 16:20:23 +11:00
Peter Serwylo
9db556f4b7 Hack to get layouts working on API > 16
For some reasono specify different layout-v* directories to inflate
views based on the android version is  not working as desired.
Previously there was a "layout", "layout-land" and "layout-v11" dir.
Only "layout" and "layout-v11" had the "select_local_apps_list_item.xml"
layout in them, the "layout-v11" version did _not_ have a checkbox,
whereas the other vanilla one did.

This worked on a android-16 emulator. It would correctly pick up the
view from "layout-v11". However, on a android-19 device, android-19
emulator, android-21 device and android-21 emulator, they all picked
up the view from the "layout" dir - with checkbox and all.

I couldn't figure out for the life of my why this was happening, so
I started to figure out which one it _would_ work with. I added
a layout-v* for every single version, and in each, put a text view
telling me which version it was. That way, viewing the list of apps to
swap, the list would inflate a view, and tell me which layout-v* dir it
inflated it from. It worked for layout-v17 and higher, but was unable
to inflate layouts from layout-v11 to layout-v16. So I deleted all
except layout-v17, and it now works for android-16, 19 and 21 as per my
tests.
2015-04-02 14:37:40 +11:00
Peter Serwylo
ead4f449d6 Fix #211 - don't force every incoming intent to be a repo intent. 2015-04-02 09:42:48 +11:00
Daniel Martí
0a515dfae1 Bump to 0.84-test 0.84-test 2015-04-01 20:56:47 +02:00
Daniel Martí
4fb12261e4 Simplify some spongycastle symlinks 2015-04-01 20:55:41 +02:00
Daniel Martí
1845e392d2 Ignore stuff from imported libs 2015-04-01 20:52:48 +02:00
Daniel Martí
2cd026b34b Forgot to update the support-v4-preferencefragment paths in ant 2015-04-01 20:35:26 +02:00
Daniel Martí
9e82463e46 More final keywords 2015-04-01 17:12:52 +02:00
Daniel Martí
05aa6a39fa Small cursor null, count and close() 2015-04-01 17:04:51 +02:00
Daniel Martí
0506160f7b Make use of List.contains(o) since it already does .equals() 2015-04-01 16:57:16 +02:00
Daniel Martí
ea559d0675 Add some final keywords
Especially in constants within classes, which allows for inlining.
2015-04-01 16:17:34 +02:00
Daniel Martí
bdbb6ce03a Outdent all switch cases 2015-04-01 13:27:23 +02:00
Daniel Martí
1295158de2 Small style fix to the last commit 2015-04-01 13:14:28 +02:00
Daniel Martí
b0e4f59f43 Use string switches from Java 1.7
Advantages:
 * Greatly simplifies code
 * No variable name duplication
 * Potentially more efficient bytecode
2015-04-01 13:09:02 +02:00
Daniel Martí
3eddb1402c Infer more types taking advantage of java 1.7 to simplify code 2015-04-01 12:11:23 +02:00
Daniel Martí
d9590743d9 Get rid of root build.gradle hacks again
Now that we controll all lib build.gradle files, we can finally do it.

If we want to build support-v7 from source again with gradle, we'll import the
build.gradle and "fix" it like the rest.
2015-04-01 11:59:31 +02:00
Daniel Martí
94eb8c7084 Update support-v4-preferencefragment aar 2015-04-01 11:32:39 +02:00
Daniel Martí
5fef0d012f Clean v4-preferencefragment build.gradle 2015-04-01 11:28:51 +02:00
Daniel Martí
2ce62aac65 Adapt our gradle setup to the new v4-preferencefragment location 2015-04-01 11:28:36 +02:00
Daniel Martí
6159013b36 Replace support-v4-preferencefragment submodule with checked in code 2015-04-01 11:24:09 +02:00
Daniel Martí
2f2a3a7755 Clarify that we're using a slightly different spongycastle 2015-04-01 11:22:09 +02:00
Daniel Martí
274013ad68 Update spongycastle to open-keychain/spongycastle master
Current master (HEAD) is 2c744ebade816d2e4f65f3734db373e4c19c2e4f
2015-04-01 11:16:37 +02:00
Daniel Martí
893e68b3da Don't use older jmdns when not building from source 2015-04-01 10:57:39 +02:00
Daniel Martí
ee287220b8 Forgot to bump zxing maven dep after bumping the source dep 2015-04-01 10:49:46 +02:00
Peter Serwylo
0db2499666 Merge branch 'swap/refinement-towards-stable' 2015-04-01 16:52:49 +11:00
Peter Serwylo
e3b73ff49a Update changelog to specify swap stuff is fixed. 2015-04-01 16:51:44 +11:00
Peter Serwylo
a2be7d9013 Fix update count, breakage from rebase, and broken tests.
The update count was broken because I added the join onto the
apk table, and in the process, forced a GROUP BY on the AppProvider
queries. This group by made the COUNT(*) actually count the number
of apks for each app, not the total rows.
2015-04-01 16:20:20 +11:00
Peter Serwylo
2a481f6889 Correctly navigate "up" to the swap list.
When viewing app details from a swap list, we need to return to the
swap list when pressing "up". Previously it would go to the main list
of apps, and only return to the swap list when pressing "back".

Now, a subclass of AppDetails is used when in swap mode, which knows
how to navigate up to the correct task.
2015-04-01 15:34:40 +11:00
Peter Serwylo
a16bc22c4a Fixed broken + commented out tests.
They were all due to the addition of "application label" to the
installed app cache. This commit adds a mock ApplicationInfo
to the mock package manager and also specifies the label while
inserting into the test content provider.
2015-04-01 15:33:58 +11:00
Peter Serwylo
9dfa18aead Make F-Droid tests runnable from Gradle.
This also makes AndroidStudio integration work better, which makes
running and debugging tests much nicer than the CLI.

Also cleaned up imports in one test, and made the symlink tests not
fail on older devices below API 19.
2015-04-01 15:33:51 +11:00
Peter Serwylo
da566b44ce Don't show swap apps in the main list of apps.
Achieve this by joining the fdroid_app table onto fdroid_apk and then
fdroid_repo, then checking if fdroid_repo.isSwap is 1.
2015-04-01 15:32:38 +11:00
Peter Serwylo
85300331e0 Minor cleanup after CR.
Formatting, spelling, NonNull/Nullable annotations, removing unused
imports, and adding SuppressWarning for unused logging "TAG" properties.
2015-04-01 15:32:36 +11:00
Peter Serwylo
f5ce318be7 Fix for fragment not displaying on 2.3 device.
Also, app details now goes to the "Swap app list" rather than the main list of
apps after hitting the "Up" button from the ActionBar.
2015-04-01 15:30:57 +11:00
Peter Serwylo
842ddb5e24 Trying to make LocalRepo stuff have less subtle side effects.
I had trouble wrapping my head around which point in time the fdroid/repo
directories are created, when they are populated with .html files, and
when the index.xml is put there. I did some minor cleaning up to make
it a bit easier to manage this in the future.
2015-04-01 15:30:21 +11:00
Peter Serwylo
20f17da913 Clean after merge. Refactor swap index.xml generation (to work with API 7).
Althought the construction of the XML document was fine witn Android 7,
the actual serialization of it was limited to 8 or higher. Try as I might,
I couldn't find a way to figure out how to serialize a DOM tree on API 7.

Turns out that the "PullParser" API is able to build and serialize XML
trees on API 7. It's a little clunkier than the DOM alternative, so I
refactored out the generation into a subclass to make it clearer what
it is doing and when.
2015-04-01 15:30:21 +11:00
Peter Serwylo
5036deb61e Swap apps more robust on API < 11. Only show swap repos sometimes.
* Selecting apps to swap fixed

Before the checking of a list item would not actually register it to
be included in the swap. This has been rectified.

 * Added a new property to repos for "isSwap"

Repositories with this property are not shown in the Manage Repos
activity, as there is not much benefit to having this happen.

 * More robust error handling when symlinking files

Before it would check for stdout or stderr and then throw an exception.
This happened even on successful symlinks on my 2.3.3 device. As such,
I've put the error checking after the shell command has completely finished
(just in case there were any race conditions), and more importantly, checked
for the presence of the file being linked - rather than just stdout or
stderr.

 * More code cleanup

Generics <> operator, Nullable annotations, removal of dead code.
db-version/47
2015-04-01 15:30:19 +11:00
Peter Serwylo
c6705e2cb9 Fixed all warnings from LocalRepoManager.java
* Removed dead code
 * Added some Nullable/NonNull annotations to prevent future misuses of variables.
 * More verbose errors when an error occurs creating directories/files.
2015-04-01 15:27:26 +11:00