Commit graph

62 commits

Author SHA1 Message Date
Chris Narkiewicz
49d858ea9f
Migrate PowerUtils calls to PowerManagementService
Signed-off-by: Chris Narkiewicz <hello@ezaquarii.com>
2019-06-05 15:43:43 +01:00
Chris Narkiewicz
5923737b29
Battery charging status API
Battery charing checks are currently performed using evernote jobs API.
This ties our power management to rather unrelated 3rd party library.

This change provides battery check API via app power management
abstraction. It will also allow to access native battery API on
Android Lollipop and newer in the future.

This change does not migrate any current code to new API.

Signed-off-by: Chris Narkiewicz <hello@ezaquarii.com>
2019-05-29 16:28:27 +01:00
Tobias Kaminsky
df3ac186b4
Move PowerUtils to dedicated power management service (#4073)
Move PowerUtils to dedicated power management service
2019-05-28 11:30:35 +02:00
tobiasKaminsky
9cdc9269a6
ktlint
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2019-05-28 11:12:41 +02:00
tobiasKaminsky
3d7b14386a
added gpl license header
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2019-05-28 11:01:55 +02:00
tobiasKaminsky
90d9600418
add ktlint
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2019-05-28 10:02:36 +02:00
Chris Narkiewicz
d34d3f5f27
Move PowerUtils to dedicated power management service
Signed-off-by: Chris Narkiewicz <hello@ezaquarii.com>
2019-05-28 00:51:57 +01:00
Chris Narkiewicz
412f9eb1c8
Refactor ConnectivityUtils
Signed-off-by: Chris Narkiewicz <hello@ezaquarii.com>
2019-05-18 13:44:41 +01:00
Jens Mueller
8bb654b5ef fix test & review comments
Signed-off-by: Jens Mueller <tschenser@gmx.de>
2019-04-18 08:42:36 +02:00
Chris Narkiewicz
1275728182
Rename PreferenceManager to AppPreferencesImpl
PreferenceManager name conficts with platform PreferenceManager.

Signed-off-by: Chris Narkiewicz <hello@ezaquarii.com>
2019-04-12 15:46:23 +01:00
Andy Scherzinger
8353ef42bb
Merge pull request #3864 from nextcloud/connectivityutils-powermock-test
test: added PowerMocked unit tests for the ConnectivityUtils class.
2019-04-11 14:34:38 +02:00
ardevd
477bc797aa
removed placeholder test class
Signed-off-by: ardevd <edvard.holst@gmail.com>
2019-04-11 13:15:36 +02:00
tobiasKaminsky
a97eb3b45b
- use lombok
- remove m prefix
- correct assert output
- add licence

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2019-04-11 08:14:11 +02:00
ardevd
8712c9e783
tests: added unit tests for the OwnCloudSession class
Signed-off-by: ardevd <edvard.holst@gmail.com>
2019-04-11 08:14:04 +02:00
ardevd
bbf779917d
removed hungarian notation
Signed-off-by: ardevd <edvard.holst@gmail.com>
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2019-04-10 12:41:23 +02:00
ardevd
94fb4ad349
minor cleanup
Signed-off-by: ardevd <edvard.holst@gmail.com>
2019-04-09 20:37:36 +02:00
ardevd
ffeaa7f766
added file header
Signed-off-by: ardevd <edvard.holst@gmail.com>
2019-04-09 20:36:14 +02:00
ardevd
81184d0266
test: added unit tests for the PowerUtils util class.
Signed-off-by: ardevd <edvard.holst@gmail.com>
2019-04-09 20:35:04 +02:00
ardevd
e03dfc695d
updated tests
Signed-off-by: ardevd <edvard.holst@gmail.com>
2019-04-09 19:57:02 +02:00
ardevd
e17e5f6bd7
test: added PowerMocked unit tests for the ConnectivityUtils class.
Added necessary PowerMock dependencies in addition to a JSON dependency which is required in order to unit test with JSON objects. The default JSON library is part of AOSP and would need to be mocked which is not what we want.

Signed-off-by: ardevd <edvard.holst@gmail.com>
2019-04-09 14:59:18 +02:00
ardevd
6b2ddd97fe
added GPL header
Signed-off-by: ardevd <edvard.holst@gmail.com>
2019-04-09 10:55:46 +02:00
ardevd
2f6cf091df
tests: added unit tests for the ConnectivityUtils util class.
The isOnlineWithWifi() method is fully covered by these tests.

Signed-off-by: ardevd <edvard.holst@gmail.com>
2019-04-09 10:55:46 +02:00
tobiasKaminsky
1646e46bde
remove test prefix name
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2019-04-08 11:55:46 +02:00
tobiasKaminsky
f932ab3f5b
added nullable
add null checks

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
wip

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2019-04-05 09:51:25 +01:00
ardevd
7d97b267af
updated assertion failure text. return empty string if arguments are null 2019-04-05 10:24:32 +02:00
ardevd
fa047b751b
tests: added unit tests for the StringUtils class.
Provides full test coverage of said class.

Signed-off-by: ardevd <edvard.holst@gmail.com>
2019-04-03 09:56:04 +02:00
Chris Narkiewicz
e521d25d63
Move sort order preferences to AppPreferences interface
Signed-off-by: Chris Narkiewicz <hello@ezaquarii.com>
2019-03-10 01:25:31 +00:00
Chris Narkiewicz
a003c4b953
Refactor legacy instant upload prefs removal
Signed-off-by: Chris Narkiewicz <hello@ezaquarii.com>
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2019-03-04 15:47:21 +00:00
tobiasKaminsky
f92c6b9170
fix tests
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2019-02-06 12:39:11 +01:00
tobiasKaminsky
d47c77ca5c
Add support for QR codes & deep links
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2019-01-21 17:27:20 +01:00
tobiasKaminsky
e5597e14c9
import location change in test
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2018-12-10 10:22:55 +01:00
Andy Scherzinger
be320936d9
Test case for sorting hidden files/folders - see #3280 2018-11-28 09:04:49 +01:00
tobiasKaminsky
506dee2337
sort & compare for two tests
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2018-10-17 15:52:38 +02:00
Stephan Lohse
9b19f3940b Fix IllegalArgumentException on files with dots in name, add test case 2018-10-14 22:54:21 +02:00
tobiasKaminsky
7358c3dd09
- change long to bigInteger
- add another test

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2018-09-04 10:41:35 +02:00
AndyScherzinger
fc36bf73d4
fix tests after rebase 2018-07-03 19:15:09 +02:00
tobiasKaminsky
9d7f5b226e
fix unit test
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2018-06-15 11:51:18 +02:00
tobiasKaminsky
76d3747748
Add support for integration tests
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2018-05-23 08:51:35 +02:00
eho
07770a2268 activities: Added copyright headers 2018-04-29 19:49:54 +02:00
tobiasKaminsky
f6c650d046
Activites -> Activities
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2018-04-26 11:13:18 +02:00
ardevd
162fdb9d8a tests: Added unit tests for the RemoteFilesRepository class.
Provides 100% coverage of the RemoteFilesRepository class.
2018-04-23 13:45:23 +02:00
ardevd
99122f1467 tests: Added unit tests for the RemoteActivitiesRepository class. 2018-04-23 13:40:31 +02:00
ardevd
9a9a4629e0 tests: Updated ActvitiesPresenter unit tests with the new interface methods. 2018-04-23 13:25:25 +02:00
ardevd
81a300077c test: Added unit tests for the Activities Presenter.
This provides 100% coverage of the Activities Presenter class.
2018-04-23 12:59:42 +02:00
tobiasKaminsky
15579828bb
use long instead of integer
add fallback if number is too big

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>

with '#' will be ignored, and an empty message aborts the commit.
2018-03-20 07:37:56 +01:00
tobiaskaminsky
ce970cf42b
fix wrong folder sorting, when OCFile.compareTo() is used
added testcases

Signed-off-by: tobiaskaminsky <tobias@kaminsky.me>
2018-03-15 12:16:08 +01:00
tobiasKaminsky
d95e8a98a6
Natural sorting, for digits use value (01 -> 1), order by leading zeros (1 > 01)
use AlphanumComparator also for folder comparison

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2018-03-15 12:16:07 +01:00
tobiasKaminsky
c5d492cee9
Natural sorting, for digits use value (01 -> 1), order by leading zeros (1 > 01)
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2018-03-15 12:16:04 +01:00
AndyScherzinger
69f313561d
codacy: fix code style issues 2018-02-07 12:26:28 +01:00
tobiasKaminsky
41c602193a
remove EncryptionTest as it is now part of EncryptionIT 2018-01-15 08:11:54 +01:00