aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2019-09-12 19:24:16 +0200
committerChristian Schneppe <christian@pix-art.de>2019-09-12 19:24:16 +0200
commit0abffde5ef442e8bff1ce7cbfe84bf7e750b3136 (patch)
tree598a766c265c1bc4403983d9e0de022f7feb561b /src/main
parentf7da662e6afa9707c3679cc6f96323e16f338372 (diff)
fixed 2 issues reported by new linter
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/de/pixart/messenger/services/NotificationService.java2
-rw-r--r--src/main/java/de/pixart/messenger/ui/widget/CopyTextView.java16
2 files changed, 5 insertions, 13 deletions
diff --git a/src/main/java/de/pixart/messenger/services/NotificationService.java b/src/main/java/de/pixart/messenger/services/NotificationService.java
index cc79f7b6a..10fccaf73 100644
--- a/src/main/java/de/pixart/messenger/services/NotificationService.java
+++ b/src/main/java/de/pixart/messenger/services/NotificationService.java
@@ -996,7 +996,7 @@ public class NotificationService {
createTryAgainIntent());
mBuilder.setDeleteIntent(createDismissErrorIntent());
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
- mBuilder.setVisibility(NotificationCompat.VISIBILITY_PRIVATE);
+ mBuilder.setVisibility(Notification.VISIBILITY_PRIVATE);
mBuilder.setSmallIcon(R.drawable.ic_warning_white_24dp);
} else {
mBuilder.setSmallIcon(R.drawable.ic_warning_white_24dp);
diff --git a/src/main/java/de/pixart/messenger/ui/widget/CopyTextView.java b/src/main/java/de/pixart/messenger/ui/widget/CopyTextView.java
index 9d7a5dfb8..683c65ec0 100644
--- a/src/main/java/de/pixart/messenger/ui/widget/CopyTextView.java
+++ b/src/main/java/de/pixart/messenger/ui/widget/CopyTextView.java
@@ -1,16 +1,14 @@
package de.pixart.messenger.ui.widget;
import android.annotation.SuppressLint;
-import android.annotation.TargetApi;
import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;
-import android.os.Build;
+import android.support.v7.widget.AppCompatTextView;
import android.util.AttributeSet;
-import android.widget.TextView;
@SuppressLint("AppCompatCustomView")
-public class CopyTextView extends TextView {
+public class CopyTextView extends AppCompatTextView {
public CopyTextView(Context context) {
super(context);
@@ -24,14 +22,8 @@ public class CopyTextView extends TextView {
super(context, attrs, defStyleAttr);
}
- @SuppressWarnings("unused")
- @TargetApi(Build.VERSION_CODES.LOLLIPOP)
- public CopyTextView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
- super(context, attrs, defStyleAttr, defStyleRes);
- }
-
public interface CopyHandler {
- public String transformTextForCopy(CharSequence text, int start, int end);
+ String transformTextForCopy(CharSequence text, int start, int end);
}
private CopyHandler copyHandler;
@@ -42,7 +34,7 @@ public class CopyTextView extends TextView {
@Override
public boolean onTextContextMenuItem(int id) {
- CharSequence text = getText();
+ final CharSequence text = getText();
int min = 0;
int max = text.length();
if (isFocused()) {