diff options
author | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2018-05-16 16:31:02 +0200 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2018-05-16 16:36:09 +0200 |
commit | bf07813f6843f257d7de1cc599ecc9b4d310b3f7 (patch) | |
tree | 2c0792bb56c2d55376971baf1fae72d81a0c126c /android | |
parent | a8d175b85d37dbec873d79b4311743f97138c438 (diff) |
android janitor... remove unnecessary imports, variables and casts
also no need to wrap primitives
Change-Id: I6e22b2bfdb2b8b366dd6f50d995b573c770f0b5a
Diffstat (limited to 'android')
6 files changed, 4 insertions, 9 deletions
diff --git a/android/source/src/java/org/libreoffice/ColorPaletteAdapter.java b/android/source/src/java/org/libreoffice/ColorPaletteAdapter.java index 55c12792ae0a..7cce2ed7d46a 100644 --- a/android/source/src/java/org/libreoffice/ColorPaletteAdapter.java +++ b/android/source/src/java/org/libreoffice/ColorPaletteAdapter.java @@ -28,8 +28,7 @@ public class ColorPaletteAdapter extends RecyclerView.Adapter<ColorPaletteAdapte @Override public ColorPaletteViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { View item = LayoutInflater.from(mContext).inflate(R.layout.colorbox, parent, false); - ColorPaletteViewHolder holder = new ColorPaletteViewHolder(item); - return holder; + return new ColorPaletteViewHolder(item); } diff --git a/android/source/src/java/org/libreoffice/ColorPickerAdapter.java b/android/source/src/java/org/libreoffice/ColorPickerAdapter.java index 14e6988f7a9c..f387e50634a5 100644 --- a/android/source/src/java/org/libreoffice/ColorPickerAdapter.java +++ b/android/source/src/java/org/libreoffice/ColorPickerAdapter.java @@ -33,8 +33,7 @@ public class ColorPickerAdapter extends RecyclerView.Adapter<ColorPickerAdapter. @Override public ColorPickerViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { View item = LayoutInflater.from(mContext).inflate(R.layout.colorbox, parent, false); - ColorPickerViewHolder holder = new ColorPickerViewHolder(item); - return holder; + return new ColorPickerViewHolder(item); } diff --git a/android/source/src/java/org/libreoffice/FontController.java b/android/source/src/java/org/libreoffice/FontController.java index 321b501e8891..7a3f18366c7a 100644 --- a/android/source/src/java/org/libreoffice/FontController.java +++ b/android/source/src/java/org/libreoffice/FontController.java @@ -1,6 +1,5 @@ package org.libreoffice; -import android.app.Activity; import android.graphics.Color; import android.graphics.Rect; import android.support.design.widget.BottomSheetBehavior; @@ -249,7 +248,7 @@ public class FontController implements AdapterView.OnItemSelectedListener { } private void setupColorPicker(){ - LinearLayout colorPickerLayout = (LinearLayout)mActivity.findViewById(R.id.toolbar_color_picker); + LinearLayout colorPickerLayout = mActivity.findViewById(R.id.toolbar_color_picker); RecyclerView recyclerView = colorPickerLayout.findViewById(R.id.fontColorView); GridLayoutManager gridLayoutManager = new GridLayoutManager(mActivity, 11, GridLayoutManager.VERTICAL, true); diff --git a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java index dee54d5ac2da..4cde5d96f992 100644 --- a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java +++ b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java @@ -16,7 +16,6 @@ import android.net.Uri; import android.os.AsyncTask; import android.os.Build; import android.os.Bundle; -import android.os.Handler; import android.preference.PreferenceManager; import android.support.design.widget.BottomSheetBehavior; import android.support.design.widget.Snackbar; diff --git a/android/source/src/java/org/libreoffice/TileProvider.java b/android/source/src/java/org/libreoffice/TileProvider.java index 240d3ce52057..3b6f22873466 100644 --- a/android/source/src/java/org/libreoffice/TileProvider.java +++ b/android/source/src/java/org/libreoffice/TileProvider.java @@ -13,7 +13,6 @@ import android.graphics.Bitmap; import android.graphics.PointF; import android.view.KeyEvent; -import org.libreoffice.kit.Document; import org.mozilla.gecko.gfx.CairoImage; import org.mozilla.gecko.gfx.IntSize; diff --git a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java index 938112c99149..706ce25344e9 100644 --- a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java +++ b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java @@ -830,7 +830,7 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings SharedPreferences defaultPrefs = PreferenceManager.getDefaultSharedPreferences(getBaseContext()); viewMode = Integer.valueOf(defaultPrefs.getString(EXPLORER_VIEW_TYPE_KEY, ""+ GRID_VIEW)); filterMode = Integer.valueOf(defaultPrefs.getString(FILTER_MODE_KEY , "-1")); - showHiddenFiles = Boolean.valueOf(defaultPrefs.getBoolean(ENABLE_SHOW_HIDDEN_FILES_KEY, false)); + showHiddenFiles = defaultPrefs.getBoolean(ENABLE_SHOW_HIDDEN_FILES_KEY, false); Intent i = this.getIntent(); if (i.hasExtra(CURRENT_DIRECTORY_KEY)) { |