Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/hotfix'
Browse files Browse the repository at this point in the history
  • Loading branch information
tux-mind committed Jan 16, 2016
2 parents 8a29337 + 5a120d7 commit 6d5126b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cSploit/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ android {
minSdkVersion 9
targetSdkVersion 22
versionCode 5
versionName "1.6.3"
versionName "1.6.4"
if(System.getenv("NIGHTLY_BUILD")) {
versionName += "+" + System.getenv("NIGHTLY_BUILD_COMMIT").substring(0, 7)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import android.app.Activity;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
Expand Down Expand Up @@ -68,16 +69,21 @@ private void showToastForStatus(Context context, MsfRpcdService.Status status) {
}

private void updateNotificationForStatus(Context context, MsfRpcdService.Status status) {
NotificationCompat.Builder mBuilder =
NotificationCompat.Builder builder =
new NotificationCompat.Builder(context)
.setSmallIcon(R.drawable.exploit_msf)
.setContentTitle(context.getString(R.string.msf_status))
.setProgress(0, 0, status.inProgress())
.setContentText(context.getString(status.getText()))
.setColor(ContextCompat.getColor(context, status.getColor()));

PendingIntent pendingIntent = PendingIntent.getActivity(context, 0,
new Intent(), PendingIntent.FLAG_UPDATE_CURRENT);

builder.setContentIntent(pendingIntent);

NotificationManager mNotificationManager =
(NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
mNotificationManager.notify(MSF_NOTIFICATION, mBuilder.build());
mNotificationManager.notify(MSF_NOTIFICATION, builder.build());
}
}

0 comments on commit 6d5126b

Please sign in to comment.