Skip to content

Commit 44561da

Browse files
committed
Remove redundant suppressions.
1 parent 0f24ffa commit 44561da

File tree

4 files changed

+2
-9
lines changed

4 files changed

+2
-9
lines changed

Mifare Classic Tool/app/src/main/java/de/syss/MifareClassicTool/Activities/MainMenu.java

-2
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ private enum StartUpNode {
105105
* @see #copyStdKeysFiles()
106106
*/
107107
@SuppressLint("SetTextI18n")
108-
@SuppressWarnings("deprecation")
109108
@Override
110109
public void onCreate(Bundle savedInstanceState) {
111110
setTheme();
@@ -168,7 +167,6 @@ protected void onSaveInstanceState(Bundle outState) {
168167
* @param startUpNode The node of the startup checks chain.
169168
* @see StartUpNode
170169
*/
171-
@SuppressWarnings("deprecation")
172170
private void runStartUpNode(StartUpNode startUpNode) {
173171
SharedPreferences sharedPref =
174172
getPreferences(Context.MODE_PRIVATE);

Mifare Classic Tool/app/src/main/java/de/syss/MifareClassicTool/Activities/Preferences.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ private void getLanguageAndUpdateChooser() {
179179
* Defualts to "follow system theme" for Android >= 10 if not set.
180180
*/
181181
private void getThemeAndUpdateChooser() {
182-
CharSequence themeArray[] = getResources().getStringArray(R.array.action_themes);
182+
CharSequence[] themeArray = getResources().getStringArray(R.array.action_themes);
183183
ArrayList<CharSequence> themeArrayList = new ArrayList<>(Arrays.asList(themeArray));
184184
SharedPreferences pref = Common.getPreferences();
185185
int themeID;

Mifare Classic Tool/app/src/main/java/de/syss/MifareClassicTool/Activities/WriteTag.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public class WriteTag extends BasicActivity {
104104
* accordingly.
105105
*/
106106
// It is checked but the IDE don't get it.
107-
@SuppressWarnings({"unchecked", "deprecation"})
107+
@SuppressWarnings({"unchecked"})
108108
@Override
109109
public void onCreate(Bundle savedInstanceState) {
110110
super.onCreate(savedInstanceState);

Mifare Classic Tool/app/src/main/java/de/syss/MifareClassicTool/Common.java

-5
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,6 @@ public enum Operation {
218218
* Some functions depend on this context.
219219
*/
220220
@Override
221-
@SuppressWarnings("deprecation")
222221
public void onCreate() {
223222
super.onCreate();
224223
mAppContext = getApplicationContext();
@@ -241,7 +240,6 @@ public void onCreate() {
241240
* Check if this is the first installation of this app or just an update.
242241
* @return True if app was not installed before. False otherwise.
243242
*/
244-
@SuppressWarnings("deprecation")
245243
public static boolean isFirstInstall() {
246244
try {
247245
long firstInstallTime = 0;
@@ -745,7 +743,6 @@ public static void logUid(String uid) {
745743
* @see #mUID
746744
* @see #checkMifareClassicSupport(Tag, Context)
747745
*/
748-
@SuppressWarnings("deprecation")
749746
public static int treatAsNewTag(Intent intent, Context context) {
750747
// Check if Intent has a NFC Tag.
751748
if (NfcAdapter.ACTION_TECH_DISCOVERED.equals(intent.getAction())) {
@@ -1004,7 +1001,6 @@ public static boolean openApp(Context context, String packageName) {
10041001
* <li>-1 - Can not check because Android version is >= 8.</li>
10051002
* </ul>
10061003
*/
1007-
@SuppressWarnings("deprecation")
10081004
public static int isExternalNfcServiceRunning(Context context) {
10091005
// getRunningServices() is deprecated since Android 8.
10101006
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
@@ -1038,7 +1034,6 @@ public static boolean hasExternalNfcInstalled(Context context) {
10381034
* @param context The context for the package manager.
10391035
* @return True if the app is installed. False otherwise.
10401036
*/
1041-
@SuppressWarnings("deprecation")
10421037
public static boolean isAppInstalled(String uri, Context context) {
10431038
PackageManager pm = context.getPackageManager();
10441039
try {

0 commit comments

Comments
 (0)