notificationIntent.putExtra(EXTRA_START_SERVICES, true);
U.startForegroundService(context, notificationIntent);
- } else if(intent.hasExtra("secondscreen"))
+ } else if(intent.hasExtra(EXTRA_SECOND_SCREEN))
pref.edit().putBoolean(PREF_SKIP_QUIT_RECEIVER, true).apply();
}
}
public static final String EXTRA_USER_ID = "user_id";
public static final String EXTRA_WINDOW_SIZE = "window_size";
public static final String EXTRA_START_FREEFORM_HACK = "start_freeform_hack";
+ public static final String EXTRA_SECOND_SCREEN = "secondscreen";
}
boolean freeformEnabled = pref.getBoolean(PREF_FREEFORM_HACK, false);
- if(intent.hasExtra("secondscreen") && freeformEnabled)
+ if(intent.hasExtra(EXTRA_SECOND_SCREEN) && freeformEnabled)
pref.edit().putBoolean(PREF_SKIP_DISABLE_FREEFORM_RECEIVER, true).apply();
else if(U.hasFreeformSupport(context) && !freeformEnabled) {
U.restartNotificationService(context);
@Override
public void onReceive(Context context, Intent intent) {
SharedPreferences pref = U.getSharedPreferences(context);
- if(intent.hasExtra("secondscreen") && pref.getBoolean(PREF_LAUNCHER, false))
+ if(intent.hasExtra(EXTRA_SECOND_SCREEN) && pref.getBoolean(PREF_LAUNCHER, false))
pref.edit().putBoolean(PREF_SKIP_DISABLE_HOME_RECEIVER, true).apply();
else if(U.canDrawOverlays(context)) {
SharedPreferences.Editor editor = pref.edit();