if(shortcutManager.getDynamicShortcuts().size() == 0) {
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.setClass(this, StartTaskbarActivity.class);
- intent.putExtra(EXTRA_IS_LAUNCHING_SHORT_CUT, true);
+ intent.putExtra(EXTRA_IS_LAUNCHING_SHORTCUT, true);
ShortcutInfo shortcut = new ShortcutInfo.Builder(this, "start_taskbar")
.setShortLabel(getString(R.string.tb_start_taskbar))
if(U.enableFreeformModeShortcut(this)) {
Intent intent2 = new Intent(Intent.ACTION_MAIN);
intent2.setClass(this, ShortcutActivity.class);
- intent2.putExtra(EXTRA_IS_LAUNCHING_SHORT_CUT, true);
+ intent2.putExtra(EXTRA_IS_LAUNCHING_SHORTCUT, true);
ShortcutInfo shortcut2 = new ShortcutInfo.Builder(this, "freeform_mode")
.setShortLabel(getString(R.string.tb_pref_header_freeform))
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- if(getIntent().hasExtra(EXTRA_IS_LAUNCHING_SHORT_CUT)) {
+ if(getIntent().hasExtra(EXTRA_IS_LAUNCHING_SHORTCUT)) {
if(U.hasFreeformSupport(this)) {
U.restartNotificationService(this);
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- if(getIntent().hasExtra(EXTRA_IS_LAUNCHING_SHORT_CUT)) {
+ if(getIntent().hasExtra(EXTRA_IS_LAUNCHING_SHORTCUT)) {
Intent intent = new Intent(U.isServiceRunning(this, NotificationService.class)
? ACTION_QUIT
: ACTION_START);
public static final String POSITION_TOP_VERTICAL_RIGHT = "top_vertical_right";
// Intent extra keys
- public static final String EXTRA_IS_LAUNCHING_SHORT_CUT = "is_launching_shortcut";
+
+ public static final String EXTRA_IS_LAUNCHING_SHORTCUT = "is_launching_shortcut";
}
import com.farmerbb.taskbar.service.FavoriteApp4;
import com.farmerbb.taskbar.service.FavoriteApp5;
+import static com.farmerbb.taskbar.util.Constants.*;
+
public class ShortcutUtils {
private ShortcutUtils() {}
public static Intent getShortcutIntent(Context context) {
Intent shortcutIntent = new Intent(context, ShortcutActivity.class);
shortcutIntent.setAction(Intent.ACTION_MAIN);
- shortcutIntent.putExtra(Constants.EXTRA_IS_LAUNCHING_SHORT_CUT, true);
+ shortcutIntent.putExtra(EXTRA_IS_LAUNCHING_SHORTCUT, true);
Intent intent = new Intent();
intent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent);
public static Intent getStartStopIntent(Context context) {
Intent shortcutIntent = new Intent(context, StartTaskbarActivity.class);
shortcutIntent.setAction(Intent.ACTION_MAIN);
- shortcutIntent.putExtra(Constants.EXTRA_IS_LAUNCHING_SHORT_CUT, true);
+ shortcutIntent.putExtra(EXTRA_IS_LAUNCHING_SHORTCUT, true);
Intent intent = new Intent();
intent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent);