Update to 0.4.7
This commit is contained in:
parent
c9f455bebf
commit
994d32cc48
9 changed files with 18 additions and 18 deletions
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="de.luhmer.owncloudnewsreader"
|
||||
android:versionCode="29"
|
||||
android:versionName="0.4.6" >
|
||||
android:versionCode="30"
|
||||
android:versionName="0.4.7" >
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="7"
|
||||
|
|
Binary file not shown.
|
@ -12,5 +12,5 @@
|
|||
|
||||
# Project target.
|
||||
target=android-17
|
||||
android.library.reference.1=../../actionbarsherlock
|
||||
android.library.reference.2=../../library
|
||||
android.library.reference.1=../../workspace_juno/actionbarsherlock
|
||||
android.library.reference.2=../Android-PullToRefresh/library
|
||||
|
|
|
@ -54,7 +54,7 @@ import de.luhmer.owncloudnewsreader.interfaces.ExpListTextClicked;
|
|||
|
||||
public class SubscriptionExpandableListAdapter extends BaseExpandableListAdapter {
|
||||
|
||||
BitmapDrawableLruCache favIconCache;
|
||||
BitmapDrawableLruCache favIconCache = null;
|
||||
|
||||
private Context mContext;
|
||||
private DatabaseConnection dbConn;
|
||||
|
|
|
@ -24,7 +24,6 @@ package de.luhmer.owncloudnewsreader;
|
|||
import android.accounts.Account;
|
||||
import android.accounts.AccountManager;
|
||||
import android.annotation.TargetApi;
|
||||
import android.content.ContentResolver;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Configuration;
|
||||
|
|
|
@ -304,6 +304,11 @@ public class NewsReaderListFragment extends SherlockFragment implements OnCreate
|
|||
_ownCloadSyncService = IOwnCloudSyncService.Stub.asInterface(binder);
|
||||
try {
|
||||
_ownCloadSyncService.registerCallback(callback);
|
||||
|
||||
//Start auto sync if enabled
|
||||
SharedPreferences mPrefs = PreferenceManager.getDefaultSharedPreferences(getActivity());
|
||||
if(mPrefs.getBoolean(SettingsActivity.CB_SYNCONSTARTUP_STRING, false))
|
||||
StartSync();
|
||||
}
|
||||
catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
@ -327,8 +332,8 @@ public class NewsReaderListFragment extends SherlockFragment implements OnCreate
|
|||
{
|
||||
SharedPreferences mPrefs = PreferenceManager.getDefaultSharedPreferences(getActivity());
|
||||
//Update username and password again.. (might have been changed by the login dialog)
|
||||
username = PreferenceManager.getDefaultSharedPreferences(getActivity().getApplicationContext()).getString("edt_username", "");
|
||||
password = PreferenceManager.getDefaultSharedPreferences(getActivity().getApplicationContext()).getString("edt_password", "");
|
||||
//username = PreferenceManager.getDefaultSharedPreferences(getActivity().getApplicationContext()).getString("edt_username", "");
|
||||
//password = PreferenceManager.getDefaultSharedPreferences(getActivity().getApplicationContext()).getString("edt_password", "");
|
||||
|
||||
|
||||
if(mPrefs.getString(SettingsActivity.EDT_OWNCLOUDROOTPATH_STRING, null) == null)
|
||||
|
@ -433,11 +438,6 @@ public class NewsReaderListFragment extends SherlockFragment implements OnCreate
|
|||
eListView.setExpandableAdapter(lvAdapter);
|
||||
|
||||
|
||||
//Start auto sync if enabled
|
||||
SharedPreferences mPrefs = PreferenceManager.getDefaultSharedPreferences(getActivity());
|
||||
if(mPrefs.getBoolean(SettingsActivity.CB_SYNCONSTARTUP_STRING, false))
|
||||
StartSync();
|
||||
|
||||
return V;
|
||||
//return super.onCreateView(inflater, container, savedInstanceState);
|
||||
}
|
||||
|
|
|
@ -96,6 +96,7 @@ public class GetImageAsyncTask extends AsyncTask<Void, Void, String>
|
|||
super.onPostExecute(result);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@SuppressLint("NewApi")
|
||||
@Override
|
||||
protected String doInBackground(Void... params) {
|
||||
|
@ -135,7 +136,8 @@ public class GetImageAsyncTask extends AsyncTask<Void, Void, String>
|
|||
if(lruCache != null) {
|
||||
if(lruCache.get(feedID) == null) {
|
||||
Bitmap bmp = BitmapFactory.decodeByteArray(baf.toByteArray(), 0, baf.length());
|
||||
lruCache.put(feedID, new BitmapDrawable(bmp));
|
||||
if(feedID != null && bmp != null)
|
||||
lruCache.put(feedID, new BitmapDrawable(bmp));
|
||||
}
|
||||
}
|
||||
/* Convert the Bytes read to a String. */
|
||||
|
|
|
@ -171,7 +171,7 @@ public class FavIconHandler {
|
|||
ImageView imageView = imageViewRef.get();
|
||||
if (imageView != null) {
|
||||
BitmapDrawable bd = (BitmapDrawable) FavIconHandler.GetFavIconFromCache(favIconCache.WEB_URL_TO_FILE, favIconCache.context, feedID);
|
||||
if(lruCache != null)
|
||||
if(lruCache != null && feedID != null && bd != null)
|
||||
lruCache.put(feedID, bd);
|
||||
imageView.setImageDrawable(bd);
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ public class OwnCloudSyncService extends Service {
|
|||
OwnCloud_Reader ocReader = (OwnCloud_Reader) _Reader;
|
||||
SharedPreferences mPrefs = PreferenceManager.getDefaultSharedPreferences(OwnCloudSyncService.this);
|
||||
String username = mPrefs.getString(SettingsActivity.EDT_USERNAME_STRING, "");
|
||||
String password = mPrefs.getString(SettingsActivity.EDT_PASSWORD_STRING, "");
|
||||
String password = mPrefs.getString(SettingsActivity.EDT_PASSWORD_STRING, "");
|
||||
ocReader.Start_AsyncTask_GetVersion(Constants.TaskID_GetVersion, OwnCloudSyncService.this, onAsyncTask_GetVersionFinished, username, password);
|
||||
|
||||
startedSync(SYNC_TYPES.SYNC_TYPE__GET_API);
|
||||
|
@ -83,8 +83,7 @@ public class OwnCloudSyncService extends Service {
|
|||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
|
||||
super.onCreate();
|
||||
Log.d(TAG, "onCreate() called");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue