Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android automatic refactor - Recycle #58

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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 @@ -62,6 +62,9 @@ public SeekBarDialogPreference(Context context, AttributeSet attrs,
maxValue = a.getFloat(R.styleable.SeekBarDialogPreference_maxValue, 100);
divisions = a.getInt(R.styleable.SeekBarDialogPreference_steps, Math.round(maxValue - minValue * 10));
printfFormat = a.getString(R.styleable.SeekBarDialogPreference_printfFormat).toString();
if (a != null) {
a.recycle();
}

setSummary(desc);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ public SeekBarWithText(Context context, AttributeSet attrs, int defStyle, Custom
divisions = a.getInt(R.styleable.com_rareventure_android_widget_SeekBarWithText_steps, Math.round(maxValue - minValue * 10));
logScale = a.getFloat(R.styleable.com_rareventure_android_widget_SeekBarWithText_steps, 0);
printfFormat = a.getString(R.styleable.com_rareventure_android_widget_SeekBarWithText_printfFormat);
if (a != null) {
a.recycle();
}
if(printfFormat == null)
printfFormat = "%.1f";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ public SpeechBubbleWidget(Context context, AttributeSet attrs) {
a.getDimensionPixelOffset(R.styleable.SpeechBubbleWidget_speechBubbleTriWidth, 5),
a.getDimensionPixelOffset(R.styleable.SpeechBubbleWidget_speechBubbleTriHeight, 5),
a.getDimensionPixelOffset(R.styleable.SpeechBubbleWidget_speechBubbleInnerPad, 5));
if (a != null) {
a.recycle();
}
}

/**
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/java/com/rareventure/gps2/GpsTrailerCrypt.java
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,9 @@ public static void cleanUp() {
+ "udk.app_id != ? and udk._id != "
+ "(select max(_id) from user_data_key udk2 where udk2.app_id = udk.app_id)",
new String[] { String.valueOf(GTG.MASTER_APP_ID) });
if (c != null) {
c.close();
}

Cursor c2 = null;

Expand Down