Skip to content

Commit

Permalink
提交 1.16.2085 的客户端代码
Browse files Browse the repository at this point in the history
  • Loading branch information
yuchting committed May 2, 2013
1 parent bff7d80 commit 2663291
Show file tree
Hide file tree
Showing 144 changed files with 4,042 additions and 2,800 deletions.
7 changes: 5 additions & 2 deletions yuchbox42/BlackBerry_App_Descriptor.xml
@@ -1,15 +1,18 @@
<!-- This file has been generated by the BlackBerry Plugin for Eclipse v3.8.1. -->

<Properties ModelVersion="1.1.2">
<General Title="YuchBox" Version="1.15.1971" Vendor="YuchTing" Description="Push Personal Message for your BlackBerry (Please uninstall former version of YuchBerry)"/>
<General Title="YuchBox" Version="1.16.2085" Vendor="YuchTing" Description="Push Personal Message for your BlackBerry (Please uninstall former YuchBox before 1.12 version)"/>
<Application Type="BlackBerry Application" MainMIDletName="" MainArgs="" HomeScreenPosition="0" StartupTier="7" IsSystemModule="false" IsAutostartup="true"/>
<Resources hasTitleResource="true" TitleResourceBundleName="yblocal" TitleResourceBundleRelativePath="src/local/yblocal.rrh" TitleResourceBundleClassName="local.yblocal" TitleResourceBundleKey="App_Title" DescriptionId="APPLICATION_DESC">
<Icons>
<Icon CanonicalFileName="res/Main_offline.png" IsFocus="false"/>
</Icons>
</Resources>
<KeywordResources KeywordResourceBundleName="" KeywordResourceBundleRelativePath="" KeywordResourceBundleClassName="" KeywordResourceBundleKey=""/>
<Compile OutputCompilerMessages="true" ConvertImages="false" CreateWarningForNoExportedRoutine="true" CompressResources="false" AliasList="YuchBox_client">
<PreprocessorDefines/>
</Compile>
<Packaging OutputFileName="yuchbox" OutputFolder="deliverables" PreBuildStep="" PostBuildStep="" CleanStep="" GenerateALXFile="true">
<Packaging PreBuildStep="" PostBuildStep="" CleanStep="" OutputFileName="yuchbox" OutputFolder="deliverables" GenerateALXFile="true">
<AlxFiles/>
</Packaging>
<HiddenProperties>
Expand Down
Binary file modified yuchbox42/res/state_images.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Expand Up @@ -247,10 +247,7 @@ public synchronized void sendNextFile(int _attachIndex){
if(m_attachmentIndex >= m_vFileConnection.size()){

// send over
//
//m_sendCallback.sendProgress(m_sendHashCode, -2, 0, 0);
//m_connect.m_mainApp.SetUploadingDesc(m_sendMail,-2,0,0);

//
m_sendCallback.sendFinish();
m_closeState = true;
}
Expand Down Expand Up @@ -378,7 +375,6 @@ public void run(){
if(t_sendOver){
try{
sleep(90 * 1000);

t_sendFileCreate = false;

}catch(Exception e){
Expand Down
Expand Up @@ -117,7 +117,7 @@ public void sendFinish(){
t_os.write(fetchMail.NOTHING_STYLE);
}

// does want to copy tu sent folder?
// does want to copy to sent folder?
//
sendReceive.WriteBoolean(t_os,m_connect.m_mainApp.m_copyMailToSentFolder);

Expand Down Expand Up @@ -188,6 +188,7 @@ public void run(){
//
if(t_resend_time++ < 3){
sleep(2 * 60000);
m_connect.m_mainApp.SetErrorString("S:resend again!");
}else{
sendError();
m_connect.m_mainApp.SetErrorString("S:resend 3 time,give up.");
Expand Down
25 changes: 17 additions & 8 deletions yuchbox42/src/com/yuchting/yuchberry/client/connectDeamon.java
Expand Up @@ -695,7 +695,7 @@ private void getRidOfReplyPrefix(Message message){

// get rid of blank
while(true){
if(t_subject.charAt(0) == ' ' && t_subject.length() > 0){
if(t_subject.length() > 0 && t_subject.charAt(0) == ' '){
t_subject = t_subject.substring(1);
}else{
break;
Expand Down Expand Up @@ -1482,7 +1482,10 @@ private SocketConnection GetConnection(boolean _ssl,boolean _useMDS)throws Excep
}else{
m_mainApp.SetErrorString(recvMain.sm_local.getString(yblocalResource.CONNECT_NET_BROKEN_PROMPT));
}
}
}

// trigger net broken notification
m_mainApp.TriggerNetBrokenNotifaction();

}else{
// another exception information
Expand Down Expand Up @@ -2083,7 +2086,13 @@ public void ImportMail(Message m,fetchMail _mail)throws Exception{
String t_sub = m.getSubject();
if(t_sub == null){
_mail.SetSubject(fetchMail.fsm_noSubjectTile);
}else{
}else{

// maybe some system while contain "\r\n " string when subject is multilines
//
t_sub = recvMain.repleaceStr(t_sub, "\r\n ", "");
t_sub = recvMain.repleaceStr(t_sub, "\r", "");
t_sub = recvMain.repleaceStr(t_sub, "\n", "");

_mail.SetSubject(t_sub);
}
Expand Down Expand Up @@ -2137,11 +2146,11 @@ private void findEmailBody(Object obj,fetchMail _mail)throws Exception{
findEmailBody(mp.getBodyPart(count),_mail);
}
}
// else if (obj instanceof TextBodyPart)
// {
// TextBodyPart tbp = (TextBodyPart) obj;
// readEmailBody(tbp,_mail);
// }
else if (obj instanceof TextBodyPart)
{
TextBodyPart tbp = (TextBodyPart) obj;
readEmailBody(tbp,_mail);
}
// else if (obj instanceof MimeBodyPart)
// {
// MimeBodyPart mbp = (MimeBodyPart)obj;
Expand Down
Expand Up @@ -34,10 +34,13 @@

import javax.microedition.io.Connector;
import javax.microedition.io.file.FileConnection;
import javax.microedition.media.control.VolumeControl;

import local.yblocalResource;
import net.rim.blackberry.api.invoke.CameraArguments;
import net.rim.blackberry.api.invoke.Invoke;
import net.rim.device.api.io.IOUtilities;
import net.rim.device.api.media.control.AudioPathControl;
import net.rim.device.api.system.Backlight;
import net.rim.device.api.system.DeviceInfo;
import net.rim.device.api.system.KeypadListener;
Expand Down Expand Up @@ -733,7 +736,7 @@ public void snapOK(byte[] _buffer){
m_snapBuffer = _buffer;
m_imageType = fetchChatMsg.FILE_TYPE_IMG;
}
},m_mainApp.getWeiboUploadSize().x);
},m_mainApp.getWeiboUploadSize());

m_mainApp.pushScreen(m_cameraScreen);
}catch(Exception e){
Expand Down Expand Up @@ -1491,6 +1494,24 @@ public void run(){

p.realize();
p.prefetch();

AudioPathControl apc = null;

Object[] cls = p.getControls();
for(int i = 0;i < cls.length;i++){
if(cls[i] instanceof AudioPathControl){
apc = (AudioPathControl)cls[i];
break;
}
}

if(apc != null){
apc.setAudioPath(AudioPathControl.AUDIO_PATH_HANDSET);
}else{
VolumeControl volume = (VolumeControl)p.getControl("VolumeControl");
volume.setLevel(30);
}

p.start();

sleep(2000);
Expand Down
Expand Up @@ -31,6 +31,7 @@
import net.rim.device.api.ui.Field;
import net.rim.device.api.ui.Graphics;
import net.rim.device.api.ui.Manager;
import net.rim.device.api.ui.component.BasicEditField;
import net.rim.device.api.ui.component.LabelField;
import net.rim.device.api.ui.component.SeparatorField;
import net.rim.device.api.ui.component.BasicEditField;
Expand Down

0 comments on commit 2663291

Please sign in to comment.