Skip to content

Commit

Permalink
提高开机重启速度,提高后台生存能力,新增空闲半隐藏模式
Browse files Browse the repository at this point in the history
  • Loading branch information
fg607 committed Dec 27, 2017
1 parent 76974d3 commit de9ec54
Show file tree
Hide file tree
Showing 28 changed files with 712 additions and 184 deletions.
15 changes: 1 addition & 14 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 16 additions & 18 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
apply plugin: 'com.android.application'
apply plugin: 'android-apt'

android {
compileSdkVersion 25
buildToolsVersion '25.0.0'
compileSdkVersion 27
buildToolsVersion '26.0.2'

defaultConfig {
applicationId "com.hardwork.fg607.relaxfinger"
minSdkVersion 18
targetSdkVersion 25
resValue "string", "tray__authority", "${applicationId}.tray"
versionCode 23
versionName "2.1"
targetSdkVersion 27
versionCode 24
versionName "3.0"
}

signingConfigs {
Expand All @@ -31,25 +29,25 @@ android {
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}



dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile('com.github.afollestad.material-dialogs:core:0.8.5.3@aar') {
transitive = true
}
compile 'com.afollestad.material-dialogs:core:0.9.6.0'
compile 'com.ogaclejapan.arclayout:library:1.0.1@aar'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.jakewharton:butterknife:8.4.0'
apt 'com.jakewharton:butterknife-compiler:8.4.0'
compile 'com.android.support:support-v4:25.0.0'
compile 'com.android.support:appcompat-v7:25.0.0'
compile 'com.android.support:design:25.0.0'
compile 'com.android.support:cardview-v7:25.0.0'
compile 'net.grandcentrix.tray:tray:0.9.2'
compile 'de.hdodenhof:circleimageview:2.2.0'
compile 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
compile 'com.android.support:cardview-v7:27.0.1'
compile 'com.android.support:design:27.0.1'
compile 'net.grandcentrix.tray:tray:0.12.0'
compile 'com.jenzz:materialpreference:1.3'
compile 'com.facebook.rebound:rebound:0.3.8'
compile 'com.github.satyan:sugar:1.5'
Expand Down
1 change: 1 addition & 0 deletions app/release/output.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":24},"path":"app-release.apk","properties":{"packageId":"com.hardwork.fg607.relaxfinger","split":"","minSdkVersion":"18"}}]
56 changes: 30 additions & 26 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.hardwork.fg607.relaxfinger"
xmlns:tools="http://schemas.android.com/tools">
xmlns:tools="http://schemas.android.com/tools"
package="com.hardwork.fg607.relaxfinger">

<uses-feature android:name="android.hardware.camera" />

<!--基本功能权限-->
<!-- 基本功能权限 -->
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
Expand All @@ -22,33 +22,34 @@
<uses-permission android:name="android.permission.FLASHLIGHT" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.GET_TASKS"/>
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY" />
<uses-permission android:name="android.permission.PACKAGE_USAGE_STATS" tools:ignore="ProtectedPermissions" />

<!--常见桌面权限-->
<uses-permission android:name="com.google.android.apps.nexuslauncher.permission.READ_SETTINGS"/>
<uses-permission android:name="com.android.launcher.permission.READ_SETTINGS"/>
<uses-permission android:name="com.android.launcher2.permission.READ_SETTINGS"/>
<uses-permission android:name="com.android.launcher3.permission.READ_SETTINGS"/>
<uses-permission android:name="com.cyanogenport.trebuchet.permission.READ_SETTINGS"/>
<uses-permission android:name="com.kaneoriley.cyanogenport.launcher.permission.READ_SETTINGS"/>
<uses-permission android:name="com.teslacoilsw.launcher.permission.READ_SETTINGS"/>
<uses-permission android:name="com.cmnlauncher.permission.READ_SETTINGS"/>
<uses-permission android:name="com.huawei.android.launcher.permission.READ_SETTINGS"/>
<uses-permission android:name="org.adw.launcher.permission.READ_SETTINGS"/>
<uses-permission android:name="home.solo.launcher.free.permission.READ_SETTINGS"/>
<uses-permission android:name="com.motorola.motolauncher.READ_SETTINGS"/>
<uses-permission
android:name="android.permission.PACKAGE_USAGE_STATS"
tools:ignore="ProtectedPermissions" />

<!-- 常见桌面权限 -->
<uses-permission android:name="com.google.android.apps.nexuslauncher.permission.READ_SETTINGS" />
<uses-permission android:name="com.android.launcher.permission.READ_SETTINGS" />
<uses-permission android:name="com.android.launcher2.permission.READ_SETTINGS" />
<uses-permission android:name="com.android.launcher3.permission.READ_SETTINGS" />
<uses-permission android:name="com.cyanogenport.trebuchet.permission.READ_SETTINGS" />
<uses-permission android:name="com.kaneoriley.cyanogenport.launcher.permission.READ_SETTINGS" />
<uses-permission android:name="com.teslacoilsw.launcher.permission.READ_SETTINGS" />
<uses-permission android:name="com.cmnlauncher.permission.READ_SETTINGS" />
<uses-permission android:name="com.huawei.android.launcher.permission.READ_SETTINGS" />
<uses-permission android:name="org.adw.launcher.permission.READ_SETTINGS" />
<uses-permission android:name="home.solo.launcher.free.permission.READ_SETTINGS" />
<uses-permission android:name="com.motorola.motolauncher.READ_SETTINGS" />

<application
android:name=".MyApplication"
android:allowBackup="true"
tools:replace="android:icon"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
android:theme="@style/AppTheme"
tools:replace="android:icon">
<activity
android:name=".SettingActivity"
android:label="@string/app_name"
Expand All @@ -57,6 +58,7 @@
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Expand All @@ -82,10 +84,8 @@
</service>

<receiver android:name=".receiver.FloatBallReceiver">
<intent-filter>
<action android:name="com.hardwork.fg607.showFloatBall" />
<intent-filter android:priority="2147483647">
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.USER_PRESENT" />
</intent-filter>
</receiver>
<receiver
Expand Down Expand Up @@ -119,9 +119,13 @@
android:launchMode="singleInstance"
android:theme="@style/Theme.Transparent" />
<activity android:name=".view.ClipImageActivity" />
<activity android:name=".view.AppChooseActivity" />

<activity android:name=".view.AppChooseActivity"></activity>

<service
android:name=".service.FloatJobService"
android:permission="android.permission.BIND_JOB_SERVICE"
android:process=":remote">
</service>
</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
package com.hardwork.fg607.relaxfinger;

import android.app.Application;
import android.content.Intent;
import android.os.Build;
import android.os.Handler;
import android.os.Looper;

import com.hardwork.fg607.relaxfinger.service.FloatJobService;
import com.orm.SugarApp;
import com.orm.SugarContext;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import com.hardwork.fg607.relaxfinger.view.NotifySettingFragment;
import com.hardwork.fg607.relaxfinger.view.SettingFragment;

import net.grandcentrix.tray.AppPreferences;
import net.grandcentrix.tray.TrayAppPreferences;

import static com.hardwork.fg607.relaxfinger.utils.AccessibilityUtil.checkAccessibility;
Expand All @@ -44,7 +45,7 @@ public class SettingActivity extends AppCompatActivity {
private HideSettingFragment mHideSettingFragment;
private NotifySettingFragment mNotifySettingFragment;
private FragmentTransaction mTransaction;
private TrayAppPreferences mPreferences;
private AppPreferences mPreferences;
public static Messenger sMessenger = null;
private boolean mBound = false;
private FloatingActionButton mFab;
Expand Down Expand Up @@ -447,7 +448,7 @@ public void developerInfo() {
dialog.setTitle("关于悬浮助手");
dialog.setCancelable(true);
dialog.setCanceledOnTouchOutside(true);
dialog.setMessage("版本:2.1\r\n作者:fg607\r\n邮箱:[email protected]");
dialog.setMessage("版本:3.0\r\n作者:fg607\r\n邮箱:[email protected]");
dialog.show();
}

Expand Down Expand Up @@ -481,17 +482,19 @@ public void questionsAnswer() {
public void showUpdateInfo() {

AlertDialog dialog = new AlertDialog.Builder(this).create();
dialog.setTitle("悬浮助手-2.1版本更新内容");
dialog.setTitle("悬浮助手-3.0版本更新内容");
dialog.setCancelable(true);
dialog.setCanceledOnTouchOutside(true);
dialog.setMessage("" +
"1.避让软键盘后点击悬浮球关闭输入法并退出避让模式。\r\n" +
"2.更新了一个悬浮球主题。\r\n" +
"3.添加完全退出悬浮球提示。\r\n"+
"4.修复触发休眠后,亮屏第一次手势无效的bug。\r\n" +
"5.修复某些情况下悬浮球消失的bug。\r\n"+
"6.修复避让软键盘关闭无效的bug。\r\n" +
"7.修复其他已知bug。\r\n"+
"1.支持安卓8.0系统。\r\n" +
"2.收到QQ微信消息时小球会变成好友头像。\r\n" +
"3.添加保存悬浮球横屏位置。\r\n" +
"4.添加空闲半隐藏模式(无操作5秒后悬浮球会隐藏到屏幕边缘,只显示一半)。\r\n"+
"5.删除开机自启开关,默认开机自启。"+
"6.提高开机自启速度和后台服务生存能力。"+
"7.删除弹出权限框时悬浮球自动隐藏的功能。\r\n" +
"8.修复某些情况下悬浮球被其他窗口遮挡的问题。\r\n"+
"9.修复其他已知bug。\r\n"+
"");
dialog.show();

Expand Down
Loading

0 comments on commit de9ec54

Please sign in to comment.