From 1ec2ac780d98eff0c59b66356615de31e6d2477c Mon Sep 17 00:00:00 2001 From: Ryan Meredith Date: Tue, 8 Sep 2020 05:59:08 -0400 Subject: [PATCH 1/2] Android: Update code-style-java for androidx files --- Source/Android/code-style-java.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/Android/code-style-java.xml b/Source/Android/code-style-java.xml index 35c0b133fe..6965fd3cda 100644 --- a/Source/Android/code-style-java.xml +++ b/Source/Android/code-style-java.xml @@ -22,6 +22,8 @@ + + From 255e8ff007cceeb62c9d654d0a67aa1d6d074f30 Mon Sep 17 00:00:00 2001 From: Ryan Meredith Date: Tue, 8 Sep 2020 06:01:34 -0400 Subject: [PATCH 2/2] Android: Optimize imports --- .../activities/AppLinkActivity.java | 7 +++--- .../activities/EmulationActivity.java | 19 +++++++------- .../dolphinemu/adapters/GameAdapter.java | 7 +++--- .../dolphinemu/adapters/GameRowPresenter.java | 13 +++++----- .../adapters/PlatformPagerAdapter.java | 7 +++--- .../adapters/SettingsRowPresenter.java | 3 +-- .../dialogs/GamePropertiesDialog.java | 5 ++-- .../features/settings/model/Settings.java | 3 --- .../model/view/InvertedCheckBoxSetting.java | 1 - .../settings/model/view/SliderSetting.java | 1 - .../settings/ui/SettingsActivity.java | 13 +++++----- .../features/settings/ui/SettingsAdapter.java | 9 +++---- .../settings/ui/SettingsFragment.java | 7 +++--- .../ui/SettingsFragmentPresenter.java | 1 - .../settings/ui/SettingsViewModel.java | 4 +-- .../viewholder/ConfirmRunnableViewHolder.java | 4 +-- .../ui/viewholder/SettingViewHolder.java | 4 +-- .../features/settings/utils/SettingsFile.java | 2 +- .../fragments/CustomFilePickerFragment.java | 7 +++--- .../fragments/EmulationFragment.java | 7 +++--- .../dolphinemu/fragments/MenuFragment.java | 5 ++-- .../fragments/SaveLoadStateFragment.java | 7 +++--- .../dolphinemu/model/GameFileCache.java | 1 - .../services/SyncChannelJobService.java | 3 +-- .../services/SyncProgramsJobService.java | 3 +-- .../dolphinemu/ui/DividerItemDecoration.java | 5 ++-- .../dolphinemu/ui/main/CustomTitleView.java | 5 ++-- .../dolphinemu/ui/main/MainActivity.java | 25 ++++++++----------- .../dolphinemu/ui/main/TvMainActivity.java | 11 ++++---- .../ui/platform/PlatformGamesFragment.java | 7 +++--- .../dolphinemu/utils/Analytics.java | 4 +-- .../dolphinemu/utils/PermissionsHandler.java | 5 ++-- .../dolphinemu/utils/StartupHandler.java | 3 +-- .../dolphinemu/dolphinemu/utils/TvUtil.java | 3 +-- .../viewholders/GameViewHolder.java | 4 +-- .../viewholders/TvGameViewHolder.java | 6 ++--- .../viewholders/TvSettingsViewHolder.java | 4 +-- 37 files changed, 95 insertions(+), 130 deletions(-) diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/AppLinkActivity.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/AppLinkActivity.java index a97b7fcf39..44db12e273 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/AppLinkActivity.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/AppLinkActivity.java @@ -6,18 +6,17 @@ import android.content.Intent; import android.content.IntentFilter; import android.net.Uri; import android.os.Bundle; +import android.util.Log; import androidx.fragment.app.FragmentActivity; import androidx.localbroadcastmanager.content.LocalBroadcastManager; -import android.util.Log; - import org.dolphinemu.dolphinemu.model.GameFile; -import org.dolphinemu.dolphinemu.utils.AfterDirectoryInitializationRunner; -import org.dolphinemu.dolphinemu.utils.DirectoryInitialization; import org.dolphinemu.dolphinemu.services.GameFileCacheService; import org.dolphinemu.dolphinemu.ui.main.TvMainActivity; +import org.dolphinemu.dolphinemu.utils.AfterDirectoryInitializationRunner; import org.dolphinemu.dolphinemu.utils.AppLinkHelper; +import org.dolphinemu.dolphinemu.utils.DirectoryInitialization; /** * Linker between leanback homescreen and app diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/EmulationActivity.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/EmulationActivity.java index 3ffd0e93ec..a2459df782 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/EmulationActivity.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/EmulationActivity.java @@ -8,15 +8,6 @@ import android.content.pm.ActivityInfo; import android.os.Bundle; import android.os.Handler; import android.preference.PreferenceManager; - -import androidx.annotation.IntDef; -import androidx.annotation.NonNull; -import androidx.appcompat.app.AlertDialog; -import androidx.fragment.app.Fragment; -import androidx.fragment.app.FragmentActivity; -import androidx.fragment.app.FragmentManager; -import androidx.appcompat.app.AppCompatActivity; - import android.text.TextUtils; import android.util.SparseIntArray; import android.view.InputDevice; @@ -30,6 +21,14 @@ import android.widget.SeekBar; import android.widget.TextView; import android.widget.Toast; +import androidx.annotation.IntDef; +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.app.AppCompatActivity; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentActivity; +import androidx.fragment.app.FragmentManager; + import org.dolphinemu.dolphinemu.NativeLibrary; import org.dolphinemu.dolphinemu.R; import org.dolphinemu.dolphinemu.features.settings.model.Settings; @@ -38,9 +37,9 @@ import org.dolphinemu.dolphinemu.fragments.EmulationFragment; import org.dolphinemu.dolphinemu.fragments.MenuFragment; import org.dolphinemu.dolphinemu.fragments.SaveLoadStateFragment; import org.dolphinemu.dolphinemu.model.GameFile; -import org.dolphinemu.dolphinemu.services.GameFileCacheService; import org.dolphinemu.dolphinemu.overlay.InputOverlay; import org.dolphinemu.dolphinemu.overlay.InputOverlayPointer; +import org.dolphinemu.dolphinemu.services.GameFileCacheService; import org.dolphinemu.dolphinemu.ui.main.MainActivity; import org.dolphinemu.dolphinemu.ui.main.TvMainActivity; import org.dolphinemu.dolphinemu.ui.platform.Platform; diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/GameAdapter.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/GameAdapter.java index dece38b16b..9fa73b3da1 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/GameAdapter.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/GameAdapter.java @@ -2,16 +2,15 @@ package org.dolphinemu.dolphinemu.adapters; import android.content.Context; import android.graphics.Rect; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; import androidx.annotation.NonNull; import androidx.appcompat.app.AlertDialog; import androidx.fragment.app.FragmentActivity; import androidx.recyclerview.widget.RecyclerView; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; - import org.dolphinemu.dolphinemu.R; import org.dolphinemu.dolphinemu.activities.EmulationActivity; import org.dolphinemu.dolphinemu.dialogs.GamePropertiesDialog; diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/GameRowPresenter.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/GameRowPresenter.java index fc0360f02b..44a57337e3 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/GameRowPresenter.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/GameRowPresenter.java @@ -2,16 +2,15 @@ package org.dolphinemu.dolphinemu.adapters; import android.content.Context; import android.graphics.drawable.Drawable; - -import androidx.appcompat.app.AlertDialog; -import androidx.leanback.widget.ImageCardView; -import androidx.leanback.widget.Presenter; -import androidx.fragment.app.FragmentActivity; -import androidx.core.content.ContextCompat; - import android.view.ViewGroup; import android.widget.ImageView; +import androidx.appcompat.app.AlertDialog; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.FragmentActivity; +import androidx.leanback.widget.ImageCardView; +import androidx.leanback.widget.Presenter; + import org.dolphinemu.dolphinemu.R; import org.dolphinemu.dolphinemu.dialogs.GamePropertiesDialog; import org.dolphinemu.dolphinemu.model.GameFile; diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/PlatformPagerAdapter.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/PlatformPagerAdapter.java index 1b04098dc4..f18c7e5438 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/PlatformPagerAdapter.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/PlatformPagerAdapter.java @@ -2,16 +2,15 @@ package org.dolphinemu.dolphinemu.adapters; import android.content.Context; import android.graphics.drawable.Drawable; +import android.text.Spannable; +import android.text.SpannableString; +import android.text.style.ImageSpan; import androidx.annotation.NonNull; import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentPagerAdapter; -import android.text.Spannable; -import android.text.SpannableString; -import android.text.style.ImageSpan; - import org.dolphinemu.dolphinemu.R; import org.dolphinemu.dolphinemu.ui.platform.Platform; import org.dolphinemu.dolphinemu.ui.platform.PlatformGamesFragment; diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/SettingsRowPresenter.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/SettingsRowPresenter.java index 65751468ac..fcc404b73c 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/SettingsRowPresenter.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/SettingsRowPresenter.java @@ -1,12 +1,11 @@ package org.dolphinemu.dolphinemu.adapters; import android.content.res.Resources; +import android.view.ViewGroup; import androidx.leanback.widget.ImageCardView; import androidx.leanback.widget.Presenter; -import android.view.ViewGroup; - import org.dolphinemu.dolphinemu.model.TvSettingsItem; import org.dolphinemu.dolphinemu.viewholders.TvSettingsViewHolder; diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GamePropertiesDialog.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GamePropertiesDialog.java index 335fb7aba7..ec50ac2854 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GamePropertiesDialog.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GamePropertiesDialog.java @@ -2,13 +2,12 @@ package org.dolphinemu.dolphinemu.dialogs; import android.app.Dialog; import android.os.Bundle; +import android.widget.Toast; import androidx.annotation.NonNull; import androidx.appcompat.app.AlertDialog; import androidx.fragment.app.DialogFragment; -import android.widget.Toast; - import org.dolphinemu.dolphinemu.NativeLibrary; import org.dolphinemu.dolphinemu.R; import org.dolphinemu.dolphinemu.features.settings.model.Settings; @@ -16,8 +15,8 @@ import org.dolphinemu.dolphinemu.features.settings.ui.MenuTag; import org.dolphinemu.dolphinemu.features.settings.ui.SettingsActivity; import org.dolphinemu.dolphinemu.features.settings.utils.SettingsFile; import org.dolphinemu.dolphinemu.ui.platform.Platform; -import org.dolphinemu.dolphinemu.utils.IniFile; import org.dolphinemu.dolphinemu.utils.DirectoryInitialization; +import org.dolphinemu.dolphinemu.utils.IniFile; import org.dolphinemu.dolphinemu.utils.Log; import java.io.File; diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/Settings.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/Settings.java index 3bd223425e..c676d68a34 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/Settings.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/Settings.java @@ -10,12 +10,9 @@ import org.dolphinemu.dolphinemu.services.GameFileCacheService; import org.dolphinemu.dolphinemu.utils.IniFile; import java.io.File; -import java.util.Arrays; import java.util.HashMap; -import java.util.List; import java.util.Map; import java.util.Set; -import java.util.TreeMap; public class Settings { diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/view/InvertedCheckBoxSetting.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/view/InvertedCheckBoxSetting.java index ff807d599b..8381843e43 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/view/InvertedCheckBoxSetting.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/view/InvertedCheckBoxSetting.java @@ -1,7 +1,6 @@ package org.dolphinemu.dolphinemu.features.settings.model.view; import org.dolphinemu.dolphinemu.features.settings.model.Settings; -import org.dolphinemu.dolphinemu.features.settings.utils.SettingsFile; public final class InvertedCheckBoxSetting extends CheckBoxSetting { diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/view/SliderSetting.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/view/SliderSetting.java index 686c1c52d0..75c0f9b617 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/view/SliderSetting.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/view/SliderSetting.java @@ -1,7 +1,6 @@ package org.dolphinemu.dolphinemu.features.settings.model.view; import org.dolphinemu.dolphinemu.features.settings.model.Settings; -import org.dolphinemu.dolphinemu.features.settings.utils.SettingsFile; public abstract class SliderSetting extends SettingsItem { diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsActivity.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsActivity.java index 8dbc4b46b7..9ee3926516 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsActivity.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsActivity.java @@ -5,18 +5,17 @@ import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.provider.Settings; - -import androidx.annotation.NonNull; -import androidx.appcompat.app.AlertDialog; -import androidx.fragment.app.FragmentTransaction; -import androidx.lifecycle.ViewModelProvider; -import androidx.appcompat.app.AppCompatActivity; - import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; import android.widget.Toast; +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.app.AppCompatActivity; +import androidx.fragment.app.FragmentTransaction; +import androidx.lifecycle.ViewModelProvider; + import org.dolphinemu.dolphinemu.R; import org.dolphinemu.dolphinemu.ui.main.MainActivity; import org.dolphinemu.dolphinemu.ui.main.TvMainActivity; diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsAdapter.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsAdapter.java index 6daa5b2052..dc7e503175 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsAdapter.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsAdapter.java @@ -2,17 +2,15 @@ package org.dolphinemu.dolphinemu.features.settings.ui; import android.content.Context; import android.content.DialogInterface; - -import androidx.appcompat.app.AlertDialog; -import androidx.recyclerview.widget.RecyclerView; - import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.SeekBar; import android.widget.TextView; -import org.dolphinemu.dolphinemu.NativeLibrary; +import androidx.appcompat.app.AlertDialog; +import androidx.recyclerview.widget.RecyclerView; + import org.dolphinemu.dolphinemu.R; import org.dolphinemu.dolphinemu.dialogs.MotionAlertDialog; import org.dolphinemu.dolphinemu.features.settings.model.Settings; @@ -43,7 +41,6 @@ import org.dolphinemu.dolphinemu.ui.main.MainPresenter; import org.dolphinemu.dolphinemu.utils.FileBrowserHelper; import org.dolphinemu.dolphinemu.utils.IniFile; -import java.io.File; import java.security.InvalidParameterException; import java.util.ArrayList; import java.util.HashSet; diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragment.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragment.java index f2be372848..e10dfbaf71 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragment.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragment.java @@ -2,6 +2,9 @@ package org.dolphinemu.dolphinemu.features.settings.ui; import android.content.Context; import android.os.Bundle; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; import androidx.annotation.NonNull; import androidx.annotation.Nullable; @@ -9,10 +12,6 @@ import androidx.fragment.app.Fragment; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; - import org.dolphinemu.dolphinemu.R; import org.dolphinemu.dolphinemu.features.settings.model.Settings; import org.dolphinemu.dolphinemu.features.settings.model.view.SettingsItem; diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.java index b4bf525af4..60b3256fbe 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.java @@ -9,7 +9,6 @@ import org.dolphinemu.dolphinemu.features.settings.model.Settings; import org.dolphinemu.dolphinemu.features.settings.model.view.CheckBoxSetting; import org.dolphinemu.dolphinemu.features.settings.model.view.ConfirmRunnable; import org.dolphinemu.dolphinemu.features.settings.model.view.FilePicker; -import org.dolphinemu.dolphinemu.features.settings.model.view.FloatSliderSetting; import org.dolphinemu.dolphinemu.features.settings.model.view.HeaderSetting; import org.dolphinemu.dolphinemu.features.settings.model.view.InputBindingSetting; import org.dolphinemu.dolphinemu.features.settings.model.view.IntSliderSetting; diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsViewModel.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsViewModel.java index 4ca0d05dcd..b4753f934c 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsViewModel.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsViewModel.java @@ -1,9 +1,9 @@ package org.dolphinemu.dolphinemu.features.settings.ui; -import org.dolphinemu.dolphinemu.features.settings.model.Settings; - import androidx.lifecycle.ViewModel; +import org.dolphinemu.dolphinemu.features.settings.model.Settings; + public class SettingsViewModel extends ViewModel { private final Settings mSettings = new Settings(); diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/ConfirmRunnableViewHolder.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/ConfirmRunnableViewHolder.java index 07b700ec8e..401b0aadb2 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/ConfirmRunnableViewHolder.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/ConfirmRunnableViewHolder.java @@ -5,14 +5,14 @@ import android.view.View; import android.widget.TextView; import android.widget.Toast; +import androidx.appcompat.app.AlertDialog; + import org.dolphinemu.dolphinemu.R; import org.dolphinemu.dolphinemu.features.settings.model.view.ConfirmRunnable; import org.dolphinemu.dolphinemu.features.settings.model.view.SettingsItem; import org.dolphinemu.dolphinemu.features.settings.ui.SettingsAdapter; import org.dolphinemu.dolphinemu.features.settings.ui.SettingsFragmentView; -import androidx.appcompat.app.AlertDialog; - public final class ConfirmRunnableViewHolder extends SettingViewHolder { private ConfirmRunnable mItem; diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/SettingViewHolder.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/SettingViewHolder.java index 9523939e3e..5fc91a6136 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/SettingViewHolder.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/viewholder/SettingViewHolder.java @@ -1,9 +1,9 @@ package org.dolphinemu.dolphinemu.features.settings.ui.viewholder; -import androidx.recyclerview.widget.RecyclerView; - import android.view.View; +import androidx.recyclerview.widget.RecyclerView; + import org.dolphinemu.dolphinemu.features.settings.model.view.SettingsItem; import org.dolphinemu.dolphinemu.features.settings.ui.SettingsAdapter; diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/utils/SettingsFile.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/utils/SettingsFile.java index 80fc9001fb..04d4c5627a 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/utils/SettingsFile.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/utils/SettingsFile.java @@ -4,8 +4,8 @@ import androidx.annotation.NonNull; import org.dolphinemu.dolphinemu.features.settings.model.Settings; import org.dolphinemu.dolphinemu.features.settings.ui.SettingsActivityView; -import org.dolphinemu.dolphinemu.utils.DirectoryInitialization; import org.dolphinemu.dolphinemu.utils.BiMap; +import org.dolphinemu.dolphinemu.utils.DirectoryInitialization; import org.dolphinemu.dolphinemu.utils.IniFile; import org.dolphinemu.dolphinemu.utils.Log; diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/fragments/CustomFilePickerFragment.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/fragments/CustomFilePickerFragment.java index 5e0e06582c..d3f407f25c 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/fragments/CustomFilePickerFragment.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/fragments/CustomFilePickerFragment.java @@ -2,17 +2,16 @@ package org.dolphinemu.dolphinemu.fragments; import android.net.Uri; import android.os.Bundle; +import android.view.View; +import android.widget.TextView; import androidx.annotation.NonNull; import androidx.core.content.FileProvider; -import android.view.View; -import android.widget.TextView; +import com.nononsenseapps.filepicker.FilePickerFragment; import org.dolphinemu.dolphinemu.R; -import com.nononsenseapps.filepicker.FilePickerFragment; - import java.io.File; import java.util.HashSet; diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/fragments/EmulationFragment.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/fragments/EmulationFragment.java index 0e99eaed35..e17c209c4d 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/fragments/EmulationFragment.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/fragments/EmulationFragment.java @@ -4,10 +4,6 @@ import android.content.Context; import android.content.SharedPreferences; import android.os.Bundle; import android.preference.PreferenceManager; - -import androidx.annotation.NonNull; -import androidx.fragment.app.Fragment; - import android.view.LayoutInflater; import android.view.Surface; import android.view.SurfaceHolder; @@ -16,6 +12,9 @@ import android.view.View; import android.view.ViewGroup; import android.widget.Button; +import androidx.annotation.NonNull; +import androidx.fragment.app.Fragment; + import org.dolphinemu.dolphinemu.NativeLibrary; import org.dolphinemu.dolphinemu.R; import org.dolphinemu.dolphinemu.activities.EmulationActivity; diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/fragments/MenuFragment.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/fragments/MenuFragment.java index 06d1dd71d6..2e55d0df70 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/fragments/MenuFragment.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/fragments/MenuFragment.java @@ -1,9 +1,6 @@ package org.dolphinemu.dolphinemu.fragments; import android.os.Bundle; - -import androidx.fragment.app.Fragment; - import android.util.SparseIntArray; import android.view.LayoutInflater; import android.view.View; @@ -12,6 +9,8 @@ import android.widget.Button; import android.widget.LinearLayout; import android.widget.TextView; +import androidx.fragment.app.Fragment; + import org.dolphinemu.dolphinemu.NativeLibrary; import org.dolphinemu.dolphinemu.R; import org.dolphinemu.dolphinemu.activities.EmulationActivity; diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/fragments/SaveLoadStateFragment.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/fragments/SaveLoadStateFragment.java index 5a275a0c4f..9a145d9dce 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/fragments/SaveLoadStateFragment.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/fragments/SaveLoadStateFragment.java @@ -1,10 +1,6 @@ package org.dolphinemu.dolphinemu.fragments; import android.os.Bundle; - -import androidx.annotation.Nullable; -import androidx.fragment.app.Fragment; - import android.util.SparseIntArray; import android.view.LayoutInflater; import android.view.View; @@ -12,6 +8,9 @@ import android.view.ViewGroup; import android.widget.Button; import android.widget.GridLayout; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; + import org.dolphinemu.dolphinemu.R; import org.dolphinemu.dolphinemu.activities.EmulationActivity; diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/GameFileCache.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/GameFileCache.java index 698f2171cf..281fc65349 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/GameFileCache.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/GameFileCache.java @@ -4,7 +4,6 @@ import android.content.Context; import android.content.SharedPreferences; import android.preference.PreferenceManager; -import org.dolphinemu.dolphinemu.NativeLibrary; import org.dolphinemu.dolphinemu.features.settings.model.Settings; import org.dolphinemu.dolphinemu.features.settings.utils.SettingsFile; import org.dolphinemu.dolphinemu.utils.IniFile; diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/services/SyncChannelJobService.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/services/SyncChannelJobService.java index 43dabe7444..da4d885de0 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/services/SyncChannelJobService.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/services/SyncChannelJobService.java @@ -11,13 +11,12 @@ import android.media.tv.TvContract; import android.net.Uri; import android.os.AsyncTask; import android.os.Build; +import android.util.Log; import androidx.tvprovider.media.tv.Channel; import androidx.tvprovider.media.tv.ChannelLogoUtils; import androidx.tvprovider.media.tv.TvContractCompat; -import android.util.Log; - import org.dolphinemu.dolphinemu.R; import org.dolphinemu.dolphinemu.model.HomeScreenChannel; import org.dolphinemu.dolphinemu.utils.TvUtil; diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/services/SyncProgramsJobService.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/services/SyncProgramsJobService.java index 8819746aba..9818c30a4e 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/services/SyncProgramsJobService.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/services/SyncProgramsJobService.java @@ -6,13 +6,12 @@ import android.content.Context; import android.net.Uri; import android.os.AsyncTask; import android.os.PersistableBundle; +import android.util.Log; import androidx.tvprovider.media.tv.Channel; import androidx.tvprovider.media.tv.PreviewProgram; import androidx.tvprovider.media.tv.TvContractCompat; -import android.util.Log; - import org.dolphinemu.dolphinemu.R; import org.dolphinemu.dolphinemu.model.GameFile; import org.dolphinemu.dolphinemu.ui.platform.Platform; diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/DividerItemDecoration.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/DividerItemDecoration.java index cb56334cf8..9cfec86a2f 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/DividerItemDecoration.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/DividerItemDecoration.java @@ -5,14 +5,13 @@ import android.content.res.TypedArray; import android.graphics.Canvas; import android.graphics.Rect; import android.graphics.drawable.Drawable; +import android.util.AttributeSet; +import android.view.View; import androidx.annotation.NonNull; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; -import android.util.AttributeSet; -import android.view.View; - /** * Implementation from: * https://gist.github.com/lapastillaroja/858caf1a82791b6c1a36 diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/CustomTitleView.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/CustomTitleView.java index 68ee3ccd8e..018c66b2a8 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/CustomTitleView.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/CustomTitleView.java @@ -2,15 +2,14 @@ package org.dolphinemu.dolphinemu.ui.main; import android.content.Context; import android.graphics.drawable.Drawable; - -import androidx.leanback.widget.TitleViewAdapter; - import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; import android.widget.LinearLayout; import android.widget.TextView; +import androidx.leanback.widget.TitleViewAdapter; + import org.dolphinemu.dolphinemu.R; public class CustomTitleView extends LinearLayout implements TitleViewAdapter.Provider diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/MainActivity.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/MainActivity.java index 41e097de58..d96efd27df 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/MainActivity.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/MainActivity.java @@ -3,23 +3,20 @@ package org.dolphinemu.dolphinemu.ui.main; import android.content.Intent; import android.content.pm.PackageManager; import android.os.Bundle; - -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; - -import com.google.android.material.floatingactionbutton.FloatingActionButton; -import com.google.android.material.tabs.TabLayout; - -import androidx.viewpager.widget.ViewPager; -import androidx.appcompat.app.AppCompatActivity; -import androidx.appcompat.widget.Toolbar; - import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; import android.widget.Toast; -import org.dolphinemu.dolphinemu.NativeLibrary; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; +import androidx.viewpager.widget.ViewPager; + +import com.google.android.material.floatingactionbutton.FloatingActionButton; +import com.google.android.material.tabs.TabLayout; + import org.dolphinemu.dolphinemu.R; import org.dolphinemu.dolphinemu.activities.EmulationActivity; import org.dolphinemu.dolphinemu.adapters.PlatformPagerAdapter; @@ -27,11 +24,11 @@ import org.dolphinemu.dolphinemu.features.settings.model.Settings; import org.dolphinemu.dolphinemu.features.settings.ui.MenuTag; import org.dolphinemu.dolphinemu.features.settings.ui.SettingsActivity; import org.dolphinemu.dolphinemu.features.settings.utils.SettingsFile; -import org.dolphinemu.dolphinemu.utils.AfterDirectoryInitializationRunner; -import org.dolphinemu.dolphinemu.utils.DirectoryInitialization; import org.dolphinemu.dolphinemu.services.GameFileCacheService; import org.dolphinemu.dolphinemu.ui.platform.Platform; import org.dolphinemu.dolphinemu.ui.platform.PlatformGamesView; +import org.dolphinemu.dolphinemu.utils.AfterDirectoryInitializationRunner; +import org.dolphinemu.dolphinemu.utils.DirectoryInitialization; import org.dolphinemu.dolphinemu.utils.FileBrowserHelper; import org.dolphinemu.dolphinemu.utils.IniFile; import org.dolphinemu.dolphinemu.utils.PermissionsHandler; diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/TvMainActivity.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/TvMainActivity.java index 10dcfb197a..cf75b07c40 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/TvMainActivity.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/main/TvMainActivity.java @@ -3,18 +3,17 @@ package org.dolphinemu.dolphinemu.ui.main; import android.content.Intent; import android.content.pm.PackageManager; import android.os.Bundle; +import android.widget.Toast; import androidx.annotation.NonNull; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.FragmentActivity; +import androidx.fragment.app.FragmentManager; import androidx.leanback.app.BrowseSupportFragment; import androidx.leanback.widget.ArrayObjectAdapter; import androidx.leanback.widget.HeaderItem; import androidx.leanback.widget.ListRow; import androidx.leanback.widget.ListRowPresenter; -import androidx.fragment.app.FragmentActivity; -import androidx.fragment.app.FragmentManager; -import androidx.core.content.ContextCompat; - -import android.widget.Toast; import org.dolphinemu.dolphinemu.R; import org.dolphinemu.dolphinemu.activities.EmulationActivity; @@ -24,9 +23,9 @@ import org.dolphinemu.dolphinemu.features.settings.ui.MenuTag; import org.dolphinemu.dolphinemu.features.settings.ui.SettingsActivity; import org.dolphinemu.dolphinemu.model.GameFile; import org.dolphinemu.dolphinemu.model.TvSettingsItem; -import org.dolphinemu.dolphinemu.utils.DirectoryInitialization; import org.dolphinemu.dolphinemu.services.GameFileCacheService; import org.dolphinemu.dolphinemu.ui.platform.Platform; +import org.dolphinemu.dolphinemu.utils.DirectoryInitialization; import org.dolphinemu.dolphinemu.utils.FileBrowserHelper; import org.dolphinemu.dolphinemu.utils.PermissionsHandler; import org.dolphinemu.dolphinemu.utils.StartupHandler; diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/platform/PlatformGamesFragment.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/platform/PlatformGamesFragment.java index b833bef823..83040034ae 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/platform/PlatformGamesFragment.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/ui/platform/PlatformGamesFragment.java @@ -1,16 +1,15 @@ package org.dolphinemu.dolphinemu.ui.platform; import android.os.Bundle; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; import androidx.annotation.NonNull; import androidx.fragment.app.Fragment; import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.RecyclerView; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; - import org.dolphinemu.dolphinemu.R; import org.dolphinemu.dolphinemu.adapters.GameAdapter; import org.dolphinemu.dolphinemu.services.GameFileCacheService; diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/Analytics.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/Analytics.java index f9ff6e535b..27176e05e6 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/Analytics.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/Analytics.java @@ -5,6 +5,8 @@ import android.content.SharedPreferences; import android.os.Build; import android.preference.PreferenceManager; +import androidx.appcompat.app.AlertDialog; + import com.android.volley.Request; import com.android.volley.toolbox.StringRequest; @@ -13,8 +15,6 @@ import org.dolphinemu.dolphinemu.R; import org.dolphinemu.dolphinemu.features.settings.model.Settings; import org.dolphinemu.dolphinemu.features.settings.utils.SettingsFile; -import androidx.appcompat.app.AlertDialog; - public class Analytics { private static final String analyticsAsked = diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/PermissionsHandler.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/PermissionsHandler.java index a8b0bf63a9..c9de2e2814 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/PermissionsHandler.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/PermissionsHandler.java @@ -5,12 +5,11 @@ import android.content.Context; import android.content.DialogInterface; import android.content.pm.PackageManager; import android.os.Build; +import android.widget.Toast; import androidx.appcompat.app.AlertDialog; -import androidx.fragment.app.FragmentActivity; import androidx.core.content.ContextCompat; - -import android.widget.Toast; +import androidx.fragment.app.FragmentActivity; import org.dolphinemu.dolphinemu.R; diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/StartupHandler.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/StartupHandler.java index 9bf68368bf..4ef8a5bd18 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/StartupHandler.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/StartupHandler.java @@ -4,11 +4,10 @@ import android.content.Context; import android.content.SharedPreferences; import android.os.Bundle; import android.preference.PreferenceManager; +import android.text.TextUtils; import androidx.fragment.app.FragmentActivity; -import android.text.TextUtils; - import org.dolphinemu.dolphinemu.NativeLibrary; import org.dolphinemu.dolphinemu.activities.EmulationActivity; diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/TvUtil.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/TvUtil.java index 90e6006168..da3b87c060 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/TvUtil.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/TvUtil.java @@ -18,14 +18,13 @@ import android.media.tv.TvContract; import android.net.Uri; import android.os.Build; import android.os.PersistableBundle; +import android.util.Log; import androidx.annotation.AnyRes; import androidx.annotation.NonNull; import androidx.tvprovider.media.tv.Channel; import androidx.tvprovider.media.tv.TvContractCompat; -import android.util.Log; - import org.dolphinemu.dolphinemu.model.GameFile; import org.dolphinemu.dolphinemu.model.HomeScreenChannel; import org.dolphinemu.dolphinemu.services.SyncChannelJobService; diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/viewholders/GameViewHolder.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/viewholders/GameViewHolder.java index d2915dccac..17e652c604 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/viewholders/GameViewHolder.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/viewholders/GameViewHolder.java @@ -1,11 +1,11 @@ package org.dolphinemu.dolphinemu.viewholders; -import androidx.recyclerview.widget.RecyclerView; - import android.view.View; import android.widget.ImageView; import android.widget.TextView; +import androidx.recyclerview.widget.RecyclerView; + import org.dolphinemu.dolphinemu.R; import org.dolphinemu.dolphinemu.model.GameFile; diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/viewholders/TvGameViewHolder.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/viewholders/TvGameViewHolder.java index f239b20854..3fa6fadc0f 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/viewholders/TvGameViewHolder.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/viewholders/TvGameViewHolder.java @@ -1,11 +1,11 @@ package org.dolphinemu.dolphinemu.viewholders; -import androidx.leanback.widget.ImageCardView; -import androidx.leanback.widget.Presenter; - import android.view.View; import android.widget.ImageView; +import androidx.leanback.widget.ImageCardView; +import androidx.leanback.widget.Presenter; + import org.dolphinemu.dolphinemu.model.GameFile; /** diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/viewholders/TvSettingsViewHolder.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/viewholders/TvSettingsViewHolder.java index 7a2cf07556..7046cf6b0f 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/viewholders/TvSettingsViewHolder.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/viewholders/TvSettingsViewHolder.java @@ -1,10 +1,10 @@ package org.dolphinemu.dolphinemu.viewholders; +import android.view.View; + import androidx.leanback.widget.ImageCardView; import androidx.leanback.widget.Presenter; -import android.view.View; - public final class TvSettingsViewHolder extends Presenter.ViewHolder { public ImageCardView cardParent;