This API will allow apps to change global style mode and accent. Global style mode can be * Automatic (wallpaper) * Automatic (day of time) * Light * Dark Accent colors are defined in the caller application that will have to pass the package name. It's possible for apps to pass a Bitmap and get a suggestion of a global style + accent color that can be applied. Restrictions: * Only one accent can be enabled at time. * We're not limiting this to system apps, but we're marking this as dangerous permissions so apps will have to require it at runtime to the user. Change-Id: I921e8758c3ae093a88e897899612830258c97f8d Signed-off-by: Joey <joey@lineageos.org>
28 lines
893 B
Plaintext
28 lines
893 B
Plaintext
/*
|
|
**
|
|
** Copyright (C) 2018 The LineageOS Project
|
|
**
|
|
** Licensed under the Apache License, Version 2.0 (the "License");
|
|
** you may not use this file except in compliance with the License.
|
|
** You may obtain a copy of the License at
|
|
**
|
|
** http://www.apache.org/licenses/LICENSE-2.0
|
|
**
|
|
** Unless required by applicable law or agreed to in writing, software
|
|
** distributed under the License is distributed on an "AS IS" BASIS,
|
|
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
** See the License for the specific language governing permissions and
|
|
** limitations under the License.
|
|
*/
|
|
|
|
package lineageos.style;
|
|
|
|
import android.graphics.Bitmap;
|
|
import lineageos.style.Suggestion;
|
|
|
|
/** {@hide} */
|
|
interface IStyleInterface {
|
|
boolean setGlobalStyle(int style);
|
|
boolean setAccent(String pkgName);
|
|
Suggestion getSuggestion(in Bitmap source, in int[] colors);
|
|
} |