Skip to content

Commit

Permalink
Merge pull request #27 from BIDMCDigitalPsychiatry/12OS
Browse files Browse the repository at this point in the history
Android 12 os support implementation.
  • Loading branch information
ZCOEngineer authored Jun 3, 2022
2 parents 34a8f3d + e11c6b2 commit 1e80d3a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class ActivityTransitions : Service(), SensorEventListener {

// TODO: Initialize PendingIntent that will be triggered when a activity transition occurs.
val intent = Intent(actions)
mActivityTransitionsPendingIntent = PendingIntent.getBroadcast(this@ActivityTransitions, 0, intent, 0)
mActivityTransitionsPendingIntent = PendingIntent.getBroadcast(this@ActivityTransitions, 0, intent, PendingIntent.FLAG_IMMUTABLE)

// TODO: Create a BroadcastReceiver to listen for activity transitions.
// The receiver listens for the PendingIntent above that is triggered by the system when an
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class WiFi : Service() {
registerReceiver(wifiMonitor, filter)
backgroundService = Intent(this, BackgroundService::class.java)
backgroundService!!.action = ACTION_LAMP_WIFI_REQUEST_SCAN
wifiScan = PendingIntent.getService(this, 0, backgroundService!!, PendingIntent.FLAG_UPDATE_CURRENT)
wifiScan = PendingIntent.getService(this, 0, backgroundService!!, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE)
}

interface LAMPSensorObserver {
Expand Down

0 comments on commit 1e80d3a

Please sign in to comment.