Check for available rotation resolver service and camera permission before showing setting for face based auto-rotation

Test: locally with crosshatch & make -j64 RunSettingsRoboTests
ROBOTEST_FILTER="com.android.settings.display.SmartAutoRotateControllerTest"

Bug: 172857585
Change-Id: I825b0c2471c71a3de59532b39a47c5442f234fb5
This commit is contained in:
Abel Tesfaye
2021-02-11 01:25:49 +00:00
parent c0c3bce16e
commit ed7673eadd
8 changed files with 234 additions and 46 deletions

View File

@@ -28,6 +28,7 @@ import com.android.settingslib.core.lifecycle.LifecycleObserver;
import com.android.settingslib.core.lifecycle.events.OnPause;
import com.android.settingslib.core.lifecycle.events.OnResume;
// TODO b/180515542 this class is no longer needed on S+
public class AutoRotatePreferenceController extends TogglePreferenceController implements
PreferenceControllerMixin, Preference.OnPreferenceChangeListener, LifecycleObserver,
OnResume, OnPause {