-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e7b696c
commit 9dda148
Showing
62 changed files
with
3,842 additions
and
895 deletions.
There are no files selected for viewing
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
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
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
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
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
This file was deleted.
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
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,62 +1,63 @@ | ||
plugins { | ||
id 'com.android.application' | ||
id 'kotlin-android' | ||
} | ||
|
||
android { | ||
signingConfigs { | ||
release { | ||
storeFile file('C:\\work\\src\\openp2p-client\\app\\openp2p.jks') | ||
storePassword 'YOUR-PASSWORD' | ||
keyAlias 'openp2p.keys' | ||
keyPassword 'YOUR-PASSWORD' | ||
} | ||
} | ||
compileSdkVersion 30 | ||
buildToolsVersion "30.0.3" | ||
|
||
defaultConfig { | ||
applicationId "cn.openp2p" | ||
minSdkVersion 16 | ||
targetSdkVersion 30 | ||
versionCode 1 | ||
versionName "2718281828" | ||
|
||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled true | ||
shrinkResources true | ||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | ||
signingConfig signingConfigs.release | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
targetCompatibility JavaVersion.VERSION_1_8 | ||
} | ||
kotlinOptions { | ||
jvmTarget = '1.8' | ||
} | ||
buildFeatures { | ||
viewBinding true | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation fileTree(dir: "libs", include: ["*.jar", "*.aar"]) | ||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" | ||
implementation 'androidx.core:core-ktx:1.3.1' | ||
implementation 'androidx.appcompat:appcompat:1.2.0' | ||
implementation 'com.google.android.material:material:1.2.1' | ||
implementation 'androidx.annotation:annotation:1.1.0' | ||
implementation 'androidx.constraintlayout:constraintlayout:2.0.1' | ||
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.2.0' | ||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0' | ||
testImplementation 'junit:junit:4.+' | ||
androidTestImplementation 'androidx.test.ext:junit:1.1.2' | ||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' | ||
implementation files('libs\\openp2p-sources.jar') | ||
plugins { | ||
id 'com.android.application' | ||
id 'kotlin-android' | ||
} | ||
|
||
android { | ||
signingConfigs { | ||
release { | ||
storeFile file('C:\\work\\src\\openp2p-client\\app\\openp2p.jks') | ||
storePassword 'YOUR-PASSWORD' | ||
keyAlias 'openp2p.keys' | ||
keyPassword 'YOUR-PASSWORD' | ||
} | ||
} | ||
compileSdkVersion 31 | ||
buildToolsVersion "30.0.3" | ||
|
||
defaultConfig { | ||
applicationId "cn.openp2p" | ||
minSdkVersion 16 | ||
targetSdkVersion 31 | ||
versionCode 1 | ||
versionName "2718281828" | ||
|
||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||
namespace "cn.openp2p" | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled true | ||
shrinkResources true | ||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | ||
signingConfig signingConfigs.release | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
targetCompatibility JavaVersion.VERSION_1_8 | ||
} | ||
kotlinOptions { | ||
jvmTarget = '1.8' | ||
} | ||
buildFeatures { | ||
viewBinding true | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation fileTree(dir: "libs", include: ["*.jar", "*.aar"]) | ||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" | ||
implementation 'androidx.core:core-ktx:1.3.1' | ||
implementation 'androidx.appcompat:appcompat:1.2.0' | ||
implementation 'com.google.android.material:material:1.2.1' | ||
implementation 'androidx.annotation:annotation:1.1.0' | ||
implementation 'androidx.constraintlayout:constraintlayout:2.0.1' | ||
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.2.0' | ||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0' | ||
testImplementation 'junit:junit:4.+' | ||
androidTestImplementation 'androidx.test.ext:junit:1.1.2' | ||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' | ||
implementation files('libs\\openp2p-sources.jar') | ||
} |
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
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 cn.openp2p | ||
|
||
import android.content.BroadcastReceiver | ||
import android.content.Context | ||
import android.content.Intent | ||
import android.net.VpnService | ||
import android.os.Build | ||
import android.os.Bundle | ||
import android.util.Log | ||
import cn.openp2p.ui.login.LoginActivity | ||
class BootReceiver : BroadcastReceiver() { | ||
override fun onReceive(context: Context, intent: Intent) { | ||
// Logger.log("pp onReceive "+intent.action.toString()) | ||
Log.i("onReceive","start "+intent.action.toString()) | ||
// if (Intent.ACTION_BOOT_COMPLETED == intent.action) { | ||
// Log.i("onReceive","match "+intent.action.toString()) | ||
// VpnService.prepare(context) | ||
// val intent = Intent(context, OpenP2PService::class.java) | ||
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { | ||
// context.startForegroundService(intent) | ||
// } else { | ||
// context.startService(intent) | ||
// } | ||
// } | ||
Log.i("onReceive","end "+intent.action.toString()) | ||
} | ||
} |
Oops, something went wrong.