Skip to content

Commit

Permalink
released version 10.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Kosh committed Jan 15, 2017
1 parent aff39c3 commit 4e6e8c6
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 23 deletions.
6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ android {
}
}
compileSdkVersion 25
buildToolsVersion "25.0.0"
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.styleme.floating.toolbox.pro"
minSdkVersion 18
targetSdkVersion 25
versionCode 104
versionName "10.0.4"
versionCode 105
versionName "10.0.5"
buildConfigField "String", "FA_HOST", '"k0shk0sh.github.io/FastAccess"'
buildConfigField "String", "SHARED_URI", '"sharedUri"'
signingConfig signingConfigs.signing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public static void collapseFAService(Context context, int size) {
context.stopService(new Intent(context, FloatingService.class));
Intent notificationIntent = new Intent(context, FloatingService.class);
notificationIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
PendingIntent pendingIntent = PendingIntent.getService(context, 0, notificationIntent, 0);
PendingIntent pendingIntent = PendingIntent.getService(context, 0, notificationIntent, PendingIntent.FLAG_CANCEL_CURRENT);
NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(context);
int icon = R.drawable.ic_fa_notification;
long finalTime = System.currentTimeMillis();
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/java/com/fastaccess/helper/PrefConstant.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public class PrefConstant {
public static final String FA_IS_HORIZONTAL = "fa_is_horizontal";
public static final String WHATS_NEW_VERSION = "whats_new_version";
public static final String INTRO_SCREEN = "intro_screen";
public static final String STOP_FLAG = "stop_flag";

public static void savePosition(int x, int y) {
boolean isAutoSavePosition = PrefHelper.getBoolean(PrefConstant.FA_AUTO_SAVE_POSITION);
Expand Down Expand Up @@ -104,4 +105,8 @@ public static boolean showIntroScreen() {
public static void setIntroScreen() {
PrefHelper.set(INTRO_SCREEN, true);
}

public static boolean isLongPressEnabled() {
return PrefHelper.getBoolean("fa_long_press");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import android.support.annotation.Nullable;

import com.fastaccess.R;
import com.fastaccess.helper.Bundler;
import com.fastaccess.helper.InputHelper;
import com.fastaccess.helper.NotificationHelper;
import com.fastaccess.helper.PrefConstant;
Expand All @@ -17,14 +18,15 @@
import com.fastaccess.ui.modules.floating.folders.FloatingFoldersView;
import com.fastaccess.ui.modules.main.MainView;

import static com.fastaccess.helper.PrefConstant.STOP_FLAG;

/**
* Created by Kosh on 13 Oct 2016, 7:32 PM
*/

public class FloatingService extends Service {
private FloatingVHView floatingVHView;
private FloatingFoldersView floatingFoldersView;
public static final String STOP_FLAG = "stop_flag";

@Override public void onCreate() {
super.onCreate();
Expand All @@ -42,7 +44,7 @@ public class FloatingService extends Service {
floatingVHView = FloatingVHView.with(this, PrefConstant.isHorizontal());
}
Intent stopServiceIntent = new Intent(this, FloatingService.class);
stopServiceIntent.putExtra(STOP_FLAG, true);
stopServiceIntent.putExtras(Bundler.start().put(STOP_FLAG, true).end());
startForeground(NotificationHelper.NOTIFICATION_ID,
NotificationHelper.getNonCancellableNotification(this, getString(R.string.app_name), getString(R.string.click_to_open_fa),
PrefHelper.getBoolean(PrefConstant.STATUS_BAR_HIDDEN) ? R.drawable.ic_notification : R.drawable.ic_fa_notification,
Expand All @@ -56,9 +58,9 @@ public class FloatingService extends Service {

@Override public int onStartCommand(Intent intent, int flags, int startId) {
super.onStartCommand(intent, flags, startId);
if (intent != null && intent.getBooleanExtra(STOP_FLAG, false)) {
if (intent != null && intent.getExtras() != null && intent.getExtras().getBoolean(PrefConstant.STOP_FLAG)) {
NotificationHelper.collapseFAService(this, 0);
stopForeground(true);
stopSelf();
}
return START_STICKY;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import com.fastaccess.data.dao.FolderModel;
import com.fastaccess.data.dao.events.FloatingEventModel;
import com.fastaccess.data.dao.events.ThemePackEventModel;
import com.fastaccess.helper.NotificationHelper;
import com.fastaccess.helper.PermissionsHelper;
import com.fastaccess.helper.PrefConstant;
import com.fastaccess.helper.PrefHelper;
Expand Down Expand Up @@ -103,7 +104,7 @@ public abstract class BaseFloatingView<M> implements BaseFloatingMvp.BaseView<M>
}

@Override public void onLongPressed() {
// NotificationHelper.collapseFAService(context, getAdapter().getItemCount());
if (PrefConstant.isLongPressEnabled()) NotificationHelper.collapseFAService(context, getAdapter().getItemCount());
}

@Override public void onDoubleTapped() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.support.annotation.NonNull;
import android.view.View;

Expand All @@ -28,9 +29,10 @@ public static FloatingVHPresenter with(@NonNull BaseFloatingMvp.BaseView<AppsMod
@Override public void onItemClick(int position, View v, AppsModel item) {
try {
Context context = v.getContext();
Intent intent = new Intent();
PackageManager manager = context.getPackageManager();
Intent intent = manager.getLaunchIntentForPackage(item.getPackageName());
intent.addCategory(Intent.CATEGORY_LAUNCHER);
intent.setComponent(new ComponentName(item.getPackageName(), item.getActivityInfoName()));
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent);
} catch (Exception e) {// app uninstalled/not found
e.printStackTrace();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.support.annotation.NonNull;
import android.support.v4.content.Loader;
import android.view.View;
Expand Down Expand Up @@ -33,9 +34,10 @@ public static FloatingDrawPresenter with(@NonNull FloatingDrawerMvp.View view) {
@Override public void onItemClick(int position, View v, AppsModel item) {
try {
Context context = v.getContext();
Intent intent = new Intent();
PackageManager manager = context.getPackageManager();
Intent intent = manager.getLaunchIntentForPackage(item.getPackageName());
intent.addCategory(Intent.CATEGORY_LAUNCHER);
intent.setComponent(new ComponentName(item.getPackageName(), item.getActivityInfoName()));
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent);
} catch (Exception e) {// app uninstalled/not found
e.printStackTrace();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ public class MainView extends BaseActivity<MainMvp.View, MainPresenter> implemen
PrefConstant.setIntroScreen();
}
if (PrefConstant.showWhatsNew()) {
startActivity(new Intent(this, WhatsNewView.class));
PrefConstant.setWhatsNewVersion();
startActivity(new Intent(this, WhatsNewView.class));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
android:layout_marginStart="@dimen/spacing_xs_large"
android:layout_marginTop="@dimen/spacing_xs_large"
android:background="@drawable/bottom_border"
android:text="Version 10.0.4"
android:text="Version 10.0.5"
android:textColor="@color/primary_light"/>

<android.support.v7.widget.CardView
Expand All @@ -124,7 +124,7 @@
android:layout_marginStart="@dimen/spacing_xs_large"
android:drawablePadding="@dimen/spacing_xs_large"
android:drawableStart="@drawable/ic_dot"
android:text="(New) Long Press stop FA won't work anymore, instead you can stop FA via Notification bar.."
android:text="(New) Long Press stop FA now can be enabled from settings screen.(Default is disabled)"
android:textColor="@color/primary_text"/>

<com.fastaccess.ui.widgets.FontTextView
Expand All @@ -137,7 +137,7 @@
android:layout_marginStart="@dimen/spacing_xs_large"
android:drawablePadding="@dimen/spacing_xs_large"
android:drawableStart="@drawable/ic_dot"
android:text="(Fix) Fix for Samsung Contact &amp; Phone App."
android:text="(Improvement) Improved how apps are opened."
android:textColor="@color/primary_text"/>
</LinearLayout>
</android.support.v7.widget.CardView>
Expand Down
8 changes: 2 additions & 6 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,6 @@
<string name="whats_new">What\'s New</string>
<string name="version_name">Version:</string>
<string name="rate_fa">Rate Fast Access</string>
<string name="whats_new_point_1">(New) Revamping of FA from the ground to make it more faster and efficient.</string>
<string name="whats_new_point_2"><![CDATA[(New) Now you can Backup & Restore your data from any device.]]></string>
<string name="whats_new_point_3"><![CDATA[(New) Design that makes it easy & friendly to use FA]]></string>
<string name="whats_new_point_4">(NEW) Folders mode, now you can categorize your apps under folders.</string>
<string name="whats_new_point_5"><![CDATA[(NEW)App shortcuts support for Android Nougat & supported launchers.]]></string>
<string name="whats_new_point_6">FA is an open source app, you can check the source code from the settings screen.</string>
<string name="auto_save_position_title">Auto Save Last Position</string>
<string name="intro_one_title">Selecting Apps Actions</string>
<string name="intro_one_desc">Upon selecting apps, you get two options:\nSelect All &amp; Add All</string>
Expand All @@ -155,4 +149,6 @@
<string name="folder_exists_msg">There is a folder exists with the name you entered, please use different name to create new folder.</string>
<string name="intro_four_title">FA Floating Modes</string>
<string name="intro_four_desc">FA has two Floating Modes\n Apps &amp; Folders.\n By default Apps is selected.</string>
<string name="long_press_summery">Enable long press on FA icon to hide it.</string>
<string name="long_press_title">FA Long Press.</string>
</resources>
6 changes: 6 additions & 0 deletions app/src/main/res/xml/fa_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
android:summary="@string/auto_start_summary"
android:title="@string/auto_start_title"/>

<SwitchPreference
android:defaultValue="true"
android:key="fa_long_press"
android:summary="@string/long_press_summery"
android:title="@string/long_press_title"/>

<SwitchPreference
android:defaultValue="true"
android:key="fa_auto_save_position"
Expand Down

0 comments on commit 4e6e8c6

Please sign in to comment.