--- a/build.xml Thu Nov 19 01:14:15 2009 +0100
+++ b/build.xml Thu Nov 19 01:56:33 2009 +0100
@@ -58,4 +58,39 @@
targets are used.
-->
<setup />
+
+ <property name="out.dir" value="bin" />
+ <property name="source.dir" value="src" />
+ <property name="javadoc.output" value="doc/javadoc" />
+ <property name="external.libs.dir" value="libs" />
+
+ <target name="clean"
+ description="Delete old build and dist directories">
+ <delete verbose="false" dir="${out.dir}"/>
+ </target>
+
+ <target name="javadoc">
+ <javadoc author="true" destdir="${javadoc.output}" doctitle="Beem javadoc" source="1.6" sourcepath="${source.dir}" use="true" version="false" bootclasspathref="android.target.classpath">
+ <classpath>
+ <fileset dir="${external.libs.dir}" includes="*.jar" />
+ </classpath>
+ <link href="http://developer.android.com/reference" offline="true" packageListLoc="doc/android"/>
+ <link href="http://www.igniterealtime.org/builds/smack/docs/latest/javadoc" offline="true" packageListLoc="doc/smack"/>
+ <doctitle><![CDATA[<h1>Beem-project.com</h1>]]></doctitle>
+ <bottom><![CDATA[<i>Copyright © 2009 Beem-project.com. All Rights Reserved.</i>]]></bottom>
+ <doclet name="org.umlgraph.doclet.UmlGraphDoc" path="doc/UmlGraph.jar">
+ <param name="-inferrel"/>
+ <param name="-inferdep"/>
+ <param name="-hide" value="java.*"/>
+ <param name="-collpackages" value="java.util.*"/>
+ <param name="-qualify"/>
+ <param name="-types"/>
+ <param name="-visibility"/>
+ <param name="-postfixpackage"/>
+ <param name="-nodefontsize" value="9"/>
+ <param name="-nodefontpackagesize" value="7"/>
+ </doclet>
+ </javadoc>
+ </target>
+
</project>
--- a/javadoc.xml Thu Nov 19 01:14:15 2009 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<project default="javadoc">
- <property file="local.properties"/>
- <target name="javadoc">
- <javadoc access="private" author="true" classpath="${sdk-location}/platforms/android-1.5/android.jar:libs/smackx-jingle.jar:libs/smackx-debug.jar:libs/security.jar:libs/smack.jar:libs/smackx.jar:libs/jlibrtp.jar" destdir="doc" doctitle="Beem javadoc" nodeprecated="true" nodeprecatedlist="true" noindex="false" nonavbar="false" notree="false" packagenames="com.beem.project.beem.provider,com.beem.project.beem.ui,com.beem.project.beem.utils,com.beem.project.beem.jingle.demo,com.beem.project.beem.jingle" source="1.6" sourcefiles="src/com/beem/project/beem/service/XmppFacade.java,src/com/beem/project/beem/package-info.java,src/com/beem/project/beem/service/ChatAdapter.java,src/com/beem/project/beem/service/PrivacyListManagerAdapter.java,src/com/beem/project/beem/service/RosterAdapter.java,src/com/beem/project/beem/service/Contact.java,src/com/beem/project/beem/service/BeemChatManager.java,src/com/beem/project/beem/service/package-info.java,src/com/beem/project/beem/service/Message.java,src/com/beem/project/beem/service/XmppConnectionAdapter.java,src/com/beem/project/beem/service/PresenceAdapter.java,src/com/beem/project/beem/BeemService.java" sourcepath="src" splitindex="true" use="true" version="false">
- <link href="http://developer.android.com/reference" offline="true" packageListLoc="doc/android"/>
- <link href="http://www.igniterealtime.org/builds/smack/docs/latest/javadoc" offline="true" packageListLoc="doc/smack"/>
- <doctitle><![CDATA[<h1>Beem-project.com</h1>]]></doctitle>
- <bottom><![CDATA[<i>Copyright © 2009 Beem-project.com. All Rights Reserved.</i>]]></bottom>
- <doclet name="org.umlgraph.doclet.UmlGraphDoc" path="doc/UmlGraph.jar">
- <param name="-inferrel"/>
- <param name="-inferdep"/>
- <param name="-hide" value="java.*"/>
- <param name="-collpackages" value="java.util.*"/>
- <param name="-qualify"/>
- <param name="-types"/>
- <!--<param name="-operations"/>
- <param name="-attributes"/>-->
- <param name="-visibility"/>
- <param name="-postfixpackage"/>
- <param name="-nodefontsize" value="9"/>
- <param name="-nodefontpackagesize" value="7"/>
- </doclet>
- </javadoc>
- </target>
-</project>
--- a/src/com/beem/project/beem/service/XmppConnectionAdapter.java Thu Nov 19 01:14:15 2009 +0100
+++ b/src/com/beem/project/beem/service/XmppConnectionAdapter.java Thu Nov 19 01:56:33 2009 +0100
@@ -28,9 +28,9 @@
import com.beem.project.beem.service.aidl.IChatManager;
import com.beem.project.beem.service.aidl.IRoster;
import com.beem.project.beem.service.aidl.IXmppConnection;
-import com.beem.project.beem.ui.ChangeStatus;
import com.beem.project.beem.ui.Subscription;
import com.beem.project.beem.utils.BeemBroadcastReceiver;
+import com.beem.project.beem.ui.ChangeStatus;
import com.beem.project.beem.utils.Status;
/**
@@ -174,22 +174,23 @@
@Override
public void changeStatusAndPriority(int status, String msg, int priority) {
Presence pres = new Presence(Presence.Type.available);
+ String m;
if (msg != null)
- pres.setStatus(msg);
+ m = msg;
else
- msg = "";
+ m = "";
+ pres.setStatus(m);
Presence.Mode mode = Status.getPresenceModeFromStatus(status);
if (mode != null)
pres.setMode(mode);
// Smack limit : Priority between -128 and 128
- if (priority < -128)
- priority = -128;
- if (priority > 128)
- priority = 128;
- mPreviousPriority = priority;
- pres.setPriority(priority);
+ int p = priority;
+ if (priority < -128) p = -128;
+ if (priority > 128) p = 128;
+ mPreviousPriority = p;
+ pres.setPriority(p);
mAdaptee.sendPacket(pres);
- updateNotification(msg);
+ updateNotification(m);
}
/**
@@ -198,10 +199,12 @@
@Override
public void changeStatus(int status, String msg) {
Presence pres = new Presence(Presence.Type.available);
+ String m;
if (msg != null)
- pres.setStatus(msg);
+ m = msg;
else
- msg = "";
+ m = "";
+ pres.setStatus(m);
Presence.Mode mode = Status.getPresenceModeFromStatus(status);
if (mode != null)
pres.setMode(mode);
@@ -210,6 +213,10 @@
updateNotification(msg);
}
+ /**
+ * Update the notification for the Beem status.
+ * @param text the text to display.
+ */
private void updateNotification(String text) {
Notification mStatusNotification;
mStatusNotification = new Notification(com.beem.project.beem.R.drawable.beem_status_icon, text, System
@@ -217,8 +224,8 @@
mStatusNotification.defaults = Notification.DEFAULT_LIGHTS;
mStatusNotification.flags = Notification.FLAG_NO_CLEAR | Notification.FLAG_ONGOING_EVENT;
- mStatusNotification.setLatestEventInfo(mService, "Beem Status", text, PendingIntent.getActivity(mService, 0,
- new Intent(mService, ChangeStatus.class), 0));
+ mStatusNotification.setLatestEventInfo(mService, "Beem Status", text, PendingIntent.getActivity(
+ mService, 0, new Intent(mService, ChangeStatus.class), 0));
mService.sendNotification(BeemService.NOTIFICATION_STATUS_ID, mStatusNotification);
}
@@ -407,8 +414,8 @@
@Override
public void processPacket(Packet packet) {
String from = packet.getFrom();
- Notification notif = new Notification(android.R.drawable.stat_notify_more, mService.getString(
- R.string.AcceptContactRequest, from), System.currentTimeMillis());
+ Notification notif = new Notification(android.R.drawable.stat_notify_more, mService
+ .getString(R.string.AcceptContactRequest, from), System.currentTimeMillis());
notif.defaults = Notification.DEFAULT_ALL;
notif.flags = Notification.FLAG_AUTO_CANCEL;
Intent intent = new Intent(mService, Subscription.class);
@@ -507,8 +514,8 @@
@Override
public void processPacket(Packet packet) {
String from = packet.getFrom();
- Notification notif = new Notification(android.R.drawable.stat_notify_more, mService.getString(
- R.string.AcceptContactRequest, from), System.currentTimeMillis());
+ Notification notif = new Notification(android.R.drawable.stat_notify_more, mService
+ .getString(R.string.AcceptContactRequest, from), System.currentTimeMillis());
notif.defaults = Notification.DEFAULT_ALL;
notif.flags = Notification.FLAG_AUTO_CANCEL;
Intent intent = new Intent(mService, Subscription.class);