Example #1
0
 @Override
 public void onPause() {
   if (socket != null) {
     socket.close();
     socket = null;
   }
   super.onPause();
   if (Integer.parseInt(Build.VERSION.SDK) >= 5 && Integer.parseInt(Build.VERSION.SDK) <= 7)
     reenableKeyguard();
 }
Example #2
0
 @Override
 public void onStop() {
   super.onStop();
   if (Integer.parseInt(Build.VERSION.SDK) < 5 || Integer.parseInt(Build.VERSION.SDK) > 7)
     reenableKeyguard();
 }