Merge "Global accessibility action to open recent apps shows the old dialog style." into jb-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
ccf97dc1af
@@ -73,6 +73,7 @@ import android.view.accessibility.IAccessibilityManagerClient;
|
|||||||
|
|
||||||
import com.android.internal.R;
|
import com.android.internal.R;
|
||||||
import com.android.internal.content.PackageMonitor;
|
import com.android.internal.content.PackageMonitor;
|
||||||
|
import com.android.internal.statusbar.IStatusBarService;
|
||||||
import com.android.server.wm.WindowManagerService;
|
import com.android.server.wm.WindowManagerService;
|
||||||
|
|
||||||
import org.xmlpull.v1.XmlPullParserException;
|
import org.xmlpull.v1.XmlPullParserException;
|
||||||
@@ -1537,7 +1538,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub {
|
|||||||
sendDownAndUpKeyEvents(KeyEvent.KEYCODE_HOME);
|
sendDownAndUpKeyEvents(KeyEvent.KEYCODE_HOME);
|
||||||
} return true;
|
} return true;
|
||||||
case AccessibilityService.GLOBAL_ACTION_RECENTS: {
|
case AccessibilityService.GLOBAL_ACTION_RECENTS: {
|
||||||
sendDownAndUpKeyEvents(KeyEvent.KEYCODE_APP_SWITCH);
|
openRecents();
|
||||||
} return true;
|
} return true;
|
||||||
case AccessibilityService.GLOBAL_ACTION_NOTIFICATIONS: {
|
case AccessibilityService.GLOBAL_ACTION_NOTIFICATIONS: {
|
||||||
expandStatusBar();
|
expandStatusBar();
|
||||||
@@ -1730,6 +1731,20 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub {
|
|||||||
Binder.restoreCallingIdentity(token);
|
Binder.restoreCallingIdentity(token);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void openRecents() {
|
||||||
|
final long token = Binder.clearCallingIdentity();
|
||||||
|
|
||||||
|
IStatusBarService statusBarService = IStatusBarService.Stub.asInterface(
|
||||||
|
ServiceManager.getService("statusbar"));
|
||||||
|
try {
|
||||||
|
statusBarService.toggleRecentApps();
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
Slog.e(LOG_TAG, "Error toggling recent apps.");
|
||||||
|
}
|
||||||
|
|
||||||
|
Binder.restoreCallingIdentity(token);
|
||||||
|
}
|
||||||
|
|
||||||
private IAccessibilityInteractionConnection getConnectionLocked(int windowId) {
|
private IAccessibilityInteractionConnection getConnectionLocked(int windowId) {
|
||||||
if (DEBUG) {
|
if (DEBUG) {
|
||||||
Slog.i(LOG_TAG, "Trying to get interaction connection to windowId: " + windowId);
|
Slog.i(LOG_TAG, "Trying to get interaction connection to windowId: " + windowId);
|
||||||
|
|||||||
Reference in New Issue
Block a user