Skip to content

Commit 6c1b965

Browse files
committed
Remove deprecated screenOrientation=portrait
1 parent d373c7b commit 6c1b965

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

app/src/main/AndroidManifest.xml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
<activity
130130
android:name=".ui.activity.NotificationActivity"
131131
android:label="@string/device_details"
132-
android:screenOrientation="portrait"/>
132+
android:configChanges="orientation|screenSize" />
133133
<activity
134134
android:name=".ui.activity.PairingActivity"
135135
android:configChanges="orientation|screenSize|keyboardHidden"
@@ -146,14 +146,12 @@
146146
android:name=".ui.activity.AudioRecorderActivity"
147147
android:configChanges="orientation|screenSize"
148148
android:label="Audio Recorder"
149-
android:launchMode="singleTask"
150-
android:screenOrientation="portrait"/>
149+
android:launchMode="singleTask"/>
151150
<activity
152151
android:name=".ui.activity.HelpWebView"
153152
android:configChanges="orientation|screenSize"
154153
android:label="Help Webview"
155-
android:launchMode="singleTask"
156-
android:screenOrientation="portrait"/>
154+
android:launchMode="singleTask"/>
157155
<activity
158156
android:name=".ui.activity.MakeCodeWebView"
159157
android:configChanges="orientation|screenSize"

app/src/main/java/com/samsung/microbit/ui/activity/NotificationActivity.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import android.app.Activity;
44
import android.content.Intent;
5+
import android.content.res.Configuration;
56
import android.os.Bundle;
67

78
import com.samsung.microbit.R;
@@ -30,6 +31,11 @@ protected void onCreate(Bundle savedInstanceState) {
3031
finish();
3132
}
3233

34+
@Override
35+
public void onConfigurationChanged(Configuration newConfig) {
36+
super.onConfigurationChanged(newConfig);
37+
}
38+
3339
@Override
3440
protected void onStart() {
3541
super.onStart();
@@ -40,4 +46,4 @@ protected void onStop() {
4046
super.onStop();
4147
}
4248

43-
}
49+
}

0 commit comments

Comments
 (0)