Skip to content
Snippets Groups Projects
Commit 63a520ba authored by akwizgran's avatar akwizgran
Browse files

Show spinner when quitting, don't show time in ongoing notification.

parent e15731a8
No related branches found
No related tags found
No related merge requests found
......@@ -47,6 +47,7 @@ public class BriarService extends RoboService {
b.setSmallIcon(R.drawable.notification_icon);
b.setContentTitle(getText(R.string.notification_title));
b.setContentText(getText(R.string.notification_text));
b.setWhen(0); // Don't show the time
// Touch the notification to quit
Intent i = new Intent(this, HomeScreenActivity.class);
i.addFlags(FLAG_ACTIVITY_CLEAR_TOP);
......
......@@ -46,14 +46,6 @@ public class HomeScreenActivity extends BriarActivity {
// If this activity was launched from the notification bar, quit
if(getIntent().getBooleanExtra("net.sf.briar.QUIT", false)) {
LinearLayout layout = new LinearLayout(this);
layout.setLayoutParams(new LinearLayout.LayoutParams(MATCH_PARENT,
MATCH_PARENT));
layout.setGravity(CENTER);
ProgressBar spinner = new ProgressBar(this);
spinner.setIndeterminate(true);
layout.addView(spinner);
setContentView(layout);
quit();
} else {
ListView.LayoutParams matchParent = new ListView.LayoutParams(
......@@ -173,6 +165,14 @@ public class HomeScreenActivity extends BriarActivity {
}
private void quit() {
LinearLayout layout = new LinearLayout(this);
layout.setLayoutParams(new LinearLayout.LayoutParams(MATCH_PARENT,
MATCH_PARENT));
layout.setGravity(CENTER);
ProgressBar spinner = new ProgressBar(this);
spinner.setIndeterminate(true);
layout.addView(spinner);
setContentView(layout);
new Thread() {
@Override
public void run() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment