Initial unified commit for Android 11, syncing up to v311
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
From 381142e1299600d7b16c77c57207732dd06536fc Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Koskovich <zvnexus@outlook.com>
|
||||
Date: Sat, 3 Oct 2020 14:28:35 -0700
|
||||
Subject: [PATCH] Make broken copy headers the default.
|
||||
|
||||
* Do not take this for S unless needed, this is a hack
|
||||
for this cycle.
|
||||
|
||||
Change-Id: I55c8897d7d4d5c2a9e62b1a931b3856b2e38956e
|
||||
---
|
||||
core/board_config.mk | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/core/board_config.mk b/core/board_config.mk
|
||||
index 86162b6f3..d152bdff6 100644
|
||||
--- a/core/board_config.mk
|
||||
+++ b/core/board_config.mk
|
||||
@@ -113,6 +113,7 @@ endif
|
||||
# ###############################################################
|
||||
$(foreach v,$(_build_broken_var_list),$(eval $(v) :=))
|
||||
BUILD_BROKEN_NINJA_USES_ENV_VARS :=
|
||||
+BUILD_BROKEN_USES_BUILD_COPY_HEADERS := true
|
||||
|
||||
# Boards may be defined under $(SRC_TARGET_DIR)/board/$(TARGET_DEVICE)
|
||||
# or under vendor/*/$(TARGET_DEVICE). Search in both places, but
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
From 0353d82691df67c3497cc0df021d8a0850b6cfec Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Tue, 6 Oct 2020 01:41:16 +0000
|
||||
Subject: [PATCH 1/3] UI: Revive navbar layout tuning via sysui_nav_bar tunable
|
||||
|
||||
Google keeps fixing what ain't broken.
|
||||
This partially undoes https://github.com/LineageOS/android_frameworks_base/commit/e0d5ccd331e694afdc3c8462a1b845df329de2b8 and https://github.com/LineageOS/android_frameworks_base/commit/d34b4e8d278386b85a00018c502bd21d00f8813b
|
||||
|
||||
Change-Id: Ied7d7859e50fd0fcc346219964e747c5d5f4c352
|
||||
---
|
||||
.../statusbar/phone/NavigationBarInflaterView.java | 14 ++++++++++++++
|
||||
1 file changed, 14 insertions(+)
|
||||
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarInflaterView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarInflaterView.java
|
||||
index 047cb702c55..e4b3395f57a 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarInflaterView.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarInflaterView.java
|
||||
@@ -108,6 +108,7 @@ public class NavigationBarInflaterView extends FrameLayout
|
||||
|
||||
private boolean mIsVertical;
|
||||
private boolean mAlternativeOrder;
|
||||
+ private boolean mUsingCustomLayout;
|
||||
|
||||
private OverviewProxyService mOverviewProxyService;
|
||||
private int mNavBarMode = NAV_BAR_MODE_3BUTTON;
|
||||
@@ -173,6 +174,7 @@ public class NavigationBarInflaterView extends FrameLayout
|
||||
super.onAttachedToWindow();
|
||||
Dependency.get(TunerService.class).addTunable(this, NAV_BAR_INVERSE);
|
||||
Dependency.get(TunerService.class).addTunable(this, KEY_NAVIGATION_HINT);
|
||||
+ Dependency.get(TunerService.class).addTunable(this, NAV_BAR_VIEWS);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -191,6 +193,8 @@ public class NavigationBarInflaterView extends FrameLayout
|
||||
mIsHintEnabled = TunerService.parseIntegerSwitch(newValue, true);
|
||||
updateHint();
|
||||
onLikelyDefaultLayoutChange();
|
||||
+ } else if (NAV_BAR_VIEWS.equals(key)) {
|
||||
+ setNavigationBarLayout(newValue);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -200,7 +204,17 @@ public class NavigationBarInflaterView extends FrameLayout
|
||||
updateLayoutInversion();
|
||||
}
|
||||
|
||||
+ public void setNavigationBarLayout(String layoutValue) {
|
||||
+ if (!Objects.equals(mCurrentLayout, layoutValue)) {
|
||||
+ mUsingCustomLayout = layoutValue != null;
|
||||
+ clearViews();
|
||||
+ inflateLayout(layoutValue);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
public void onLikelyDefaultLayoutChange() {
|
||||
+ // Don't override custom layouts
|
||||
+ if (mUsingCustomLayout) return;
|
||||
|
||||
// Reevaluate new layout
|
||||
final String newValue = getDefaultLayout();
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
From 6fdadb36add6aa2f8c6c3d25c4ff8135278a9919 Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Sun, 10 Jan 2021 11:44:29 +0000
|
||||
Subject: [PATCH 2/3] UI: Disable wallpaper zoom
|
||||
|
||||
It does little more than inducing motion sickness
|
||||
|
||||
Change-Id: I78cc5484930b27f172cd8d8a5bd9042dce3478d0
|
||||
---
|
||||
core/res/res/values/config.xml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
|
||||
index 51b461e7949..f761d28e68d 100644
|
||||
--- a/core/res/res/values/config.xml
|
||||
+++ b/core/res/res/values/config.xml
|
||||
@@ -4384,7 +4384,7 @@
|
||||
<string name="config_customSessionPolicyProvider"></string>
|
||||
|
||||
<!-- The max scale for the wallpaper when it's zoomed in -->
|
||||
- <item name="config_wallpaperMaxScale" format="float" type="dimen">1.10</item>
|
||||
+ <item name="config_wallpaperMaxScale" format="float" type="dimen">1</item>
|
||||
|
||||
<!-- Package name that will receive an explicit manifest broadcast for
|
||||
android.os.action.POWER_SAVE_MODE_CHANGED. -->
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
From 2fba4148047720a307d88013f20dbb87e389a751 Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Thu, 5 Apr 2018 10:01:19 +0800
|
||||
Subject: [PATCH 3/3] Disable vendor mismatch warning
|
||||
|
||||
Change-Id: Ieb8fe91e2f02462f074312ed0f4885d183e9780b
|
||||
---
|
||||
.../server/wm/ActivityTaskManagerService.java | 16 ++--------------
|
||||
1 file changed, 2 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
||||
index ec178a4b543..f1d9cd968bc 100644
|
||||
--- a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
||||
+++ b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
||||
@@ -6494,20 +6494,8 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
|
||||
}
|
||||
|
||||
if (!Build.isBuildConsistent()) {
|
||||
- Slog.e(TAG, "Build fingerprint is not consistent, warning user");
|
||||
- mUiHandler.post(() -> {
|
||||
- if (mShowDialogs) {
|
||||
- AlertDialog d = new BaseErrorDialog(mUiContext);
|
||||
- d.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ERROR);
|
||||
- d.setCancelable(false);
|
||||
- d.setTitle(mUiContext.getText(R.string.android_system_label));
|
||||
- d.setMessage(mUiContext.getText(R.string.system_error_manufacturer));
|
||||
- d.setButton(DialogInterface.BUTTON_POSITIVE,
|
||||
- mUiContext.getText(R.string.ok),
|
||||
- mUiHandler.obtainMessage(DISMISS_DIALOG_UI_MSG, d));
|
||||
- d.show();
|
||||
- }
|
||||
- });
|
||||
+ Slog.e(TAG, "Build fingerprint is not consistent");
|
||||
+ // Do not emit warning about vendor mismatch
|
||||
}
|
||||
}
|
||||
}
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
From 95ef97f5aa82c15e47f9313eca4899d89dba5dd0 Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Wed, 4 Jul 2018 17:59:14 +0800
|
||||
Subject: [PATCH] sdk: Invert per-app stretch-to-fullscreen implementation
|
||||
|
||||
Change-Id: Idf7dab4e1e0c79953fa672f33ec65fecffb37c83
|
||||
---
|
||||
sdk/src/java/org/lineageos/internal/applications/LongScreen.java | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/sdk/src/java/org/lineageos/internal/applications/LongScreen.java b/sdk/src/java/org/lineageos/internal/applications/LongScreen.java
|
||||
index 7fe0d68..26ea349 100644
|
||||
--- a/sdk/src/java/org/lineageos/internal/applications/LongScreen.java
|
||||
+++ b/sdk/src/java/org/lineageos/internal/applications/LongScreen.java
|
||||
@@ -57,7 +57,7 @@ public class LongScreen {
|
||||
}
|
||||
|
||||
public boolean shouldForceLongScreen(String packageName) {
|
||||
- return isSupported() && mApps.contains(packageName);
|
||||
+ return isSupported() && !(mApps.contains(packageName));
|
||||
}
|
||||
|
||||
public Set<String> getApps() {
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
From 6f9026e0548bd82e7b728ef29dd7d14db93b2105 Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Sat, 26 Jun 2021 14:23:09 +0000
|
||||
Subject: [PATCH] Jelly: MainActivity: Restore applyThemeColor
|
||||
|
||||
Fixes black statusbar on start
|
||||
|
||||
Change-Id: I6816f5b1dcb3c7bcaee2736a9e2a3ecd63217bc6
|
||||
---
|
||||
app/src/main/java/org/lineageos/jelly/MainActivity.kt | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/app/src/main/java/org/lineageos/jelly/MainActivity.kt b/app/src/main/java/org/lineageos/jelly/MainActivity.kt
|
||||
index 2902b0a..9ff74ed 100644
|
||||
--- a/app/src/main/java/org/lineageos/jelly/MainActivity.kt
|
||||
+++ b/app/src/main/java/org/lineageos/jelly/MainActivity.kt
|
||||
@@ -193,6 +193,7 @@ class MainActivity : WebViewExtActivity(), SearchBarController.OnCancelListener,
|
||||
findViewById(R.id.search_menu_cancel),
|
||||
this)
|
||||
setUiMode()
|
||||
+ applyThemeColor(mThemeColor)
|
||||
try {
|
||||
val httpCacheDir = File(cacheDir, "suggestion_responses")
|
||||
val httpCacheSize = 1024 * 1024.toLong() // 1 MiB
|
||||
@@ -763,4 +764,4 @@ class MainActivity : WebViewExtActivity(), SearchBarController.OnCancelListener,
|
||||
private const val STORAGE_PERM_REQ = 423
|
||||
private const val LOCATION_PERM_REQ = 424
|
||||
}
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
From 47bf5612cec98931ee3076c307247ac58d07ccff Mon Sep 17 00:00:00 2001
|
||||
From: AndyCGYan <GeForce8800Ultra@gmail.com>
|
||||
Date: Sun, 13 Jan 2019 21:44:48 +0800
|
||||
Subject: [PATCH] LineageParts: Invert per-app stretch-to-fullscreen
|
||||
|
||||
Change-Id: Icb02c8dfd84882f736e37d6cd92c35e5eb288faa
|
||||
---
|
||||
res/layout/long_screen_layout.xml | 2 +-
|
||||
res/values-zh-rCN/strings.xml | 6 +++---
|
||||
res/values/strings.xml | 6 +++---
|
||||
res/xml/long_screen_prefs.xml | 2 +-
|
||||
res/xml/parts_catalog.xml | 4 ++--
|
||||
.../lineageparts/applications/LongScreenSettings.java | 2 +-
|
||||
6 files changed, 11 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/res/layout/long_screen_layout.xml b/res/layout/long_screen_layout.xml
|
||||
index 40d0938..1119cef 100644
|
||||
--- a/res/layout/long_screen_layout.xml
|
||||
+++ b/res/layout/long_screen_layout.xml
|
||||
@@ -36,7 +36,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
- android:text="@string/long_screen_settings_no_apps"
|
||||
+ android:text="@string/inverse_long_screen_settings_no_apps"
|
||||
android:textSize="18dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
|
||||
index ee5f7f9..eeed571 100644
|
||||
--- a/res/values-zh-rCN/strings.xml
|
||||
+++ b/res/values-zh-rCN/strings.xml
|
||||
@@ -448,9 +448,9 @@
|
||||
<string name="auto_power_save_summary_on">电量 %s 时自动启用省电</string>
|
||||
<string name="auto_power_save_summary_off">不要自动启用省电</string>
|
||||
<string name="auto_power_save_never">永不</string>
|
||||
- <string name="long_screen_settings_title">全屏应用</string>
|
||||
- <string name="long_screen_settings_summary">强制旧式应用程序使用全屏长宽比</string>
|
||||
- <string name="long_screen_settings_no_apps">无应用</string>
|
||||
+ <string name="inverse_long_screen_settings_title">禁用拉伸全屏</string>
|
||||
+ <string name="inverse_long_screen_settings_summary">对选定的应用禁用拉伸全屏</string>
|
||||
+ <string name="inverse_long_screen_settings_no_apps">无应用</string>
|
||||
<string name="charging_sounds_settings_title">充电提示音</string>
|
||||
<string name="charging_sounds_enabled_title">启用</string>
|
||||
<string name="charging_sounds_enabled_summary">连接或断开电源时发出声音</string>
|
||||
diff --git a/res/values/strings.xml b/res/values/strings.xml
|
||||
index 65d799a..ff23ae9 100644
|
||||
--- a/res/values/strings.xml
|
||||
+++ b/res/values/strings.xml
|
||||
@@ -579,9 +579,9 @@
|
||||
<string name="auto_power_save_never">Never</string>
|
||||
|
||||
<!-- Applications: Long screen -->
|
||||
- <string name="long_screen_settings_title">Full screen apps</string>
|
||||
- <string name="long_screen_settings_summary">Force legacy apps to use full screen aspect ratio</string>
|
||||
- <string name="long_screen_settings_no_apps">No apps</string>
|
||||
+ <string name="inverse_long_screen_settings_title">Disable stretch-to-fullscreen</string>
|
||||
+ <string name="inverse_long_screen_settings_summary">Prevent selected apps from utilizing stretch-to-fullscreen</string>
|
||||
+ <string name="inverse_long_screen_settings_no_apps">No apps</string>
|
||||
|
||||
<!-- Sounds: Charging sounds -->
|
||||
<string name="charging_sounds_settings_title">Charging sounds</string>
|
||||
diff --git a/res/xml/long_screen_prefs.xml b/res/xml/long_screen_prefs.xml
|
||||
index ec947fa..20da90a 100644
|
||||
--- a/res/xml/long_screen_prefs.xml
|
||||
+++ b/res/xml/long_screen_prefs.xml
|
||||
@@ -18,6 +18,6 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:lineage="http://schemas.android.com/apk/res/org.lineageos.lineageparts"
|
||||
android:key="long_screen_settings"
|
||||
- android:title="@string/long_screen_settings_title">
|
||||
+ android:title="@string/inverse_long_screen_settings_title">
|
||||
|
||||
</PreferenceScreen>
|
||||
diff --git a/res/xml/parts_catalog.xml b/res/xml/parts_catalog.xml
|
||||
index a4346c7..e21d7d5 100644
|
||||
--- a/res/xml/parts_catalog.xml
|
||||
+++ b/res/xml/parts_catalog.xml
|
||||
@@ -92,8 +92,8 @@
|
||||
lineage:xmlRes="@xml/perf_profile_settings" />
|
||||
|
||||
<part android:key="long_screen_settings"
|
||||
- android:title="@string/long_screen_settings_title"
|
||||
- android:summary="@string/long_screen_settings_summary"
|
||||
+ android:title="@string/inverse_long_screen_settings_title"
|
||||
+ android:summary="@string/inverse_long_screen_settings_summary"
|
||||
android:fragment="org.lineageos.lineageparts.applications.LongScreenSettings"
|
||||
lineage:xmlRes="@xml/long_screen_prefs" />
|
||||
|
||||
diff --git a/src/org/lineageos/lineageparts/applications/LongScreenSettings.java b/src/org/lineageos/lineageparts/applications/LongScreenSettings.java
|
||||
index ac04058..50ff8f6 100644
|
||||
--- a/src/org/lineageos/lineageparts/applications/LongScreenSettings.java
|
||||
+++ b/src/org/lineageos/lineageparts/applications/LongScreenSettings.java
|
||||
@@ -246,7 +246,7 @@ public class LongScreenSettings extends SettingsPreferenceFragment
|
||||
mApplicationsState.ensureIcon(entry);
|
||||
holder.icon.setImageDrawable(entry.icon);
|
||||
holder.state.setTag(entry);
|
||||
- holder.state.setChecked(mLongScreen.shouldForceLongScreen(entry.info.packageName));
|
||||
+ holder.state.setChecked(!(mLongScreen.shouldForceLongScreen(entry.info.packageName)));
|
||||
return holder.rootView;
|
||||
}
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,448 @@
|
||||
From 69e5c49e18b9f33cebde3d54c69477ef2c18a756 Mon Sep 17 00:00:00 2001
|
||||
From: Vachounet <vachounet@live.fr>
|
||||
Date: Tue, 24 Nov 2020 05:49:46 +0000
|
||||
Subject: [PATCH] Trebuchet: Move clear all button to actions view
|
||||
|
||||
Change-Id: I9d13247501ca8e1610c17adc204ad64dd4a04cec
|
||||
---
|
||||
.../RecentsViewStateController.java | 3 -
|
||||
.../FallbackRecentsStateController.java | 3 -
|
||||
.../quickstep/views/ClearAllButton.java | 112 ------------------
|
||||
.../android/quickstep/views/RecentsView.java | 52 ++------
|
||||
.../res/drawable/ic_clear_all_recents.xml | 21 ++++
|
||||
.../res/layout/overview_actions_container.xml | 17 ++-
|
||||
.../res/layout/overview_clear_all_button.xml | 27 -----
|
||||
7 files changed, 44 insertions(+), 191 deletions(-)
|
||||
delete mode 100644 quickstep/recents_ui_overrides/src/com/android/quickstep/views/ClearAllButton.java
|
||||
create mode 100644 quickstep/res/drawable/ic_clear_all_recents.xml
|
||||
delete mode 100644 quickstep/res/layout/overview_clear_all_button.xml
|
||||
|
||||
diff --git a/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/RecentsViewStateController.java b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/RecentsViewStateController.java
|
||||
index 5ccc1e868..bc47c5a00 100644
|
||||
--- a/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/RecentsViewStateController.java
|
||||
+++ b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/RecentsViewStateController.java
|
||||
@@ -35,7 +35,6 @@ import com.android.launcher3.anim.PendingAnimation;
|
||||
import com.android.launcher3.anim.PropertySetter;
|
||||
import com.android.launcher3.states.StateAnimationConfig;
|
||||
import com.android.launcher3.util.MultiValueAlpha;
|
||||
-import com.android.quickstep.views.ClearAllButton;
|
||||
import com.android.quickstep.views.LauncherRecentsView;
|
||||
import com.android.quickstep.views.RecentsView;
|
||||
|
||||
@@ -84,8 +83,6 @@ public final class RecentsViewStateController extends
|
||||
private void setAlphas(PropertySetter propertySetter, StateAnimationConfig config,
|
||||
LauncherState state) {
|
||||
float buttonAlpha = (state.getVisibleElements(mLauncher) & OVERVIEW_BUTTONS) != 0 ? 1 : 0;
|
||||
- propertySetter.setFloat(mRecentsView.getClearAllButton(), ClearAllButton.VISIBILITY_ALPHA,
|
||||
- buttonAlpha, LINEAR);
|
||||
propertySetter.setFloat(mLauncher.getActionsView().getVisibilityAlpha(),
|
||||
MultiValueAlpha.VALUE, buttonAlpha, config.getInterpolator(
|
||||
ANIM_OVERVIEW_ACTIONS_FADE, LINEAR));
|
||||
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/fallback/FallbackRecentsStateController.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/fallback/FallbackRecentsStateController.java
|
||||
index 24a761066..7af77ef60 100644
|
||||
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/fallback/FallbackRecentsStateController.java
|
||||
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/fallback/FallbackRecentsStateController.java
|
||||
@@ -35,7 +35,6 @@ import com.android.launcher3.statemanager.StateManager.StateHandler;
|
||||
import com.android.launcher3.states.StateAnimationConfig;
|
||||
import com.android.launcher3.util.MultiValueAlpha;
|
||||
import com.android.quickstep.RecentsActivity;
|
||||
-import com.android.quickstep.views.ClearAllButton;
|
||||
|
||||
/**
|
||||
* State controller for fallback recents activity
|
||||
@@ -78,8 +77,6 @@ public class FallbackRecentsStateController implements StateHandler<RecentsState
|
||||
private void setProperties(RecentsState state, StateAnimationConfig config,
|
||||
PropertySetter setter) {
|
||||
float buttonAlpha = state.hasButtons() ? 1 : 0;
|
||||
- setter.setFloat(mRecentsView.getClearAllButton(), ClearAllButton.VISIBILITY_ALPHA,
|
||||
- buttonAlpha, LINEAR);
|
||||
setter.setFloat(mActivity.getActionsView().getVisibilityAlpha(),
|
||||
MultiValueAlpha.VALUE, buttonAlpha, LINEAR);
|
||||
|
||||
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/ClearAllButton.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/ClearAllButton.java
|
||||
deleted file mode 100644
|
||||
index fd74357f3..000000000
|
||||
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/ClearAllButton.java
|
||||
+++ /dev/null
|
||||
@@ -1,112 +0,0 @@
|
||||
-/*
|
||||
- * Copyright (C) 2018 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.quickstep.views;
|
||||
-
|
||||
-import android.content.Context;
|
||||
-import android.util.AttributeSet;
|
||||
-import android.util.FloatProperty;
|
||||
-import android.widget.Button;
|
||||
-
|
||||
-import com.android.launcher3.touch.PagedOrientationHandler;
|
||||
-import com.android.quickstep.views.RecentsView.PageCallbacks;
|
||||
-import com.android.quickstep.views.RecentsView.ScrollState;
|
||||
-
|
||||
-public class ClearAllButton extends Button implements PageCallbacks {
|
||||
-
|
||||
- public static final FloatProperty<ClearAllButton> VISIBILITY_ALPHA =
|
||||
- new FloatProperty<ClearAllButton>("visibilityAlpha") {
|
||||
- @Override
|
||||
- public Float get(ClearAllButton view) {
|
||||
- return view.mVisibilityAlpha;
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public void setValue(ClearAllButton view, float v) {
|
||||
- view.setVisibilityAlpha(v);
|
||||
- }
|
||||
- };
|
||||
-
|
||||
- private float mScrollAlpha = 1;
|
||||
- private float mContentAlpha = 1;
|
||||
- private float mVisibilityAlpha = 1;
|
||||
-
|
||||
- private boolean mIsRtl;
|
||||
-
|
||||
- private int mScrollOffset;
|
||||
-
|
||||
- public ClearAllButton(Context context, AttributeSet attrs) {
|
||||
- super(context, attrs);
|
||||
- mIsRtl = getLayoutDirection() == LAYOUT_DIRECTION_RTL;
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
|
||||
- super.onLayout(changed, left, top, right, bottom);
|
||||
- PagedOrientationHandler orientationHandler = getRecentsView().getPagedOrientationHandler();
|
||||
- mScrollOffset = orientationHandler.getClearAllScrollOffset(getRecentsView(), mIsRtl);
|
||||
- }
|
||||
-
|
||||
- private RecentsView getRecentsView() {
|
||||
- return (RecentsView) getParent();
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public void onRtlPropertiesChanged(int layoutDirection) {
|
||||
- super.onRtlPropertiesChanged(layoutDirection);
|
||||
- mIsRtl = getLayoutDirection() == LAYOUT_DIRECTION_RTL;
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public boolean hasOverlappingRendering() {
|
||||
- return false;
|
||||
- }
|
||||
-
|
||||
- public void setContentAlpha(float alpha) {
|
||||
- if (mContentAlpha != alpha) {
|
||||
- mContentAlpha = alpha;
|
||||
- updateAlpha();
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- public void setVisibilityAlpha(float alpha) {
|
||||
- if (mVisibilityAlpha != alpha) {
|
||||
- mVisibilityAlpha = alpha;
|
||||
- updateAlpha();
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public void onPageScroll(ScrollState scrollState) {
|
||||
- PagedOrientationHandler orientationHandler = getRecentsView().getPagedOrientationHandler();
|
||||
- float orientationSize = orientationHandler.getPrimaryValue(getWidth(), getHeight());
|
||||
- if (orientationSize == 0) {
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- float shift = Math.min(scrollState.scrollFromEdge, orientationSize);
|
||||
- float translation = mIsRtl ? (mScrollOffset - shift) : (mScrollOffset + shift);
|
||||
- orientationHandler.setPrimaryAndResetSecondaryTranslate(this, translation);
|
||||
- mScrollAlpha = 1 - shift / orientationSize;
|
||||
- updateAlpha();
|
||||
- }
|
||||
-
|
||||
- private void updateAlpha() {
|
||||
- final float alpha = mScrollAlpha * mContentAlpha * mVisibilityAlpha;
|
||||
- setAlpha(alpha);
|
||||
- setClickable(alpha == 1);
|
||||
- }
|
||||
-}
|
||||
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java
|
||||
index 0130cae47..bfdd79e5f 100644
|
||||
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java
|
||||
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java
|
||||
@@ -85,6 +85,7 @@ import android.view.ViewGroup;
|
||||
import android.view.accessibility.AccessibilityEvent;
|
||||
import android.view.accessibility.AccessibilityNodeInfo;
|
||||
import android.view.animation.Interpolator;
|
||||
+import android.widget.Button;
|
||||
import android.widget.ListView;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
@@ -268,8 +269,7 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
|
||||
private final float mFastFlingVelocity;
|
||||
private final RecentsModel mModel;
|
||||
private final int mTaskTopMargin;
|
||||
- private final ClearAllButton mClearAllButton;
|
||||
- private final Rect mClearAllButtonDeadZoneRect = new Rect();
|
||||
+ private Button mClearAllButton;
|
||||
private final Rect mTaskViewDeadZoneRect = new Rect();
|
||||
|
||||
private final ScrollState mScrollState = new ScrollState();
|
||||
@@ -442,9 +442,6 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
|
||||
mModel = RecentsModel.INSTANCE.get(context);
|
||||
mIdp = InvariantDeviceProfile.INSTANCE.get(context);
|
||||
|
||||
- mClearAllButton = (ClearAllButton) LayoutInflater.from(context)
|
||||
- .inflate(R.layout.overview_clear_all_button, this, false);
|
||||
- mClearAllButton.setOnClickListener(this::dismissAllTasks);
|
||||
mTaskViewPool = new ViewPool<>(context, this, R.layout.task, 20 /* max size */,
|
||||
10 /* initial size */);
|
||||
|
||||
@@ -550,6 +547,8 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
|
||||
public void init(OverviewActionsView actionsView) {
|
||||
mActionsView = actionsView;
|
||||
mActionsView.updateHiddenFlags(HIDDEN_NO_TASKS, getTaskViewCount() == 0);
|
||||
+ mClearAllButton = (Button) mActionsView.findViewById(R.id.clear_all);
|
||||
+ mClearAllButton.setOnClickListener(this::dismissAllTasks);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -620,7 +619,7 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
|
||||
}
|
||||
|
||||
private void updateTaskStartIndex(View affectingView) {
|
||||
- if (!(affectingView instanceof TaskView) && !(affectingView instanceof ClearAllButton)) {
|
||||
+ if (!(affectingView instanceof TaskView)) {
|
||||
int childCount = getChildCount();
|
||||
|
||||
mTaskViewStartIndex = 0;
|
||||
@@ -674,7 +673,7 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
|
||||
* button fully visible, center page is Clear All button.
|
||||
*/
|
||||
public boolean isClearAllHidden() {
|
||||
- return mClearAllButton.getAlpha() != 1f;
|
||||
+ return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -732,11 +731,8 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
|
||||
mTouchDownToStartHome = true;
|
||||
} else {
|
||||
updateDeadZoneRects();
|
||||
- final boolean clearAllButtonDeadZoneConsumed =
|
||||
- mClearAllButton.getAlpha() == 1
|
||||
- && mClearAllButtonDeadZoneRect.contains(x, y);
|
||||
final boolean cameFromNavBar = (ev.getEdgeFlags() & EDGE_NAV_BAR) != 0;
|
||||
- if (!clearAllButtonDeadZoneConsumed && !cameFromNavBar
|
||||
+ if (!cameFromNavBar
|
||||
&& !mTaskViewDeadZoneRect.contains(x + getScrollX(), y)) {
|
||||
mTouchDownToStartHome = true;
|
||||
}
|
||||
@@ -783,18 +779,12 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
|
||||
|
||||
final int requiredTaskCount = tasks.size();
|
||||
if (getTaskViewCount() != requiredTaskCount) {
|
||||
- if (indexOfChild(mClearAllButton) != -1) {
|
||||
- removeView(mClearAllButton);
|
||||
- }
|
||||
for (int i = getTaskViewCount(); i < requiredTaskCount; i++) {
|
||||
addView(mTaskViewPool.getView());
|
||||
}
|
||||
while (getTaskViewCount() > requiredTaskCount) {
|
||||
removeView(getChildAt(getChildCount() - 1));
|
||||
}
|
||||
- if (requiredTaskCount > 0) {
|
||||
- addView(mClearAllButton);
|
||||
- }
|
||||
}
|
||||
|
||||
// Rebind and reset all task views
|
||||
@@ -834,16 +824,10 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
|
||||
for (int i = getTaskViewCount() - 1; i >= 0; i--) {
|
||||
removeView(getTaskViewAt(i));
|
||||
}
|
||||
- if (indexOfChild(mClearAllButton) != -1) {
|
||||
- removeView(mClearAllButton);
|
||||
- }
|
||||
}
|
||||
|
||||
public int getTaskViewCount() {
|
||||
int taskViewCount = getChildCount() - mTaskViewStartIndex;
|
||||
- if (indexOfChild(mClearAllButton) != -1) {
|
||||
- taskViewCount--;
|
||||
- }
|
||||
return taskViewCount;
|
||||
}
|
||||
|
||||
@@ -1199,9 +1183,6 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
|
||||
// Add an empty view for now until the task plan is loaded and applied
|
||||
final TaskView taskView = mTaskViewPool.getView();
|
||||
addView(taskView, mTaskViewStartIndex);
|
||||
- if (wasEmpty) {
|
||||
- addView(mClearAllButton);
|
||||
- }
|
||||
// The temporary running task is only used for the duration between the start of the
|
||||
// gesture and the task list is loaded and applied
|
||||
mTmpRunningTask = Task.from(new TaskKey(runningTaskInfo), runningTaskInfo, false);
|
||||
@@ -1538,7 +1519,6 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
|
||||
removeViewInLayout(taskView);
|
||||
|
||||
if (getTaskViewCount() == 0) {
|
||||
- removeViewInLayout(mClearAllButton);
|
||||
startHome();
|
||||
} else {
|
||||
snapToPageImmediately(pageToSnapTo);
|
||||
@@ -1677,7 +1657,6 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
|
||||
child.setStableAlpha(alpha);
|
||||
}
|
||||
}
|
||||
- mClearAllButton.setContentAlpha(mContentAlpha);
|
||||
int alphaInt = Math.round(alpha * 255);
|
||||
mEmptyMessagePaint.setAlpha(alphaInt);
|
||||
mEmptyIcon.setAlpha(alphaInt);
|
||||
@@ -1740,10 +1719,6 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
|
||||
setLayoutDirection(mIsRtl
|
||||
? View.LAYOUT_DIRECTION_RTL
|
||||
: View.LAYOUT_DIRECTION_LTR);
|
||||
- mClearAllButton.setLayoutDirection(mIsRtl
|
||||
- ? View.LAYOUT_DIRECTION_LTR
|
||||
- : View.LAYOUT_DIRECTION_RTL);
|
||||
- mClearAllButton.setRotation(mOrientationHandler.getDegreesRotated());
|
||||
mActivity.getDragLayer().recreateControllers();
|
||||
boolean isInLandscape = mOrientationState.getTouchRotation() != ROTATION_0
|
||||
|| mOrientationState.getRecentsActivityRotation() != ROTATION_0;
|
||||
@@ -1963,15 +1938,6 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
|
||||
}
|
||||
|
||||
private void updateDeadZoneRects() {
|
||||
- // Get the deadzone rect surrounding the clear all button to not dismiss overview to home
|
||||
- mClearAllButtonDeadZoneRect.setEmpty();
|
||||
- if (mClearAllButton.getWidth() > 0) {
|
||||
- int verticalMargin = getResources()
|
||||
- .getDimensionPixelSize(R.dimen.recents_clear_all_deadzone_vertical_margin);
|
||||
- mClearAllButton.getHitRect(mClearAllButtonDeadZoneRect);
|
||||
- mClearAllButtonDeadZoneRect.inset(-getPaddingRight() / 2, -verticalMargin);
|
||||
- }
|
||||
-
|
||||
// Get the deadzone rect between the task views
|
||||
mTaskViewDeadZoneRect.setEmpty();
|
||||
int count = getTaskViewCount();
|
||||
@@ -2304,10 +2270,6 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView
|
||||
return super.computeMaxScroll();
|
||||
}
|
||||
|
||||
- public ClearAllButton getClearAllButton() {
|
||||
- return mClearAllButton;
|
||||
- }
|
||||
-
|
||||
@Override
|
||||
protected boolean onOverscroll(int amount) {
|
||||
// overscroll should only be accepted on -1 direction (for clear all button)
|
||||
diff --git a/quickstep/res/drawable/ic_clear_all_recents.xml b/quickstep/res/drawable/ic_clear_all_recents.xml
|
||||
new file mode 100644
|
||||
index 000000000..7cba0220b
|
||||
--- /dev/null
|
||||
+++ b/quickstep/res/drawable/ic_clear_all_recents.xml
|
||||
@@ -0,0 +1,21 @@
|
||||
+<!-- Copyright (C) 2020 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.
|
||||
+-->
|
||||
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
+ android:height="24dp"
|
||||
+ android:width="24dp"
|
||||
+ android:viewportWidth="24"
|
||||
+ android:viewportHeight="24">
|
||||
+ <path android:fillColor="#FF000000" android:pathData="M5,13H19V11H5M3,17H17V15H3M7,7V9H21V7" />
|
||||
+</vector>
|
||||
diff --git a/quickstep/res/layout/overview_actions_container.xml b/quickstep/res/layout/overview_actions_container.xml
|
||||
index 258f24a54..302cabf8a 100644
|
||||
--- a/quickstep/res/layout/overview_actions_container.xml
|
||||
+++ b/quickstep/res/layout/overview_actions_container.xml
|
||||
@@ -45,6 +45,21 @@
|
||||
android:layout_height="1dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
+ <Button
|
||||
+ style="@style/OverviewActionButton"
|
||||
+ android:id="@+id/clear_all"
|
||||
+ android:layout_width="wrap_content"
|
||||
+ android:layout_height="wrap_content"
|
||||
+ android:text="@string/recents_clear_all"
|
||||
+ android:theme="@style/ThemeControlHighlightWorkspaceColor"
|
||||
+ android:drawableStart="@drawable/ic_clear_all_recents"
|
||||
+ />
|
||||
+
|
||||
+ <Space
|
||||
+ android:layout_width="0dp"
|
||||
+ android:layout_height="1dp"
|
||||
+ android:layout_weight="1" />
|
||||
+
|
||||
<Button
|
||||
android:id="@+id/action_share"
|
||||
style="@style/OverviewActionButton"
|
||||
@@ -63,4 +78,4 @@
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
|
||||
-</com.android.quickstep.views.OverviewActionsView>
|
||||
\ No newline at end of file
|
||||
+</com.android.quickstep.views.OverviewActionsView>
|
||||
diff --git a/quickstep/res/layout/overview_clear_all_button.xml b/quickstep/res/layout/overview_clear_all_button.xml
|
||||
deleted file mode 100644
|
||||
index fc06ba057..000000000
|
||||
--- a/quickstep/res/layout/overview_clear_all_button.xml
|
||||
+++ /dev/null
|
||||
@@ -1,27 +0,0 @@
|
||||
-<?xml version="1.0" encoding="utf-8"?>
|
||||
-<!--
|
||||
- Copyright (C) 2018 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.
|
||||
--->
|
||||
-<com.android.quickstep.views.ClearAllButton
|
||||
- xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
- style="@android:style/Widget.DeviceDefault.Button.Borderless"
|
||||
- android:id="@+id/clear_all"
|
||||
- android:layout_width="wrap_content"
|
||||
- android:layout_height="wrap_content"
|
||||
- android:text="@string/recents_clear_all"
|
||||
- android:textColor="?attr/workspaceTextColor"
|
||||
- android:textSize="14sp"
|
||||
- android:translationY="@dimen/task_thumbnail_half_top_margin"
|
||||
- />
|
||||
\ No newline at end of file
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
From 7a633a53d8e20e2d976597a332bf5ba855ec1f75 Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Thu, 5 Sep 2019 02:08:22 +0000
|
||||
Subject: [PATCH] vendor_lineage: Log privapp-permissions whitelist violations
|
||||
instead
|
||||
|
||||
Change-Id: I49dba61f332253e291a65e79ca70d9a07d45bb07
|
||||
---
|
||||
config/common.mk | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/config/common.mk b/config/common.mk
|
||||
index 2fe9cb01..7d971bba 100644
|
||||
--- a/config/common.mk
|
||||
+++ b/config/common.mk
|
||||
@@ -70,9 +70,9 @@ PRODUCT_COPY_FILES += \
|
||||
PRODUCT_COPY_FILES += \
|
||||
vendor/lineage/config/permissions/org.lineageos.android.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/permissions/org.lineageos.android.xml
|
||||
|
||||
-# Enforce privapp-permissions whitelist
|
||||
+# Log privapp-permissions whitelist violations
|
||||
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
|
||||
- ro.control_privapp_permissions=enforce
|
||||
+ ro.control_privapp_permissions=log
|
||||
|
||||
# Include AOSP audio files
|
||||
include vendor/lineage/config/aosp_audio.mk
|
||||
--
|
||||
2.17.1
|
||||
|
||||
Reference in New Issue
Block a user