├── app
├── .gitignore
├── src
│ ├── main
│ │ ├── open2share_icon-playstore.png
│ │ ├── res
│ │ │ ├── mipmap-hdpi
│ │ │ │ ├── open2share_icon.png
│ │ │ │ ├── open2share_icon_round.png
│ │ │ │ └── open2share_icon_background.png
│ │ │ ├── mipmap-mdpi
│ │ │ │ ├── open2share_icon.png
│ │ │ │ ├── open2share_icon_round.png
│ │ │ │ └── open2share_icon_background.png
│ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── open2share_icon.png
│ │ │ │ ├── open2share_icon_round.png
│ │ │ │ └── open2share_icon_background.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── open2share_icon.png
│ │ │ │ ├── open2share_icon_round.png
│ │ │ │ └── open2share_icon_background.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── open2share_icon.png
│ │ │ │ ├── open2share_icon_round.png
│ │ │ │ └── open2share_icon_background.png
│ │ │ ├── values
│ │ │ │ ├── open2share_icon_background.xml
│ │ │ │ ├── arrays.xml
│ │ │ │ ├── styles.xml
│ │ │ │ ├── strings.xml
│ │ │ │ ├── themes.xml
│ │ │ │ └── colors.xml
│ │ │ ├── layout
│ │ │ │ ├── activity_main.xml
│ │ │ │ ├── settings_activity.xml
│ │ │ │ ├── activity_receive_open.xml
│ │ │ │ └── activity_guide.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── open2share_icon.xml
│ │ │ │ └── open2share_icon_round.xml
│ │ │ ├── drawable
│ │ │ │ ├── ic_baseline_restore_from_trash_24.xml
│ │ │ │ ├── ic_baseline_mobile_screen_share_24.xml
│ │ │ │ ├── ic_baseline_help_24.xml
│ │ │ │ ├── open2share_icon_foreground.xml
│ │ │ │ └── ic_baseline_healing_24.xml
│ │ │ ├── values-zh
│ │ │ │ └── strings.xml
│ │ │ ├── values-zh-rCN
│ │ │ │ └── strings.xml
│ │ │ ├── values-zh-rHK
│ │ │ │ └── strings.xml
│ │ │ ├── values-zh-rTW
│ │ │ │ └── strings.xml
│ │ │ ├── xml
│ │ │ │ └── root_preferences.xml
│ │ │ └── values-night
│ │ │ │ └── themes.xml
│ │ ├── java
│ │ │ └── top
│ │ │ │ └── linesoft
│ │ │ │ └── open2share
│ │ │ │ ├── GuideActivity.java
│ │ │ │ ├── ReceiveOpenActivity.java
│ │ │ │ └── SettingsActivity.java
│ │ ├── AndroidManifest.xml
│ │ └── assets
│ │ │ └── guide.html
│ ├── test
│ │ └── java
│ │ │ └── top
│ │ │ └── linesoft
│ │ │ └── open2share
│ │ │ └── ExampleUnitTest.java
│ └── androidTest
│ │ └── java
│ │ └── top
│ │ └── linesoft
│ │ └── open2share
│ │ └── ExampleInstrumentedTest.java
├── proguard-rules.pro
└── build.gradle
├── settings.gradle
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── .idea
├── compiler.xml
├── vcs.xml
├── deploymentTargetDropDown.xml
├── migrations.xml
├── gradle.xml
├── misc.xml
├── jarRepositories.xml
└── codeStyles
│ └── Project.xml
├── README.md
├── .github
└── workflows
│ └── android.yml
├── gradle.properties
├── .gitignore
├── gradlew.bat
└── LICENSE
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 | /release
3 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 | rootProject.name='open2share'
3 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linesoft2/open2share/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/app/src/main/open2share_icon-playstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linesoft2/open2share/HEAD/app/src/main/open2share_icon-playstore.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/open2share_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linesoft2/open2share/HEAD/app/src/main/res/mipmap-hdpi/open2share_icon.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/open2share_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linesoft2/open2share/HEAD/app/src/main/res/mipmap-mdpi/open2share_icon.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/open2share_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linesoft2/open2share/HEAD/app/src/main/res/mipmap-xhdpi/open2share_icon.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/open2share_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linesoft2/open2share/HEAD/app/src/main/res/mipmap-xxhdpi/open2share_icon.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/open2share_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linesoft2/open2share/HEAD/app/src/main/res/mipmap-xxxhdpi/open2share_icon.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/open2share_icon_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linesoft2/open2share/HEAD/app/src/main/res/mipmap-hdpi/open2share_icon_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/open2share_icon_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linesoft2/open2share/HEAD/app/src/main/res/mipmap-mdpi/open2share_icon_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/open2share_icon_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linesoft2/open2share/HEAD/app/src/main/res/mipmap-xhdpi/open2share_icon_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/open2share_icon_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linesoft2/open2share/HEAD/app/src/main/res/mipmap-xxhdpi/open2share_icon_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/open2share_icon_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linesoft2/open2share/HEAD/app/src/main/res/mipmap-xxxhdpi/open2share_icon_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/open2share_icon_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linesoft2/open2share/HEAD/app/src/main/res/mipmap-hdpi/open2share_icon_background.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/open2share_icon_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linesoft2/open2share/HEAD/app/src/main/res/mipmap-mdpi/open2share_icon_background.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/open2share_icon_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linesoft2/open2share/HEAD/app/src/main/res/mipmap-xhdpi/open2share_icon_background.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/open2share_icon_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linesoft2/open2share/HEAD/app/src/main/res/mipmap-xxhdpi/open2share_icon_background.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/open2share_icon_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linesoft2/open2share/HEAD/app/src/main/res/mipmap-xxxhdpi/open2share_icon_background.png
--------------------------------------------------------------------------------
/app/src/main/res/values/open2share_icon_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #2962FF
4 |
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/deploymentTargetDropDown.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Tue Aug 02 19:19:17 CST 2022
2 | distributionBase=GRADLE_USER_HOME
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
4 | distributionPath=wrapper/dists
5 | zipStorePath=wrapper/dists
6 | zipStoreBase=GRADLE_USER_HOME
7 |
--------------------------------------------------------------------------------
/.idea/migrations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/open2share_icon.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/open2share_icon_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values/arrays.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | - Reply
5 | - Reply to all
6 |
7 |
8 |
9 | - reply
10 | - reply_all
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/settings_activity.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_receive_open.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/test/java/top/linesoft/open2share/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package top.linesoft.open2share;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # open2share
2 |
3 | **这是一款可以将打开文件(open, ACTION_VIEW)转换为分享文件(share, ACTION_SEND)的Android小工具。**
4 |
5 | **An Android app that can convert open(ACTION_VIEW) files to share(ACTION_SEND) files.**
6 |
7 | [ ](https://f-droid.org/packages/top.linesoft.open2share/)
10 |
11 | ## 使用方法/Usage
12 |
13 | 在打开文件时选择“转换为分享文件”,然后再进行分享操作即可。
14 |
15 | Select "Convert to share" when opening the file, and then share it.
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_restore_from_trash_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/.github/workflows/android.yml:
--------------------------------------------------------------------------------
1 | name: Android CI
2 |
3 | on:
4 | push:
5 | branches: [ "master" ]
6 | pull_request:
7 | branches: [ "master" ]
8 |
9 | jobs:
10 | build:
11 |
12 | runs-on: ubuntu-latest
13 |
14 | steps:
15 | - uses: actions/checkout@v3
16 | - name: set up JDK 11
17 | uses: actions/setup-java@v3
18 | with:
19 | java-version: '11'
20 | distribution: 'temurin'
21 | cache: gradle
22 |
23 | - name: Grant execute permission for gradlew
24 | run: chmod +x gradlew
25 | - name: Build with Gradle
26 | run: ./gradlew build
27 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_mobile_screen_share_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/java/top/linesoft/open2share/GuideActivity.java:
--------------------------------------------------------------------------------
1 | package top.linesoft.open2share;
2 |
3 | import android.os.Bundle;
4 | import android.webkit.WebView;
5 |
6 | import androidx.appcompat.app.AppCompatActivity;
7 |
8 | public class GuideActivity extends AppCompatActivity {
9 |
10 | @Override
11 | protected void onCreate(Bundle savedInstanceState) {
12 | super.onCreate(savedInstanceState);
13 | setContentView(R.layout.activity_guide);
14 | WebView webView = findViewById(R.id.webView);
15 | webView.loadUrl("file:///android_asset/guide.html");
16 | this.setTitle(R.string.guide);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_help_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
17 |
18 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/open2share_icon_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
11 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/app/src/androidTest/java/top/linesoft/open2share/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package top.linesoft.open2share;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.platform.app.InstrumentationRegistry;
6 | import androidx.test.ext.junit.runners.AndroidJUnit4;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.*;
12 |
13 | /**
14 | * Instrumented test, which will execute on an Android device.
15 | *
16 | * @see Testing documentation
17 | */
18 | @RunWith(AndroidJUnit4.class)
19 | public class ExampleInstrumentedTest {
20 | @Test
21 | public void useAppContext() {
22 | // Context of the app under test.
23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
24 |
25 | assertEquals("top.linesoft.open2share", appContext.getPackageName());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_guide.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_baseline_healing_24.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/values-zh/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | open2share
4 | 转换为分享文件
5 | 使用说明
6 | 隐藏桌面图标
7 | 关于
8 | 关于 open2share
9 | 帮助
10 | 设置
11 | 分享文件
12 | 警告
13 | 是
14 | 否
15 | 1. 隐藏后,您可能只能通过卸载重装才能再次显示图标。\n2. 在部分系统下,隐藏桌面图标会导致本页面被关闭,您将很难再次进入到本页面。\n3.部分系统不支持该功能,隐藏后桌面仍会显示图标。\n是否继续?
16 | 关于本软件
17 | 双霖及开源社区贡献者 版权所有
18 | 确定
19 | 网站
20 | 兼容fileUri类型
21 | android7以上,因为安全问题不提倡使用fileUri,因此,打开此选项将同意带来的安全风险
22 | 未允许打开fileUri兼容
23 |
--------------------------------------------------------------------------------
/app/src/main/res/values-zh-rCN/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | open2share
4 | 转换为分享文件
5 | 使用说明
6 | 隐藏桌面图标
7 | 关于
8 | 关于 open2share
9 | 帮助
10 | 设置
11 | 分享文件
12 | 警告
13 | 是
14 | 否
15 | 1. 隐藏后,您可能只能通过卸载重装才能再次显示图标。\n2. 在部分系统下,隐藏桌面图标会导致本页面被关闭,您将很难再次进入到本页面。\n3.部分系统不支持该功能,隐藏后桌面仍会显示图标。\n是否继续?
16 | 关于本软件
17 | 双霖及开源社区贡献者 版权所有
18 | 确定
19 | 网站
20 | 兼容fileUri类型
21 | android7以上,因为安全问题不提倡使用fileUri,因此,打开此选项将同意带来的安全风险
22 | 未允许打开fileUri兼容
23 |
--------------------------------------------------------------------------------
/app/src/main/res/values-zh-rHK/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | open2share
4 | 轉換為分享文件
5 | 使用說明
6 | 隱藏桌面圖標
7 | 關於
8 | 關於 open2share
9 | 幫助
10 | 設置
11 | 分享文件
12 | 警告
13 | 是
14 | 否
15 | 1. 隱藏後,您可能只能通過卸載重裝才能再次顯示圖標。\n2. 在部分系統下,隱藏桌面圖標會導致本頁面被關閉,您將很難再次進入到本頁面。\n3.部分系統不支持該功能,隱藏後桌面仍會顯示圖標。\n是否繼續?
16 | 關於本軟件
17 | 雙霖及開源社區貢獻者 版權所有
18 | 確定
19 | 網站
20 | 相容fileUri類型
21 | android7以上,因為安全問題不提倡使用fileUri,因此,打開此選項將同意帶來的安全風險
22 | 未允許打開fileUri相容
23 |
--------------------------------------------------------------------------------
/app/src/main/res/values-zh-rTW/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | open2share
4 | 轉換為分享文件
5 | 使用說明
6 | 隱藏桌面圖示
7 | 關於
8 | 關於 open2share
9 | 幫助
10 | 設置
11 | 分享文件
12 | 警告
13 | 是
14 | 否
15 | 1. 隱藏後,您可能只能通過卸載重裝才能再次顯示圖示.\n2. 在部分系統下,隱藏桌面圖示會導致本頁面被關閉,您將很難再次進入到本頁面。\n3.部分系統不支持該功能,隱藏後桌面仍會顯示圖示。\n是否繼續?
16 | 關於本軟體
17 | 雙霖及開源社區貢獻者 版權所有
18 | 確定
19 | 網站
20 | 相容fileUri類型
21 | android7以上,因為安全問題不提倡使用fileUri,因此,打開此選項將同意帶來的安全風險
22 | 未允許打開fileUri相容
23 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx1536m
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 | # AndroidX package structure to make it clearer which packages are bundled with the
15 | # Android operating system, and which are packaged with your app's APK
16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
17 | android.useAndroidX=true
18 | # Automatically convert third-party libraries to use AndroidX
19 | android.enableJetifier=true
20 | android.defaults.buildfeatures.buildconfig=true
21 | android.nonTransitiveRClass=false
22 | android.nonFinalResIds=false
23 |
24 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'com.android.application'
3 | }
4 |
5 | android {
6 | compileSdk 34
7 |
8 | defaultConfig {
9 | applicationId "top.linesoft.open2share"
10 | minSdkVersion 21
11 | targetSdk 34
12 | versionCode 8
13 | versionName '1.7'
14 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
15 | }
16 |
17 | buildTypes {
18 | release {
19 | minifyEnabled true
20 | zipAlignEnabled true
21 | shrinkResources true
22 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
23 | }
24 | }
25 | compileOptions {
26 | sourceCompatibility JavaVersion.VERSION_11
27 | targetCompatibility JavaVersion.VERSION_11
28 | }
29 | namespace 'top.linesoft.open2share'
30 | }
31 |
32 | dependencies {
33 | implementation fileTree(dir: 'libs', include: ['*.jar'])
34 | implementation 'com.google.android.material:material:1.7.0'
35 | implementation('com.github.knightwood:material3-preference:1.3'){
36 | exclude group: "androidx.lifecycle", module: "lifecycle-viewmodel-ktx"
37 | }
38 |
39 | testImplementation 'junit:junit:4.13.2'
40 | androidTestImplementation 'androidx.test.ext:junit:1.1.3'
41 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
42 | }
43 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | open2share
3 | Convert to share
4 | Usage
5 | Hide icon from launcher
6 | About
7 | About open2share
8 | Help
9 | Settings
10 | Share
11 | WARNING
12 | Yes
13 | No
14 | 1. After hiding, you may have to uninstall and reinstall to display the icon again.\n2. In some systems, hiding the desktop icon will cause this page to be closed, and it will be difficult for you to open this page again.\n3. Some systems do not support this function.\nDo you want to continue?
15 | About
16 | Copyright ©️ LineSoft and Contributors.
17 | OK
18 | Website
19 | compatible fileUri types
20 | Android 7 and above, because security issues do not discourage the use of fileUri, therefore, turning on this option will consent to the security risk it brings
21 | FileUri is not turned on
22 |
23 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/root_preferences.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
11 |
12 |
13 |
14 |
15 |
20 |
25 |
26 |
27 |
28 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/.idea/jarRepositories.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | *.apk
3 | *.aar
4 | *.ap_
5 | *.aab
6 |
7 | # Files for the ART/Dalvik VM
8 | *.dex
9 |
10 | # Java class files
11 | *.class
12 |
13 | # Generated files
14 | bin/
15 | gen/
16 | out/
17 | # Uncomment the following line in case you need and you don't have the release build type files in your app
18 | # release/
19 |
20 | # Gradle files
21 | .gradle/
22 | build/
23 |
24 | # Local configuration file (sdk path, etc)
25 | local.properties
26 |
27 | # Proguard folder generated by Eclipse
28 | proguard/
29 |
30 | # Log Files
31 | *.log
32 |
33 | # Android Studio Navigation editor temp files
34 | .navigation/
35 |
36 | # Android Studio captures folder
37 | captures/
38 |
39 | # IntelliJ
40 | *.iml
41 | .idea/workspace.xml
42 | .idea/tasks.xml
43 | .idea/gradle.xml
44 | .idea/assetWizardSettings.xml
45 | .idea/dictionaries
46 | .idea/libraries
47 | # Android Studio 3 in .gitignore file.
48 | .idea/caches
49 | .idea/modules.xml
50 | # Comment next line if keeping position of elements in Navigation Editor is relevant for you
51 | .idea/navEditor.xml
52 |
53 | # Keystore files
54 | # Uncomment the following lines if you do not want to check your keystore files in.
55 | #*.jks
56 | #*.keystore
57 |
58 | # External native build folder generated in Android Studio 2.2 and later
59 | .externalNativeBuild
60 | .cxx/
61 |
62 | # Google Services (e.g. APIs or Firebase)
63 | # google-services.json
64 |
65 | # Freeline
66 | freeline.py
67 | freeline/
68 | freeline_project_description.json
69 |
70 | # fastlane
71 | fastlane/report.xml
72 | fastlane/Preview.html
73 | fastlane/screenshots
74 | fastlane/test_output
75 | fastlane/readme.md
76 |
77 | # Version control
78 | vcs.xml
79 |
80 | # lint
81 | lint/intermediates/
82 | lint/generated/
83 | lint/outputs/
84 | lint/tmp/
85 | # lint/reports/
86 |
87 | # Android Profiling
88 | *.hprof
--------------------------------------------------------------------------------
/app/src/main/java/top/linesoft/open2share/ReceiveOpenActivity.java:
--------------------------------------------------------------------------------
1 | package top.linesoft.open2share;
2 |
3 | import android.content.Intent;
4 | import android.net.Uri;
5 | import android.os.Bundle;
6 | import android.os.StrictMode;
7 | import android.widget.Toast;
8 |
9 | import androidx.annotation.Nullable;
10 | import androidx.appcompat.app.AppCompatActivity;
11 | import androidx.preference.PreferenceManager;
12 |
13 |
14 | public class ReceiveOpenActivity extends AppCompatActivity {
15 |
16 | @Override
17 | protected void onDestroy() {
18 | super.onDestroy();
19 | finishAffinity();
20 | }
21 |
22 | @Override
23 | protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
24 | super.onActivityResult(requestCode, resultCode, data);
25 | //Log.d("a","Activity 收到数据,执行Finish");
26 | finish();
27 |
28 | }
29 |
30 | @Override
31 | protected void onCreate(Bundle savedInstanceState) {
32 | super.onCreate(savedInstanceState);
33 |
34 | Intent sendIntent = new Intent();
35 | sendIntent.setAction(Intent.ACTION_SEND);
36 | sendIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
37 | sendIntent.addCategory("android.intent.category.DEFAULT");
38 | Uri uri = getIntent().getData();
39 | // Log.d("分享","Data:"+ getIntent().getData().toString()+ uri.getScheme());
40 | // Log.d("分享","Type:"+ getIntent().getType());
41 | if (uri.getScheme().equals("file")) {
42 | boolean b= PreferenceManager.getDefaultSharedPreferences(this).getBoolean("use_file_uri",false);
43 | if (b){
44 | //API24以上系统分享支持file:///开头
45 | StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();
46 | StrictMode.setVmPolicy(builder.build());
47 | builder.detectFileUriExposure();
48 | }else{
49 | Toast.makeText(getApplicationContext(), R.string.no_use_file_uri_msg, Toast.LENGTH_LONG).show();
50 | finishAffinity();
51 | }
52 | }
53 | sendIntent.putExtra(Intent.EXTRA_STREAM, uri);
54 | sendIntent.setType(getIntent().getType());
55 | sendIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
56 | startActivityForResult(Intent.createChooser(sendIntent, getString(R.string.share_title)), 1);
57 | //finish();
58 |
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | set DIRNAME=%~dp0
12 | if "%DIRNAME%" == "" set DIRNAME=.
13 | set APP_BASE_NAME=%~n0
14 | set APP_HOME=%DIRNAME%
15 |
16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17 | set DEFAULT_JVM_OPTS=
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windows variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 |
53 | :win9xME_args
54 | @rem Slurp the command line arguments.
55 | set CMD_LINE_ARGS=
56 | set _SKIP=2
57 |
58 | :win9xME_args_slurp
59 | if "x%~1" == "x" goto execute
60 |
61 | set CMD_LINE_ARGS=%*
62 |
63 | :execute
64 | @rem Setup the command line
65 |
66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67 |
68 | @rem Execute Gradle
69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70 |
71 | :end
72 | @rem End local scope for the variables with windows NT shell
73 | if "%ERRORLEVEL%"=="0" goto mainEnd
74 |
75 | :fail
76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77 | rem the _cmd.exe /c_ return code!
78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79 | exit /b 1
80 |
81 | :mainEnd
82 | if "%OS%"=="Windows_NT" endlocal
83 |
84 | :omega
85 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
16 |
17 |
21 |
22 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
38 |
39 |
40 |
43 |
44 |
45 |
46 |
47 |
53 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/app/src/main/res/values-night/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
16 |
17 |
48 |
49 |
--------------------------------------------------------------------------------
/app/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
16 |
17 |
47 |
48 |
--------------------------------------------------------------------------------
/.idea/codeStyles/Project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | xmlns:android
11 |
12 | ^$
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | xmlns:.*
22 |
23 | ^$
24 |
25 |
26 | BY_NAME
27 |
28 |
29 |
30 |
31 |
32 |
33 | .*:id
34 |
35 | http://schemas.android.com/apk/res/android
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 | .*:name
45 |
46 | http://schemas.android.com/apk/res/android
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | name
56 |
57 | ^$
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 | style
67 |
68 | ^$
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 | .*
78 |
79 | ^$
80 |
81 |
82 | BY_NAME
83 |
84 |
85 |
86 |
87 |
88 |
89 | .*
90 |
91 | http://schemas.android.com/apk/res/android
92 |
93 |
94 | ANDROID_ATTRIBUTE_ORDER
95 |
96 |
97 |
98 |
99 |
100 |
101 | .*
102 |
103 | .*
104 |
105 |
106 | BY_NAME
107 |
108 |
109 |
110 |
111 |
112 |
113 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #2962ff
4 | #0039cb
5 | #2962ff
6 |
7 |
8 | #FFBB86FC
9 | #FF6200EE
10 | #FF3700B3
11 | #FF03DAC5
12 | #FF018786
13 | #FF000000
14 | #FFFFFFFF
15 |
16 | #00231B
17 | #44655B
18 | #FFFFFF
19 | #C6EADD
20 | #002019
21 | #58605D
22 | #FFFFFF
23 | #DDE4E0
24 | #161D1B
25 | #566067
26 | #FFFFFF
27 | #DAE4EC
28 | #131D23
29 | #BA1A1A
30 | #FFFFFF
31 | #FFDAD6
32 | #410002
33 | #FEFCFA
34 | #1B1C1B
35 | #FEFCFA
36 | #1B1C1B
37 | #E1E3E0
38 | #454746
39 | #757876
40 | #000000
41 | #303030
42 | #F2F0EF
43 | #AACEC1
44 | #44655B
45 | #44655B
46 | #AACEC1
47 | #15362D
48 | #2C4D43
49 | #C6EADD
50 | #C1C8C4
51 | #2B322F
52 | #414845
53 | #DDE4E0
54 | #BEC8D0
55 | #283238
56 | #3F484F
57 | #DAE4EC
58 | #FFB4AB
59 | #690005
60 | #93000A
61 | #FFB4AB
62 | #1B1C1B
63 | #E4E2E1
64 | #1B1C1B
65 | #E4E2E1
66 | #454746
67 | #C5C7C5
68 | #8F918F
69 | #000000
70 | #E4E2E1
71 | #303030
72 | #44655B
73 | #AACEC1
74 | #AACEC1
75 |
76 |
77 |
78 |
--------------------------------------------------------------------------------
/app/src/main/java/top/linesoft/open2share/SettingsActivity.java:
--------------------------------------------------------------------------------
1 | package top.linesoft.open2share;
2 |
3 | import android.content.ComponentName;
4 | import android.content.DialogInterface;
5 | import android.content.Intent;
6 | import android.content.pm.PackageManager;
7 | import android.net.Uri;
8 | import android.os.Bundle;
9 |
10 | import androidx.appcompat.app.ActionBar;
11 | import androidx.appcompat.app.AppCompatActivity;
12 | import androidx.preference.Preference;
13 | import androidx.preference.SwitchPreferenceCompat;
14 |
15 | import com.google.android.material.dialog.MaterialAlertDialogBuilder;
16 | import com.kiylx.m3preference.ui.BaseSettingsFragment;
17 |
18 | public class SettingsActivity extends AppCompatActivity {
19 |
20 | @Override
21 | protected void onCreate(Bundle savedInstanceState) {
22 | super.onCreate(savedInstanceState);
23 | setContentView(R.layout.settings_activity);
24 | SettingsFragment settingsFragment = new SettingsFragment();
25 | settingsFragment.setIconHide(false);
26 | getSupportFragmentManager()
27 | .beginTransaction()
28 | .replace(R.id.settings, settingsFragment)
29 | .commit();
30 | ActionBar actionBar = getSupportActionBar();
31 | //actionBar.setDisplayHomeAsUpEnabled(true);
32 |
33 | }
34 |
35 | public static class SettingsFragment extends BaseSettingsFragment implements Preference.OnPreferenceClickListener, Preference.OnPreferenceChangeListener {
36 | Preference guidePreference;
37 | SwitchPreferenceCompat hidePreference;
38 | SwitchPreferenceCompat fileUriPreference;
39 | Preference aboutPreference;
40 |
41 | @Override
42 | public boolean onPreferenceClick(Preference preference) {
43 | if (preference == guidePreference) {
44 | Intent intent = new Intent(getActivity(), GuideActivity.class);
45 | startActivity(intent);
46 | return true;
47 | } else if (preference == aboutPreference) {
48 | new MaterialAlertDialogBuilder(requireContext())
49 | .setTitle(R.string.about_dialogue_title)
50 | .setMessage(R.string.about_dialogue_msg)
51 | .setPositiveButton(R.string.ok, null)
52 | .create()
53 | .show();
54 | }
55 | return false;
56 | }
57 |
58 | @Override
59 | public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
60 | setPreferencesFromResource(R.xml.root_preferences, rootKey);
61 | guidePreference = findPreference("guide");
62 | if (guidePreference != null) {
63 | guidePreference.setOnPreferenceClickListener(this);
64 | }
65 | hidePreference = findPreference("hide_icon");
66 | if (hidePreference != null) {
67 | hidePreference.setOnPreferenceChangeListener(this);
68 | }
69 | fileUriPreference = findPreference("use_file_uri");
70 | if (fileUriPreference != null) {
71 | fileUriPreference.setOnPreferenceChangeListener(this);
72 | }
73 | aboutPreference = findPreference("about");
74 | aboutPreference.setOnPreferenceClickListener(this);
75 | }
76 |
77 | /**
78 | * Called when a preference has been changed by the user. This is called before the state
79 | * of the preference is about to be updated and before the state is persisted.
80 | *
81 | * @param preference The changed preference
82 | * @param newValue The new value of the preference
83 | * @return {@code true} to update the state of the preference with the new value
84 | */
85 | @Override
86 | public boolean onPreferenceChange(Preference preference, Object newValue) {
87 | // Log.d("onPreferenceChange", "onPreferenceChange: 被触发");
88 | if (preference == hidePreference) {
89 | // Toast.makeText(getContext(),"当前值为:"+newValue,Toast.LENGTH_LONG).show();
90 | PackageManager pm = requireContext().getPackageManager();
91 | ComponentName hideComponentName = new ComponentName(requireContext(), "top.linesoft.open2share.hide_icon");
92 | ComponentName unhideComponentName = new ComponentName(getContext(), "top.linesoft.open2share.unhide_icon");
93 | if ((Boolean) newValue) {
94 |
95 | MaterialAlertDialogBuilder mDialogBuilder = new MaterialAlertDialogBuilder(requireActivity());
96 | mDialogBuilder.setTitle(R.string.warn)
97 | .setMessage(R.string.hide_tips)
98 | .setPositiveButton(R.string.yes, (dialog, which) -> {
99 | pm.setComponentEnabledSetting(hideComponentName, PackageManager.COMPONENT_ENABLED_STATE_ENABLED, PackageManager.DONT_KILL_APP);
100 | pm.setComponentEnabledSetting(unhideComponentName, PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);
101 | SettingsFragment.this.hidePreference.setChecked(true);
102 | }).setNegativeButton(R.string.no, null).create().show();
103 | return false;
104 |
105 |
106 | } else {
107 | pm.setComponentEnabledSetting(hideComponentName, PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);
108 | pm.setComponentEnabledSetting(unhideComponentName, PackageManager.COMPONENT_ENABLED_STATE_ENABLED, PackageManager.DONT_KILL_APP);
109 | return true;
110 | }
111 |
112 | } else if (preference == fileUriPreference) {
113 | if ((Boolean) newValue) {
114 | MaterialAlertDialogBuilder mDialogBuilder = new MaterialAlertDialogBuilder(requireActivity());
115 | mDialogBuilder.setTitle(R.string.warn)
116 | .setMessage(R.string.open_file_uri_msg)
117 | .setPositiveButton(R.string.yes, (dialog, which) -> {
118 | SettingsFragment.this.fileUriPreference.setChecked(true);
119 | }).setNegativeButton(R.string.no, (dialog, which) -> {
120 | SettingsFragment.this.fileUriPreference.setChecked(false);
121 | }).create().show();
122 | return false;
123 | } else {
124 | return true;
125 | }
126 | }
127 | return false;
128 | }
129 | }
130 | }
--------------------------------------------------------------------------------
/app/src/main/assets/guide.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | guide
5 |
6 |
292 |
293 |
294 |
295 | open2share
296 | 这是一款可以将打开文件(open, ACTION_VIEW)转换为分享文件(share, ACTION_SEND)的Android小工具。
297 | An Android app that can convert open(ACTION_VIEW) files to share(ACTION_SEND) files.
298 |
299 | 使用方法/Usage
300 | 在打开文件时选择“转换为分享文件”,然后再进行分享操作即可。
301 | Select "Convert to share" when opening the file, and then share it.
302 |
303 |
304 |
305 |
306 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright 2020 LineSoft
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------