Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d1dee091 authored by Amit Kumar's avatar Amit Kumar 💻
Browse files

Merge branch 'sprint-alexandria' [Release v1.2.4]

parents 87f3523d d6d2bff0
Loading
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@ apply plugin: 'io.fabric'
// Manifest version information!
def versionMajor = 1
def versionMinor = 2
def versionPatch = 3
def versionPatch = 4

android {
    compileSdkVersion rootProject.ext.compileSdkVersion
@@ -77,7 +77,8 @@ android {

dependencies {
    implementation 'me.relex:circleindicator:1.2.2@aar'
    implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
    implementation 'io.github.inflationx:calligraphy3:3.1.1'
    implementation 'io.github.inflationx:viewpump:1.0.0'

    apiNougatImplementation 'org.cyanogenmod:platform.sdk:6.0'
    apiOreoImplementation files('libs/lineage-sdk.jar')
+9 −4
Original line number Diff line number Diff line
@@ -8,7 +8,9 @@ import foundation.e.blisslauncher.core.DeviceProfile;
import foundation.e.blisslauncher.core.IconsHandler;
import foundation.e.blisslauncher.core.customviews.WidgetHost;
import foundation.e.blisslauncher.features.launcher.AppProvider;
import uk.co.chrisjenx.calligraphy.CalligraphyConfig;
import io.github.inflationx.calligraphy3.CalligraphyConfig;
import io.github.inflationx.calligraphy3.CalligraphyInterceptor;
import io.github.inflationx.viewpump.ViewPump;

public class BlissLauncher extends Application {
    private IconsHandler iconsPackHandler;
@@ -25,9 +27,12 @@ public class BlissLauncher extends Application {
    public void onCreate() {
        super.onCreate();

        CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
        ViewPump.init(ViewPump.builder()
                .addInterceptor(new CalligraphyInterceptor(
                        new CalligraphyConfig.Builder()
                                .setDefaultFontPath("Roboto-Regular.ttf")
                                .setFontAttrId(R.attr.fontPath)
                                .build()))
                .build());

        sAppWidgetManager = AppWidgetManager.getInstance(getApplicationContext());
+20 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Paint;
import android.os.Build;
import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.util.Log;
import android.util.TypedValue;
@@ -12,6 +13,7 @@ import android.view.ViewGroup;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.regex.Matcher;
@@ -157,4 +159,22 @@ public class Utilities {
        return result;
    }

    public static boolean isBootCompleted() {
        return "1".equals(getSystemProperty("sys.boot_completed", "1"));
    }

    public static String getSystemProperty(String property, String defaultValue) {
        try {
            Class clazz = Class.forName("android.os.SystemProperties");
            Method getter = clazz.getDeclaredMethod("get", String.class);
            String value = (String) getter.invoke(null, property);
            if (!TextUtils.isEmpty(value)) {
                return value;
            }
        } catch (Exception e) {
            Log.d(TAG, "Unable to read system properties");
        }
        return defaultValue;
    }

}
+10 −1
Original line number Diff line number Diff line
@@ -6,7 +6,6 @@ import android.content.Intent;
import android.os.Process;
import android.util.Log;


import foundation.e.blisslauncher.BlissLauncher;
import foundation.e.blisslauncher.core.events.AppAddEvent;
import foundation.e.blisslauncher.core.events.AppChangeEvent;
@@ -57,6 +56,16 @@ public class PackageAddedRemovedHandler extends BroadcastReceiver {
            EventRelay.getInstance().push(event);
            BlissLauncher.getApplication(ctx).getAppProvider().reload();
        }

        if("android.intent.action.MEDIA_MOUNTED".equals(action)) {
            Intent launchIntent = ctx.getPackageManager().getLaunchIntentForPackage(packageName);
            if (launchIntent != null) {
                BlissLauncher.getApplication(ctx).getIconsHandler().resetIconDrawableForPackage(
                        launchIntent.getComponent(), user);
                AppChangeEvent appChangeEvent = new AppChangeEvent(packageName, user);
                EventRelay.getInstance().push(appChangeEvent);
            }
        }
    }

    @Override
+2 −0
Original line number Diff line number Diff line
@@ -25,6 +25,8 @@ public class ApplicationItem extends LauncherItem {
    public static final int TYPE_CALENDAR = 746;
    public static final int TYPE_DEFAULT = 111;

    public boolean isDisabled = false;

    /**
     * Indicates the type of app item ie. Clock or Calendar (in case of none, It will be )
     */
Loading