This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class KeyEventsSender { | |
public static void sendKeyEvent(String keyCode) { | |
try { | |
Process process = Runtime.getRuntime().exec("su"); | |
DataOutputStream outputStream = new DataOutputStream(process.getOutputStream()); | |
outputStream.writeBytes("input keyevent " + keyCode + "\n"); | |
outputStream.flush(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local Blitbuffer = require("ffi/blitbuffer") | |
local ReaderRolling = require("apps/reader/modules/readerrolling") | |
local Screen = require("device").screen | |
local logger = require("logger") | |
local ReaderView = require("apps/reader/modules/readerview") | |
local Size = require("ui/size") | |
ReaderRolling.onPreRenderDocument = function(self) | |
-- Only enable these hacks when the typography language has been set to Japanese. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var selectedText = ""; | |
function getSelectionPositionInWebView() { | |
let selection = window.getSelection(); | |
if (selection) { | |
let range = selection.getRangeAt(0); | |
let startNode = range.startContainer; | |
let startOffset = range.startOffset; | |
let endNode = range.endContainer; | |
let endOffset = range.endOffset; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun simulateLongClick(point: Point) { | |
isSelectingText = true | |
val downTime = SystemClock.uptimeMillis() | |
val downEvent = | |
MotionEvent.obtain( | |
downTime, downTime, KeyEvent.ACTION_DOWN, | |
(point.x + 20).toFloat(), point.y.toFloat(), 0 | |
) | |
(this.parent as ViewGroup).dispatchTouchEvent(downEvent) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun selectLinkText(point: Point) { | |
evaluateJavascript( | |
""" | |
javascript:(function() { | |
var tt = w._touchTarget; | |
if(tt){ | |
var hrefAttr = tt.getAttribute("href"); | |
tt.removeAttribute("href"); | |
w._hrefAttr = hrefAttr; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@startuml | |
autonumber | |
actor User as user | |
participant Activity as a | |
participant WebView as w | |
w -> w: onPageFinished()\naddSelectionChangeListener() | |
note over w | |
Javascript on selectionchange listener: | |
2. find and return the position of (start and) | |
end position of the selection range |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"sessions": [ | |
{ | |
"title": "Google I/O Keynote", | |
"url": "https://events.google.com/io/session/88b34a4e-6170-4f18-a321-4260fb559e60?lng=en", | |
"tags": [ | |
"Keynotes", | |
"Americas" | |
] | |
}, |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/line/lich/blob/master/.github/workflows/ossrh.yml | |
name: Deploy to OSSRH | |
on: | |
workflow_dispatch: | |
inputs: | |
cond_release: | |
description: 'Type "release" to release artifacts to Maven Central.' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'com.android.library' | |
... | |
apply plugin: 'maven-publish' | |
apply plugin: 'signing' | |
group = "com.linecorp.linesdk" | |
version = "5.6.1" | |
android { |
NewerOlder