fix #282
This commit is contained in:
@@ -197,14 +197,6 @@
|
|||||||
android:name="android.accessibilityservice"
|
android:name="android.accessibilityservice"
|
||||||
android:resource="@xml/accessibility_service_config"/>
|
android:resource="@xml/accessibility_service_config"/>
|
||||||
</service>
|
</service>
|
||||||
<service
|
|
||||||
android:name="com.stardust.notification.NotificationListenerService"
|
|
||||||
android:label="@string/_app_name"
|
|
||||||
android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE">
|
|
||||||
<intent-filter>
|
|
||||||
<action android:name="android.service.notification.NotificationListenerService"/>
|
|
||||||
</intent-filter>
|
|
||||||
</service>
|
|
||||||
|
|
||||||
<receiver android:name=".external.widget.ScriptWidget">
|
<receiver android:name=".external.widget.ScriptWidget">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
|
|||||||
@@ -340,3 +340,9 @@ div.CodeMirror-dragcursors {
|
|||||||
|
|
||||||
/* Help users use markselection to safely style text background */
|
/* Help users use markselection to safely style text background */
|
||||||
span.CodeMirror-selectedtext { background: none; }
|
span.CodeMirror-selectedtext { background: none; }
|
||||||
|
|
||||||
|
.CodeMirror-gutter-wrapper {
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
@@ -76,7 +76,9 @@ editor.on("keyup", function(editor, event)
|
|||||||
clearTimeout(id);
|
clearTimeout(id);
|
||||||
}
|
}
|
||||||
id = setTimeout(function(){
|
id = setTimeout(function(){
|
||||||
editor.execCommand("autocomplete");
|
editor.showHint({
|
||||||
|
completeSingle: false
|
||||||
|
})
|
||||||
}, 100);
|
}, 100);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -21,6 +21,15 @@
|
|||||||
android:taskAffinity="com.stardust.autojs.runtime.api.image.ScreenCaptureRequestActivity"
|
android:taskAffinity="com.stardust.autojs.runtime.api.image.ScreenCaptureRequestActivity"
|
||||||
android:theme="@style/AppTheme.Transparent"/>
|
android:theme="@style/AppTheme.Transparent"/>
|
||||||
|
|
||||||
|
<service
|
||||||
|
android:name="com.stardust.notification.NotificationListenerService"
|
||||||
|
android:label="@string/_app_name"
|
||||||
|
android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.service.notification.NotificationListenerService"/>
|
||||||
|
</intent-filter>
|
||||||
|
</service>
|
||||||
|
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
|
|||||||
@@ -18,15 +18,15 @@ public class ScreenMetrics {
|
|||||||
private static Display display;
|
private static Display display;
|
||||||
|
|
||||||
public static void initIfNeeded(Activity activity) {
|
public static void initIfNeeded(Activity activity) {
|
||||||
if (!initialized) {
|
if(initialized)
|
||||||
DisplayMetrics metrics = new DisplayMetrics();
|
return;
|
||||||
activity.getWindowManager().getDefaultDisplay().getRealMetrics(metrics);
|
DisplayMetrics metrics = new DisplayMetrics();
|
||||||
deviceScreenHeight = metrics.heightPixels;
|
activity.getWindowManager().getDefaultDisplay().getRealMetrics(metrics);
|
||||||
deviceScreenWidth = metrics.widthPixels;
|
deviceScreenHeight = metrics.heightPixels;
|
||||||
deviceScreenDensity = metrics.densityDpi;
|
deviceScreenWidth = metrics.widthPixels;
|
||||||
display = activity.getWindowManager().getDefaultDisplay();
|
deviceScreenDensity = metrics.densityDpi;
|
||||||
initialized = true;
|
display = activity.getWindowManager().getDefaultDisplay();
|
||||||
}
|
initialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getDeviceScreenHeight() {
|
public static int getDeviceScreenHeight() {
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ public class ViewUtil {
|
|||||||
return (V) view.findViewById(resId);
|
return (V) view.findViewById(resId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: 2018/1/23 not working in some devices (https://github.com/hyb1996/Auto.js/issues/268)
|
||||||
public static int getStatusBarHeight(Context context) {
|
public static int getStatusBarHeight(Context context) {
|
||||||
int result = 0;
|
int result = 0;
|
||||||
int resourceId = context.getResources().getIdentifier("status_bar_height", "dimen", "android");
|
int resourceId = context.getResources().getIdentifier("status_bar_height", "dimen", "android");
|
||||||
|
|||||||
Reference in New Issue
Block a user