mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 11:18:21 +00:00
Adding support for requesting addition of shortcut/widget
on the workspace. Bug: 33584624 Change-Id: I664366822fe8088742faff2cce006239ab0771bc
This commit is contained in:
@@ -18,6 +18,7 @@ package com.android.launcher3;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.content.Context;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.TypedArray;
|
||||
import android.content.res.XmlResourceParser;
|
||||
import android.graphics.Point;
|
||||
@@ -326,6 +327,11 @@ public class InvariantDeviceProfile {
|
||||
return rank == getAllAppsButtonRank();
|
||||
}
|
||||
|
||||
public DeviceProfile getDeviceProfile(Context context) {
|
||||
return context.getResources().getConfiguration().orientation
|
||||
== Configuration.ORIENTATION_LANDSCAPE ? landscapeProfile : portraitProfile;
|
||||
}
|
||||
|
||||
private float weight(float x0, float y0, float x1, float y1, float pow) {
|
||||
float d = dist(x0, y0, x1, y1);
|
||||
if (Float.compare(d, 0f) == 0) {
|
||||
|
||||
Reference in New Issue
Block a user