Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@
public class LogSenderService extends Service {

private static final int NOTIFICATION_ID = 644;
private static final String NOTIFICATION_CHANNEL_NAME = "LogSender Service";
private static final String NOTIFICATION_TITLE = "LogSender Service";
private static final String NOTIFICATION_TEXT = "Connected to AndroidIDE";
private static final String NOTIFICATION_CHANNEL_ID = "ide.logsender.service";
public static final String ACTION_START_SERVICE = "ide.logsender.service.start";
public static final String ACTION_STOP_SERVICE = "ide.logsender.service.stop";
Expand All @@ -67,7 +64,7 @@ public void onCreate() {
public void onDestroy() {
Logger.debug("[LogSenderService] [onDestroy]");
if (!logSender.isConnected() && !logSender.isBinding()) {
Logger.debug("Not bound to AndroidIDE. Ignored.");
Logger.debug("Not bound to Code On The Go. Ignored.");
} else {
Logger.warn("Service is being destroyed. Destroying log sender...");
logSender.destroy(getApplicationContext());
Expand Down Expand Up @@ -106,7 +103,7 @@ public void onTaskRemoved(Intent rootIntent) {
Logger.debug("[LogSenderService] [onTaskRemoved]", rootIntent);

if (!logSender.isConnected() && !logSender.isBinding()) {
Logger.debug("Not bound to AndroidIDE. Ignored.");
Logger.debug("Not bound to Code On The Go. Ignored.");
return;
}

Expand All @@ -121,7 +118,7 @@ private void actionStartService() {
boolean result = false;
try {
result = logSender.bind(getApplicationContext());
Logger.debug("Bind to AndroidIDE:", result);
Logger.debug("Bind to Code On The Go:", result);
} catch (Exception err) {
Logger.error(getString(R.string.msg_bind_service_failed), err);
}
Expand All @@ -147,9 +144,11 @@ private Notification buildNotification() {

// Build the notification
final Builder builder = new Builder(this);
builder.setContentTitle(NOTIFICATION_TITLE);
builder.setContentText(NOTIFICATION_TEXT);
builder.setStyle(new BigTextStyle().bigText(NOTIFICATION_TEXT));
String title = getString(R.string.notification_title);
String text = getString(R.string.notification_text);
builder.setContentTitle(title);
builder.setContentText(text);
builder.setStyle(new BigTextStyle().bigText(text));
builder.setPriority(priority);

if (VERSION.SDK_INT >= VERSION_CODES.O) {
Expand Down Expand Up @@ -184,7 +183,7 @@ private void setupNotificationChannel() {

NotificationChannel channel = new NotificationChannel(
NOTIFICATION_CHANNEL_ID,
NOTIFICATION_CHANNEL_NAME,
getString(R.string.notification_channel_name),
NotificationManager.IMPORTANCE_LOW);

NotificationManager notificationManager = getSystemService(NotificationManager.class);
Expand Down
5 changes: 4 additions & 1 deletion logsender/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
-->

<resources>
<string name="msg_bind_service_failed">Failed to bind to AndroidIDE</string>
<string name="msg_bind_service_failed">Failed to bind to Code On The Go</string>
<string name="notification_action_exit">Exit</string>
<string name="notification_title">LogSender Service</string>
<string name="notification_text">Connected to Code On The Go</string>
<string name="notification_channel_name">LogSender Service</string>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ abstract class AbstractModelBuilder<P, R> : IModelBuilder<P, R> {
if (agpVersion < MINIMUM_SUPPORTED) {
throw ModelBuilderException(
agpVersion.toString() +
" is not supported by AndroidIDE. " +
" is not supported by Code On The Go. " +
"Please update your project to use at least " +
MINIMUM_SUPPORTED +
" to build this project.",
Expand All @@ -76,7 +76,7 @@ abstract class AbstractModelBuilder<P, R> : IModelBuilder<P, R> {
val syncIssue =
DefaultSyncIssue(
data = "${agpVersion.toStringSimple()}:${ToolingProps.latestTestedAgpVersion.toStringSimple()}",
message = "You are using Android Gradle Plugin version that has not been tested with AndroidIDE.",
message = "You are using Android Gradle Plugin version that has not been tested with Code On The Go.",
multiLineMessage = null,
severity = SyncIssue.SEVERITY_WARNING,
type = IDESyncIssue.TYPE_AGP_VERSION_TOO_NEW,
Expand Down