forked from upstream-mirrors/OpenTracks
Removed most @SuppressLint.
This commit is contained in:
@@ -20,7 +20,6 @@ import com.google.android.apps.mytracks.Constants;
|
|||||||
import com.google.android.gms.location.DetectedActivity;
|
import com.google.android.gms.location.DetectedActivity;
|
||||||
import com.google.android.maps.mytracks.R;
|
import com.google.android.maps.mytracks.R;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.content.SharedPreferences.Editor;
|
import android.content.SharedPreferences.Editor;
|
||||||
@@ -133,7 +132,6 @@ public class PreferencesUtils {
|
|||||||
* @param keyId the key id
|
* @param keyId the key id
|
||||||
* @param value the value
|
* @param value the value
|
||||||
*/
|
*/
|
||||||
@SuppressLint("CommitPrefEdits")
|
|
||||||
public static void setBoolean(Context context, int keyId, boolean value) {
|
public static void setBoolean(Context context, int keyId, boolean value) {
|
||||||
SharedPreferences sharedPreferences = context.getSharedPreferences(
|
SharedPreferences sharedPreferences = context.getSharedPreferences(
|
||||||
Constants.SETTINGS_NAME, Context.MODE_PRIVATE);
|
Constants.SETTINGS_NAME, Context.MODE_PRIVATE);
|
||||||
@@ -162,7 +160,6 @@ public class PreferencesUtils {
|
|||||||
* @param keyId the key id
|
* @param keyId the key id
|
||||||
* @param value the value
|
* @param value the value
|
||||||
*/
|
*/
|
||||||
@SuppressLint("CommitPrefEdits")
|
|
||||||
public static void setInt(Context context, int keyId, int value) {
|
public static void setInt(Context context, int keyId, int value) {
|
||||||
SharedPreferences sharedPreferences = context.getSharedPreferences(
|
SharedPreferences sharedPreferences = context.getSharedPreferences(
|
||||||
Constants.SETTINGS_NAME, Context.MODE_PRIVATE);
|
Constants.SETTINGS_NAME, Context.MODE_PRIVATE);
|
||||||
@@ -191,7 +188,6 @@ public class PreferencesUtils {
|
|||||||
* @param keyId the key id
|
* @param keyId the key id
|
||||||
* @param value the value
|
* @param value the value
|
||||||
*/
|
*/
|
||||||
@SuppressLint("CommitPrefEdits")
|
|
||||||
public static void setFloat(Context context, int keyId, float value) {
|
public static void setFloat(Context context, int keyId, float value) {
|
||||||
SharedPreferences sharedPreferences = context.getSharedPreferences(
|
SharedPreferences sharedPreferences = context.getSharedPreferences(
|
||||||
Constants.SETTINGS_NAME, Context.MODE_PRIVATE);
|
Constants.SETTINGS_NAME, Context.MODE_PRIVATE);
|
||||||
@@ -219,7 +215,6 @@ public class PreferencesUtils {
|
|||||||
* @param keyId the key id
|
* @param keyId the key id
|
||||||
* @param value the value
|
* @param value the value
|
||||||
*/
|
*/
|
||||||
@SuppressLint("CommitPrefEdits")
|
|
||||||
public static void setLong(Context context, int keyId, long value) {
|
public static void setLong(Context context, int keyId, long value) {
|
||||||
SharedPreferences sharedPreferences = context.getSharedPreferences(
|
SharedPreferences sharedPreferences = context.getSharedPreferences(
|
||||||
Constants.SETTINGS_NAME, Context.MODE_PRIVATE);
|
Constants.SETTINGS_NAME, Context.MODE_PRIVATE);
|
||||||
@@ -248,7 +243,6 @@ public class PreferencesUtils {
|
|||||||
* @param keyId the key id
|
* @param keyId the key id
|
||||||
* @param value the value
|
* @param value the value
|
||||||
*/
|
*/
|
||||||
@SuppressLint("CommitPrefEdits")
|
|
||||||
public static void setString(Context context, int keyId, String value) {
|
public static void setString(Context context, int keyId, String value) {
|
||||||
SharedPreferences sharedPreferences = context.getSharedPreferences(
|
SharedPreferences sharedPreferences = context.getSharedPreferences(
|
||||||
Constants.SETTINGS_NAME, Context.MODE_PRIVATE);
|
Constants.SETTINGS_NAME, Context.MODE_PRIVATE);
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
|
|
||||||
package com.google.android.apps.mytracks.util;
|
package com.google.android.apps.mytracks.util;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.pm.PackageInfo;
|
import android.content.pm.PackageInfo;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
@@ -63,7 +62,6 @@ public class SystemUtils {
|
|||||||
* @param context the context
|
* @param context the context
|
||||||
* @param wakeLock wake lock or null
|
* @param wakeLock wake lock or null
|
||||||
*/
|
*/
|
||||||
@SuppressLint("Wakelock")
|
|
||||||
public static WakeLock acquireWakeLock(Context context, WakeLock wakeLock) {
|
public static WakeLock acquireWakeLock(Context context, WakeLock wakeLock) {
|
||||||
Log.i(TAG, "Acquiring wake lock.");
|
Log.i(TAG, "Acquiring wake lock.");
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user