mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Show spinner when quitting, don't show time in ongoing notification.
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user