Loading packages/SystemUI/AndroidManifest.xml +8 −0 Original line number Original line Diff line number Diff line Loading @@ -325,6 +325,14 @@ android:permission="android.permission.BIND_WALLPAPER" android:permission="android.permission.BIND_WALLPAPER" android:exported="true" /> android:exported="true" /> <activity android:name=".bubbles.BubbleOverflowActivity" android:theme="@style/BubbleOverflow" android:excludeFromRecents="true" android:documentLaunchMode="always" android:resizeableActivity="true"> </activity> <activity android:name=".tuner.TunerActivity" <activity android:name=".tuner.TunerActivity" android:enabled="false" android:enabled="false" android:icon="@drawable/tuner" android:icon="@drawable/tuner" Loading packages/SystemUI/res/layout/bubble_overflow_activity.xml 0 → 100644 +20 −0 Original line number Original line Diff line number Diff line <!-- ~ Copyright (C) 2019 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 --> <androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/bubble_overflow_recycler" android:scrollbars="vertical" android:layout_width="wrap_content" android:layout_height="match_parent"/> packages/SystemUI/res/values/styles.xml +1 −0 Original line number Original line Diff line number Diff line Loading @@ -15,6 +15,7 @@ --> --> <resources xmlns:android="http://schemas.android.com/apk/res/android"> <resources xmlns:android="http://schemas.android.com/apk/res/android"> <style name="BubbleOverflow" parent="@android:style/Theme.NoTitleBar"></style> <style name="ClearAllButtonDefaultMargins"> <style name="ClearAllButtonDefaultMargins"> <item name="android:layout_marginStart">0dp</item> <item name="android:layout_marginStart">0dp</item> Loading packages/SystemUI/src/com/android/systemui/bubbles/BubbleOverflowActivity.java 0 → 100644 +69 −0 Original line number Original line Diff line number Diff line package com.android.systemui.bubbles; import android.app.Activity; import android.content.res.TypedArray; import android.graphics.Color; import android.os.Bundle; import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.RecyclerView; import com.android.systemui.R; /** * Activity for showing aged out bubbles. * Must be public to be accessible to androidx...AppComponentFactory */ public class BubbleOverflowActivity extends Activity { private RecyclerView mRecyclerView; private int mMaxBubbles; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.bubble_overflow_activity); setBackgroundColor(); mMaxBubbles = getResources().getInteger(R.integer.bubbles_max_rendered); mRecyclerView = findViewById(R.id.bubble_overflow_recycler); mRecyclerView.setLayoutManager( new GridLayoutManager(getApplicationContext(), /* numberOfColumns */ mMaxBubbles)); } void setBackgroundColor() { final TypedArray ta = getApplicationContext().obtainStyledAttributes( new int[] {android.R.attr.colorBackgroundFloating}); int bgColor = ta.getColor(0, Color.WHITE); ta.recycle(); findViewById(android.R.id.content).setBackgroundColor(bgColor); } @Override public void onStart() { super.onStart(); } @Override public void onRestart() { super.onRestart(); } @Override public void onResume() { super.onResume(); } @Override public void onPause() { super.onPause(); } @Override public void onStop() { super.onStop(); } public void onDestroy() { super.onStop(); } } Loading
packages/SystemUI/AndroidManifest.xml +8 −0 Original line number Original line Diff line number Diff line Loading @@ -325,6 +325,14 @@ android:permission="android.permission.BIND_WALLPAPER" android:permission="android.permission.BIND_WALLPAPER" android:exported="true" /> android:exported="true" /> <activity android:name=".bubbles.BubbleOverflowActivity" android:theme="@style/BubbleOverflow" android:excludeFromRecents="true" android:documentLaunchMode="always" android:resizeableActivity="true"> </activity> <activity android:name=".tuner.TunerActivity" <activity android:name=".tuner.TunerActivity" android:enabled="false" android:enabled="false" android:icon="@drawable/tuner" android:icon="@drawable/tuner" Loading
packages/SystemUI/res/layout/bubble_overflow_activity.xml 0 → 100644 +20 −0 Original line number Original line Diff line number Diff line <!-- ~ Copyright (C) 2019 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 --> <androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/bubble_overflow_recycler" android:scrollbars="vertical" android:layout_width="wrap_content" android:layout_height="match_parent"/>
packages/SystemUI/res/values/styles.xml +1 −0 Original line number Original line Diff line number Diff line Loading @@ -15,6 +15,7 @@ --> --> <resources xmlns:android="http://schemas.android.com/apk/res/android"> <resources xmlns:android="http://schemas.android.com/apk/res/android"> <style name="BubbleOverflow" parent="@android:style/Theme.NoTitleBar"></style> <style name="ClearAllButtonDefaultMargins"> <style name="ClearAllButtonDefaultMargins"> <item name="android:layout_marginStart">0dp</item> <item name="android:layout_marginStart">0dp</item> Loading
packages/SystemUI/src/com/android/systemui/bubbles/BubbleOverflowActivity.java 0 → 100644 +69 −0 Original line number Original line Diff line number Diff line package com.android.systemui.bubbles; import android.app.Activity; import android.content.res.TypedArray; import android.graphics.Color; import android.os.Bundle; import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.RecyclerView; import com.android.systemui.R; /** * Activity for showing aged out bubbles. * Must be public to be accessible to androidx...AppComponentFactory */ public class BubbleOverflowActivity extends Activity { private RecyclerView mRecyclerView; private int mMaxBubbles; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.bubble_overflow_activity); setBackgroundColor(); mMaxBubbles = getResources().getInteger(R.integer.bubbles_max_rendered); mRecyclerView = findViewById(R.id.bubble_overflow_recycler); mRecyclerView.setLayoutManager( new GridLayoutManager(getApplicationContext(), /* numberOfColumns */ mMaxBubbles)); } void setBackgroundColor() { final TypedArray ta = getApplicationContext().obtainStyledAttributes( new int[] {android.R.attr.colorBackgroundFloating}); int bgColor = ta.getColor(0, Color.WHITE); ta.recycle(); findViewById(android.R.id.content).setBackgroundColor(bgColor); } @Override public void onStart() { super.onStart(); } @Override public void onRestart() { super.onRestart(); } @Override public void onResume() { super.onResume(); } @Override public void onPause() { super.onPause(); } @Override public void onStop() { super.onStop(); } public void onDestroy() { super.onStop(); } }