diff --git a/app/build.gradle b/app/build.gradle
index c8c0712..5d73a52 100755
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -13,7 +13,7 @@ repositories {
}
android {
- compileSdkVersion 27
+ compileSdkVersion 28
buildToolsVersion "27.0.3"
defaultConfig {
@@ -23,8 +23,8 @@ android {
//noinspection OldTargetApi
targetSdkVersion 25
- versionCode 178
- versionName "2.8"
+ versionCode 179
+ versionName "2.8.1"
resConfigs "en", "es", "fr", "sk"
vectorDrawables.useSupportLibrary = true
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 34eb756..1029f0d 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -244,16 +244,14 @@
+ android:exported="true" >
+ android:exported="true" >
diff --git a/app/src/main/java/com/farmerbb/secondscreen/fragment/ProfileEditFragment.java b/app/src/main/java/com/farmerbb/secondscreen/fragment/ProfileEditFragment.java
index ae0c446..171e701 100644
--- a/app/src/main/java/com/farmerbb/secondscreen/fragment/ProfileEditFragment.java
+++ b/app/src/main/java/com/farmerbb/secondscreen/fragment/ProfileEditFragment.java
@@ -358,11 +358,18 @@ public void onResume() {
findPreference("overscan_settings").setSummary(getResources().getString(R.string.disabled));
String taskbarPackageName = U.getTaskbarPackageName(getActivity());
- if(taskbarPackageName == null || !U.isPlayStoreRelease(getActivity()))
+ if(taskbarPackageName == null || !U.isPlayStoreRelease(getActivity())) {
disablePreference(prefNew, "taskbar", true);
- else
+
+ if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.P)
+ disablePreference(prefNew, "freeform", true);
+ } else {
findPreference("taskbar").setEnabled(true);
+ if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.P)
+ findPreference("freeform").setEnabled(true);
+ }
+
if(taskbarSettingsPrefEnabled) {
findPreference("taskbar_settings").setTitle(
taskbarPackageName == null
diff --git a/app/src/main/java/com/farmerbb/secondscreen/receiver/TaskerActionReceiver.java b/app/src/main/java/com/farmerbb/secondscreen/receiver/TaskerActionReceiver.java
index bfc7fcd..b4e1fb1 100644
--- a/app/src/main/java/com/farmerbb/secondscreen/receiver/TaskerActionReceiver.java
+++ b/app/src/main/java/com/farmerbb/secondscreen/receiver/TaskerActionReceiver.java
@@ -33,7 +33,7 @@
public final class TaskerActionReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
- if(U.isTaskerDisabled(context)) return;
+ if(U.isExternalAccessDisabled(context)) return;
BundleScrubber.scrub(intent);
diff --git a/app/src/main/java/com/farmerbb/secondscreen/receiver/TaskerConditionReceiver.java b/app/src/main/java/com/farmerbb/secondscreen/receiver/TaskerConditionReceiver.java
index 7488bfc..759ce1a 100644
--- a/app/src/main/java/com/farmerbb/secondscreen/receiver/TaskerConditionReceiver.java
+++ b/app/src/main/java/com/farmerbb/secondscreen/receiver/TaskerConditionReceiver.java
@@ -31,7 +31,7 @@ public final class TaskerConditionReceiver extends BroadcastReceiver {
@SuppressWarnings("deprecation")
@Override
public void onReceive(Context context, Intent intent) {
- if(U.isTaskerDisabled(context)) return;
+ if(U.isExternalAccessDisabled(context)) return;
BundleScrubber.scrub(intent);
diff --git a/app/src/main/java/com/farmerbb/secondscreen/util/U.java b/app/src/main/java/com/farmerbb/secondscreen/util/U.java
index 7b2d449..4357fbd 100644
--- a/app/src/main/java/com/farmerbb/secondscreen/util/U.java
+++ b/app/src/main/java/com/farmerbb/secondscreen/util/U.java
@@ -386,15 +386,11 @@ public static boolean runDensityCommand(Context context, String requestedDpi) {
// XML file containing the main application preferences; normally set to the MainActivity preferences file.
public static SharedPreferences getPrefMain(Context context) {
- return getPrefMain(context, Context.MODE_PRIVATE);
- }
-
- private static SharedPreferences getPrefMain(Context context, int mode) {
SharedPreferences prefMain;
if(context.getPackageName().equals("com.farmerbb.secondscreen"))
- prefMain = context.getSharedPreferences(MainActivity.class.getName().replace("com.farmerbb.secondscreen.", ""), mode);
+ prefMain = context.getSharedPreferences(MainActivity.class.getName().replace("com.farmerbb.secondscreen.", ""), Context.MODE_PRIVATE);
else
- prefMain = context.getSharedPreferences(MainActivity.class.getName(), mode);
+ prefMain = context.getSharedPreferences(MainActivity.class.getName(), Context.MODE_PRIVATE);
return prefMain;
}
@@ -1373,8 +1369,9 @@ && isPlayStoreRelease(context)) {
public static boolean canEnableFreeform(Context context) {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.N
- && (getCurrentApiVersion() <= 27.0f
- || context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_FREEFORM_WINDOW_MANAGEMENT));
+ && (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_FREEFORM_WINDOW_MANAGEMENT)
+ || Build.VERSION.SDK_INT < Build.VERSION_CODES.P
+ || (getTaskbarPackageName(context) != null && isPlayStoreRelease(context)));
}
@TargetApi(Build.VERSION_CODES.N)
@@ -1384,7 +1381,7 @@ public static boolean hasFreeformSupport(Context context) {
|| Settings.Global.getInt(context.getContentResolver(), "enable_freeform_support", 0) != 0
|| (Build.VERSION.SDK_INT <= Build.VERSION_CODES.N_MR1
&& Settings.Global.getInt(context.getContentResolver(), "force_resizable_activities", 0) != 0
- && getTaskbarPackageName(context) != null));
+ && (getTaskbarPackageName(context) != null && isPlayStoreRelease(context))));
}
public static boolean isUntestedAndroidVersion(Context context) {
@@ -1418,8 +1415,8 @@ public static boolean isPlayStoreRelease(Context context) {
return false;
}
- public static boolean isTaskerDisabled(Context context) {
- SharedPreferences prefMain = getPrefMain(context, Context.MODE_MULTI_PROCESS);
+ public static boolean isExternalAccessDisabled(Context context) {
+ SharedPreferences prefMain = getPrefMain(context);
return !prefMain.getBoolean("tasker_enabled", true);
}
diff --git a/app/src/main/res/values-v27/styles_secondscreen_2.xml b/app/src/main/res/values-v27/styles_secondscreen_2.xml
new file mode 100644
index 0000000..a2c3043
--- /dev/null
+++ b/app/src/main/res/values-v27/styles_secondscreen_2.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index 4ca1fef..88399bc 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -27,4 +27,6 @@
#009688
#25000000
#F5F5F5
+ #FFFFFF
+ #DCDCDC
diff --git a/app/src/main/res/xml/overscan_preferences_expert.xml b/app/src/main/res/xml/overscan_preferences_expert.xml
index 489e2ab..e1eba66 100644
--- a/app/src/main/res/xml/overscan_preferences_expert.xml
+++ b/app/src/main/res/xml/overscan_preferences_expert.xml
@@ -26,7 +26,7 @@