Expand emulator compatibility coverage
This commit is contained in:
@@ -27,7 +27,8 @@
|
||||
<activity
|
||||
android:name=".ScenarioActivity"
|
||||
android:configChanges="keyboardHidden|orientation|screenSize"
|
||||
android:exported="false" />
|
||||
android:exported="true"
|
||||
android:launchMode="singleTop" />
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true">
|
||||
|
||||
+15
-1
@@ -2,6 +2,7 @@ package se.ajpanton.statusbartweak.harness;
|
||||
|
||||
import android.Manifest;
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.graphics.Color;
|
||||
@@ -51,7 +52,20 @@ public final class ScenarioActivity extends Activity {
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
String scenario = getIntent().getStringExtra(EXTRA_SCENARIO);
|
||||
applyScenario(getIntent());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onNewIntent(Intent intent) {
|
||||
super.onNewIntent(intent);
|
||||
setIntent(intent);
|
||||
stopCamera();
|
||||
stopMicrophone();
|
||||
applyScenario(intent);
|
||||
}
|
||||
|
||||
private void applyScenario(Intent intent) {
|
||||
String scenario = intent != null ? intent.getStringExtra(EXTRA_SCENARIO) : null;
|
||||
if (scenario == null) {
|
||||
scenario = SCENARIO_OPAQUE_LIGHT;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user