Avoid some more layer creations
Bug: 17287256 Change-Id: I8c0c6f1f189b70d9a0c261f75987def3464d808d
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
android:layout_weight="1"
|
||||
android:layoutDirection="ltr"
|
||||
>
|
||||
<RelativeLayout
|
||||
<com.android.keyguard.AlphaOptimizedRelativeLayout
|
||||
android:id="@+id/row0"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
@@ -79,7 +79,7 @@
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="#28FFFFFF"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
</com.android.keyguard.AlphaOptimizedRelativeLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/row1"
|
||||
android:layout_width="match_parent"
|
||||
@@ -196,7 +196,7 @@
|
||||
androidprv:textView="@+id/pinEntry"
|
||||
androidprv:digit="0"
|
||||
/>
|
||||
<ImageButton
|
||||
<com.android.keyguard.AlphaOptimizedImageButton
|
||||
android:id="@+id/key_enter"
|
||||
android:layout_width="0px"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright (C) 2014 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
|
||||
*/
|
||||
|
||||
package com.android.keyguard;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.RelativeLayout;
|
||||
|
||||
/**
|
||||
* A frame layout which does not have overlapping renderings commands and therefore does not need a
|
||||
* layer when alpha is changed.
|
||||
*/
|
||||
public class AlphaOptimizedImageButton extends ImageButton {
|
||||
|
||||
public AlphaOptimizedImageButton(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasOverlappingRendering() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License
|
||||
*/
|
||||
|
||||
package com.android.systemui.statusbar;
|
||||
package com.android.keyguard;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Copyright (C) 2014 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
|
||||
*/
|
||||
|
||||
package com.android.keyguard;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.RelativeLayout;
|
||||
|
||||
/**
|
||||
* A frame layout which does not have overlapping renderings commands and therefore does not need a
|
||||
* layer when alpha is changed.
|
||||
*/
|
||||
public class AlphaOptimizedRelativeLayout extends RelativeLayout {
|
||||
|
||||
public AlphaOptimizedRelativeLayout(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasOverlappingRendering() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -17,13 +17,11 @@
|
||||
package com.android.keyguard;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
public class EmergencyCarrierArea extends LinearLayout {
|
||||
public class EmergencyCarrierArea extends AlphaOptimizedLinearLayout {
|
||||
|
||||
private CarrierText mCarrierText;
|
||||
private EmergencyButton mEmergencyButton;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License
|
||||
-->
|
||||
<com.android.systemui.statusbar.AlphaOptimizedLinearLayout
|
||||
<com.android.keyguard.AlphaOptimizedLinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/keyguard_user_switcher"
|
||||
android:orientation="vertical"
|
||||
@@ -23,4 +23,4 @@
|
||||
android:gravity="end"
|
||||
android:visibility="gone"
|
||||
android:paddingTop="4dp">
|
||||
</com.android.systemui.statusbar.AlphaOptimizedLinearLayout>
|
||||
</com.android.keyguard.AlphaOptimizedLinearLayout>
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
>
|
||||
<!-- The alpha of this area is both controlled from PhoneStatusBarTransitions and
|
||||
PhoneStatusBar (DISABLE_NOTIFICATION_ICONS), so we need two views here. -->
|
||||
<com.android.systemui.statusbar.AlphaOptimizedLinearLayout
|
||||
<com.android.keyguard.AlphaOptimizedLinearLayout
|
||||
android:id="@+id/notification_icon_area_inner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
@@ -74,10 +74,10 @@
|
||||
android:layout_alignParentStart="true"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"/>
|
||||
</com.android.systemui.statusbar.AlphaOptimizedLinearLayout>
|
||||
</com.android.keyguard.AlphaOptimizedLinearLayout>
|
||||
</com.android.systemui.statusbar.AlphaOptimizedFrameLayout>
|
||||
|
||||
<com.android.systemui.statusbar.AlphaOptimizedLinearLayout android:id="@+id/system_icon_area"
|
||||
<com.android.keyguard.AlphaOptimizedLinearLayout android:id="@+id/system_icon_area"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
@@ -94,7 +94,7 @@
|
||||
android:paddingStart="7dp"
|
||||
android:gravity="center_vertical|start"
|
||||
/>
|
||||
</com.android.systemui.statusbar.AlphaOptimizedLinearLayout>
|
||||
</com.android.keyguard.AlphaOptimizedLinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<ViewStub
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
android:scaleType="centerInside"/>
|
||||
</com.android.systemui.statusbar.phone.MultiUserSwitch>
|
||||
|
||||
<ImageButton android:id="@+id/settings_button"
|
||||
<com.android.keyguard.AlphaOptimizedImageButton android:id="@+id/settings_button"
|
||||
style="@android:style/Widget.Material.Button.Borderless"
|
||||
android:layout_toStartOf="@id/multi_user_switch"
|
||||
android:layout_width="48dp"
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<com.android.systemui.statusbar.AlphaOptimizedLinearLayout android:id="@+id/statusIcons"
|
||||
<com.android.keyguard.AlphaOptimizedLinearLayout android:id="@+id/statusIcons"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
|
||||
Reference in New Issue
Block a user