Fixs the incorrect message for SecurityException
when injecting a Key, Pointer and Trackball events into the UI across applications, the corresponding methods throw SecurityException with incorrect permission message. INJECT EVENT permission should be INJECT_EVENTS
This commit is contained in:
@@ -5285,7 +5285,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
switch (result) {
|
||||
case INJECT_NO_PERMISSION:
|
||||
throw new SecurityException(
|
||||
"Injecting to another application requires INJECT_EVENT permission");
|
||||
"Injecting to another application requires INJECT_EVENTS permission");
|
||||
case INJECT_SUCCEEDED:
|
||||
return true;
|
||||
}
|
||||
@@ -5313,7 +5313,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
switch (result) {
|
||||
case INJECT_NO_PERMISSION:
|
||||
throw new SecurityException(
|
||||
"Injecting to another application requires INJECT_EVENT permission");
|
||||
"Injecting to another application requires INJECT_EVENTS permission");
|
||||
case INJECT_SUCCEEDED:
|
||||
return true;
|
||||
}
|
||||
@@ -5341,7 +5341,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
switch (result) {
|
||||
case INJECT_NO_PERMISSION:
|
||||
throw new SecurityException(
|
||||
"Injecting to another application requires INJECT_EVENT permission");
|
||||
"Injecting to another application requires INJECT_EVENTS permission");
|
||||
case INJECT_SUCCEEDED:
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user