Add Gradle build config to PluginQR and update it to match new source conventions.
Version code is bumped because there was a minor code change to avoid a fatal lint error complaining about a memory leak. Fixes #489.
@@ -7,4 +7,7 @@ call gradlew assemble
|
|||||||
cd ..\Keepass2AndroidPluginSDK2
|
cd ..\Keepass2AndroidPluginSDK2
|
||||||
call gradlew assemble
|
call gradlew assemble
|
||||||
|
|
||||||
cd ..\..\build-scripts
|
cd ..\PluginQR
|
||||||
|
call gradlew assemble
|
||||||
|
|
||||||
|
cd ..\..\build-scripts
|
||||||
|
|||||||
@@ -15,4 +15,8 @@ pushd Keepass2AndroidPluginSDK2
|
|||||||
./gradlew assemble
|
./gradlew assemble
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
pushd PluginQR
|
||||||
|
./gradlew assemble
|
||||||
|
popd
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
|||||||
1
src/java/PluginQR/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
/build
|
||||||
1
src/java/PluginQR/app/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
/build
|
||||||
37
src/java/PluginQR/app/build.gradle
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
apply plugin: 'com.android.application'
|
||||||
|
|
||||||
|
android {
|
||||||
|
compileSdkVersion 26
|
||||||
|
buildToolsVersion '26.0.2'
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
applicationId "keepass2android.plugin.qr"
|
||||||
|
minSdkVersion 14
|
||||||
|
targetSdkVersion 19
|
||||||
|
versionCode 3
|
||||||
|
versionName "1.0.2"
|
||||||
|
}
|
||||||
|
|
||||||
|
buildTypes {
|
||||||
|
release {
|
||||||
|
minifyEnabled true
|
||||||
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility 1.8
|
||||||
|
targetCompatibility 1.8
|
||||||
|
}
|
||||||
|
|
||||||
|
lintOptions {
|
||||||
|
disable 'ExtraTranslation'
|
||||||
|
disable 'MissingTranslation'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compile project(':Keepass2AndroidPluginSDK2')
|
||||||
|
compile 'com.google.zxing:core:2.3.0'
|
||||||
|
}
|
||||||
@@ -1,8 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="keepass2android.plugin.qr"
|
package="keepass2android.plugin.qr" >
|
||||||
android:versionCode="2"
|
|
||||||
android:versionName="1.0.1" >
|
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.CAMERA"/>
|
<uses-permission android:name="android.permission.CAMERA"/>
|
||||||
<uses-permission
|
<uses-permission
|
||||||
@@ -15,10 +13,6 @@
|
|||||||
<uses-feature android:name="android.hardware.camera.flash" android:required="false"/>
|
<uses-feature android:name="android.hardware.camera.flash" android:required="false"/>
|
||||||
<uses-feature android:name="android.hardware.screen.portrait" android:required="false"/>
|
<uses-feature android:name="android.hardware.screen.portrait" android:required="false"/>
|
||||||
|
|
||||||
<uses-sdk
|
|
||||||
android:minSdkVersion="14"
|
|
||||||
android:targetSdkVersion="19" />
|
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
android:icon="@drawable/ic_launcher"
|
android:icon="@drawable/ic_launcher"
|
||||||
@@ -61,7 +61,7 @@ public final class WifiResultHandler extends ResultHandler {
|
|||||||
public void handleButtonPress(int index) {
|
public void handleButtonPress(int index) {
|
||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
WifiParsedResult wifiResult = (WifiParsedResult) getResult();
|
WifiParsedResult wifiResult = (WifiParsedResult) getResult();
|
||||||
WifiManager wifiManager = (WifiManager) getActivity().getSystemService(Context.WIFI_SERVICE);
|
WifiManager wifiManager = (WifiManager) getActivity().getApplicationContext().getSystemService(Context.WIFI_SERVICE);
|
||||||
if (wifiManager == null) {
|
if (wifiManager == null) {
|
||||||
Log.w(TAG, "No WifiManager available from device");
|
Log.w(TAG, "No WifiManager available from device");
|
||||||
return;
|
return;
|
||||||
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |