* #36914: New navigation working
This commit impacts the whole structure app, because we now have
nested Fragments. To keep retro-compatibility, we switched from normal
Fragment to Fragment from the support library.
diff --git a/src/org/sflphone/fragments/AboutFragment.java b/src/org/sflphone/fragments/AboutFragment.java
index 32bf957..97692ea 100644
--- a/src/org/sflphone/fragments/AboutFragment.java
+++ b/src/org/sflphone/fragments/AboutFragment.java
@@ -2,8 +2,8 @@
import org.sflphone.R;
-import android.app.Fragment;
import android.os.Bundle;
+import android.support.v4.app.Fragment;
import android.text.Html;
import android.text.method.LinkMovementMethod;
import android.view.LayoutInflater;
@@ -12,23 +12,17 @@
import android.widget.TextView;
public class AboutFragment extends Fragment {
-
+
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {
View inflatedView = inflater.inflate(R.layout.frag_about, parent, false);
-
-
-
TextView link = (TextView) inflatedView.findViewById(R.id.web_site);
- String linkText = "<a href='http://sflphone.org/'>"+getResources().getString(R.string.web_site)+"</a>";
+ String linkText = "<a href='http://sflphone.org/'>" + getResources().getString(R.string.web_site) + "</a>";
link.setText(Html.fromHtml(linkText));
link.setMovementMethod(LinkMovementMethod.getInstance());
getActivity().getActionBar().setTitle(R.string.menu_item_about);
return inflatedView;
}
-
-
-
}
diff --git a/src/org/sflphone/fragments/AccountsManagementFragment.java b/src/org/sflphone/fragments/AccountsManagementFragment.java
index bc0b2d5..379f711 100644
--- a/src/org/sflphone/fragments/AccountsManagementFragment.java
+++ b/src/org/sflphone/fragments/AccountsManagementFragment.java
@@ -50,14 +50,13 @@
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.app.Activity;
-import android.app.ListFragment;
-import android.app.LoaderManager.LoaderCallbacks;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
-import android.content.Loader;
import android.os.Bundle;
import android.os.RemoteException;
+import android.support.v4.app.ListFragment;
+import android.support.v4.app.LoaderManager.LoaderCallbacks;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
@@ -204,38 +203,11 @@
intentFilter2.addAction(ConfigurationManagerCallback.ACCOUNT_STATE_CHANGED);
intentFilter2.addAction(ConfigurationManagerCallback.ACCOUNTS_CHANGED);
getActivity().registerReceiver(accountReceiver, intentFilter2);
- getActivity().getLoaderManager().restartLoader(LoaderConstants.ACCOUNTS_LOADER, null, this);
+ getActivity().getSupportLoaderManager().restartLoader(LoaderConstants.ACCOUNTS_LOADER, null, this);
}
- @Override
- public Loader<Bundle> onCreateLoader(int id, Bundle args) {
- AccountsLoader l = new AccountsLoader(getActivity(), mCallbacks.getService());
- l.forceLoad();
-
- return l;
- }
-
- @Override
- public void onLoadFinished(Loader<Bundle> loader, Bundle results) {
- mAccountsAdapter.removeAll();
- ArrayList<Account> tmp = results.getParcelableArrayList(AccountsLoader.ACCOUNTS);
- ip2ip = results.getParcelable(AccountsLoader.ACCOUNT_IP2IP);
- mAccountsAdapter.addAll(tmp);
- mIP2IPAdapter.removeAll();
- mIP2IPAdapter.insert(ip2ip, 0);
- if (mAccountsAdapter.isEmpty()) {
- mDnDListView.setEmptyView(getView().findViewById(R.id.empty_account_list));
- }
- crossfade();
- }
-
- @Override
- public void onLoaderReset(Loader<Bundle> arg0) {
- // TODO Auto-generated method stub
-
- }
@Override
public void onCreateOptionsMenu(Menu m, MenuInflater inf) {
@@ -271,7 +243,7 @@
@Override
public void accountsChanged() {
if (getActivity() != null)
- getActivity().getLoaderManager().restartLoader(LoaderConstants.ACCOUNTS_LOADER, null, this);
+ getActivity().getSupportLoaderManager().restartLoader(LoaderConstants.ACCOUNTS_LOADER, null, this);
}
@Override
@@ -444,4 +416,33 @@
}
});
}
+
+ @Override
+ public void onLoadFinished(android.support.v4.content.Loader<Bundle> arg0, Bundle results) {
+ mAccountsAdapter.removeAll();
+ ArrayList<Account> tmp = results.getParcelableArrayList(AccountsLoader.ACCOUNTS);
+ ip2ip = results.getParcelable(AccountsLoader.ACCOUNT_IP2IP);
+ mAccountsAdapter.addAll(tmp);
+ mIP2IPAdapter.removeAll();
+ mIP2IPAdapter.insert(ip2ip, 0);
+ if (mAccountsAdapter.isEmpty()) {
+ mDnDListView.setEmptyView(getView().findViewById(R.id.empty_account_list));
+ }
+ crossfade();
+ }
+
+ @Override
+ public void onLoaderReset(android.support.v4.content.Loader<Bundle> arg0) {
+ // TODO Stub de la méthode généré automatiquement
+
+ }
+
+ @Override
+ public android.support.v4.content.Loader<Bundle> onCreateLoader(int arg0, Bundle arg1) {
+ AccountsLoader l = new AccountsLoader(getActivity(), mCallbacks.getService());
+
+ l.forceLoad();
+
+ return l;
+ }
}
diff --git a/src/org/sflphone/fragments/AdvancedAccountFragment.java b/src/org/sflphone/fragments/AdvancedAccountFragment.java
index 5581b03..b98d90e 100644
--- a/src/org/sflphone/fragments/AdvancedAccountFragment.java
+++ b/src/org/sflphone/fragments/AdvancedAccountFragment.java
@@ -1,3 +1,33 @@
+/*
+ * Copyright (C) 2004-2013 Savoir-Faire Linux Inc.
+ *
+ * Author: Alexandre Lision <alexandre.lision@savoirfairelinux.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * Additional permission under GNU GPL version 3 section 7:
+ *
+ * If you modify this program, or any covered work, by linking or
+ * combining it with the OpenSSL project's OpenSSL library (or a
+ * modified version of that library), containing parts covered by the
+ * terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc.
+ * grants you additional permission to convey the resulting work.
+ * Corresponding Source for a non-source form of such a combination
+ * shall include the source code for the parts of OpenSSL used as well
+ * as that of the covered work.
+ */
package org.sflphone.fragments;
import java.net.NetworkInterface;
diff --git a/src/org/sflphone/fragments/CallListFragment.java b/src/org/sflphone/fragments/CallListFragment.java
index e25f92f..23378ad 100644
--- a/src/org/sflphone/fragments/CallListFragment.java
+++ b/src/org/sflphone/fragments/CallListFragment.java
@@ -42,7 +42,6 @@
import org.sflphone.service.ISipService;
import android.app.Activity;
-import android.app.Fragment;
import android.content.ClipData;
import android.content.ClipData.Item;
import android.content.Context;
@@ -53,6 +52,7 @@
import android.os.RemoteException;
import android.os.SystemClock;
import android.os.Vibrator;
+import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.DragEvent;
import android.view.LayoutInflater;
@@ -378,7 +378,7 @@
b.putParcelable("call_targeted", target);
dialog.setArguments(b);
dialog.setTargetFragment(CallListFragment.this, 0);
- dialog.show(getFragmentManager(), "dialog");
+ dialog.show(getChildFragmentManager(), "dialog");
// view.setBackgroundColor(Color.WHITE);
// v.setBackgroundColor(Color.BLACK);
diff --git a/src/org/sflphone/fragments/DetailsHistoryEntryFragment.java b/src/org/sflphone/fragments/DetailsHistoryEntryFragment.java
index 72b990a..3cd2027 100644
--- a/src/org/sflphone/fragments/DetailsHistoryEntryFragment.java
+++ b/src/org/sflphone/fragments/DetailsHistoryEntryFragment.java
@@ -34,8 +34,6 @@
import java.io.InvalidObjectException;
import java.util.ArrayList;
import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
import java.util.NavigableMap;
import org.sflphone.R;
@@ -52,7 +50,6 @@
import android.content.Context;
import android.os.Bundle;
import android.os.RemoteException;
-import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.MeasureSpec;
@@ -71,6 +68,7 @@
DetailHistoryAdapter mAdapter;
HistoryEntry toDisplay;
+ @SuppressWarnings("unused")
private static final String TAG = DetailsHistoryEntryFragment.class.getSimpleName();
ContactPictureTask tasker;
diff --git a/src/org/sflphone/fragments/DialingFragment.java b/src/org/sflphone/fragments/DialingFragment.java
index 21a8223..8ac33bb 100644
--- a/src/org/sflphone/fragments/DialingFragment.java
+++ b/src/org/sflphone/fragments/DialingFragment.java
@@ -38,10 +38,10 @@
import org.sflphone.views.ClearableEditText;
import android.app.Activity;
-import android.app.Fragment;
import android.content.Context;
import android.os.Bundle;
import android.os.RemoteException;
+import android.support.v4.app.Fragment;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.KeyEvent;
diff --git a/src/org/sflphone/fragments/DropActionsChoice.java b/src/org/sflphone/fragments/DropActionsChoice.java
index 75d39ee..3ee617e 100644
--- a/src/org/sflphone/fragments/DropActionsChoice.java
+++ b/src/org/sflphone/fragments/DropActionsChoice.java
@@ -35,10 +35,10 @@
import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.DialogFragment;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
+import android.support.v4.app.DialogFragment;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
diff --git a/src/org/sflphone/fragments/FileExplorerDFragment.java b/src/org/sflphone/fragments/FileExplorerDFragment.java
index f3308a7..9cccb5c 100644
--- a/src/org/sflphone/fragments/FileExplorerDFragment.java
+++ b/src/org/sflphone/fragments/FileExplorerDFragment.java
@@ -1,3 +1,33 @@
+/*
+ * Copyright (C) 2004-2013 Savoir-Faire Linux Inc.
+ *
+ * Author: Alexandre Lision <alexandre.lision@savoirfairelinux.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * Additional permission under GNU GPL version 3 section 7:
+ *
+ * If you modify this program, or any covered work, by linking or
+ * combining it with the OpenSSL project's OpenSSL library (or a
+ * modified version of that library), containing parts covered by the
+ * terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc.
+ * grants you additional permission to convey the resulting work.
+ * Corresponding Source for a non-source form of such a combination
+ * shall include the source code for the parts of OpenSSL used as well
+ * as that of the covered work.
+ */
package org.sflphone.fragments;
import java.io.File;
diff --git a/src/org/sflphone/fragments/GeneralAccountFragment.java b/src/org/sflphone/fragments/GeneralAccountFragment.java
index 0800876..7d3a2c7 100644
--- a/src/org/sflphone/fragments/GeneralAccountFragment.java
+++ b/src/org/sflphone/fragments/GeneralAccountFragment.java
@@ -1,3 +1,33 @@
+/*
+ * Copyright (C) 2004-2013 Savoir-Faire Linux Inc.
+ *
+ * Author: Alexandre Lision <alexandre.lision@savoirfairelinux.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * Additional permission under GNU GPL version 3 section 7:
+ *
+ * If you modify this program, or any covered work, by linking or
+ * combining it with the OpenSSL project's OpenSSL library (or a
+ * modified version of that library), containing parts covered by the
+ * terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc.
+ * grants you additional permission to convey the resulting work.
+ * Corresponding Source for a non-source form of such a combination
+ * shall include the source code for the parts of OpenSSL used as well
+ * as that of the covered work.
+ */
package org.sflphone.fragments;
import org.sflphone.R;
diff --git a/src/org/sflphone/fragments/HelpGesturesFragment.java b/src/org/sflphone/fragments/HelpGesturesFragment.java
deleted file mode 100644
index 81977be..0000000
--- a/src/org/sflphone/fragments/HelpGesturesFragment.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package org.sflphone.fragments;
-
-import org.sflphone.R;
-
-import android.app.Fragment;
-import android.os.Bundle;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-
-public class HelpGesturesFragment extends Fragment {
-
- @Override
- public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {
- View inflatedView = inflater.inflate(R.layout.frag_gestures, parent, false);
-
- return inflatedView;
- }
-
-}
diff --git a/src/org/sflphone/fragments/HistoryFragment.java b/src/org/sflphone/fragments/HistoryFragment.java
index f602020..e2df862 100644
--- a/src/org/sflphone/fragments/HistoryFragment.java
+++ b/src/org/sflphone/fragments/HistoryFragment.java
@@ -43,13 +43,12 @@
import org.sflphone.service.ISipService;
import android.app.Activity;
-import android.app.ListFragment;
-import android.app.LoaderManager.LoaderCallbacks;
import android.content.Context;
import android.content.Intent;
-import android.content.Loader;
import android.os.Bundle;
import android.os.RemoteException;
+import android.support.v4.app.ListFragment;
+import android.support.v4.app.LoaderManager.LoaderCallbacks;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
@@ -57,14 +56,11 @@
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
-import android.widget.AdapterView.OnItemLongClickListener;
import android.widget.BaseAdapter;
import android.widget.Button;
import android.widget.ImageButton;
-import android.widget.ImageView;
import android.widget.ListAdapter;
import android.widget.TextView;
-import android.widget.Toast;
public class HistoryFragment extends ListFragment implements LoaderCallbacks<ArrayList<HistoryEntry>> {
@@ -157,29 +153,6 @@
mCallbacks.onCallDialed(mAdapter.getItem(position).getNumber());
}
- @Override
- public Loader<ArrayList<HistoryEntry>> onCreateLoader(int id, Bundle args) {
-
- HistoryLoader loader = new HistoryLoader(getActivity(), mCallbacks.getService());
- loader.forceLoad();
- return loader;
-
- }
-
- @Override
- public void onLoadFinished(Loader<ArrayList<HistoryEntry>> arg0, ArrayList<HistoryEntry> history) {
- mAdapter.clear();
- mAdapter.addAll(history);
- mAdapter.notifyDataSetChanged();
-
- }
-
- @Override
- public void onLoaderReset(Loader<ArrayList<HistoryEntry>> arg0) {
- // TODO Auto-generated method stub
-
- }
-
public class HistoryAdapter extends BaseAdapter implements ListAdapter {
Context mContext;
@@ -303,4 +276,24 @@
}
+ @Override
+ public android.support.v4.content.Loader<ArrayList<HistoryEntry>> onCreateLoader(int arg0, Bundle arg1) {
+ HistoryLoader loader = new HistoryLoader(getActivity(), mCallbacks.getService());
+ loader.forceLoad();
+ return loader;
+ }
+
+ @Override
+ public void onLoadFinished(android.support.v4.content.Loader<ArrayList<HistoryEntry>> arg0, ArrayList<HistoryEntry> history) {
+ mAdapter.clear();
+ mAdapter.addAll(history);
+ mAdapter.notifyDataSetChanged();
+ }
+
+ @Override
+ public void onLoaderReset(android.support.v4.content.Loader<ArrayList<HistoryEntry>> arg0) {
+ // TODO Stub de la méthode généré automatiquement
+
+ }
+
}
diff --git a/src/org/sflphone/fragments/HomeFragment.java b/src/org/sflphone/fragments/HomeFragment.java
index 7086f72..4973792 100644
--- a/src/org/sflphone/fragments/HomeFragment.java
+++ b/src/org/sflphone/fragments/HomeFragment.java
@@ -1,3 +1,33 @@
+/*
+ * Copyright (C) 2004-2013 Savoir-Faire Linux Inc.
+ *
+ * Author: Alexandre Lision <alexandre.lision@savoirfairelinux.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * Additional permission under GNU GPL version 3 section 7:
+ *
+ * If you modify this program, or any covered work, by linking or
+ * combining it with the OpenSSL project's OpenSSL library (or a
+ * modified version of that library), containing parts covered by the
+ * terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc.
+ * grants you additional permission to convey the resulting work.
+ * Corresponding Source for a non-source form of such a combination
+ * shall include the source code for the parts of OpenSSL used as well
+ * as that of the covered work.
+ */
package org.sflphone.fragments;
import org.sflphone.R;
@@ -5,9 +35,9 @@
import org.sflphone.views.PagerSlidingTabStrip;
import android.app.Activity;
-import android.app.Fragment;
import android.content.Intent;
import android.os.Bundle;
+import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.view.LayoutInflater;
import android.view.View;
@@ -38,7 +68,7 @@
//FIXME : getFragmentManager does not handle nested fragments, pages are not saved!
- mSectionsPagerAdapter = new SectionsPagerAdapter(getActivity(), getFragmentManager());
+ mSectionsPagerAdapter = new SectionsPagerAdapter(getActivity(), getChildFragmentManager());
getActivity().getActionBar().setTitle(R.string.menu_item_home);
}
diff --git a/src/org/sflphone/fragments/IMFragment.java b/src/org/sflphone/fragments/IMFragment.java
index 777aaaf..f3195f4 100644
--- a/src/org/sflphone/fragments/IMFragment.java
+++ b/src/org/sflphone/fragments/IMFragment.java
@@ -1,3 +1,33 @@
+/*
+ * Copyright (C) 2004-2013 Savoir-Faire Linux Inc.
+ *
+ * Author: Alexandre Lision <alexandre.lision@savoirfairelinux.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * Additional permission under GNU GPL version 3 section 7:
+ *
+ * If you modify this program, or any covered work, by linking or
+ * combining it with the OpenSSL project's OpenSSL library (or a
+ * modified version of that library), containing parts covered by the
+ * terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc.
+ * grants you additional permission to convey the resulting work.
+ * Corresponding Source for a non-source form of such a combination
+ * shall include the source code for the parts of OpenSSL used as well
+ * as that of the covered work.
+ */
package org.sflphone.fragments;
import org.sflphone.R;
diff --git a/src/org/sflphone/fragments/MenuFragment.java b/src/org/sflphone/fragments/MenuFragment.java
index 24693fe..3bc51e4 100644
--- a/src/org/sflphone/fragments/MenuFragment.java
+++ b/src/org/sflphone/fragments/MenuFragment.java
@@ -45,14 +45,13 @@
import org.sflphone.service.ISipService;
import android.app.Activity;
-import android.app.Fragment;
-import android.app.LoaderManager.LoaderCallbacks;
import android.content.Intent;
import android.content.IntentFilter;
-import android.content.Loader;
import android.os.Bundle;
import android.os.RemoteException;
import android.provider.ContactsContract.Profile;
+import android.support.v4.app.Fragment;
+import android.support.v4.app.LoaderManager.LoaderCallbacks;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -200,25 +199,7 @@
return mAccountAdapter.getSelectedAccount();
}
- @Override
- public Loader<Bundle> onCreateLoader(int id, Bundle args) {
- AccountsLoader l = new AccountsLoader(getActivity(), mCallbacks.getService());
- l.forceLoad();
- return l;
- }
- @Override
- public void onLoadFinished(Loader<Bundle> loader, Bundle bun) {
- mAccountAdapter.removeAll();
- ArrayList<Account> accounts = bun.getParcelableArrayList(AccountsLoader.ACCOUNTS);
- mAccountAdapter.addAll(accounts);
- }
-
- @Override
- public void onLoaderReset(Loader<Bundle> arg0) {
- // TODO Auto-generated method stub
-
- }
/**
* Called by activity to pass a reference to sipservice to Fragment.
@@ -231,7 +212,7 @@
public void updateAllAccounts() {
if (getActivity() != null)
- getActivity().getLoaderManager().restartLoader(LoaderConstants.ACCOUNTS_LOADER, null, this);
+ getActivity().getSupportLoaderManager().restartLoader(LoaderConstants.ACCOUNTS_LOADER, null, this);
}
public void updateAccount(Intent accountState) {
@@ -251,4 +232,25 @@
}
+ @Override
+ public android.support.v4.content.Loader<Bundle> onCreateLoader(int arg0, Bundle arg1) {
+ AccountsLoader l = new AccountsLoader(getActivity(), mCallbacks.getService());
+ l.forceLoad();
+ return l;
+ }
+
+ @Override
+ public void onLoadFinished(android.support.v4.content.Loader<Bundle> arg0, Bundle bun) {
+ mAccountAdapter.removeAll();
+ ArrayList<Account> accounts = bun.getParcelableArrayList(AccountsLoader.ACCOUNTS);
+ mAccountAdapter.addAll(accounts);
+
+ }
+
+ @Override
+ public void onLoaderReset(android.support.v4.content.Loader<Bundle> arg0) {
+ // TODO Stub de la méthode généré automatiquement
+
+ }
+
}
diff --git a/src/org/sflphone/fragments/SecurityAccountFragment.java b/src/org/sflphone/fragments/SecurityAccountFragment.java
index f4bbb0d..c4527fe 100644
--- a/src/org/sflphone/fragments/SecurityAccountFragment.java
+++ b/src/org/sflphone/fragments/SecurityAccountFragment.java
@@ -1,3 +1,34 @@
+/*
+ * Copyright (C) 2004-2013 Savoir-Faire Linux Inc.
+ *
+ * Author: Alexandre Lision <alexandre.lision@savoirfairelinux.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * Additional permission under GNU GPL version 3 section 7:
+ *
+ * If you modify this program, or any covered work, by linking or
+ * combining it with the OpenSSL project's OpenSSL library (or a
+ * modified version of that library), containing parts covered by the
+ * terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc.
+ * grants you additional permission to convey the resulting work.
+ * Corresponding Source for a non-source form of such a combination
+ * shall include the source code for the parts of OpenSSL used as well
+ * as that of the covered work.
+ */
+
package org.sflphone.fragments;
import java.util.Locale;
@@ -72,7 +103,7 @@
@Override
public void onResume() {
super.onResume();
-
+
}
@Override
@@ -104,11 +135,10 @@
// });
}
-
- public void setCredentialSummary(){
+
+ public void setCredentialSummary() {
findPreference("Credential.count").setSummary("" + mCallbacks.getAccount().getCredentials().size());
}
-
private void setSrtpPreferenceDetails(AccountDetailSrtp details) {