if(!pref.getBoolean("samsung_dialog_shown", false)) {
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
builder.setTitle(R.string.samsung_freeform_title)
- .setMessage(U.isOPreview() ? R.string.o_preview_freeform_message : R.string.samsung_freeform_message)
+ .setMessage(R.string.samsung_freeform_message)
.setPositiveButton(R.string.action_ok, (dialog, which) -> pref.edit().putBoolean("samsung_dialog_shown", true).apply());
AlertDialog dialog = builder.create();
if(showReminderToast) {
showReminderToast = false;
- ((CheckBoxPreference) findPreference("freeform_hack")).setChecked(U.hasFreeformSupport(getActivity()));
-
- if(U.hasFreeformSupport(getActivity())) {
- U.showToastLong(getActivity(), R.string.reboot_required);
- }
+ freeformSetupComplete();
}
}
((CheckBoxPreference) p).setChecked(false);
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
- builder.setTitle(R.string.freeform_dialog_title)
- .setMessage(R.string.freeform_dialog_message)
- .setPositiveButton(R.string.action_developer_options, (dialogInterface, i) -> {
- showReminderToast = true;
-
- Intent intent = new Intent(Settings.ACTION_APPLICATION_DEVELOPMENT_SETTINGS);
- try {
- startActivity(intent);
- U.showToastLong(getActivity(), R.string.enable_force_activities_resizable);
- } catch (ActivityNotFoundException e1) {
- intent = new Intent(Settings.ACTION_DEVICE_INFO_SETTINGS);
+ if(Build.VERSION.SDK_INT > Build.VERSION_CODES.N_MR1) {
+ builder.setTitle(R.string.freeform_dialog_title)
+ .setMessage(R.string.freeform_dialog_message_alt)
+ .setPositiveButton(R.string.action_ok, (dialogInterface, i) -> freeformSetupComplete());
+ } else {
+ builder.setTitle(R.string.freeform_dialog_title)
+ .setMessage(R.string.freeform_dialog_message)
+ .setPositiveButton(R.string.action_developer_options, (dialogInterface, i) -> {
+ showReminderToast = true;
+
+ Intent intent = new Intent(Settings.ACTION_APPLICATION_DEVELOPMENT_SETTINGS);
try {
startActivity(intent);
- U.showToastLong(getActivity(), R.string.enable_developer_options);
- } catch (ActivityNotFoundException e2) { /* Gracefully fail */ }
- }
- });
+ U.showToastLong(getActivity(), R.string.enable_force_activities_resizable);
+ } catch (ActivityNotFoundException e1) {
+ intent = new Intent(Settings.ACTION_DEVICE_INFO_SETTINGS);
+ try {
+ startActivity(intent);
+ U.showToastLong(getActivity(), R.string.enable_developer_options);
+ } catch (ActivityNotFoundException e2) { /* Gracefully fail */ }
+ }
+ });
+ }
AlertDialog dialog = builder.create();
dialog.show();
return true;
}
+
+ private void freeformSetupComplete() {
+ ((CheckBoxPreference) findPreference("freeform_hack")).setChecked(U.hasFreeformSupport(getActivity()));
+
+ if(U.hasFreeformSupport(getActivity())) {
+ U.showToastLong(getActivity(), R.string.reboot_required);
+ }
+ }
}
<string name="samsung_freeform_title">Note</string>
<string name="samsung_freeform_message">Freeform mode does not work on Samsung devices, due to system changes made to multi-window mode.\n\nYou may need to flash a custom ROM in order to use freeform mode on this device.</string>
- <string name="o_preview_freeform_message">Freeform mode has issues on devices with Android O, due to system changes made to multi-window mode.\n\nFor maximum compatibility, please clear all fullscreen apps from recents before opening any freeform windows.</string>
<string name="widget_restore_toast">Select \"%1$s\" to restore this widget</string>
<string name="press_enter_alt">@string/press_enter</string>
+ <string name="freeform_dialog_message_alt">In order for Taskbar to launch apps in freeform window mode, please follow these steps:\n\n• Go to Developer Options and enable USB debugging\n\n• Connect your device to a computer with the Android SDK installed, and run the following adb shell command:\n\nsettings put global enable_freeform_support 1\n\n• Reboot your device</string>
+
</resources>
<string name="samsung_freeform_title">注意</string>
<string name="samsung_freeform_message">マルチウィンドウモードのシステム変更により、フリーフォームモードが Samsung デバイスで動作しない可能性があります。\n\nこのデバイスでフリーフォームモードを使用するにはカスタム ROM をフラッシュする必要があります。</string>
- <string name="o_preview_freeform_message">Freeform mode has issues on devices with Android O, due to system changes made to multi-window mode.\n\nFor maximum compatibility, please clear all fullscreen apps from recents before opening any freeform windows.</string>
<string name="widget_restore_toast">\"%1$s\" を選択してこのウィジェットを復元します</string>
<string name="press_enter_alt">@string/press_enter</string>
+ <string name="freeform_dialog_message_alt">In order for Taskbar to launch apps in freeform window mode, please follow these steps:\n\n• Go to Developer Options and enable USB debugging\n\n• Connect your device to a computer with the Android SDK installed, and run the following adb shell command:\n\nsettings put global enable_freeform_support 1\n\n• Reboot your device</string>
+
</resources>
<string name="samsung_freeform_title">Внимание</string>
<string name="samsung_freeform_message">Freeform имеет проблемы с устройствами Samsung из-за изменений в работе мультизадачности.\n\nВам потребуеться прошить сторонее ПО для работы Freeform.</string>
- <string name="o_preview_freeform_message">Freeform mode has issues on devices with Android O, due to system changes made to multi-window mode.\n\nFor maximum compatibility, please clear all fullscreen apps from recents before opening any freeform windows.</string>
<string name="widget_restore_toast">Select \"%1$s\" to restore this widget</string>
<string name="press_enter_alt">@string/press_enter</string>
+ <string name="freeform_dialog_message_alt">In order for Taskbar to launch apps in freeform window mode, please follow these steps:\n\n• Go to Developer Options and enable USB debugging\n\n• Connect your device to a computer with the Android SDK installed, and run the following adb shell command:\n\nsettings put global enable_freeform_support 1\n\n• Reboot your device</string>
+
</resources>
<string name="samsung_freeform_title">Note</string>
<string name="samsung_freeform_message">Freeform mode does not work on Samsung devices, due to system changes made to multi-window mode.\n\nYou may need to flash a custom ROM in order to use freeform mode on this device.</string>
- <string name="o_preview_freeform_message">Freeform mode has issues on devices with Android O, due to system changes made to multi-window mode.\n\nFor maximum compatibility, please clear all fullscreen apps from recents before opening any freeform windows.</string>
<string name="widget_restore_toast">Select \"%1$s\" to restore this widget</string>
<string name="press_enter_alt">No apps found\n\nPress Enter to open in browser</string>
+ <string name="freeform_dialog_message_alt">In order for Taskbar to launch apps in freeform window mode, please follow these steps:\n\n• Go to Developer Options and enable USB debugging\n\n• Connect your device to a computer with the Android SDK installed, and run the following adb shell command:\n\nsettings put global enable_freeform_support 1\n\n• Reboot your device</string>
+
</resources>