Add permissions check for brightness changes via shell.

Also
- Adjusts some code structure around DisplayManagerShellCommand.
- Remove clearIdentity() on other display shell commands.

Test: Run all shell options for display in adb root and unroot.
Test: Verify that 'adb shell cmd display set-brightness *' still works.
Test: atest DisplayTest
Bug: 144920149
Change-Id: I9c6f584537a89a99f38871e280796fe66feeb312
diff --git a/packages/Shell/AndroidManifest.xml b/packages/Shell/AndroidManifest.xml
index aefdce4..347d6c2 100644
--- a/packages/Shell/AndroidManifest.xml
+++ b/packages/Shell/AndroidManifest.xml
@@ -230,6 +230,9 @@
     <!-- Permission required for CTS test - CtsOsTestCases -->
     <uses-permission android:name="android.permission.MANAGE_CRATES"/>
 
+    <!-- Allows setting brightness from the shell -->
+    <uses-permission android:name="android.permission.CONTROL_DISPLAY_BRIGHTNESS"/>
+
     <application android:label="@string/app_label"
                 android:theme="@android:style/Theme.DeviceDefault.DayNight"
                 android:defaultToDeviceProtectedStorage="true"