TestServiceの全体的なリファクタリング #28

Merged
asura146 merged 73 commits from improve/refactor_service into main 2024-07-12 02:17:26 +00:00
Showing only changes of commit 496c3fe934 - Show all commits

View File

@ -139,7 +139,7 @@ public class TestService extends Service {
* ブロードキャストレシーバーを登録
* @param receiver ブロードキャストレシーバー
*/
public void registerReceiver(BroadcastReceiver receiver) {
private void registerReceiver(BroadcastReceiver receiver) {
IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction(BluetoothDevice.ACTION_ACL_CONNECTED);
intentFilter.addAction(BluetoothDevice.ACTION_ACL_DISCONNECTED);
@ -195,7 +195,7 @@ public class TestService extends Service {
/**
* 通報フラグをリセットする
*/
public void resetReported() {
private void resetReported() {
db = FirebaseFirestore.getInstance();//Firebaseとの紐づけ
DocumentReference isReported = db.collection("status").document(this.userId);
//isReportedをfalseに更新
@ -230,7 +230,7 @@ public class TestService extends Service {
* @param context コンテキスト
* @param content NotificationContent 通知内容
*/
public void sendNotification(Context context, NotificationContent content) {//通知を行うメソッド
private void sendNotification(Context context, NotificationContent content) {//通知を行うメソッド
// 権限の保有を確認
if (isNotNotificationEnabled()) return;