Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kotlin and a bunch of other stuff #95

Merged
merged 63 commits into from
Feb 22, 2017
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
b760d84
add kotlin. Automaticaly convert only for settingsModel
smichel17 Nov 1, 2016
1cf781b
kotlin makes things pretty
smichel17 Nov 1, 2016
73eebc8
use property initializers instead of init block. less verbose.
smichel17 Nov 1, 2016
10a1e6a
merge feature_stop_state
smichel17 Nov 1, 2016
ed2ec4f
change filter mode to automatic toggle and code cleanup.
smichel17 Nov 1, 2016
31b6877
automatic convert shadesfragment to kotlin
smichel17 Nov 1, 2016
52a4c39
fix errors in automatic kotlin conversion
smichel17 Nov 1, 2016
ed27961
Mostly functional location switch. convert to kotlin because studio i…
smichel17 Nov 11, 2016
de6b684
fix build errors and some warnings
smichel17 Nov 11, 2016
833b34a
Merge branch 'master' of github.com:raatmarien/red-moon into kotlin
smichel17 Nov 11, 2016
a583faa
remove unused imports and alphebatize the rest
smichel17 Nov 12, 2016
3a341a9
fix null parameter crash on start
smichel17 Nov 12, 2016
1789337
Fix android studio warnings
smichel17 Nov 12, 2016
9876ef1
Make most places null safe
smichel17 Nov 13, 2016
bb3cb14
fix build errors and some Studio warnings
smichel17 Nov 13, 2016
1da9558
new design, skeleton mostly complete
smichel17 Nov 14, 2016
21069ad
rename ShadesFragment to FilterFragment
smichel17 Nov 14, 2016
3f8c48a
re-add location preference (but keep location toggle)
smichel17 Nov 14, 2016
36be1d2
replace onSettingsChangeListener with EventBus
smichel17 Nov 16, 2016
9fd5b7a
Change minimum SDK version for UsageStatsManager
raatmarien Nov 20, 2016
4c7ab46
Use "usagestats" instead of constant on API 21
raatmarien Nov 20, 2016
6da0a39
Merge branch 'master' of github.com:raatmarien/red-moon into kotlin
smichel17 Nov 20, 2016
6f36402
allow debug to be installed alongside release
smichel17 Nov 20, 2016
4ddce66
replace FilterCommand[Factory/Sender/Parser] with EventBus
smichel17 Nov 21, 2016
e1afbbc
Replace `pause` with `off`
smichel17 Nov 21, 2016
9ca785f
Merge branch 'master' of github.com:raatmarien/red-moon into kotlin
smichel17 Nov 22, 2016
3d4c47b
Many changes.
smichel17 Nov 30, 2016
9e552bb
fix build errors
smichel17 Dec 1, 2016
99545a9
Merge branch 'master' of github.com:raatmarien/red-moon into kotlin
smichel17 Dec 1, 2016
ff0d2b7
fixed some strings that slipped through
smichel17 Dec 1, 2016
3be4703
Another messy commit, sorry. Includes:
smichel17 Jan 28, 2017
c0ab902
Merge branch 'master' of github.com:raatmarien/red-moon into kotlin
smichel17 Jan 28, 2017
36e4293
fix more merge stuff
smichel17 Jan 28, 2017
30b93df
add secure suspend and time toggle activities
smichel17 Feb 4, 2017
ef60c92
Fix some issues with opening Activities from prefs
raatmarien Feb 5, 2017
8d97285
Returned to sending filter state changes via intent.
smichel17 Feb 6, 2017
a15d38d
enable debug in ScreenFilterService, fix AndroidManifest
smichel17 Feb 6, 2017
87090df
enable more debugging
smichel17 Feb 6, 2017
f068484
more and cleaner logging, fix state change bugs
smichel17 Feb 7, 2017
2a62b37
correctly set profile spinner to custom
smichel17 Feb 7, 2017
b15c876
fix filter command sending
smichel17 Feb 7, 2017
7e0cb66
Clean up ScreenFilterPresenter by
smichel17 Feb 9, 2017
410620c
cleanup style and warnings
smichel17 Feb 9, 2017
5631b48
update copyright notices
smichel17 Feb 9, 2017
5e6412c
Allow toggling the filter while it is turning off
smichel17 Feb 10, 2017
22c0759
Better (not best) fix for toggling the filter while it is turning off
smichel17 Feb 10, 2017
f464f2b
rename ShadesActivity to MainActivity
smichel17 Feb 10, 2017
c417f32
Refactor filter toggle to be a static method of ScreenFilterService
smichel17 Feb 10, 2017
a589d47
remove unused ShortcutToggleActivity
smichel17 Feb 11, 2017
340ef70
finally fix toggling by using a new intent for each command
smichel17 Feb 11, 2017
f7092b3
clean up minor warnings and formatting
smichel17 Feb 11, 2017
3dbf5e5
bugfix: toggling secure suspend toggle while filter is on works again
smichel17 Feb 12, 2017
d11177c
re-add TimeToggleChangeReciever to manifest, accidentally removed in …
smichel17 Feb 12, 2017
05814ce
clean up profile selector preference, remove old unecessary bugfix in…
smichel17 Feb 18, 2017
bf0e2ef
keep scroll position when changing theme
smichel17 Feb 18, 2017
a8117c9
cancel the right animator
smichel17 Feb 18, 2017
41dc1c0
clean up locationUpdateService
smichel17 Feb 20, 2017
c2ad7d2
don't hard code the context used to start ScreenFilterService
smichel17 Feb 20, 2017
dbeec87
fix crash on api<23
smichel17 Feb 20, 2017
0a7b057
Don't email when opening project page
raatmarien Feb 22, 2017
8c306f7
Show correct animation when closing subactivity
raatmarien Feb 22, 2017
e15eab9
Ask for location permission when it isn't granted
raatmarien Feb 22, 2017
9c3ba57
Set top switch correctly in onResume
raatmarien Feb 22, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ ext {
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

android {
compileSdkVersion 24
Expand All @@ -21,6 +22,9 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
}

dependencies {
Expand All @@ -29,4 +33,9 @@ dependencies {
compile "com.android.support:design:$android_support_version"
compile 'com.luckycatlabs:SunriseSunsetCalculator:1.2'
compile 'com.github.paolorotolo:appintro:3.4.0'
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile 'org.greenrobot:eventbus:3.0.0'
}
repositories {
mavenCentral()
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,12 @@
** ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
** SOFTWARE.
*/
package com.jmstudios.redmoon;
package com.jmstudios.redmoon

import android.app.Application;
import android.test.ApplicationTestCase;
import android.app.Application
import android.test.ApplicationTestCase

/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
* [Testing Fundamentals](http://d.android.com/tools/testing/testing_android.html)
*/
public class ApplicationTest extends ApplicationTestCase<Application> {
public ApplicationTest() {
super(Application.class);
}
}
class ApplicationTest : ApplicationTestCase<Application>(Application::class.java)

This file was deleted.

74 changes: 0 additions & 74 deletions app/src/main/java/com/jmstudios/redmoon/activity/Intro.java

This file was deleted.

66 changes: 66 additions & 0 deletions app/src/main/java/com/jmstudios/redmoon/activity/Intro.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/*
* Copyright (c) 2016 Marien Raat <marienraat@riseup.net>
*
* This file is free software: you may copy, redistribute and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option)
* any later version.
*
* This file is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.jmstudios.redmoon.activity

import android.os.Bundle

import com.github.paolorotolo.appintro.AppIntro
import com.github.paolorotolo.appintro.AppIntroFragment

import com.jmstudios.redmoon.R

class Intro : AppIntro() {
override fun init(savedInstanceState: Bundle?) {
addSlide(AppIntroFragment.newInstance(getString(R.string.intro_slide_1_title),
getString(R.string.intro_slide_1_text),
R.drawable.intro_slide_1,
0xFFD32F2F.toInt()))

addSlide(AppIntroFragment.newInstance(getString(R.string.intro_slide_2_title),
getString(R.string.intro_slide_2_text),
R.drawable.intro_slide_2,
0xFF2196F3.toInt()))

addSlide(AppIntroFragment.newInstance(getString(R.string.intro_slide_3_title),
getString(R.string.intro_slide_3_text),
R.drawable.intro_slide_3,
0xFF388E3C.toInt()))

addSlide(AppIntroFragment.newInstance(getString(R.string.intro_slide_4_title),
getString(R.string.intro_slide_4_text),
R.drawable.intro_slide_4,
0xFFFFB300.toInt()))
}

override fun onSkipPressed() {
// Do something when users tap on Skip button.
finish()
}

override fun onDonePressed() {
// Do something when users tap on Done button.
finish()
}

override fun onSlideChanged() {
// Do something when the slide changes.
}

override fun onNextPressed() {
// Do something when users tap on Next button.
}
}