Back to project page Tacere.
The source code is released under:
MIT License
If you think the Android project Tacere listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
/* * Copyright (c) 2014 Jonathan Nelson/*from w w w . ja v a 2 s .c om*/ * Released under the BSD license. For details see the COPYING file. */ package org.ciasaboark.tacere.service; import android.app.IntentService; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.util.Log; import org.ciasaboark.tacere.database.DatabaseInterface; import org.ciasaboark.tacere.event.ringer.RingerType; public class ResetEventService extends IntentService { private static final String TAG = "ResetEventService"; private static final int BOGUS_EVENT_ID = -1; public ResetEventService() { super(TAG); } @Override protected void onHandleIntent(Intent intent) { Log.d(TAG, "waking"); Context ctx = getApplicationContext(); if (intent.getExtras() != null) { Bundle b = intent.getExtras(); int eventId = b.getInt("org.ciasaboark.tacere.eventId", BOGUS_EVENT_ID); if (eventId != BOGUS_EVENT_ID) { DatabaseInterface dbIface = DatabaseInterface.getInstance(ctx); dbIface.setRingerForInstance(eventId, RingerType.UNDEFINED); Intent i = new Intent(this, EventSilencerService.class); i.putExtra("type", "activityRestart"); startService(i); } } } }