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

Removed the Redundant Castings and Unused Imports #175

Merged
merged 1 commit into from
Mar 30, 2021
Merged
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 @@ -361,14 +361,14 @@ public boolean onPreferenceChange(Preference preference, Object newValue) {
}

private void initializeTextColor() {
EditColorPreference pref = (EditColorPreference) this
EditColorPreference pref = this
.findPreference(Constants.PreferenceKeys.ColorRule.TEXT_COLOR);
pref.initColorPickerListener(this, COLOR_PREF_KEY_TEXT,
getActivity().getString(R.string.text_color), this.mTextColor);
}

private void initializeBackgroundColor() {
EditColorPreference pref = (EditColorPreference) this
EditColorPreference pref = this
.findPreference(Constants.PreferenceKeys.ColorRule.BACKGROUND_COLOR);
pref.initColorPickerListener(this, COLOR_PREF_KEY_BACKGROUND,
getActivity().getString(R.string.background_color), this.mBackgroundColor);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ public boolean onPreferenceChange(Preference preference, Object newValue) {
* Sets EditTextPreference for Survey form
*/
private void initializeDefaultForm() {
EditTextPreference editFormPref = (EditTextPreference) this
EditTextPreference editFormPref = this
.findPreference(Constants.PreferenceKeys.Table.DEFAULT_FORM);
final AbsTableActivity mActivity = ((AbsTableActivity) getActivity());

Expand Down Expand Up @@ -492,7 +492,7 @@ public boolean onPreferenceClick(Preference preference) {
* @throws ServicesAvailabilityException if the database is down
*/
private void initializeListFile(DbHandle db) throws ServicesAvailabilityException {
FileSelectorPreference listPref = (FileSelectorPreference) this
FileSelectorPreference listPref = this
.findPreference(Constants.PreferenceKeys.Table.LIST_FILE);
listPref.setFields(this, RequestCodeConsts.RequestCodes.CHOOSE_LIST_FILE,
((IAppAwareActivity) getActivity()).getAppName());
Expand All @@ -508,7 +508,7 @@ private void initializeListFile(DbHandle db) throws ServicesAvailabilityExceptio
* @throws ServicesAvailabilityException if the database is down
*/
private void initializeMapListFile(DbHandle db) throws ServicesAvailabilityException {
FileSelectorPreference mapListPref = (FileSelectorPreference) this
FileSelectorPreference mapListPref = this
.findPreference(Constants.PreferenceKeys.Table.MAP_LIST_FILE);
mapListPref.setFields(this, RequestCodeConsts.RequestCodes.CHOOSE_MAP_FILE,
((IAppAwareActivity) getActivity()).getAppName());
Expand All @@ -527,7 +527,7 @@ private void initializeMapListFile(DbHandle db) throws ServicesAvailabilityExcep
* @throws ServicesAvailabilityException if the database is down
*/
private void initializeDetailFile(DbHandle db) throws ServicesAvailabilityException {
FileSelectorPreference detailPref = (FileSelectorPreference) this
FileSelectorPreference detailPref = this
.findPreference(Constants.PreferenceKeys.Table.DETAIL_FILE);
detailPref.setFields(this, RequestCodeConsts.RequestCodes.CHOOSE_DETAIL_FILE,
((IAppAwareActivity) getActivity()).getAppName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import android.content.Context;
import androidx.preference.ListPreference;
import android.util.AttributeSet;
import android.view.ContextThemeWrapper;
import org.opendatakit.activities.IAppAwareActivity;
import org.opendatakit.data.TableViewType;
import org.opendatakit.data.utilities.TableUtil;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,10 @@
import android.util.DisplayMetrics;
import android.view.ContextMenu;
import android.view.View;
import org.opendatakit.activities.IAppAwareActivity;
import org.opendatakit.data.ColorGuide;
import org.opendatakit.data.ColorGuideGroup;
import org.opendatakit.data.ColorRuleGroup;
import org.opendatakit.database.data.ColumnDefinition;
import org.opendatakit.database.data.Row;
import org.opendatakit.database.data.TypedRow;
import org.opendatakit.logging.WebLogger;
import org.opendatakit.provider.DataTableColumns;
Expand Down