mirror of
https://github.com/github/codeql.git
synced 2026-07-11 14:35:31 +02:00
11 lines
398 B
Java
11 lines
398 B
Java
public class ShutdownReceiver extends BroadcastReceiver {
|
|
@Override
|
|
public void onReceive(final Context context, final Intent intent) {
|
|
// GOOD: The code checks if the intent is an ACTION_SHUTDOWN intent
|
|
if (!intent.getAction().equals(Intent.ACTION_SHUTDOWN)) {
|
|
return;
|
|
}
|
|
mainActivity.saveLocalData();
|
|
mainActivity.stopActivity();
|
|
}
|
|
} |