Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions RI/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
apply plugin: 'com.android.application'

android {
namespace 'com.gsma.rcs.ri'

//Required to support the old folder structure
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
Expand All @@ -20,12 +20,12 @@ android {
//Required to support builds although lint errors exist
lintOptions {
abortOnError false
disable 'IconLocation'
disable 'IconLocation'
disable 'IconDuplicates'
disable 'IconDuplicatesConfig'
disable 'IconColors'
disable 'IconMissingDensityFolder'
disable 'IconDensities'
disable 'IconDuplicatesConfig'
disable 'IconColors'
disable 'IconMissingDensityFolder'
disable 'IconDensities'
}

compileSdkVersion rootProject.compileSdkVersion
Expand All @@ -42,17 +42,19 @@ android {
}

dependencies {
compile project(':api')
compile project(':api_cnx')
compile project(':mediaplayer')
compile 'com.android.support:support-v4:25.0.1'
compile 'com.google.android.gms:play-services:8.4.0'
implementation project(':api')
implementation project(':api_cnx')
implementation project(':mediaplayer')
implementation 'com.android.support:support-v4:25.0.1'
implementation 'com.google.android.gms:play-services:8.4.0'
}

//Below install dependecy was added to always install RCS service before
//a RCS client to secure that Android handles RCS permissions correctly.
task installServiceFirst(dependsOn: ':core:installDebug') << {
println 'RCS core service was installed first!'
task installServiceFirst(dependsOn: ':core:installDebug') {
doLast {
println 'RCS core service was installed first!'
}
}
tasks.whenTaskAdded { task ->
if (task.name == 'installDebug') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,10 +326,8 @@ public boolean onCreateOptionsMenu(Menu menu) {

@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.menu_close_session:
quitSession();
break;
if (item.getItemId() == R.id.menu_close_session) {
quitSession();
}
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,10 +344,8 @@ public boolean onCreateOptionsMenu(Menu menu) {

@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.menu_close_session:
quitSession();
break;
if (item.getItemId() == R.id.menu_close_session) {
quitSession();
}
return true;
}
Expand Down
158 changes: 69 additions & 89 deletions RI/src/com/gsma/rcs/ri/messaging/GroupTalkView.java
Original file line number Diff line number Diff line change
Expand Up @@ -643,46 +643,40 @@ public boolean onContextItemSelected(MenuItem item) {
Log.d(LOGTAG, "onContextItemSelected Id=".concat(id));
}
try {
switch (item.getItemId()) {
case R.id.menu_view_group_delivery:
GroupDeliveryInfoList.startActivity(this, id);
return true;

case R.id.menu_delete_message:
if (ChatLog.Message.HISTORYLOG_MEMBER_ID == providerId) {
mChatService.deleteMessage(id);
} else {
mFileTransferService.deleteFileTransfer(id);
}
int itemId = item.getItemId();
if (itemId == R.id.menu_view_group_delivery) {
GroupDeliveryInfoList.startActivity(this, id);
return true;
} else if (itemId == R.id.menu_delete_message) {
if (Message.HISTORYLOG_MEMBER_ID == providerId) {
mChatService.deleteMessage(id);
} else {
mFileTransferService.deleteFileTransfer(id);
}
return true;
} else if (itemId == R.id.menu_view_detail) {
if (Message.HISTORYLOG_MEMBER_ID == providerId) {
ChatMessageLogView.startActivity(this, id);
} else {
FileTransferLogView.startActivity(this, id);
}
return true;
} else if (itemId == R.id.menu_display_content) {
if (FileTransferLog.HISTORYLOG_MEMBER_ID == providerId) {
String file = cursor.getString(cursor
.getColumnIndexOrThrow(HistoryLog.CONTENT));
Utils.showPicture(this, Uri.parse(file));
markFileTransferAsRead(cursor, id);
return true;

case R.id.menu_view_detail:
if (ChatLog.Message.HISTORYLOG_MEMBER_ID == providerId) {
ChatMessageLogView.startActivity(this, id);
} else {
FileTransferLogView.startActivity(this, id);
}
}
} else if (itemId == R.id.menu_listen_content) {
if (FileTransferLog.HISTORYLOG_MEMBER_ID == providerId) {
String file = cursor.getString(cursor
.getColumnIndexOrThrow(HistoryLog.CONTENT));
Utils.playAudio(this, Uri.parse(file));
markFileTransferAsRead(cursor, id);
return true;

case R.id.menu_display_content:
if (FileTransferLog.HISTORYLOG_MEMBER_ID == providerId) {
String file = cursor.getString(cursor
.getColumnIndexOrThrow(HistoryLog.CONTENT));
Utils.showPicture(this, Uri.parse(file));
markFileTransferAsRead(cursor, id);
return true;
}
break;

case R.id.menu_listen_content:
if (FileTransferLog.HISTORYLOG_MEMBER_ID == providerId) {
String file = cursor.getString(cursor
.getColumnIndexOrThrow(HistoryLog.CONTENT));
Utils.playAudio(this, Uri.parse(file));
markFileTransferAsRead(cursor, id);
return true;
}
break;
}
}
return super.onContextItemSelected(item);
} catch (RcsServiceException e) {
Expand Down Expand Up @@ -954,59 +948,45 @@ public boolean onPrepareOptionsMenu(Menu menu) {
@Override
public boolean onOptionsItemSelected(MenuItem item) {
try {
switch (item.getItemId()) {
case R.id.menu_insert_smiley:
AlertDialog alert = Smileys.showSmileyDialog(this, mComposeText,
getResources(), getString(R.string.menu_insert_smiley));
registerDialog(alert);
break;

case R.id.menu_participants:
alert = Utils.showList(this, getString(R.string.menu_participants),
getSetOfParticipants(mGroupChat.getParticipants()));
registerDialog(alert);
break;

case R.id.menu_add_participant:
addParticipants();
break;

case R.id.menu_quicktext:
addQuickText();
break;

case R.id.menu_send_file:
SendGroupFile.startActivity(this, mChatId);
break;

case R.id.menu_send_geoloc:
getGeoLoc();
break;

case R.id.menu_showus_map:
DisplayGeoloc.showContactsOnMap(this, mGroupChat.getParticipants().keySet());
break;

case R.id.menu_close_session:
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle(R.string.title_chat_exit);
builder.setPositiveButton(R.string.label_ok,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
if (mGroupChat != null) {
try {
mGroupChat.leave();
} catch (RcsServiceException e) {
showExceptionThenExit(e);
}
int itemId = item.getItemId();
if (itemId == R.id.menu_insert_smiley) {
AlertDialog alert = Smileys.showSmileyDialog(this, mComposeText,
getResources(), getString(R.string.menu_insert_smiley));
registerDialog(alert);
} else if (itemId == R.id.menu_participants) {
AlertDialog alert;
alert = Utils.showList(this, getString(R.string.menu_participants),
getSetOfParticipants(mGroupChat.getParticipants()));
registerDialog(alert);
} else if (itemId == R.id.menu_add_participant) {
addParticipants();
} else if (itemId == R.id.menu_quicktext) {
addQuickText();
} else if (itemId == R.id.menu_send_file) {
SendGroupFile.startActivity(this, mChatId);
} else if (itemId == R.id.menu_send_geoloc) {
getGeoLoc();
} else if (itemId == R.id.menu_showus_map) {
DisplayGeoloc.showContactsOnMap(this, mGroupChat.getParticipants().keySet());
} else if (itemId == R.id.menu_close_session) {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle(R.string.title_chat_exit);
builder.setPositiveButton(R.string.label_ok,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
if (mGroupChat != null) {
try {
mGroupChat.leave();
} catch (RcsServiceException e) {
showExceptionThenExit(e);
}
GroupTalkView.this.finish();
}
});
builder.setNegativeButton(R.string.label_cancel, null);
builder.setCancelable(true);
registerDialog(builder.show());
break;
GroupTalkView.this.finish();
}
});
builder.setNegativeButton(R.string.label_cancel, null);
builder.setCancelable(true);
registerDialog(builder.show());
}

} catch (RcsServiceException e) {
Expand Down
Loading