Skip to content

Commit 4276e7b

Browse files
author
Sunny Goyal
committed
Moving autority definition to a separate file, so
that it can be easily customized using android studio Change-Id: I17f4f4511c2af5d382727769d1b74413f233d500 Bug: 120079798
1 parent 4a5bc9f commit 4276e7b

File tree

5 files changed

+25
-11
lines changed

5 files changed

+25
-11
lines changed

Android.mk

+2-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ LOCAL_STATIC_JAVA_LIBRARIES := LauncherPluginLib
8282

8383
LOCAL_SRC_FILES := \
8484
$(call all-proto-files-under, protos) \
85-
$(call all-proto-files-under, proto_overrides)
85+
$(call all-proto-files-under, proto_overrides) \
86+
$(call all-java-files-under, src_build_config) \
8687

8788
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
8889

quickstep/AndroidManifest.xml

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
xmlns:tools="http://schemas.android.com/tools"
2323
package="com.android.launcher3" >
2424

25-
<uses-sdk android:targetSdkVersion="28" android:minSdkVersion="28"/>
2625
<uses-permission android:name="android.permission.CONTROL_REMOTE_APP_TRANSITION_ANIMATIONS" />
2726

2827
<application

src/com/android/launcher3/LauncherProvider.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public class LauncherProvider extends ContentProvider {
8282
*/
8383
public static final int SCHEMA_VERSION = 27;
8484

85-
public static final String AUTHORITY = FeatureFlags.AUTHORITY;
85+
public static final String AUTHORITY = BuildConfig.APPLICATION_ID + ".settings";
8686

8787
static final String EMPTY_DATABASE_CREATED = "EMPTY_DATABASE_CREATED";
8888

src/com/android/launcher3/config/BaseFlags.java

+1-8
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ public static boolean showFlagTogglerUi(Context context) {
5858
}
5959

6060
public static final boolean IS_DOGFOOD_BUILD = false;
61-
public static final String AUTHORITY = "com.android.launcher3.settings".intern();
6261

6362
// When enabled the promise icon is visible in all apps while installation an app.
6463
public static final boolean LAUNCHER3_PROMISE_APPS_IN_ALL_APPS = false;
@@ -104,12 +103,6 @@ public static void initialize(Context context) {
104103
flag.initialize(context);
105104
}
106105
}
107-
} else {
108-
synchronized (sLock) {
109-
for (TogglableFlag flag : sFlags) {
110-
flag.currentValue = flag.defaultValue;
111-
}
112-
}
113106
}
114107
}
115108

@@ -139,7 +132,7 @@ public static class TogglableFlag {
139132
boolean defaultValue,
140133
String description) {
141134
this.key = checkNotNull(key);
142-
this.defaultValue = defaultValue;
135+
this.currentValue = this.defaultValue = defaultValue;
143136
this.description = checkNotNull(description);
144137
synchronized (sLock) {
145138
sFlags.add(this);

src_build_config/BuildConfig.java

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Copyright (C) 2018 The Android Open Source Project
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.android.launcher3;
18+
19+
public final class BuildConfig {
20+
public static final String APPLICATION_ID = "com.android.launcher3";
21+
}

0 commit comments

Comments
 (0)