Use LocalBroadcast to finish RingtoneActivity from other components

This commit is contained in:
Phillip Hsu
2016-06-14 19:36:14 -07:00
parent 548ca6197e
commit 1edd0ce026
4 changed files with 88 additions and 125 deletions
@@ -0,0 +1,18 @@
package com.philliphsu.clock2.util;
import android.content.Context;
import android.content.Intent;
import android.support.v4.content.LocalBroadcastManager;
/**
* Created by Phillip Hsu on 6/14/2016.
*/
public final class LocalBroadcastHelper {
/** Sends a local broadcast using an intent with the action specified */
public static void sendBroadcast(Context context, String action) {
LocalBroadcastManager.getInstance(context).sendBroadcast(new Intent(action));
}
private LocalBroadcastHelper() {}
}