[Android] Fixes for lint new warnings
List of the fixed warning types: warning: [ClassCanBeStatic] Inner class is non-static but does not reference enclosing class warning: [AlmostJavadoc] This comment contains Javadoc or HTML tags, but isn't started with a double asterisk warning: [EmptyBlockTag] A block tag (@param, @return, @throws, @deprecated) has an empty description. Block tags without descriptions don't add much value for future readers of the code; consider removing the tag entirely or adding a description. warning: [ObjectToString] DisplayAd is final and does not override Object.toString, so converting it to a string will print its identity (e.g. `DisplayAd@4488aabb`) instead of useful information.
This commit is contained in:
@@ -506,11 +506,13 @@ public class BraveRewardsHelper implements LargeIconBridge.LargeIconCallback {
|
||||
|
||||
/**
|
||||
* Expands touchable area of a small view
|
||||
* @param parentView
|
||||
* @param childView
|
||||
* @param extraPadding: dp
|
||||
*
|
||||
* @param parentView Parent view.
|
||||
* @param childView Child view.
|
||||
* @param extraPadding Extra padding in dp.
|
||||
*/
|
||||
public static void expandTouchArea(final View parentView, final View childView, final int extraPadding) {
|
||||
public static void expandTouchArea(
|
||||
final View parentView, final View childView, final int extraPadding) {
|
||||
parentView.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@@ -527,11 +529,7 @@ public class BraveRewardsHelper implements LargeIconBridge.LargeIconCallback {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts DP into PX
|
||||
* @param dp
|
||||
* @return
|
||||
*/
|
||||
/** Converts DP into PX */
|
||||
public static int dp2px(int dp) {
|
||||
DisplayMetrics metrics = Resources.getSystem().getDisplayMetrics();
|
||||
float px = dp * (metrics.densityDpi / DP_PER_INCH_MDPI);
|
||||
|
||||
@@ -40,6 +40,7 @@ public class FeedItemCard {
|
||||
this.imageByte = imageByte;
|
||||
}
|
||||
|
||||
@SuppressWarnings("ObjectToString")
|
||||
@Override
|
||||
public String toString() {
|
||||
return "FeedItemCard{"
|
||||
|
||||
@@ -70,6 +70,7 @@ public class FeedItemsCard {
|
||||
this.displayAd = displayAd;
|
||||
}
|
||||
|
||||
@SuppressWarnings("ObjectToString")
|
||||
@Override
|
||||
public String toString() {
|
||||
return "FeedItemsCard{"
|
||||
|
||||
@@ -54,7 +54,7 @@ public class NonSwipeableViewPager extends ViewPager {
|
||||
}
|
||||
}
|
||||
|
||||
public class ViewPagerScroller extends Scroller {
|
||||
public static class ViewPagerScroller extends Scroller {
|
||||
ViewPagerScroller(Context context) {
|
||||
super(context, new DecelerateInterpolator());
|
||||
}
|
||||
|
||||
@@ -657,10 +657,8 @@ public class CameraSource {
|
||||
private CameraSource() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Wraps the camera1 shutter callback so that the deprecated API isn't exposed.
|
||||
*/
|
||||
private class PictureStartCallback implements Camera.ShutterCallback {
|
||||
/** Wraps the camera1 shutter callback so that the deprecated API isn't exposed. */
|
||||
private static class PictureStartCallback implements Camera.ShutterCallback {
|
||||
private ShutterCallback mDelegate;
|
||||
|
||||
@Override
|
||||
@@ -691,10 +689,8 @@ public class CameraSource {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Wraps the camera1 auto focus callback so that the deprecated API isn't exposed.
|
||||
*/
|
||||
private class CameraAutoFocusCallback implements Camera.AutoFocusCallback {
|
||||
/** Wraps the camera1 auto focus callback so that the deprecated API isn't exposed. */
|
||||
private static class CameraAutoFocusCallback implements Camera.AutoFocusCallback {
|
||||
private AutoFocusCallback mDelegate;
|
||||
|
||||
@Override
|
||||
@@ -705,11 +701,9 @@ public class CameraSource {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Wraps the camera1 auto focus move callback so that the deprecated API isn't exposed.
|
||||
*/
|
||||
/** Wraps the camera1 auto focus move callback so that the deprecated API isn't exposed. */
|
||||
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
|
||||
private class CameraAutoFocusMoveCallback implements Camera.AutoFocusMoveCallback {
|
||||
private static class CameraAutoFocusMoveCallback implements Camera.AutoFocusMoveCallback {
|
||||
private AutoFocusMoveCallback mDelegate;
|
||||
|
||||
@Override
|
||||
|
||||
@@ -103,7 +103,7 @@ public class BraveSyncDevices {
|
||||
}
|
||||
}
|
||||
|
||||
public class SyncDeviceInfo {
|
||||
public static class SyncDeviceInfo {
|
||||
public String mName;
|
||||
public boolean mIsCurrentDevice;
|
||||
public boolean mSupportsSelfDelete;
|
||||
|
||||
@@ -318,11 +318,7 @@ public class TabUtils {
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns transition for the given tab
|
||||
*
|
||||
* @param tab
|
||||
*/
|
||||
/** Returns transition for the given tab */
|
||||
public static int getTransition(Tab tab) {
|
||||
if (tab != null
|
||||
&& tab.getWebContents() != null
|
||||
|
||||
Reference in New Issue
Block a user