3722 Commits

Author SHA1 Message Date
Dominik Schürmann
834c08db3c Code cleanup in Installer 2016-05-01 23:14:29 +02:00
Dominik Schürmann
17f712870b Fix crash of transparent dialogs on Android 6 2016-05-01 23:10:41 +02:00
Peter Serwylo
dad993f7b8 Merge branch 'ci-bump' into 'master'
CI: Bump image, use 64-bit emulator

Since the base image is now 200MB smaller, this one too. Also updates
the SDK to 25.1.3.

See merge request !271
2016-04-30 23:31:14 +00:00
Daniel Martí
10904aa9a3 Merge branch 'pmd' into 'master'
Enable some more PMD rules



See merge request !270
2016-04-29 23:20:17 +00:00
Daniel Martí
37fe708f2b CI: Switch to 64-bit emulator 2016-04-30 00:05:34 +01:00
Daniel Martí
128d390e9c wait-for-emulator: don't prepend "unknown"
This way, error lines like this one:

    Waiting for emulator to start: unknown: error: no devices found

Become:

    Waiting for emulator to start: error: no devices found
2016-04-29 20:49:19 +01:00
Daniel Martí
7bc130d81a wait-for-emulator: skip adb log messages
Otherwise, we'd interpret this as "booting", which is wrong:

     $ adb -e shell getprop init.svc.bootanim
    * daemon not running. starting it now on port 5037 *
    * daemon started successfully *
    error: no devices found
2016-04-29 20:46:25 +01:00
Daniel Martí
f0d6c7c720 CI: Bump image
Since the base image is now 200MB smaller, this one too. Also updates
the SDK to 25.1.3.
2016-04-29 20:23:29 +01:00
Daniel Martí
023a6d01bd PMD: Enable some extra boolean/logic rules 2016-04-29 19:22:30 +01:00
Daniel Martí
ac8d3ff600 PMD: Enable and obey UnnecessaryParentheses
This works on statements, not expressions, so it's a lot easier and
saner to obey than UselessParentheses.
2016-04-29 19:22:04 +01:00
Daniel Martí
e5bc365b64 PMD: Enable a bunch of strictexception rules
We already obey them.
2016-04-28 17:17:17 +01:00
Peter Serwylo
ffa6fb92b9 Updated CHANGELOG with performance impovements. 2016-04-28 15:06:47 +10:00
Peter Serwylo
f9b22442ed Simplify detach code by catching exception istead of querying for attached dbs. 2016-04-28 15:06:47 +10:00
Peter Serwylo
721dcb00c1 Use temporary, in memory database for update process.
This increases the speed of the complex queries required at the end
of the update process to:
 * calculate suggested version codes
 * figure out icon urls
 * etc,
by two orders of magnitude.
2016-04-28 15:06:44 +10:00
Peter Serwylo
ab248525e0 Don't do a subquery in a subquery in a subquery.
This was there as a workaround for #1, but that has subsequently
been fixed. Thus, the hack is no longer required. Also removed an
additional `AND` because it is already performed in the `JOIN`.
I supsect this last one would've been eliminated by the sqlite
optimizer anyway, but the query is slightly simpler now.

This fix doesn't improve performance as much as I'd hoped, but it
is something.
2016-04-28 09:04:26 +10:00
Daniel Martí
fdd441c382 Add Estonian (et, Eesti) to the langs list
Its first translations were added in the previous commit, pulled from
Weblate.
2016-04-27 15:27:38 +01:00
F-Droid Translatebot
9faa84fa90 Pull translation updates from Weblate
Translators:

Danial Behzadi            Persian
fastest noob              Turkish
Fert Bálint               Hungarian
Green Lunar               Hebrew
Jean-Baptiste             French
Karola Marky              Japanese
Kristjan Räts             Estonian
Licaon Kter               Romanian
Marian Hanzel             Slovak
Mohamad Hasan Al Banna    Indonesian
naofum                    Japanese
Tobias Bannert            German
YFdyh000                  Simplified Chinese
2016-04-27 15:09:16 +01:00
Daniel Martí
27d1187216 Merge branch 'notifications' into 'master'
Added cancel action to notifications.

![Screenshot__Apr_27__2016_2-41-30_AM_](/uploads/7756406732c8583117532e5fed151a2c/Screenshot__Apr_27__2016_2-41-30_AM_.png)

See merge request !267
2016-04-26 22:53:11 +00:00
Daniel Martí
1505047cb7 Merge branch 'updates-available-notification' into 'master'
Don't show "Updates Available" if auto updates is enabled.

This notification is redundant in this circumstance.

See merge request !268
2016-04-26 21:23:26 +00:00
Paresh Chouhan
d0ca382d80 Added cancel action to notifications. 2016-04-27 02:45:07 +05:30
Peter Serwylo
51e48f4416 Don't show "Updates Available" if auto updates is enabled.
This notification is redundant in this circumstance.
2016-04-27 07:09:26 +10:00
Peter Serwylo
7a880fdc33 Merge branch 'more-fixes' into 'master'
A few Java fixes and tweaks, enable more PMD rules



See merge request !266
2016-04-25 12:19:46 +00:00
Daniel Martí
87a4cfb27c Get rid of Log.d calls in src/main
Also, Log.d in tests don't make much sense - replace by Log.i. This way
it's easier to limit all Log.d calls to Utils.java.
2016-04-24 15:06:11 +01:00
Daniel Martí
70da6eaa12 Fix NPE when clicking on missing app links
This happened to me when I clicked on an app link for a new app which
was already in the repo, but I had not ran an index update yet since the
app got built. Stack trace prior to the fix follows.

	java.lang.RuntimeException: Unable to destroy activity {org.fdroid.fdroid/org.fdroid.fdroid.AppDetails}: java.lang.NullPointerException:
	Attempt to invoke virtual method 'void android.support.v4.content.LocalBroadcastManager.unregisterReceiver(android.content.BroadcastReceiver)' on a null
	object reference
		at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3865)
		at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3883)
		at android.app.ActivityThread.-wrap5(ActivityThread.java)
		at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1417)
		at android.os.Handler.dispatchMessage(Handler.java:102)
		at android.os.Looper.loop(Looper.java:148)
		at android.app.ActivityThread.main(ActivityThread.java:5461)
		at java.lang.reflect.Method.invoke(Native Method)
		at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
		at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
	Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void
	android.support.v4.content.LocalBroadcastManager.unregisterReceiver(android.content.BroadcastReceiver)' on a null object reference
		at org.fdroid.fdroid.AppDetails.unregisterDownloaderReceivers(AppDetails.java:469)
		at org.fdroid.fdroid.AppDetails.onDestroy(AppDetails.java:569)
		at android.app.Activity.performDestroy(Activity.java:6422)
		at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1143)
		at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3852)
		... 9 more
2016-04-24 14:57:32 +01:00
Daniel Martí
e860503141 CONTRIBUTING: Add Android.mk gradlew note
See #632.
2016-04-24 12:45:35 +01:00
Daniel Martí
f1230adfc1 Apply a few suggestions from Android Studio 2016-04-23 17:58:22 +01:00
Daniel Martí
145314a83a UpdateService: add missing cursor.close()
Found by Android Studio.
2016-04-23 17:38:42 +01:00
Daniel Martí
50b2e6f7a5 PMD: Enable and obey SingularField 2016-04-23 17:27:22 +01:00
Daniel Martí
68db3ae353 PMD: Enable and obey ImmutableField 2016-04-23 17:27:22 +01:00
Daniel Martí
c746a49b15 PMD: Enable some design.xml rules we already obey 2016-04-23 17:27:22 +01:00
Daniel Martí
f655f49aee PMD: Enable and obey UnnecessaryConstructor 2016-04-23 16:17:55 +01:00
Daniel Martí
857b0ea1c7 PMD: Enable and obey AddEmptyString 2016-04-23 16:14:05 +01:00
Daniel Martí
5d3d8786e2 PMD: Enable and obey PrematureDeclaration 2016-04-23 16:06:41 +01:00
Daniel Martí
32c67d05ec PMD: XML config file, enable most of unnecessary 2016-04-23 15:59:04 +01:00
Daniel Martí
6a0eec1262 DBHelper: don't wrap entire func bodies in ifs
This removes tons of unnecessary indenting. Do it in smaller functions
too for consistency.
2016-04-23 15:40:09 +01:00
Daniel Martí
7f2a811541 RepoXMLHandler: make helper func static 2016-04-23 15:37:49 +01:00
Daniel Martí
942cfd3cd1 AppDetails: guard against null fragment on destroy
Fixes a crash reported by ACRA:

	java.lang.RuntimeException: Unable to destroy activity {org.fdroid.fdroid/org.fdroid.fdroid.AppDetails}: java.lang.NullPointerException
		at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3281)
		at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3299)
		at android.app.ActivityThread.access$1200(ActivityThread.java:133)
		at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
		at android.os.Handler.dispatchMessage(Handler.java:99)
		at android.os.Looper.loop(Looper.java:137)
		at android.app.ActivityThread.main(ActivityThread.java:4812)
		at java.lang.reflect.Method.invokeNative(Native Method)
		at java.lang.reflect.Method.invoke(Method.java:511)
		at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:792)
		at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:559)
		at dalvik.system.NativeStart.main(Native Method)
	Caused by: java.lang.NullPointerException
		at org.fdroid.fdroid.AppDetails.cleanUpFinishedDownload(AppDetails.java:442)
		at org.fdroid.fdroid.AppDetails.onDestroy(AppDetails.java:567)
		at android.app.Activity.performDestroy(Activity.java:5366)
		at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1124)
		at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3268)
		... 11 more
2016-04-23 15:29:41 +01:00
Daniel Martí
99840b5bba Bump to 0.100-alpha5 v0.100-alpha5 2016-04-23 02:01:10 +01:00
F-Droid Translatebot
b1aac69989 Pull translation updates from Weblate
Translators:

Adrià García-Alzórriz      Catalan
Adrià García-Alzórriz      Spanish
mahmut özcan               Turkish
Marcelo Santana            Portuguese (Brazil)
Massimiliano Caniparoli    Italian
Mladen Pejaković           Serbian
Verdulo                    Esperanto
Verdulo                    Polish
2016-04-23 01:59:30 +01:00
Daniel Martí
d902612f41 Merge branch 'random-improvements' into 'master'
Random improvements



See merge request !262
2016-04-23 00:56:16 +00:00
Daniel Martí
a484c03816 PMD: Re-enable on test files
This used to be the case, which is why only minimal changes were
required to bring it back. This also makes it take the same files that
checkstyle does, which is more consistent.
2016-04-23 01:45:04 +01:00
Daniel Martí
2074718391 Get java code closer to obeying PMD's java-basic 2016-04-23 01:20:29 +01:00
Daniel Martí
7b70560c9b Remove unused class UnexpectedResponseException 2016-04-23 01:16:14 +01:00
Daniel Martí
3c63bd4b1c Various spacing fixes 2016-04-23 01:16:14 +01:00
Daniel Martí
df39b0fe40 Drop elses after returns 2016-04-23 01:16:14 +01:00
Daniel Martí
c560463887 CONTRIBUTING: use check, not connectedCheck
We now have unit tests that run on the local jvm, so use `check` to run
those too.
2016-04-23 01:16:14 +01:00
Daniel Martí
2eea94e5ea gradlew: bump to 2.12
Also remove the 2.11 restriction on the root build.gradle file. It's
unnecessary, as the Android plugin will already error if the version is
too old. This means that the build will work on any version that is new
enough, which should be 2.10-2.12 at the time of writing.
2016-04-23 01:16:14 +01:00
Daniel Martí
a8c5d8e765 Convert java file to unix format via dos2unix
I assume this file was copied over from a windows machine or created on
one. Use unix-style line endings throughout.
2016-04-23 01:16:14 +01:00
Daniel Martí
00c138e42f PMD: enable and obey java-unusedcode 2016-04-23 01:16:14 +01:00
Daniel Martí
c240283ad4 Merge branch 'download-service-pending-intent' into 'master'
Misc fixes/improvements to apk downloading

This started as a fix to #625, but quickly turned into a mini rampage to fix and/or improve a few different things in the `DownloaderService`. Hopefully the commits are self explanatory as to what they fix, but of course feel free to ask questions if you have any.

See merge request !265
2016-04-22 16:58:57 +00:00