-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from Crazy-Marvin/development
Release candidate 1.0
- Loading branch information
Showing
71 changed files
with
2,035 additions
and
0 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: CI | ||
on: push | ||
jobs: | ||
build: | ||
runs-on: macos-latest | ||
steps: | ||
- name: "📥 Check-out" | ||
uses: actions/checkout@v2 | ||
- name: "🧪 Gradle Wrapper Validation" | ||
uses: gradle/wrapper-validation-action@v1 | ||
- name: "🧰 Install JDK" | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
java-package: jdk | ||
- name: "🧰 Install Android SDK" | ||
uses: malinskiy/action-android/install-sdk@release/0.0.5 | ||
with: | ||
acceptLicense: yes | ||
- name: "🏗 Build" | ||
run: ./gradlew assembleDebug | ||
- name: "🧪 Code coverage" | ||
run: ./gradlew jacocoTestReport | ||
- name: "📤 Upload code coverage" | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
yml: .codecov.yml | ||
- name: "🧪 Android LINT" | ||
run: ./gradlew lint | ||
- name: "🧪 Unit test" | ||
run: ./gradlew test |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,17 @@ | ||
[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/Crazy-Marvin/Flashy/CI/development)](https://github.com/Crazy-Marvin/Flashy/actions) | ||
[![License](https://img.shields.io/github/license/Crazy-Marvin/Flashy.svg)](https://github.com/Crazy-Marvin/Flashy/blob/development/LICENSE) | ||
[![Last commit](https://img.shields.io/github/last-commit/Crazy-Marvin/Flashy.svg?style=flat)](https://github.com/Crazy-Marvin/Flashy/commits) | ||
[![Releases](https://img.shields.io/github/downloads/Crazy-Marvin/Flashy/total.svg?style=flat)](https://github.com/Crazy-Marvin/Flashy/releases) | ||
[![Latest tag](https://img.shields.io/github/tag/Crazy-Marvin/Flashy.svg?style=flat)](https://github.com/Crazy-Marvin/Flashy/tags) | ||
[![Issues](https://img.shields.io/github/issues/Crazy-Marvin/Flashy.svg?style=flat)](https://github.com/Crazy-Marvin/Flashy/issues) | ||
[![Pull requests](https://img.shields.io/github/issues-pr/Crazy-Marvin/Flashy.svg?style=flat)](https://github.com/Crazy-Marvin/Flashy/pulls) | ||
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/379c59381e784f42b5910864e574bd8e)](https://www.codacy.com/gh/Crazy-Marvin/Flashy?utm_source=github.com&utm_medium=referral&utm_content=Crazy-Marvin/Flashy&utm_campaign=Badge_Grade) | ||
[![codecov](https://codecov.io/gh/Crazy-Marvin/Flashy/branch/master/graph/badge.svg)](https://codecov.io/gh/Crazy-Marvin/Flashy) | ||
[![Crowdin](https://badges.crowdin.net/flashy/localized.svg)](https://crowdin.com/project/flashy) | ||
[![Known Vulnerabilities](https://snyk.io/test/github/Crazy-Marvin/Flashy/badge.svg?targetFile=app%2Fbuild.gradle)](https://snyk.io/test/github/Crazy-Marvin/Flashy?targetFile=app%2Fbuild.gradle) | ||
[![API](https://img.shields.io/badge/API-19%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=19) | ||
[![F-Droid](https://img.shields.io/f-droid/v/rocks.poopjournal.flashy.svg)](https://f-droid.org/en/packages/rocks.poopjournal.flashy/) | ||
[![Google Play](https://badgen.net/badge/icon/googleplay?icon=googleplay&label)](https://play.google.com/store/apps/details?id=rocks.poopjournal.flashy) | ||
|
||
# Flashy | ||
Simple & Privacy-Friendly Flashlight App |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
apply plugin: 'com.android.application' | ||
|
||
android { | ||
compileSdkVersion 29 | ||
buildToolsVersion "29.0.2" | ||
defaultConfig { | ||
applicationId "rocks.poopjournal.flashy" | ||
minSdkVersion 19 | ||
targetSdkVersion 29 | ||
versionCode 1 | ||
versionName "1.0" | ||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||
} | ||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation fileTree(dir: 'libs', include: ['*.jar']) | ||
implementation 'androidx.appcompat:appcompat:1.1.0' | ||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3' | ||
testImplementation 'junit:junit:4.12' | ||
androidTestImplementation 'androidx.test.ext:junit:1.1.1' | ||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' | ||
implementation 'androidx.legacy:legacy-support-v4:1.0.0' | ||
implementation 'com.google.android.material:material:1.1.0' | ||
|
||
implementation 'me.tankery.lib:circularSeekBar:1.2.0' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":1,"versionName":"1.0","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}] |
27 changes: 27 additions & 0 deletions
27
app/src/androidTest/java/com/poopjournal/flashy/ExampleInstrumentedTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.poopjournal.flashy; | ||
|
||
import android.content.Context; | ||
|
||
import androidx.test.platform.app.InstrumentationRegistry; | ||
import androidx.test.ext.junit.runners.AndroidJUnit4; | ||
|
||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
|
||
import static org.junit.Assert.*; | ||
|
||
/** | ||
* Instrumented test, which will execute on an Android device. | ||
* | ||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a> | ||
*/ | ||
@RunWith(AndroidJUnit4.class) | ||
public class ExampleInstrumentedTest { | ||
@Test | ||
public void useAppContext() { | ||
// Context of the app under test. | ||
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); | ||
|
||
assertEquals("com.poopjournal.flashy", appContext.getPackageName()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
package="com.poopjournal.flashy"> | ||
<uses-permission android:name="android.permission.WRITE_SETTINGS"/> | ||
<uses-permission android:name="android.permission.CAMERA" /> | ||
<uses-feature android:name="android.hardware.camera" /> | ||
<uses-feature android:name="android.hardware.camera.autofocus" /> | ||
<application | ||
|
||
android:allowBackup="true" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_name" | ||
android:roundIcon="@mipmap/ic_launcher_round" | ||
android:supportsRtl="true" | ||
android:theme="@style/AppTheme" | ||
tools:ignore="GoogleAppIndexingWarning"> | ||
<activity android:name=".MainActivity" android:configChanges="orientation"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
</application> | ||
|
||
</manifest> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package com.poopjournal.flashy; | ||
|
||
import android.app.Activity; | ||
import android.app.Dialog; | ||
import android.graphics.Point; | ||
import android.graphics.drawable.ColorDrawable; | ||
import android.util.Log; | ||
import android.view.Display; | ||
import android.view.Gravity; | ||
import android.view.Window; | ||
import android.view.WindowManager; | ||
import android.widget.LinearLayout; | ||
import android.widget.RelativeLayout; | ||
|
||
public class DialogsUtil { | ||
|
||
|
||
|
||
|
||
public static Dialog showNoFlashLightDialog(Activity activity){ | ||
|
||
Dialog dialog; | ||
dialog = new Dialog(activity); | ||
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); | ||
dialog.setContentView(R.layout.dialog_no_flashlight); | ||
|
||
dialog.getWindow().getAttributes().gravity = Gravity.BOTTOM; | ||
dialog.getWindow().getAttributes().verticalMargin = 0; | ||
dialog.getWindow().getAttributes().horizontalMargin=0; | ||
dialog.getWindow().setBackgroundDrawable( | ||
new ColorDrawable(activity.getResources().getColor(R.color.colorDialogTransclucent))); | ||
dialog.getWindow().setLayout(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT); | ||
dialog.setCancelable(true); | ||
dialog.setCanceledOnTouchOutside(true); | ||
|
||
return dialog; | ||
|
||
} | ||
|
||
} |
Oops, something went wrong.