private void CleanupReceivers() { if (m_screenReceiver != null) { UnregisterReceiver(m_screenReceiver); Utils.SafeDispose(m_screenReceiver); m_screenReceiver = null; } }
private void CleanupReceivers() { if (screenReceiver != null) { UnregisterReceiver(screenReceiver); SupportTools.SafeDispose(screenReceiver); screenReceiver = null; } }
private void EnsureReceivers() { if (m_screenReceiver != null) { return; } IntentFilter intentFilter = new IntentFilter(); intentFilter.AddAction(Intent.ActionScreenOn); intentFilter.AddAction(Intent.ActionScreenOff); m_screenReceiver = new ScreenReceiver(this); RegisterReceiver(m_screenReceiver, intentFilter); }