Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ private void processInput(byte inputData) {
System.arraycopy(storedInputData, 1, sysexData, 0,
sysexBytesRead - 1);

byte[] fixedSysexData = null;
byte[] fixedSysexData;
if (sysexData.length % 2 == 0) {
fixedSysexData = new byte[sysexData.length / 2];
for (int i = 0; i < sysexData.length; i += 2) {
Expand Down Expand Up @@ -585,7 +585,7 @@ public void sendShieldFrame(ShieldFrame frame, boolean waitIfInACallback) {
return;
}

boolean inACallback = false;
boolean inACallback;

synchronized (arduinoCallbacksLock) {
inACallback = isInACallback;
Expand Down Expand Up @@ -803,7 +803,7 @@ private void callbackExited() {
exitingCallbacksThread = new Thread(new Runnable() {
@Override
public void run() {
boolean sent = false;
boolean sent;
while (queuedFrames != null && !queuedFrames.isEmpty()) {
sent = false;
// boolean isInCallback;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ private boolean sendFile(byte[] fileArray, int length, int retry) throws Interru


int error_count = 0;
int crc_mode = 0;
int crc_mode;
int cancel = 0;
int crc;
while (true) {
Expand Down Expand Up @@ -220,7 +220,7 @@ private boolean sendFile(byte[] fileArray, int length, int retry) throws Interru
byte sequence = 1;
while (true) {
byte[] data = new byte[packet_size];
int readCount = 0;
int readCount;
readCount = stream.read(data, 0, packet_size);
if (readCount <= 0) {
Log.d("bootloader", "sending EOT");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ private void parseSocialKeys() {
}

public String loadData(String inFile) throws IOException {
String tContents = "";
String tContents;
InputStream stream = getAssets().open(inFile);
int size = stream.available();
byte[] buffer = new byte[size];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public long getItemId(int position) {
public View getView(final int position, View convertView,
final ViewGroup parent) {
View row = convertView;
Holder holder = null;
Holder holder;
if (row == null) {

row = inflater.inflate(R.layout.music_row, parent, false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public long getItemId(int position) {
public View getView(final int position, View convertView,
final ViewGroup parent) {
View row = convertView;
Holder holder = null;
Holder holder;
if (row == null) {

row = inflater.inflate(R.layout.music_row, parent, false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public long getItemId(int position) {
public View getView(final int position, View convertView,
final ViewGroup parent) {
View row = convertView;
Holder holder = null;
Holder holder;
if (row == null) {

row = inflater.inflate(R.layout.selected_shields_list_item, parent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public long getItemId(int position) {
public View getView(final int position, View convertView,
final ViewGroup parent) {
View row = convertView;
Holder holder = null;
Holder holder;
if (row == null) {

row = inflater.inflate(R.layout.shield_list_item, parent, false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public void updateLines(List<TerminalPrintedLine> lines) {
public View getView(final int position, View convertView,
final ViewGroup parent) {
View row = convertView;
Holder holder = null;
Holder holder;
if (row == null) {

row = inflater.inflate(R.layout.terminal_printed_line, parent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ public boolean onOptionsItemSelected(MenuItem item) {

private void showAboutDialog() {
// TODO Auto-generated method stub
String stringDate = null;
String stringDate;
try {
ApplicationInfo ai = activity.getPackageManager()
.getApplicationInfo(activity.getPackageName(), 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,14 +226,12 @@ public int compare(UIShield lhs, UIShield rhs) {
return lhs.getName().compareToIgnoreCase(rhs.getName());
}
});
vals = null;
final ArrayList<UIShield> ret = new ArrayList<UIShield>();
for (UIShield uiShield : valsFiltered) {
uiShield.itemBackgroundColor = colors[ret.size()];
ret.add(uiShield);
}
valsFiltered.clear();
valsFiltered = null;
return ret;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ public void handleMessage(Message msg) {
if (img.exists() && eventHandler != null) {
eventHandler.updatePreviewButton(lastImageAbsoultePath);
}
img = null;
}
super.handleMessage(msg);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,6 @@ public void onReceive(Context context, Intent intent) {
calendar.get(Calendar.AM_PM) == Calendar.AM);

calendar = null;
frame = null;
// set new time
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ public void setColorType(COLOR_TYPE colorType) {
}

int getColorInRange(int color, ColorPalette palette) {
int i = 0;
int i;
if (palette.isGrayscale) {
i = palette.getNumberOfBits();
int grayscale = (Color.red(color) + Color.green(color) + Color
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1315,7 +1315,7 @@ public void sendTouch(byte shapeType, int key, byte state, int value) {
boolean sendFrame = false;

public synchronized boolean doOrder(int order, List<Integer> params) {
Integer BgColor = WHITE, key = 0, action = 0, touchId = 0, startX = 0, startY = 0, finalX = 0, finalY = 0;
Integer BgColor = WHITE, key, action, touchId, startX, startY, finalX, finalY;

switch (order) {
case ORDER_SETTOUCH:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ else if (sourceFolderId == CameraUtils.FROM_CAMERA_FOLDER)
//////// INTERNET
case INTERNET.GET_REQUEST:
requestID = frame.getArgumentAsInteger(0);
InternetManager.EXECUTION_TYPE getExecutionType = null;
InternetManager.EXECUTION_TYPE getExecutionType;
try {
getExecutionType = InternetManager.getInstance().execute(requestID, InternetManager.REQUEST_TYPE.GET, frame.getArgument(1)[0]);
//request excutes only in case of success
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ private Camera openFrontFacingCameraGingerbread() {
mCamera.stopPreview();
mCamera.release();
}
int cameraCount = 0;
int cameraCount;
Camera cam = null;
Camera.CameraInfo cameraInfo = new Camera.CameraInfo();
cameraCount = Camera.getNumberOfCameras();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public static String getLastCapturedImagePathFromCameraFolder(
MediaStore.Images.Media.EXTERNAL_CONTENT_URI, imageColumns,
null, null, imageOrderBy);
imageCursor.moveToFirst();
String fullPath = null;
String fullPath;
if (imageCursor.getCount() == 0)
return null;
do {
Expand All @@ -128,7 +128,7 @@ public static String getLastCapturedImagePathFromOneSheeldFolderInMediaStore(
MediaStore.Images.Media.DATA + " like ? ",
new String[]{"%OneSheeld%"}, imageOrderBy);
imageCursor.moveToFirst();
String fullPath = null;
String fullPath;
if (imageCursor.getCount() == 0)
return null;
do {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public static String openUrl(String url, String method, Bundle params)
os.flush();
}

String response = "";
String response;
try {
response = read(conn.getInputStream());
} catch (FileNotFoundException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ public static Bitmap decodeBitmap(byte[] data, Matrix matrix) {
bitmap.getHeight(), matrix, true);
if (matrix != null)
matrix.reset();
matrix = null;
System.gc();

return bitmap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public void onReceive(Context context, Intent intent) {
.equals("android.provider.Telephony.SMS_RECEIVED")) {
Bundle bundle = intent.getExtras(); // ---get the SMS message passed
// in---
SmsMessage[] msgs = null;
SmsMessage[] msgs;
String msg_from = "";
String msgBody = "";
if (bundle != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ public void showHTML(String html) throws TwitterException {
}

String pinCode = null;
String name = null;
String name;
String endSearchList = "</code></kbd>";
String startSearchList = "<kbd aria-labelledby=\"code-desc\"><code>";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ private void hideDefaultKeyboard() {

private void addText(View v) {
if (isEdit1 == true) {
String b = "";
String b;
b = (String) v.getTag();
if (b != null) {
// adding text in Edittext
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ private static int binarySearch(int start, int end, SizeTester sizeTester,
int lastBest = start;
int lo = start;
int hi = end - 1;
int mid = 0;
int mid;
while (lo <= hi) {
mid = (lo + hi) >>> 1;
int midValCmp = sizeTester.onTestSize(mid, availableSpace);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ protected void onSizeChanged(int w, int h, int oldw, int oldh) {
}

private int resolveMeasured(int measureSpec, int desired) {
int result = 0;
int result;
int specSize = MeasureSpec.getSize(measureSpec);
switch (MeasureSpec.getMode(measureSpec)) {
case MeasureSpec.UNSPECIFIED:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ private void drawDividersVertical(Canvas canvas) {

if (hasDividerBeforeChildAt(count)) {
final View child = getChildAt(count - 1);
int bottom = 0;
int bottom;
if (child == null) {
bottom = getHeight() - getPaddingBottom() - mDividerHeight;
} else {
Expand All @@ -140,7 +140,7 @@ private void drawDividersHorizontal(Canvas canvas) {

if (hasDividerBeforeChildAt(count)) {
final View child = getChildAt(count - 1);
int right = 0;
int right;
if (child == null) {
right = getWidth() - getPaddingRight() - mDividerWidth;
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class ExtendedConfigXmlParserFactory {
*/
public static XmlPullParser createParser(Context context) {
AssetManager am = context.getAssets();
XmlPullParser parser = null;
XmlPullParser parser;
try {
InputStream is = am.open(XML_PATH_IN_ASSETS);
parser = XmlPullParserFactory.newInstance().newPullParser();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static Class<? extends GoogleStyleProgressLayout> createGoogleStyleProgre
@SuppressWarnings("unchecked")
public static Class<? extends GoogleStyleProgressLayout> createGoogleStyleProgressLayoutClazz(
String clazzName) {
Class<? extends GoogleStyleProgressLayout> googleStyleProgressLayoutClazz = null;
Class<? extends GoogleStyleProgressLayout> googleStyleProgressLayoutClazz;
if ( clazzName == null ) {
googleStyleProgressLayoutClazz = DefaultGoogleStyleProgressLayoutFactory.createGoogleStyleProgressLayoutClazz(clazzName);
return googleStyleProgressLayoutClazz;
Expand Down Expand Up @@ -88,7 +88,7 @@ public static GoogleStyleProgressLayout createGoogleStyleProgressLayout(String l
*/
public static GoogleStyleProgressLayout createGoogleStyleProgressLayout(
Class<? extends GoogleStyleProgressLayout> clazz, Context context, TypedArray attrs) {
GoogleStyleProgressLayout layout = null;
GoogleStyleProgressLayout layout;
// Prevent NullPointerException
if ( clazz == null ) {
Log.i(LOG_TAG, "The Class token of the GoogleStyleProgressLayout is missing. Default google style progress layout will be used.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public static Class<? extends GoogleStyleViewLayout> createGoogleStyleViewLayout
@SuppressWarnings("unchecked")
public static Class<? extends GoogleStyleViewLayout> createGoogleStyleViewLayoutClazz(
String clazzName) {
Class<? extends GoogleStyleViewLayout> googleStyleViewLayoutClazz = null;
Class<? extends GoogleStyleViewLayout> googleStyleViewLayoutClazz;
if ( clazzName == null ) {
googleStyleViewLayoutClazz = DefaultGoogleStyleViewLayoutFactory.createGoogleStyleViewLayoutClazz(clazzName);
return googleStyleViewLayoutClazz;
Expand Down Expand Up @@ -90,7 +90,7 @@ public static GoogleStyleViewLayout createGoogleStyleViewLayout(String layoutCod
*/
public static GoogleStyleViewLayout createGoogleStyleViewLayout(
Class<? extends GoogleStyleViewLayout> clazz, Context context, TypedArray attrs) {
GoogleStyleViewLayout layout = null;
GoogleStyleViewLayout layout;
// Prevent NullPointerException
if ( clazz == null ) {
Log.i(LOG_TAG, "The Class token of the GoogleStyleViewLayout is missing. Default google style view layout will be used.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public static Class<? extends IndicatorLayout> createIndicatorLayoutClazzByLayou
*/
@SuppressWarnings("unchecked")
public static Class<? extends IndicatorLayout> createIndicatorLayoutClazz(String clazzName) {
Class<? extends IndicatorLayout> clazz = null;
Class<? extends IndicatorLayout> clazz;
if (clazzName == null) {
clazz = DefaultIndicatorLayoutFactory.createIndicatorLayoutClazz(clazzName);
return clazz;
Expand Down Expand Up @@ -88,7 +88,7 @@ public static IndicatorLayout createIndicatorLayout(String layoutCode, Context c
*/
public static IndicatorLayout createIndicatorLayout(
Class<? extends IndicatorLayout> clazz, Context context, Mode mode) {
IndicatorLayout layout = null;
IndicatorLayout layout;
// Prevent NullPointerException
if ( clazz == null ) {
Log.i(LOG_TAG, "The Class token of the Indicator Layout is missing. Default Indicator Layout will be used.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public static Class<? extends LoadingLayout> createLoadingLayoutClazzByLayoutCod
@SuppressWarnings("unchecked")
public static Class<? extends LoadingLayout> createLoadingLayoutClazz(
String clazzName) {
Class<? extends LoadingLayout> loadingLayoutClazz = null;
Class<? extends LoadingLayout> loadingLayoutClazz;
if ( clazzName == null ) {
loadingLayoutClazz = DefaultLoadingLayoutFactory.createLoadingLayoutClazz(clazzName);
return loadingLayoutClazz;
Expand Down Expand Up @@ -95,7 +95,7 @@ public static LoadingLayout createLoadingLayout(String layoutCode, Context conte
public static LoadingLayout createLoadingLayout(
Class<? extends LoadingLayout> clazz, Context context, Mode mode,
Orientation orientation, TypedArray attrs) {
LoadingLayout layout = null;
LoadingLayout layout;
// Prevent NullPointerException
if ( clazz == null ) {
Log.i(LOG_TAG, "The Class token of the Loading Layout is missing. Default Loading Layout will be used.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1633,7 +1633,7 @@ private void initTopViewGroup() {
}

View view = this.getRootView();
ViewGroup topViewGroup = null;
ViewGroup topViewGroup;
Context context = getContext();
if (view instanceof ViewGroup == false) {
Log.w(LOG_TAG, "Current root view is not ViewGroup type. Google Style Pull To Refresh mode will be disabled.");
Expand Down