Methods Summary |
---|
public void | addRotationLockControllerCallback(RotationLockControllerCallback callback)
mCallbacks.add(callback);
notifyChanged(callback);
|
public int | getRotationLockOrientation()
return RotationPolicy.getRotationLockOrientation(mContext);
|
public boolean | isRotationLockAffordanceVisible()
return RotationPolicy.isRotationLockToggleVisible(mContext);
|
public boolean | isRotationLocked()
return RotationPolicy.isRotationLocked(mContext);
|
private void | notifyChanged(RotationLockControllerCallback callback)
callback.onRotationLockStateChanged(RotationPolicy.isRotationLocked(mContext),
RotationPolicy.isRotationLockToggleVisible(mContext));
|
private void | notifyChanged()
for (RotationLockControllerCallback callback : mCallbacks) {
notifyChanged(callback);
}
|
public void | removeRotationLockControllerCallback(RotationLockControllerCallback callback)
mCallbacks.remove(callback);
|
public void | setListening(boolean listening)
if (listening) {
RotationPolicy.registerRotationPolicyListener(mContext, mRotationPolicyListener,
UserHandle.USER_ALL);
} else {
RotationPolicy.unregisterRotationPolicyListener(mContext, mRotationPolicyListener);
}
|
public void | setRotationLocked(boolean locked)
RotationPolicy.setRotationLock(mContext, locked);
|