[XPERIA X8 Themes and Apps] AChep:
something like this? :D

package com.achep.stopwatch;

import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.Service;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.content.res.Resources;
import android.os.Build;
import android.os.Handler;
import android.os.IBinder;
import android.preference.PreferenceManager;
import android.widget.RemoteViews;

public class ServiceStopwatchNotification extends Service implements
OnSharedPreferenceChangeListener {

private Broadcast mReceiver;

/**
* Layout уведомления секундомера
*/
private RemoteViews stopwatchRemoteViews;

/**
* Layout большого уведомления секундомера
*/
private RemoteViews stopwatchBigRemoteViews;

/**
* Менеджер уведомлений
*/
private NotificationManager notificationManager;

/**
* Секундомер работает?
*/
private boolean stopwatchRunning;

/**
* Уведомление секундомера
*/
private Notification stopwatchNotification;

/**
* "Мягкое" обновление текста
*/
private long stopwatchDaysLast = -1, stopwatchHoursLast = -1,
stopwatchMinsLast = -1;

/**
* Что-то хорошее от секундомера
*/
private long stopwatchStartTime;

/**
* Что-то хорошее от секундомера
*/
private long stopwatchPauseTime;

/**
* Полное время секундомера (вместе с кругами)
*/
private long stopwatchFullTime;

/**
* Отображать полное время или только время круга
*/
private boolean stopwatchTimeViewMode;

/**
* Текстовые обозначения (часы, дни)
*/
private String[] textLabels;

/**
* Jelly Bean
*/
private boolean JellyBean;
private boolean HoneyComb;

/**
* Нажата кнопка "Закрыть" на уведомлении
*/
private static final String ACTION_STOPWATCH_COLLAPSE = "com.achep.ACTION_STOPWATCH_NOTIFICATION_COLLAPSE";

/**
* Нажата кнопка "Старт/Пауза" на уведомлении
*/
private static final String ACTION_STOPWATCH_CONTROLLER = "com.achep.ACTION_STOPWATCH_NOTIFICATION_CONTROLLER";

/**
* Нажата кнопка "Старт/Пауза" на уведомлении
*/
private static final String ACTION_STOPWATCH_LAP = "com.achep.ACTION_STOPWATCH_NOTIFICATION_LAP";

/**
* Нажата кнопка "Старт/Пауза" на уведомлении
*/
public static final String ACTION_STOPWATCH_STOP_SERVICE = "com.achep.ACTION_STOPWATCH_NOTIFICATION_STOP_SERVICE";

/**
* Номер уведомления секундомера
*/
private static final int STOPWATCH = 1;

private SharedPreferences.Editor stopwatchData;

@Override
public void onCreate() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
HoneyComb = true;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN)
JellyBean = true;
}

mReceiver = new Broadcast();
IntentFilter filter = new IntentFilter(Intent.ACTION_SCREEN_OFF);
if (HoneyComb) {
filter.addAction(ACTION_STOPWATCH_CONTROLLER);
filter.addAction(ACTION_STOPWATCH_STOP_SERVICE);
if (JellyBean)
filter.addAction(ACTION_STOPWATCH_LAP);
filter.addAction(ACTION_STOPWATCH_COLLAPSE);
}
filter.addAction(Intent.ACTION_SCREEN_ON);
registerReceiver(mReceiver, filter);

notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
final Resources res = getResources();
textLabels = new String[] { res.getString(R.string.time_hour1),
res.getString(R.string.time_hour2),
res.getString(R.string.time_hour3),
res.getString(R.string.time_day1),
res.getString(R.string.time_day2),
res.getString(R.string.time_day3) };

// Load preferences
PreferenceManager.getDefaultSharedPreferences(this)
.registerOnSharedPreferenceChangeListener(this);

SharedPreferences sharedPreferences = PreferenceManager
.getDefaultSharedPreferences(this);
stopwatchData = sharedPreferences.edit();
if (sharedPreferences.getBoolean(
Utils.KEY_STOPWATCH_NOTIFICATIONS_ENABLED, true)) {

// Тип вывода времени
stopwatchTimeViewMode = sharedPreferences.getBoolean(
Utils.KEY_STOPWATCH_MODE, true);

// Создание и настройка удаленных view'ов
stopwatchRemoteViews = newRemoteViews(R.layout.notification);
if (HoneyComb) {
if (JellyBean) {
stopwatchBigRemoteViews = newRemoteViews(R.layout.notification_large);
stopwatchBigRemoteViews.setOnClickPendingIntent(R.id.lap,
newBroadcastPendingIntent(ACTION_STOPWATCH_LAP));
}
setOnClickPendingIntent(R.id.collapse,
newBroadcastPendingIntent(ACTION_STOPWATCH_COLLAPSE));
setOnClickPendingIntent(R.id.control,
newBroadcastPendingIntent(ACTION_STOPWATCH_CONTROLLER));
}

// Создание шаблона уведомления
stopwatchNotification = new Notification();
stopwatchNotification.tickerText = res
.getString(R.string.notification_stopwatch1);
stopwatchNotification.icon = R.drawable.ic_statusbar_stopwatch;
stopwatchNotification.flags = Notification.FLAG_ONGOING_EVENT;

// Загрузка данных секундомера
stopwatchStartTime = sharedPreferences.getLong(
StopwatchActivity.KEY_STOPWATCH_START, 0);
if (stopwatchStartTime != 0
&& sharedPreferences.getLong(
StopwatchActivity.KEY_STOPWATCH_PAUSE, 0) == 0) {
stopwatchFullTime = sharedPreferences.getLong(
StopwatchActivity.KEY_STOPWATCH_FULL_TIME, 0);
stopwatchController(MSG_START);
if (JellyBean) {
stopwatchLapLength = sharedPreferences.getInt(
StopwatchActivity.KEY_STOPWATCH_LAPS, 0);
for (int i = 0; i < stopwatchLapLength; i++)
if (stopwatchLapLength - i < 4) {
stopwatchLapPrimaryLine[stopwatchLapLength - i - 1] = new String(
sharedPreferences
.getString(
StopwatchActivity.KEY_STOPWATCH_PRIMARY_LINE
+ i, "@error"));
stopwatchLapsFun(stopwatchLapLength - i - 1);
}
}
} else
stopSelf();
} else
stopSelf();
}

private RemoteViews newRemoteViews(int layout) {
return new RemoteViews(getPackageName(), layout);
}

private PendingIntent newBroadcastPendingIntent(String action) {
return PendingIntent.getBroadcast(getBaseContext(), 0,
new Intent().setAction(action),
PendingIntent.FLAG_CANCEL_CURRENT);
}

private void setOnClickPendingIntent(int id, PendingIntent intent) {
stopwatchRemoteViews.setOnClickPendingIntent(id, intent);
if (JellyBean)
stopwatchBigRemoteViews.setOnClickPendingIntent(id, intent);
}

private void stopwatchUpdateLaps() {
if (JellyBean)
for (int i = 0; i < 3; i++)
stopwatchLapsFun(i);

}

private void stopwatchLapsFun(int a) {
stopwatchBigRemoteViews.setTextViewText(R.id.lap1 + a,
stopwatchLapPrimaryLine[a] == null ? "00:00:00:000 - 0"
: stopwatchLapPrimaryLine[a] + " - "
+ (stopwatchLapLength - a));
}

/**
* Три первых круга секундомера
*/
private String[] stopwatchLapPrimaryLine = new String[3];

/**
* Количество всех кругов
*/
private int stopwatchLapLength;

/**
* Принимает сообщения о нажатиях кнопок уведомления
*
* @author AChep *
*/
private class Broadcast extends BroadcastReceiver {

public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
if (action.equals(ACTION_STOPWATCH_COLLAPSE))
stopService();
else if (action.equals(ACTION_STOPWATCH_CONTROLLER))
stopwatchController(stopwatchRunning ? MSG_PAUSE : MSG_START);
else if (action.equals(Intent.ACTION_SCREEN_OFF))
stopwatchController(MSG_HIDE);
else if (action.equals(Intent.ACTION_SCREEN_ON))
stopwatchController(MSG_RUN);
else if (action.equals(ACTION_STOPWATCH_LAP)) {
if (stopwatchRunning) {
stopwatchLapLength++;
final long time = stopwatchGetTime();
stopwatchLapPrimaryLine[2] = stopwatchLapPrimaryLine[1];
stopwatchLapPrimaryLine[1] = stopwatchLapPrimaryLine[0];
stopwatchLapPrimaryLine[0] = new String(
getTimeStrAdapter(time));
stopwatchStartTime = System.currentTimeMillis();
stopwatchUpdateLaps();
stopwatchController(MSG_RUN);
final String secondaryLine = new String(
getTimeStrAdapter(stopwatchFullTime += time));
stopwatchData.putLong(
StopwatchActivity.KEY_STOPWATCH_FULL_TIME,
stopwatchFullTime);
stopwatchData.putInt(StopwatchActivity.KEY_STOPWATCH_LAPS,
stopwatchLapLength);
stopwatchData.putLong(
StopwatchActivity.KEY_STOPWATCH_START,
stopwatchStartTime);
stopwatchData.putString(
StopwatchActivity.KEY_STOPWATCH_PRIMARY_LINE
+ (stopwatchLapLength - 1),
stopwatchLapPrimaryLine[0]);
stopwatchData.putString(
StopwatchActivity.KEY_STOPWATCH_SECONDARY_LINE
+ (stopwatchLapLength - 1), secondaryLine)
.commit();
}
} else if (action.equals(ACTION_STOPWATCH_STOP_SERVICE))
stopService();
}
}

@Override
public void onDestroy() {
unregisterReceiver(mReceiver);
if (stopwatchRunning) {
stopwatchRunning = false;
stopwatchRunnerHandler.removeCallbacks(stopwatchRunnerRunnable);
notificationManager.cancelAll();
}
}

@Override
public IBinder onBind(Intent arg0) {
return null;
}

@Override
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences,
String key) {
if (key.equals(Utils.KEY_STOPWATCH_NOTIFICATIONS_ENABLED)) {
if (!sharedPreferences.getBoolean(key, true))
stopService();
} else if (key.equals(Utils.KEY_STOPWATCH_MODE))
stopwatchTimeViewMode = sharedPreferences.getBoolean(key, true);
}

private void stopService() {
stopwatchRunning = false;
stopwatchRunnerHandler.removeCallbacks(stopwatchRunnerRunnable);
notificationManager.cancelAll();
stopSelf();
}

private void stopwatchUpdateNotification() {
// Обновляем текущее врямя
long time = stopwatchGetTime();
if ((time = Utils.div(time, 1000)) != stopwatchMinsLast) {
stopwatchMinsLast = time;
stopwatchSetRemoteViewsText(
R.id.mm_ss,
Utils.addZero(Utils.div(time, 60) % 60) + ":"
+ Utils.addZero(time % 60));
time = Utils.div(time, 60);
if ((time = Utils.div(time, 60)) != stopwatchHoursLast) {
stopwatchHoursLast = time;
stopwatchSetRemoteViewsText(R.id.hh, time % 24 + " "
+ textLabels[Utils.getCorrectTextTimeLabel(time) - 1]);
if ((time = Utils.div(time, 24)) != stopwatchDaysLast) {
stopwatchDaysLast = time;
stopwatchSetRemoteViewsText(
R.id.dd,
time
+ " "
+ textLabels[Utils
.getCorrectTextTimeLabel(time) + 2]);
}
}
}

// Запускаем уведомление на показ
stopwatchPushNotification();
}

private void stopwatchSetRemoteViewsText(int id, String text) {
stopwatchRemoteViews.setTextViewText(id, text);
if (JellyBean)
stopwatchBigRemoteViews.setTextViewText(id, text);
}

private void stopwatchSetRemoteViewsIcon(int icon) {
stopwatchBigRemoteViews.setImageViewResource(R.id.control, icon);
if (JellyBean)
stopwatchBigRemoteViews.setImageViewResource(R.id.control, icon);
}

private static final int MSG_START = 1;
private static final int MSG_PAUSE = 2;
private static final int MSG_HIDE = 3;
private static final int MSG_RUN = 4;

private void stopwatchSaveTimeData() {
stopwatchData.putLong(StopwatchActivity.KEY_STOPWATCH_PAUSE,
stopwatchPauseTime);
stopwatchData.putLong(StopwatchActivity.KEY_STOPWATCH_START,
stopwatchStartTime).commit();
}

private void stopwatchStart() {
if (stopwatchStartTime == 0)
stopwatchStartTime = System.currentTimeMillis()
- stopwatchPauseTime;
stopwatchPauseTime = 0;
stopwatchRunning = true;
stopwatchSetRemoteViewsIcon(R.drawable.notification_pause);
stopwatchRunnerHandler.post(stopwatchRunnerRunnable);
stopwatchSaveTimeData();
}

private void stopwatchPause() {
stopwatchPauseTime = stopwatchTimeMinus();
stopwatchStartTime = 0;
stopwatchRunning = false;
stopwatchSetRemoteViewsIcon(R.drawable.notification_start);
stopwatchPushNotification();
stopwatchSaveTimeData();
}

private void stopwatchHide() {
if (stopwatchIsRunning())
stopwatchRunning = false;
}

private void stopwatchRun() {
if (stopwatchIsRunning()) {
stopwatchRunnerHandler.post(stopwatchRunnerRunnable);
stopwatchRunning = true;
}
}

private void stopwatchPushNotification() {
stopwatchNotification.contentView = stopwatchRemoteViews;
if (JellyBean)
stopwatchNotification.bigContentView = stopwatchBigRemoteViews;
notificationManager.notify(STOPWATCH, stopwatchNotification);
}

private boolean stopwatchIsRunning() {
return stopwatchStartTime != 0 && stopwatchPauseTime == 0;
}

private void stopwatchController(int msg) {
switch (msg) {
case MSG_START:
stopwatchStart();
break;
case MSG_PAUSE:
stopwatchPause();
break;
case MSG_HIDE:
stopwatchHide();
break;
case MSG_RUN:
stopwatchRun();
break;
}
}

private final Handler stopwatchRunnerHandler = new Handler();
private final Runnable stopwatchRunnerRunnable = new Runnable() {

@Override
public void run() {
if (stopwatchRunning) {
stopwatchUpdateNotification();
stopwatchRunnerHandler.postDelayed(stopwatchRunnerRunnable,
1001 - System.currentTimeMillis() % 1000);
}
}
};

/**
* @return System.currentTimeMillis() - mStopwatchStartTime
*/
private long stopwatchTimeMinus() {
return System.currentTimeMillis() - stopwatchStartTime;
}

private long stopwatchGetTime() {
final long time = stopwatchTimeMinus();
return stopwatchTimeViewMode ? time : time + stopwatchFullTime;
}

private String getTimeStr(long time) {
long s = (time - time % 1000) / 1000;
long m = (s - s % 60) / 60;
long h = (m - m % 60) / 60;
return Utils.addZero(h) + ":" + Utils.addZero(m % 60) + ":"
+ Utils.addZero(s % 60);
}

private String addZeroLong(long x) {
return String.format("%03d", x % 1000);
}

private String getTimeStrAdapter(long x) {
return getTimeStr(x) + ":" + addZeroLong(x);
}
}

PS: It's JB+ feature ;)