fix assorted crap reported by code analysis
This commit is contained in:
parent
3e078aa1d7
commit
8a15540c61
@ -27,11 +27,10 @@ dependencies {
|
|||||||
compile files('libs/dashclock-api-r1.1.jar')
|
compile files('libs/dashclock-api-r1.1.jar')
|
||||||
compile files('libs/jsoup-1.6.1.jar')
|
compile files('libs/jsoup-1.6.1.jar')
|
||||||
compile files('libs/universal-image-loader-1.9.3.jar')
|
compile files('libs/universal-image-loader-1.9.3.jar')
|
||||||
/* compile 'com.jeremyfeinstein.slidingmenu:library:1.3@aar' */
|
|
||||||
compile 'com.readystatesoftware.systembartint:systembartint:1.0.3'
|
compile 'com.readystatesoftware.systembartint:systembartint:1.0.3'
|
||||||
compile 'com.viewpagerindicator:library:2.4.1'
|
compile 'com.viewpagerindicator:library:2.4.1'
|
||||||
compile 'com.android.support:cardview-v7:21.0.0'
|
compile 'com.android.support:cardview-v7:21.0.0'
|
||||||
compile 'com.android.support:support-v4:21.0.0'
|
compile 'com.android.support:support-v4:21.0.0'
|
||||||
compile 'com.google.code.gson:gson:1.7.1'
|
compile 'com.google.code.gson:gson:2.2.4'
|
||||||
compile 'com.android.support:appcompat-v7:21.0.0'
|
compile 'com.android.support:appcompat-v7:21.0.0'
|
||||||
}
|
}
|
||||||
|
@ -85,8 +85,8 @@
|
|||||||
<orderEntry type="library" exported="" name="support-v4-21.0.0" level="project" />
|
<orderEntry type="library" exported="" name="support-v4-21.0.0" level="project" />
|
||||||
<orderEntry type="library" exported="" name="dashclock-api-r1.1" level="project" />
|
<orderEntry type="library" exported="" name="dashclock-api-r1.1" level="project" />
|
||||||
<orderEntry type="library" exported="" name="systembartint-1.0.3" level="project" />
|
<orderEntry type="library" exported="" name="systembartint-1.0.3" level="project" />
|
||||||
|
<orderEntry type="library" exported="" name="gson-2.2.4" level="project" />
|
||||||
<orderEntry type="library" exported="" name="jsoup-1.6.1" level="project" />
|
<orderEntry type="library" exported="" name="jsoup-1.6.1" level="project" />
|
||||||
<orderEntry type="library" exported="" name="gson-1.7.1" level="project" />
|
|
||||||
<orderEntry type="library" exported="" name="library-2.4.1" level="project" />
|
<orderEntry type="library" exported="" name="library-2.4.1" level="project" />
|
||||||
<orderEntry type="library" exported="" name="universal-image-loader-1.9.3" level="project" />
|
<orderEntry type="library" exported="" name="universal-image-loader-1.9.3" level="project" />
|
||||||
<orderEntry type="library" exported="" name="appcompat-v7-21.0.0" level="project" />
|
<orderEntry type="library" exported="" name="appcompat-v7-21.0.0" level="project" />
|
||||||
|
@ -1,5 +1,21 @@
|
|||||||
package org.fox.ttrss;
|
package org.fox.ttrss;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
import android.net.ConnectivityManager;
|
||||||
|
import android.net.NetworkInfo;
|
||||||
|
import android.os.AsyncTask;
|
||||||
|
import android.os.Build;
|
||||||
|
import android.preference.PreferenceManager;
|
||||||
|
import android.util.Base64;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.google.gson.JsonElement;
|
||||||
|
import com.google.gson.JsonObject;
|
||||||
|
import com.google.gson.JsonParser;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
@ -17,28 +33,12 @@ import javax.net.ssl.SSLSession;
|
|||||||
import javax.net.ssl.TrustManager;
|
import javax.net.ssl.TrustManager;
|
||||||
import javax.net.ssl.X509TrustManager;
|
import javax.net.ssl.X509TrustManager;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.SharedPreferences;
|
|
||||||
import android.net.ConnectivityManager;
|
|
||||||
import android.net.NetworkInfo;
|
|
||||||
import android.os.AsyncTask;
|
|
||||||
import android.os.Build;
|
|
||||||
import android.preference.PreferenceManager;
|
|
||||||
import android.util.Base64;
|
|
||||||
import android.util.Log;
|
|
||||||
|
|
||||||
import com.google.gson.Gson;
|
|
||||||
import com.google.gson.JsonElement;
|
|
||||||
import com.google.gson.JsonObject;
|
|
||||||
import com.google.gson.JsonParser;
|
|
||||||
|
|
||||||
public class ApiRequest extends AsyncTask<HashMap<String,String>, Integer, JsonElement> {
|
public class ApiRequest extends AsyncTask<HashMap<String,String>, Integer, JsonElement> {
|
||||||
private final String TAG = this.getClass().getSimpleName();
|
private final String TAG = this.getClass().getSimpleName();
|
||||||
|
|
||||||
public enum ApiError { NO_ERROR, HTTP_UNAUTHORIZED, HTTP_FORBIDDEN, HTTP_NOT_FOUND,
|
public enum ApiError { NO_ERROR, HTTP_UNAUTHORIZED, HTTP_FORBIDDEN, HTTP_NOT_FOUND,
|
||||||
HTTP_SERVER_ERROR, HTTP_OTHER_ERROR, SSL_REJECTED, SSL_HOSTNAME_REJECTED, PARSE_ERROR, IO_ERROR, OTHER_ERROR, API_DISABLED,
|
HTTP_SERVER_ERROR, HTTP_OTHER_ERROR, SSL_REJECTED, SSL_HOSTNAME_REJECTED, PARSE_ERROR, IO_ERROR, OTHER_ERROR, API_DISABLED,
|
||||||
API_UNKNOWN, LOGIN_FAILED, INVALID_URL, API_INCORRECT_USAGE, NETWORK_UNAVAILABLE, API_UNKNOWN_METHOD };
|
API_UNKNOWN, LOGIN_FAILED, INVALID_URL, API_INCORRECT_USAGE, NETWORK_UNAVAILABLE, API_UNKNOWN_METHOD }
|
||||||
|
|
||||||
public static final int API_STATUS_OK = 0;
|
public static final int API_STATUS_OK = 0;
|
||||||
public static final int API_STATUS_ERR = 1;
|
public static final int API_STATUS_ERR = 1;
|
||||||
|
@ -19,7 +19,6 @@ import android.view.LayoutInflater;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.View.OnClickListener;
|
import android.view.View.OnClickListener;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.webkit.WebChromeClient;
|
|
||||||
import android.webkit.WebSettings;
|
import android.webkit.WebSettings;
|
||||||
import android.webkit.WebView;
|
import android.webkit.WebView;
|
||||||
import android.webkit.WebView.HitTestResult;
|
import android.webkit.WebView.HitTestResult;
|
||||||
@ -51,7 +50,7 @@ public class ArticleFragment extends Fragment {
|
|||||||
m_article = article;
|
m_article = article;
|
||||||
}
|
}
|
||||||
|
|
||||||
private View.OnTouchListener m_gestureListener;
|
//private View.OnTouchListener m_gestureListener;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreateContextMenu(ContextMenu menu, View v,
|
public void onCreateContextMenu(ContextMenu menu, View v,
|
||||||
@ -84,7 +83,6 @@ public class ArticleFragment extends Fragment {
|
|||||||
@SuppressLint("NewApi")
|
@SuppressLint("NewApi")
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
m_activity.setProgressBarVisibility(true);
|
|
||||||
|
|
||||||
if (savedInstanceState != null) {
|
if (savedInstanceState != null) {
|
||||||
m_article = savedInstanceState.getParcelable("article");
|
m_article = savedInstanceState.getParcelable("article");
|
||||||
@ -209,7 +207,7 @@ public class ArticleFragment extends Fragment {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
final WebView web = (WebView)view.findViewById(R.id.content);
|
final WebView web = (WebView)view.findViewById(R.id.article_content);
|
||||||
|
|
||||||
if (web != null) {
|
if (web != null) {
|
||||||
|
|
||||||
@ -241,16 +239,6 @@ public class ArticleFragment extends Fragment {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
web.setWebChromeClient(new WebChromeClient() {
|
|
||||||
@Override
|
|
||||||
public void onProgressChanged(WebView view, int progress) {
|
|
||||||
m_activity.setProgress(Math.round(((float)progress / 100f) * 10000));
|
|
||||||
if (progress == 100) {
|
|
||||||
m_activity.setProgressBarVisibility(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
String content;
|
String content;
|
||||||
String cssOverride = "";
|
String cssOverride = "";
|
||||||
|
|
||||||
@ -359,8 +347,8 @@ public class ArticleFragment extends Fragment {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_activity.isSmallScreen())
|
// if (m_activity.isSmallScreen())
|
||||||
web.setOnTouchListener(m_gestureListener);
|
// web.setOnTouchListener(m_gestureListener);
|
||||||
|
|
||||||
web.setVisibility(View.VISIBLE);
|
web.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,6 @@ import android.view.Menu;
|
|||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.view.Window;
|
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
@ -184,12 +183,6 @@ public class ArticleImagesPagerActivity extends CommonActivity {
|
|||||||
// we use that before parent onCreate so let's init locally
|
// we use that before parent onCreate so let's init locally
|
||||||
m_prefs = PreferenceManager
|
m_prefs = PreferenceManager
|
||||||
.getDefaultSharedPreferences(getApplicationContext());
|
.getDefaultSharedPreferences(getApplicationContext());
|
||||||
|
|
||||||
requestWindowFeature(Window.FEATURE_PROGRESS);
|
|
||||||
|
|
||||||
setProgressBarVisibility(false);
|
|
||||||
setProgressBarIndeterminateVisibility(false);
|
|
||||||
|
|
||||||
setAppTheme(m_prefs);
|
setAppTheme(m_prefs);
|
||||||
|
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
@ -94,8 +94,6 @@ public class ArticlePager extends Fragment {
|
|||||||
|
|
||||||
m_listener.onArticleSelected(m_article, false);
|
m_listener.onArticleSelected(m_article, false);
|
||||||
|
|
||||||
m_activity.setProgressBarVisibility(true);
|
|
||||||
|
|
||||||
pager.setAdapter(m_adapter);
|
pager.setAdapter(m_adapter);
|
||||||
|
|
||||||
UnderlinePageIndicator indicator = (UnderlinePageIndicator)view.findViewById(R.id.article_titles);
|
UnderlinePageIndicator indicator = (UnderlinePageIndicator)view.findViewById(R.id.article_titles);
|
||||||
@ -142,9 +140,6 @@ public class ArticlePager extends Fragment {
|
|||||||
|
|
||||||
@SuppressWarnings({ "serial" })
|
@SuppressWarnings({ "serial" })
|
||||||
protected void refresh(boolean append) {
|
protected void refresh(boolean append) {
|
||||||
//m_activity.setLoadingStatus(R.string.blank, true);
|
|
||||||
m_activity.setProgressBarVisibility(true);
|
|
||||||
//m_activity.m_pullToRefreshAttacher.setRefreshing(true);
|
|
||||||
|
|
||||||
if (!m_feed.equals(GlobalState.getInstance().m_activeFeed)) {
|
if (!m_feed.equals(GlobalState.getInstance().m_activeFeed)) {
|
||||||
append = false;
|
append = false;
|
||||||
@ -160,9 +155,6 @@ public class ArticlePager extends Fragment {
|
|||||||
protected void onPostExecute(JsonElement result) {
|
protected void onPostExecute(JsonElement result) {
|
||||||
if (isDetached()) return;
|
if (isDetached()) return;
|
||||||
|
|
||||||
m_activity.setProgressBarVisibility(false);
|
|
||||||
//m_activity.m_pullToRefreshAttacher.setRefreshComplete();
|
|
||||||
|
|
||||||
super.onPostExecute(result);
|
super.onPostExecute(result);
|
||||||
|
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
|
@ -324,7 +324,6 @@ public class FeedCategoriesFragment extends Fragment implements OnItemClickListe
|
|||||||
protected void onPostExecute(JsonElement result) {
|
protected void onPostExecute(JsonElement result) {
|
||||||
if (isDetached()) return;
|
if (isDetached()) return;
|
||||||
|
|
||||||
m_activity.setProgressBarVisibility(false);
|
|
||||||
if (m_swipeLayout != null) m_swipeLayout.setRefreshing(false);
|
if (m_swipeLayout != null) m_swipeLayout.setRefreshing(false);
|
||||||
|
|
||||||
if (getView() != null) {
|
if (getView() != null) {
|
||||||
|
@ -520,8 +520,6 @@ public class FeedsFragment extends Fragment implements OnItemClickListener, OnSh
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_activity.setProgressBarVisibility(false);
|
|
||||||
//m_activity.m_pullToRefreshAttacher.setRefreshComplete();
|
|
||||||
if (m_swipeLayout != null) m_swipeLayout.setRefreshing(false);
|
if (m_swipeLayout != null) m_swipeLayout.setRefreshing(false);
|
||||||
|
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
|
@ -68,7 +68,7 @@ import java.util.HashMap;
|
|||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
|
|
||||||
public class HeadlinesFragment extends Fragment implements OnItemClickListener, OnScrollListener {
|
public class HeadlinesFragment extends Fragment implements OnItemClickListener, OnScrollListener {
|
||||||
public static enum ArticlesSelection { ALL, NONE, UNREAD };
|
public static enum ArticlesSelection { ALL, NONE, UNREAD }
|
||||||
|
|
||||||
public static final int HEADLINES_REQUEST_SIZE = 30;
|
public static final int HEADLINES_REQUEST_SIZE = 30;
|
||||||
public static final int HEADLINES_BUFFER_MAX = 500;
|
public static final int HEADLINES_BUFFER_MAX = 500;
|
||||||
@ -417,7 +417,6 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
|||||||
m_refreshInProgress = true;
|
m_refreshInProgress = true;
|
||||||
|
|
||||||
if (m_swipeLayout != null) m_swipeLayout.setRefreshing(true);
|
if (m_swipeLayout != null) m_swipeLayout.setRefreshing(true);
|
||||||
m_activity.setProgressBarVisibility(true);
|
|
||||||
|
|
||||||
if (!m_feed.equals(GlobalState.getInstance().m_activeFeed)) {
|
if (!m_feed.equals(GlobalState.getInstance().m_activeFeed)) {
|
||||||
append = false;
|
append = false;
|
||||||
@ -459,8 +458,6 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_activity.setProgressBarVisibility(false);
|
|
||||||
|
|
||||||
super.onPostExecute(result);
|
super.onPostExecute(result);
|
||||||
|
|
||||||
if (isAdded()) {
|
if (isAdded()) {
|
||||||
|
@ -25,7 +25,6 @@ import android.view.Menu;
|
|||||||
import android.view.MenuInflater;
|
import android.view.MenuInflater;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.Window;
|
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
@ -76,7 +75,7 @@ public class OnlineActivity extends CommonActivity {
|
|||||||
protected abstract class OnLoginFinishedListener {
|
protected abstract class OnLoginFinishedListener {
|
||||||
public abstract void OnLoginSuccess();
|
public abstract void OnLoginSuccess();
|
||||||
public abstract void OnLoginFailed();
|
public abstract void OnLoginFailed();
|
||||||
};
|
}
|
||||||
|
|
||||||
private BroadcastReceiver m_broadcastReceiver = new BroadcastReceiver() {
|
private BroadcastReceiver m_broadcastReceiver = new BroadcastReceiver() {
|
||||||
@Override
|
@Override
|
||||||
@ -134,7 +133,7 @@ public class OnlineActivity extends CommonActivity {
|
|||||||
onOptionsItemSelected(item);
|
onOptionsItemSelected(item);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
protected String getSessionId() {
|
protected String getSessionId() {
|
||||||
return GlobalState.getInstance().m_sessionId;
|
return GlobalState.getInstance().m_sessionId;
|
||||||
@ -152,19 +151,10 @@ public class OnlineActivity extends CommonActivity {
|
|||||||
m_prefs = PreferenceManager
|
m_prefs = PreferenceManager
|
||||||
.getDefaultSharedPreferences(getApplicationContext());
|
.getDefaultSharedPreferences(getApplicationContext());
|
||||||
|
|
||||||
// if (canUseProgress()) {
|
|
||||||
requestWindowFeature(Window.FEATURE_PROGRESS);
|
|
||||||
// }
|
|
||||||
|
|
||||||
setAppTheme(m_prefs);
|
setAppTheme(m_prefs);
|
||||||
|
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
//requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
|
|
||||||
|
|
||||||
setProgressBarVisibility(false);
|
|
||||||
setProgressBarIndeterminateVisibility(false);
|
|
||||||
|
|
||||||
// SharedPreferences localPrefs = getSharedPreferences("localprefs", Context.MODE_PRIVATE);
|
// SharedPreferences localPrefs = getSharedPreferences("localprefs", Context.MODE_PRIVATE);
|
||||||
|
|
||||||
SharedPreferences localPrefs = getSharedPreferences("localprefs", Context.MODE_PRIVATE);
|
SharedPreferences localPrefs = getSharedPreferences("localprefs", Context.MODE_PRIVATE);
|
||||||
@ -1207,8 +1197,6 @@ public class OnlineActivity extends CommonActivity {
|
|||||||
if (loadingContainer != null) {
|
if (loadingContainer != null) {
|
||||||
loadingContainer.setVisibility(status == R.string.blank ? View.GONE : View.VISIBLE);
|
loadingContainer.setVisibility(status == R.string.blank ? View.GONE : View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
setProgressBarIndeterminateVisibility(showProgress);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void logout() {
|
protected void logout() {
|
||||||
|
@ -21,7 +21,6 @@ import android.view.Menu;
|
|||||||
import android.view.MenuInflater;
|
import android.view.MenuInflater;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.Window;
|
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
@ -71,7 +70,7 @@ public class OfflineActivity extends CommonActivity {
|
|||||||
onOptionsItemSelected(item);
|
onOptionsItemSelected(item);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onContextItemSelected(android.view.MenuItem item) {
|
public boolean onContextItemSelected(android.view.MenuItem item) {
|
||||||
@ -167,14 +166,10 @@ public class OfflineActivity extends CommonActivity {
|
|||||||
m_prefs = PreferenceManager
|
m_prefs = PreferenceManager
|
||||||
.getDefaultSharedPreferences(getApplicationContext());
|
.getDefaultSharedPreferences(getApplicationContext());
|
||||||
|
|
||||||
requestWindowFeature(Window.FEATURE_PROGRESS);
|
|
||||||
|
|
||||||
setAppTheme(m_prefs);
|
setAppTheme(m_prefs);
|
||||||
|
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
setProgressBarVisibility(false);
|
|
||||||
|
|
||||||
setContentView(R.layout.login);
|
setContentView(R.layout.login);
|
||||||
|
|
||||||
initMenu();
|
initMenu();
|
||||||
|
@ -22,7 +22,6 @@ import android.view.MenuItem;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.View.OnClickListener;
|
import android.view.View.OnClickListener;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.webkit.WebChromeClient;
|
|
||||||
import android.webkit.WebSettings;
|
import android.webkit.WebSettings;
|
||||||
import android.webkit.WebView;
|
import android.webkit.WebView;
|
||||||
import android.webkit.WebView.HitTestResult;
|
import android.webkit.WebView.HitTestResult;
|
||||||
@ -217,14 +216,14 @@ public class OfflineArticleFragment extends Fragment {
|
|||||||
note.setVisibility(View.GONE);
|
note.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
final WebView web = (WebView)view.findViewById(R.id.content);
|
final WebView web = (WebView)view.findViewById(R.id.article_content);
|
||||||
|
|
||||||
if (web != null) {
|
if (web != null) {
|
||||||
|
|
||||||
web.setOnLongClickListener(new View.OnLongClickListener() {
|
web.setOnLongClickListener(new View.OnLongClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View v) {
|
public boolean onLongClick(View v) {
|
||||||
HitTestResult result = ((WebView)v).getHitTestResult();
|
HitTestResult result = ((WebView) v).getHitTestResult();
|
||||||
|
|
||||||
if (result != null && (result.getType() == HitTestResult.IMAGE_TYPE || result.getType() == HitTestResult.SRC_IMAGE_ANCHOR_TYPE)) {
|
if (result != null && (result.getType() == HitTestResult.IMAGE_TYPE || result.getType() == HitTestResult.SRC_IMAGE_ANCHOR_TYPE)) {
|
||||||
registerForContextMenu(web);
|
registerForContextMenu(web);
|
||||||
@ -242,16 +241,6 @@ public class OfflineArticleFragment extends Fragment {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
web.setWebChromeClient(new WebChromeClient() {
|
|
||||||
@Override
|
|
||||||
public void onProgressChanged(WebView view, int progress) {
|
|
||||||
m_activity.setProgress(Math.round(((float)progress / 100f) * 10000));
|
|
||||||
if (progress == 100) {
|
|
||||||
m_activity.setProgressBarVisibility(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
String content;
|
String content;
|
||||||
String cssOverride = "";
|
String cssOverride = "";
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ import java.util.Date;
|
|||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
|
|
||||||
public class OfflineHeadlinesFragment extends Fragment implements OnItemClickListener, AbsListView.OnScrollListener {
|
public class OfflineHeadlinesFragment extends Fragment implements OnItemClickListener, AbsListView.OnScrollListener {
|
||||||
public static enum ArticlesSelection { ALL, NONE, UNREAD };
|
public static enum ArticlesSelection { ALL, NONE, UNREAD }
|
||||||
|
|
||||||
private final String TAG = this.getClass().getSimpleName();
|
private final String TAG = this.getClass().getSimpleName();
|
||||||
|
|
||||||
@ -324,8 +324,6 @@ public class OfflineHeadlinesFragment extends Fragment implements OnItemClickLis
|
|||||||
list.setEmptyView(view.findViewById(R.id.no_headlines));
|
list.setEmptyView(view.findViewById(R.id.no_headlines));
|
||||||
registerForContextMenu(list);
|
registerForContextMenu(list);
|
||||||
|
|
||||||
getActivity().setProgressBarIndeterminateVisibility(false);
|
|
||||||
|
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,12 +1,5 @@
|
|||||||
package org.fox.ttrss.offline;
|
package org.fox.ttrss.offline;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
|
|
||||||
import org.fox.ttrss.ApiRequest;
|
|
||||||
import org.fox.ttrss.OnlineActivity;
|
|
||||||
import org.fox.ttrss.R;
|
|
||||||
import org.fox.ttrss.util.DatabaseHelper;
|
|
||||||
|
|
||||||
import android.app.IntentService;
|
import android.app.IntentService;
|
||||||
import android.app.Notification;
|
import android.app.Notification;
|
||||||
import android.app.NotificationManager;
|
import android.app.NotificationManager;
|
||||||
@ -20,6 +13,13 @@ import android.util.Log;
|
|||||||
|
|
||||||
import com.google.gson.JsonElement;
|
import com.google.gson.JsonElement;
|
||||||
|
|
||||||
|
import org.fox.ttrss.ApiRequest;
|
||||||
|
import org.fox.ttrss.OnlineActivity;
|
||||||
|
import org.fox.ttrss.R;
|
||||||
|
import org.fox.ttrss.util.DatabaseHelper;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
public class OfflineUploadService extends IntentService {
|
public class OfflineUploadService extends IntentService {
|
||||||
private final String TAG = this.getClass().getSimpleName();
|
private final String TAG = this.getClass().getSimpleName();
|
||||||
|
|
||||||
@ -122,7 +122,7 @@ public class OfflineUploadService extends IntentService {
|
|||||||
|
|
||||||
private enum ModifiedCriteria {
|
private enum ModifiedCriteria {
|
||||||
READ, MARKED, PUBLISHED
|
READ, MARKED, PUBLISHED
|
||||||
};
|
}
|
||||||
|
|
||||||
private String getModifiedIds(ModifiedCriteria criteria) {
|
private String getModifiedIds(ModifiedCriteria criteria) {
|
||||||
|
|
||||||
|
@ -1,10 +1,5 @@
|
|||||||
package org.fox.ttrss.share;
|
package org.fox.ttrss.share;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
|
|
||||||
import org.fox.ttrss.ApiRequest;
|
|
||||||
import org.fox.ttrss.R;
|
|
||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@ -14,6 +9,11 @@ import android.widget.EditText;
|
|||||||
|
|
||||||
import com.google.gson.JsonElement;
|
import com.google.gson.JsonElement;
|
||||||
|
|
||||||
|
import org.fox.ttrss.ApiRequest;
|
||||||
|
import org.fox.ttrss.R;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
public class ShareActivity extends CommonShareActivity {
|
public class ShareActivity extends CommonShareActivity {
|
||||||
private final String TAG = this.getClass().getSimpleName();
|
private final String TAG = this.getClass().getSimpleName();
|
||||||
|
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<bitmap
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:src="@drawable/ics_divider_vertical_bitmap"
|
|
||||||
android:gravity="fill_vertical|right" />
|
|
@ -1,5 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<bitmap
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:src="@drawable/ics_divider_vertical_bitmap"
|
|
||||||
android:gravity="fill_vertical|right" />
|
|
@ -92,7 +92,7 @@
|
|||||||
android:text="[Article note]" />
|
android:text="[Article note]" />
|
||||||
|
|
||||||
<org.fox.ttrss.util.LessBrokenWebView
|
<org.fox.ttrss.util.LessBrokenWebView
|
||||||
android:id="@+id/content"
|
android:id="@+id/article_content"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
android:padding="5sp" >
|
android:padding="5sp" >
|
||||||
|
|
||||||
<org.fox.ttrss.util.TitleWebView
|
<org.fox.ttrss.util.TitleWebView
|
||||||
android:id="@+id/content"
|
android:id="@+id/article_content"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1">
|
android:layout_weight="1">
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:id="@+id/main"
|
|
||||||
android:fitsSystemWindows="true"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="fill_parent" >
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:id="@+id/feeds_fragment"
|
|
||||||
android:background="?smallScreenBackground"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent" >
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
@ -31,7 +31,7 @@
|
|||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:text="{FEED}"
|
android:text="{FEED}"
|
||||||
android:textColor="?feedlistTextColor"
|
android:textColor="?feedlistTextColor"
|
||||||
android:textSize="18dip" />
|
android:textSize="18sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/unread_counter"
|
android:id="@+id/unread_counter"
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:text="{FEED}"
|
android:text="{FEED}"
|
||||||
android:textColor="?feedlistSelectedTextColor"
|
android:textColor="?feedlistSelectedTextColor"
|
||||||
android:textSize="18dip" />
|
android:textSize="18sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/unread_counter"
|
android:id="@+id/unread_counter"
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:id="@+id/headlines"
|
android:id="@+id/headlines"
|
||||||
android:fitsSystemWindows="true"
|
android:fitsSystemWindows="true"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="fill_parent"
|
android:layout_height="fill_parent">
|
||||||
android:orientation="vertical" >
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/fragment_container"
|
android:id="@+id/fragment_container"
|
||||||
@ -29,4 +28,4 @@
|
|||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</FrameLayout>
|
@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/url"
|
android:id="@+id/url"
|
||||||
|
android:inputType="textUri"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignLeft="@+id/title"
|
android:layout_alignLeft="@+id/title"
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
tools:context="org.fox.ttrss.ArticleImagesPagerActivity" >
|
|
||||||
<item android:id="@+id/action_settings"
|
|
||||||
android:title="@string/action_settings"
|
|
||||||
android:orderInCategory="100"
|
|
||||||
app:showAsAction="never" />
|
|
||||||
</menu>
|
|
Loading…
Reference in New Issue
Block a user