global: Small cleanups
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
99cf2152c4
commit
e1a66d5766
@ -27,7 +27,7 @@ public final class SharedLibraryLoader {
|
|||||||
try {
|
try {
|
||||||
System.loadLibrary(libName);
|
System.loadLibrary(libName);
|
||||||
return;
|
return;
|
||||||
} catch (UnsatisfiedLinkError e) {
|
} catch (final UnsatisfiedLinkError e) {
|
||||||
Log.d(TAG, "Failed to load library normally, so attempting to extract from apk", e);
|
Log.d(TAG, "Failed to load library normally, so attempting to extract from apk", e);
|
||||||
noAbiException = e;
|
noAbiException = e;
|
||||||
}
|
}
|
||||||
@ -59,7 +59,7 @@ public final class SharedLibraryLoader {
|
|||||||
}
|
}
|
||||||
System.load(f.getAbsolutePath());
|
System.load(f.getAbsolutePath());
|
||||||
return;
|
return;
|
||||||
} catch (Exception e) {
|
} catch (final Exception e) {
|
||||||
Log.d(TAG, "Failed to load library apk:/" + libZipPath, e);
|
Log.d(TAG, "Failed to load library apk:/" + libZipPath, e);
|
||||||
noAbiException = e;
|
noAbiException = e;
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -466,7 +466,7 @@ public class FloatingActionsMenu extends ViewGroup {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setEnabled(boolean enabled) {
|
public void setEnabled(final boolean enabled) {
|
||||||
super.setEnabled(enabled);
|
super.setEnabled(enabled);
|
||||||
|
|
||||||
mAddButton.setEnabled(enabled);
|
mAddButton.setEnabled(enabled);
|
||||||
|
@ -13,11 +13,11 @@ import android.view.TouchDelegate;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.Collection;
|
||||||
|
|
||||||
public class TouchDelegateGroup extends TouchDelegate {
|
public class TouchDelegateGroup extends TouchDelegate {
|
||||||
private static final Rect USELESS_HACKY_RECT = new Rect();
|
private static final Rect USELESS_HACKY_RECT = new Rect();
|
||||||
private final List<TouchDelegate> mTouchDelegates = new ArrayList<>();
|
private final Collection<TouchDelegate> mTouchDelegates = new ArrayList<>();
|
||||||
private TouchDelegate mCurrentTouchDelegate;
|
private TouchDelegate mCurrentTouchDelegate;
|
||||||
private boolean mEnabled;
|
private boolean mEnabled;
|
||||||
|
|
||||||
@ -49,8 +49,7 @@ public class TouchDelegateGroup extends TouchDelegate {
|
|||||||
|
|
||||||
switch (event.getAction()) {
|
switch (event.getAction()) {
|
||||||
case MotionEvent.ACTION_DOWN:
|
case MotionEvent.ACTION_DOWN:
|
||||||
for (int i = 0; i < mTouchDelegates.size(); i++) {
|
for (final TouchDelegate touchDelegate : mTouchDelegates) {
|
||||||
final TouchDelegate touchDelegate = mTouchDelegates.get(i);
|
|
||||||
if (touchDelegate.onTouchEvent(event)) {
|
if (touchDelegate.onTouchEvent(event)) {
|
||||||
mCurrentTouchDelegate = touchDelegate;
|
mCurrentTouchDelegate = touchDelegate;
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user