Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-client-android
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-client-android
Commits
6d54bbc6
Commit
6d54bbc6
authored
12 years ago
by
Alexandre Savard
Browse files
Options
Downloads
Patches
Plain Diff
#16889: Add SipCall as an argument to launchCallActivity
parent
14323bed
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/com/savoirfairelinux/sflphone/client/CallActivity.java
+56
-1
56 additions, 1 deletion
src/com/savoirfairelinux/sflphone/client/CallActivity.java
src/com/savoirfairelinux/sflphone/client/SFLPhoneHome.java
+5
-2
5 additions, 2 deletions
src/com/savoirfairelinux/sflphone/client/SFLPhoneHome.java
with
61 additions
and
3 deletions
src/com/savoirfairelinux/sflphone/client/CallActivity.java
+
56
−
1
View file @
6d54bbc6
...
...
@@ -32,16 +32,71 @@
package
com.savoirfairelinux.sflphone.client
;
import
android.app.Activity
;
import
android.content.Context
;
import
android.content.ComponentName
;
import
android.content.Intent
;
import
android.content.ServiceConnection
;
import
android.os.Bundle
;
import
android.os.IBinder
;
import
android.os.RemoteException
;
import
android.util.Log
;
import
android.view.View
;
import
android.view.View.OnClickListener
;
import
com.savoirfairelinux.sflphone.R
;
import
com.savoirfairelinux.sflphone.client.SipCall
;
import
com.savoirfairelinux.sflphone.service.ISipService
;
import
com.savoirfairelinux.sflphone.service.SipService
;
public
class
CallActivity
extends
Activity
public
class
CallActivity
extends
Activity
implements
OnClickListener
{
static
final
String
TAG
=
"CallActivity"
;
private
ISipService
service
;
private
SipCall
mCall
;
public
void
CallActivity
(
SipCall
call
)
{
mCall
=
call
;
}
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
call_activity_layout
);
Intent
intent
=
new
Intent
(
this
,
SipService
.
class
);
bindService
(
intent
,
mConnection
,
Context
.
BIND_AUTO_CREATE
);
}
@Override
protected
void
onDestroy
()
{
stopService
(
new
Intent
(
this
,
SipService
.
class
));
super
.
onDestroy
();
}
/** Defines callbacks for service binding, passed to bindService() */
private
ServiceConnection
mConnection
=
new
ServiceConnection
()
{
@Override
public
void
onServiceConnected
(
ComponentName
className
,
IBinder
binder
)
{
service
=
ISipService
.
Stub
.
asInterface
(
binder
);
}
@Override
public
void
onServiceDisconnected
(
ComponentName
arg0
)
{
}
};
@Override
public
void
onClick
(
View
view
)
{
if
(
view
.
getId
()
==
R
.
id
.
buttonhangup
)
{
try
{
service
.
hangUp
(
mCall
.
mCallInfo
.
mCallID
);
}
catch
(
RemoteException
e
)
{
Log
.
e
(
TAG
,
"Cannot call service method"
,
e
);
}
}
}
}
This diff is collapsed.
Click to expand it.
src/com/savoirfairelinux/sflphone/client/SFLPhoneHome.java
+
5
−
2
View file @
6d54bbc6
...
...
@@ -484,7 +484,8 @@ public class SFLPhoneHome extends Activity implements ActionBar.TabListener, OnC
Log.e(TAG, "Cannot call service method", e);
}
*/
launchCallActivity
();
SipCall
call
=
new
SipCall
();
launchCallActivity
(
call
);
}
public
void
processingHangUpAction
()
{
...
...
@@ -512,9 +513,11 @@ public class SFLPhoneHome extends Activity implements ActionBar.TabListener, OnC
buttonCall
.
setImageResource
(
R
.
drawable
.
ic_call
);
}
private
void
launchCallActivity
()
private
void
launchCallActivity
(
SipCall
call
)
{
Log
.
i
(
TAG
,
"Launch Call Activity"
);
Bundle
bundle
=
new
Bundle
();
bundle
.
putString
(
"CallID"
,
call
.
mCallInfo
.
mCallID
);
Intent
intent
=
new
Intent
().
setClass
(
this
,
CallActivity
.
class
);
startActivity
(
intent
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment