Loading packages/SystemUI/AndroidManifest.xml +18 −0 Original line number Diff line number Diff line Loading @@ -982,6 +982,24 @@ android:excludeFromRecents="true" android:visibleToInstantApps="true"/> <activity android:name="com.android.systemui.communal.widgets.WidgetPickerActivity" android:theme="@style/Theme.EditWidgetsActivity" android:excludeFromRecents="true" android:autoRemoveFromRecents="true" android:showOnLockScreen="true" android:launchMode="singleTop" android:exported="false"> </activity> <activity android:name="com.android.systemui.communal.widgets.EditWidgetsActivity" android:theme="@style/Theme.EditWidgetsActivity" android:excludeFromRecents="true" android:autoRemoveFromRecents="true" android:showOnLockScreen="true" android:launchMode="singleTop" android:exported="false"> </activity> <!-- Doze with notifications, run in main sysui process for every user --> <service android:name=".doze.DozeService" Loading packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalHub.kt +3 −5 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.input.pointer.pointerInput import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp import androidx.compose.ui.viewinterop.AndroidView Loading Loading @@ -89,11 +90,8 @@ fun CommunalHub( ) } } IconButton(onClick = viewModel::onOpenWidgetPicker) { Icon( Icons.Default.Add, LocalContext.current.getString(R.string.button_to_open_widget_picker) ) IconButton(onClick = viewModel::onOpenWidgetEditor) { Icon(Icons.Default.Add, stringResource(R.string.button_to_open_widget_editor)) } // This spacer covers the edge of the LazyHorizontalGrid and prevents it from receiving Loading packages/SystemUI/res/layout/edit_widgets.xml 0 → 100644 +32 −0 Original line number Diff line number Diff line <!-- ~ Copyright (C) 2023 The Android Open Source Project ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. --> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/edit_widgets" android:layout_width="match_parent" android:layout_height="match_parent"> <Button style="@android:Widget.DeviceDefault.Button.Colored" android:id="@+id/add_widget" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:textSize="28sp" android:text="@string/hub_mode_add_widget_button_text"/> </FrameLayout> packages/SystemUI/res/layout/widget_picker.xml 0 → 100644 +26 −0 Original line number Diff line number Diff line <!-- ~ Copyright (C) 2023 The Android Open Source Project ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/widgets_container" android:layout_width="match_parent" android:layout_height="match_parent" android:padding="64dp" android:gravity="center_vertical" android:orientation="horizontal"> </LinearLayout> packages/SystemUI/res/values/strings.xml +4 −2 Original line number Diff line number Diff line Loading @@ -1056,10 +1056,12 @@ <!-- Indicator on keyguard to start the communal tutorial. [CHAR LIMIT=100] --> <string name="communal_tutorial_indicator_text">Swipe left to start the communal tutorial</string> <!-- Description for the button that opens the widget picker on click. [CHAR LIMIT=50] --> <string name="button_to_open_widget_picker">Open the widget picker</string> <!-- Description for the button that opens the widget editor on click. [CHAR LIMIT=50] --> <string name="button_to_open_widget_editor">Open the widget editor</string> <!-- Description for the button that removes a widget on click. [CHAR LIMIT=50] --> <string name="button_to_remove_widget">Remove a widget</string> <!-- Text for the button that launches the hub mode widget picker. [CHAR LIMIT=50] --> <string name="hub_mode_add_widget_button_text">Add Widget</string> <!-- Related to user switcher --><skip/> Loading Loading
packages/SystemUI/AndroidManifest.xml +18 −0 Original line number Diff line number Diff line Loading @@ -982,6 +982,24 @@ android:excludeFromRecents="true" android:visibleToInstantApps="true"/> <activity android:name="com.android.systemui.communal.widgets.WidgetPickerActivity" android:theme="@style/Theme.EditWidgetsActivity" android:excludeFromRecents="true" android:autoRemoveFromRecents="true" android:showOnLockScreen="true" android:launchMode="singleTop" android:exported="false"> </activity> <activity android:name="com.android.systemui.communal.widgets.EditWidgetsActivity" android:theme="@style/Theme.EditWidgetsActivity" android:excludeFromRecents="true" android:autoRemoveFromRecents="true" android:showOnLockScreen="true" android:launchMode="singleTop" android:exported="false"> </activity> <!-- Doze with notifications, run in main sysui process for every user --> <service android:name=".doze.DozeService" Loading
packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalHub.kt +3 −5 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.input.pointer.pointerInput import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp import androidx.compose.ui.viewinterop.AndroidView Loading Loading @@ -89,11 +90,8 @@ fun CommunalHub( ) } } IconButton(onClick = viewModel::onOpenWidgetPicker) { Icon( Icons.Default.Add, LocalContext.current.getString(R.string.button_to_open_widget_picker) ) IconButton(onClick = viewModel::onOpenWidgetEditor) { Icon(Icons.Default.Add, stringResource(R.string.button_to_open_widget_editor)) } // This spacer covers the edge of the LazyHorizontalGrid and prevents it from receiving Loading
packages/SystemUI/res/layout/edit_widgets.xml 0 → 100644 +32 −0 Original line number Diff line number Diff line <!-- ~ Copyright (C) 2023 The Android Open Source Project ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. --> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/edit_widgets" android:layout_width="match_parent" android:layout_height="match_parent"> <Button style="@android:Widget.DeviceDefault.Button.Colored" android:id="@+id/add_widget" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:textSize="28sp" android:text="@string/hub_mode_add_widget_button_text"/> </FrameLayout>
packages/SystemUI/res/layout/widget_picker.xml 0 → 100644 +26 −0 Original line number Diff line number Diff line <!-- ~ Copyright (C) 2023 The Android Open Source Project ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/widgets_container" android:layout_width="match_parent" android:layout_height="match_parent" android:padding="64dp" android:gravity="center_vertical" android:orientation="horizontal"> </LinearLayout>
packages/SystemUI/res/values/strings.xml +4 −2 Original line number Diff line number Diff line Loading @@ -1056,10 +1056,12 @@ <!-- Indicator on keyguard to start the communal tutorial. [CHAR LIMIT=100] --> <string name="communal_tutorial_indicator_text">Swipe left to start the communal tutorial</string> <!-- Description for the button that opens the widget picker on click. [CHAR LIMIT=50] --> <string name="button_to_open_widget_picker">Open the widget picker</string> <!-- Description for the button that opens the widget editor on click. [CHAR LIMIT=50] --> <string name="button_to_open_widget_editor">Open the widget editor</string> <!-- Description for the button that removes a widget on click. [CHAR LIMIT=50] --> <string name="button_to_remove_widget">Remove a widget</string> <!-- Text for the button that launches the hub mode widget picker. [CHAR LIMIT=50] --> <string name="hub_mode_add_widget_button_text">Add Widget</string> <!-- Related to user switcher --><skip/> Loading