diff --git a/LocationRinger/AndroidManifest.xml b/LocationRinger/AndroidManifest.xml
index 695a6a4..b2e5d19 100644
--- a/LocationRinger/AndroidManifest.xml
+++ b/LocationRinger/AndroidManifest.xml
@@ -5,7 +5,9 @@
android:versionCode="21"
android:versionName="1.0" >
-
+
;
}
--keepclasseswithmembernames class * {
+-keepclasseswithmembers class * {
public (android.content.Context, android.util.AttributeSet);
}
--keepclasseswithmembernames class * {
+-keepclasseswithmembers class * {
public (android.content.Context, android.util.AttributeSet, int);
}
diff --git a/LocationRinger/res/layout/feature_title_bar.xml b/LocationRinger/res/layout/feature_title_bar.xml
index ca7ab44..e59d012 100644
--- a/LocationRinger/res/layout/feature_title_bar.xml
+++ b/LocationRinger/res/layout/feature_title_bar.xml
@@ -1,9 +1,11 @@
+ android:orientation="horizontal"
+ tools:ignore="ContentDescription" >
\ No newline at end of file
diff --git a/LocationRinger/res/layout/first_boot_dialog.xml b/LocationRinger/res/layout/first_boot_dialog.xml
index e22b899..9b99adf 100644
--- a/LocationRinger/res/layout/first_boot_dialog.xml
+++ b/LocationRinger/res/layout/first_boot_dialog.xml
@@ -1,32 +1,35 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/LocationRinger/res/layout/fragment_list_contianer.xml b/LocationRinger/res/layout/fragment_list_contianer.xml
index fe31807..b1a820b 100644
--- a/LocationRinger/res/layout/fragment_list_contianer.xml
+++ b/LocationRinger/res/layout/fragment_list_contianer.xml
@@ -24,6 +24,7 @@
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
+ android:contentDescription="@string/add_feature"
android:src="@android:drawable/ic_menu_add" />
\ No newline at end of file
diff --git a/LocationRinger/res/layout/get_location_widget.xml b/LocationRinger/res/layout/get_location_widget.xml
index 0f869f7..68ab472 100644
--- a/LocationRinger/res/layout/get_location_widget.xml
+++ b/LocationRinger/res/layout/get_location_widget.xml
@@ -1,14 +1,16 @@
-
-
+ android:orientation="vertical" >
+
+
+
+
\ No newline at end of file
diff --git a/LocationRinger/res/layout/list_item.xml b/LocationRinger/res/layout/list_item.xml
index bef97cf..79d69df 100644
--- a/LocationRinger/res/layout/list_item.xml
+++ b/LocationRinger/res/layout/list_item.xml
@@ -25,7 +25,6 @@
android:gravity="center_vertical"
android:paddingLeft="6dip"
android:paddingRight="6dip"
- android:text="test"
android:textAppearance="?android:attr/textAppearanceLarge" />
+ android:paddingRight="6dip" />
\ No newline at end of file
diff --git a/LocationRinger/res/layout/ringer_about_fragment.xml b/LocationRinger/res/layout/ringer_about_fragment.xml
index 9e5f8cf..02ab2d9 100644
--- a/LocationRinger/res/layout/ringer_about_fragment.xml
+++ b/LocationRinger/res/layout/ringer_about_fragment.xml
@@ -24,8 +24,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
class="com.TwentyCodes.android.LocationRinger.ui.fragments.AboutRingerFragment$ListeningEditText"
- android:capitalize="words"
android:imeOptions="actionNext"
+ android:inputType="textCapWords"
android:singleLine="true" />
+ android:inputType="textCapSentences" />
\ No newline at end of file
diff --git a/LocationRinger/res/layout/ringer_info_button_bar.xml b/LocationRinger/res/layout/ringer_info_button_bar.xml
index a3ae769..d882a0f 100644
--- a/LocationRinger/res/layout/ringer_info_button_bar.xml
+++ b/LocationRinger/res/layout/ringer_info_button_bar.xml
@@ -31,6 +31,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
+ android:contentDescription="@string/mark_my_location"
android:src="@android:drawable/ic_menu_myplaces" />
\ No newline at end of file
diff --git a/LocationRinger/res/layout/ringer_list.xml b/LocationRinger/res/layout/ringer_list.xml
index e4d15d2..521e3ca 100644
--- a/LocationRinger/res/layout/ringer_list.xml
+++ b/LocationRinger/res/layout/ringer_list.xml
@@ -10,6 +10,7 @@
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
+ android:contentDescription="@string/new_ringer"
android:src="@android:drawable/ic_menu_add" />
+ android:focusable="false"
+ android:inputType="none" />
- Ringer Name
Start Location Service
Select Tone
+ Mark my location
+ My location
+ Map Mode
\ No newline at end of file
diff --git a/LocationRinger/src/com/TwentyCodes/android/LocationRinger/services/RingerProcessingService.java b/LocationRinger/src/com/TwentyCodes/android/LocationRinger/services/RingerProcessingService.java
index 0445d5b..a6c6e0c 100644
--- a/LocationRinger/src/com/TwentyCodes/android/LocationRinger/services/RingerProcessingService.java
+++ b/LocationRinger/src/com/TwentyCodes/android/LocationRinger/services/RingerProcessingService.java
@@ -318,7 +318,7 @@ public class RingerProcessingService extends Service {
final GeoPoint point = new GeoPoint((int) (mLocation.getLatitude() * 1E6), (int) (mLocation.getLongitude()*1E6));
if(Debug.DEBUG){
Log.d(TAG, "Processing ringers");
- Log.d(TAG, "Current location "+(int) (mLocation.getLatitude() * 1E6)+", "+(int) (mLocation.getLongitude() * 1E6)+" @ "+ new Float(mLocation.getAccuracy()) / 1000+"km");
+ Log.d(TAG, "Current location "+(int) (mLocation.getLatitude() * 1E6)+", "+(int) (mLocation.getLongitude() * 1E6)+" @ "+ Float.valueOf(mLocation.getAccuracy()) / 1000+"km");
}
final Cursor c = mDb.getAllRingers();
@@ -332,7 +332,7 @@ public class RingerProcessingService extends Service {
final ContentValues info = this.mDb.getRingerInfo(c.getString(0));
if(info.containsKey(RingerDatabase.KEY_LOCATION) && info.containsKey(RingerDatabase.KEY_RADIUS)){
final String[] pointInfo = info.getAsString(RingerDatabase.KEY_LOCATION).split(",");
- if(GeoUtils.isIntersecting(point, new Float(mLocation.getAccuracy()) / 1000, new GeoPoint(Integer.parseInt(pointInfo[0]), Integer.parseInt(pointInfo[1])), new Float(info.getAsInteger(RingerDatabase.KEY_RADIUS)) / 1000, Debug.FUDGE_FACTOR)){
+ if(GeoUtils.isIntersecting(point, Float.valueOf(mLocation.getAccuracy()) / 1000, new GeoPoint(Integer.parseInt(pointInfo[0]), Integer.parseInt(pointInfo[1])), new Float(info.getAsInteger(RingerDatabase.KEY_RADIUS)) / 1000, Debug.FUDGE_FACTOR)){
c.close();
getRinger(ringer, index);
isDeafult = false;
diff --git a/LocationRinger/src/com/TwentyCodes/android/LocationRinger/ui/RingerInformationActivity.java b/LocationRinger/src/com/TwentyCodes/android/LocationRinger/ui/RingerInformationActivity.java
index ce76f20..8573248 100644
--- a/LocationRinger/src/com/TwentyCodes/android/LocationRinger/ui/RingerInformationActivity.java
+++ b/LocationRinger/src/com/TwentyCodes/android/LocationRinger/ui/RingerInformationActivity.java
@@ -9,6 +9,7 @@ package com.TwentyCodes.android.LocationRinger.ui;
import java.util.ArrayList;
import java.util.Map.Entry;
+import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.ContentValues;
@@ -64,6 +65,7 @@ public class RingerInformationActivity extends FragmentActivity implements OnCon
* (non-Javadoc)
* @see android.support.v4.app.FragmentActivity#onCreate(android.os.Bundle)
*/
+ @SuppressLint("NewApi")
@Override
protected void onCreate(Bundle arg0) {
super.onCreate(arg0);
diff --git a/LocationRinger/src/com/TwentyCodes/android/LocationRinger/ui/SettingsActivity.java b/LocationRinger/src/com/TwentyCodes/android/LocationRinger/ui/SettingsActivity.java
index caba575..40f8377 100644
--- a/LocationRinger/src/com/TwentyCodes/android/LocationRinger/ui/SettingsActivity.java
+++ b/LocationRinger/src/com/TwentyCodes/android/LocationRinger/ui/SettingsActivity.java
@@ -12,6 +12,7 @@ import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.channels.FileChannel;
+import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageInfo;
@@ -149,6 +150,8 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
return intent;
}
+ @SuppressWarnings("deprecation")
+ @SuppressLint("NewApi")
@Override
public void onCreate(final Bundle savedInstanceState){
super.onCreate(savedInstanceState);
diff --git a/LocationRinger/src/com/TwentyCodes/android/LocationRinger/ui/fragments/AboutRingerFragment.java b/LocationRinger/src/com/TwentyCodes/android/LocationRinger/ui/fragments/AboutRingerFragment.java
index 5d5c2e1..e64e3b5 100644
--- a/LocationRinger/src/com/TwentyCodes/android/LocationRinger/ui/fragments/AboutRingerFragment.java
+++ b/LocationRinger/src/com/TwentyCodes/android/LocationRinger/ui/fragments/AboutRingerFragment.java
@@ -39,31 +39,31 @@ public class AboutRingerFragment extends Fragment implements OnCheckedChangeList
private ListeningEditText mRingerName;
private ListeningEditText mRingerDescription;
private ToggleButton mRingerEnabled;
- private OnContentChangedListener mListener;
- private ContentValues mInfo;
- private ContentValues mRinger;
+ private final OnContentChangedListener mListener;
+ private final ContentValues mInfo;
+ private final ContentValues mRinger;
- public AboutRingerFragment(ContentValues ringer, ContentValues info, OnContentChangedListener listener){
+ public AboutRingerFragment(final ContentValues ringer, final ContentValues info, final OnContentChangedListener listener){
this.mInfo = info;
this.mRinger = ringer;
this.mListener = listener;
}
@Override
- public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+ public void onCheckedChanged(final CompoundButton buttonView, final boolean isChecked) {
if(this.mListener != null){
- ContentValues info = new ContentValues();
+ final ContentValues info = new ContentValues();
info.put(RingerDatabase.KEY_IS_ENABLED, isChecked);
this.mListener.onRingerContentChanged(info);
}
}
@Override
- public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
+ public View onCreateView(final LayoutInflater inflater, final ViewGroup container, final Bundle savedInstanceState) {
this.getActivity().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
- View view = inflater.inflate(R.layout.ringer_about_fragment, container, false);
+ final View view = inflater.inflate(R.layout.ringer_about_fragment, container, false);
if(Debug.DEBUG){
for(Entry item : this.mInfo.valueSet())
@@ -110,6 +110,7 @@ public class AboutRingerFragment extends Fragment implements OnCheckedChangeList
public static class ListeningEditText extends EditText{
private String mKey;
private OnContentChangedListener mListener;
+ private final ContentValues mTemp;
/**
* Creates a new ListeningEditText
@@ -118,6 +119,7 @@ public class AboutRingerFragment extends Fragment implements OnCheckedChangeList
*/
public ListeningEditText(Context context) {
super(context);
+ this.mTemp = new ContentValues();
}
/**
@@ -128,6 +130,7 @@ public class AboutRingerFragment extends Fragment implements OnCheckedChangeList
*/
public ListeningEditText(Context context, AttributeSet attrs) {
super(context, attrs);
+ this.mTemp = new ContentValues();
}
/**
@@ -139,6 +142,7 @@ public class AboutRingerFragment extends Fragment implements OnCheckedChangeList
*/
public ListeningEditText(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
+ this.mTemp = new ContentValues();
}
/**
@@ -149,12 +153,11 @@ public class AboutRingerFragment extends Fragment implements OnCheckedChangeList
public void onDraw(Canvas canvas){
super.onDraw(canvas);
if(mListener != null){
- ContentValues info = new ContentValues();
- info.put(this.mKey, this.getText().toString());
+ mTemp.put(this.mKey, this.getText().toString());
if(this.mKey.equals(RingerDatabase.KEY_RINGER_NAME))
- this.mListener.onRingerContentChanged(info);
+ this.mListener.onRingerContentChanged(mTemp);
else
- this.mListener.onInfoContentChanged(info);
+ this.mListener.onInfoContentChanged(mTemp);
}
}
diff --git a/LocationRinger/src/com/TwentyCodes/android/LocationRinger/ui/fragments/FeatureListFragment.java b/LocationRinger/src/com/TwentyCodes/android/LocationRinger/ui/fragments/FeatureListFragment.java
index 82110cf..a44c2d2 100644
--- a/LocationRinger/src/com/TwentyCodes/android/LocationRinger/ui/fragments/FeatureListFragment.java
+++ b/LocationRinger/src/com/TwentyCodes/android/LocationRinger/ui/fragments/FeatureListFragment.java
@@ -247,7 +247,7 @@ public class FeatureListFragment extends BaseFragmentListFragment implements OnC
if(f instanceof BaseFeatureFragment){
final int id = ((BaseFeatureFragment) f).getFragmentId();
- mAdded.remove(new Integer(id));
+ mAdded.remove(Integer.valueOf(id));
/*
* we need to notify our parent activity that the feature have been removed.