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

Commit 7bfe5736 authored by Daniel Norman's avatar Daniel Norman
Browse files

Moves BrightnessUtils into SettingsLib DisplayUtils.

(Renamed from DisplayDensityUtils to be more generic)

This allows the AccessibilityMenu accessibility service APK
to include a much smaller dependency static library, decreasing
the post-optimization APK size from 3mb to 200kb.

Bug: 261252772
Test: build-only changes; check local & Treehugger builds
test: inspect AccessibilityMenu APK size
Change-Id: Iad36eb739ac38d923acabe558bc8f9c0395495d3
parent e4cf24d7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ android_library {
        "SettingsLibAdaptiveIcon",
        "SettingsLibRadioButtonPreference",
        "SettingsLibSelectorWithWidgetPreference",
        "SettingsLibDisplayDensityUtils",
        "SettingsLibDisplayUtils",
        "SettingsLibUtils",
        "SettingsLibEmergencyNumber",
        "SettingsLibTopIntroPreference",
+0 −21
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ 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.
  -->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.android.settingslib.display">

</manifest>
+1 −1
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@ package {
}

android_library {
    name: "SettingsLibDisplayDensityUtils",
    name: "SettingsLibDisplayUtils",

    srcs: ["src/**/*.java"],

+21 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  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.
  -->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.android.settingslib.display">

</manifest>
+1 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.settingslib.display;

import android.util.MathUtils;

/** Utility methods for calculating the display brightness. */
public class BrightnessUtils {

    public static final int GAMMA_SPACE_MIN = 0;
Loading