Skip to content

Commit d63ae14

Browse files
Merge branch 'LawnchairLauncher:15-dev' into 15-dev
2 parents e38f52e + b86b188 commit d63ae14

File tree

4 files changed

+16
-15
lines changed

4 files changed

+16
-15
lines changed

flags/src/com/android/launcher3/FeatureFlagsImpl.java

+1-8
Original file line numberDiff line numberDiff line change
@@ -141,14 +141,7 @@ private void load_overrides_launcher() {
141141
useActivityOverlay =
142142
properties.getBoolean(Flags.FLAG_USE_ACTIVITY_OVERLAY, true);
143143
} catch (NullPointerException e) {
144-
throw new RuntimeException(
145-
"Cannot read value from namespace launcher "
146-
+ "from DeviceConfig. It could be that the code using flag "
147-
+ "executed before SettingsProvider initialization. Please use "
148-
+ "fixed read-only flag by adding is_fixed_read_only: true in "
149-
+ "flag declaration.",
150-
e
151-
);
144+
// Ignored
152145
}
153146
launcher_is_cached = true;
154147
}

quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java

+6-3
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,12 @@ protected void onCreate(Bundle savedInstanceState) {
666666
// work, we must opt-in BEFORE registering back dispatcher. So we need to call
667667
// setEnableOnBackInvokedCallback() before super.onCreate()
668668
if (Utilities.ATLEAST_U && enablePredictiveBackGesture()) {
669-
getApplicationInfo().setEnableOnBackInvokedCallback(true);
669+
try {
670+
getApplicationInfo().setEnableOnBackInvokedCallback(true);
671+
} catch (NoSuchMethodError e) {
672+
// Ignore
673+
}
674+
670675
}
671676
super.onCreate(savedInstanceState);
672677
if (savedInstanceState != null) {
@@ -1354,8 +1359,6 @@ protected void onDeviceProfileInitiated() {
13541359
@Override
13551360
public void dispatchDeviceProfileChanged() {
13561361
super.dispatchDeviceProfileChanged();
1357-
Trace.instantForTrack(TRACE_TAG_APP, "QuickstepLauncher#DeviceProfileChanged",
1358-
getDeviceProfile().toSmallString());
13591362
SystemUiProxy.INSTANCE.get(this).setLauncherAppIconSize(mDeviceProfile.iconSizePx);
13601363
TaskbarManager taskbarManager = mTISBindHelper.getTaskbarManager();
13611364
if (taskbarManager != null) {

src/com/android/launcher3/Launcher.java

+6-2
Original file line numberDiff line numberDiff line change
@@ -585,8 +585,12 @@ protected void onCreate(Bundle savedInstanceState) {
585585
getRootView().dispatchInsets();
586586

587587
final SettingsCache settingsCache = SettingsCache.INSTANCE.get(this);
588-
settingsCache.register(TOUCHPAD_NATURAL_SCROLLING, mNaturalScrollingChangedListener);
589-
mIsNaturalScrollingEnabled = settingsCache.getValue(TOUCHPAD_NATURAL_SCROLLING);
588+
try {
589+
settingsCache.register(TOUCHPAD_NATURAL_SCROLLING, mNaturalScrollingChangedListener);
590+
mIsNaturalScrollingEnabled = settingsCache.getValue(TOUCHPAD_NATURAL_SCROLLING);
591+
} catch (Exception e) {
592+
mIsNaturalScrollingEnabled = false;
593+
}
590594

591595
// Listen for screen turning off
592596
ScreenOnTracker.INSTANCE.get(this).addListener(mScreenOnListener);

src/com/android/launcher3/util/SimpleBroadcastReceiver.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import android.text.TextUtils;
2424

2525
import androidx.annotation.Nullable;
26+
import androidx.core.content.ContextCompat;
2627

2728
import java.util.function.Consumer;
2829

@@ -43,14 +44,14 @@ public void onReceive(Context context, Intent intent) {
4344
* Helper method to register multiple actions
4445
*/
4546
public void register(Context context, String... actions) {
46-
context.registerReceiver(this, getFilter(actions));
47+
ContextCompat.registerReceiver(context, this, getFilter(actions), ContextCompat.RECEIVER_NOT_EXPORTED);
4748
}
4849

4950
/**
5051
* Helper method to register multiple actions associated with a paction
5152
*/
5253
public void registerPkgActions(Context context, @Nullable String pkg, String... actions) {
53-
context.registerReceiver(this, getPackageFilter(pkg, actions));
54+
ContextCompat.registerReceiver(context, this, getPackageFilter(pkg, actions), ContextCompat.RECEIVER_NOT_EXPORTED);
5455
}
5556

5657
/**

0 commit comments

Comments
 (0)