Commit 77ff10a9 authored by Alexander Martinz's avatar Alexander Martinz Committed by Michael Bestas

Remove some more private API usages

Change-Id: I4132779250fe955a7d0753167bb3921fa751c8aa
Signed-off-by: default avatarAlexander Martinz <amartinz@shiftphones.com>
parent 8aabaeef
......@@ -14,7 +14,6 @@
package org.lineageos.eleven;
import android.Manifest.permission;
import android.annotation.NonNull;
import android.annotation.SuppressLint;
import android.app.AlarmManager;
import android.app.Notification;
......@@ -57,6 +56,7 @@ import android.os.SystemClock;
import android.provider.MediaStore;
import android.provider.MediaStore.Audio.AlbumColumns;
import android.provider.MediaStore.Audio.AudioColumns;
import android.support.annotation.NonNull;
import android.support.v4.os.BuildCompat;
import android.text.TextUtils;
import android.util.Log;
......
......@@ -345,7 +345,6 @@ public class PlaylistWorkerTask extends BitmapWorkerTask<Void, Void, TransitionD
combinedCanvas.drawBitmap(loadedBitmaps.get(3), null,
new Rect(width / 2, height / 2, width, height), null);
combinedCanvas.release();
combinedCanvas = null;
bitmap = combinedBitmap;
}
......
......@@ -1043,7 +1043,7 @@ public class SlidingUpPanelLayout extends ViewGroup {
@Override
protected boolean drawChild(Canvas canvas, View child, long drawingTime) {
boolean result;
final int save = canvas.save(Canvas.CLIP_SAVE_FLAG);
final int save = canvas.save();
if (isSlidingEnabled() && mMainView == child) {
// Clip against the slider; no sense drawing what will immediately be covered,
......
......@@ -89,6 +89,11 @@ public class SearchActivity extends FragmentActivity implements
LoaderCallbacks<SectionListContainer<SearchResult>>,
OnScrollListener, OnQueryTextListener, OnItemClickListener, ServiceConnection,
OnTouchListener {
/**
* Intent extra for identifying the search type to filter for
*/
public static String EXTRA_SEARCH_MODE = "search_mode";
/**
* Loading delay of 500ms so we don't flash the screen too much when loading new searches
*/
......@@ -308,7 +313,7 @@ public class SearchActivity extends FragmentActivity implements
mTopLevelSearch = false;
// get the search type to filter by
int type = getIntent().getIntExtra(SearchManager.SEARCH_MODE, -1);
int type = getIntent().getIntExtra(SearchActivity.EXTRA_SEARCH_MODE, -1);
if (type >= 0 && type < ResultType.values().length) {
mSearchType = ResultType.values()[type];
}
......@@ -554,9 +559,8 @@ public class SearchActivity extends FragmentActivity implements
*/
public void setLoading() {
if (mCurrentState != VisibleState.Loading) {
if (!mHandler.hasCallbacks(mLoadingRunnable)) {
mHandler.postDelayed(mLoadingRunnable, LOADING_DELAY);
}
mHandler.removeCallbacks(mLoadingRunnable);
mHandler.postDelayed(mLoadingRunnable, LOADING_DELAY);
}
}
......@@ -646,7 +650,7 @@ public class SearchActivity extends FragmentActivity implements
SearchResult item = mAdapter.getTItem(position - 1);
Intent intent = new Intent(this, SearchActivity.class);
intent.putExtra(SearchManager.QUERY, mFilterString);
intent.putExtra(SearchManager.SEARCH_MODE, item.mType.ordinal());
intent.putExtra(SearchActivity.EXTRA_SEARCH_MODE, item.mType.ordinal());
startActivity(intent);
} else {
SearchResult item = mAdapter.getTItem(position);
......
......@@ -63,9 +63,9 @@ public class LoadingEmptyContainer extends FrameLayout {
public void showLoading() {
hideAll();
if (!mHandler.hasCallbacks(mShowLoadingRunnable)) {
mHandler.postDelayed(mShowLoadingRunnable, LOADING_DELAY);
}
mHandler.removeCallbacks(mShowLoadingRunnable);
mHandler.postDelayed(mShowLoadingRunnable, LOADING_DELAY);
}
public void showNoResults() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment