use of android.content.om.IOverlayManager in project android_frameworks_base by DirtyUnicorns.
the class ActivityManagerService method disableOverlays.
public final void disableOverlays() {
try {
IOverlayManager iom = IOverlayManager.Stub.asInterface(ServiceManager.getService("overlay"));
if (iom == null) {
return;
}
Log.d(TAG, "Contacting the Overlay Manager Service for the list of enabled overlays");
Map<String, List<OverlayInfo>> allOverlays = iom.getAllOverlays(UserHandle.USER_SYSTEM);
if (allOverlays != null) {
Log.d(TAG, "The Overlay Manager Service provided the list of enabled overlays");
Set<String> set = allOverlays.keySet();
for (String targetPackageName : set) {
for (OverlayInfo oi : allOverlays.get(targetPackageName)) {
if (oi.isEnabled()) {
iom.setEnabled(oi.packageName, false, UserHandle.USER_SYSTEM, false);
Log.d(TAG, "Now disabling \'" + oi.packageName + "\'");
}
}
}
}
} catch (RemoteException re) {
re.printStackTrace();
Log.d(TAG, "RemoteException while trying to contact the Overlay Manager Service!");
}
}
use of android.content.om.IOverlayManager in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class SystemNavigationGestureSettings method updateNavigationBarOverlays.
public static void updateNavigationBarOverlays(Context context) {
// if gesture nav is already set, force overlay reloading
if (getCurrentSystemNavigationMode(context) == KEY_SYSTEM_NAV_GESTURAL) {
final IOverlayManager overlayManager = IOverlayManager.Stub.asInterface(ServiceManager.getService(context.OVERLAY_SERVICE));
int sensitivity = getBackSensitivity(context, overlayManager);
setNavBarInteractionMode(overlayManager, BACK_GESTURE_INSET_OVERLAYS[sensitivity], true);
}
}
Aggregations