mirror of
https://codeberg.org/Mercury-IM/Mercury-IM
synced 2024-06-15 08:04:52 +02:00
18 lines
485 B
Java
18 lines
485 B
Java
|
package org.mercury_im.messenger.android.ui;
|
||
|
|
||
|
import android.content.Intent;
|
||
|
import android.os.Bundle;
|
||
|
|
||
|
public interface MercuryActivity {
|
||
|
|
||
|
default Bundle requiredExtras(Bundle savedInstanceState, Intent intent) {
|
||
|
if (savedInstanceState == null) {
|
||
|
savedInstanceState = intent.getExtras();
|
||
|
}
|
||
|
if (savedInstanceState == null) {
|
||
|
throw new IllegalArgumentException("Missing bundle!");
|
||
|
}
|
||
|
return savedInstanceState;
|
||
|
}
|
||
|
}
|