OSDN Git Service

Taskbar 3.8.2 (release 1)
authorBraden Farmer <farmerbb@gmail.com>
Sat, 24 Feb 2018 16:35:37 +0000 (09:35 -0700)
committerBraden Farmer <farmerbb@gmail.com>
Sat, 24 Feb 2018 16:35:37 +0000 (09:35 -0700)
* Added options to view GitHub page and open source licenses
* Added ability to show recent apps beyond past day
* Added "Use default" option when setting dashboard grid size
* Phone size windows now emulate Nexus 5X on larger devices

25 files changed:
.gitignore
README.md
app/build.gradle
app/src/androidx86/AndroidManifest.xml
app/src/androidx86/java/com/farmerbb/taskbar/util/DependencyUtils.java
app/src/main/java/com/farmerbb/taskbar/activity/AboutDialogActivity.java [new file with mode: 0644]
app/src/main/java/com/farmerbb/taskbar/activity/dark/AboutDialogActivityDark.java [new file with mode: 0644]
app/src/main/java/com/farmerbb/taskbar/fragment/AboutFragment.java
app/src/main/java/com/farmerbb/taskbar/fragment/AdvancedFragment.java
app/src/main/java/com/farmerbb/taskbar/fragment/FreeformModeFragment.java
app/src/main/java/com/farmerbb/taskbar/service/TaskbarService.java
app/src/main/java/com/farmerbb/taskbar/util/U.java
app/src/main/res/values-de/strings.xml
app/src/main/res/values-ja/strings.xml
app/src/main/res/values-ru/strings.xml
app/src/main/res/values-w720dp/dimens.xml
app/src/main/res/values-zh-rCN/strings.xml
app/src/main/res/values/donottranslate.xml
app/src/main/res/values/strings.xml
app/src/main/res/xml/pref_about_dialog.xml [new file with mode: 0644]
app/src/main/res/xml/pref_about_dialog_alt.xml [new file with mode: 0644]
app/src/playstore/AndroidManifest.xml
app/src/playstore/java/com/farmerbb/taskbar/util/DependencyUtils.java
build.gradle
gradle/wrapper/gradle-wrapper.properties

index 9a94f0a..6f1be10 100644 (file)
@@ -8,3 +8,5 @@
 /captures
 /app/build
 output.json
+/app/src/main/res/raw/third_party_license_metadata
+/app/src/main/res/raw/third_party_licenses
index 54d0f13..affddf5 100644 (file)
--- a/README.md
+++ b/README.md
@@ -35,7 +35,7 @@ Taskbar can be downloaded as a standalone Android app from:
 
 Taskbar is also included as part of the following Android distributions for PCs:
 
-* Android-x86 (version 7.1-rc2) (http://www.android-x86.org)
+* Android-x86 (7.1-rc2 and 7.1-r1) (http://www.android-x86.org)
 * Bliss OS (x86 builds) (https://blissroms.com)
 
 ## How to Build
index 181c74f..eb2ff6a 100644 (file)
@@ -4,6 +4,7 @@ ext {
 }
 
 apply plugin: 'com.android.application'
+apply plugin: 'com.google.gms.oss.licenses.plugin'
 
 repositories {
     google()
@@ -19,8 +20,8 @@ android {
         minSdkVersion 21
         targetSdkVersion SDK_VERSION
 
-        versionCode 177
-        versionName "3.8.1"
+        versionCode 178
+        versionName "3.8.2"
 
         resConfigs "en", "ja", "ru", "de", "zh-rCN"
 
@@ -81,7 +82,8 @@ dependencies {
     implementation fileTree(dir: 'libs', include: ['*.jar'])
     implementation "com.android.support:appcompat-v7:${SUPPORT_LIBRARY_VERSION}"
     implementation "com.android.support:design:${SUPPORT_LIBRARY_VERSION}"
-    implementation 'com.mikepenz:iconics-core:3.0.0@aar'
+    implementation 'com.google.android.gms:play-services-oss-licenses:11.8.0'
+    implementation 'com.mikepenz:iconics-core:3.0.3@aar'
     implementation 'com.mikepenz:foundation-icons-typeface:3.0.0.3@aar'
     implementation 'moe.banana:toast-compat:1.0.5'
 }
index 133d79f..2676fce 100644 (file)
@@ -19,8 +19,8 @@
      * HomeActivity is enabled by default
      * SendSettingsReceiver and ReceiveSettingsReceiver are not exposed
 -->
-<manifest android:versionCode="177"
-          android:versionName="3.8.1"
+<manifest android:versionCode="178"
+          android:versionName="3.8.2"
           xmlns:android="http://schemas.android.com/apk/res/android"
           package="com.farmerbb.taskbar" >
 
         <activity
             android:name=".activity.dark.NavigationBarButtonsActivityDark"
             android:theme="@style/AppTheme.Dialog.Preference.Dark"/>
+        <activity
+            android:name=".activity.AboutDialogActivity"
+            android:theme="@style/AppTheme.Dialog.Preference"/>
+        <activity
+            android:name=".activity.dark.AboutDialogActivityDark"
+            android:theme="@style/AppTheme.Dialog.Preference.Dark"/>
 
         <service android:name=".service.TaskbarService"/>
         <service android:name=".service.StartMenuService"/>
index c5b1678..11b7ade 100644 (file)
@@ -30,4 +30,6 @@ public class DependencyUtils {
     static ToastInterface createToast(Context context, String message, int length) {
         return new ToastFrameworkImpl(context, message, length);
     }
+
+    public static void showLicenses(Context context) {}
 }
diff --git a/app/src/main/java/com/farmerbb/taskbar/activity/AboutDialogActivity.java b/app/src/main/java/com/farmerbb/taskbar/activity/AboutDialogActivity.java
new file mode 100644 (file)
index 0000000..a015be4
--- /dev/null
@@ -0,0 +1,72 @@
+/* Copyright 2018 Braden Farmer
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.farmerbb.taskbar.activity;
+
+import android.content.ActivityNotFoundException;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Bundle;
+import android.preference.Preference;
+import android.preference.PreferenceActivity;
+
+import com.farmerbb.taskbar.BuildConfig;
+import com.farmerbb.taskbar.R;
+import com.farmerbb.taskbar.util.DependencyUtils;
+import com.farmerbb.taskbar.util.U;
+
+public class AboutDialogActivity extends PreferenceActivity implements Preference.OnPreferenceClickListener {
+
+    @SuppressWarnings("deprecation")
+    @Override
+    protected void onPostCreate(Bundle savedInstanceState) {
+        super.onPostCreate(savedInstanceState);
+        setTitle(R.string.pref_header_about);
+
+        if(!BuildConfig.APPLICATION_ID.equals(BuildConfig.ANDROIDX86_APPLICATION_ID)) {
+            addPreferencesFromResource(R.xml.pref_about_dialog);
+
+            findPreference("view_play_store").setOnPreferenceClickListener(this);
+            findPreference("view_licenses").setOnPreferenceClickListener(this);
+        } else
+            addPreferencesFromResource(R.xml.pref_about_dialog_alt);
+
+        findPreference("view_github").setOnPreferenceClickListener(this);
+    }
+
+    @Override
+    public boolean onPreferenceClick(Preference preference) {
+        switch(preference.getKey()) {
+            case "view_play_store":
+                U.checkForUpdates(this);
+                break;
+            case "view_github":
+                Intent intent = new Intent(Intent.ACTION_VIEW);
+                intent.setData(Uri.parse("https://github.com/farmerbb/Taskbar"));
+                intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+
+                try {
+                    startActivity(intent);
+                } catch (ActivityNotFoundException e) { /* Gracefully fail */ }
+                break;
+            case "view_licenses":
+                DependencyUtils.showLicenses(this);
+                break;
+        }
+
+        finish();
+        return true;
+    }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/farmerbb/taskbar/activity/dark/AboutDialogActivityDark.java b/app/src/main/java/com/farmerbb/taskbar/activity/dark/AboutDialogActivityDark.java
new file mode 100644 (file)
index 0000000..b0e32e8
--- /dev/null
@@ -0,0 +1,20 @@
+/* Copyright 2018 Braden Farmer
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.farmerbb.taskbar.activity.dark;
+
+import com.farmerbb.taskbar.activity.AboutDialogActivity;
+
+public class AboutDialogActivityDark extends AboutDialogActivity {}
index d38ed0a..dd4426d 100644 (file)
@@ -29,6 +29,8 @@ import android.support.v7.app.AppCompatActivity;
 
 import com.farmerbb.taskbar.BuildConfig;
 import com.farmerbb.taskbar.R;
+import com.farmerbb.taskbar.activity.AboutDialogActivity;
+import com.farmerbb.taskbar.activity.dark.AboutDialogActivityDark;
 import com.farmerbb.taskbar.util.U;
 
 import java.text.NumberFormat;
@@ -96,7 +98,18 @@ public class AboutFragment extends SettingsFragment implements Preference.OnPref
 
         switch(p.getKey()) {
             case "about":
-                U.checkForUpdates(getActivity());
+                Intent intent = null;
+
+                switch(pref.getString("theme", "light")) {
+                    case "light":
+                        intent = new Intent(getActivity(), AboutDialogActivity.class);
+                        break;
+                    case "dark":
+                        intent = new Intent(getActivity(), AboutDialogActivityDark.class);
+                        break;
+                }
+
+                startActivity(intent);
                 break;
             case "donate":
                 NumberFormat format = NumberFormat.getCurrencyInstance();
@@ -106,12 +119,12 @@ public class AboutFragment extends SettingsFragment implements Preference.OnPref
                 builder.setTitle(R.string.pref_title_donate)
                         .setMessage(getString(R.string.dialog_donate_message, format.format(1.99)))
                         .setPositiveButton(R.string.action_ok, (dialog, which) -> {
-                            Intent intent = new Intent(Intent.ACTION_VIEW);
-                            intent.setData(Uri.parse("https://play.google.com/store/apps/details?id=" + BuildConfig.PAID_APPLICATION_ID));
-                            intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+                            Intent intent2 = new Intent(Intent.ACTION_VIEW);
+                            intent2.setData(Uri.parse("https://play.google.com/store/apps/details?id=" + BuildConfig.PAID_APPLICATION_ID));
+                            intent2.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
 
                             try {
-                                startActivity(intent);
+                                startActivity(intent2);
                             } catch (ActivityNotFoundException e) { /* Gracefully fail */ }
                         })
                         .setNegativeButton(noThanksCount == 2 ? R.string.action_dont_show_again : R.string.action_no_thanks, (dialog, which) -> {
index 21872a8..e91c62b 100644 (file)
@@ -203,7 +203,11 @@ public class AdvancedFragment extends SettingsFragment implements Preference.OnP
                             if(!successfullyUpdated)
                                 U.showToast(getActivity(), R.string.invalid_grid_size);
                         })
-                        .setNegativeButton(R.string.action_cancel, null);
+                        .setNegativeButton(R.string.action_cancel, null)
+                        .setNeutralButton(R.string.use_default, (dialog, id) -> {
+                            pref.edit().remove("dashboard_width").remove("dashboard_height").apply();
+                            updateDashboardGridSize(true);
+                        });
 
                 editText.setText(Integer.toString(pref.getInt("dashboard_width", getActivity().getApplicationContext().getResources().getInteger(R.integer.dashboard_width))));
                 editText2.setText(Integer.toString(pref.getInt("dashboard_height", getActivity().getApplicationContext().getResources().getInteger(R.integer.dashboard_height))));
index 6bf3e87..487d960 100644 (file)
@@ -91,6 +91,16 @@ public class FreeformModeFragment extends SettingsFragment implements Preference
             AlertDialog dialog = builder.create();
             dialog.show();
             dialog.setCancelable(false);
+        } else if(U.isUntestedAndroidVersion(getActivity())
+                && pref.getInt("current_api_version", Build.VERSION.SDK_INT - 1) < Build.VERSION.SDK_INT) {
+            AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
+            builder.setTitle(R.string.samsung_freeform_title)
+                    .setMessage(R.string.dialog_upgrade_message)
+                    .setPositiveButton(R.string.action_ok, (dialog, which) -> pref.edit().putInt("current_api_version", Build.VERSION.SDK_INT).apply());
+
+            AlertDialog dialog = builder.create();
+            dialog.show();
+            dialog.setCancelable(false);
         }
 
         LocalBroadcastManager.getInstance(getActivity()).registerReceiver(checkBoxReceiver, new IntentFilter("com.farmerbb.taskbar.UPDATE_FREEFORM_CHECKBOX"));
index 88d09ec..d69898d 100644 (file)
@@ -342,12 +342,13 @@ public class TaskbarService extends Service {
                 searchInterval = System.currentTimeMillis() - AlarmManager.INTERVAL_DAY;
                 break;
             case "app_start":
-                long oneDayAgo = System.currentTimeMillis() - AlarmManager.INTERVAL_DAY;
                 long appStartTime = pref.getLong("time_of_service_start", System.currentTimeMillis());
                 long deviceStartTime = System.currentTimeMillis() - SystemClock.elapsedRealtime();
-                long startTime = deviceStartTime > appStartTime ? deviceStartTime : appStartTime;
 
-                searchInterval = startTime > oneDayAgo ? startTime : oneDayAgo;
+                searchInterval = deviceStartTime > appStartTime ? deviceStartTime : appStartTime;
+                break;
+            case "show_all":
+                searchInterval = 0;
                 break;
         }
 
@@ -1344,7 +1345,7 @@ public class TaskbarService extends Service {
     @TargetApi(Build.VERSION_CODES.LOLLIPOP_MR1)
     private List<AppEntry> getAppEntriesUsingUsageStats() {
         UsageStatsManager mUsageStatsManager = (UsageStatsManager) getSystemService(USAGE_STATS_SERVICE);
-        List<UsageStats> usageStatsList = mUsageStatsManager.queryUsageStats(UsageStatsManager.INTERVAL_YEARLY, searchInterval, System.currentTimeMillis());
+        List<UsageStats> usageStatsList = mUsageStatsManager.queryUsageStats(UsageStatsManager.INTERVAL_BEST, searchInterval, System.currentTimeMillis());
         List<AppEntry> entries = new ArrayList<>();
 
         for(UsageStats usageStats : usageStatsList) {
@@ -1374,6 +1375,9 @@ public class TaskbarService extends Service {
     }
 
     private boolean isScreenOff() {
+        if(U.isChromeOs(this))
+            return false;
+
         PowerManager pm = (PowerManager) getSystemService(POWER_SERVICE);
         return !pm.isInteractive();
     }
index d1d8ed3..a8598d3 100644 (file)
@@ -535,26 +535,24 @@ public class U {
     }
 
     public static void checkForUpdates(Context context) {
-        if(!BuildConfig.APPLICATION_ID.equals(BuildConfig.ANDROIDX86_APPLICATION_ID)) {
-            if(!BuildConfig.DEBUG) {
-                String url;
-                try {
-                    context.getPackageManager().getPackageInfo("com.android.vending", 0);
-                    url = "https://play.google.com/store/apps/details?id=" + BuildConfig.APPLICATION_ID;
-                } catch (PackageManager.NameNotFoundException e) {
-                    url = "https://f-droid.org/repository/browse/?fdid=" + BuildConfig.BASE_APPLICATION_ID;
-                }
+        if(!BuildConfig.DEBUG) {
+            String url;
+            try {
+                context.getPackageManager().getPackageInfo("com.android.vending", 0);
+                url = "https://play.google.com/store/apps/details?id=" + BuildConfig.APPLICATION_ID;
+            } catch (PackageManager.NameNotFoundException e) {
+                url = "https://f-droid.org/repository/browse/?fdid=" + BuildConfig.BASE_APPLICATION_ID;
+            }
 
-                Intent intent = new Intent(Intent.ACTION_VIEW);
-                intent.setData(Uri.parse(url));
-                intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+            Intent intent = new Intent(Intent.ACTION_VIEW);
+            intent.setData(Uri.parse(url));
+            intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
 
-                try {
-                    context.startActivity(intent);
-                } catch (ActivityNotFoundException e) { /* Gracefully fail */ }
-            } else
-                showToast(context, R.string.debug_build);
-        }
+            try {
+                context.startActivity(intent);
+            } catch (ActivityNotFoundException e) { /* Gracefully fail */ }
+        } else
+            showToast(context, R.string.debug_build);
     }
 
     public static boolean launcherIsDefault(Context context) {
@@ -1030,7 +1028,7 @@ public class U {
     public static void initPrefs(Context context) {
         // On smaller-screened devices, set "Grid" as the default start menu layout
         SharedPreferences pref = getSharedPreferences(context);
-        if(context.getApplicationContext().getResources().getConfiguration().smallestScreenWidthDp < 600
+        if(context.getApplicationContext().getResources().getConfiguration().smallestScreenWidthDp < 720
                 && pref.getString("start_menu_layout", "null").equals("null")) {
             pref.edit().putString("start_menu_layout", "grid").apply();
         }
@@ -1065,7 +1063,6 @@ public class U {
             editor.putString("sort_order", "true");
             editor.putBoolean("full_length", true);
             editor.putBoolean("dashboard", true);
-            editor.putBoolean("scrollbar", true);
             editor.putBoolean("app_drawer_icon", true);
             editor.putBoolean("button_back", true);
             editor.putBoolean("button_home", true);
@@ -1092,7 +1089,6 @@ public class U {
                     .putString("sort_order", "true")
                     .putBoolean("full_length", true)
                     .putBoolean("dashboard", true)
-                    .putBoolean("scrollbar", true)
                     .putBoolean("android_x86_prefs", true)
                     .apply();
         }
@@ -1166,4 +1162,20 @@ public class U {
             return false;
         }
     }
+
+    public static boolean isUntestedAndroidVersion(Context context) {
+        int androidSdkInt = Build.VERSION.SDK_INT;
+        int targetSdkInt = context.getApplicationInfo().targetSdkVersion;
+
+        if(androidSdkInt > targetSdkInt)
+            return true;
+
+        if(androidSdkInt >= Build.VERSION_CODES.M) {
+            int previewSdkInt = Build.VERSION.PREVIEW_SDK_INT;
+
+            return androidSdkInt == targetSdkInt && previewSdkInt > 0;
+        }
+
+        return false;
+    }
 }
index 60b1a28..d2d936f 100644 (file)
     <string-array name="pref_recents_amount">
         <item>Seit dem letzten Tag</item>
         <item>Nach dem Start von Taskbar</item>
+        <item>All apps (may reduce performance)</item>
     </string-array>
     <string-array name="pref_recents_amount_alt">
         <item>Seit dem letzten Tag</item>
         <item>Nach dem Start von Taskbar</item>
+        <item>All apps (may reduce performance)</item>
         <item>Running apps only</item>
     </string-array>
 
     <string name="pref_secondscreen_title_install">Install SecondScreen</string>
     <string name="pref_secondscreen_description">Change your device\'s resolution and density when connected to an external display, for a Continuum or DeX-like experience</string>
 
+    <string name="dialog_upgrade_message">Taskbar\'s freeform mode support has not been tested on this version of Android. It may behave in unexpected ways - check for updates if there are any issues.</string>
+
+    <string name="use_default">Use default</string>
+
+    <string name="view_play_store">Check for updates</string>
+    <string name="view_github">View GitHub page</string>
+    <string name="view_licenses">Open source licenses</string>
+
 </resources>
index 7187d8b..62a147c 100644 (file)
     <string-array name="pref_recents_amount">
         <item>経過日内</item>
         <item>Taskbar 開始後</item>
+        <item>All apps (may reduce performance)</item>
     </string-array>
     <string-array name="pref_recents_amount_alt">
         <item>経過日内</item>
         <item>Taskbar 開始後</item>
+        <item>All apps (may reduce performance)</item>
         <item>Running apps only</item>
     </string-array>
 
     <string name="pref_secondscreen_title_install">Install SecondScreen</string>
     <string name="pref_secondscreen_description">Change your device\'s resolution and density when connected to an external display, for a Continuum or DeX-like experience</string>
 
+    <string name="dialog_upgrade_message">Taskbar\'s freeform mode support has not been tested on this version of Android. It may behave in unexpected ways - check for updates if there are any issues.</string>
+
+    <string name="use_default">Use default</string>
+
+    <string name="view_play_store">Check for updates</string>
+    <string name="view_github">View GitHub page</string>
+    <string name="view_licenses">Open source licenses</string>
+
 </resources>
index 98d3fcb..b8c79ed 100644 (file)
     <string-array name="pref_recents_amount">
         <item>В течение дня</item>
         <item>После запуска Taskbar</item>
+        <item>All apps (may reduce performance)</item>
     </string-array>
     <string-array name="pref_recents_amount_alt">
         <item>В течение дня</item>
         <item>После запуска Taskbar</item>
+        <item>All apps (may reduce performance)</item>
         <item>Running apps only</item>
     </string-array>
 
     <string name="pref_secondscreen_title_install">Install SecondScreen</string>
     <string name="pref_secondscreen_description">Change your device\'s resolution and density when connected to an external display, for a Continuum or DeX-like experience</string>
 
+    <string name="dialog_upgrade_message">Taskbar\'s freeform mode support has not been tested on this version of Android. It may behave in unexpected ways - check for updates if there are any issues.</string>
+
+    <string name="use_default">Use default</string>
+
+    <string name="view_play_store">Check for updates</string>
+    <string name="view_github">View GitHub page</string>
+    <string name="view_licenses">Open source licenses</string>
+
 </resources>
index 3ebebf3..6044c93 100644 (file)
@@ -16,4 +16,6 @@
 
 <resources>
     <dimen name="max_width">720dp</dimen>
+    <dimen name="phone_size_width">411dp</dimen>
+    <dimen name="phone_size_height">731dp</dimen>
 </resources>
index 20ee6f8..f03abd0 100644 (file)
     <string-array name="pref_recents_amount">
         <item>过去一天内</item>
         <item>启动任务栏后</item>
+        <item>All apps (may reduce performance)</item>
     </string-array>
     <string-array name="pref_recents_amount_alt">
         <item>过去一天内</item>
         <item>启动任务栏后</item>
+        <item>All apps (may reduce performance)</item>
         <item>仅限运行中的应用</item>
     </string-array>
 
     <string name="pref_secondscreen_title_install">Install SecondScreen</string>
     <string name="pref_secondscreen_description">Change your device\'s resolution and density when connected to an external display, for a Continuum or DeX-like experience</string>
 
+    <string name="dialog_upgrade_message">Taskbar\'s freeform mode support has not been tested on this version of Android. It may behave in unexpected ways - check for updates if there are any issues.</string>
+
+    <string name="use_default">Use default</string>
+
+    <string name="view_play_store">Check for updates</string>
+    <string name="view_github">View GitHub page</string>
+    <string name="view_licenses">Open source licenses</string>
+
 </resources>
\ No newline at end of file
index 2045c99..433a609 100644 (file)
     <string-array name="pref_recents_amount_values">
         <item>past_day</item>
         <item>app_start</item>
+        <item>show_all</item>
     </string-array>
     <string-array name="pref_recents_amount_values_alt">
         <item>past_day</item>
         <item>app_start</item>
+        <item>show_all</item>
         <item>running_apps_only</item>
     </string-array>
 
index 5fe4ff5..b273186 100644 (file)
     <string name="pref_title_enable_recents">Enable/disable usage access</string>
     <string name="pref_title_recents_refresh_interval">Refresh rate</string>
 
-    <string name="pref_title_amount_of_recents">Display apps launched</string>
+    <string name="pref_title_amount_of_recents">Recent apps to display</string>
     <string-array name="pref_recents_amount">
-        <item>Within the past day</item>
-        <item>After Taskbar start</item>
+        <item>Apps used within the past day</item>
+        <item>Apps used after Taskbar start</item>
+        <item>All apps (may reduce performance)</item>
     </string-array>
     <string-array name="pref_recents_amount_alt">
-        <item>Within the past day</item>
-        <item>After Taskbar start</item>
+        <item>Apps used within the past day</item>
+        <item>Apps used after Taskbar start</item>
+        <item>All apps (may reduce performance)</item>
         <item>Running apps only</item>
     </string-array>
 
     <string name="pref_secondscreen_title_install">Install SecondScreen</string>
     <string name="pref_secondscreen_description">Change your device\'s resolution and density when connected to an external display, for a Continuum or DeX-like experience</string>
 
+    <string name="dialog_upgrade_message">Taskbar\'s freeform mode support has not been tested on this version of Android. It may behave in unexpected ways - check for updates if there are any issues.</string>
+
+    <string name="use_default">Use default</string>
+
+    <string name="view_play_store">Check for updates</string>
+    <string name="view_github">View GitHub page</string>
+    <string name="view_licenses">Open source licenses</string>
+
 </resources>
diff --git a/app/src/main/res/xml/pref_about_dialog.xml b/app/src/main/res/xml/pref_about_dialog.xml
new file mode 100644 (file)
index 0000000..44cfda9
--- /dev/null
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright 2018 Braden Farmer
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <Preference
+        android:key="view_play_store"
+        android:title="@string/view_play_store" />
+
+    <Preference
+        android:key="view_github"
+        android:title="@string/view_github" />
+
+    <Preference
+        android:key="view_licenses"
+        android:title="@string/view_licenses" />
+
+</PreferenceScreen>
diff --git a/app/src/main/res/xml/pref_about_dialog_alt.xml b/app/src/main/res/xml/pref_about_dialog_alt.xml
new file mode 100644 (file)
index 0000000..9286996
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright 2018 Braden Farmer
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <Preference
+        android:key="view_github"
+        android:title="@string/view_github" />
+
+</PreferenceScreen>
index 0aad14a..d229dd5 100644 (file)
         <activity
             android:name=".activity.dark.NavigationBarButtonsActivityDark"
             android:theme="@style/AppTheme.Dialog.Preference.Dark"/>
+        <activity
+            android:name=".activity.AboutDialogActivity"
+            android:theme="@style/AppTheme.Dialog.Preference"/>
+        <activity
+            android:name=".activity.dark.AboutDialogActivityDark"
+            android:theme="@style/AppTheme.Dialog.Preference.Dark"/>
 
         <service android:name=".service.TaskbarService"/>
         <service android:name=".service.StartMenuService"/>
index ce809b2..7a0b88d 100644 (file)
 package com.farmerbb.taskbar.util;
 
 import android.content.Context;
+import android.content.Intent;
 import android.os.Build;
 
 import com.farmerbb.taskbar.R;
+import com.google.android.gms.oss.licenses.OssLicensesMenuActivity;
 import com.mikepenz.iconics.Iconics;
 
 public class DependencyUtils {
@@ -38,4 +40,9 @@ public class DependencyUtils {
         else
             return new ToastCompatImpl(context, message, length);
     }
+
+    public static void showLicenses(Context context) {
+        Intent intent = new Intent(context, OssLicensesMenuActivity.class);
+        context.startActivity(intent);
+    }
 }
index c7435fc..b9aaccb 100644 (file)
@@ -8,6 +8,7 @@ buildscript {
 
     dependencies {
         classpath 'com.android.tools.build:gradle:3.0.1'
+        classpath 'com.google.gms:oss-licenses:0.9.1'
 
         // NOTE: Do not place your application dependencies here; they belong
         // in the individual module build.gradle files
index 1ccd195..e9e4d04 100644 (file)
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.5-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.5.1-all.zip