Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0064adf9 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 7625910 from 23ee1b87 to sc-release

Change-Id: Ie4f54c1939e4c67742037aab0131a6bac86aea21
parents 65b6baa2 23ee1b87
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -207,7 +207,9 @@ public class PackageItemInfo {
            return loadSafeLabel(pm, DEFAULT_MAX_LABEL_SIZE_PX, SAFE_STRING_FLAG_TRIM
                    | SAFE_STRING_FLAG_FIRST_LINE);
        } else {
            return loadUnsafeLabel(pm);
            // Trims the label string to the MAX_SAFE_LABEL_LENGTH. This is to prevent that the
            // system is overwhelmed by an enormous string returned by the application.
            return TextUtils.trimToSize(loadUnsafeLabel(pm), MAX_SAFE_LABEL_LENGTH);
        }
    }

+6 −0
Original line number Diff line number Diff line
@@ -482,6 +482,12 @@ nsecs_t CanvasContext::draw() {

    if (dirty.isEmpty() && Properties::skipEmptyFrames && !surfaceRequiresRedraw()) {
        mCurrentFrameInfo->addFlag(FrameInfoFlags::SkippedFrame);
        if (auto grContext = getGrContext()) {
            // Submit to ensure that any texture uploads complete and Skia can
            // free its staging buffers.
            grContext->flushAndSubmit();
        }

        // Notify the callbacks, even if there's nothing to draw so they aren't waiting
        // indefinitely
        waitOnFences();
+39 −1
Original line number Diff line number Diff line
@@ -3585,7 +3585,7 @@ public class SettingsProvider extends ContentProvider {
        }

        private final class UpgradeController {
            private static final int SETTINGS_VERSION = 203;
            private static final int SETTINGS_VERSION = 204;

            private final int mUserId;

@@ -5189,6 +5189,44 @@ public class SettingsProvider extends ContentProvider {
                    currentVersion = 203;
                }

                if (currentVersion == 203) {
                    // Version 204: Replace 'wifi' or 'cell' tiles with 'internet' if existed.
                    final SettingsState secureSettings = getSecureSettingsLocked(userId);
                    final Setting currentValue = secureSettings.getSettingLocked(Secure.QS_TILES);
                    if (!currentValue.isNull()) {
                        String tileList = currentValue.getValue();
                        String[] tileSplit = tileList.split(",");
                        final ArrayList<String> tiles = new ArrayList<String>();
                        boolean hasInternetTile = false;
                        for (int i = 0; i < tileSplit.length; i++) {
                            String tile = tileSplit[i].trim();
                            if (tile.isEmpty()) continue;
                            tiles.add(tile);
                            if (tile.equals("internet")) hasInternetTile = true;
                        }
                        if (!hasInternetTile) {
                            if (tiles.contains("wifi")) {
                                // Replace the WiFi with Internet, and remove the Cell
                                tiles.set(tiles.indexOf("wifi"), "internet");
                                tiles.remove("cell");
                            } else if (tiles.contains("cell")) {
                                // Replace the Cell with Internet
                                tiles.set(tiles.indexOf("cell"), "internet");
                            }
                        } else {
                            tiles.remove("wifi");
                            tiles.remove("cell");
                        }
                        secureSettings.insertSettingOverrideableByRestoreLocked(
                                Secure.QS_TILES,
                                TextUtils.join(",", tiles),
                                null /* tag */,
                                true /* makeDefault */,
                                SettingsState.SYSTEM_PACKAGE_NAME);
                    }
                    currentVersion = 204;
                }

                // vXXX: Add new settings above this point.

                if (currentVersion != newVersion) {
+1 −1
Original line number Diff line number Diff line
@@ -107,7 +107,7 @@

    <!-- Tiles native to System UI. Order should match "quick_settings_tiles_default" -->
    <string name="quick_settings_tiles_stock" translatable="false">
        internet,wifi,cell,bt,flashlight,dnd,alarm,airplane,controls,wallet,rotation,battery,cast,screenrecord,mictoggle,cameratoggle,location,hotspot,inversion,saver,dark,work,night,reverse,reduce_brightness
        internet,bt,flashlight,dnd,alarm,airplane,controls,wallet,rotation,battery,cast,screenrecord,mictoggle,cameratoggle,location,hotspot,inversion,saver,dark,work,night,reverse,reduce_brightness
    </string>

    <!-- The tiles to display in QuickSettings -->
+0 −36
Original line number Diff line number Diff line
@@ -51,7 +51,6 @@ import com.android.systemui.qs.external.TileServices;
import com.android.systemui.qs.logging.QSLogger;
import com.android.systemui.settings.UserTracker;
import com.android.systemui.shared.plugins.PluginManager;
import com.android.systemui.statusbar.FeatureFlags;
import com.android.systemui.statusbar.phone.AutoTileManager;
import com.android.systemui.statusbar.phone.StatusBar;
import com.android.systemui.statusbar.phone.StatusBarIconController;
@@ -512,33 +511,6 @@ public class QSTileHost implements QSHost, Tunable, PluginListener<QSFactory>, D
                }
            }
        }
        // TODO(b/174753536): Move it into the config file.
        // Only do the below hacking when at least one of the below tiles exist
        //   --InternetTile
        //   --WiFiTile
        //   --CellularTIle
        if (tiles.contains("internet") || tiles.contains("wifi") || tiles.contains("cell")) {
            if (FeatureFlags.isProviderModelSettingEnabled(context)) {
                if (!tiles.contains("internet")) {
                    if (tiles.contains("wifi")) {
                        // Replace the WiFi with Internet, and remove the Cell
                        tiles.set(tiles.indexOf("wifi"), "internet");
                        tiles.remove("cell");
                    } else if (tiles.contains("cell")) {
                        // Replace the Cell with Internet
                        tiles.set(tiles.indexOf("cell"), "internet");
                    }
                } else {
                    tiles.remove("wifi");
                    tiles.remove("cell");
                }
            } else {
                if (tiles.contains("internet")) {
                    tiles.set(tiles.indexOf("internet"), "wifi");
                    tiles.add("cell");
                }
            }
        }
        return tiles;
    }

@@ -558,14 +530,6 @@ public class QSTileHost implements QSHost, Tunable, PluginListener<QSFactory>, D
                && GarbageMonitor.ADD_MEMORY_TILE_TO_DEFAULT_ON_DEBUGGABLE_BUILDS) {
            tiles.add(GarbageMonitor.MemoryTile.TILE_SPEC);
        }
        // TODO(b/174753536): Change the config file directly.
        // Filter out unused tiles from the default QS config.
        if (FeatureFlags.isProviderModelSettingEnabled(context)) {
            tiles.remove("cell");
            tiles.remove("wifi");
        } else {
            tiles.remove("internet");
        }
        return tiles;
    }

Loading