Creates a flag for auto-rotate with face detection
The flag is enabled by default. And will be disabled on foldable devices. Test: locally Bug: 236249360 Change-Id: I8c90533f6011531a4f00af5f2514579638604067
This commit is contained in:
@@ -180,6 +180,10 @@ public class SmartAutoRotateController extends TogglePreferenceController implem
|
||||
* Returns true if there is a {@link RotationResolverService} available
|
||||
*/
|
||||
public static boolean isRotationResolverServiceAvailable(Context context) {
|
||||
if (!context.getResources().getBoolean(
|
||||
R.bool.config_auto_rotate_face_detection_available)) {
|
||||
return false;
|
||||
}
|
||||
final PackageManager packageManager = context.getPackageManager();
|
||||
final String resolvePackage = packageManager.getRotationResolverPackageName();
|
||||
if (TextUtils.isEmpty(resolvePackage)) {
|
||||
|
Reference in New Issue
Block a user